Tapkee
ParameterKeyword< T > Struct Template Reference

#include <keywords.hpp>

Public Types

typedef std::string Name
 
typedef T Type
 

Public Member Functions

 ParameterKeyword (const Name &n, const T &dv)
 
 ParameterKeyword (const ParameterKeyword &pk)
 
ParameterKeyword operator= (const ParameterKeyword &pk)
 
Parameter operator= (const T &value) const
 
Parameter operator= (const DefaultValue &) const
 
 operator Name () const
 

Public Attributes

Name name
 
default_value
 

Detailed Description

template<typename T>
struct stichwort::ParameterKeyword< T >

ParameterKeyword instance is used to represent a keyword that is assigned to some value. Such an assignment results to instance of Parameter class which can be later checked and casted back to the value it represents.

Usage is

ParameterKeyword<int> keyword;
Parameter p = (keyword = 5);
int p_value = p;

Definition at line 62 of file stichwort/keywords.hpp.

Member Typedef Documentation

◆ Name

typedef std::string Name

Definition at line 64 of file stichwort/keywords.hpp.

◆ Type

typedef T Type

Definition at line 65 of file stichwort/keywords.hpp.

Constructor & Destructor Documentation

◆ ParameterKeyword() [1/2]

ParameterKeyword ( const Name n,
const T &  dv 
)

Definition at line 67 of file stichwort/keywords.hpp.

◆ ParameterKeyword() [2/2]

ParameterKeyword ( const ParameterKeyword< T > &  pk)

Member Function Documentation

◆ operator Name()

operator Name ( ) const

Definition at line 79 of file stichwort/keywords.hpp.

◆ operator=() [1/3]

ParameterKeyword operator= ( const ParameterKeyword< T > &  pk)

◆ operator=() [2/3]

Parameter operator= ( const T &  value) const

Definition at line 71 of file stichwort/keywords.hpp.

◆ operator=() [3/3]

Parameter operator= ( const DefaultValue ) const

Definition at line 75 of file stichwort/keywords.hpp.

Member Data Documentation

◆ default_value

T default_value

Definition at line 85 of file stichwort/keywords.hpp.

◆ name

Name name

Definition at line 84 of file stichwort/keywords.hpp.


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