Class Context
Defined in File asset-mgr.h
Nested Relationships
Nested Types
Inheritance Relationships
Derived Types
public CE::Assets::Cache::Store< CE::Text::Legacy::Font >(Template Struct Store)public CE::Assets::Cache::Store< CE::Rendering::Resources::Program >(Template Struct Store)public CE::Assets::Cache::Store< CE::Assets::Sprites::Asset, std::string >(Template Struct Store)public CE::Assets::Cache::Store< CE::Rendering::Resources::Image >(Template Struct Store)public CE::Assets::Cache::Store< CE::Assets::Tilesets::Asset, std::string >(Template Struct Store)public CE::Assets::Cache::Store< const CE::Rendering::Resources::Material >(Template Struct Store)public CE::Assets::Cache::Store< const Asset, std::string >(Template Struct Store)public CE::Assets::Cache::Store< AssetType, Key, Allocator >(Template Struct Store)
Class Documentation
-
class Context
Guards the single active provider/loading-owner domain shared by all caches.
This is publication/teardown context, not an eviction or residency manager. Cache maps retain strong handles until explicit clear/replacement or provider teardown; readers retain independent handles across either operation. Distinct owned Loaders still share this domain. Teardown rejects publication; after release, a later provider may bind it. Old handles keep their old native domain and cannot migrate to the replacement provider.
Subclassed by CE::Assets::Cache::Store< CE::Text::Legacy::Font >, CE::Assets::Cache::Store< CE::Rendering::Resources::Program >, CE::Assets::Cache::Store< CE::Assets::Sprites::Asset, std::string >, CE::Assets::Cache::Store< CE::Rendering::Resources::Image >, CE::Assets::Cache::Store< CE::Assets::Tilesets::Asset, std::string >, CE::Assets::Cache::Store< const CE::Rendering::Resources::Material >, CE::Assets::Cache::Store< const Asset, std::string >, CE::Assets::Cache::Store< AssetType, Key, Allocator >
Public Static Functions
-
static void verify_provider(const CE::Rendering::Resources::Provider &provider)
Check compatibility with the active global provider/loading owner under its mutex.
- Parameters:
provider – Candidate domain. Throws failed_operation for another bound provider, a foreign loading thread or teardown. An unbound context validates without binding; no resource/cache entry is created.
-
static bool evict_graphics_domain(const CE::Rendering::GraphicsDomainStateChanged &change) noexcept
Evict the bound provider’s GPU-backed caches after matching native invalidation.
Call on the loading/graphics owner. Stale, foreign and uncommitted records are ignored; CPU FontService catalogues and external handles survive. Runtime installs this consumer on its Context bus. Standalone hosts may register it themselves. Native cleanup never depends on this listener.
-
static inline bool is_bound_to(const CE::Rendering::Resources::Provider &provider) noexcept
Declaration:
[[nodiscard]]- Returns:
Whether the exact provider address is currently bound, observed under the domain mutex. This observation does not pin its lifetime or authorize concurrent teardown/publication.
Protected Static Functions
-
static void bind_provider(const CE::Rendering::Resources::Provider &provider)
Verify the global domain and, if absent, bind it to this provider/current loading thread.
- Parameters:
provider – Borrowed provider retained by the surrounding runtime until loading is quiescent. Conflicting provider/owner or teardown throws failed_operation; distinct Loader objects do not create independent domains.
Friends
- friend struct CE::Rendering::Resources::Provider
-
static void verify_provider(const CE::Rendering::Resources::Provider &provider)