|
Porytiles
|
#include "porytiles/xcut/config/config_scope_type.hpp"Go to the source code of this file.
Namespaces | |
| namespace | porytiles |
Macros | |
| #define | PT_UNWRAP_TILESET_CONFIG_PTR_AS(var, ptr, config, tileset_name, return_type) |
| Unwraps a tileset-scoped config value via pointer access into an explicitly named local variable, returning early if the value is not available. | |
| #define | PT_UNWRAP_TILESET_CONFIG_PTR(ptr, config, tileset_name, return_type) PT_UNWRAP_TILESET_CONFIG_PTR_AS(config, ptr, config, tileset_name, return_type) |
| Unwraps a tileset-scoped config value via pointer access, returning early if the value is not available. | |
| #define | PT_UNWRAP_TILESET_CONFIG_REF_AS(var, ref, config, tileset_name, return_type) |
| Unwraps a tileset-scoped config value via reference access into an explicitly named local variable, returning early if the value is not available. | |
| #define | PT_UNWRAP_TILESET_CONFIG_REF(ref, config, tileset_name, return_type) PT_UNWRAP_TILESET_CONFIG_REF_AS(config, ref, config, tileset_name, return_type) |
| Unwraps a tileset-scoped config value via reference access, returning early if the value is not available. | |
| #define | PT_UNWRAP_LAYOUT_CONFIG_AS(var, ptr, config, layout_name, return_type) |
| Unwraps a layout-scoped config value into an explicitly named local variable, returning early if the value is not available. | |
| #define | PT_UNWRAP_LAYOUT_CONFIG(ptr, config, layout_name, return_type) PT_UNWRAP_LAYOUT_CONFIG_AS(config, ptr, config, layout_name, return_type) |
| Unwraps a layout-scoped config value from a DomainConfig, AppConfig, or InfraConfig object, returning early if the value is not available. | |
| #define PT_UNWRAP_LAYOUT_CONFIG | ( | ptr, | |
| config, | |||
| layout_name, | |||
| return_type | |||
| ) | PT_UNWRAP_LAYOUT_CONFIG_AS(config, ptr, config, layout_name, return_type) |
Unwraps a layout-scoped config value from a DomainConfig, AppConfig, or InfraConfig object, returning early if the value is not available.
Convenience form of PT_UNWRAP_LAYOUT_CONFIG_AS that names the resulting local variable after the config method itself. Because the locals are derived from the config name, this form cannot unwrap the same config value twice in one scope; use PT_UNWRAP_LAYOUT_CONFIG_AS for that.
| ptr | A pointer to a config object |
| config | The name of the config method to call and the resulting variable name |
| layout_name | The layout name to pass to the config method |
| return_type | The template parameter for ChainableResult in case of error |
Definition at line 155 of file unwrap_config.hpp.
| #define PT_UNWRAP_LAYOUT_CONFIG_AS | ( | var, | |
| ptr, | |||
| config, | |||
| layout_name, | |||
| return_type | |||
| ) |
Unwraps a layout-scoped config value into an explicitly named local variable, returning early if the value is not available.
This macro retrieves a config value for a given 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 into a local variable named by the var parameter (with an internal var##_result temporary).
Prefer PT_UNWRAP_LAYOUT_CONFIG when the config name works as the variable name. This form exists for call sites that unwrap the same config value more than once in a single scope (e.g. for two different layouts), where the config-named form would redeclare its locals.
| var | The variable name to assign the unwrapped value to |
| ptr | A pointer to a config object |
| config | The name of the config method to call |
| layout_name | The layout name to pass to the config method |
| return_type | The template parameter for ChainableResult in case of error |
Definition at line 128 of file unwrap_config.hpp.
| #define PT_UNWRAP_TILESET_CONFIG_PTR | ( | ptr, | |
| config, | |||
| tileset_name, | |||
| return_type | |||
| ) | PT_UNWRAP_TILESET_CONFIG_PTR_AS(config, ptr, config, tileset_name, return_type) |
Unwraps a tileset-scoped config value via pointer access, returning early if the value is not available.
Convenience form of PT_UNWRAP_TILESET_CONFIG_PTR_AS that names the resulting local variable after the config method itself. Because the locals are derived from the config name, this form cannot unwrap the same config value twice in one scope; use PT_UNWRAP_TILESET_CONFIG_PTR_AS for that.
| ptr | A pointer to a DomainConfig, AppConfig, or InfraConfig object |
| config | The name of the config method to call and the resulting variable name |
| tileset_name | The tileset name to pass to the config method |
| return_type | The template parameter for ChainableResult in case of error |
Definition at line 55 of file unwrap_config.hpp.
| #define PT_UNWRAP_TILESET_CONFIG_PTR_AS | ( | var, | |
| ptr, | |||
| config, | |||
| tileset_name, | |||
| return_type | |||
| ) |
Unwraps a tileset-scoped config value via pointer access into an explicitly named local variable, returning early if the value is not available.
This macro retrieves a config value for a given tileset using pointer syntax (ptr->config) 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 into a local variable named by the var parameter (with an internal var##_result temporary).
Prefer PT_UNWRAP_TILESET_CONFIG_PTR when the config name works as the variable name. This form exists for call sites that unwrap the same config value more than once in a single scope (e.g. for two different tilesets), where the config-named form would redeclare its locals.
| var | The variable name to assign the unwrapped value to |
| ptr | A pointer to a DomainConfig, AppConfig, or InfraConfig object |
| config | The name of the config method to call |
| tileset_name | The tileset name to pass to the config method |
| return_type | The template parameter for ChainableResult in case of error |
Definition at line 28 of file unwrap_config.hpp.
| #define PT_UNWRAP_TILESET_CONFIG_REF | ( | ref, | |
| config, | |||
| tileset_name, | |||
| return_type | |||
| ) | PT_UNWRAP_TILESET_CONFIG_REF_AS(config, ref, config, tileset_name, return_type) |
Unwraps a tileset-scoped config value via reference access, returning early if the value is not available.
Convenience form of PT_UNWRAP_TILESET_CONFIG_REF_AS that names the resulting local variable after the config method itself. Because the locals are derived from the config name, this form cannot unwrap the same config value twice in one scope; use PT_UNWRAP_TILESET_CONFIG_REF_AS for that.
| ref | A reference to a DomainConfig, AppConfig, or InfraConfig object |
| config | The name of the config method to call and the resulting variable name |
| tileset_name | The tileset name to pass to the config method |
| return_type | The template parameter for ChainableResult in case of error |
Definition at line 106 of file unwrap_config.hpp.
| #define PT_UNWRAP_TILESET_CONFIG_REF_AS | ( | var, | |
| ref, | |||
| config, | |||
| tileset_name, | |||
| return_type | |||
| ) |
Unwraps a tileset-scoped config value via reference access into an explicitly named local variable, returning early if the value is not available.
This macro retrieves a config value for a given tileset using reference syntax (ref.config) 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 into a local variable named by the var parameter (with an internal var##_result temporary).
Prefer PT_UNWRAP_TILESET_CONFIG_REF when the config name works as the variable name. This form exists for call sites that unwrap the same config value more than once in a single scope (e.g. for two different tilesets), where the config-named form would redeclare its locals.
| var | The variable name to assign the unwrapped value to |
| ref | A reference to a DomainConfig, AppConfig, or InfraConfig object |
| config | The name of the config method to call |
| tileset_name | The tileset name to pass to the config method |
| return_type | The template parameter for ChainableResult in case of error |
Definition at line 79 of file unwrap_config.hpp.