#include <sstream>
#include <stdexcept>
#include <string>
#include <toml++/toml.hpp>
#include <vector>
Go to the source code of this file.
|
| namespace | validators |
| | Validation utilities for TOML configuration parsing.
|
| |
|
| template<typename T > |
| std::string | validators::getTypeName () |
| | Helper to get readable type names for error messages.
|
| |
| template<typename T > |
| Validator< T > | validators::field (const toml::table &config_, const std::string &key_) |
| | Creates a scalar field validator.
|
| |
| template<typename T > |
| VectorValidator< T > | validators::vectorField (const toml::table &config_, const std::string &key_) |
| | Creates a vector field validator.
|
| |
| template<typename T , typename NodeType > |
| std::optional< T > | validators::getOptional (const toml::node_view< NodeType > &node) |
| | Extracts an optional scalar value from a TOML node.
|
| |
| template<typename T , typename NodeType > |
| std::optional< std::vector< T > > | validators::getOptionalVector (const toml::node_view< NodeType > &node) |
| | Extracts an optional vector from a TOML node.
|
| |
| const toml::table & | validators::getRequiredTable (const toml::table &config, const std::string &key) |
| | Extracts a required table from a TOML configuration.
|
| |
| template<typename T > |
| std::vector< T > | validators::scalarOrVector (const toml::table &config, const std::string &key, size_t expected_size) |
| | Parses a field that can be either a scalar (applied to all) or an exact-size array.
|
| |
| template<typename T > |
| std::vector< T > | validators::scalarOrVectorOr (const toml::table &config, const std::string &key, size_t expected_size, const std::vector< T > &default_value) |
| | Parses an optional field that can be either a scalar or an exact-size array.
|
| |