10 #ifndef vtk_m_cont_internal_FieldCollection_h
11 #define vtk_m_cont_internal_FieldCollection_h
27 FieldCollection(std::initializer_list<vtkm::cont::Field::Association> validAssoc)
29 auto it = this->ValidAssoc.begin();
30 for (
const auto& item : validAssoc)
31 it = this->ValidAssoc.insert(it, item);
35 FieldCollection(std::set<vtkm::cont::Field::Association>&& validAssoc)
36 : ValidAssoc(std::move(validAssoc))
41 void Clear() { this->Fields.clear(); }
49 VTKM_CONT void AddField(
const Field& field);
58 bool HasField(
const std::string& name,
61 return (this->GetFieldIndex(name, assoc) != -1);
66 const std::string& name,
71 const std::string& name,
76 const std::string& name,
82 using Key = std::pair<std::string, vtkm::cont::Field::Association>;
85 bool operator()(
const T& a,
const T& b)
const
87 if (a.first == b.first)
91 return a.first < b.first;
95 std::map<FieldCompare::Key, vtkm::cont::Field, FieldCompare> Fields;
96 std::set<vtkm::cont::Field::Association> ValidAssoc;
103 #endif //vtk_m_cont_internal_FieldCollection_h