|
Foundation
|
Scoped move-only RAII handle wrapper for RHI Objects. More...
#include <Details.hpp>
Public Member Functions | |
| RHIScopedHandle ()=default | |
| RHIScopedHandle (Factory *factory, Handle handle) | |
| RHIScopedHandle (RHIScopedHandle &&other) noexcept | |
| RHIScopedHandle & | operator= (RHIScopedHandle &&other) noexcept |
| RHIHandle< Factory, T > | View () const |
| Returns a non-owning view of the underlying RHIHandle. | |
| RHIHandle< Factory, T > | Release () |
| Releases the underlying RHIHandle, invalidating the scoped handle. NOTE: This may leak the resource if not properly managed afterward. | |
| void | Reset () |
| Destructs the underlying RHIObject, and invalidates the scoped handle. | |
| RHIScopedHandle (const RHIScopedHandle &)=delete | |
| RHIScopedHandle & | operator= (const RHIScopedHandle &)=delete |
| ~RHIScopedHandle () | |
Public Member Functions inherited from Foundation::RHI::RHIHandle< Factory, T > | |
| 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. | |
Additional Inherited Members | |
Public Attributes inherited from Foundation::RHI::RHIHandle< Factory, T > | |
| Factory * | mFactory { nullptr } |
| Handle | mHandle { kInvalidHandle } |
Scoped move-only RAII handle wrapper for RHI Objects.
|
default |
|
inline |
|
inlinenoexcept |
|
delete |
|
inline |
|
delete |
|
inlinenoexcept |
Releases the underlying RHIHandle, invalidating the scoped handle. NOTE: This may leak the resource if not properly managed afterward.
|
inline |
Destructs the underlying RHIObject, and invalidates the scoped handle.
Returns a non-owning view of the underlying RHIHandle.