Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
util::config::NumberValueConstraint< NumType > Class Template Referencefinal

A constraint class to ensure an integer value is between two numbers (inclusive) More...

#include <ConfigConstraints.hpp>

Inheritance diagram for util::config::NumberValueConstraint< NumType >:
Collaboration diagram for util::config::NumberValueConstraint< NumType >:

Public Member Functions

constexpr NumberValueConstraint (NumType min, NumType max)
 Constructs a constraint where the number must be between min_ and max_.
 
- Public Member Functions inherited from util::config::Constraint
std::optional< ErrorcheckConstraint (Value const &val) const
 Check if the value meets the specific constraint.
 

Additional Inherited Members

- Protected Member Functions inherited from util::config::Constraint
template<std::size_t ArrSize>
constexpr std::string makeErrorMsg (std::string_view key, Value const &value, std::array< char const *, ArrSize > arr) const
 Creates an error message for all constraints that must satisfy certain hard-coded values.
 

Detailed Description

template<typename NumType>
class util::config::NumberValueConstraint< NumType >

A constraint class to ensure an integer value is between two numbers (inclusive)

Constructor & Destructor Documentation

◆ NumberValueConstraint()

template<typename NumType >
util::config::NumberValueConstraint< NumType >::NumberValueConstraint ( NumType min,
NumType max )
inlineconstexpr

Constructs a constraint where the number must be between min_ and max_.

Parameters
minthe minimum number it can be to satisfy this constraint
maxthe maximum number it can be to satisfy this constraint

The documentation for this class was generated from the following file: