Struct Manager
Defined in File material-mgr.h
Inheritance Relationships
Base Types
public CE::Assets::Cache::Store< const CE::Rendering::Resources::Material >(Template Struct Store)public CE::State::Singleton< Manager >(Template Class Singleton)
Struct Documentation
-
struct Manager : public CE::Assets::Cache::Store<const CE::Rendering::Resources::Material>, public CE::State::Singleton<Manager>
Declaration:
finalStrongly retains immutable material recipes and their pipeline generations.
A builder owns the explicit backend mappings and bootstrap choices. Build the complete candidate before publishing; failed reload leaves the old recipe. Invoke synchronously on the active provider/loading owner, outside cache locks. Builder captures must survive the call; its external side effects are not rolled back.
Public Types
Public Functions
-
Manager() = default
Create an empty material cache facade sharing the one provider/loading-owner domain.
-
~Manager() override = default
Drop this cache’s strong handles; independent frame/read handles retain earlier generations.
-
void load(const std::filesystem::path &key, CE::Rendering::Resources::Provider &provider, const Builder &builder)
Bind/verify the loading owner and build only when the exact key is absent.
See also
- Parameters:
key – Exact path key, without implicit normalization or discovery.
provider – Single active resource domain, used synchronously on its loading owner.
builder – Candidate factory, not invoked for an existing key. Missing keys use reload() validation/publication behavior; existing generations remain unchanged.
-
void reload(const std::filesystem::path &key, CE::Rendering::Resources::Provider &provider, const Builder &builder)
Build a complete immutable candidate before replacing/inserting one cache key.
- Parameters:
key – Exact cache key.
provider – Active loading-owner backend passed to the builder.
builder – Nonempty synchronous callable returning a nonnull validated material. A builder exception, null candidate or publication allocation failure preserves the previous entry. External builder effects are not rolled back; old readers retain old generations. Empty builders throw invalid_args, null candidates failed_operation.
-
Manager() = default