class

AssetHandle

AssetHandle<T> — wrapper around Ref<T> that supports pending UUID resolution. An asset handle can be in one of three states: 1. Empty — no UUID, no asset 2. Pending — has UUID, asset not yet loaded/resolved 3. Ready — has a valid Ref<T> to the loaded asset

Module
AssetSystem
Header
#include "AssetSystem/AssetHandle.h"
Namespace
Mowo
Template
template<typename T>

Usage: AssetHandle<TextureAsset> handle(someUUID); // pending handle.Resolve(assetManager); // try to resolve if (handle.IsReady()) { handle->DoSomething(); }

Constructors

SignatureNameDescription
AssetHandle() = defaultAssetHandle
explicit AssetHandle(UUID id) : m_pendingID(id)AssetHandleConstruct as pending from a UUID
explicit AssetHandle(const Ref<T>& asset) : m_asset(asset)AssetHandleConstruct from an already-loaded asset
explicit AssetHandle(Ref<T>&& asset) : m_asset(std::move(asset))AssetHandleConstruct from an already-loaded asset (move)

Public functions

ReturnsNameDescription
boolIsEmpty
boolIsPending
boolIsReady
boolIsGPUReady
UUIDGetID
T*Get
T*operator->
T&operator*
operatorbool
const Ref<T>&GetRef
voidSetAssetSet the resolved asset (called by AssetManager when the asset is loaded)
voidResetReset to empty
voidSetPendingIDReset to pending
booloperator==
booloperator!=

Function details

AssetHandle

C++
AssetHandle() = default

AssetHandle

C++
explicit AssetHandle(UUID id) : m_pendingID(id)

Construct as pending from a UUID

AssetHandle

C++
explicit AssetHandle(const Ref<T>& asset) : m_asset(asset)

Construct from an already-loaded asset

AssetHandle

C++
explicit AssetHandle(Ref<T>&& asset) : m_asset(std::move(asset))

Construct from an already-loaded asset (move)

IsEmpty

C++
bool IsEmpty() const

IsPending

C++
bool IsPending() const

IsReady

C++
bool IsReady() const

IsGPUReady

C++
bool IsGPUReady() const

GetID

C++
UUID GetID() const

Get

C++
T* Get() const

operator->

C++
T* operator->() const

operator*

C++
T& operator*() const

operatorbool

C++
explicit operator bool() const

GetRef

C++
const Ref<T>& GetRef() const

SetAsset

C++
void SetAsset(const Ref<T>& asset)

Set the resolved asset (called by AssetManager when the asset is loaded)

Reset

C++
void Reset()

Reset to empty

SetPendingID

C++
void SetPendingID(UUID id)

Reset to pending

operator==

C++
bool operator==(const AssetHandle& other) const

operator!=

C++
bool operator!=(const AssetHandle& other) const
Generated from AssetSystem/AssetHandle.h via assetsystem.json · Nov 4, 2026Version 1.0.0