Public Member Functions | Protected Member Functions
CSetParameter< T > Class Template Reference

A parameter that can only assume values out of a limited set. More...

#include <mia/core/parameter.hh>

Inheritance diagram for CSetParameter< T >:
CParameter

Public Member Functions

 CSetParameter (T &value, const std::set< T > &valid_set, const char *descr, bool required=false)
 
- Public Member Functions inherited from CParameter
void add_dependend_handler (HandlerHelpMap &handler_map) const
 
 CParameter (const char type[], bool required, const char *descr)
 
void descr (std::ostream &os) const
 
std::string get_default_value () const
 
const char * get_descr () const
 
void get_help_xml (xmlpp::Element &root) const
 
std::string get_value_as_string () const
 
virtual void post_set ()
 
bool required_set () const
 
void reset ()
 
bool set (const std::string &str_value)
 
const char * type () const
 
void value (std::ostream &os) const
 
virtual ~CParameter ()
 

Protected Member Functions

virtual void do_descr (std::ostream &os) const
 
- Protected Member Functions inherited from CParameter
const std::string errmsg (const std::string &err_value) const
 create an error message by using the given value that raises the error More...
 

Detailed Description

template<typename T>
class CSetParameter< T >

A parameter that can only assume values out of a limited set.

This parameter type is used for parameters that that can only assume values out of a limited set of values. Other than the CDictParameter this parameter may handle any type T that can be streamed.

Template Parameters
Tthe value type of the parameter

Definition at line 333 of file parameter.hh.

Constructor & Destructor Documentation

template<typename T >
CSetParameter< T >::CSetParameter ( T &  value,
const std::set< T > &  valid_set,
const char *  descr,
bool  required = false 
)

Constructor

Parameters
valuereference to the parameter handled by this parameter object
valid_setdictionary for parameter translation
descra description of the parameter
requiredboolean to indicate whether the user must set the parameter

Definition at line 658 of file parameter.hh.

Member Function Documentation

template<typename T >
void CSetParameter< T >::do_descr ( std::ostream &  os) const
protectedvirtual

the implementation of the description-function

Implements CParameter.

Definition at line 682 of file parameter.hh.


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