|
| typed_value (T *store_to) |
| Ctor. More...
|
|
typed_value * | default_value (const T &v) |
| Specifies default value, which will be used if none is explicitly specified. More...
|
|
typed_value * | default_value (const T &v, const std::string &textual) |
| Specifies default value, which will be used if none is explicitly specified. More...
|
|
typed_value * | implicit_value (const T &v) |
| Specifies an implicit value, which will be used if the option is given, but without an adjacent value. More...
|
|
typed_value * | value_name (const std::string &name) |
| Specifies the name used to to the value in help message. More...
|
|
typed_value * | implicit_value (const T &v, const std::string &textual) |
| Specifies an implicit value, which will be used if the option is given, but without an adjacent value. More...
|
|
typed_value * | notifier (function1< void, const T & > f) |
| Specifies a function to be called when the final value is determined. More...
|
|
typed_value * | composing () |
| Specifies that the value is composing. More...
|
|
typed_value * | multitoken () |
| Specifies that the value can span multiple tokens. More...
|
|
typed_value * | zero_tokens () |
| Specifies that no tokens may be provided as the value of this option, which means that only presense of the option is significant. More...
|
|
typed_value * | required () |
| Specifies that the value must occur. More...
|
|
std::string | name () const |
|
bool | is_composing () const |
|
unsigned | min_tokens () const |
|
unsigned | max_tokens () const |
|
bool | is_required () const |
|
void | xparse (boost::any &value_store, const std::vector< std::basic_string< charT > > &new_tokens) const |
| Creates an instance of the 'validator' class and calls its operator() to perform the actual conversion. More...
|
|
virtual bool | apply_default (boost::any &value_store) const |
| If default value was specified via previous call to 'default_value', stores that value into 'value_store'. More...
|
|
void | notify (const boost::any &value_store) const |
| If an address of variable to store value was specified when creating *this, stores the value there. More...
|
|
const std::type_info & | value_type () const |
|
template<class T, class charT = char>
class boost::program_options::typed_value< T, charT >
Class which handles value of a specific type.
template<class T , class charT = char>
Specifies default value, which will be used if none is explicitly specified.
Unlike the above overload, the type 'T' need not provide operator<< for ostream, but textual representation of default value must be provided by the user.
References boost::fusion::any().
template<class T , class charT = char>
Specifies an implicit value, which will be used if the option is given, but without an adjacent value.
Using this implies that an explicit value is optional, but if given, must be strictly adjacent to the option, i.e.: '-ovalue' or '–option=value'. Giving '-o' or '–option' will cause the implicit value to be applied.
References boost::fusion::any(), and boost::lexical_cast().
template<class T , class charT = char>
Specifies an implicit value, which will be used if the option is given, but without an adjacent value.
Using this implies that an explicit value is optional, but if given, must be strictly adjacent to the option, i.e.: '-ovalue' or '–option=value'. Giving '-o' or '–option' will cause the implicit value to be applied. Unlike the above overload, the type 'T' need not provide operator<< for ostream, but textual representation of default value must be provided by the user.
References boost::fusion::any().
template<class T , class charT = char>
Specifies that no tokens may be provided as the value of this option, which means that only presense of the option is significant.
For such option to be useful, either the 'validate' function should be specialized, or the 'implicit_value' method should be also used. In most cases, you can use the 'bool_switch' function instead of using this method.