Class Context

Nested Relationships

Nested Types

Inheritance Relationships

Derived Types

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.

static PublicationContext publication_context(const CE::Rendering::Resources::Provider &provider)

Declaration: [[nodiscard]]

Friends

friend struct CE::Rendering::Resources::Provider