4#ifndef MALENA_MANIFEST_H
5#define MALENA_MANIFEST_H
10#include <unordered_map>
55 template<
typename Asset>
58 template<
typename ConfigType,
typename ValueType>
59 static const ValueType&
getConfig(ConfigType config);
68 template<
typename EnumType>
75 template<
typename EnumType>
76 static void set(EnumType key,
const char* filepath);
79 template<
typename EnumType>
80 static void set(EnumType key, std::string value);
88 template<
typename EnumType,
typename ValueType>
89 static std::enable_if_t<
90 !std::is_same_v<std::decay_t<ValueType>,
const char*> &&
91 !std::is_same_v<std::decay_t<ValueType>, std::string> &&
92 !std::is_base_of_v<ThemeTag, std::decay_t<ValueType>>
94 set(EnumType key, ValueType&& value);
102 template<
typename EnumType,
typename T>
103 static std::enable_if_t<std::is_base_of_v<ThemeTag, std::decay_t<T>>>
104 set(EnumType key, T&& value);
107 template<
typename E,
typename V,
typename... Args>
108 static void set(E key, V&& value, Args&&... args);
111 template<
typename Asset>
112 static std::unordered_map<Asset, std::string, EnumClassHash>& getFilePaths();
114 template<
typename ConfigType,
typename ValueType>
115 static auto& getConfigs();
117 template<
typename EnumType>
118 static auto& getThemes();
123#include "../../../src/Manifests/Manifest.tpp"
Base class for all Malena manifests.
static std::enable_if_t< std::is_base_of_v< ThemeTag, std::decay_t< T > > > set(EnumType key, T &&value)
Register a Theme-derived value.
static const ValueType & getConfig(ConfigType config)
static const ThemeTag & getTheme(EnumType key)
Retrieve a theme stored via set(key, ThemeDerived{}).
static void set(EnumType key, std::string value)
Register a string configuration value.
static std::enable_if_t< !std::is_same_v< std::decay_t< ValueType >, const char * > &&!std::is_same_v< std::decay_t< ValueType >, std::string > &&!std::is_base_of_v< ThemeTag, std::decay_t< ValueType > > > set(EnumType key, ValueType &&value)
Register a typed configuration value (int, float, struct, etc.).
static const std::string & getFilepath(const Asset &asset)
static void set(E key, V &&value, Args &&... args)
Register multiple key-value pairs in one call.
static void set(EnumType key, const char *filepath)
Register an asset file path.
Lightweight polymorphic base for all Theme structs.