TFactoryParameter< F > Class Template Reference
Command line and parameter parsing

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
CXMLElement & | add_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

## 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

  F | the plugin handler type used to create the parameter value

Definition at line 405 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

  value | reference to the shared pointer parameter handled by this parameter object
  init | an init string used as the default parameter to create the value
  required | set to true when the parameter is required
  descr | a 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 738 of file parameter.hh.

References CParameter::CParameter(), CParameter::descr(), and CParameter::value().

## 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

  value | reference to the to the unique pointer parameter handled by this parameter object
  init | an init string used as the default parameter to create the value
  required | set to true when the parameter is required
  descr | a 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 750 of file parameter.hh.

References CParameter::CParameter(), CParameter::descr(), and CParameter::value().

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

- parameter.hh