本文整理汇总了C++中wxCmdLineParser::AddParam方法的典型用法代码示例。如果您正苦于以下问题:C++ wxCmdLineParser::AddParam方法的具体用法?C++ wxCmdLineParser::AddParam怎么用?C++ wxCmdLineParser::AddParam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxCmdLineParser
的用法示例。
在下文中一共展示了wxCmdLineParser::AddParam方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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);
}
示例2: OnInitCmdLine
void CDStarRepeaterConfigApp::OnInitCmdLine(wxCmdLineParser& parser)
{
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);
}
示例3: OnInitCmdLine
void FlashApp::OnInitCmdLine(wxCmdLineParser& parser)
{
wxApp::OnInitCmdLine(parser);
parser.AddParam("SWF file to play",
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL);
}
示例4: 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);
}
示例5: 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);
}
示例6: 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);
};
示例7: OnInitCmdLine
virtual void OnInitCmdLine(wxCmdLineParser& parser)
{
wxApp::OnInitCmdLine(parser);
parser.AddParam("URL to open",
wxCMD_LINE_VAL_STRING,
wxCMD_LINE_PARAM_OPTIONAL);
}
示例8: OnInitCmdLine
// command line arguments handling
void MyApp::OnInitCmdLine(wxCmdLineParser& parser)
{
parser.AddParam(_("locale"),
wxCMD_LINE_VAL_STRING,
wxCMD_LINE_PARAM_OPTIONAL);
wxApp::OnInitCmdLine(parser);
}
示例9: 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);
}
示例10: OnInitCmdLine
void RaceAnalyzerApp::OnInitCmdLine(wxCmdLineParser& parser){
parser.AddParam("",wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL);
parser.Parse(false);
if (parser.GetParamCount() > 0){
wxString mjljConfigFile = parser.GetParam(0);
_mainFrame->OpenRaceEvent(mjljConfigFile);
}
}
示例11: OnInitCmdLine
void CModelViewerApp::OnInitCmdLine( wxCmdLineParser& parser )
{
wxApp::OnInitCmdLine( parser );
//Note: this works by setting all available parameters in the order that they appear on the command line.
//The model filename must be last for this to work with drag&drop.
parser.AddParam( "Filename of the model to load on startup", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL );
}
示例12: 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);
}
示例13: 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);
}
示例14: 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);
}
示例15: fixlist
void Pcsx2App::OnInitCmdLine( wxCmdLineParser& parser )
{
parser.SetLogo( AddAppName(" >> %s -- A PlayStation 2 Emulator for the PC <<") + L"\n\n" +
_("All options are for the current session only and will not be saved.\n")
);
wxString fixlist( L" " );
for (GamefixId i=GamefixId_FIRST; i < pxEnumEnd; ++i)
{
if( i != GamefixId_FIRST ) fixlist += L",";
fixlist += EnumToString(i);
}
parser.AddParam( _("IsoFile"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL );
parser.AddSwitch( L"h", L"help", _("displays this list of command line options"), wxCMD_LINE_OPTION_HELP );
parser.AddSwitch( wxEmptyString,L"console", _("forces the program log/console to be visible"), wxCMD_LINE_VAL_STRING );
parser.AddSwitch( wxEmptyString,L"fullscreen", _("use fullscreen GS mode") );
parser.AddSwitch( wxEmptyString,L"windowed", _("use windowed GS mode") );
parser.AddSwitch( wxEmptyString,L"nogui", _("disables display of the gui while running games") );
parser.AddSwitch( wxEmptyString,L"noguiprompt", _("when nogui - prompt before exiting on suspend") );
parser.AddOption( wxEmptyString,L"elf", _("executes an ELF image"), wxCMD_LINE_VAL_STRING );
parser.AddOption( wxEmptyString,L"irx", _("executes an IRX image"), wxCMD_LINE_VAL_STRING );
parser.AddSwitch( wxEmptyString,L"nodisc", _("boots an empty DVD tray; use to enter the PS2 system menu") );
parser.AddSwitch( wxEmptyString,L"usecd", _("boots from the CDVD plugin (overrides IsoFile parameter)") );
parser.AddSwitch( wxEmptyString,L"nohacks", _("disables all speedhacks") );
parser.AddOption( wxEmptyString,L"gamefixes", _("use the specified comma or pipe-delimited list of gamefixes.") + fixlist, wxCMD_LINE_VAL_STRING );
parser.AddSwitch( wxEmptyString,L"fullboot", _("disables fast booting") );
parser.AddOption( wxEmptyString,L"cfgpath", _("changes the configuration file path"), wxCMD_LINE_VAL_STRING );
parser.AddOption( wxEmptyString,L"cfg", _("specifies the PCSX2 configuration file to use"), wxCMD_LINE_VAL_STRING );
parser.AddSwitch( wxEmptyString,L"forcewiz", AddAppName(_("forces %s to start the First-time Wizard")) );
parser.AddSwitch( wxEmptyString,L"portable", _("enables portable mode operation (requires admin/root access)") );
parser.AddSwitch( wxEmptyString,L"profiling", _("update options to ease profiling (debug)") );
const PluginInfo* pi = tbl_PluginInfo; do {
parser.AddOption( wxEmptyString, pi->GetShortname().Lower(),
pxsFmt( _("specify the file to use as the %s plugin"), WX_STR(pi->GetShortname()) )
);
} while( ++pi, pi->shortname != NULL );
parser.SetSwitchChars( L"-" );
}