Mesh Oriented datABase  (version 5.4.1)
Array-based unstructured mesh datastructure
ProgOpt Class Reference
+ Collaboration diagram for ProgOpt:

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 57 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 85 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 67 of file ProgOptions.cpp.

References FLAG, INT, INT_VECT, REAL, and type.

Referenced by ProgOptions::get_option_usage_prefix().

    {
        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 91 of file ProgOptions.cpp.


Member Data Documentation

Definition at line 65 of file ProgOptions.cpp.

Referenced by ProgOptions::addOpt(), and ProgOptions::process_option().

std::string ProgOpt::longname [private]

Definition at line 60 of file ProgOptions.cpp.

Referenced by ProgOptions::get_option_usage_prefix(), and ProgOptions::printHelp().

std::string ProgOpt::shortname [private]

Definition at line 60 of file ProgOptions.cpp.

Referenced by ProgOptions::get_option_usage_prefix().

List of all members.


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