Go to the documentation of this file.
18 #ifndef viskores_cont_UncertainCellSet_h
19 #define viskores_cont_UncertainCellSet_h
45 template <
typename CellSetList>
51 "Cannot use viskores::ListUniversal with UncertainCellSet.");
59 template <
typename CellSetType>
70 template <
typename OtherCellSetList>
88 template <
typename Functor,
typename... Args>
91 this->CastAndCallForTypes<CellSetList>(std::forward<Functor>(functor),
92 std::forward<Args>(args)...);
97 template <
typename NewCellSetList>
103 template <
typename NewCellSetList>
113 template <
typename CellSetList>
116 using DynamicTag = viskores::cont::internal::DynamicTransformTagCastAndCall;
133 template <
typename CellSetList>
134 struct SerializableTypeString<
viskores::cont::UncertainCellSet<CellSetList>>
150 struct UncertainCellSetSerializeFunctor
152 template <
typename CellSetType>
153 void operator()(
const CellSetType& cs, BinaryBuffer& bb)
const
156 viskoresdiy::save(bb, cs);
160 struct UncertainCellSetDeserializeFunctor
162 template <
typename CellSetType>
163 void operator()(CellSetType,
165 const std::string& typeString,
167 BinaryBuffer& bb)
const
171 CellSetType knownCellSet;
173 unknownCellSet = knownCellSet;
181 template <
typename CellSetList>
182 struct Serialization<
viskores::cont::UncertainCellSet<CellSetList>>
187 static VISKORES_CONT void save(BinaryBuffer& bb,
const Type& obj)
189 obj.CastAndCall(internal::UncertainCellSetSerializeFunctor{}, bb);
194 std::string typeString;
197 bool success =
false;
199 internal::UncertainCellSetDeserializeFunctor{}, CellSetList{}, obj, typeString, success, bb);
204 "Error deserializing Unknown/UncertainCellSet. Message TypeString: " + typeString);
213 #endif //viskores_cont_UncertainCellSet_h
T load(const U &u, viskores::Id v)
Definition: FetchTagArrayDirectIn.h:44
void CastAndCall(Functor &&functor, Args &&... args) const
Call a functor using the underlying cell set type.
Definition: UncertainCellSet.h:89
This class is thrown when Viskores encounters data of a type that is incompatible with the current op...
Definition: ErrorBadType.h:33
UncertainCellSet(const UncertainCellSet< OtherCellSetList > &src)
Definition: UncertainCellSet.h:71
Thisclass NewInstance() const
Create a new cell set of the same type as this.
Definition: UncertainCellSet.h:81
Definition: Particle.h:373
UncertainCellSet(const CellSetType &cellSet)
Definition: UncertainCellSet.h:60
#define VISKORES_CONT
Definition: ExportMacros.h:65
Groups connected points that have the same field value.
Definition: Atomic.h:27
#define VISKORES_STATIC_ASSERT_MSG(condition, message)
Definition: StaticAssert.h:26
A CellSet of an unknown type.
Definition: UnknownCellSet.h:56
void ListForEach(Functor &&f, viskores::List< Ts... >, Args &&... args)
For each typename represented by the list, call the functor with a default instance of that type.
Definition: List.h:745
A CellSet of an uncertain type.
Definition: UncertainCellSet.h:46
auto Get(const viskores::Tuple< Ts... > &tuple)
Retrieve the object from a viskores::Tuple at the given index.
Definition: Tuple.h:89
viskores::cont::UncertainCellSet< CellSetList > ResetCellSetList() const
UncertainCellSet(const viskores::cont::UnknownCellSet &src)
Definition: UncertainCellSet.h:65
#define VISKORES_IS_LIST(type)
Checks that the argument is a proper list.
Definition: List.h:77