|
UraniumCompute 0.1.0
A GPU accelerated parallel task scheduler
|
Base interface for dynamic reference counted objects. More...
#include <Object.h>
Public Member Functions | |
| virtual UInt32 | AddRef ()=0 |
| Add a strong reference to object's reference counter. More... | |
| virtual UInt32 | Release ()=0 |
| Remove a strong reference from object's reference counter. More... | |
| virtual void | AttachRefCounter (ReferenceCounter *counter)=0 |
| Attach a ReferenceCounter to this object. More... | |
| virtual ReferenceCounter * | GetRefCounter ()=0 |
| Get reference counter that belongs to this object. More... | |
Base interface for dynamic reference counted objects.
|
pure virtual |
Add a strong reference to object's reference counter.
Implemented in UN::Object< IObject >, UN::Object< IBuffer >, UN::Object< ICommandList >, UN::Object< IDeviceMemory >, UN::Object< IFence >, UN::Object< IKernel >, UN::Object< IKernelCompiler >, UN::Object< IResourceBinding >, UN::Object< IComputeDevice >, UN::Object< IVulkanDescriptorAllocator >, and UN::Object< IDeviceFactory >.
|
pure virtual |
Attach a ReferenceCounter to this object.
This function must be called right after the object was allocated. It must provide the pointer to reference counter created exclusively for this object.
| counter | - The reference counter to attach to this object. |
Implemented in UN::Object< IObject >, UN::Object< IBuffer >, UN::Object< ICommandList >, UN::Object< IDeviceMemory >, UN::Object< IFence >, UN::Object< IKernel >, UN::Object< IKernelCompiler >, UN::Object< IResourceBinding >, UN::Object< IComputeDevice >, UN::Object< IVulkanDescriptorAllocator >, and UN::Object< IDeviceFactory >.
|
pure virtual |
Get reference counter that belongs to this object.
Implemented in UN::Object< IObject >, UN::Object< IBuffer >, UN::Object< ICommandList >, UN::Object< IDeviceMemory >, UN::Object< IFence >, UN::Object< IKernel >, UN::Object< IKernelCompiler >, UN::Object< IResourceBinding >, UN::Object< IComputeDevice >, UN::Object< IVulkanDescriptorAllocator >, and UN::Object< IDeviceFactory >.
|
pure virtual |
Remove a strong reference from object's reference counter.
If reference counter reaches zero the object will commit suicide by deallocating it's own memory and calling it's own destructor.
Implemented in UN::Object< IObject >, UN::Object< IBuffer >, UN::Object< ICommandList >, UN::Object< IDeviceMemory >, UN::Object< IFence >, UN::Object< IKernel >, UN::Object< IKernelCompiler >, UN::Object< IResourceBinding >, UN::Object< IComputeDevice >, UN::Object< IVulkanDescriptorAllocator >, and UN::Object< IDeviceFactory >.