Option Class Reference

Interface to a given option. See documentation for it in the ProgramOptions class. More...

#include <options.h>

Collaboration diagram for Option:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

Interface to a given option. See documentation for it in the ProgramOptions class.

Definition at line 416 of file options.h.


Constructor & Destructor Documentation

Option ( string const &  name  ) 

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.


Member Function Documentation

void append_value ( string const &  value  ) 

add a new value to this option

Definition at line 321 of file options.cxx.

Here is the caller graph for this function:

value_iterator begin (  )  const

first value in option's list

Definition at line 428 of file options.h.

Here is the caller graph for this function:

value_iterator end (  )  const

last value therein

Definition at line 431 of file options.h.

Here is the caller graph for this function:

string const& name (  )  const

get the option's name

Definition at line 443 of file options.h.

operator bool (  )  const

returns true if the option is set

Definition at line 434 of file options.h.

operator string (  )  const

convert values to a string (comma separated if needed)

Definition at line 440 of file options.h.

Here is the call graph for this function:

string value (  )  const

convert values to a string (comma separated if needed)

Definition at line 345 of file options.cxx.

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class ProgramOptions [friend]

Definition at line 447 of file options.h.


Member Data Documentation

string name_ [private]

ProgramOptions::members point directly at this object.

Definition at line 454 of file options.h.

bool set_ [private]

flag indicating that the option is actually set

Definition at line 457 of file options.h.

values associated with this option if any

Definition at line 452 of file options.h.


The documentation for this class was generated from the following files:
Generated on Wed Feb 29 22:56:12 2012 for CXXUtilities by  doxygen 1.6.3