Loading...
Searching...
No Matches
Go to the documentation of this file.
28#define PT_UNWRAP_TILESET_CONFIG_PTR_AS(var, ptr, config, tileset_name, return_type) \
29 auto var##_result = ptr->config(ConfigScopeType::tileset, tileset_name); \
30 if (!var##_result.has_value()) { \
31 return ChainableResult<return_type>{ \
33 "Failed to get config value '{}:{}:{}'.", \
34 FormatParam{"tileset", Style::bold}, \
35 FormatParam{tileset_name, Style::bold}, \
36 FormatParam{#config, Style::bold}}, \
39 auto var = std::move(var##_result).value();
55#define PT_UNWRAP_TILESET_CONFIG_PTR(ptr, config, tileset_name, return_type) \
56 PT_UNWRAP_TILESET_CONFIG_PTR_AS(config, ptr, config, tileset_name, return_type)
79#define PT_UNWRAP_TILESET_CONFIG_REF_AS(var, ref, config, tileset_name, return_type) \
80 auto var##_result = ref.config(ConfigScopeType::tileset, tileset_name); \
81 if (!var##_result.has_value()) { \
82 return ChainableResult<return_type>{ \
84 "Failed to get config value '{}:{}:{}'.", \
85 FormatParam{"tileset", Style::bold}, \
86 FormatParam{tileset_name, Style::bold}, \
87 FormatParam{#config, Style::bold}}, \
90 auto var = std::move(var##_result).value();
106#define PT_UNWRAP_TILESET_CONFIG_REF(ref, config, tileset_name, return_type) \
107 PT_UNWRAP_TILESET_CONFIG_REF_AS(config, ref, config, tileset_name, return_type)
128#define PT_UNWRAP_LAYOUT_CONFIG_AS(var, ptr, config, layout_name, return_type) \
129 auto var##_result = ptr->config(ConfigScopeType::layout, layout_name); \
130 if (!var##_result.has_value()) { \
131 return ChainableResult<return_type>{ \
133 "Failed to get config value '{}:{}:{}'.", \
134 FormatParam{"layout", Style::bold}, \
135 FormatParam{layout_name, Style::bold}, \
136 FormatParam{#config, Style::bold}}, \
139 auto var = std::move(var##_result).value();
155#define PT_UNWRAP_LAYOUT_CONFIG(ptr, config, layout_name, return_type) \
156 PT_UNWRAP_LAYOUT_CONFIG_AS(config, ptr, config, layout_name, return_type)