Porytiles
Loading...
Searching...
No Matches
cli_option_provider.cpp
Go to the documentation of this file.
2
4
5// NOTE: DO NOT EDIT THIS FILE DIRECTLY. It is AUTO-GENERATED from config_schema.yaml.
6// To add new config values or make other changes, edit config_schema.yaml and regenerate via:
7//
8// uv run scripts/generate_config.py
9
10namespace porytiles {
11
12CliOptionProvider::CliOptionProvider(const CliOptionStorage &storage) : storage_{storage} {}
13
14std::string CliOptionProvider::name() const
15{
16 return "CliOptionProvider";
17}
18
20 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
21{
22 // All types use parse functions for uniform error handling
23 return parse_size_t(storage_.num_tiles_in_primary, "--num-tiles-in-primary");
24}
25
27 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
28{
29 // All types use parse functions for uniform error handling
30 return parse_size_t(storage_.num_tiles_total, "--num-tiles-total");
31}
32
34 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
35{
36 // All types use parse functions for uniform error handling
37 return parse_size_t(storage_.num_metatiles_in_primary, "--num-metatiles-in-primary");
38}
39
41 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
42{
43 // All types use parse functions for uniform error handling
44 return parse_size_t(storage_.num_metatiles_total, "--num-metatiles-total");
45}
46
48 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
49{
50 // All types use parse functions for uniform error handling
51 return parse_size_t(storage_.num_palettes_in_primary, "--num-pals-in-primary");
52}
53
55 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
56{
57 // All types use parse functions for uniform error handling
58 return parse_size_t(storage_.num_palettes_total, "--num-pals-total");
59}
60
62 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
63{
64 // All types use parse functions for uniform error handling
65 return parse_size_t(storage_.max_map_data_size, "--max-map-data-size");
66}
67
69 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
70{
71 // All types use parse functions for uniform error handling
72 return parse_size_t(storage_.num_tiles_per_metatile, "--num-tiles-per-metatile");
73}
74
76 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
77{
78 // All types use parse functions for uniform error handling
79 return parse_rgba32(storage_.extrinsic_transparency, "--extrinsic-transparency");
80}
81
83 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
84{
85 // All types use parse functions for uniform error handling
86 return parse_bool(storage_.ignore_triple_layer_content, "--ignore-triple-layer-content");
87}
88
90 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
91{
92 // All types use parse functions for uniform error handling
93 return parse_artifact_edit_mode(storage_.tiles_edit_mode, "--tiles-edit-mode");
94}
95
97 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
98{
99 // All types use parse functions for uniform error handling
100 return parse_artifact_edit_mode(storage_.palettes_edit_mode, "--pals-edit-mode");
101}
102
104 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
105{
106 // All types use parse functions for uniform error handling
107 return parse_bool(storage_.palette_hints_enabled, "--pal-hints-enabled");
108}
109
111 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
112{
113 // All types use parse functions for uniform error handling
114 return parse_packing_strategy_type(storage_.packing_strategy, "--packing-strategy");
115}
116
118 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
119{
120 // All types use parse functions for uniform error handling
121 return parse_tile_sharing_packing(storage_.tile_sharing_packing, "--tile-sharing-packing");
122}
123
125 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
126{
127 // All types use parse functions for uniform error handling
128 return parse_tile_sharing_alignment(storage_.tile_sharing_alignment, "--tile-sharing-alignment");
129}
130
132 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
133{
134 // All types use parse functions for uniform error handling
135 return parse_tiles_palette_mode(storage_.tiles_palette_mode, "--tiles-pal-mode");
136}
137
139 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
140{
141 // All types use parse functions for uniform error handling
142 return parse_anim_palette_resolution_strategy(
143 storage_.global_anim_palette_resolution_strategy, "--anim-pal-resolution-strategy");
144}
145
147 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
148{
149 // All types use parse functions for uniform error handling
150 return parse_anim_key_frame_resolution_strategy(
151 storage_.global_anim_key_frame_resolution_strategy, "--anim-key-frame-resolution-strategy");
152}
153
156 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
157{
158 // All types use parse functions for uniform error handling
159 return parse_anim_multi_palette_subtile_resolution_strategy(
160 storage_.global_anim_multi_palette_subtile_resolution_strategy, "--anim-multi-pal-subtile-resolution-strategy");
161}
162
164 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
165{
166 // All types use parse functions for uniform error handling
167 return parse_frame_linking(storage_.global_frame_linking, "--frame-linking");
168}
169
171 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
172{
173 // All types use parse functions for uniform error handling
174 return parse_bool(storage_.cross_tileset_anim_linking, "--cross-tileset-anim-linking");
175}
176
178 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
179{
180 // All types use parse functions for uniform error handling
181 return parse_bool(storage_.verify_checksums, "--verify-checksums");
182}
183
185 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
186{
187 // All types use parse functions for uniform error handling
188 return parse_primary_pairing_mode(storage_.primary_pairing_mode, "--primary-pairing-mode");
189}
190
192 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
193{
194 // All types use parse functions for uniform error handling
195 return parse_string_vector(storage_.primary_pairing_partners, "--primary-pairing-partners");
196}
197
199 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
200{
201 // All types use parse functions for uniform error handling
202 return parse_string_vector(storage_.diagnostic_warnings_exclude, "--diagnostic-warnings-exclude");
203}
204
206 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
207{
208 // All types use parse functions for uniform error handling
209 return parse_string_vector(storage_.diagnostic_warnings_include, "--diagnostic-warnings-include");
210}
211
213 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
214{
215 // All types use parse functions for uniform error handling
216 return parse_string_vector(storage_.diagnostic_remarks_exclude, "--diagnostic-remarks-exclude");
217}
218
220 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
221{
222 // All types use parse functions for uniform error handling
223 return parse_string_vector(storage_.diagnostic_remarks_include, "--diagnostic-remarks-include");
224}
225
227 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
228{
229 // All types use parse functions for uniform error handling
230 return parse_string(storage_.tileset_paths_primary_src, "--tileset-paths-primary-src");
231}
232
234 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
235{
236 // All types use parse functions for uniform error handling
237 return parse_string(storage_.tileset_paths_primary_bin, "--tileset-paths-primary-bin");
238}
239
241 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
242{
243 // All types use parse functions for uniform error handling
244 return parse_string(storage_.tileset_paths_secondary_src, "--tileset-paths-secondary-src");
245}
246
248 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
249{
250 // All types use parse functions for uniform error handling
251 return parse_string(storage_.tileset_paths_secondary_bin, "--tileset-paths-secondary-bin");
252}
253
255 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
256{
257 // All types use parse functions for uniform error handling
258 return parse_optional_size_t(storage_.metatile_attribute_size, "--metatile-attribute-size");
259}
260
262 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
263{
264 // All types use parse functions for uniform error handling
265 return parse_optional_size_t(storage_.metatile_attribute_declaration_size, "--metatile-attribute-declaration-size");
266}
267
269 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
270{
271 // All types use parse functions for uniform error handling
272 return parse_bool(storage_.tileset_animations_wire_anim_code, "--tileset-animations-wire-anim-code");
273}
274
275} // namespace porytiles
LayerValue< std::optional< std::size_t > > metatile_attribute_declaration_size(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::string > tileset_paths_secondary_bin(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::optional< std::size_t > > metatile_attribute_size(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::vector< std::string > > primary_pairing_partners(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::vector< std::string > > diagnostic_warnings_include(ConfigScopeType type, const std::string &scope) const override
LayerValue< AnimMultiPaletteSubtileResolutionStrategy > global_anim_multi_palette_subtile_resolution_strategy(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::vector< std::string > > diagnostic_remarks_exclude(ConfigScopeType type, const std::string &scope) const override
CliOptionProvider(const CliOptionStorage &storage)
LayerValue< AnimPaletteResolutionStrategy > global_anim_palette_resolution_strategy(ConfigScopeType type, const std::string &scope) const override
LayerValue< ArtifactEditMode > tiles_edit_mode(ConfigScopeType type, const std::string &scope) const override
LayerValue< TileSharingPacking > tile_sharing_packing(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::size_t > num_tiles_per_metatile(ConfigScopeType type, const std::string &scope) const override
LayerValue< bool > verify_checksums(ConfigScopeType type, const std::string &scope) const override
LayerValue< bool > ignore_triple_layer_content(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::size_t > num_metatiles_in_primary(ConfigScopeType type, const std::string &scope) const override
std::string name() const override
Gets the name of this ConfigProvider, useful for diagnostic purposes.
LayerValue< std::string > tileset_paths_secondary_src(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::string > tileset_paths_primary_src(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::size_t > num_palettes_total(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::size_t > num_palettes_in_primary(ConfigScopeType type, const std::string &scope) const override
LayerValue< Rgba32 > extrinsic_transparency(ConfigScopeType type, const std::string &scope) const override
LayerValue< ArtifactEditMode > palettes_edit_mode(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::size_t > num_tiles_total(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::vector< std::string > > diagnostic_remarks_include(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::vector< std::string > > diagnostic_warnings_exclude(ConfigScopeType type, const std::string &scope) const override
LayerValue< PrimaryPairingMode > primary_pairing_mode(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::size_t > max_map_data_size(ConfigScopeType type, const std::string &scope) const override
LayerValue< PackingStrategyType > packing_strategy(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::size_t > num_tiles_in_primary(ConfigScopeType type, const std::string &scope) const override
LayerValue< FrameLinking > global_frame_linking(ConfigScopeType type, const std::string &scope) const override
LayerValue< bool > palette_hints_enabled(ConfigScopeType type, const std::string &scope) const override
LayerValue< bool > tileset_animations_wire_anim_code(ConfigScopeType type, const std::string &scope) const override
LayerValue< TileSharingAlignment > tile_sharing_alignment(ConfigScopeType type, const std::string &scope) const override
LayerValue< AnimKeyFrameResolutionStrategy > global_anim_key_frame_resolution_strategy(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::string > tileset_paths_primary_bin(ConfigScopeType type, const std::string &scope) const override
LayerValue< bool > cross_tileset_anim_linking(ConfigScopeType type, const std::string &scope) const override
LayerValue< TilesPaletteMode > tiles_palette_mode(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::size_t > num_metatiles_total(ConfigScopeType type, const std::string &scope) const override
ConfigScopeType
Specifies the scope type for configuration value lookups.
Storage struct for CLI option values.
std::optional< std::string > tiles_palette_mode
std::vector< std::string > diagnostic_remarks_include
std::optional< std::string > num_metatiles_in_primary
std::optional< std::string > tileset_paths_primary_bin
std::optional< std::string > packing_strategy
std::optional< std::string > cross_tileset_anim_linking
std::optional< std::string > palettes_edit_mode
std::optional< std::string > tiles_edit_mode
std::optional< std::string > num_tiles_total
std::optional< std::string > metatile_attribute_declaration_size
std::optional< std::string > tileset_paths_secondary_bin
std::optional< std::string > tileset_animations_wire_anim_code
std::optional< std::string > num_tiles_per_metatile
std::optional< std::string > max_map_data_size
std::optional< std::string > metatile_attribute_size
std::optional< std::string > global_anim_palette_resolution_strategy
std::optional< std::string > tileset_paths_primary_src
std::optional< std::string > tileset_paths_secondary_src
std::optional< std::string > global_anim_multi_palette_subtile_resolution_strategy
std::optional< std::string > tile_sharing_packing
std::optional< std::string > num_tiles_in_primary
std::optional< std::string > num_palettes_in_primary
std::optional< std::string > num_palettes_total
std::vector< std::string > diagnostic_warnings_include
std::optional< std::string > global_frame_linking
std::optional< std::string > global_anim_key_frame_resolution_strategy
std::vector< std::string > diagnostic_remarks_exclude
std::optional< std::string > ignore_triple_layer_content
std::optional< std::string > palette_hints_enabled
std::optional< std::string > num_metatiles_total
std::optional< std::string > extrinsic_transparency
std::vector< std::string > diagnostic_warnings_exclude
std::optional< std::string > tile_sharing_alignment
std::optional< std::string > primary_pairing_mode
std::optional< std::string > verify_checksums
std::vector< std::string > primary_pairing_partners
A small container that holds an optional-wrapped value, validation state, and metadata about the valu...