FreePOOMA
2.4.1
|
Relation2 is a template used to construct relations that depend on two additional fields (e.g., a = b + c). More...
#include <Relations.h>
Public Member Functions | |
Relation2 (const Target &t, const R1 &r1, const R2 &r2, const RelationFunctor &f) | |
~Relation2 () | |
void | apply () |
virtual RelationListItem * | retarget (const Target &target) const |
Protected Attributes | |
R1 | r1_m |
R2 | r2_m |
Relation2 is a template used to construct relations that depend on two additional fields (e.g., a = b + c).
The Target must be a Field. The RelationFunctor must be Default Constructable and Assignable. In addition, it must provide the constructor
template<class L, class R1, class R2> RelationFunctor(const L &, const R1 &, const R2 &, const RelationFunctor &)
and the member function
template<class L, class R1, class R2> void operator()(const L &const R1 &, const R2 &) const
where L, R1, and R2 are Fields. The constructor should use the arguments to initialize itself and the function should apply the relation.
Relation2< Target, R1, R2, RelationFunctor >::Relation2 | ( | const Target & | t, |
const R1 & | r1, | ||
const R2 & | r2, | ||
const RelationFunctor & | f | ||
) | [inline] |
Relation2< Target, R1, R2, RelationFunctor >::~Relation2 | ( | ) | [inline] |
virtual RelationListItem* Relation2< Target, R1, R2, RelationFunctor >::retarget | ( | const Target & | target | ) | const [inline, virtual] |