Flow123d
JS_before_hm-2210-gb57a0a528
|
Go to the documentation of this file.
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];
84 #endif //FUNCTORBASE_IMPL_H
double param(unsigned int param_name)
Returns parameter.
IFunctorBase()
Constructor.
#define ASSERT_PERMANENT_LT(a, b)
Definition of comparative assert macro (Less Than)
void set_param(unsigned int param_name, double param_value)
Sets a functor's parameter.
std::vector< double > param_
friend class FunctorCommon
Setting these friend classes to be able to access param_ vector.
virtual ~FunctorBase()
Destructor.
FunctorBase()
Constructor.
virtual ~FunctorCommon()
Destructor.
void set_param_from_func(FunctorCommon< TType > *func)
Sets a functor's parameters from another functor.
virtual ~IFunctorBase()
Destructor.
Class provides common functionality for functors.