vkmEngine 1.0.0
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
Vkm::Engine::Handle< ResourceType > Struct Template Reference

Opaque, type-safe handle for resources, distinguished by ResourceType. More...

#include <resource_handle.h>

Public Member Functions

constexpr operator bool () const noexcept
 True when the handle names a non-null slot.
constexpr uint32_t id () const noexcept
 Get the sparse slot index for use as map key, sorting, or logging.

Detailed Description

template<typename ResourceType>
struct Vkm::Engine::Handle< ResourceType >

Opaque, type-safe handle for resources, distinguished by ResourceType.

Wraps a StorageIndex (sparse slot index + generation counter). A default-constructed handle is invalid (null sentinel). Handles detect stale access via generation matching.

Template Parameters
ResourceTypeThe resource type (e.g., MeshAsset, TextureAsset, MaterialAsset).

The documentation for this struct was generated from the following file: