Public Member Functions | Friends

Fiber::FieldSelection Class Reference

An abstract selection of fields, that is given by names of fields and possible types for each field. More...

#include <FieldSelection.hpp>

List of all members.

Public Member Functions

Friends


Detailed Description

An abstract selection of fields, that is given by names of fields and possible types for each field.

This selection is abstract because it only contains names of fields, but not actual references to fields. Thus a field selection may be use to query an arbitrary Grid object, requesting a selection of concrete fields given on this Grid.

Todo:
Add iterator class

Member Function Documentation

TypeList_t& Fiber::FieldSelection::FieldTypes (  )  [inline]

Beside a set of fields and their type, the FieldSelection also allows to store a set of types independently from the fields.

This can be used to specify requirements on this set of fields.

Don't confuse it with the FieldType() function, that returns the types of one field, if only one field is in the selection here.

RefPtr<Representation> Fiber::FieldSelection::getCartesianVertexFields ( const Grid G  )  const

Return a set of fields, as found on Vertices of the given Grid as represented in cartesian coordinates.

The result is provided as a Representation object, but only for storage purposes. The result object is not suitable to be used within a Grid.

Use getFields() for more specific control from where the fields shall be extracted.

string Fiber::FieldSelection::getFieldName (  )  const

Retrieve the name of a unique field, if only one is stored here.

Will return an empty string if more than one is stored.

Referenced by setUniqueField().

RefPtr<Representation> Fiber::FieldSelection::getFields ( const Representation R  )  const

Return a set of fields, as found on the given Representation object.

The result is provided in a Representation object as well, but only for storage purposes. The result object is not suitable to be used within a Grid.

bool Fiber::FieldSelection::requires ( const type_info &  what  ) 

Check if this field selection requires the field to be of the specified type.

Note that if there are no types defined in the FieldTypes() list, then it means there are no requirements an all types are required here, this function will always return true then.

bool Fiber::FieldSelection::setFieldType ( const string &  Fieldname,
const FiberTypeBase FT,
bool  append 
)

Set the type of a field.

Parameters:
append Flag to tell if the type information should be set or appended to an existing list of types.
Returns:
false if no such field is found here.
template<class T >
bool Fiber::FieldSelection::setType ( bool  append = true  )  [inline]
Returns:
false if no or more than one field is found here.