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::untyped_value Class Reference

Class which specifies a simple handling of a value: the value will have string type and only one token is allowed. More...

#include <value_semantic.hpp>

Inheritance diagram for boost::program_options::untyped_value:
Collaboration diagram for boost::program_options::untyped_value:

Public Member Functions

 untyped_value (bool zero_tokens=false)
 
std::string name () const
 Returns the name of the option. More...
 
unsigned min_tokens () const
 The minimum number of tokens for this option that should be present on the command line. More...
 
unsigned max_tokens () const
 The maximum number of tokens for this option that should be present on the command line. More...
 
bool is_composing () const
 Returns true if values from different sources should be composed. More...
 
bool is_required () const
 Returns true if value must be given. More...
 
void xparse (boost::any &value_store, const std::vector< std::string > &new_tokens) const
 If 'value_store' is already initialized, or new_tokens has more than one elements, throws. More...
 
bool apply_default (boost::any &) const
 Does nothing. More...
 
void notify (const boost::any &) const
 Does nothing. More...
 

Detailed Description

Class which specifies a simple handling of a value: the value will have string type and only one token is allowed.

Constructor & Destructor Documentation

boost::program_options::untyped_value::untyped_value ( bool  zero_tokens = false)
inline

Member Function Documentation

bool boost::program_options::untyped_value::apply_default ( boost::any ) const
inlinevirtual

Does nothing.

Implements boost::program_options::value_semantic.

bool boost::program_options::untyped_value::is_composing ( ) const
inlinevirtual

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.

Implements boost::program_options::value_semantic.

bool boost::program_options::untyped_value::is_required ( ) const
inlinevirtual

Returns true if value must be given.

Non-optional value

Implements boost::program_options::value_semantic.

unsigned boost::program_options::untyped_value::max_tokens ( ) const
virtual

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

Implements boost::program_options::value_semantic.

unsigned boost::program_options::untyped_value::min_tokens ( ) const
virtual

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

Implements boost::program_options::value_semantic.

std::string boost::program_options::untyped_value::name ( ) const
virtual

Returns the name of the option.

The name is only meaningful for automatic help message.

Implements boost::program_options::value_semantic.

void boost::program_options::untyped_value::notify ( const boost::any ) const
inlinevirtual

Does nothing.

Implements boost::program_options::value_semantic.

void boost::program_options::untyped_value::xparse ( boost::any value_store,
const std::vector< std::string > &  new_tokens 
) const
virtual

If 'value_store' is already initialized, or new_tokens has more than one elements, throws.

Otherwise, assigns the first string from 'new_tokens' to 'value_store', without any modifications.

Implements boost::program_options::value_semantic_codecvt_helper< char >.


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