8 #ifndef META_OCEAN_SCENEDESCRIPTION_DYNAMIC_NODE_H
9 #define META_OCEAN_SCENEDESCRIPTION_DYNAMIC_NODE_H
19 namespace SceneDescription
64 inline unsigned int dynamicFields()
const;
70 bool hasAnyField(
const std::string& fieldName)
const override;
116 template <
typename T>
const T& dynamicField(
const std::string& fieldName)
const;
123 template <
typename T> T& dynamicField(
const std::string& fieldName);
Definition of a base exception for the entire Ocean framework.
Definition: Exception.h:29
This class is the base class for all nodes able to handle fields loaded during runtime.
Definition: DynamicNode.h:37
DynamicFieldIndices dynamicFieldIndices_
Map mapping names of dynamic fields to indices.
Definition: DynamicNode.h:156
bool addField(const std::string &name, const Field &field)
Adds a new field during runtime.
std::unordered_map< std::string, unsigned int > DynamicFieldIndices
Definition of a map mapping field names to field indices.
Definition: DynamicNode.h:48
bool hasAnyField(const std::string &fieldName) const override
Returns whether this node has a special standard or dynamic field.
const std::string & dynamicFieldName(const unsigned int index) const
Returns the name of a dynamic field by a given index.
unsigned int dynamicFields() const
Returns the number of dynamic fields.
Definition: DynamicNode.h:159
const Field & anyField(const std::string &fieldName) const override
Returns the field base of a specified standard or dynamic field.
DynamicNode()
Creates a new dynamic node object.
const Field & dynamicField(const std::string &fieldName) const
Returns the field base of a specified dynamic field.
std::vector< Field * > DynamicFields
Definition of a vector holding fields.
Definition: DynamicNode.h:43
bool removeField(const std::string &name)
Removes a field added during runtime.
Field & dynamicField(const std::string &fieldName)
Returns the field base of a specified dynamic field.
bool isDynamic() const override
Returns whether this node can hold dynamic generated field.
~DynamicNode() override
Destructs a dynamic node object.
DynamicFields dynamicFields_
Vector holding the dynamic fields.
Definition: DynamicNode.h:153
bool hasDynamicField(const std::string &name) const
Returns whether this node holds a specific dynamic field.
Field & anyField(const std::string &fieldName) override
Returns the field base of a specified standard or dynamic field.
This class is the base class for all scene description fields.
Definition: Field.h:36
This class is the base class for all scene description nodes.
Definition: scenedescription/Node.h:49
This template class implements a smart object reference which is a specialization of an ObjectRef obj...
Definition: SmartObjectRef.h:90
SmartObjectRef< DynamicNode, Node > DynamicNodeRef
Definition of a smart object reference for X scene description nodes.
Definition: DynamicNode.h:23
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15