Class holding value of option. More...
#include <variables_map.hpp>
Public Member Functions | |
variable_value () | |
variable_value (const boost::any &xv, bool xdefaulted) | |
template<class T > | |
const T & | as () const |
If stored value if of type T, returns that value. More... | |
template<class T > | |
T & | as () |
bool | empty () const |
Returns true if no value is stored. More... | |
bool | defaulted () const |
Returns true if the value was not explicitly given, but has default value. More... | |
const boost::any & | value () const |
Returns the contained value. More... | |
boost::any & | value () |
Returns the contained value. More... | |
Friends | |
class BOOST_PROGRAM_OPTIONS_DECL | variables_map |
BOOST_PROGRAM_OPTIONS_DECL void | store (const basic_parsed_options< char > &options, variables_map &m, bool) |
Stores in 'm' all options that are defined in 'options'. More... | |
Class holding value of option.
Contains details about how the value is set and allows to conveniently obtain the value.
|
inline |
|
inline |
|
inline |
If stored value if of type T, returns that value.
Otherwise, throws boost::bad_any_cast exception.
References boost::any_cast(), and T.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References boost::any_cast(), and T.
|
inline |
Returns true if the value was not explicitly given, but has default value.
|
inline |
Returns true if no value is stored.
References boost::any::empty().
|
inline |
Returns the contained value.
|
inline |
Returns the contained value.
|
friend |
Stores in 'm' all options that are defined in 'options'.
If 'm' already has a non-defaulted value of an option, that value is not changed, even if 'options' specify some value.
|
friend |