16 #ifndef SURGSIM_DATASTRUCTURES_NAMEDVARIANTDATA_INL_H 17 #define SURGSIM_DATASTRUCTURES_NAMEDVARIANTDATA_INL_H 23 namespace DataStructures
26 inline NamedVariantData::NamedVariantData()
54 return (a.type() ==
typeid(T));
65 return hasTypedData<T>(index);
76 *value = boost::any_cast<T>(a);
78 catch(
const boost::bad_any_cast &)
80 SURGSIM_FAILURE() <<
"Cannot cast the named value to the specified type.";
89 return get(index, value);
96 #endif // SURGSIM_DATASTRUCTURES_NAMEDVARIANTDATA_INL_H Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
Definition: ApplicationData.h:23
bool get(int index, T *value) const
Given an index, get the corresponding value.
Definition: NamedVariantData-inl.h:69
#define SURGSIM_FAILURE()
Report that something very bad has happened and abort program execution.
Definition: Assert.h:95
bool hasData(int index) const
Check whether the entry with the specified index contains valid data.
Definition: NamedData-inl.h:169
bool get(int index, T *value) const
Given an index, get the corresponding value.
Definition: NamedData-inl.h:190
int getIndex(const std::string &name) const
Given a name, return the corresponding index (or -1).
Definition: NamedData-inl.h:133
The header that provides the assertion API.
bool hasTypedData(int index) const
Check whether the entry with the specified index contains valid data.
Definition: NamedVariantData-inl.h:36