Abstract base class for asset storage.
More...
#include <asset_storage.h>
|
| virtual | ~basic_storage ()=default |
| |
| virtual void | unload_all (tpp::thread_pool &pool)=0 |
| | Unloads all assets.
|
| |
| virtual void | unload_single (tpp::thread_pool &pool, const std::string &key)=0 |
| | Unloads a single asset by its key.
|
| |
| virtual void | unload_group (tpp::thread_pool &pool, const std::string &group)=0 |
| | Unloads all assets in a specified group.
|
| |
| virtual void | evict_unused (tpp::thread_pool &pool, const std::string &group, std::chrono::steady_clock::duration max_idle)=0 |
| | Evicts loaded assets not accessed within the given duration. Demotes them back to deferred state so memory is freed.
|
| |
| virtual void | preload_all ()=0 |
| | Triggers loading on all deferred handles in this storage. Non-blocking: starts background loads but does not wait.
|
| |
Abstract base class for asset storage.
Definition at line 427 of file asset_storage.h.
◆ ~basic_storage()
| virtual unravel::basic_storage::~basic_storage |
( |
| ) |
|
|
virtualdefault |
◆ evict_unused()
| virtual void unravel::basic_storage::evict_unused |
( |
tpp::thread_pool & | pool, |
|
|
const std::string & | group, |
|
|
std::chrono::steady_clock::duration | max_idle ) |
|
pure virtual |
Evicts loaded assets not accessed within the given duration. Demotes them back to deferred state so memory is freed.
- Parameters
-
| pool | The thread pool. |
| max_idle | Maximum idle duration before eviction. |
Implemented in unravel::asset_storage< T >.
◆ preload_all()
| virtual void unravel::basic_storage::preload_all |
( |
| ) |
|
|
pure virtual |
Triggers loading on all deferred handles in this storage. Non-blocking: starts background loads but does not wait.
Implemented in unravel::asset_storage< T >.
◆ unload_all()
| virtual void unravel::basic_storage::unload_all |
( |
tpp::thread_pool & | pool | ) |
|
|
pure virtual |
◆ unload_group()
| virtual void unravel::basic_storage::unload_group |
( |
tpp::thread_pool & | pool, |
|
|
const std::string & | group ) |
|
pure virtual |
Unloads all assets in a specified group.
- Parameters
-
| pool | The thread pool for unloading tasks. |
| group | The group to unload. |
Implemented in unravel::asset_storage< T >.
◆ unload_single()
| virtual void unravel::basic_storage::unload_single |
( |
tpp::thread_pool & | pool, |
|
|
const std::string & | key ) |
|
pure virtual |
Unloads a single asset by its key.
- Parameters
-
| pool | The thread pool for unloading tasks. |
| key | The key of the asset to unload. |
Implemented in unravel::asset_storage< T >.
The documentation for this struct was generated from the following file: