Public Member Functions | |
Option () | |
for STL only. | |
Option (char optionLetter, bool value) | |
initialize a boolean option with this value. | |
Option (char optionLetter, const std::string &value) | |
initialize an option with this value. | |
bool | isBooleanOption () const |
is this a true/false option? | |
const std::string & | getValue () const |
get the value of this option. | |
const std::string & | getDescription () const |
get a longer description of this option. | |
char | getLetter () const |
get the letter (name) of this option. | |
void | setValue (bool value) |
change the value of this option. | |
void | setValue (const std::string &value) |
change the value of this option. | |
void | setDescription (const std::string &descr) |
set a longer description of this option. | |
std::string | getString () const |
Gets a string representation of this option e.g: -a or -i value. | |
Static Public Attributes | |
static const std::string | trueString |
value is "true" | |
static const std::string | falseString |
value is "false" |
code::W2Program::Option::Option | ( | ) | [inline] |
for STL only.
code::W2Program::Option::Option | ( | char | optionLetter, | |
bool | value | |||
) |
initialize a boolean option with this value.
code::W2Program::Option::Option | ( | char | optionLetter, | |
const std::string & | value | |||
) |
initialize an option with this value.
For boolean options, this should be "true" or "false"
const std::string& code::W2Program::Option::getDescription | ( | ) | const [inline] |
get a longer description of this option.
char code::W2Program::Option::getLetter | ( | ) | const [inline] |
get the letter (name) of this option.
std::string code::W2Program::Option::getString | ( | ) | const |
Gets a string representation of this option e.g: -a or -i value.
const std::string& code::W2Program::Option::getValue | ( | ) | const [inline] |
get the value of this option.
bool code::W2Program::Option::isBooleanOption | ( | ) | const [inline] |
is this a true/false option?
void code::W2Program::Option::setDescription | ( | const std::string & | descr | ) | [inline] |
set a longer description of this option.
void code::W2Program::Option::setValue | ( | const std::string & | value | ) |
change the value of this option.
if this option is boolean, the string should be "true" or "false"
void code::W2Program::Option::setValue | ( | bool | value | ) |
change the value of this option.
If the option is not boolean, this command is ignored.
const std::string code::W2Program::Option::falseString [static] |
value is "false"
const std::string code::W2Program::Option::trueString [static] |
value is "true"