|
Foundation
|
Handle type for RHI Objects.
More...
#include <Details.hpp>
Public Member Functions | |
| template<typename U = T> | |
| U * | Get () const |
| Retrieves the underlying RHIObject pointer. It is undefined behavior to use the returned pointer after the underlying resource has been destroyed. | |
| T * | operator-> () const |
| constexpr Handle | operator() () const |
| constexpr | operator bool () const noexcept |
| bool | operator== (const RHIHandle &other) const |
| bool | IsValid () const |
| Check if the handle is valid (i.e. associated with a Factory and not kInvalidHandle) | |
| void | Invalidate () |
| Resets the handle to an invalid state. After calling this, the handle is no longer associated with any Factory or resource. | |
Public Attributes | |
| Factory * | mFactory { nullptr } |
| Handle | mHandle { kInvalidHandle } |
Handle type for RHI Objects.
RHIHandle<Factory, T> are trivially copiable objects that provide a view into the underlying RHIObject storage. When a Factory goes out of scope, all underlying RHIObjects are destroyed.
The behavior is undefined to use a Handle after it's Factory has been destroyed or the resource it refers to has been destroyed.
|
inline |
Retrieves the underlying RHIObject pointer. It is undefined behavior to use the returned pointer after the underlying resource has been destroyed.
| U | Pointer type to retrieve as. U is required to be castable from T |
|
inline |
Resets the handle to an invalid state. After calling this, the handle is no longer associated with any Factory or resource.
|
inline |
|
inlineconstexprnoexcept |
|
inlineconstexpr |
|
inline |
|
inline |
| Factory* Foundation::RHI::RHIHandle< Factory, T >::mFactory { nullptr } |
| Handle Foundation::RHI::RHIHandle< Factory, T >::mHandle { kInvalidHandle } |