![]() |
LifeV
|
class ExpressionFunctor1 Class representing a functor with 1 expression as arguement. More...
#include <ExpressionFunctor.hpp>
Inheritance diagram for ExpressionFunctor1< FunctorType, ArgumentType >:
Collaboration diagram for ExpressionFunctor1< FunctorType, ArgumentType >:Private Attributes | |
| std::shared_ptr< FunctorType > | M_functor |
| ArgumentType | M_argument |
Public Types | |
| typedef ExpressionBase< ExpressionFunctor1< FunctorType, ArgumentType > > | base_Type |
Constructors & Destructor | |
| ExpressionFunctor1 (std::shared_ptr< FunctorType > fct, const ArgumentType &arg) | |
| Argument with the required data in argument. More... | |
| ExpressionFunctor1 (const ExpressionFunctor1< FunctorType, ArgumentType > &expr) | |
| Copy constructor. More... | |
| ~ExpressionFunctor1 () | |
| Destructor. More... | |
Methods | |
| static void | display (std::ostream &out=std::cout) |
| Display method. More... | |
Get Methods | |
| std::shared_ptr< FunctorType > | functor () const |
| Getter for the functor. More... | |
| const ArgumentType & | argument () const |
| Getter for the expression to be placed as argument. More... | |
Private Methods | |
| ExpressionFunctor1 () | |
| No empty constructor. More... | |
Additional Inherited Members | |
Public Types inherited from ExpressionBase< ExpressionFunctor1< FunctorType, ArgumentType > > | |
| typedef ExpressionFunctor1< FunctorType, ArgumentType > | derived_Type |
Public Member Functions inherited from ExpressionBase< ExpressionFunctor1< FunctorType, ArgumentType > > | |
| ExpressionBase () | |
| Empty and only constructor. More... | |
| virtual | ~ExpressionBase () |
| Destructor. More... | |
| const derived_Type & | cast () const |
| Method to cast away the type and get the real (DerivedType) object. More... | |
class ExpressionFunctor1 Class representing a functor with 1 expression as arguement.
This expression is usefull to build expressions that are "function-like": In case one wants to have an expression that is a function, the functor passed to this expression will have no members and its operator() will operate the function evaluation.
A functor, however, is more general in the sense that it can contain data. These data can be very simple (e.g. just a Real to represent the current time for a function that would depend on time as well) or arbitrarily complicated.
It is required to pass the functor as a shared pointer in order to avoid the copy of heavy data that could be stored in the functor.
Template parameters
FunctorType: The type of the functor
ArgumentType: The type of the argument, that is an expression (it is usually different from the input type expected by the functor)
Template requirements
FunctorType: None
ArgumentType: Copiable, has a static method for display
Definition at line 87 of file ExpressionFunctor.hpp.
| typedef ExpressionBase<ExpressionFunctor1<FunctorType, ArgumentType> > base_Type |
Definition at line 95 of file ExpressionFunctor.hpp.
|
inline |
Argument with the required data in argument.
Definition at line 104 of file ExpressionFunctor.hpp.
|
inline |
Copy constructor.
Definition at line 111 of file ExpressionFunctor.hpp.
|
inline |
Destructor.
Definition at line 118 of file ExpressionFunctor.hpp.
|
private |
No empty constructor.
|
inlinestatic |
Display method.
Definition at line 127 of file ExpressionFunctor.hpp.
|
inline |
Getter for the functor.
Definition at line 141 of file ExpressionFunctor.hpp.
|
inline |
Getter for the expression to be placed as argument.
Definition at line 147 of file ExpressionFunctor.hpp.
|
private |
Definition at line 165 of file ExpressionFunctor.hpp.
|
private |
Definition at line 168 of file ExpressionFunctor.hpp.