28void dump_single_config_value(
30 const TextFormatter &format,
31 const std::string &canonical_name,
32 const std::vector<ProvenanceChainLink<T>> &chain)
35 out << format.style(canonical_name,
Style::bold) <<
"\n";
36 out << format.style(std::string(canonical_name.size(),
'-'),
Style::faint) <<
"\n";
39 const ProvenanceChainLink<T> *winning_link =
nullptr;
40 for (
const auto &link : chain) {
49 ConfigValue<T> config_value{
50 winning_link->layer_value.value.value(),
52 winning_link->layer_value.source_key,
53 winning_link->layer_value.source_info,
54 winning_link->layer_value.source_details};
56 for (
const auto &line : note_lines) {
57 out <<
" " << line <<
"\n";
61 out <<
" " << format.style(
"INVALID: " + winning_link->layer_value.error_message,
Style::red) <<
"\n";
64 out <<
" " << format.style(
"(no value found)",
Style::faint) <<
"\n";
68 out <<
"\n " << format.style(
"Provider Chain:",
Style::faint) <<
"\n";
69 for (
const auto &link : chain) {
70 switch (link.layer_value.state) {
72 if (&link == winning_link) {
73 out <<
" " << format.style(
"✓",
Style::green) <<
" " << link.provider_name;
74 out <<
" = " << format.style(std::format(
"{}", link.layer_value.value.value()),
Style::green);
79 link.provider_name +
" = " + std::format(
"{}", link.layer_value.value.value()),
84 out <<
" " << format.style(
"✗",
Style::red) <<
" " << link.provider_name;
85 out <<
" " << format.style(
"INVALID",
Style::red);
89 << format.style(link.provider_name +
" (not provided)",
Style::faint);
101 providers_.insert(providers_.begin(), std::move(
provider));
103 cache_value_strings_.clear();
106 source_details_.clear();
111 const std::string header_str =
"Configuration dump for {} '{}'";
113 std::string header = std::vformat(header_str, std::make_format_args(type_str, scope));
118 dump_single_config_value(
121 dump_single_config_value(
123 dump_single_config_value(
125 dump_single_config_value(
127 dump_single_config_value(
130 dump_single_config_value(
132 dump_single_config_value(
134 dump_single_config_value(
138 dump_single_config_value(
142 dump_single_config_value(
145 dump_single_config_value(
148 dump_single_config_value(
151 "Global Animation Palette Resolution Strategy",
153 dump_single_config_value(
156 "Global Animation Key Frame Resolution Strategy",
158 dump_single_config_value(
161 "Global Animation Multi-Palette Subtile Resolution Strategy",
164 dump_single_config_value(
166 dump_single_config_value(
170 dump_single_config_value(
172 dump_single_config_value(
174 dump_single_config_value(
176 dump_single_config_value(
178 dump_single_config_value(
180 dump_single_config_value(
182 dump_single_config_value(
184 dump_single_config_value(
186 dump_single_config_value(
188 dump_single_config_value(
190 dump_single_config_value(
193 "Metatile Attribute Declaration Size",
195 dump_single_config_value(
197 dump_single_config_value(
200 "Metatile Attribute Field Overrides",
203 dump_single_config_value(
206 "Tileset Animations Wire Anim Code",
212 const std::string &cache_key,
213 const std::string &canonical_name,
217 if (cache_.contains(cache_key)) {
220 cached_value = std::any_cast<T>(cache_.at(cache_key));
222 catch (
const std::bad_any_cast &) {
224 "bad_any_cast for cache key '{}': cached type does not match requested type", cache_key));
226 std::string cached_source_key = source_key_.at(cache_key);
227 std::string source = source_.at(cache_key);
228 std::vector<std::string> source_details = source_details_.at(cache_key);
229 return ConfigValue<T>{cached_value, canonical_name, cached_source_key, source, source_details};
233 for (
const auto &
provider : providers_) {
234 LayerValue<T> layer_value = provider_call(*
provider);
238 const auto source_info = format_->
format(
"{}", layer_value.source_info);
239 std::vector<std::string> error_lines;
240 error_lines.push_back(format_->
format(
241 "Invalid value for '{}' from config source '{}':",
242 FormatParam{canonical_name, Style::bold},
243 FormatParam{source_info, Style::bold}));
244 error_lines.emplace_back();
245 error_lines.push_back(format_->
format(
"{}", layer_value.error_message));
247 if (!layer_value.source_details.empty()) {
248 error_lines.emplace_back(
"");
249 for (
const auto &detail : layer_value.source_details) {
250 error_lines.push_back(detail);
254 return FormattableError{error_lines};
259 T resolved_value = layer_value.value.value();
260 cache_[cache_key] = resolved_value;
261 cache_value_strings_[cache_key] = std::format(
"{}", resolved_value);
262 source_key_[cache_key] = layer_value.source_key;
263 std::string source = format_->
format(
"{}", layer_value.source_info);
264 source_[cache_key] = source;
265 source_details_[cache_key] = layer_value.source_details;
266 return ConfigValue<T>{
267 resolved_value, canonical_name, layer_value.source_key, source, layer_value.source_details};
275 panic(
"hit unexpected ValidationState");
279 panic(format_->
format(
"no value found for '{}' in any config layer", cache_key));
283std::vector<ProvenanceChainLink<T>>
284LazyLayeredConfig::collect_provenance_chain(std::function<LayerValue<T>(
const ConfigProvider &)> provider_call)
const
286 std::vector<ProvenanceChainLink<T>> chain;
287 chain.reserve(providers_.size());
289 for (
const auto &
provider : providers_) {
290 LayerValue<T> layer_value = provider_call(*
provider);
291 chain.push_back(ProvenanceChainLink<T>{
provider->name(), std::move(layer_value)});
297ChainableResult<ConfigValue<std::size_t>>
302 const auto base_name =
name.substr(0,
name.size() - 4);
303 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
304 return resolve_config_value<std::size_t>(
306 return provider.num_tiles_in_primary(type, scope);
315 const auto base_name =
name.substr(0,
name.size() - 4);
316 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
317 return resolve_config_value<std::size_t>(
319 return provider.num_tiles_total(type, scope);
328 const auto base_name =
name.substr(0,
name.size() - 4);
329 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
330 return resolve_config_value<std::size_t>(
332 return provider.num_metatiles_in_primary(type, scope);
341 const auto base_name =
name.substr(0,
name.size() - 4);
342 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
343 return resolve_config_value<std::size_t>(
345 return provider.num_metatiles_total(type, scope);
354 const auto base_name =
name.substr(0,
name.size() - 4);
355 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
356 return resolve_config_value<std::size_t>(
358 return provider.num_palettes_in_primary(type, scope);
367 const auto base_name =
name.substr(0,
name.size() - 4);
368 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
369 return resolve_config_value<std::size_t>(
371 return provider.num_palettes_total(type, scope);
380 const auto base_name =
name.substr(0,
name.size() - 4);
381 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
382 return resolve_config_value<std::size_t>(key,
"Max Map Data Size", [&type, &scope](
const ConfigProvider &
provider) {
383 return provider.max_map_data_size(type, scope);
392 const auto base_name =
name.substr(0,
name.size() - 4);
393 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
394 return resolve_config_value<std::size_t>(
396 return provider.num_tiles_per_metatile(type, scope);
405 const auto base_name =
name.substr(0,
name.size() - 4);
406 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
407 return resolve_config_value<Rgba32>(key,
"Extrinsic Transparency", [&type, &scope](
const ConfigProvider &
provider) {
408 return provider.extrinsic_transparency(type, scope);
417 const auto base_name =
name.substr(0,
name.size() - 4);
418 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
419 return resolve_config_value<bool>(
421 return provider.ignore_triple_layer_content(type, scope);
430 const auto base_name =
name.substr(0,
name.size() - 4);
431 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
432 return resolve_config_value<ArtifactEditMode>(
434 return provider.tiles_edit_mode(type, scope);
443 const auto base_name =
name.substr(0,
name.size() - 4);
444 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
445 return resolve_config_value<ArtifactEditMode>(
447 return provider.palettes_edit_mode(type, scope);
456 const auto base_name =
name.substr(0,
name.size() - 4);
457 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
458 return resolve_config_value<bool>(key,
"Palette Hints Enabled", [&type, &scope](
const ConfigProvider &
provider) {
459 return provider.palette_hints_enabled(type, scope);
468 const auto base_name =
name.substr(0,
name.size() - 4);
469 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
470 return resolve_config_value<std::vector<PaletteHint>>(
472 return provider.palette_hints(type, scope);
481 const auto base_name =
name.substr(0,
name.size() - 4);
482 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
483 return resolve_config_value<PackingStrategyType>(
485 return provider.packing_strategy(type, scope);
494 const auto base_name =
name.substr(0,
name.size() - 4);
495 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
496 return resolve_config_value<PackingStrategyParams>(
498 return provider.packing_strategy_params(type, scope);
507 const auto base_name =
name.substr(0,
name.size() - 4);
508 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
509 return resolve_config_value<TileSharingPacking>(
511 return provider.tile_sharing_packing(type, scope);
520 const auto base_name =
name.substr(0,
name.size() - 4);
521 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
522 return resolve_config_value<TileSharingAlignment>(
524 return provider.tile_sharing_alignment(type, scope);
533 const auto base_name =
name.substr(0,
name.size() - 4);
534 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
535 return resolve_config_value<TilesPaletteMode>(
537 return provider.tiles_palette_mode(type, scope);
546 const auto base_name =
name.substr(0,
name.size() - 4);
547 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
548 return resolve_config_value<AnimPaletteResolutionStrategy>(
550 return provider.global_anim_palette_resolution_strategy(type, scope);
559 const auto base_name =
name.substr(0,
name.size() - 4);
560 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
561 return resolve_config_value<AnimKeyFrameResolutionStrategy>(
563 return provider.global_anim_key_frame_resolution_strategy(type, scope);
573 const auto base_name =
name.substr(0,
name.size() - 4);
574 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
575 return resolve_config_value<AnimMultiPaletteSubtileResolutionStrategy>(
577 "Global Animation Multi-Palette Subtile Resolution Strategy",
579 return provider.global_anim_multi_palette_subtile_resolution_strategy(type, scope);
588 const auto base_name =
name.substr(0,
name.size() - 4);
589 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
590 return resolve_config_value<FrameLinking>(
592 return provider.global_frame_linking(type, scope);
601 const auto base_name =
name.substr(0,
name.size() - 4);
602 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
603 return resolve_config_value<PerAnimOverrides>(
605 return provider.per_anim_overrides(type, scope);
614 const auto base_name =
name.substr(0,
name.size() - 4);
615 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
616 return resolve_config_value<bool>(
618 return provider.cross_tileset_anim_linking(type, scope);
627 const auto base_name =
name.substr(0,
name.size() - 4);
628 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
629 return resolve_config_value<bool>(key,
"Verify Checksums", [&type, &scope](
const ConfigProvider &
provider) {
630 return provider.verify_checksums(type, scope);
639 const auto base_name =
name.substr(0,
name.size() - 4);
640 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
641 return resolve_config_value<PrimaryPairingMode>(
643 return provider.primary_pairing_mode(type, scope);
652 const auto base_name =
name.substr(0,
name.size() - 4);
653 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
654 return resolve_config_value<std::vector<std::string>>(
656 return provider.primary_pairing_partners(type, scope);
665 const auto base_name =
name.substr(0,
name.size() - 4);
666 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
667 return resolve_config_value<std::vector<std::string>>(
669 return provider.diagnostic_warnings_exclude(type, scope);
678 const auto base_name =
name.substr(0,
name.size() - 4);
679 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
680 return resolve_config_value<std::vector<std::string>>(
682 return provider.diagnostic_warnings_include(type, scope);
691 const auto base_name =
name.substr(0,
name.size() - 4);
692 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
693 return resolve_config_value<std::vector<std::string>>(
695 return provider.diagnostic_remarks_exclude(type, scope);
704 const auto base_name =
name.substr(0,
name.size() - 4);
705 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
706 return resolve_config_value<std::vector<std::string>>(
708 return provider.diagnostic_remarks_include(type, scope);
717 const auto base_name =
name.substr(0,
name.size() - 4);
718 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
719 return resolve_config_value<std::string>(
721 return provider.tileset_paths_primary_src(type, scope);
730 const auto base_name =
name.substr(0,
name.size() - 4);
731 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
732 return resolve_config_value<std::string>(
734 return provider.tileset_paths_primary_bin(type, scope);
743 const auto base_name =
name.substr(0,
name.size() - 4);
744 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
745 return resolve_config_value<std::string>(
747 return provider.tileset_paths_secondary_src(type, scope);
756 const auto base_name =
name.substr(0,
name.size() - 4);
757 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
758 return resolve_config_value<std::string>(
760 return provider.tileset_paths_secondary_bin(type, scope);
769 const auto base_name =
name.substr(0,
name.size() - 4);
770 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
771 return resolve_config_value<std::optional<std::size_t>>(
773 return provider.metatile_attribute_size(type, scope);
782 const auto base_name =
name.substr(0,
name.size() - 4);
783 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
784 return resolve_config_value<std::optional<std::size_t>>(
786 return provider.metatile_attribute_declaration_size(type, scope);
795 const auto base_name =
name.substr(0,
name.size() - 4);
796 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
797 return resolve_config_value<MetatileAttributeFieldDefinitions>(
799 return provider.metatile_attribute_fields(type, scope);
808 const auto base_name =
name.substr(0,
name.size() - 4);
809 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
810 return resolve_config_value<MetatileAttributeFieldOverrides>(
812 return provider.metatile_attribute_field_overrides(type, scope);
821 const auto base_name =
name.substr(0,
name.size() - 4);
822 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
823 return resolve_config_value<RolePinDefinitions>(
832 const auto base_name =
name.substr(0,
name.size() - 4);
833 const auto key =
to_string(type) +
":" + scope +
":" + base_name;
834 return resolve_config_value<bool>(
836 return provider.tileset_animations_wire_anim_code(type, scope);
840std::vector<ProvenanceChainLink<std::size_t>>
843 return collect_provenance_chain<std::size_t>(
847std::vector<ProvenanceChainLink<std::size_t>>
850 return collect_provenance_chain<std::size_t>(
854std::vector<ProvenanceChainLink<std::size_t>>
857 return collect_provenance_chain<std::size_t>(
861std::vector<ProvenanceChainLink<std::size_t>>
864 return collect_provenance_chain<std::size_t>(
868std::vector<ProvenanceChainLink<std::size_t>>
871 return collect_provenance_chain<std::size_t>(
875std::vector<ProvenanceChainLink<std::size_t>>
878 return collect_provenance_chain<std::size_t>(
882std::vector<ProvenanceChainLink<std::size_t>>
885 return collect_provenance_chain<std::size_t>(
889std::vector<ProvenanceChainLink<std::size_t>>
892 return collect_provenance_chain<std::size_t>(
896std::vector<ProvenanceChainLink<Rgba32>>
899 return collect_provenance_chain<Rgba32>(
903std::vector<ProvenanceChainLink<bool>>
906 return collect_provenance_chain<bool>(
910std::vector<ProvenanceChainLink<ArtifactEditMode>>
913 return collect_provenance_chain<ArtifactEditMode>(
917std::vector<ProvenanceChainLink<ArtifactEditMode>>
920 return collect_provenance_chain<ArtifactEditMode>(
924std::vector<ProvenanceChainLink<bool>>
927 return collect_provenance_chain<bool>(
931std::vector<ProvenanceChainLink<std::vector<PaletteHint>>>
934 return collect_provenance_chain<std::vector<PaletteHint>>(
938std::vector<ProvenanceChainLink<PackingStrategyType>>
941 return collect_provenance_chain<PackingStrategyType>(
945std::vector<ProvenanceChainLink<PackingStrategyParams>>
948 return collect_provenance_chain<PackingStrategyParams>(
952std::vector<ProvenanceChainLink<TileSharingPacking>>
955 return collect_provenance_chain<TileSharingPacking>(
959std::vector<ProvenanceChainLink<TileSharingAlignment>>
962 return collect_provenance_chain<TileSharingAlignment>(
966std::vector<ProvenanceChainLink<TilesPaletteMode>>
969 return collect_provenance_chain<TilesPaletteMode>(
973std::vector<ProvenanceChainLink<AnimPaletteResolutionStrategy>>
977 return collect_provenance_chain<AnimPaletteResolutionStrategy>([&type, &scope](
const ConfigProvider &
provider) {
978 return provider.global_anim_palette_resolution_strategy(type, scope);
982std::vector<ProvenanceChainLink<AnimKeyFrameResolutionStrategy>>
986 return collect_provenance_chain<AnimKeyFrameResolutionStrategy>([&type, &scope](
const ConfigProvider &
provider) {
987 return provider.global_anim_key_frame_resolution_strategy(type, scope);
991std::vector<ProvenanceChainLink<AnimMultiPaletteSubtileResolutionStrategy>>
995 return collect_provenance_chain<AnimMultiPaletteSubtileResolutionStrategy>(
997 return provider.global_anim_multi_palette_subtile_resolution_strategy(type, scope);
1001std::vector<ProvenanceChainLink<FrameLinking>>
1004 return collect_provenance_chain<FrameLinking>(
1008std::vector<ProvenanceChainLink<PerAnimOverrides>>
1011 return collect_provenance_chain<PerAnimOverrides>(
1015std::vector<ProvenanceChainLink<bool>>
1018 return collect_provenance_chain<bool>(
1022std::vector<ProvenanceChainLink<bool>>
1025 return collect_provenance_chain<bool>(
1029std::vector<ProvenanceChainLink<PrimaryPairingMode>>
1032 return collect_provenance_chain<PrimaryPairingMode>(
1036std::vector<ProvenanceChainLink<std::vector<std::string>>>
1039 return collect_provenance_chain<std::vector<std::string>>(
1043std::vector<ProvenanceChainLink<std::vector<std::string>>>
1046 return collect_provenance_chain<std::vector<std::string>>(
1050std::vector<ProvenanceChainLink<std::vector<std::string>>>
1053 return collect_provenance_chain<std::vector<std::string>>(
1057std::vector<ProvenanceChainLink<std::vector<std::string>>>
1060 return collect_provenance_chain<std::vector<std::string>>(
1064std::vector<ProvenanceChainLink<std::vector<std::string>>>
1067 return collect_provenance_chain<std::vector<std::string>>(
1071std::vector<ProvenanceChainLink<std::string>>
1074 return collect_provenance_chain<std::string>(
1078std::vector<ProvenanceChainLink<std::string>>
1081 return collect_provenance_chain<std::string>(
1085std::vector<ProvenanceChainLink<std::string>>
1088 return collect_provenance_chain<std::string>(
1092std::vector<ProvenanceChainLink<std::string>>
1095 return collect_provenance_chain<std::string>(
1099std::vector<ProvenanceChainLink<std::optional<std::size_t>>>
1102 return collect_provenance_chain<std::optional<std::size_t>>(
1106std::vector<ProvenanceChainLink<std::optional<std::size_t>>>
1110 return collect_provenance_chain<std::optional<std::size_t>>([&type, &scope](
const ConfigProvider &
provider) {
1111 return provider.metatile_attribute_declaration_size(type, scope);
1115std::vector<ProvenanceChainLink<MetatileAttributeFieldDefinitions>>
1118 return collect_provenance_chain<MetatileAttributeFieldDefinitions>(
1122std::vector<ProvenanceChainLink<MetatileAttributeFieldOverrides>>
1126 return collect_provenance_chain<MetatileAttributeFieldOverrides>([&type, &scope](
const ConfigProvider &
provider) {
1127 return provider.metatile_attribute_field_overrides(type, scope);
1131std::vector<ProvenanceChainLink<RolePinDefinitions>>
1134 return collect_provenance_chain<RolePinDefinitions>(
1142 return provider.tileset_animations_wire_anim_code(type, scope);
A result type that maintains a chainable sequence of errors for debugging and error reporting.
An interface which config implementations can use to load config values.
ChainableResult< ConfigValue< std::vector< std::string > > > diagnostic_warnings_exclude_raw(ConfigScopeType type, const std::string &scope) const override
std::vector< ProvenanceChainLink< RolePinDefinitions > > role_pins_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for role_pins.
std::vector< ProvenanceChainLink< std::string > > tileset_paths_primary_src_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for tileset_paths_primary_src.
std::vector< ProvenanceChainLink< bool > > tileset_animations_wire_anim_code_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for tileset_animations_wire_anim_code.
ChainableResult< ConfigValue< std::size_t > > num_palettes_total_raw(ConfigScopeType type, const std::string &scope) const override
std::vector< ProvenanceChainLink< AnimPaletteResolutionStrategy > > global_anim_palette_resolution_strategy_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for global_anim_palette_resolution_strategy.
ChainableResult< ConfigValue< std::vector< PaletteHint > > > palette_hints_raw(ConfigScopeType type, const std::string &scope) const override
ChainableResult< ConfigValue< std::string > > tileset_paths_primary_bin_raw(ConfigScopeType type, const std::string &scope) const override
ChainableResult< ConfigValue< AnimMultiPaletteSubtileResolutionStrategy > > global_anim_multi_palette_subtile_resolution_strategy_raw(ConfigScopeType type, const std::string &scope) const override
std::vector< ProvenanceChainLink< bool > > verify_checksums_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for verify_checksums.
ChainableResult< ConfigValue< AnimPaletteResolutionStrategy > > global_anim_palette_resolution_strategy_raw(ConfigScopeType type, const std::string &scope) const override
std::vector< ProvenanceChainLink< FrameLinking > > global_frame_linking_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for global_frame_linking.
std::vector< ProvenanceChainLink< std::vector< std::string > > > diagnostic_remarks_exclude_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for diagnostic_remarks_exclude.
std::vector< ProvenanceChainLink< AnimMultiPaletteSubtileResolutionStrategy > > global_anim_multi_palette_subtile_resolution_strategy_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for global_anim_multi_palette_subtile_resolution_strategy.
ChainableResult< ConfigValue< std::size_t > > num_metatiles_total_raw(ConfigScopeType type, const std::string &scope) const override
std::vector< ProvenanceChainLink< std::vector< std::string > > > primary_pairing_partners_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for primary_pairing_partners.
ChainableResult< ConfigValue< ArtifactEditMode > > palettes_edit_mode_raw(ConfigScopeType type, const std::string &scope) const override
std::vector< ProvenanceChainLink< std::size_t > > max_map_data_size_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for max_map_data_size.
ChainableResult< ConfigValue< FrameLinking > > global_frame_linking_raw(ConfigScopeType type, const std::string &scope) const override
ChainableResult< ConfigValue< std::size_t > > num_tiles_total_raw(ConfigScopeType type, const std::string &scope) const override
std::vector< ProvenanceChainLink< std::size_t > > num_palettes_in_primary_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for num_palettes_in_primary.
ChainableResult< ConfigValue< MetatileAttributeFieldOverrides > > metatile_attribute_field_overrides_raw(ConfigScopeType type, const std::string &scope) const override
ChainableResult< ConfigValue< std::string > > tileset_paths_secondary_bin_raw(ConfigScopeType type, const std::string &scope) const override
std::vector< ProvenanceChainLink< TileSharingPacking > > tile_sharing_packing_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for tile_sharing_packing.
ChainableResult< ConfigValue< PerAnimOverrides > > per_anim_overrides_raw(ConfigScopeType type, const std::string &scope) const override
ChainableResult< ConfigValue< PackingStrategyParams > > packing_strategy_params_raw(ConfigScopeType type, const std::string &scope) const override
ChainableResult< ConfigValue< Rgba32 > > extrinsic_transparency_raw(ConfigScopeType type, const std::string &scope) const override
std::vector< ProvenanceChainLink< std::size_t > > num_palettes_total_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for num_palettes_total.
ChainableResult< ConfigValue< std::vector< std::string > > > diagnostic_remarks_include_raw(ConfigScopeType type, const std::string &scope) const override
ChainableResult< ConfigValue< std::optional< std::size_t > > > metatile_attribute_size_raw(ConfigScopeType type, const std::string &scope) const override
ChainableResult< ConfigValue< std::optional< std::size_t > > > metatile_attribute_declaration_size_raw(ConfigScopeType type, const std::string &scope) const override
std::vector< ProvenanceChainLink< std::vector< std::string > > > diagnostic_warnings_exclude_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for diagnostic_warnings_exclude.
std::vector< ProvenanceChainLink< TilesPaletteMode > > tiles_palette_mode_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for tiles_palette_mode.
ChainableResult< ConfigValue< bool > > cross_tileset_anim_linking_raw(ConfigScopeType type, const std::string &scope) const override
std::vector< ProvenanceChainLink< Rgba32 > > extrinsic_transparency_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for extrinsic_transparency.
std::vector< ProvenanceChainLink< std::size_t > > num_metatiles_in_primary_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for num_metatiles_in_primary.
ChainableResult< ConfigValue< std::size_t > > num_metatiles_in_primary_raw(ConfigScopeType type, const std::string &scope) const override
std::vector< ProvenanceChainLink< std::size_t > > num_tiles_in_primary_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for num_tiles_in_primary.
std::vector< ProvenanceChainLink< bool > > palette_hints_enabled_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for palette_hints_enabled.
std::vector< ProvenanceChainLink< std::vector< std::string > > > diagnostic_warnings_include_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for diagnostic_warnings_include.
ChainableResult< ConfigValue< bool > > palette_hints_enabled_raw(ConfigScopeType type, const std::string &scope) const override
std::vector< ProvenanceChainLink< std::string > > tileset_paths_secondary_src_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for tileset_paths_secondary_src.
ChainableResult< ConfigValue< std::size_t > > num_tiles_in_primary_raw(ConfigScopeType type, const std::string &scope) const override
ChainableResult< ConfigValue< std::size_t > > num_tiles_per_metatile_raw(ConfigScopeType type, const std::string &scope) const override
ChainableResult< ConfigValue< std::vector< std::string > > > diagnostic_remarks_exclude_raw(ConfigScopeType type, const std::string &scope) const override
ChainableResult< ConfigValue< bool > > ignore_triple_layer_content_raw(ConfigScopeType type, const std::string &scope) const override
ChainableResult< ConfigValue< PackingStrategyType > > packing_strategy_raw(ConfigScopeType type, const std::string &scope) const override
std::vector< ProvenanceChainLink< std::size_t > > num_tiles_per_metatile_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for num_tiles_per_metatile.
std::vector< ProvenanceChainLink< PerAnimOverrides > > per_anim_overrides_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for per_anim_overrides.
std::vector< ProvenanceChainLink< ArtifactEditMode > > tiles_edit_mode_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for tiles_edit_mode.
std::vector< ProvenanceChainLink< AnimKeyFrameResolutionStrategy > > global_anim_key_frame_resolution_strategy_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for global_anim_key_frame_resolution_strategy.
std::vector< ProvenanceChainLink< std::optional< std::size_t > > > metatile_attribute_declaration_size_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for metatile_attribute_declaration_size.
ChainableResult< ConfigValue< MetatileAttributeFieldDefinitions > > metatile_attribute_fields_raw(ConfigScopeType type, const std::string &scope) const override
std::vector< ProvenanceChainLink< ArtifactEditMode > > palettes_edit_mode_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for palettes_edit_mode.
ChainableResult< ConfigValue< bool > > verify_checksums_raw(ConfigScopeType type, const std::string &scope) const override
std::vector< ProvenanceChainLink< bool > > cross_tileset_anim_linking_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for cross_tileset_anim_linking.
std::vector< ProvenanceChainLink< std::vector< PaletteHint > > > palette_hints_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for palette_hints.
std::vector< ProvenanceChainLink< std::optional< std::size_t > > > metatile_attribute_size_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for metatile_attribute_size.
std::vector< ProvenanceChainLink< bool > > ignore_triple_layer_content_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for ignore_triple_layer_content.
std::vector< ProvenanceChainLink< std::size_t > > num_metatiles_total_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for num_metatiles_total.
std::vector< ProvenanceChainLink< std::vector< std::string > > > diagnostic_remarks_include_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for diagnostic_remarks_include.
ChainableResult< ConfigValue< TilesPaletteMode > > tiles_palette_mode_raw(ConfigScopeType type, const std::string &scope) const override
std::vector< ProvenanceChainLink< TileSharingAlignment > > tile_sharing_alignment_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for tile_sharing_alignment.
ChainableResult< ConfigValue< TileSharingPacking > > tile_sharing_packing_raw(ConfigScopeType type, const std::string &scope) const override
ChainableResult< ConfigValue< PrimaryPairingMode > > primary_pairing_mode_raw(ConfigScopeType type, const std::string &scope) const override
ChainableResult< ConfigValue< std::size_t > > num_palettes_in_primary_raw(ConfigScopeType type, const std::string &scope) const override
ChainableResult< ConfigValue< RolePinDefinitions > > role_pins_raw(ConfigScopeType type, const std::string &scope) const override
ChainableResult< ConfigValue< bool > > tileset_animations_wire_anim_code_raw(ConfigScopeType type, const std::string &scope) const override
std::vector< ProvenanceChainLink< PrimaryPairingMode > > primary_pairing_mode_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for primary_pairing_mode.
std::vector< ProvenanceChainLink< std::string > > tileset_paths_secondary_bin_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for tileset_paths_secondary_bin.
std::vector< ProvenanceChainLink< std::size_t > > num_tiles_total_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for num_tiles_total.
ChainableResult< ConfigValue< std::string > > tileset_paths_primary_src_raw(ConfigScopeType type, const std::string &scope) const override
ChainableResult< ConfigValue< std::vector< std::string > > > diagnostic_warnings_include_raw(ConfigScopeType type, const std::string &scope) const override
void dump_config(std::ostream &out, ConfigScopeType type, const std::string &scope) const
Dumps the full provenance chain for all config values to an output stream.
void add_provider(std::unique_ptr< ConfigProvider > provider) override
Prepends a ConfigProvider to the provider chain at highest priority and invalidates resolution caches...
std::vector< ProvenanceChainLink< MetatileAttributeFieldOverrides > > metatile_attribute_field_overrides_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for metatile_attribute_field_overrides.
ChainableResult< ConfigValue< std::vector< std::string > > > primary_pairing_partners_raw(ConfigScopeType type, const std::string &scope) const override
ChainableResult< ConfigValue< TileSharingAlignment > > tile_sharing_alignment_raw(ConfigScopeType type, const std::string &scope) const override
ChainableResult< ConfigValue< std::size_t > > max_map_data_size_raw(ConfigScopeType type, const std::string &scope) const override
std::vector< ProvenanceChainLink< std::string > > tileset_paths_primary_bin_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for tileset_paths_primary_bin.
std::vector< ProvenanceChainLink< PackingStrategyType > > packing_strategy_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for packing_strategy.
ChainableResult< ConfigValue< std::string > > tileset_paths_secondary_src_raw(ConfigScopeType type, const std::string &scope) const override
ChainableResult< ConfigValue< AnimKeyFrameResolutionStrategy > > global_anim_key_frame_resolution_strategy_raw(ConfigScopeType type, const std::string &scope) const override
std::vector< ProvenanceChainLink< PackingStrategyParams > > packing_strategy_params_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for packing_strategy_params.
std::vector< ProvenanceChainLink< MetatileAttributeFieldDefinitions > > metatile_attribute_fields_provenance_chain(ConfigScopeType type, const std::string &scope) const
Gets the full provenance chain for metatile_attribute_fields.
ChainableResult< ConfigValue< ArtifactEditMode > > tiles_edit_mode_raw(ConfigScopeType type, const std::string &scope) const override
static const Style faint
Faint text formatting.
static const Style red
Red foreground color.
static const Style cyan
Cyan foreground color.
static const Style bold
Bold text formatting.
static const Style green
Green foreground color.
virtual std::string style(const std::string &text, Style styles) const =0
Applies styling to a text string.
virtual std::string format(const std::string &format_str, const std::vector< FormatParam > ¶ms) const
Formats a string with styled parameters using fmtlib syntax.
void panic(const StringViewSourceLoc &s)
Unconditionally terminates the program with a panic message.
std::string extract_function_name(const std::source_location &location=std::source_location::current())
Extracts the function name from a source location.
std::vector< std::string > format_config_note(const TextFormatter &format, const ConfigValue< T > &config)
Format a ConfigValue into diagnostic note lines.
ConfigScopeType
Specifies the scope type for configuration value lookups.
std::string to_string(const PrimaryPairingMode m)
Converts a PrimaryPairingMode to its canonical string representation.
A small container that holds an optional-wrapped value, validation state, and metadata about the valu...