Home | Libraries | People | FAQ | More |
boost::program_options::variable_value —
class variable_value { public: // construct/copy/destruct variable_value(); variable_value(const boost::any &, bool); // public member functions template<typename T> const T & as() const; template<typename T> T & as() ; bool empty() const; bool defaulted() const; const boost::any & value() const; boost::any & value() ; };
Class holding value of option. Contains details about how the value is set and allows to conveniently obtain the value.
variable_value
public member functionstemplate<typename T> const T & as() const;
If stored value if of type T, returns that value. Otherwise, throws boost::bad_any_cast exception.
template<typename T> T & as() ;
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool empty() const;
bool defaulted() const;
Returns true if the value was not explicitly given, but has default value.
const boost::any & value() const;
Returns the contained value.
boost::any & value() ;
Returns the contained value.
Copyright © 2002-2004 Vladimir Prus |