Open 3D Engine Atom Gem API Reference
23.05.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
#include <Object.h>
Inherited by AZ::Metal::CommandListBase, AZ::Metal::MetalResource, AZ::Metal::PipelineLayout, AZ::RHI::Device, AZ::RHI::DeviceObject, AZ::RHI::IndirectBufferWriter, AZ::RHI::PhysicalDevice, AZ::RHI::Scope, AZ::Vulkan::CommandListAllocator, AZ::Vulkan::ReleaseContainer< T >, and AZ::Vulkan::WSISurface.
Public Member Functions | |
AZ_RTTI (Object,"{E43378F1-2331-4173-94B8-990ED20E6003}") | |
void | SetName (const Name &name) |
Sets the name of the object. | |
const Name & | GetName () const |
Returns the name set on the object by SetName. | |
uint32_t | use_count () |
Returns the current use count of the object. | |
Protected Member Functions | |
void | add_ref () const |
void | release () const |
Protected Attributes | |
AZStd::atomic_int | m_useCount = 0 |
Friends | |
template<typename Type > | |
struct | AZStd::IntrusivePtrCountPolicy |
Base class for any persistent resource in the RHI library. Provides a name, reference counting, and a common RTTI base class for all objects in the RHI.
|
protected |
All objects have an explicit Init / Shutdown path in addition to creation / deletion. The user is expected to Init the derived variant in order to use it. This extension allows the user to forgo shutdown explicitly and depend on the Ptr ref-counting if necessary.
This requires that Shutdown properly account for being called multiple times.