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
| Signature | Name | Description |
|---|---|---|
AssetHandle() = default | AssetHandle | |
explicit AssetHandle(UUID id) : m_pendingID(id) | AssetHandle | Construct as pending from a UUID |
explicit AssetHandle(const Ref<T>& asset) : m_asset(asset) | AssetHandle | Construct from an already-loaded asset |
explicit AssetHandle(Ref<T>&& asset) : m_asset(std::move(asset)) | AssetHandle | Construct from an already-loaded asset (move) |
Public functions
| Returns | Name | Description |
|---|---|---|
bool | IsEmpty | |
bool | IsPending | |
bool | IsReady | |
bool | IsGPUReady | |
UUID | GetID | |
T* | Get | |
T* | operator-> | |
T& | operator* | |
operatorbool | ||
const Ref<T>& | GetRef | |
void | SetAsset | Set the resolved asset (called by AssetManager when the asset is loaded) |
void | Reset | Reset to empty |
void | SetPendingID | Reset to pending |
bool | operator== | |
bool | operator!= |
Function details
AssetHandle
C++
AssetHandle() = defaultAssetHandle
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() constIsPending
C++
bool IsPending() constIsReady
C++
bool IsReady() constIsGPUReady
C++
bool IsGPUReady() constGetID
C++
UUID GetID() constGet
C++
T* Get() constoperator->
C++
T* operator->() constoperator*
C++
T& operator*() constoperatorbool
C++
explicit operator bool() constGetRef
C++
const Ref<T>& GetRef() constSetAsset
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) constoperator!=
C++
bool operator!=(const AssetHandle& other) constGenerated from AssetSystem/AssetHandle.h via assetsystem.json · Nov 4, 2026Version 1.0.0