\begin{verbatim}
enum wxCmdLineEntryType
{
- wxCMD\_LINE\_SWITCH,
- wxCMD\_LINE\_OPTION,
- wxCMD\_LINE\_PARAM,
- wxCMD\_LINE\_NONE // use this to terminate the list
+ wxCMD_LINE_SWITCH,
+ wxCMD_LINE_OPTION,
+ wxCMD_LINE_PARAM,
+ wxCMD_LINE_NONE // use this to terminate the list
}
\end{verbatim}
}
\begin{verbatim}
enum wxCmdLineParamType
{
- wxCMD\_LINE\_VAL\_STRING, // default
- wxCMD\_LINE\_VAL\_NUMBER,
- wxCMD\_LINE\_VAL\_DATE,
- wxCMD\_LINE\_VAL\_NONE
+ wxCMD_LINE_VAL_STRING, // default
+ wxCMD_LINE_VAL_NUMBER,
+ wxCMD_LINE_VAL_DATE,
+ wxCMD_LINE_VAL_NONE
}
\end{verbatim}
}
\begin{verbatim}
enum
{
- wxCMD\_LINE\_OPTION\_MANDATORY = 0x01, // this option must be given
- wxCMD\_LINE\_PARAM\_OPTIONAL = 0x02, // the parameter may be omitted
- wxCMD\_LINE\_PARAM\_MULTIPLE = 0x04, // the parameter may be repeated
- wxCMD\_LINE\_OPTION\_HELP = 0x08, // this option is a help request
- wxCMD\_LINE\_NEEDS\_SEPARATOR = 0x10, // must have sep before the value
+ wxCMD_LINE_OPTION_MANDATORY = 0x01, // this option must be given
+ wxCMD_LINE_PARAM_OPTIONAL = 0x02, // the parameter may be omitted
+ wxCMD_LINE_PARAM_MULTIPLE = 0x04, // the parameter may be repeated
+ wxCMD_LINE_OPTION_HELP = 0x08, // this option is a help request
+ wxCMD_LINE_NEEDS_SEPARATOR = 0x10, // must have sep before the value
}
\end{verbatim}
}
Using constructors or \helpref{SetDesc}{wxcmdlineparsersetdesc} uses a (usually
{\tt const static}) table containing the command line description. If you want
-to decide which options to acccept during the run-time, using one of the
+to decide which options to accept during the run-time, using one of the
{\tt AddXXX()} functions above might be preferable.
\membersection{Customization}\label{wxcmdlineparsercustomization}
Same as \helpref{wxCmdLineParser}{wxcmdlineparserwxcmdlineparserstr}, but also
specifies the \helpref{command line description}{wxcmdlineparsersetdesc}.
+\membersection{wxCmdLineParser::ConvertStringToArgs}\label{wxcmdlineparserconvertstringtoargs}
+
+\func{static wxArrayString}{ConvertStringToArgs}{\param{const wxChar }{*cmdline}}
+
+Breaks down the string containing the full command line in words. The words are
+separated by whitespace. The quotes can be used in the input string to quote
+the white space and the back slashes can be used to quote the quotes.
+
\membersection{wxCmdLineParser::SetCmdLine}\label{wxcmdlineparsersetcmdlineargc}
\func{void}{SetCmdLine}{\param{int }{argc}, \param{char** }{argv}}
\membersection{wxCmdLineParser::Parse}\label{wxcmdlineparserparse}
-\func{int}{Parse}{\void}
+\func{int}{Parse}{\param{bool }{giveUsage = {\tt TRUE}}}
Parse the command line, return $0$ if ok, $-1$ if {\tt "-h"} or {\tt "--help"}
option was encountered and the help message was given or a positive value if a
syntax error occured.
+\wxheading{Parameters}
+
+\docparam{giveUsage}{If {\tt TRUE} (default), the usage message is given if a
+syntax error was encountered while parsing the command line or if help was
+requested. If {\tt FALSE}, only error messages about possible syntax errors
+are given, use \helpref{Usage}{wxcmdlineparserusage} to show the usage message
+from the caller if needed.}
+
\membersection{wxCmdLineParser::Usage}\label{wxcmdlineparserusage}
\func{void}{Usage}{\void}