<wx/cmdline.h>
+\wxheading{Library}
+
+\helpref{wxBase}{librarieslist}
+
\wxheading{Constants}
The structure wxCmdLineEntryDesc is used to describe the one command
struct wxCmdLineEntryDesc
{
wxCmdLineEntryType kind;
- const wxChar *shortName;
- const wxChar *longName;
- const wxChar *description;
+ wxString shortName;
+ wxString longName;
+ wxString description;
wxCmdLineParamType type;
int flags;
};
}
The field {\tt shortName} is the usual, short, name of the switch or the option.
-{\tt longName} is the corresponding long name or NULL if the option has no long
+{\tt longName} is the corresponding long name or empty if the option has no long
name. Both of these fields are unused for the parameters. Both the short and
long option names can contain only letters, digits and the underscores.
\helpref{Parse}{wxcmdlineparserparse}.
To specify the command line to parse you may use either one of constructors
-accepting it (\helpref{wxCmdLineParser(argc, argv)}{wxcmdlineparserwxcmdlineparserargc} or
-\helpref{wxCmdLineParser}{wxcmdlineparserwxcmdlineparserdescargc} usually) or,
-if you use \helpref{the default constructor}{wxcmdlineparserwxcmdlineparserdef},
-you can do it later by calling
-\helpref{SetCmdLine}{wxcmdlineparsersetcmdlineargc}.
+accepting it (\tt{wxCmdLineParser(argc, argv)} or \tt{wxCmdLineParser(const wxString&)} usually)
+or, if you use the default constructor, you can do it later by calling
+\helpref{SetCmdLine}{wxcmdlineparsersetcmdline}.
The same holds for command line description: it can be specified either in
-the constructor (\helpref{without command line}{wxcmdlineparserwxcmdlineparserdesc} or
-\helpref{together with it}{wxcmdlineparserwxcmdlineparserdescargc}) or
+the constructor (\helpref{without\ command\ line}{wxcmdlineparserwxcmdlineparser} or
+\helpref{together\ with\ it}{wxcmdlineparserwxcmdlineparserdescargc}) or
constructed later using either \helpref{SetDesc}{wxcmdlineparsersetdesc} or
combination of \helpref{AddSwitch}{wxcmdlineparseraddswitch},
\helpref{AddOption}{wxcmdlineparseraddoption} and
methods.
For a simple switch, you will simply call
-\helpref{Found}{wxcmdlineparserfoundswitch} to determine if the switch was given
+\helpref{Found}{wxcmdlineparserfound} to determine if the switch was given
or not, for an option or a parameter, you will call a version of {\tt Found()}
which also returns the associated value in the provided variable. All
{\tt Found()} functions return true if the switch or option were found in the
}}
-\membersection{wxCmdLineParser::wxCmdLineParser}\label{wxcmdlineparserwxcmdlineparserdef}
+\membersection{wxCmdLineParser::wxCmdLineParser}\label{wxcmdlineparserwxcmdlineparserctor}
\func{}{wxCmdLineParser}{\void}
Default constructor. You must use
-\helpref{SetCmdLine}{wxcmdlineparsersetcmdlineargc} later.
-
-
-\membersection{wxCmdLineParser::wxCmdLineParser}\label{wxcmdlineparserwxcmdlineparserargc}
+\helpref{SetCmdLine}{wxcmdlineparsersetcmdline} later.
\func{}{wxCmdLineParser}{\param{int }{argc}, \param{char** }{argv}}
\func{}{wxCmdLineParser}{\param{int }{argc}, \param{wchar\_t** }{argv}}
-Constructor specifies the command line to parse. This is the traditional
+Constructors which specify the command line to parse. This is the traditional
(Unix) command line format. The parameters {\it argc} and {\it argv} have the
same meaning as for {\tt main()} function.
platforms the command line arguments are passed as ASCII strings even to
Unicode programs.
-
-\membersection{wxCmdLineParser::wxCmdLineParser}\label{wxcmdlineparserwxcmdlineparserstr}
-
\func{}{wxCmdLineParser}{\param{const wxString\& }{cmdline}}
-Constructor specifies the command line to parse in Windows format. The parameter
+Constructor which specify the command line to parse in Windows format. The parameter
{\it cmdline} has the same meaning as the corresponding parameter of
{\tt WinMain()}.
-
-\membersection{wxCmdLineParser::wxCmdLineParser}\label{wxcmdlineparserwxcmdlineparserdesc}
-
\func{}{wxCmdLineParser}{\param{const wxCmdLineEntryDesc* }{desc}}
-Same as \helpref{wxCmdLineParser}{wxcmdlineparserwxcmdlineparserdef}, but also
-specifies the \helpref{command line description}{wxcmdlineparsersetdesc}.
-
-
-\membersection{wxCmdLineParser::wxCmdLineParser}\label{wxcmdlineparserwxcmdlineparserdescargc}
+Specifies the \helpref{command line description}{wxcmdlineparsersetdesc} but not the
+command line. You must use \helpref{SetCmdLine}{wxcmdlineparsersetcmdline} later.
\func{}{wxCmdLineParser}{\param{const wxCmdLineEntryDesc* }{desc}, \param{int }{argc}, \param{char** }{argv}}
-Same as \helpref{wxCmdLineParser}{wxcmdlineparserwxcmdlineparserargc}, but also
-specifies the \helpref{command line description}{wxcmdlineparsersetdesc}.
-
-
-\membersection{wxCmdLineParser::wxCmdLineParser}\label{wxcmdlineparserwxcmdlineparserdescstr}
+Specifies both the command line (in Unix format) and the
+\helpref{command line description}{wxcmdlineparsersetdesc}.
\func{}{wxCmdLineParser}{\param{const wxCmdLineEntryDesc* }{desc}, \param{const wxString\& }{cmdline}}
-Same as \helpref{wxCmdLineParser}{wxcmdlineparserwxcmdlineparserstr}, but also
-specifies the \helpref{command line description}{wxcmdlineparsersetdesc}.
-
+Specifies both the command line (in Windows format) and the
+\helpref{command line description}{wxcmdlineparsersetdesc}.
\membersection{wxCmdLineParser::ConvertStringToArgs}\label{wxcmdlineparserconvertstringtoargs}
the white space and the back slashes can be used to quote the quotes.
-\membersection{wxCmdLineParser::SetCmdLine}\label{wxcmdlineparsersetcmdlineargc}
+\membersection{wxCmdLineParser::SetCmdLine}\label{wxcmdlineparsersetcmdline}
\func{void}{SetCmdLine}{\param{int }{argc}, \param{char** }{argv}}
Set command line to parse after using one of the constructors which don't do it.
The second overload of this function is only available in Unicode build.
-\wxheading{See also}
-
-\helpref{wxCmdLineParser}{wxcmdlineparserwxcmdlineparserargc}
-
-
-\membersection{wxCmdLineParser::SetCmdLine}\label{wxcmdlineparsersetcmdlinestr}
-
\func{void}{SetCmdLine}{\param{const wxString\& }{cmdline}}
Set command line to parse after using one of the constructors which don't do it.
-\wxheading{See also}
-
-\helpref{wxCmdLineParser}{wxcmdlineparserwxcmdlineparserstr}
\membersection{wxCmdLineParser::\destruct{wxCmdLineParser}}\label{wxcmdlineparserdtor}
\helpref{SetLogo}{wxcmdlineparsersetlogo}
-\membersection{wxCmdLineParser::Found}\label{wxcmdlineparserfoundswitch}
+\membersection{wxCmdLineParser::Found}\label{wxcmdlineparserfound}
\constfunc{bool}{Found}{\param{const wxString\& }{name}}
-Returns true if the given switch was found, false otherwise.
-
-
-\membersection{wxCmdLineParser::Found}\label{wxcmdlineparserfoundstringoption}
+Returns \true if the given switch was found, false otherwise.
\constfunc{bool}{Found}{\param{const wxString\& }{name}, \param{wxString* }{value}}
-Returns true if an option taking a string value was found and stores the
+Returns \true if an option taking a string value was found and stores the
value in the provided pointer (which should not be NULL).
-
-\membersection{wxCmdLineParser::Found}\label{wxcmdlineparserfoundintoption}
-
\constfunc{bool}{Found}{\param{const wxString\& }{name}, \param{long* }{value}}
-Returns true if an option taking an integer value was found and stores
+Returns \true if an option taking an integer value was found and stores
the value in the provided pointer (which should not be NULL).
-
-\membersection{wxCmdLineParser::Found}\label{wxcmdlineparserfounddateoption}
-
\constfunc{bool}{Found}{\param{const wxString\& }{name}, \param{wxDateTime* }{value}}
-Returns true if an option taking a date value was found and stores the
+Returns \true if an option taking a date value was found and stores the
value in the provided pointer (which should not be NULL).
\constfunc{wxString}{GetParam}{\param{size\_t }{n = 0u}}
-Returns the value of Nth parameter (as string only for now).
+Returns the value of Nth parameter (as string only).
\wxheading{See also}