Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
Loading...
Searching...
No Matches
Engine::Assets::AssetHandle< Tag > Struct Template Reference

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.

Detailed Description

template<typename Tag>
struct Engine::Assets::AssetHandle< Tag >

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.

Member Function Documentation

◆ isValid()

template<typename Tag>
bool Engine::Assets::AssetHandle< Tag >::isValid ( ) const
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().

Here is the caller graph for this function:

◆ operator bool()

template<typename Tag>
Engine::Assets::AssetHandle< Tag >::operator bool ( ) const
inlineexplicitnoexcept

Converts this handle to true when it is non-null.

Definition at line 35 of file AssetHandles.h.

Member Data Documentation

◆ generation

template<typename Tag>
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.

◆ index

template<typename Tag>
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.


The documentation for this struct was generated from the following file:
  • /workspace/magerbeton/gl3-vulkan/code/Engine/include/Engine/Asset/AssetHandles.h