|
creativity
v1.3.0
Agent-based model of creativity and piracy
|
Validation wrapper for options that have both a minimum and maximum value. More...
#include <creativity/cmdargs/Validation.hpp>
Public Member Functions | |
| Range (T v) | |
Constructor. Throws if v < min or v > max. | |
Public Member Functions inherited from creativity::cmdargs::Min< T, min > | |
| Min (T v) | |
Constructor. Throws if v < min. | |
Public Member Functions inherited from creativity::cmdargs::Validation< T > | |
| Validation (T v) | |
| Constructs with an initial value. | |
| operator const T & () const | |
| Implicit conversion to the stored value. | |
| virtual | ~Validation ()=default |
| Virtual destructor. | |
Public Member Functions inherited from creativity::cmdargs::Max< T, max > | |
| Max (T v) | |
Constructor. Throws if v > max. | |
Static Public Member Functions | |
| static std::string | validationString () |
| Returns string representation of this validation. | |
Static Public Member Functions inherited from creativity::cmdargs::Min< T, min > | |
| static std::string | validationString () |
| Returns string representation of this validation. | |
Static Public Member Functions inherited from creativity::cmdargs::Validation< T > | |
| static std::string | validationString () |
| Returns a string representation of this validation object. | |
Static Public Member Functions inherited from creativity::cmdargs::Max< T, max > | |
| static std::string | validationString () |
| Returns string representation of this validation. | |
Additional Inherited Members | |
Public Types inherited from creativity::cmdargs::Validation< T > | |
| using | value_type = T |
| The type T that this object validates. | |
Protected Attributes inherited from creativity::cmdargs::Validation< T > | |
| T | val_ |
| The stored value. | |
Validation wrapper for options that have both a minimum and maximum value.
| T | any numeric type |
| min | the minimum accepted value; if fractional, this is the numerator. |
| max | the maximum accepted value; if fractional, this is the numerator. |
| denom | the denominator of both the min and max values; defaults to 1. |
1.8.12