18 #ifndef FUNCTORBASE_IMPL_H
19 #define FUNCTORBASE_IMPL_H
34 if(param_name < param_.size())
36 param_[param_name] = param_value;
40 param_.push_back(param_value);
48 unsigned int n = func->
param_.size();
52 for(
unsigned int i=0; i < n; i++)
55 param_[i] = func->
param(i);
62 ASSERT_PERMANENT_LT(param_name, param_.size()).error(
"Parameter of the functor was not set.");
64 return param_[param_name];
#define ASSERT_PERMANENT_LT(a, b)
Definition of comparative assert macro (Less Than)
FunctorBase()
Constructor.
virtual ~FunctorBase()
Destructor.
Class provides common functionality for functors.
std::vector< double > param_
virtual ~FunctorCommon()
Destructor.
void set_param(unsigned int param_name, double param_value)
Sets a functor's parameter.
double param(unsigned int param_name)
Returns parameter.
friend class FunctorCommon
Setting these friend classes to be able to access param_ vector.
void set_param_from_func(FunctorCommon< TType > *func)
Sets a functor's parameters from another functor.
IFunctorBase()
Constructor.
virtual ~IFunctorBase()
Destructor.