|
Version: 3.1.4
|
#include <wx/cmdline.h>
The interface wxCmdLineArg provides information for an instance of argument passed on command line.
Example of use:
++itarg)
{
switch (itarg->GetKind())
{
if (itarg->IsNegated()) {
}
else {
}
break;
optionName = itarg->GetShortName();
switch (itarg->GetType()) {
break;
break;
break;
break;
}
break;
break;
}
}
With C++11, the for loop could be written:
- Since
- 3.1.0
◆ ~wxCmdLineArg()
virtual wxCmdLineArg::~wxCmdLineArg |
( |
| ) |
|
|
virtual |
◆ GetDateVal()
virtual const wxDateTime& wxCmdLineArg::GetDateVal |
( |
| ) |
const |
|
pure virtual |
Returns the command line argument value as a wxDateTime.
- Note
- This call works only for
wxCMD_LINE_VAL_DATE
options
◆ GetDoubleVal()
virtual double wxCmdLineArg::GetDoubleVal |
( |
| ) |
const |
|
pure virtual |
Returns the command line argument value as a double.
- Note
- This call works only for
wxCMD_LINE_VAL_DOUBLE
options
◆ GetKind()
◆ GetLongName()
virtual wxString wxCmdLineArg::GetLongName |
( |
| ) |
const |
|
pure virtual |
Returns the command line argument long name if any.
- Note
- This call makes sense only for options and switches
◆ GetLongVal()
virtual long wxCmdLineArg::GetLongVal |
( |
| ) |
const |
|
pure virtual |
Returns the command line argument value as a long.
- Note
- This call works only for
wxCMD_LINE_VAL_NUMBER
options
◆ GetShortName()
virtual wxString wxCmdLineArg::GetShortName |
( |
| ) |
const |
|
pure virtual |
Returns the command line argument short name if any.
- Note
- This call makes sense only for options and switches
◆ GetStrVal()
virtual const wxString& wxCmdLineArg::GetStrVal |
( |
| ) |
const |
|
pure virtual |
Returns the command line argument value as a string.
- Note
- This call works only for
wxCMD_LINE_VAL_STRING
options and parameters
◆ GetType()
◆ IsNegated()
virtual bool wxCmdLineArg::IsNegated |
( |
| ) |
const |
|
pure virtual |
Returns true if the switch was negated.
- Note
- This call works only for switches.
@ wxCMD_LINE_VAL_STRING
Definition: cmdline.h:56
wxCmdLineArgs GetArguments() const
Returns the collection of arguments.
const_iterator begin() const
@ wxCMD_LINE_VAL_DOUBLE
Definition: cmdline.h:59
const_iterator end() const
@ wxCMD_LINE_SWITCH
A boolean argument of the program; e.g. -v to enable verbose mode.
Definition: cmdline.h:69
@ wxCMD_LINE_OPTION
An argument with an associated value; e.g.
Definition: cmdline.h:73
@ wxCMD_LINE_VAL_DATE
Definition: cmdline.h:58
Definition: cmdline.h:444
@ wxCMD_LINE_PARAM
A parameter: a required program argument.
Definition: cmdline.h:76
@ wxCMD_LINE_VAL_NUMBER
Definition: cmdline.h:57