Classes | |
struct | t_arg |
Public Member Functions | |
void | addFlag (std::string name, std::string description="") |
void | addOption (std::string name, std::string description="", std::string defaultvalue="", bool required=false) |
CmdLineParser (int argc, char **argv) | |
Constructor. | |
template<typename T > | |
T | get (std::string name) |
as this method uses stringstreams >> operator, it is only defined for primitive datatypes | |
std::string | getValue (std::string name) |
bool | getValueBool (std::string name) |
double | getValueDouble (std::string name) |
int | getValueInt (std::string name) |
bool | isSet (std::string name) |
void | parse () |
void | printUsage (std::string additionalInformation="") |
void | setAppDescription (std::string appDescrString) |
Set string describing the application in front of the usage information. | |
~CmdLineParser () | |
Destructor. |
opentl::core::parser::CmdLineParser::CmdLineParser | ( | int | argc, | |
char ** | argv | |||
) |
Constructor.
opentl::core::parser::CmdLineParser::~CmdLineParser | ( | ) |
Destructor.
void opentl::core::parser::CmdLineParser::addFlag | ( | std::string | name, | |
std::string | description = "" | |||
) |
void opentl::core::parser::CmdLineParser::addOption | ( | std::string | name, | |
std::string | description = "" , |
|||
std::string | defaultvalue = "" , |
|||
bool | required = false | |||
) |
T opentl::core::parser::CmdLineParser::get | ( | std::string | name | ) | [inline] |
as this method uses stringstreams >> operator, it is only defined for primitive datatypes
std::string opentl::core::parser::CmdLineParser::getValue | ( | std::string | name | ) |
bool opentl::core::parser::CmdLineParser::getValueBool | ( | std::string | name | ) |
double opentl::core::parser::CmdLineParser::getValueDouble | ( | std::string | name | ) |
int opentl::core::parser::CmdLineParser::getValueInt | ( | std::string | name | ) |
bool opentl::core::parser::CmdLineParser::isSet | ( | std::string | name | ) |
void opentl::core::parser::CmdLineParser::parse | ( | ) |
void opentl::core::parser::CmdLineParser::printUsage | ( | std::string | additionalInformation = "" |
) |
void opentl::core::parser::CmdLineParser::setAppDescription | ( | std::string | appDescrString | ) |
Set string describing the application in front of the usage information.