UraniumCompute 0.1.0
A GPU accelerated parallel task scheduler
UN::IObject Class Referenceabstract

Base interface for dynamic reference counted objects. More...

#include <Object.h>

Inheritance diagram for UN::IObject:
UN::Object< IObject > UN::IComputeDevice UN::IDeviceFactory UN::IDeviceObject UN::IKernelCompiler TestObject UN::DynamicLibrary UN::Object< IComputeDevice > UN::Object< IDeviceFactory > UN::IBuffer UN::ICommandList UN::IDeviceMemory UN::IFence UN::IKernel UN::IResourceBinding UN::IVulkanDescriptorAllocator UN::Object< IKernelCompiler >

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 ReferenceCounterGetRefCounter ()=0
 Get reference counter that belongs to this object. More...
 

Detailed Description

Base interface for dynamic reference counted objects.

Member Function Documentation

◆ AddRef()

virtual UInt32 UN::IObject::AddRef ( )
pure virtual

◆ AttachRefCounter()

virtual void UN::IObject::AttachRefCounter ( ReferenceCounter counter)
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.

Parameters
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 >.

◆ GetRefCounter()

◆ Release()

virtual UInt32 UN::IObject::Release ( )
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.

Returns
The new (decremented) value of strong 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 >.


The documentation for this class was generated from the following file: