code::W2Program::Option Class Reference

List of all members.

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"

Constructor & Destructor Documentation

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"


Member Function Documentation

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.

Returns:
"true" or "false" for boolean options and the value of the string for non-boolean options.

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.


Member Data Documentation

const std::string code::W2Program::Option::falseString [static]

value is "false"

const std::string code::W2Program::Option::trueString [static]

value is "true"


Generated on Fri May 4 13:40:13 2012 for WDSS-IIw2 by  doxygen 1.4.7