#include <ComputeArguments.h>
Inheritance diagram for ComputeArguments:


Public Types | |
| typedef std::vector< std::string > | StringContainer |
Public Member Functions | |
| ComputeArguments () | |
| virtual | ~ComputeArguments () |
| float | getTreshold () |
| float | getDivide () |
| int | getSteps () |
| int | getSaves () |
| long | getCache () |
| char * | getFileIn () |
| char * | getFileOut () |
| bool | getNormalize () |
| bool | parseArguments (int argc, char **argv) |
| char * | getCstringValue (std::string name) |
| void | setDescription (const char *description) |
| void | setVersion (const char *version) |
| template<class T> | |
| T | getValue (std::string name) |
| void | clean () |
Static Public Attributes | |
| static const char * | NAMES [] |
Protected Member Functions | |
| virtual void | showHelp (bool quit=true, const char *custMessage=0) |
| void | showError (StringContainer parts) |
| void | showError (const char *message) |
| void | showVersion (bool quit=false) |
| void | setDelimiter (const char *new_var) |
| char * | getDelimiter () |
| void | addArgument (const char *name, const char *description, bool required, const char *def) |
Definition at line 28 of file ComputeArguments.h.
typedef std::vector<std::string> ArgumentParser::StringContainer [inherited] |
Definition at line 25 of file ArgumentParser.h.
| ComputeArguments::ComputeArguments | ( | ) |
Empty Constructor
| virtual ComputeArguments::~ComputeArguments | ( | ) | [virtual] |
Empty Destructor
| float ComputeArguments::getTreshold | ( | ) |
| float ComputeArguments::getDivide | ( | ) |
| int ComputeArguments::getSteps | ( | ) |
| int ComputeArguments::getSaves | ( | ) |
| long ComputeArguments::getCache | ( | ) |
| char* ComputeArguments::getFileIn | ( | ) |
| char* ComputeArguments::getFileOut | ( | ) |
| bool ComputeArguments::getNormalize | ( | ) |
| bool ArgumentParser::parseArguments | ( | int | argc, | |
| char ** | argv | |||
| ) | [inherited] |
Parse command line arguments
| argc | Argument count | |
| argv | Array of arguments. |
| char* ArgumentParser::getCstringValue | ( | std::string | name | ) | [inherited] |
Return char*
| name | Argument name |
| void ArgumentParser::setDescription | ( | const char * | description | ) | [inherited] |
Set program description
| description | Program description |
| void ArgumentParser::setVersion | ( | const char * | version | ) | [inherited] |
Set program version
| version | String describing program version |
| T ArgumentParser::getValue | ( | std::string | name | ) | [inline, inherited] |
Template for prasing cstrings.
| name | Argument name. |
Definition at line 69 of file ArgumentParser.h.
References ArgumentParser::showHelp().
| void ArgumentParser::clean | ( | ) | [inherited] |
Free malloced memory.
| virtual void ArgumentParser::showHelp | ( | bool | quit = true, |
|
| const char * | custMessage = 0 | |||
| ) | [protected, virtual, inherited] |
Show help
| quit | if is true then function call exit(0) on end | |
| custMessage | Custom message to show on the top of help |
Referenced by ArgumentParser::getValue().
| void ArgumentParser::showError | ( | StringContainer | parts | ) | [protected, inherited] |
Show help message and quit
| parts | vector containing parts of error message |
| void ArgumentParser::showError | ( | const char * | message | ) | [protected, inherited] |
Show help message and quit
| message | error message |
| void ArgumentParser::showVersion | ( | bool | quit = false |
) | [protected, inherited] |
Show version
| quit | if is true then function call exit(1) on end |
| void ArgumentParser::setDelimiter | ( | const char * | new_var | ) | [protected, inherited] |
Set the value of delimiter_ Arguments delimiter.
| new_var | the new value of m_delimiter_ |
| char* ArgumentParser::getDelimiter | ( | ) | [protected, inherited] |
Get the value of delimiter_ Arguments delimiter.
| void ArgumentParser::addArgument | ( | const char * | name, | |
| const char * | description, | |||
| bool | required, | |||
| const char * | def | |||
| ) | [protected, inherited] |
Add argument
| name | Argument name | |
| description | Argument description | |
| required | True if argument is required | |
| def | Default value like cstring ( char* ) |
const char* ComputeArguments::NAMES[] [static] |
Definition at line 49 of file ComputeArguments.h.
1.5.2