Go to the documentation of this file.
18 #ifndef viskores_filter_FieldSelection_h
19 #define viskores_filter_FieldSelection_h
26 #include <initializer_list>
70 Mode mode = Mode::Select);
87 std::initializer_list<std::pair<std::string, viskores::cont::Field::Association>> fields,
88 Mode mode = Mode::Select);
100 Mode mode = Mode::Select);
118 const std::string& name,
136 const std::string& fieldName,
139 this->AddField(fieldName, association, this->GetMode());
162 const std::string& fieldName,
176 const std::string& name,
179 return (this->GetFieldMode(name, association) != Mode::None);
205 struct InternalStruct;
206 std::unique_ptr<InternalStruct>
Internals;
212 #endif // viskores_filter_FieldSelection_h
Mode GetFieldMode(const viskores::cont::Field &inputField) const
Definition: FieldSelection.h:156
Association GetAssociation() const
Return the association of the field.
Definition: Field.h:153
Association
Identifies what elements of a data set a field is associated with.
Definition: Field.h:46
@ Any
Any field regardless of the association.
void AddField(const std::string &fieldName, Mode mode)
Definition: FieldSelection.h:142
#define VISKORES_CONT
Definition: ExportMacros.h:65
bool IsFieldSelected(const viskores::cont::Field &inputField) const
Returns true if the input field should be mapped to the output dataset.
Definition: FieldSelection.h:112
Groups connected points that have the same field value.
Definition: Atomic.h:27
bool HasField(const viskores::cont::Field &inputField) const
Returns true if the input field has been added to this selection.
Definition: FieldSelection.h:170
bool HasField(const std::string &name, viskores::cont::Field::Association association=viskores::cont::Field::Association::Any) const
Definition: FieldSelection.h:175
Mode
Definition: FieldSelection.h:42
const std::string & GetName() const
Return the name of the field.
Definition: Field.h:151
A viskores::Pair is essentially the same as an STL pair object except that the methods (constructors ...
Definition: Pair.h:37
A FieldSelection stores information about fields to map for input dataset to output when a filter is ...
Definition: FieldSelection.h:39
std::unique_ptr< InternalStruct > Internals
Definition: FieldSelection.h:205
void AddField(const viskores::cont::Field &inputField)
Definition: FieldSelection.h:124
void AddField(const viskores::cont::Field &inputField, Mode mode)
Definition: FieldSelection.h:129
A Field encapsulates an array on some piece of the mesh, such as the points, a cell set,...
Definition: Field.h:39
void AddField(const std::string &fieldName, viskores::cont::Field::Association association=viskores::cont::Field::Association::Any)
Definition: FieldSelection.h:135