1#ifndef __FIBER_FIELDSELECTOR_HPP
2#define __FIBER_FIELDSELECTOR_HPP
5#include <grid/Grid.hpp>
6#include "GridSelector.hpp"
7#include "FieldSelection.hpp"
50 return MySelectedFields;
97 if (!MySelectedFields)
100 return MySelectedFields->requiresType(what);
104 unsigned NumberOfAvailableFields()
const;
109 return Selection().FieldTypes();
115 return Selection().FieldTypes();
126 template <
class ...T>
169 selectField( fieldname,
FTB );
171 selectField( fieldname );
194 selectField( fieldName );
197 theSourceBundle = BP;
203 void clearSelection();
211 return Rep.makeFieldID( getFieldName() );
214 bool setFieldSource(
double time,
const string&theFieldname);
220 bool findFieldSource(
double time,
const string&Fieldname);
229 string getFieldName()
const;
234 return getFieldName();
240 return getFieldName();
253 return FieldSource.getGrid();
264 return FieldSource.getGrid();
272 return FieldSource.getSlice();
278 return FieldSource.getTime();
321 return getField( getFieldName(),
Level );
333 return getField(
theChartID, getFieldName() );
340 RefPtr<Field> getCartesianPositions()
const;
351 RefPtr<Representation> getCartesianRepresentation(
int Level=0)
const;
353 bool operator!()
const;
355 operator bool()
const
Convenience class that implements a pointer to a Bundle object but adds some useful member funtions t...
Definition Bundle.hpp:779
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
Description of types, which is meta-information like what is the number of elements of some array-lik...
Definition FiberType.hpp:61
An abstract selection of fields, that is given by names of fields and possible types for each field.
Definition FieldSelection.hpp:23
An internal class that stores a couple of textual names.
Definition FieldSelector.hpp:18
RefPtr< Fiber::Field > getField(int Level=0, const string &ChartName=string()) const
Return a field of the currently selected in the Cartesian representation of the Vertices on the tople...
Definition FieldSelector.hpp:319
friend bool operator!=(const FieldSelector &L, const FieldSelector &R)
Check if two field selectors differ.
Definition FieldSelector.hpp:140
const WeakPtrSlice & getSlice() const
Get the slice where the field selector refers to.
Definition FieldSelector.hpp:270
void selectField(const BundlePtr &BP, const double time, const string &gridName, const string &fieldName, const RefPtr< Grid > &G, const RefPtr< Slice > &S)
Select a field with full context information.
Definition FieldSelector.hpp:191
string getFieldname() const
Return the name of the currently selected field.
Definition FieldSelector.hpp:232
SkeletonID mySkeletonID
Specify the source of this field, on which grid does it live? By default, this are the vertices.
Definition FieldSelector.hpp:41
const TypeList_t & FieldTypes() const
List of types that this field might provide or want.
Definition FieldSelector.hpp:113
Info< Grid > FieldSource
Meta-Information - from where did we get the selected field? The base class, GridSelector,...
Definition FieldSelector.hpp:34
bool requiresType(const type_info &what) const
Check if this field selector requires the field to be of the specified type.
Definition FieldSelector.hpp:95
double getTime() const
The time when this field was found most recently.
Definition FieldSelector.hpp:276
void accept()
Define the types that this field accepts or provides.
Definition FieldSelector.hpp:127
void selectTypedField(const string &fieldname)
Select a field giving its type as template function argument.
Definition FieldSelector.hpp:158
const RefPtr< Fiber::Grid > & getGrid() const
The Grid object that was found to carry the selected field.
Definition FieldSelector.hpp:262
void selectField(const string &fieldname, const Field &F)
Select a field giving its type from a Field object.
Definition FieldSelector.hpp:166
RefPtr< Fiber::FieldID > makeFieldID(Fiber::Representation &Rep) const
Make a new field ID if none exists yet for the intrinsic field name.
Definition FieldSelector.hpp:209
const RefPtr< Fiber::Grid > & GridSource() const
The Grid object that was found to carry the selected field.
Definition FieldSelector.hpp:251
TypeList_t & FieldTypes()
List of types that this field might provide or want.
Definition FieldSelector.hpp:107
FieldSelector operator()(const string &fieldname, const Field &F) const
Create a new FieldSelector with same properties as the current one, but selecting a new type and fiel...
Definition FieldSelector.hpp:178
string operator()() const
Return the currently selected field name.
Definition FieldSelector.hpp:238
A Field is a collection of CreativeArrayBase reference pointers which are accessed via FragmentID obj...
Definition Field.hpp:245
Context information to select a grid from within a bundle.
Definition GridSelector.hpp:26
A Representation is a set of Field objects, each of them accessed via some FieldID identifier.
Definition Representation.hpp:101
Identifier for Skeletons within a Grid.
Definition SkeletonID.hpp:24
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2
bool operator==(const MultipleStringSelection &a, const MultipleStringSelection &b)
A template helper class to provide an easier syntax for allowing certain field types to be accepted b...
Definition FiberType.hpp:267
Definition fs/init.hpp:20
A set of types.
Definition FiberType.hpp:213