Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes

Wizt::FieldFunctor< Operation > Class Template Reference
[The VISH - Fiber Bundle Interface]

Perform operations on fields. More...

#include <FieldFunctor.hpp>

List of all members.

Classes

Public Types

Public Member Functions

Static Public Member Functions

Public Attributes

Protected Attributes


Detailed Description

template<class Operation>
class Wizt::FieldFunctor< Operation >

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.

Parameters:
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");
Note:
The Operation may depend on input parameters if the virtual function
      virtual bool FieldFunctor::modifyOperator(VRequest&Context, Operation&Op) const;
is implemented in a child class.
Author:
Werner Benger

Member Function Documentation

template<class Operation >
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.

Parameters:
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!)
Todo:
Ease field identifier creation by sharing of identifier creators among representations.

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().

template<class Operation >
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.

Returns:
false if the field operation shall be aborted.

Referenced by Wizt::FieldFunctor< Operation >::FieldOperation().

template<class Operation >
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.

Returns:
false if the field operation shall be aborted.

Referenced by Wizt::FieldFunctor< Operation >::FieldOperation().