ConfigResult
Source locationmrx/core/config/ConfigSchema.hpp
Represents either a validated Config or the complete list of validation errors.
Use the result in a boolean context before calling value(). When validation fails, errors() and errorString() expose every issue found in the input instead of stopping at the first property.
Public Methods
Section titled “Public Methods”| Return | Name | Description |
|---|---|---|
operator bool const | Returns true only when validation produced a normalized configuration value and no errors. | |
Config | value const | Returns the normalized configuration value. |
QList<ConfigError> | errors const | Returns all validation errors in deterministic schema/key order. |
QString | errorString const | Joins all formatted validation errors with newline separators. |
ConfigResult | ||
ConfigResult explicit | ||
ConfigResult explicit | Creates a failed ConfigResult from a pre-built list of validation errors. |
const
operator bool
Section titled “operator bool”Source locationmrx/core/config/ConfigSchema.hpp
Returns true only when validation produced a normalized configuration value and no errors.
const
Source locationmrx/core/config/ConfigSchema.hpp
Returns the normalized configuration value.
const
errors
Section titled “errors”Source locationmrx/core/config/ConfigSchema.hpp
Returns all validation errors in deterministic schema/key order.
const
errorString
Section titled “errorString”Source locationmrx/core/config/ConfigSchema.hpp
Joins all formatted validation errors with newline separators.
ConfigResult
Section titled “ConfigResult”Source locationmrx/core/config/ConfigSchema.hpp
explicit
ConfigResult
Section titled “ConfigResult”Source locationmrx/core/config/ConfigSchema.hpp
explicit
ConfigResult
Section titled “ConfigResult”Source locationmrx/core/config/ConfigSchema.hpp
Creates a failed ConfigResult from a pre-built list of validation errors.
Returns
Section titled “Returns”A failed ConfigResult preserving every supplied error in order.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
errors | const QList<ConfigError>& | Validation errors to embed in the result. |