Diligent Engine API Reference
Public Member Functions | Protected Attributes | List of all members
Diligent::DeviceObjectBase< BaseInterface, ObjectDescType, TObjectAllocator > Class Template Reference

Template class implementing base functionality for a device object. More...

Inheritance diagram for Diligent::DeviceObjectBase< BaseInterface, ObjectDescType, TObjectAllocator >:
Diligent::ObjectBase< BaseInterface, TObjectAllocator > Diligent::RefCountedObject< BaseInterface, TObjectAllocator >

Public Member Functions

 DeviceObjectBase (TObjectAllocator &ObjAllocator, class IRenderDevice *pDevice, const ObjectDescType &ObjDesc, IObject *pOwner=nullptr, bool bIsDeviceInternal=false)
 
UniqueIdentifier GetUniqueID () const
 Returns unique identifier. More...
 

Protected Attributes

const String m_ObjectNameCopy
 Copy of a device object name. More...
 
ObjectDescType m_Desc
 Object description.
 

Detailed Description

template<class BaseInterface, typename ObjectDescType, typename TObjectAllocator>
class Diligent::DeviceObjectBase< BaseInterface, ObjectDescType, TObjectAllocator >

Template class implementing base functionality for a device object.

Constructor & Destructor Documentation

template<class BaseInterface, typename ObjectDescType, typename TObjectAllocator>
Diligent::DeviceObjectBase< BaseInterface, ObjectDescType, TObjectAllocator >::DeviceObjectBase ( TObjectAllocator &  ObjAllocator,
class IRenderDevice pDevice,
const ObjectDescType &  ObjDesc,
IObject pOwner = nullptr,
bool  bIsDeviceInternal = false 
)
inline
Parameters
ObjAllocator- allocator that was used to allocate memory for this instance
pDevice- pointer to the render device.
ObjDesc- object description.
pOwner- owner object.
bIsDeviceInternal- flag indicating if the object is an internal device object and must not keep a strong reference to the device.

Member Function Documentation

template<class BaseInterface, typename ObjectDescType, typename TObjectAllocator>
UniqueIdentifier Diligent::DeviceObjectBase< BaseInterface, ObjectDescType, TObjectAllocator >::GetUniqueID ( ) const
inline

Returns unique identifier.

Note
This unique ID is used to unambiguously identify device object for tracking purposes. Niether GL handle nor pointer could be safely used for this purpose as both GL reuses released handles and the OS reuses released pointers

Member Data Documentation

template<class BaseInterface, typename ObjectDescType, typename TObjectAllocator>
const String Diligent::DeviceObjectBase< BaseInterface, ObjectDescType, TObjectAllocator >::m_ObjectNameCopy
protected

Copy of a device object name.

When new object is created, its description structure is copied to m_Desc, the name is copied to m_ObjectNameCopy, and m_Desc.Name pointer is set to m_ObjectNameCopy.c_str().