*** empty log message ***
[h316.git] / pc-tools / ldc2 / src / argument_reader.hh
index 122217684bee2d1d9a5ae0d5ea9344f783837bcc..d88d3dd7959bad57227dbe6f4a37d959d2d78d14 100644 (file)
@@ -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("<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>"));
     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;
   };
+  vector<opt_t>opt_v;
+  vector<arg_t>arg_v;
+  string app_name;
 
-  vector<parameter>arguments;
-  vector<free_parameter>free_arguments;
-
-  string progname;
-};
+}; // class argument_reader
 
 
 #endif