15 #include <vsg/core/Object.h>
16 #include <vsg/core/ref_ptr.h>
28 std::mutex& getMutex()
const {
return _mutex; }
30 Object* getConnectedObject() {
return _connectedObject; }
31 const Object* getConnectedObject()
const {
return _connectedObject; }
33 virtual std::size_t getSizeOf()
const {
return sizeof(
Auxiliary); }
37 void unref_nodelete()
const;
38 inline unsigned int referenceCount()
const {
return _referenceCount.load(); }
40 virtual int compare(
const Auxiliary& rhs)
const;
44 userObjects[key] = object;
47 Object* getObject(
const std::string& key)
49 if (
auto itr = userObjects.find(key); itr != userObjects.end())
50 return itr->second.get();
55 const Object* getObject(
const std::string& key)
const
57 if (
auto itr = userObjects.find(key); itr != userObjects.end())
58 return itr->second.get();
65 if (
auto itr = userObjects.find(key); itr != userObjects.end())
73 if (
auto itr = userObjects.find(key); itr != userObjects.end())
79 using ObjectMap = std::map<std::string, vsg::ref_ptr<Object>>;
93 void resetConnectedObject();
98 mutable std::atomic_uint _referenceCount;
100 mutable std::mutex _mutex;
Definition: Allocator.h:41
Definition: Auxiliary.h:26
bool signalConnectedObjectToBeDeleted()
ObjectMap userObjects
container for all user objects
Definition: Auxiliary.h:82