|
Porytiles
|
A small container that holds an optional-wrapped value, validation state, and metadata about the value source. More...
#include <layer_value.hpp>
Static Public Member Functions | |
| static LayerValue | valid (T val, std::string source_info) |
| Creates a LayerValue representing a valid configuration value. | |
| static LayerValue | valid (T val, std::string source_info, std::vector< std::string > source_details) |
| Creates a LayerValue representing a valid configuration value with detailed source context. | |
| static LayerValue | invalid (std::string error, std::string source_info) |
| Creates a LayerValue representing an invalid configuration value. | |
| static LayerValue | invalid (std::string error, std::string source_info, std::vector< std::string > source_details) |
| Creates a LayerValue representing an invalid configuration value with detailed source context. | |
| static LayerValue | not_provided () |
| Creates a LayerValue representing that the provider does not supply this configuration. | |
Public Attributes | |
| std::optional< T > | value |
| std::string | source_info |
| std::vector< std::string > | source_details |
| ValidationState | state = ValidationState::not_provided |
| std::string | error_message |
A small container that holds an optional-wrapped value, validation state, and metadata about the value source.
LayerValue supports three states:
| T | The type of the underlying value |
Definition at line 37 of file layer_value.hpp.
|
inlinestatic |
Creates a LayerValue representing an invalid configuration value.
| error | Error message describing why the value is invalid |
| source_info | String describing the source that attempted to provide this value |
Definition at line 78 of file layer_value.hpp.
|
inlinestatic |
Creates a LayerValue representing an invalid configuration value with detailed source context.
| error | Error message describing why the value is invalid |
| source_info | String describing the source that attempted to provide this value |
| source_details | Vector of strings showing contextual lines around the source |
Definition at line 91 of file layer_value.hpp.
|
inlinestatic |
Creates a LayerValue representing that the provider does not supply this configuration.
Definition at line 106 of file layer_value.hpp.
|
inlinestatic |
Creates a LayerValue representing a valid configuration value.
| val | The valid configuration value |
| source_info | String describing the source of this value |
Definition at line 52 of file layer_value.hpp.
|
inlinestatic |
Creates a LayerValue representing a valid configuration value with detailed source context.
| val | The valid configuration value |
| source_info | String describing the source of this value |
| source_details | Vector of strings showing contextual lines around the source |
Definition at line 65 of file layer_value.hpp.
| std::string porytiles2::LayerValue< T >::error_message |
Definition at line 43 of file layer_value.hpp.
| std::vector<std::string> porytiles2::LayerValue< T >::source_details |
Definition at line 41 of file layer_value.hpp.
| std::string porytiles2::LayerValue< T >::source_info |
Definition at line 40 of file layer_value.hpp.
| ValidationState porytiles2::LayerValue< T >::state = ValidationState::not_provided |
Definition at line 42 of file layer_value.hpp.
| std::optional<T> porytiles2::LayerValue< T >::value |
Definition at line 39 of file layer_value.hpp.