Iguana 0.0.0
Implementation Guardian of Analysis Algorithms
Loading...
Searching...
No Matches
iguana::GlobalParam< T > Class Template Reference

#include <GlobalParam.h>

Detailed Description

template<typename T>
class iguana::GlobalParam< T >

a globally accessible parameter

A global parameter has the following properties

  • a default value
  • may be changed only one time
  • may be read from anywhere
Available global parameters

Definition at line 20 of file GlobalParam.h.

Public Member Functions

 GlobalParam (T val)
 
GlobalParam< T > & operator= (T const &val)
 assign a new value to this parameter
 
T const operator() ()
 get the value of the parameter
 
- Public Member Functions inherited from iguana::Object
 Object (std::string_view name="", Logger::Level lev=Logger::DEFAULT_LEVEL)
 
std::unique_ptr< Logger > & Log ()
 
void SetName (std::string_view name)
 
std::string GetName () const
 
void SetLogLevel (std::string_view lev)
 
void SetLogLevel (Logger::Level const lev)
 
std::unique_ptr< Logger > & GetLog ()
 

Additional Inherited Members

- Protected Attributes inherited from iguana::Object
std::string m_name
 The name of this object.
 
std::unique_ptr< Loggerm_log
 Logger instance for this object
 
Inheritance diagram for iguana::GlobalParam< T >:
Inheritance graph

Constructor & Destructor Documentation

◆ GlobalParam()

template<typename T >
iguana::GlobalParam< T >::GlobalParam ( T val)
inline
Parameters
valthe initial value of this parameter

Definition at line 25 of file GlobalParam.h.

Member Function Documentation

◆ operator()()

template<typename T >
T const iguana::GlobalParam< T >::operator() ( )
inline

get the value of the parameter

Returns
the value of the parameter

Definition at line 40 of file GlobalParam.h.

◆ operator=()

template<typename T >
GlobalParam< T > & iguana::GlobalParam< T >::operator= ( T const & val)
inline

assign a new value to this parameter

Warning
this may only be used one time; a second attempt to set the parameter will fail
Parameters
valthe new value of this parameter
Returns
*this

Definition at line 31 of file GlobalParam.h.


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