X-Git-Url: http://gitweb.hachti.de/?a=blobdiff_plain;f=pc-tools%2Fldc2%2Fsrc%2Fargument_reader.hh;h=d88d3dd7959bad57227dbe6f4a37d959d2d78d14;hb=fed2c751d37bf5e314fd26c98909471157cc86c0;hp=122217684bee2d1d9a5ae0d5ea9344f783837bcc;hpb=632a71a231a9bdd73a670ec686e13dd049921182;p=h316.git diff --git a/pc-tools/ldc2/src/argument_reader.hh b/pc-tools/ldc2/src/argument_reader.hh index 1222176..d88d3dd 100644 --- a/pc-tools/ldc2/src/argument_reader.hh +++ b/pc-tools/ldc2/src/argument_reader.hh @@ -15,23 +15,23 @@ using namespace std; * - Create an instance. * - Add Parameters/switches with add_param(). * - Add Arguments with add_argument(). - * - Call read_args() with your main routine's arguments.\ - * The vector returned by read_args() contains all error \ + * - Call read_args() with your main routine's arguments. + * The vector returned by read_args() contains all error * messages. When it's empty, everything is fine! - * - Call get_help() if you want nice formatted help output. \ + * - Call get_help() if you want nice formatted help output. * (You want!!!) * Sould be easy to use..... Enjoy. */ class argument_reader{ public: - argument_reader(string n_name); + argument_reader(string name); - void add_param (string shortname, - string longname, - string description, - int * status, - string * target=NULL, + void add_param (string shortname, + string longname, + string description, + int *status, + string *target=NULL, string placeholder=string("") ); @@ -43,9 +43,12 @@ public: void add_argument(string placeholder, string description, int * status, string * target); private: - class parameter{ + /*! + *\brief Container for one command line option. + */ + class opt_t{ public: - parameter (string shortname, string longname,string description, int * status, + opt_t (string shortname, string longname,string description, int * status, string * target=NULL, string placeholder=string("")); string shortname; string longname; @@ -55,21 +58,23 @@ private: string placeholder; }; - class free_parameter{ + /*! + *\brief Container for one command line argument. + */ + class arg_t{ public: - free_parameter (string placeholder,string description, + arg_t (string placeholder,string description, int * status, string * target); int * status; string * target; string description; string placeholder; }; + vectoropt_v; + vectorarg_v; + string app_name; - vectorarguments; - vectorfree_arguments; - - string progname; -}; +}; // class argument_reader #endif