MarlinMT
0.1.0
|
Functions | |
template<typename T > | |
constexpr ValidatorFunctionT< T > | notInfinity () |
Validator function checking for non-infinite values. More... | |
template<typename T > | |
constexpr ValidatorFunctionT< std::vector< T > > | forEach (ValidatorFunctionT< T > func) |
Apply a validator on each element of the vector. More... | |
template<typename T > | |
constexpr ValidatorFunctionT< T > | greater (T limit) |
Validator function checking for the value to be greater than a limit. More... | |
template<typename T > | |
constexpr ValidatorFunctionT< T > | greaterEqual (T limit) |
Validator function checking for the value to be greater or equal to a limit. More... | |
template<typename T > | |
constexpr ValidatorFunctionT< T > | less (T limit) |
Validator function checking for the value to be less than a limit. More... | |
template<typename T > | |
constexpr ValidatorFunctionT< T > | lessEqual (T limit) |
Validator function checking for the value to be less or equal to a limit. More... | |
template<typename T > | |
constexpr ValidatorFunctionT< T > | inRange (T low, T high) |
Validator function checking for the value to be within a specific range, boundaries included Only valid is the operator < is defined for the input type. More... | |
template<typename T > | |
constexpr ValidatorFunctionT< T > | sizeModulo (std::size_t mod) |
Validator function checking for the value to have a size multiple of the input value Only valid if the input type has a method size() (containers, string, etc...) More... | |
template<typename T > | |
constexpr ValidatorFunctionT< T > | expectSize (std::size_t s) |
Validator function checking for the value to have an exact size. More... | |
template<typename T > | |
constexpr ValidatorFunctionT< T > | notEmpty () |
Validator function checking for the value to be non-empty. More... | |
template<typename T > | |
constexpr ValidatorFunctionT< T > | combineOr (ValidatorFunctionT< T > lhs, ValidatorFunctionT< T > rhs) |
Create a combination of two validator function with 'or' combination. More... | |
template<typename T > | |
constexpr ValidatorFunctionT< T > | combineAnd (ValidatorFunctionT< T > lhs, ValidatorFunctionT< T > rhs) |
Create a combination of two validator function with 'and' combination. More... | |
template<typename T > | |
constexpr ValidatorFunctionT< T > | constraints (std::set< T > cnsts) |
Create a validator checking for the value that is constrained to the input list. More... | |
constexpr ValidatorFunctionT<T> marlinmt::validator::combineAnd | ( | ValidatorFunctionT< T > | lhs, |
ValidatorFunctionT< T > | rhs | ||
) |
Create a combination of two validator function with 'and' combination.
Returns a new validator function containing the combination
lhs | the first validator |
rhs | the second validator |
Definition at line 168 of file Validator.h.
References marlinmt::book::Flags::value().
constexpr ValidatorFunctionT<T> marlinmt::validator::combineOr | ( | ValidatorFunctionT< T > | lhs, |
ValidatorFunctionT< T > | rhs | ||
) |
Create a combination of two validator function with 'or' combination.
Returns a new validator function containing the combination
lhs | the first validator |
rhs | the second validator |
Definition at line 154 of file Validator.h.
References marlinmt::book::Flags::value().
constexpr ValidatorFunctionT<T> marlinmt::validator::constraints | ( | std::set< T > | cnsts | ) |
Create a validator checking for the value that is constrained to the input list.
cnsts | the input list of constraints |
Definition at line 180 of file Validator.h.
References marlinmt::book::Flags::value().
|
inline |
Validator function checking for the value to have an exact size.
Only valid if the input type has a method size()
s | the exact size to check |
Definition at line 129 of file Validator.h.
References marlinmt::book::Flags::value().
constexpr ValidatorFunctionT<std::vector<T> > marlinmt::validator::forEach | ( | ValidatorFunctionT< T > | func | ) |
Apply a validator on each element of the vector.
Only valid for vector type validation.
func | the validator function to apply on each element of the vector |
Definition at line 35 of file Validator.h.
References marlinmt::book::Flags::value().
constexpr ValidatorFunctionT<T> marlinmt::validator::greater | ( | T | limit | ) |
Validator function checking for the value to be greater than a limit.
Only valid is the operator > is defined for the input type
limit | the limit value |
Definition at line 48 of file Validator.h.
References marlinmt::book::Flags::value().
constexpr ValidatorFunctionT<T> marlinmt::validator::greaterEqual | ( | T | limit | ) |
Validator function checking for the value to be greater or equal to a limit.
Only valid is the operator >= is defined for the input type
limit | the limit value |
Definition at line 61 of file Validator.h.
References marlinmt::book::Flags::value().
constexpr ValidatorFunctionT<T> marlinmt::validator::inRange | ( | T | low, |
T | high | ||
) |
Validator function checking for the value to be within a specific range, boundaries included Only valid is the operator < is defined for the input type.
low | the lower boundary value |
high | the higer boundary value |
Definition at line 102 of file Validator.h.
References marlinmt::book::Flags::value().
constexpr ValidatorFunctionT<T> marlinmt::validator::less | ( | T | limit | ) |
Validator function checking for the value to be less than a limit.
Only valid is the operator < is defined for the input type
limit | the limit value |
Definition at line 74 of file Validator.h.
References marlinmt::book::Flags::value().
constexpr ValidatorFunctionT<T> marlinmt::validator::lessEqual | ( | T | limit | ) |
Validator function checking for the value to be less or equal to a limit.
Only valid is the operator <= is defined for the input type
limit | the limit value |
Definition at line 87 of file Validator.h.
References marlinmt::book::Flags::value().
|
inline |
Validator function checking for the value to be non-empty.
Only valid if the input type has a method empty()
Definition at line 140 of file Validator.h.
References marlinmt::book::Flags::value().
constexpr ValidatorFunctionT<T> marlinmt::validator::notInfinity | ( | ) |
Validator function checking for non-infinite values.
Works for scalar values where std::numeric_limits<T>::has_infinity is defined.
Definition at line 21 of file Validator.h.
References marlinmt::book::Flags::value().
constexpr ValidatorFunctionT<T> marlinmt::validator::sizeModulo | ( | std::size_t | mod | ) |
Validator function checking for the value to have a size multiple of the input value Only valid if the input type has a method size() (containers, string, etc...)
mod | the modulo to apply |
Definition at line 116 of file Validator.h.
References marlinmt::book::Flags::value().