7 #ifndef NAZARA_REFCOUNTED_HPP 8 #define NAZARA_REFCOUNTED_HPP 10 #include <Nazara/Prerequesites.hpp> 13 #if NAZARA_CORE_THREADSAFE && NAZARA_THREADSAFETY_REFCOUNTED 14 #include <Nazara/Core/ThreadSafety.hpp> 16 #include <Nazara/Core/ThreadSafetyOff.hpp> 29 void AddReference()
const;
31 unsigned int GetReferenceCount()
const;
33 bool IsPersistent()
const;
35 bool RemoveReference()
const;
37 bool SetPersistent(
bool persistent =
true,
bool checkReferenceCount =
false);
43 std::atomic_bool m_persistent;
44 mutable std::atomic_uint m_referenceCount;
48 #endif // NAZARA_RESOURCE_HPP TODO: Inherit SoundEmitter from Node.
Definition: Algorithm.hpp:12
Core class that represents a reference with a counter.
Definition: RefCounted.hpp:21