Loading...
Searching...
No Matches
ml::ManifestAliases< Manifest > Struct Template Reference

Pulls manifest inner type aliases into a class's scope. More...

#include <ManifestAliases.h>

Inheritance diagram for ml::ManifestAliases< Manifest >:

Detailed Description

template<typename Manifest>
struct ml::ManifestAliases< Manifest >

Pulls manifest inner type aliases into a class's scope.

ManifestAliases<Manifest> inherits from the Extract* helpers above, each of which conditionally introduces one using alias. Only the aliases whose corresponding enum exists in Manifest are injected — missing enums simply produce an empty base class with no ambiguity or compile error.

The result is that any class inheriting ManifestAliases can write Images::Background, Fonts::Main, etc. directly, without fully qualifying the manifest type every time.

Which aliases are injected

Manifest member Alias introduced
Manifest::Images Images
Manifest::Fonts Fonts
Manifest::Sounds Sounds
Manifest::State State
Manifest::Flags Flags
Manifest::Event Event

Usage

ManifestAliases is inherited automatically through ManifestResources. Direct use is uncommon outside framework internals.

// Within a ComponentWith<MyManifest>, enum values can be used unqualified:
auto& tex = Resources::get(Images::Background);
auto& fnt = Resources::get(Fonts::Main);
Template Parameters
ManifestA manifest struct, typically a Manifest subclass.
See also
ManifestResources, Manifest

Definition at line 131 of file ManifestAliases.h.


The documentation for this struct was generated from the following file: