Porytiles
Loading...
Searching...
No Matches
config_validators.hpp File Reference
#include <cstddef>
#include <functional>
#include <string>
#include <vector>
#include "fmt/format.h"
#include "porytiles2/xcut/config/config_value.hpp"
#include "porytiles2/xcut/result/chainable_result.hpp"
Include dependency graph for config_validators.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  porytiles2
 
namespace  porytiles2::details
 

Functions

ChainableResult< ConfigValue< std::size_t > > porytiles2::size_t_val_greater_than_zero (const ConfigValue< std::size_t > &val)
 Validates that a size_t config value is greater than zero.
 
template<typename T , typename ConfigInterface , typename FetchFunc , typename Comparator >
ChainableResult< ConfigValue< T > > porytiles2::details::compare_values (const ConfigValue< T > &val, const ConfigInterface &config, const std::string &scope_param, const std::string &other_field_name, FetchFunc fetch_other, Comparator comp, std::string_view error_message)
 Generic comparison validator that compares the current value against another config value.
 
template<typename T , typename ConfigInterface , typename FetchFunc >
ChainableResult< ConfigValue< T > > porytiles2::compare_greater_than (const ConfigValue< T > &val, const ConfigInterface &config, const std::string &scope_param, const std::string &other_field_name, FetchFunc fetch_other)
 Validates that the current value is greater than another config value.
 
template<typename T , typename ConfigInterface , typename FetchFunc >
ChainableResult< ConfigValue< T > > porytiles2::compare_less_than (const ConfigValue< T > &val, const ConfigInterface &config, const std::string &scope_param, const std::string &other_field_name, FetchFunc fetch_other)
 Validates that the current value is less than another config value.
 
template<typename T , typename ConfigInterface , typename FetchFunc >
ChainableResult< ConfigValue< T > > porytiles2::compare_greater_equal (const ConfigValue< T > &val, const ConfigInterface &config, const std::string &scope_param, const std::string &other_field_name, FetchFunc fetch_other)
 Validates that the current value is greater than or equal to another config value.
 
template<typename T , typename ConfigInterface , typename FetchFunc >
ChainableResult< ConfigValue< T > > porytiles2::compare_less_equal (const ConfigValue< T > &val, const ConfigInterface &config, const std::string &scope_param, const std::string &other_field_name, FetchFunc fetch_other)
 Validates that the current value is less than or equal to another config value.
 
template<typename T , typename ConfigInterface , typename FetchFunc >
ChainableResult< ConfigValue< T > > porytiles2::compare_equal (const ConfigValue< T > &val, const ConfigInterface &config, const std::string &scope_param, const std::string &other_field_name, FetchFunc fetch_other)
 Validates that the current value is equal to another config value.
 
template<typename T , typename ConfigInterface , typename FetchFunc >
ChainableResult< ConfigValue< T > > porytiles2::compare_not_equal (const ConfigValue< T > &val, const ConfigInterface &config, const std::string &scope_param, const std::string &other_field_name, FetchFunc fetch_other)
 Validates that the current value is not equal to another config value.