This class implements a scene description node reference manager.
More...
#include <NodeRefManager.h>
|
| | ~NodeRefManager () |
| | Destructs the manager.
|
| NodeRef | node (const NodeId nodeId) const |
| | Returns a node by a given node id.
|
| NodeRef | node (const std::string &name) const |
| | Returns the first node specified by a given name.
|
| 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 SceneId sceneId) const |
| | Returns the first node specified by a given name defined in specific scene originally.
|
| NodeRefs | nodes (const std::string &name) const |
| | Returns all nodes specified by a given name.
|
| SceneRef | scene (const SceneId sceneId) const |
| | Returns a scene specified by a scene id.
|
| 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.
|
| void | unregisterNode (const Node *node) |
| | Unregisters a node.
|
|
| using | NameMultiMap = std::unordered_multimap<std::string, NodeId> |
| | Definition of a multimap mapping node names to node ids.
|
| using | NodeMap = std::unordered_map<NodeId, NodeRef> |
| | Definition of a map mapping node ids to node references.
|
This class implements a scene description node reference manager.
◆ NameMultiMap
Definition of a multimap mapping node names to node ids.
◆ NodeMap
Definition of a map mapping node ids to node references.
◆ ~NodeRefManager()
| Ocean::SceneDescription::NodeRefManager::~NodeRefManager |
( |
| ) |
|
◆ changeRegisteredNode()
| void Ocean::SceneDescription::NodeRefManager::changeRegisteredNode |
( |
NodeId | nodeId, |
|
|
const std::string & | oldName, |
|
|
const std::string & | newName ) |
Changes the name of a registered node.
- Parameters
-
| nodeId | Id of the node to change |
| oldName | Old node name |
| newName | New node name |
◆ node() [1/4]
| NodeRef Ocean::SceneDescription::NodeRefManager::node |
( |
const NodeId | nodeId | ) |
const |
Returns a node by a given node id.
If the node does not exist an empty reference is returned.
- Parameters
-
| nodeId | Id of the node to return |
- Returns
- Node reference of the requested node
◆ node() [2/4]
| NodeRef Ocean::SceneDescription::NodeRefManager::node |
( |
const std::string & | name | ) |
const |
Returns the first node specified by a given name.
If the node does not exist an empty reference is returned.
- Parameters
-
- Returns
- Node reference of the requested node
◆ node() [3/4]
| NodeRef Ocean::SceneDescription::NodeRefManager::node |
( |
const std::string & | name, |
|
|
const SceneId | sceneId ) const |
Returns the first node specified by a given name defined in specific scene originally.
If the node does not exist an empty reference is returned.
- Parameters
-
| name | The name of the node |
| sceneId | Id of the scene main owner of the node |
- Returns
- Node reference of the requested node
◆ node() [4/4]
| NodeRef Ocean::SceneDescription::NodeRefManager::node |
( |
const std::string & | name, |
|
|
const std::string & | filename ) const |
Returns the first node specified by a given name defined in a specific file.
If the node does not exist an empty reference is returned.
- Parameters
-
| name | The name of the node |
| filename | Name of the file the node must be defined inside |
- Returns
- Node reference of the requested node
◆ nodes()
| NodeRefs Ocean::SceneDescription::NodeRefManager::nodes |
( |
const std::string & | name | ) |
const |
Returns all nodes specified by a given name.
- Parameters
-
| name | The name of the nodes to return |
- Returns
- Specified nodes
◆ registerNode()
| NodeRef Ocean::SceneDescription::NodeRefManager::registerNode |
( |
Node * | node | ) |
|
Registers a new node.
- Parameters
-
- Returns
- Node reference
◆ scene()
| SceneRef Ocean::SceneDescription::NodeRefManager::scene |
( |
const SceneId | sceneId | ) |
const |
Returns a scene specified by a scene id.
- Parameters
-
| sceneId | Id of the scene to return |
- Returns
- Specified scene
◆ unregisterNode()
| void Ocean::SceneDescription::NodeRefManager::unregisterNode |
( |
const Node * | node | ) |
|
◆ lock_
| Lock Ocean::SceneDescription::NodeRefManager::lock_ |
|
mutableprotected |
◆ nameMultiMap_
| NameMultiMap Ocean::SceneDescription::NodeRefManager::nameMultiMap_ |
|
protected |
Map mapping node names to node pointers.
◆ nodeMap_
| NodeMap Ocean::SceneDescription::NodeRefManager::nodeMap_ |
|
protected |
Map holding all node references.
The documentation for this class was generated from the following file: