TFactoryParameter< F > Class Template Reference

A parameter that get's initialized by a factory to a shared or unique pointer. More...

#include <mia/core/parameter.hh>

Inheritance diagram for TFactoryParameter< F >:
[legend]
Collaboration diagram for TFactoryParameter< F >:
[legend]

Public Member Functions

 TFactoryParameter (typename F::ProductPtr &value, const std::string &init, bool required, const char *descr)
 
 TFactoryParameter (typename F::UniqueProduct &value, const std::string &init, bool required, const char *descr)
 
- 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 (CXMLElement &root) const
 
std::string get_value_as_string () const
 
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 ()
 

Additional Inherited Members

- Protected Member Functions inherited from CParameter
void add_xmlhelp_attribute (CXMLElement &node, const std::string &tag, const std::string &value) const
 
CXMLElementadd_xmlhelp_childnode (CXMLElement &parent, const std::string &tag) const
 
void add_xmlhelp_text (CXMLElement &node, const std::string &value) const
 
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 F>
class TFactoryParameter< F >

A parameter that get's initialized by a factory to a shared or unique pointer.

This parameter type is used for parameters that are created by a factory that uses a plug-in handler for instance creation.

Template Parameters
Fthe plugin handler type used to create the parameter value

Definition at line 401 of file parameter.hh.

Constructor & Destructor Documentation

◆ TFactoryParameter() [1/2]

template<typename F >
TFactoryParameter< F >::TFactoryParameter ( typename F::ProductPtr &  value,
const std::string &  init,
bool  required,
const char *  descr 
)

Constructor if the parameter tales a shared pointer The constructor should take an empty F::ProductPtr and add the default value as initializer string init in order to avoid calling the plug-in hanlder for creation before the true desired value of the parameter is known.

Parameters
valuereference to the shared pointer parameter handled by this parameter object
initan init string used as the default parameter to create the value
requiredset to true when the parameter is required
descra description of the parameter
Remarks
Don't call this constructor directly and use one of the make_param variants. It automatically takes care of the type instanciation and pointer variant handiong.

Definition at line 729 of file parameter.hh.

◆ TFactoryParameter() [2/2]

template<typename F >
TFactoryParameter< F >::TFactoryParameter ( typename F::UniqueProduct &  value,
const std::string &  init,
bool  required,
const char *  descr 
)

Constructor if the parameter tales a unique pointer The constructor should take an empty F::ProductPtr and add the default value as initializer string init in order to avoid calling the plug-in hanlder for creation before the true desired value of the parameter is known.

Parameters
valuereference to the to the unique pointer parameter handled by this parameter object
initan init string used as the default parameter to create the value
requiredset to true when the parameter is required
descra description of the parameter
Remarks
Don't call this constructor directly and use one of the make_param variants. It automatically takes care of the type instanciation and pointer variant handiong.

Definition at line 741 of file parameter.hh.

References CParameter::add_xmlhelp_attribute(), and CParameter::add_xmlhelp_childnode().


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