FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
FieldSelection.hpp
1#ifndef __FIBER_FIELDSELECTION_HPP
2#define __FIBER_FIELDSELECTION_HPP
3
4#include "BundleAPI.h"
5#include <field/FiberType.hpp>
6#include <grid/Grid.hpp>
7
8namespace Fiber
9{
10
22class BUNDLE_API FieldSelection : public ReferenceBase<FieldSelection>
23{
24public:
30
31private:
40 FieldSelection_t Selection;
41
45 TypeList_t MyFieldTypes;
46
47public:
50
59 bool requiresType(const type_info&what);
60
73 {
74 return MyFieldTypes;
75 }
76
80 const TypeList_t&FieldTypes() const
81 {
82 return MyFieldTypes;
83 }
84
85 const FieldSelection_t&getSelection() const
86 {
87 return Selection;
88 }
89
91 ~FieldSelection();
92
94 friend bool operator==(const FieldSelection&L, const FieldSelection&R);
95
97 friend bool operator!=(const FieldSelection&L, const FieldSelection&R)
98 {
99 return !(L==R);
100 }
101
103 void setUniqueField(const string&fieldname, const TypeList_t&FT);
104
110 string getFieldName() const;
111
115 unsigned getNumberOfFields() const;
116
124 bool setFieldType(const string&Fieldname, const FiberTypeBase&, bool append);
125
129 bool setFieldType(const string&Fieldname, const TypeList_t&FieldSelection);
130
131 TypeList_t getFieldType(const string&Fieldname) const;
132 TypeList_t getFieldType() const;
133
137 template <class T>
138 bool setType(bool append=true)
139 {
140 return setFieldType(getFieldName(), FiberType<T>::getFiberType(), append );
141 }
142
143
147 template <class T>
148 void setType(const string&name, bool append=true)
149 {
150 setFieldType(name, FiberType<T>::getFiberType(), append );
151 }
152
160
172};
173
174
175
176} /* namespace Fiber */
177
178#endif /* __FIBER_FIELDSELECTION_HPP */
179
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
Abstract procedural description of a data element which may be used to construct arrays and fields.
Definition FiberTypeBase.hpp:33
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
RefPtr< Representation > getCartesianVertexFields(const Grid &G) const
Return a set of fields, as found on Vertices of the given Grid as represented in cartesian coordinate...
void setType(const string &name, bool append=true)
Define the types that this field accepts or provides.
Definition FieldSelection.hpp:148
friend bool operator!=(const FieldSelection &L, const FieldSelection &R)
Check if two field selectors differ.
Definition FieldSelection.hpp:97
TypeList_t & FieldTypes()
Beside a set of fields and their type, the FieldSelection also allows to store a set of types indepen...
Definition FieldSelection.hpp:72
bool setType(bool append=true)
Definition FieldSelection.hpp:138
const TypeList_t & FieldTypes() const
Readonly retrieval of associated field types.
Definition FieldSelection.hpp:80
RefPtr< Representation > getFields(const Representation &R) const
Return a set of fields, as found on the given Representation object.
std::map< string, TypeList_t > FieldSelection_t
The actual selection of fields, modelled as a mapping from string to a list of types.
Definition FieldSelection.hpp:29
A Grid is a set of Skeleton objects, each of them accessed via some unique SkeletonID object.
Definition Grid.hpp:60
A Representation is a set of Field objects, each of them accessed via some FieldID identifier.
Definition Representation.hpp:101
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 set of types.
Definition FiberType.hpp:213