8 #ifndef META_OCEAN_SCENEDESCRIPTION_NODE_REF_MANAGER_H
9 #define META_OCEAN_SCENEDESCRIPTION_NODE_REF_MANAGER_H
24 namespace SceneDescription
43 typedef std::unordered_map<NodeId, NodeRef>
NodeMap;
75 NodeRef node(
const std::string& name,
const std::string& filename)
const;
This class implements a recursive lock object.
Definition: Lock.h:31
This template class implements a object reference with an internal reference counter.
Definition: base/ObjectRef.h:58
This class is the base class for all scene description nodes.
Definition: scenedescription/Node.h:49
This class implements a scene description node reference manager.
Definition: NodeRefManager.h:32
~NodeRefManager()
Destructs the manager.
std::unordered_multimap< std::string, NodeId > NameMultiMap
Definition of a multimap mapping node names to node ids.
Definition: NodeRefManager.h:38
NodeRef node(const std::string &name, const std::string &filename) const
Returns the first node specified by a given name defined in a specific file.
NodeRef node(const std::string &name) const
Returns the first node specified by a given name.
NodeMap nodeMap_
Map holding all node references.
Definition: NodeRefManager.h:123
NameMultiMap nameMultiMap_
Map mapping node names to node pointers.
Definition: NodeRefManager.h:126
NodeRef node(const NodeId nodeId) const
Returns a node by a given node id.
std::unordered_map< NodeId, NodeRef > NodeMap
Definition of a map mapping node ids to node references.
Definition: NodeRefManager.h:43
NodeRef node(const std::string &name, const SceneId sceneId) const
Returns the first node specified by a given name defined in specific scene originally.
NodeRef registerNode(Node *node)
Registers a new node.
void changeRegisteredNode(NodeId nodeId, const std::string &oldName, const std::string &newName)
Changes the name of a registered node.
NodeRefs nodes(const std::string &name) const
Returns all nodes specified by a given name.
void unregisterNode(const Node *node)
Unregisters a node.
SceneRef scene(const SceneId sceneId) const
Returns a scene specified by a scene id.
Lock lock_
Lock for the node map.
Definition: NodeRefManager.h:129
This template class implements a smart object reference which is a specialization of an ObjectRef obj...
Definition: SmartObjectRef.h:90
std::vector< NodeRef > NodeRefs
Definition of a vector holding scene description node references.
Definition: scenedescription/Node.h:42
size_t NodeId
Definition of a object id.
Definition: SceneDescription.h:41
size_t SceneId
Definition of a unique scene id.
Definition: SceneDescription.h:52
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15