QMCPACK
CommandLineParserClass Class Reference
+ Collaboration diagram for CommandLineParserClass:

Public Member Functions

bool Parse (int argc, char **argv)
 
bool Found (std::string name)
 
std::string GetArg (std::string name)
 
std::string GetArg (std::string name, int num)
 
int NumFiles ()
 
std::string GetFile (int i)
 
 CommandLineParserClass (std::list< ParamClass > &argList)
 

Private Attributes

std::map< std::string, ParamClassArgMap
 
std::vector< std::string > Files
 

Detailed Description

Definition at line 80 of file ParseCommand.h.

Constructor & Destructor Documentation

◆ CommandLineParserClass()

CommandLineParserClass ( std::list< ParamClass > &  argList)

Member Function Documentation

◆ Found()

bool Found ( std::string  name)
inline

Definition at line 88 of file ParseCommand.h.

References ArgMap.

88 { return ArgMap[name].Found; }
std::map< std::string, ParamClass > ArgMap
Definition: ParseCommand.h:83

◆ GetArg() [1/2]

std::string GetArg ( std::string  name)
inline

Definition at line 89 of file ParseCommand.h.

References ArgMap.

89 { return ArgMap[name].GetArg(); }
std::map< std::string, ParamClass > ArgMap
Definition: ParseCommand.h:83

◆ GetArg() [2/2]

std::string GetArg ( std::string  name,
int  num 
)
inline

Definition at line 90 of file ParseCommand.h.

References ArgMap.

90 { return ArgMap[name].GetArg(num); }
std::map< std::string, ParamClass > ArgMap
Definition: ParseCommand.h:83

◆ GetFile()

std::string GetFile ( int  i)
inline

Definition at line 92 of file ParseCommand.h.

References Files.

92 { return Files[i]; }
std::vector< std::string > Files
Definition: ParseCommand.h:84

◆ NumFiles()

int NumFiles ( )
inline

Definition at line 91 of file ParseCommand.h.

References Files.

91 { return Files.size(); }
std::vector< std::string > Files
Definition: ParseCommand.h:84

◆ Parse()

bool Parse ( int  argc,
char **  argv 
)

Member Data Documentation

◆ ArgMap

std::map<std::string, ParamClass> ArgMap
private

Definition at line 83 of file ParseCommand.h.

Referenced by Found(), and GetArg().

◆ Files

std::vector<std::string> Files
private

Definition at line 84 of file ParseCommand.h.

Referenced by GetFile(), and NumFiles().


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