|
Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
|
Stable typed reference into an asset registry store. More...
#include <AssetHandles.h>
Public Member Functions | |
| bool | isValid () const noexcept |
| Returns true for any non-null handle, including one that may be stale for a store. | |
| operator bool () const noexcept | |
| Converts this handle to true when it is non-null. | |
Public Attributes | |
| uint32_t | index = 0 |
| Slot in the owning store. It has no meaning without the matching handle type and store. | |
| uint32_t | generation = 0 |
| Store-assigned generation. Zero is reserved for the null/default handle. | |
Stable typed reference into an asset registry store.
Handles are safe to store in scene data and components because they do not point directly at payload memory. Resolve them through their owning store when you need the current path, metadata record, or Asset::Ref. generation lets the store reject a handle after the record at index has been replaced.
isValid() only checks that this is not the null handle. Use the owning store's isValid() when the handle came from serialized data or may outlive a registry reset.
Definition at line 21 of file AssetHandles.h.
|
inlinenodiscardnoexcept |
Returns true for any non-null handle, including one that may be stale for a store.
Definition at line 30 of file AssetHandles.h.
Referenced by Engine::Assets::AssetHandle< GltfHandleTag >::operator bool().
|
inlineexplicitnoexcept |
Converts this handle to true when it is non-null.
Definition at line 35 of file AssetHandles.h.
| uint32_t Engine::Assets::AssetHandle< Tag >::generation = 0 |
Store-assigned generation. Zero is reserved for the null/default handle.
Definition at line 27 of file AssetHandles.h.
| uint32_t Engine::Assets::AssetHandle< Tag >::index = 0 |
Slot in the owning store. It has no meaning without the matching handle type and store.
Definition at line 24 of file AssetHandles.h.