#include "wx/arrstr.h"
#include "wx/cmdargs.h"
+// determines ConvertStringToArgs() behaviour
+enum wxCmdLineSplitType
+{
+ wxCMD_LINE_SPLIT_DOS,
+ wxCMD_LINE_SPLIT_UNIX
+};
+
#if wxUSE_CMDLINE_PARSER
class WXDLLIMPEXP_FWD_BASE wxDateTime;
// by default, options are optional (sic) and each call to AddParam() allows
// one more parameter - this may be changed by giving non-default flags to it
-enum
+enum wxCmdLineEntryFlags
{
wxCMD_LINE_OPTION_MANDATORY = 0x01, // this option must be given
wxCMD_LINE_PARAM_OPTIONAL = 0x02, // the parameter may be omitted
void Reset();
// break down the command line in arguments
- static wxArrayString ConvertStringToArgs(const wxString& cmdline);
+ static wxArrayString
+ ConvertStringToArgs(const wxString& cmdline,
+ wxCmdLineSplitType type = wxCMD_LINE_SPLIT_DOS);
private:
// common part of all ctors
struct wxCmdLineParserData *m_data;
- DECLARE_NO_COPY_CLASS(wxCmdLineParser)
+ wxDECLARE_NO_COPY_CLASS(wxCmdLineParser);
};
#else // !wxUSE_CMDLINE_PARSER
class WXDLLIMPEXP_BASE wxCmdLineParser
{
public:
- static wxArrayString ConvertStringToArgs(const wxString& cmdline);
+ static wxArrayString
+ ConvertStringToArgs(const wxString& cmdline,
+ wxCmdLineSplitType type = wxCMD_LINE_SPLIT_DOS);
};
#endif // wxUSE_CMDLINE_PARSER/!wxUSE_CMDLINE_PARSER