NifTK
16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
|
Parser for extracting program arguments from the command line. More...
Public Member Functions | |
int | GetArgument (int, void *) |
int | GetArgument (int, bool &value) |
Get back a bool argument out of parsed command line. More... | |
int | GetArgument (int, unsigned int &value) |
Get back an unsigned int argument out of parsed command line. More... | |
int | GetArgument (int, int &value) |
Get back an int argument out of parsed command line. More... | |
int | GetArgument (int, int *&value) |
Get back an int pointer argument out of parsed command line. More... | |
int | GetArgument (int, float &value) |
Get back an float argument out of parsed command line. More... | |
int | GetArgument (int, float *&value) |
Get back an float pointer argument out of parsed command line. More... | |
int | GetArgument (int, double &value) |
Get back an double argument out of parsed command line. More... | |
int | GetArgument (int, double *&value) |
Get back an double pointer argument out of parsed command line. More... | |
int | GetArgument (int, char *&value) |
Get back a char string argument out of parsed command line. More... | |
int | GetArgument (int, std::string &value) |
Get back a standard string argument out of parsed command line. More... | |
int | GetArgument (int, long int &value) |
Get back a long int argument out of parsed command line. More... | |
Special Member Functions | |
CommandLineParser (int argc, char *argv[], struct CommandLineArgumentDescription *clArgList, bool flgVerbose) | |
CommandLineParser Constructor. More... | |
~CommandLineParser () | |
CommandLineParser Destructor. More... | |
CommandLineParser (const CommandLineParser &source) | |
CommandLineParser copy constructor. More... | |
void | PrintUsage (void) |
Printing member function for CommandLineParser. More... | |
Parser for extracting program arguments from the command line.
This class parses the command line using an array 'clArgList' of structures of type 'CommandLineArgumentDescription' terminated in:
'{OPT_DONE, 0, 0, "Insert brief program description here"}'.
For an example of how to use the range of command line option types please see program 'NifTK/Prototype/jhh/niftkCommandLineParserExample'.
niftk::CommandLineParser::CommandLineParser | ( | int | argc, |
char * | argv[], | ||
struct CommandLineArgumentDescription * | clArgList, | ||
bool | flgVerbose | ||
) |
CommandLineParser Constructor.
niftk::CommandLineParser::~CommandLineParser | ( | ) |
CommandLineParser Destructor.
niftk::CommandLineParser::CommandLineParser | ( | const CommandLineParser & | source | ) |
CommandLineParser copy constructor.
Get back a particular argument out of parsed command line. This method is deprecated, use overloaded versions instead.
Get back a bool argument out of parsed command line.
Get back an unsigned int argument out of parsed command line.
Get back an int argument out of parsed command line.
Get back an int pointer argument out of parsed command line.
Get back an float argument out of parsed command line.
Get back an float pointer argument out of parsed command line.
Get back an double argument out of parsed command line.
Get back an double pointer argument out of parsed command line.
Get back a char string argument out of parsed command line.
int niftk::CommandLineParser::GetArgument | ( | int | optnum, |
std::string & | value | ||
) |
Get back a standard string argument out of parsed command line.
Get back a long int argument out of parsed command line.
Printing member function for CommandLineParser.