Diligent Engine API Reference
Public Member Functions | List of all members
Diligent::ShaderVariableBase Struct Reference

Base implementation of a shader variable. More...

Inheritance diagram for Diligent::ShaderVariableBase:
Diligent::IShaderVariable Diligent::IObject Diligent::DummyShaderVariable

Public Member Functions

virtual IReferenceCountersGetReferenceCounters () const override final
 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.
 
virtual Atomics::Long AddRef () override final
 Increments the number of strong references by 1. More...
 
virtual Atomics::Long Release () override final
 Decrements the number of strong references by 1 and destroys the object when the counter reaches zero. More...
 
virtual void QueryInterface (const INTERFACE_ID &IID, IObject **ppInterface) override final
 Queries the specific interface. More...
 
- Public Member Functions inherited from Diligent::IShaderVariable
virtual void Set (IDeviceObject *pObject)=0
 Sets the variable to the given value. More...
 

Detailed Description

Base implementation of a shader variable.

Member Function Documentation

virtual Atomics::Long Diligent::ShaderVariableBase::AddRef ( )
inlinefinaloverridevirtual

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.

Implements Diligent::IObject.

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

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.

Implements Diligent::IObject.

virtual Atomics::Long Diligent::ShaderVariableBase::Release ( )
inlinefinaloverridevirtual

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.

Implements Diligent::IObject.