The Sparta Modeling Framework
Loading...
Searching...
No Matches
sparta::app::named_value_type< ArgT > Class Template Reference

Helper class for populating boost program options. More...

#include <MultiDetailOptions.hpp>

Inheritance diagram for sparta::app::named_value_type< ArgT >:
Collaboration diagram for sparta::app::named_value_type< ArgT >:

Public Types

typedef po::typed_value< ArgT > base_t
 Type of base class.
 

Public Member Functions

 named_value_type (std::string const &name, ArgT *val)
 Constructor.
 
 named_value_type (std::string const &name, ArgT *val, unsigned min, unsigned max)
 Constructor with min and max extents.
 
virtual std::string name () const override
 boost semantic for getting name of this option
 
named_value_typemin (unsigned min)
 
named_value_typemax (unsigned max)
 
named_value_typemultitoken ()
 
virtual unsigned min_tokens () const override
 boost semantic for specifying min tokens
 
virtual unsigned max_tokens () const override
 boost semantic for specifying max tokens
 
virtual void xparse (boost::any &value_store, const std::vector< std::basic_string< char > > &new_tokens) const override
 Override parser.
 
void xparse_base_ (boost::any &value_store, const std::vector< std::basic_string< char > > &new_tokens) const
 Call xparse on base class. This is available to named_value_parser for invoking the default parser when needed.
 

Detailed Description

template<typename ArgT>
class sparta::app::named_value_type< ArgT >

Helper class for populating boost program options.

Definition at line 25 of file MultiDetailOptions.hpp.

Member Typedef Documentation

◆ base_t

template<typename ArgT >
typedef po::typed_value<ArgT> sparta::app::named_value_type< ArgT >::base_t

Type of base class.

Definition at line 36 of file MultiDetailOptions.hpp.

Constructor & Destructor Documentation

◆ named_value_type() [1/2]

template<typename ArgT >
sparta::app::named_value_type< ArgT >::named_value_type ( std::string const &  name,
ArgT *  val 
)
inline

Constructor.

Definition at line 41 of file MultiDetailOptions.hpp.

◆ named_value_type() [2/2]

template<typename ArgT >
sparta::app::named_value_type< ArgT >::named_value_type ( std::string const &  name,
ArgT *  val,
unsigned  min,
unsigned  max 
)
inline

Constructor with min and max extents.

Definition at line 51 of file MultiDetailOptions.hpp.

◆ ~named_value_type()

template<typename ArgT >
virtual sparta::app::named_value_type< ArgT >::~named_value_type ( )
inlinevirtual

Definition at line 58 of file MultiDetailOptions.hpp.

Member Function Documentation

◆ max()

template<typename ArgT >
named_value_type * sparta::app::named_value_type< ArgT >::max ( unsigned  max)
inline

Definition at line 71 of file MultiDetailOptions.hpp.

◆ max_tokens()

template<typename ArgT >
virtual unsigned sparta::app::named_value_type< ArgT >::max_tokens ( ) const
inlineoverridevirtual

boost semantic for specifying max tokens

Definition at line 91 of file MultiDetailOptions.hpp.

◆ min()

template<typename ArgT >
named_value_type * sparta::app::named_value_type< ArgT >::min ( unsigned  min)
inline

Definition at line 65 of file MultiDetailOptions.hpp.

◆ min_tokens()

template<typename ArgT >
virtual unsigned sparta::app::named_value_type< ArgT >::min_tokens ( ) const
inlineoverridevirtual

boost semantic for specifying min tokens

Definition at line 86 of file MultiDetailOptions.hpp.

◆ multitoken()

template<typename ArgT >
named_value_type * sparta::app::named_value_type< ArgT >::multitoken ( )
inline

Definition at line 77 of file MultiDetailOptions.hpp.

◆ name()

template<typename ArgT >
virtual std::string sparta::app::named_value_type< ArgT >::name ( ) const
inlineoverridevirtual

boost semantic for getting name of this option

Definition at line 63 of file MultiDetailOptions.hpp.

◆ xparse()

template<class ArgT >
void sparta::app::named_value_type< ArgT >::xparse ( boost::any &  value_store,
const std::vector< std::basic_string< char > > &  new_tokens 
) const
overridevirtual

Override parser.

Note
Defined inline later because of dependency on named_value_parser

Definition at line 131 of file MultiDetailOptions.hpp.

Here is the call graph for this function:

◆ xparse_base_()

template<typename ArgT >
void sparta::app::named_value_type< ArgT >::xparse_base_ ( boost::any &  value_store,
const std::vector< std::basic_string< char > > &  new_tokens 
) const
inline

Call xparse on base class. This is available to named_value_parser for invoking the default parser when needed.

Definition at line 104 of file MultiDetailOptions.hpp.


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