Class Paramita::IntegerParameter¶
Represents an integer-valued parameter with a range of valid values.
The domain is an inclusive Range.
#include <ParameterSpace.hpp>
Inherits the following classes: Paramita::Parameter
Public Functions¶
| Type | Name |
|---|---|
| IntegerParameter (int default_value, Range< int > range) Construct a new integer parameter. |
|
| IntegerParameter (const IntegerParameter &) |
|
| IntegerParameter (IntegerParameter &&) noexcept |
|
| virtual ParameterType | default_value () override const The default value for this parameter. |
| virtual bool | is_valid (ParameterType value) override const Checks that the value is in the domain and has the correct type. |
| int | max_value () const |
| int | min_value () const |
| IntegerParameter & | operator= (const IntegerParameter &) = delete |
| IntegerParameter & | operator= (IntegerParameter &&) = delete |
| ~IntegerParameter () override |
Public Functions inherited from Paramita::Parameter¶
| Type | Name |
|---|---|
| Parameter () = default |
|
| Parameter (const Parameter &) = delete Deleted constructor (pure interface). |
|
| Parameter (Parameter &&) = delete Deleted constructor (pure interface). |
|
| virtual ParameterType | default_value () const = 0 The default value for this parameter. |
| virtual bool | is_valid (ParameterType value) const = 0 Checks that the value is in the domain and has the correct type. |
| Parameter & | operator= (const Parameter & container) = delete Deleted constructor (pure interface). |
| Parameter & | operator= (Parameter &&) = delete Deleted constructor (pure interface). |
| virtual | ~Parameter () = default |
Public Functions Documentation¶
function IntegerParameter [1/3]¶
Construct a new integer parameter.
Parameters:
default_valueThe default integer value used when not specified.rangeThe range of valid values.
function IntegerParameter [2/3]¶
function IntegerParameter [3/3]¶
function default_value¶
The default value for this parameter.
Returns:
The default value.
Implements Paramita::Parameter::default_value
function is_valid¶
Checks that the value is in the domain and has the correct type.
Parameters:
valueThe value to check.
Returns:
True if the value is valid.
Implements Paramita::Parameter::is_valid