Ocean
|
This class implements a rendering object reference manager. More...
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. More... | |
Protected Types | |
typedef std::unordered_multimap< std::string, ObjectId > | NameMap |
Definition of a multimap mapping object names to object ids. More... | |
typedef std::unordered_map< ObjectId, ObjectRef > | ObjectMap |
Definition of a map mapping object ids to object references. More... | |
Protected Member Functions | |
~ObjectRefManager () | |
Destructs the manager. More... | |
ObjectRef | object (const ObjectId objectId) const |
Returns an object by a given object id. More... | |
ObjectRef | object (const std::string &name) const |
Returns the first object specified by a given name. More... | |
ObjectRefs | objects (const std::string &name) const |
Returns all objects specified by a given name. More... | |
ObjectRef | registerObject (Object *object) |
Registers a new object. More... | |
void | changeRegisteredObject (ObjectId objectId, const std::string &oldName, const std::string &newName) |
Changes the name of a registered object. More... | |
void | unregisterObject (const Object *object) |
Unregisters an object. More... | |
Protected Member Functions inherited from Ocean::Singleton< ObjectRefManager > | |
Singleton ()=default | |
Default constructor. More... | |
Protected Attributes | |
ObjectMap | objectMap_ |
Map holding all object references. More... | |
NameMap | nameMap_ |
Map mapping object names to object pointers. More... | |
Lock | lock_ |
Lock for the object map. More... | |
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. More... | |
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 |
|
friend |
|
friend |
|
friend |
|
protected |
Map mapping object names to object pointers.
|
protected |
Map holding all object references.