|
Ocean
|
This class implements a rendering object reference manager. More...
#include <ObjectRef.h>
Public Member Functions | |
| bool | hasEngineObject (const std::string &engine, const bool writeObjectToLog) const |
| Tests whether this manager holds still some objects of a specific rendering engine. | |
Protected Types | |
| using | NameMap = std::unordered_multimap< std::string, ObjectId > |
| Definition of a multimap mapping object names to object ids. | |
| using | ObjectMap = std::unordered_map< ObjectId, ObjectRef > |
| Definition of a map mapping object ids to object references. | |
Protected Member Functions | |
| ~ObjectRefManager () | |
| Destructs the manager. | |
| ObjectRef | object (const ObjectId objectId) const |
| Returns an object by a given object id. | |
| ObjectRef | object (const std::string &name) const |
| Returns the first object specified by a given name. | |
| ObjectRefs | objects (const std::string &name) const |
| Returns all objects specified by a given name. | |
| ObjectRef | registerObject (Object *object) |
| Registers a new object. | |
| void | changeRegisteredObject (ObjectId objectId, const std::string &oldName, const std::string &newName) |
| Changes the name of a registered object. | |
| void | unregisterObject (const Object *object) |
| Unregisters an object. | |
Protected Member Functions inherited from Ocean::Singleton< ObjectRefManager > | |
| Singleton ()=default | |
| Default constructor. | |
Protected Attributes | |
| ObjectMap | objectMap_ |
| Map holding all object references. | |
| NameMap | nameMap_ |
| Map mapping object names to object pointers. | |
| Lock | lock_ |
| Lock for the object map. | |
Friends | |
| class | Singleton< ObjectRefManager > |
| class | Ocean::ObjectRef< Object > |
| class | Engine |
| class | Factory |
| class | Object |
Additional Inherited Members | |
Static Public Member Functions inherited from Ocean::Singleton< ObjectRefManager > | |
| static ObjectRefManager & | get () |
| Returns a reference to the unique object. | |
This class implements a rendering object reference manager.
|
protected |
Definition of a multimap mapping object names to object ids.
|
protected |
Definition of a map mapping object ids to object references.
|
protected |
Destructs the manager.
|
protected |
Changes the name of a registered object.
| objectId | Id of the object to change |
| oldName | Old object name |
| newName | New object name |
| bool Ocean::Rendering::ObjectRefManager::hasEngineObject | ( | const std::string & | engine, |
| const bool | writeObjectToLog | ||
| ) | const |
Tests whether this manager holds still some objects of a specific rendering engine.
| engine | Name of the engine to test |
| writeObjectToLog | True, to write all engine objects to the log |
Returns an object by a given object id.
If the object does not exist an empty reference is returned.
| objectId | Id of the object to return |
|
protected |
Returns the first object specified by a given name.
If the object does not exist an empty reference is returned.
| name | The name of the object |
|
protected |
Returns all objects specified by a given name.
| name | The name of the objects to return |
Registers a new object.
| object | The object to manage, must be valid |
|
protected |
Unregisters an object.
|
friend |
|
friend |
|
protected |
Map mapping object names to object pointers.
|
protected |
Map holding all object references.