Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
Asset::LoadResult< Key, AssetClass > Struct Template Reference

Result returned when an asynchronous asset load reaches a terminal state. More...

#include <Asset.h>

Collaboration diagram for Asset::LoadResult< Key, AssetClass >:

Public Attributes

Ref< Key, AssetClass > ref
 Stable reference to the record that produced this result.
AssetClass * asset = nullptr
 Loaded asset payload, or nullptr when loading failed or the record expired.
bool success = false
 True when the payload finished loading successfully.
std::string error
 Failure message for unsuccessful loads.
uint64_t generation = 0
 Record generation that completed.

Detailed Description

template<typename Key, typename AssetClass>
struct Asset::LoadResult< Key, AssetClass >

Result returned when an asynchronous asset load reaches a terminal state.

The result describes one generation of a record. A new generation is created when the manager starts a new load, replaces the payload, or unloads the payload.

Template Parameters
KeyAsset lookup key type used by the owning AssetManager.
AssetClassAsset payload type stored by the owning AssetManager.

Definition at line 65 of file Asset.h.

Member Data Documentation

◆ asset

template<typename Key, typename AssetClass>
AssetClass* Asset::LoadResult< Key, AssetClass >::asset = nullptr

Loaded asset payload, or nullptr when loading failed or the record expired.

Definition at line 75 of file Asset.h.

Referenced by Asset::AssetManager< Key, AssetClass >::completeRecord().

◆ error

template<typename Key, typename AssetClass>
std::string Asset::LoadResult< Key, AssetClass >::error

Failure message for unsuccessful loads.

Definition at line 85 of file Asset.h.

Referenced by Asset::AssetManager< Key, AssetClass >::completeRecord(), and Asset::Ref< Asset::MeshPath, Animation >::expiredFuture().

◆ generation

template<typename Key, typename AssetClass>
uint64_t Asset::LoadResult< Key, AssetClass >::generation = 0

Record generation that completed.

Definition at line 90 of file Asset.h.

Referenced by Asset::AssetManager< Key, AssetClass >::completeRecord().

◆ ref

template<typename Key, typename AssetClass>
Ref<Key, AssetClass> Asset::LoadResult< Key, AssetClass >::ref

Stable reference to the record that produced this result.

Definition at line 70 of file Asset.h.

Referenced by Asset::AssetManager< Key, AssetClass >::completeRecord().

◆ success

template<typename Key, typename AssetClass>
bool Asset::LoadResult< Key, AssetClass >::success = false

True when the payload finished loading successfully.

Definition at line 80 of file Asset.h.

Referenced by Asset::AssetManager< Key, AssetClass >::completeRecord().


The documentation for this struct was generated from the following file:
  • /home/magerbeton/Documents/gl3-vulkan/Engine/include/Engine/Core/Asset.h