CEPS  24.01
Cardiac ElectroPhysiology Simulator
ceps::ConstantFunction< _Res(_Args...)> Struct Template Reference

Detailed Description

template<class _Res, class... _Args>
struct ceps::ConstantFunction< _Res(_Args...)>

Specialization of ceps::Function that returns constant values.

Definition at line 249 of file CepsFunction.hpp.

#include <CepsFunction.hpp>

Inheritance diagram for ceps::ConstantFunction< _Res(_Args...)>:
[legend]

Public Member Functions

 ConstantFunction (const _Res &var)
 Constructor with value. More...
 
 ConstantFunction (const ConstantFunction &that)
 Copy constructor. More...
 
 ~ConstantFunction () override
 Destructor. More...
 
_Res eval (_Args...) override
 Call operator. More...
 
- Public Member Functions inherited from ceps::Function< _Res(_Args...)>
 Function ()=default
 Construct a new Function object. More...
 
 Function (const Function &)=default
 Copy constructor. More...
 
 Function (Function &&) noexcept=default
 Copy constructor. More...
 
Functionoperator= (const Function &)=default
 Assignment operator. More...
 
Functionoperator= (Function &&) noexcept=default
 Assignment operator. More...
 
virtual ~Function ()=default
 Destroy the Function object. More...
 
virtual _Res operator() (_Args... args) final
 Base operator for call. Cannot be overloaded, use eval instead. We do this as the It is used to select the correct evaluation of the derived classes, as C++ seems to not do the right thing. More...
 

Data Fields

const _Res & m_var
 Returned value. More...
 

Additional Inherited Members

- Public Types inherited from ceps::Function< _Res(_Args...)>
using ReturnType = _Res
 Return type definition. More...
 
using SignatureType = _Res(_Args...)
 signature type More...
 

Constructor & Destructor Documentation

◆ ConstantFunction() [1/2]

template<class _Res , class... _Args>
ceps::ConstantFunction< _Res(_Args...)>::ConstantFunction ( const _Res &  var)
inlineexplicit

Constructor with value.

Definition at line 255 of file CepsFunction.hpp.

◆ ConstantFunction() [2/2]

template<class _Res , class... _Args>
ceps::ConstantFunction< _Res(_Args...)>::ConstantFunction ( const ConstantFunction< _Res(_Args...)> &  that)
inline

Copy constructor.

Definition at line 260 of file CepsFunction.hpp.

◆ ~ConstantFunction()

template<class _Res , class... _Args>
ceps::ConstantFunction< _Res(_Args...)>::~ConstantFunction ( )
inlineoverride

Destructor.

Definition at line 265 of file CepsFunction.hpp.

Member Function Documentation

◆ eval()

template<class _Res , class... _Args>
_Res ceps::ConstantFunction< _Res(_Args...)>::eval ( _Args...  )
inlineoverridevirtual

Call operator.

Implements ceps::Function< _Res(_Args...)>.

Definition at line 270 of file CepsFunction.hpp.

Field Documentation

◆ m_var

template<class _Res , class... _Args>
const _Res& ceps::ConstantFunction< _Res(_Args...)>::m_var

Returned value.

Definition at line 252 of file CepsFunction.hpp.


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