moab
ProgOpt Class Reference

List of all members.

Public Member Functions

 ProgOpt (const std::string &longname_p, const std::string &shortname_p, int flags_p, OptType t=FLAG)

Private Member Functions

const char * get_argstring () const

Private Attributes

std::string shortname
std::string longname
std::vector< std::string > args
OptType type
void * storage
int flags
ProgOptcancel_opt

Friends

class ProgOptions

Detailed Description

Definition at line 37 of file ProgOptions.cpp.


Constructor & Destructor Documentation

ProgOpt::ProgOpt ( const std::string &  longname_p,
const std::string &  shortname_p,
int  flags_p,
OptType  t = FLAG 
) [inline]

Definition at line 62 of file ProgOptions.cpp.

                                                                                                     :
    shortname( shortname_p ), longname( longname_p ), type(t), 
    storage(NULL), flags(flags_p), cancel_opt(NULL)
  {}

Member Function Documentation

const char* ProgOpt::get_argstring ( ) const [inline, private]

Definition at line 46 of file ProgOptions.cpp.

                                    { 
    switch( type ){
    case INT:
      return "int";
    case INT_VECT:
      return "ints";
    case REAL:
      return "val";
    case FLAG:
      return "";
    default:
      return "arg";
    }
  }

Friends And Related Function Documentation

friend class ProgOptions [friend]

Definition at line 67 of file ProgOptions.cpp.


Member Data Documentation

std::vector< std::string > ProgOpt::args [private]

Definition at line 40 of file ProgOptions.cpp.

Definition at line 44 of file ProgOptions.cpp.

int ProgOpt::flags [private]

Definition at line 43 of file ProgOptions.cpp.

std::string ProgOpt::longname [private]

Definition at line 39 of file ProgOptions.cpp.

std::string ProgOpt::shortname [private]

Definition at line 39 of file ProgOptions.cpp.

void* ProgOpt::storage [private]

Definition at line 42 of file ProgOptions.cpp.

Definition at line 41 of file ProgOptions.cpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines