Main   Classes   Namespace members   Examples   Recipes   Rationale   Related pages

boost::program_options::abstract_variables_map Class Reference

Implements string->string mapping with convenient value casting facilities. More...

#include <variables_map.hpp>

Inherited by boost::program_options::variables_map.

Inheritance diagram for boost::program_options::abstract_variables_map:

Inheritance graph
[legend]
List of all members.

Public Member Functions

variable_value operator[] (const std::string &name) const
 Obtains the value of variable 'name', from *this and possibly from the chain of variable maps.

void next (abstract_variables_map *next)
 Sets next variable map, which will be used to find variables not found in *this.


Private Member Functions

virtual variable_value get (const std::string &name) const=0
 Returns value of variable 'name' stored in *this, or empty value otherwise.


Detailed Description

Implements string->string mapping with convenient value casting facilities.


Member Function Documentation

variable_value boost::program_options::abstract_variables_map::operator[] const std::string &    name const
 

Obtains the value of variable 'name', from *this and possibly from the chain of variable maps.

  • if there's no value in *this.
    • if there's next variable map, returns value from it
    • otherwise, returns empty value

  • if there's defaulted value
    • if there's next varaible map, which has non-defauled value, return that
    • otherwise, return value from *this

  • if there's non-defauled value, returns it.

Reimplemented in boost::program_options::variables_map.

void boost::program_options::abstract_variables_map::next abstract_variables_map *    next
 

Sets next variable map, which will be used to find variables not found in *this.

virtual variable_value boost::program_options::abstract_variables_map::get const std::string &    name const [private, pure virtual]
 

Returns value of variable 'name' stored in *this, or empty value otherwise.

Implemented in boost::program_options::variables_map.


The documentation for this class was generated from the following files:
Generated on 23 May 2003 with
doxygen