Perform operations on fields. More...
#include <FieldFunctor.hpp>
Perform operations on fields.
This template class implements an operation, specified by the template argument class, on the data of a Field, taking into account fragmentation of the Field.
Operation | A class that performs an operation on an input_type providing an output_type. The class needs to conform to the following concept:
struct MyDemoOperator { typedef ... input_type; typedef ... output_type; static string createChildname(const string&parent_name); static output_type compute(const input_type&in); }; Creator Objects are then provided via static Ref<FieldOperationCreator<FieldFunctor<MyDemoOperator> > > myCreator("Compute/MyDemoOperator"); |
virtual bool FieldFunctor::modifyOperator(VRequest&Context, Operation&Op) const;
override bool Wizt::FieldFunctor< Operation >::FieldOperation | ( | VRequest & | Context, | |
Fiber::Field & | , | |||
Fiber::Representation & | , | |||
Fiber::Representation & | FieldIDSource | |||
) | [inline, virtual] |
The operation to be performed on the given field, to be overloaded in a subclass.
FieldIDSource | a representation object that carries field identifiers; if a new field is supposed to be created, use this representation to do so (this needs to be revised and made easier!) |
Implements Wizt::FieldOperatorObject.
References Fiber::FieldSelector::accept(), Wizt::FieldFunctor< Operation >::doCreateArrayIfRequired, Wizt::Fish< Fiber::Field >::Fieldname(), Wizt::FieldFunctor< Operation >::modifyOperator(), Wizt::FieldFunctor< Operation >::postOperation(), Fiber::FieldSelector::selectField(), Wizt::StatusIndicator::setStatusError(), and Wizt::StatusIndicator::setStatusInfo().
virtual bool Wizt::FieldFunctor< Operation >::modifyOperator | ( | VRequest & | Context, | |
Operation & | Op | |||
) | const [inline, virtual] |
An optional function to modify the current operator according the context, which may specify additional input values for the Operation.
Referenced by Wizt::FieldFunctor< Operation >::FieldOperation().
virtual bool Wizt::FieldFunctor< Operation >::postOperation | ( | VRequest & | Context, | |
Op & | Result | |||
) | const [inline, virtual] |
An optional function to inspect the result of the operation, possibly modify or add something once it's all done.
Note that the newly created Field will be available here. An implementation of this function could for instance add some attributes to this Field, or add interfaces.
One such application is to add an Eagle::AnalyticFunctionBase interface to analytically computed fields.
Referenced by Wizt::FieldFunctor< Operation >::FieldOperation().