CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
CommandLine Class Reference

#include <Utilities.h>

Public Member Functions

bool check ()
 
 CommandLine ()
 
template<class T >
T getValue (const std::string &name)
 
template<class T >
T getValue (const std::string &name, T default_value)
 
template<>
bool getValue (const std::string &name)
 
template<>
bool getValue (const std::string &name, bool default_value)
 
template<class T >
std::vector< TgetVector (const std::string &name)
 
template<class T >
std::vector< TgetVector (const std::string &name, const std::string &default_as_string)
 
bool parse (int argc, char **argv)
 
void print ()
 
 ~CommandLine ()
 

Private Types

typedef std::map< std::string,
std::pair< std::string, bool > > 
OptionMap_t
 
typedef std::vector< std::string > StrVec_t
 

Private Member Functions

bool parse_file (const std::string &file_name)
 

Private Attributes

std::string _exe
 
OptionMap_t _options
 
StrVec_t _ordered_options
 
StrVec_t _unknowns
 

Detailed Description

Definition at line 24 of file Utilities.h.

Member Typedef Documentation

typedef std::map<std::string,std::pair<std::string,bool> > CommandLine::OptionMap_t
private

Definition at line 54 of file Utilities.h.

typedef std::vector<std::string> CommandLine::StrVec_t
private

Definition at line 55 of file Utilities.h.

Constructor & Destructor Documentation

CommandLine::CommandLine ( )

Definition at line 186 of file Utilities.h.

CommandLine::~CommandLine ( )

Definition at line 191 of file Utilities.h.

Member Function Documentation

bool CommandLine::check ( void  )

Definition at line 240 of file Utilities.h.

Referenced by main().

template<class T >
T CommandLine::getValue ( const std::string &  name)

Definition at line 74 of file Utilities.h.

Referenced by main().

template<class T >
T CommandLine::getValue ( const std::string &  name,
T  default_value 
)

Definition at line 93 of file Utilities.h.

template<>
bool CommandLine::getValue ( const std::string &  name)

Definition at line 109 of file Utilities.h.

template<>
bool CommandLine::getValue ( const std::string &  name,
bool  default_value 
)

Definition at line 131 of file Utilities.h.

template<class T >
std::vector< T > CommandLine::getVector ( const std::string &  name)

Definition at line 144 of file Utilities.h.

Referenced by main().

template<class T >
std::vector< T > CommandLine::getVector ( const std::string &  name,
const std::string &  default_as_string 
)

Definition at line 174 of file Utilities.h.

bool CommandLine::parse ( int  argc,
char **  argv 
)

Definition at line 199 of file Utilities.h.

Referenced by main().

bool CommandLine::parse_file ( const std::string &  file_name)
private

Definition at line 311 of file Utilities.h.

void CommandLine::print ( void  )

Definition at line 262 of file Utilities.h.

Referenced by main().

Member Data Documentation

std::string CommandLine::_exe
private

Definition at line 61 of file Utilities.h.

OptionMap_t CommandLine::_options
private

Definition at line 62 of file Utilities.h.

StrVec_t CommandLine::_ordered_options
private

Definition at line 63 of file Utilities.h.

StrVec_t CommandLine::_unknowns
private

Definition at line 64 of file Utilities.h.