+#ifdef TEST_CMDLINE
+ static const wxCmdLineEntryDesc cmdLineDesc[] =
+ {
+ { wxCMD_LINE_SWITCH, "v", "verbose", "be verbose" },
+ { wxCMD_LINE_SWITCH, "q", "quiet", "be quiet" },
+
+ { wxCMD_LINE_OPTION, "o", "output", "output file" },
+ { wxCMD_LINE_OPTION, "i", "input", "input dir" },
+ { wxCMD_LINE_OPTION, "s", "size", "output block size", wxCMD_LINE_VAL_NUMBER },
+ { wxCMD_LINE_OPTION, "d", "date", "output file date", wxCMD_LINE_VAL_NUMBER },
+
+ { wxCMD_LINE_PARAM, NULL, NULL, "input file",
+ wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE },
+
+ { wxCMD_LINE_NONE }
+ };
+
+ wxCmdLineParser parser(cmdLineDesc, argc, argv);
+
+ switch ( parser.Parse() )
+ {
+ case -1:
+ wxLogMessage("Help was given, terminating.");
+ break;
+
+ case 0:
+ ShowCmdLine(parser);
+ break;
+
+ default:
+ wxLogMessage("Syntax error detected, aborting.");
+ break;
+ }
+#endif // TEST_CMDLINE
+