ubit::UOption Struct Reference

specification and retreiving of non standard options on the command line. More...

#include <uconf.hpp>

List of all members.

Static Public Member Functions

static class UOptionArg * Arg (bool &val)
static class UOptionArg * Arg (int &val)
static class UOptionArg * Arg (float &val)
static class UOptionArg * Arg (UStr &val)
static class UOptionArg * Arg (char *&val)
static class UOptionArg * Arg (const char *&val)
static void parseOptions (int &argc, char **argv, UOption *options)

Public Attributes

const char * begname
const char * endname
UOptionArg * arg


Detailed Description

specification and retreiving of non standard options on the command line.

example:

Source code for parsing these options:

   char* input_file  = null;
   int   value = 1;
   bool reco_mode = false;

   UOption options[] = {
     {"in","put", UOption::Arg(input_file)}, // "in" is mandatory, "put" is optionnal
     {"value","", UOption::Arg(value)},      // "value" is mandatory, no optionnal part
     {"reco","",  UOption::Arg(reco_mode)},  
     {null}  // must be NULL terminated !!
   };

   // changes the values of variables 'input_file', 'value' and 'reco_mode'
   // if the corresponding options are specified in the command line

   UConf conf(argc, argv, options);
   UAppli appli(conf);
   ...
 


The documentation for this struct was generated from the following file:
Generated on Mon Jan 29 00:20:46 2007 for Ubit by  doxygen 1.4.7