当前位置: 首页>>代码示例>>C++>>正文


C++ wxCmdLineParser::AddSwitch方法代码示例

本文整理汇总了C++中wxCmdLineParser::AddSwitch方法的典型用法代码示例。如果您正苦于以下问题:C++ wxCmdLineParser::AddSwitch方法的具体用法?C++ wxCmdLineParser::AddSwitch怎么用?C++ wxCmdLineParser::AddSwitch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在wxCmdLineParser的用法示例。


在下文中一共展示了wxCmdLineParser::AddSwitch方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: OnInitCmdLine

void CFileView::OnInitCmdLine(wxCmdLineParser& parser)
{
	parser.AddSwitch(wxT("h"), wxT("help"), wxT("Show help"), wxCMD_LINE_OPTION_HELP);
	parser.AddSwitch(wxT("v"), wxT("version"), wxT("Show program version"), wxCMD_LINE_PARAM_OPTIONAL);
	parser.AddOption(wxT("s"), wxT("strings"), wxT("String decoding mode: display (default), safe, utf8, none"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL);
	parser.AddParam(wxT("input file"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_PARAM_MULTIPLE);
}
开发者ID:dreamerc,项目名称:amule,代码行数:7,代码来源:FileView.cpp

示例2: OnInitCmdLine

/// Parse command line
void alcc::OnInitCmdLine(wxCmdLineParser& cmdline)
{
	cmdline.AddSwitch(wxT("h"), wxT("help"), wxT("show this help message"), wxCMD_LINE_OPTION_HELP);
	cmdline.AddSwitch(wxT("v"), wxT("verbose"), wxT("be verbose"));
	cmdline.AddSwitch(wxT("p"), wxT("parthashes"), wxT("add part-hashes to ed2k link"));
	cmdline.AddParam(wxT("input files"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE);
}
开发者ID:geekt,项目名称:amule,代码行数:8,代码来源:alcc.cpp

示例3: OnInitCmdLine

void TestApp::OnInitCmdLine(wxCmdLineParser &parser) {

        parser.SetLogo(_("Test app version 1.00."));

	parser.AddSwitch(_T("a") , _T("activity"));

	parser.AddOption(_T("base"), wxEmptyString, 
		_("base name"), wxCMD_LINE_VAL_STRING);

	parser.AddParam(_T("url"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL);

	parser.AddSwitch(_T("e"), wxEmptyString, 
		_("open url in existing window"));


	parser.AddSwitch(_T("v"), _T("verbose"), _("verbose logging"));

	parser.AddSwitch(_T("V"), _T("version"), 
		_("print version number and exit"));
	
#if 0
	parser.AddSwitch(_T("D<name>=<str>"), wxEmptyString,
		_("libparnt value initialization"));
#endif
	
	parser.AddOption(_T("d"), _T("debug"), _("debug level"), wxCMD_LINE_VAL_NUMBER);
	

}
开发者ID:cyclefusion,项目名称:szarp,代码行数:29,代码来源:testapp.cpp

示例4: OnInitCmdLine

void MyApp::OnInitCmdLine(wxCmdLineParser& parser)
{
    parser.AddSwitch("", "sb", "Do not use double buffering");
    parser.AddSwitch("", "db", "Use double buffering");
    parser.AddSwitch("", "va", "Use vertex arrays");

    wxApp::OnInitCmdLine(parser);
}
开发者ID:ExperimentationBox,项目名称:Edenite,代码行数:8,代码来源:isosurf.cpp

示例5: OnInitCmdLine

void MacUninstallApp::OnInitCmdLine(wxCmdLineParser& parser)
{
    // Init standard options (--help, --verbose);
    wxApp::OnInitCmdLine(parser);
    parser.AddSwitch(wxEmptyString, wxT("test"),
            _("Test mode. Just create log file reporting what would happen."));
    parser.AddSwitch(wxEmptyString, wxT("batch"),
            _("Uninstall without asking the user (needs admin rights)."));
}
开发者ID:carriercomm,项目名称:opennx-1,代码行数:9,代码来源:MacUninstallApp.cpp

示例6: OnInitCmdLine

void wxGISServerApp::OnInitCmdLine(wxCmdLineParser& pParser)
{
    wxAppConsole::OnInitCmdLine(pParser);
    pParser.AddSwitch(wxT( "v" ), wxT( "version" ),     _( "The version of this program" ));
    pParser.AddSwitch(wxT( "i" ), wxT( "install" ),     _( "Install wxGIS Server as service" ));
    pParser.AddSwitch(wxT( "r" ), wxT( "run" ),         _( "Run the wxGIS Server in standalone mode. Press 'q' to quit." ));
    pParser.AddSwitch(wxT( "u" ), wxT( "uninstall" ),   _( "Uninstall wxGIS Server service" ));
    pParser.AddSwitch(wxT( "s" ), wxT( "start" ),       _( "Start wxGIS Server service" ));

    pParser.SetLogo(wxString::Format(_("The wxGIS Server (%s)\nAuthor: Bishop (aka Barishnikov Dmitriy), [email protected]\nCopyright (c) 2010-%d"), wxString(wxGIS_VERSION_NUM_DOT_STRING_T).c_str(), __YEAR__));
}
开发者ID:GimpoByte,项目名称:nextgismanager,代码行数:11,代码来源:serverapp.cpp

示例7: OnInitCmdLine

void MyApp::OnInitCmdLine(wxCmdLineParser& parser)
{
    wxApp::OnInitCmdLine(parser);

    parser.AddSwitch("", CmdLineOption::MDI,
                     "run in MDI mode: multiple documents, single window");
    parser.AddSwitch("", CmdLineOption::SDI,
                     "run in SDI mode: multiple documents, multiple windows");
    parser.AddSwitch("", CmdLineOption::SINGLE,
                     "run in single document mode");
}
开发者ID:auygun,项目名称:gel,代码行数:11,代码来源:docview.cpp

示例8: worker

void
Client::OnInitCmdLine(wxCmdLineParser& pParser)
{
    wxApp::OnInitCmdLine(pParser);
    pParser.AddSwitch(wxT("e"),wxT("event"),_("Use event based worker (default)"),wxCMD_LINE_PARAM_OPTIONAL);
    pParser.AddSwitch(wxT("t"),wxT("thread"),_("Use thread based worker"),wxCMD_LINE_PARAM_OPTIONAL);
    pParser.AddSwitch(wxT("r"),wxT("random"),_("Send radnom data (default)"),wxCMD_LINE_PARAM_OPTIONAL);
    pParser.AddOption(wxT("m"),wxT("message"),_("Send message from <str>"),wxCMD_LINE_VAL_STRING,wxCMD_LINE_PARAM_OPTIONAL);
    pParser.AddOption(wxT("f"),wxT("file"),_("Send contents of <file>"),wxCMD_LINE_VAL_STRING,wxCMD_LINE_PARAM_OPTIONAL);
    pParser.AddOption(wxT("H"),wxT("hostname"),_("IP or name of host to connect to"),wxCMD_LINE_VAL_STRING,wxCMD_LINE_PARAM_OPTIONAL);
    pParser.AddOption(wxT("s"),wxT("stress"),_("stress test with <num> concurrent connections"),wxCMD_LINE_VAL_NUMBER,wxCMD_LINE_PARAM_OPTIONAL);
}
开发者ID:ExperimentationBox,项目名称:Edenite,代码行数:12,代码来源:baseclient.cpp

示例9: OnInitCmdLine

void BenchApp::OnInitCmdLine(wxCmdLineParser& parser)
{
    BenchAppBase::OnInitCmdLine(parser);

    parser.AddSwitch(OPTION_LIST,
                     "list",
                     "list all the existing benchmarks");

    parser.AddSwitch(OPTION_SINGLE,
                     "single",
                     "run the benchmark once only");

    parser.AddOption(OPTION_AVG_COUNT,
                     "avg-count",
                     wxString::Format
                     (
                        "number of times to run benchmarking loop (default: %ld)",
                        m_avgCount
                     ),
                     wxCMD_LINE_VAL_NUMBER);
    parser.AddOption(OPTION_NUM_RUNS,
                     "num-runs",
                     wxString::Format
                     (
                         "number of times to run each benchmark in a loop "
                         "(default: %ld)",
                         m_numRuns
                     ),
                     wxCMD_LINE_VAL_NUMBER);
    parser.AddOption(OPTION_NUMERIC_PARAM,
                     "num-param",
                     wxString::Format
                     (
                         "numeric parameter used by some benchmark functions "
                         "(default: %ld)",
                         m_numParam
                     ),
                     wxCMD_LINE_VAL_NUMBER);
    parser.AddOption(OPTION_STRING_PARAM,
                     "str-param",
                     "string parameter used by some benchmark functions "
                     "(default: empty)",
                     wxCMD_LINE_VAL_STRING);

    parser.AddParam("benchmark name",
                    wxCMD_LINE_VAL_STRING,
                    wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_PARAM_MULTIPLE);
}
开发者ID:euler0,项目名称:Helium,代码行数:48,代码来源:bench.cpp

示例10: OnInitCmdLine

void iCPApp::OnInitCmdLine(wxCmdLineParser &parser)
{
    parser.AddSwitch(wxT("h"),wxT("help"),wxT("shows this help message"));
    parser.AddOption(wxT("s"),wxT("setting"),wxT("used setting"),wxCMD_LINE_VAL_NUMBER);
    parser.AddOption(wxT("m"),wxT("matches"),wxT("number of matches"),wxCMD_LINE_VAL_NUMBER);
    parser.AddOption(wxT("o"),wxT("output"),wxT("output project"),wxCMD_LINE_VAL_STRING,wxCMD_LINE_OPTION_MANDATORY);
    parser.AddParam(wxT("input.pto"),wxCMD_LINE_VAL_STRING,wxCMD_LINE_OPTION_MANDATORY);
};
开发者ID:ndevenish,项目名称:Hugin,代码行数:8,代码来源:icpfind.cpp

示例11: OnInitCmdLine

void CTimerControlApp::OnInitCmdLine(wxCmdLineParser& parser)
{
	parser.AddSwitch(NOLOGGING_SWITCH, wxEmptyString, wxEmptyString, wxCMD_LINE_PARAM_OPTIONAL);
	parser.AddOption(LOGDIR_OPTION,    wxEmptyString, wxEmptyString, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL);
	parser.AddParam(NAME_PARAM, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL);

	wxApp::OnInitCmdLine(parser);
}
开发者ID:BackupTheBerlios,项目名称:opendv-svn,代码行数:8,代码来源:TimerControlApp.cpp

示例12: OnInitCmdLine

void PoeditApp::OnInitCmdLine(wxCmdLineParser& parser)
{
    wxApp::OnInitCmdLine(parser);

    parser.AddSwitch("", CL_KEEP_TEMP_FILES,
                     _("don't delete temporary files (for debugging)"));

    parser.AddParam("catalog.po", wxCMD_LINE_VAL_STRING, 
                    wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_PARAM_MULTIPLE);
}
开发者ID:mfloryan,项目名称:poedit,代码行数:10,代码来源:edapp.cpp

示例13: OnInitCmdLine

void CSplitRepeaterApp::OnInitCmdLine(wxCmdLineParser& parser)
{
	parser.AddSwitch(NOLOGGING_SWITCH, wxEmptyString, wxEmptyString, wxCMD_LINE_PARAM_OPTIONAL);
	parser.AddSwitch(GUI_SWITCH,       wxEmptyString, wxEmptyString, wxCMD_LINE_PARAM_OPTIONAL);
	parser.AddOption(LOGDIR_OPTION,    wxEmptyString, wxEmptyString, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL);
	parser.AddOption(CONFDIR_OPTION,   wxEmptyString, wxEmptyString, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL);
	parser.AddParam(NAME_PARAM, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL);

	wxApp::OnInitCmdLine(parser);
}
开发者ID:BackupTheBerlios,项目名称:opendv-svn,代码行数:10,代码来源:SplitRepeaterApp.cpp

示例14: OnInitCmdLine

    virtual void OnInitCmdLine(wxCmdLineParser& parser)
    {
        parser.AddSwitch(_T("h"), _T("help"),
                         _T("Display help for the command line parameters."),
                         wxCMD_LINE_OPTION_HELP);

        parser.AddOption(_T("L"), _T("lang"),
                         _T("Set language for messages. Example: de or de_DE."),
                         wxCMD_LINE_VAL_STRING, 0);
    }
开发者ID:bingmann,项目名称:cryptote,代码行数:10,代码来源:main.cpp

示例15: OnInitCmdLine

void EkstrApp::OnInitCmdLine(wxCmdLineParser &parser) {
	szApp<>::OnInitCmdLine(parser);
	parser.SetLogo(_("Szarp Extractor version 3.00"));
	parser.AddOption(_T("geometry"), wxEmptyString,
			 _("X windows geometry specification"),
			 wxCMD_LINE_VAL_STRING);
	parser.AddOption(_T("base"), wxEmptyString, _("base name"),
			 wxCMD_LINE_VAL_STRING);
	parser.AddSwitch(_T("4"), _T("sz4") , _("use sz4 database engine"));
}
开发者ID:Strongc,项目名称:szarp,代码行数:10,代码来源:ekstraktor3.cpp


注:本文中的wxCmdLineParser::AddSwitch方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。