Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
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::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.

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

Member Function Documentation

◆ get_argstring()

const char* ProgOpt::get_argstring ( ) const
inlineprivate

Definition at line 67 of file ProgOptions.cpp.

68  {
69  switch( type )
70  {
71  case INT:
72  return "int";
73  case INT_VECT:
74  return "ints";
75  case REAL:
76  return "val";
77  case FLAG:
78  return "";
79  default:
80  return "arg";
81  }
82  }

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

Referenced by ProgOptions::get_option_usage_prefix().

Friends And Related Function Documentation

◆ ProgOptions

friend class ProgOptions
friend

Definition at line 91 of file ProgOptions.cpp.

Member Data Documentation

◆ args

◆ cancel_opt

ProgOpt* ProgOpt::cancel_opt
private

Definition at line 65 of file ProgOptions.cpp.

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

◆ flags

◆ longname

std::string ProgOpt::longname
private

Definition at line 60 of file ProgOptions.cpp.

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

◆ shortname

std::string ProgOpt::shortname
private

Definition at line 60 of file ProgOptions.cpp.

Referenced by ProgOptions::get_option_usage_prefix().

◆ storage

void* ProgOpt::storage
private

◆ type


The documentation for this class was generated from the following file: