Interface to a given option. See documentation for it in the ProgramOptions class. More...
#include <options.h>
Public Member Functions | |
void | append_value (string const &value) |
add a new value to this option | |
value_iterator | begin () const |
first value in option's list | |
value_iterator | end () const |
last value therein | |
string const & | name () const |
get the option's name | |
operator bool () const | |
returns true if the option is set | |
operator string () const | |
convert values to a string (comma separated if needed) | |
Option (string const &name) | |
normal constructor | |
string | value () const |
convert values to a string (comma separated if needed) | |
Private Member Functions | |
Option () | |
default constructor creates an option that is empty of values and claims not to be set. | |
Private Attributes | |
string | name_ |
ProgramOptions::members point directly at this object. | |
bool | set_ |
flag indicating that the option is actually set | |
option_values | values_ |
values associated with this option if any | |
Friends | |
class | ProgramOptions |
Interface to a given option. See documentation for it in the ProgramOptions class.
Definition at line 416 of file options.h.
normal constructor
Definition at line 329 of file options.cxx.
Option | ( | ) | [private] |
default constructor creates an option that is empty of values and claims not to be set.
Definition at line 337 of file options.cxx.
void append_value | ( | string const & | value | ) |
add a new value to this option
Definition at line 321 of file options.cxx.
value_iterator begin | ( | ) | const |
value_iterator end | ( | ) | const |
operator string | ( | ) | const |
string value | ( | ) | const |
convert values to a string (comma separated if needed)
Definition at line 345 of file options.cxx.
friend class ProgramOptions [friend] |
bool set_ [private] |
option_values values_ [private] |