(file) Return to getoopt.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / getoopt

Diff for /pegasus/src/Pegasus/getoopt/getoopt.h between version 1.27 and 1.28

version 1.27, 2006/01/30 16:18:39 version 1.28, 2007/06/19 17:58:04
Line 113 
Line 113 
 //   A LONGFLAG means that the value is bound to a long-named option name //   A LONGFLAG means that the value is bound to a long-named option name
 //   REGULAR means that the argument value is not preceded by a flag //   REGULAR means that the argument value is not preceded by a flag
 // //
 class PEGASUS_GETOOPT_LINKAGE Optarg {  class PEGASUS_GETOOPT_LINKAGE Optarg
   {
  public:  public:
   enum opttype {FLAG, LONGFLAG, REGULAR};   enum opttype {FLAG, LONGFLAG, REGULAR};
   
  private:  private:
   String _name;   String _name;
   opttype _opttype;   opttype _opttype;
   String _value;   String _value;
   
  public:  public:
   // Constructors and Destructor.  Default copying is OK for this class.   // Constructors and Destructor.  Default copying is OK for this class.
   Optarg();   Optarg();
   Optarg(const String &name, opttype type, const String &value);      Optarg(
           const String& name,
           opttype type,
           const String& value);
   ~Optarg();   ~Optarg();
   
   // Methods to set or reset the properties   // Methods to set or reset the properties
   void setName(const String &name);   void setName(const String &name);
   void setType(opttype type);   void setType(opttype type);
   void setValue(const String &value);   void setValue(const String &value);
   
   // Methods to get information about the object   // Methods to get information about the object
   const String &getName() const;   const String &getName() const;
   const String &getopt() const;   const String &getopt() const;
Line 161 
Line 169 
 //      getoopt cmdline(optstring); //      getoopt cmdline(optstring);
 //      for (getoopt::const_iterator it = cmdline.begin(); //      for (getoopt::const_iterator it = cmdline.begin();
 //              it != cmdline.end(); //              it != cmdline.end();
 //                  it++) {  //              it++)
 //        . . . (process an Optarg represented by *it.  //      {
   //        . . . (process an Optarg represented by *it.)
 // //
 //  There are three steps in using this class: //  There are three steps in using this class:
 //    1. Initialization -- specifying the command line options //    1. Initialization -- specifying the command line options
Line 188 
Line 197 
 //       and //       and
 //           value(flagName); //           value(flagName);
 // //
 class PEGASUS_GETOOPT_LINKAGE getoopt {  class PEGASUS_GETOOPT_LINKAGE getoopt
   {
  public:  public:
   typedef Array<flagspec> Flagspec_List;   typedef Array<flagspec> Flagspec_List;
   typedef Array<String>   Error_List;   typedef Array<String>   Error_List;
Line 208 
Line 218 
   flagspec *getFlagspecForUpdate(const String &s);   flagspec *getFlagspecForUpdate(const String &s);
   String emptystring;   String emptystring;
   Optarg _emptyopt;   Optarg _emptyopt;
   
  public:  public:
   enum argtype {NOARG, MUSTHAVEARG, OPTIONALARG};   enum argtype {NOARG, MUSTHAVEARG, OPTIONALARG};
   // Constructor and destructor.  You can initialize an instance with   // Constructor and destructor.  You can initialize an instance with


Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2