Diligent Engine API Reference
Public Member Functions | List of all members
Diligent::IObject Class Referenceabstract

Base interface for all dynamic objects in the engine. More...

Inheritance diagram for Diligent::IObject:
Diligent::IDataBlob Diligent::IDeviceContext Diligent::IDeviceObject Diligent::IFileStream Diligent::IRenderDevice Diligent::IResourceMapping Diligent::IShaderResourceBinding Diligent::IShaderVariable Diligent::ISwapChain Diligent::RefCountedObject< Diligent::IObject >

Public Member Functions

virtual void QueryInterface (const Diligent::INTERFACE_ID &IID, IObject **ppInterface)=0
 Queries the specific interface. More...
 
virtual Atomics::Long AddRef ()=0
 Increments the number of strong references by 1. More...
 
virtual Atomics::Long Release ()=0
 Decrements the number of strong references by 1 and destroys the object when the counter reaches zero. More...
 
virtual IReferenceCountersGetReferenceCounters () const =0
 Returns the pointer to IReferenceCounters interface of the associated reference counters object. The metod does NOT increment the number of strong references to the returned object.
 

Detailed Description

Base interface for all dynamic objects in the engine.

Member Function Documentation

virtual Atomics::Long Diligent::IObject::AddRef ( )
pure virtual

Increments the number of strong references by 1.

Remarks
This method is equivalent to GetReferenceCounters()->AddStrongRef().
The method is thread-safe and does not require explicit synchronization.
Returns
The number of strong references after incrementing the counter.
Note
In a multithreaded environment, the returned number may not be reliable as other threads may simultaneously change the actual value of the counter.

Implemented in Diligent::ShaderVariableBase.

virtual void Diligent::IObject::QueryInterface ( const Diligent::INTERFACE_ID IID,
IObject **  ppInterface 
)
pure virtual

Queries the specific interface.

Parameters
[in]IID- Unique identifier of the requested interface.
[out]ppInterface- Memory address where the pointer to the requested interface will be written. If the interface is not supported, null pointer will be returned.
Remarks
The method increments the number of strong references by 1. The interface must be released by a call to Release() method when it is no longer needed.

Implemented in Diligent::IDeviceContext, Diligent::IShader, Diligent::ITexture, Diligent::IPipelineState, Diligent::IBuffer, Diligent::ISampler, Diligent::ITextureView, Diligent::ShaderVariableBase, Diligent::ResourceMappingImpl, Diligent::IBufferView, Diligent::IResourceMapping, Diligent::ShaderGLImpl, Diligent::BufferD3D11Impl, Diligent::TextureBaseD3D11, Diligent::IRenderDevice, Diligent::TextureD3D12Impl, Diligent::TextureBaseGL, Diligent::BufferGLImpl, Diligent::ShaderD3D11Impl, Diligent::BufferD3D12Impl, Diligent::TextureViewD3D11Impl, Diligent::BufferViewD3D12Impl, Diligent::TextureViewD3D12Impl, Diligent::BufferViewD3D11Impl, Diligent::BufferViewGLImpl, Diligent::TextureViewGLImpl, Diligent::PipelineStateD3D12Impl, Diligent::SwapChainD3D12Impl, Diligent::PipelineStateD3D11Impl, Diligent::ShaderResourceBindingD3D11Impl, Diligent::SwapChainD3D11Impl, Diligent::ShaderResourceBindingD3D12Impl, Diligent::DeviceContextD3D11Impl, Diligent::PipelineStateGLImpl, Diligent::ShaderResourceBindingGLImpl, Diligent::BasicFileStream, Diligent::SamplerD3D12Impl, Diligent::SamplerD3D11Impl, Diligent::SamplerGLImpl, Diligent::SwapChainGLImpl, Diligent::IDeviceObject, Diligent::IShaderResourceBinding, Diligent::DeviceContextGLImpl, and Diligent::DataBlobImpl.

virtual Atomics::Long Diligent::IObject::Release ( )
pure virtual

Decrements the number of strong references by 1 and destroys the object when the counter reaches zero.

Remarks
This method is equivalent to GetReferenceCounters()->ReleaseStrongRef().
The method is thread-safe and does not require explicit synchronization.
Returns
The number of strong references after decrementing the counter.
Note
In a multithreaded environment, the returned number may not be reliable as other threads may simultaneously change the actual value of the counter. The only reliable value is 0 as the object is destroyed when the last strong reference is released.

Implemented in Diligent::ShaderVariableBase.