Represents one program option. More...
#include <program_options.h>
Public Member Functions | |
char | alias () const |
const char * | argName () const |
bool | assignDefault () const |
DescriptionLevel | descLevel () const |
const char * | description () const |
std::size_t | maxColumn () const |
const std::string & | name () const |
Option (const std::string &longName, char shortName, const char *description, Value *value) | |
Value * | value () const |
~Option () | |
Private Attributes | |
const char * | description_ |
std::string | name_ |
Value * | value_ |
Represents one program option.
An Option consists of a description (long name, short name, description), a (typed) value, and an optional default value.
Definition at line 45 of file program_options.h.
ProgramOptions::Option::Option | ( | const std::string & | longName, |
char | shortName, | ||
const char * | description, | ||
Value * | value | ||
) |
longName | name (and unique key) of the option |
shortName | possible alias name |
description | description of the option, used for printing help |
value | value object to be associated with this option |
Definition at line 186 of file program_options.cpp.
Definition at line 195 of file program_options.cpp.
char ProgramOptions::Option::alias | ( | ) | const [inline] |
Definition at line 61 of file program_options.h.
const char* ProgramOptions::Option::argName | ( | ) | const [inline] |
Definition at line 64 of file program_options.h.
bool ProgramOptions::Option::assignDefault | ( | ) | const |
Definition at line 219 of file program_options.cpp.
DescriptionLevel ProgramOptions::Option::descLevel | ( | ) | const [inline] |
Definition at line 67 of file program_options.h.
const char* ProgramOptions::Option::description | ( | ) | const [inline] |
Definition at line 63 of file program_options.h.
std::size_t ProgramOptions::Option::maxColumn | ( | ) | const |
Definition at line 198 of file program_options.cpp.
const std::string& ProgramOptions::Option::name | ( | ) | const [inline] |
Definition at line 60 of file program_options.h.
Value* ProgramOptions::Option::value | ( | ) | const [inline] |
Definition at line 62 of file program_options.h.
const char* ProgramOptions::Option::description_ [private] |
Definition at line 70 of file program_options.h.
std::string ProgramOptions::Option::name_ [private] |
Definition at line 69 of file program_options.h.
Value* ProgramOptions::Option::value_ [private] |
Definition at line 71 of file program_options.h.