CEPS  24.01
Cardiac ElectroPhysiology Simulator
ConstantSAFunc< _Result > Class Template Reference

Detailed Description

template<class _Result>
class ConstantSAFunc< _Result >

================================================================================================ Derivation of SAFunc for constants (no dependance in time or space)

Create a field functor from a constant (scalar, vector, tensor, anything), independent of time or space.

The result type is the same as the stored object. In the case of a stored pointer, during the call the pointer is automatically deferences and the "presented" result is the object itself and not the pointer.

Template Parameters
_ObjectThe type of stored object, can be a pointer

Definition at line 47 of file ConstantSAFunc.hpp.

#include <ConstantSAFunc.hpp>

Inheritance diagram for ConstantSAFunc< _Result >:
[legend]

Public Types

using ResultType = std::remove_pointer_t< _Result >
 The result is the object or the pointed object. More...
 
- Public Types inherited from SAFunc< std::remove_pointer_t< _Result > >
using BaseFunction = ceps::Function< std::remove_pointer_t< _Result >(CepsStandardArgs)>
 Typedef for the function type. More...
 

Public Member Functions

 ConstantSAFunc (ResultType *val)
 Constructor with pointer. Stops if no argument. More...
 
 ConstantSAFunc (const ResultType &val)
 Additional constructor from the object directly. More...
 
 ConstantSAFunc (const ConstantSAFunc &)=default
 We allow the copy from a functor to another. More...
 
ConstantSAFuncoperator= (const ConstantSAFunc &)=default
 We allow the assignement from a functor to another. More...
 
virtual ResultType eval (CepsStandardArgs) final
 Eval operator. More...
 
CepsEnum getFlags () const final
 No flag in this functor, we assume that the pointed object is depending on anything and this "value" never change. More...
 
- Public Member Functions inherited from SAFunc< std::remove_pointer_t< _Result > >
 SAFunc (const SAFunc &)=default
 We allow the copy from a functor to another. More...
 
SAFuncoperator= (const SAFunc &)=default
 We allow the assignement from a functor to another. More...
 
virtual void getLocalData ()
 Authorize access to data for solvecSAFunc, other derived classes : nothing. More...
 
virtual void releaseLocalData ()
 Authorize access to data for solvecSAFunc, other derived classes : nothing. More...
 
CepsBool hasOption (CepsFunctionFlag flag)
 Tells if option is activated. More...
 

Protected Attributes

ResultType m_constant
 The object without pointer, used when class is constructed from the value itself. More...
 

Member Typedef Documentation

◆ ResultType

template<class _Result >
using ConstantSAFunc< _Result >::ResultType = std::remove_pointer_t<_Result>

The result is the object or the pointed object.

Definition at line 53 of file ConstantSAFunc.hpp.

Constructor & Destructor Documentation

◆ ConstantSAFunc() [1/3]

template<class _Result >
ConstantSAFunc< _Result >::ConstantSAFunc ( ResultType val)
explicit

Constructor with pointer. Stops if no argument.

◆ ConstantSAFunc() [2/3]

template<class _Result >
ConstantSAFunc< _Result >::ConstantSAFunc ( const ResultType val)
explicit

Additional constructor from the object directly.

◆ ConstantSAFunc() [3/3]

template<class _Result >
ConstantSAFunc< _Result >::ConstantSAFunc ( const ConstantSAFunc< _Result > &  )
default

We allow the copy from a functor to another.

Member Function Documentation

◆ eval()

template<class _Result >
virtual ResultType ConstantSAFunc< _Result >::eval ( CepsStandardArgs  )
finalvirtual

Eval operator.

◆ getFlags()

template<class _Result >
CepsEnum ConstantSAFunc< _Result >::getFlags ( ) const
finalvirtual

No flag in this functor, we assume that the pointed object is depending on anything and this "value" never change.

Implements SAFunc< std::remove_pointer_t< _Result > >.

◆ operator=()

template<class _Result >
ConstantSAFunc& ConstantSAFunc< _Result >::operator= ( const ConstantSAFunc< _Result > &  )
default

We allow the assignement from a functor to another.

Field Documentation

◆ m_constant

template<class _Result >
ResultType ConstantSAFunc< _Result >::m_constant
protected

The object without pointer, used when class is constructed from the value itself.

Definition at line 81 of file ConstantSAFunc.hpp.


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