Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::program_options::value_semantic Class Referenceabstract

Class which specifies how the option's value is to be parsed and converted into C++ types. More...

#include <value_semantic.hpp>

Inheritance diagram for boost::program_options::value_semantic:

Public Member Functions

virtual std::string name () const =0
 Returns the name of the option. More...
 
virtual unsigned min_tokens () const =0
 The minimum number of tokens for this option that should be present on the command line. More...
 
virtual unsigned max_tokens () const =0
 The maximum number of tokens for this option that should be present on the command line. More...
 
virtual bool is_composing () const =0
 Returns true if values from different sources should be composed. More...
 
virtual bool is_required () const =0
 Returns true if value must be given. More...
 
virtual void parse (boost::any &value_store, const std::vector< std::string > &new_tokens, bool utf8) const =0
 Parses a group of tokens that specify a value of option. More...
 
virtual bool apply_default (boost::any &value_store) const =0
 Called to assign default value to 'value_store'. More...
 
virtual void notify (const boost::any &value_store) const =0
 Called when final value of an option is determined. More...
 
virtual ~value_semantic ()
 

Detailed Description

Class which specifies how the option's value is to be parsed and converted into C++ types.

Constructor & Destructor Documentation

virtual boost::program_options::value_semantic::~value_semantic ( )
inlinevirtual

Member Function Documentation

virtual bool boost::program_options::value_semantic::apply_default ( boost::any value_store) const
pure virtual

Called to assign default value to 'value_store'.

Returns true if default value is assigned, and false if no default value exists.

Implemented in boost::program_options::untyped_value.

virtual bool boost::program_options::value_semantic::is_composing ( ) const
pure virtual

Returns true if values from different sources should be composed.

Otherwise, value from the first source is used and values from other sources are discarded.

Implemented in boost::program_options::untyped_value.

virtual bool boost::program_options::value_semantic::is_required ( ) const
pure virtual

Returns true if value must be given.

Non-optional value

Implemented in boost::program_options::untyped_value.

virtual unsigned boost::program_options::value_semantic::max_tokens ( ) const
pure virtual

The maximum number of tokens for this option that should be present on the command line.

Implemented in boost::program_options::untyped_value.

virtual unsigned boost::program_options::value_semantic::min_tokens ( ) const
pure virtual

The minimum number of tokens for this option that should be present on the command line.

Implemented in boost::program_options::untyped_value.

virtual std::string boost::program_options::value_semantic::name ( ) const
pure virtual

Returns the name of the option.

The name is only meaningful for automatic help message.

Implemented in boost::program_options::untyped_value.

virtual void boost::program_options::value_semantic::notify ( const boost::any value_store) const
pure virtual

Called when final value of an option is determined.

Implemented in boost::program_options::untyped_value.

virtual void boost::program_options::value_semantic::parse ( boost::any value_store,
const std::vector< std::string > &  new_tokens,
bool  utf8 
) const
pure virtual

Parses a group of tokens that specify a value of option.

Stores the result in 'value_store', using whatever representation is desired. May be be called several times if value of the same option is specified more than once.


The documentation for this class was generated from the following file: