Struct Manager

Inheritance Relationships

Base Types

Struct Documentation

struct Manager : public CE::Assets::Cache::Store<CE::Assets::Sprites::Asset, std::string>, public CE::State::Singleton<Manager>

Declaration: final

Retained namespace:name cache.

Load on the provider/loading owner after images; existing IDs stay unchanged and a batch failure can leave earlier entries. Inherited get_asset() returns a strong handle or null under the cache lock.

Public Functions

Manager() = default
~Manager() override = default
Handle get_asset(std::string_view name_space, std::string_view name) const

Declaration: [[nodiscard]]

Look up an exact namespace/name without loading assets.

Parameters:
  • name_space – Asset definition namespace, copied into the lookup key.

  • name – Local asset name, copied into the lookup key.

Returns:

Retained sprite handle, or null if absent; it survives cache clearing.

std::map<std::string, Handle, std::less<>> get_assets(std::string_view name_space) const

Declaration: [[nodiscard]]

Snapshot published sprites in one exact namespace without loading entries.

Parameters:

name_space – Namespace matched against each retained definition.

Returns:

Owned map keyed by local name in lexical order, empty if absent; copied handles survive cache clears.

void load(const std::vector<Definition> &definitions, CE::Rendering::Resources::Provider &provider)

Construct and publish sprites whose IDs are not already cached.

Missing textures/materials, invalid definitions or upload failures can leave earlier sprites published; existing IDs retain their original handles.

Parameters:
  • definitions – Stable sprite definitions; referenced textures and optional shader materials must already be loaded.

  • provider – Active backend used on its loading owner/current context.

inline virtual Handle get_asset(const std::string &key) const

Declaration: [[nodiscard]]