The Sparta Modeling Framework
Loading...
Searching...
No Matches
sparta::app::ParameterTemplate Class Reference

ParameterTemplate providing factory implementation for each data type. More...

#include <MetaTreeNode.hpp>

Public Member Functions

template<typename T >
 ParameterTemplate (const std::string &name, const T &def_val, const std::string &docstring)
 Create the template. Specify the type of def_val explicitly when invoking this function.
 
 ParameterTemplate (const std::string &name, const char *def_val, const std::string &docstring)
 
 ParameterTemplate (const ParameterTemplate &)=default
 
 ParameterTemplate (ParameterTemplate &&)=default
 
ParameterTemplateoperator= (const ParameterTemplate &)=default
 
ParameterBasecreate () const
 Crete an instance of the parameter base on this template using "new".
 

Detailed Description

ParameterTemplate providing factory implementation for each data type.

Example

* new ParameterTemplate("paramfoo", (const std::string&)"default", "test parameter");
* 

Definition at line 30 of file MetaTreeNode.hpp.

Constructor & Destructor Documentation

◆ ParameterTemplate() [1/2]

template<typename T >
sparta::app::ParameterTemplate::ParameterTemplate ( const std::string &  name,
const T &  def_val,
const std::string &  docstring 
)
inline

Create the template. Specify the type of def_val explicitly when invoking this function.

Definition at line 80 of file MetaTreeNode.hpp.

◆ ParameterTemplate() [2/2]

sparta::app::ParameterTemplate::ParameterTemplate ( const std::string &  name,
const char *  def_val,
const std::string &  docstring 
)
inline

Definition at line 84 of file MetaTreeNode.hpp.

Member Function Documentation

◆ create()

ParameterBase * sparta::app::ParameterTemplate::create ( ) const
inline

Crete an instance of the parameter base on this template using "new".

Note
Caller must delete it using "delete"

Definition at line 97 of file MetaTreeNode.hpp.


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