Main   Classes   Namespace members   Examples   Recipes   Rationale   Related pages

boost::program_options::variable_value Class Reference

Class holding value of option. More...

#include <variables_map.hpp>

List of all members.

Public Member Functions

template<class T> T as () const
 If stored value if of type T, returns that value.

bool empty () const
 Returns true if no value is stored.

bool defaulted () const
 Returns true if the value was not explcitly given, but has default value.

const boost::any & value () const
 Returns the contained value.


Detailed Description

Class holding value of option.

Contains details about how the value is set and allows to conveniently obtain the value.


Member Function Documentation

template<class T>
T boost::program_options::variable_value::as   const
 

If stored value if of type T, returns that value.

Otherwise, throws boost::bad_any_cast exception.

bool boost::program_options::variable_value::empty   const
 

Returns true if no value is stored.

bool boost::program_options::variable_value::defaulted   const
 

Returns true if the value was not explcitly given, but has default value.

const boost::any & boost::program_options::variable_value::value   const
 

Returns the contained value.


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