|
Porytiles
|
Go to the source code of this file.
Namespaces | |
| namespace | porytiles2 |
Macros | |
| #define | PT_UNWRAP_SCOPED_CONFIG(ptr, config, tileset, return_type) |
| Unwraps a scoped config value from a DomainConfig, AppConfig, or InfraConfig object, returning early if the value is not available. | |
| #define PT_UNWRAP_SCOPED_CONFIG | ( | ptr, | |
| config, | |||
| tileset, | |||
| return_type | |||
| ) |
Unwraps a scoped config value from a DomainConfig, AppConfig, or InfraConfig object, returning early if the value is not available.
This macro retrieves a config value for a given tileset or layout and automatically handles the error case. If the config value is not available, it returns a ChainableResult error with a formatted message. Otherwise, it unwraps the value and creates a local variable with the name specified by the config parameter.
| ptr | A pointer to a config object |
| config | The name of the config method to call and the resulting variable name |
| tileset | The tileset parameter to pass to the config method |
| return_type | The template parameter for ChainableResult in case of error |
Definition at line 19 of file unwrap_config.hpp.