Basic interface for verifiable scalar values of Inlet primitive type, namely int, double, bool, or std::string - implementations can use this directly (inlet::Field) or forward to all elements of a collection (inlet::AggregrateField)
More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/v0.5.0/src/axom/inlet/VerifiableScalar.hpp>
Basic interface for verifiable scalar values of Inlet primitive type, namely int, double, bool, or std::string - implementations can use this directly (inlet::Field) or forward to all elements of a collection (inlet::AggregrateField)
In practice this interface is used for the Field and AggregateField types. In addition to the ability to mark things as required and use user-defined lambdas (as in Verifiable), default values can be provided, as can ranges of valid values and discrete sets of valid values.
◆ operator=()
◆ required()
virtual VerifiableScalar& axom::inlet::VerifiableScalar::required |
( |
bool |
isRequired = true | ) |
|
|
pure virtual |
Set the required status of this object.
Set whether this object is required, or not, to be in the input file. The default behavior is to not be required.
- Parameters
-
[in] | isRequired | Boolean value of whether object is required |
- Returns
- Reference to calling object, for chaining
Implemented in axom::inlet::AggregateField, and axom::inlet::Field.
◆ isRequired()
virtual bool axom::inlet::VerifiableScalar::isRequired |
( |
| ) |
const |
|
pure virtual |
Return the required status.
Return that this object is required, or not, to be in the input file. The default behavior is to not be required.
- Returns
- Boolean value of whether this object is required
Implemented in axom::inlet::AggregateField, and axom::inlet::Field.
◆ registerVerifier()
Registers the function object that will verify this object's contents during the verification stage.
- Parameters
-
◆ defaultValue() [1/5]
virtual VerifiableScalar& axom::inlet::VerifiableScalar::defaultValue |
( |
const std::string & |
value | ) |
|
|
pure virtual |
Set the default value of this object.
Set the default value for the object in the input file.
- Parameters
-
[in] | value | The default string value |
- Returns
- Reference to calling object for chaining
Implemented in axom::inlet::AggregateField, and axom::inlet::Field.
◆ defaultValue() [2/5]
virtual VerifiableScalar& axom::inlet::VerifiableScalar::defaultValue |
( |
const char * |
value | ) |
|
|
pure virtual |
Set the default value of this object.
Set the default value for the object in the input file.
- Parameters
-
[in] | value | The default string value |
- Returns
- Reference to calling object for chaining
Implemented in axom::inlet::AggregateField, and axom::inlet::Field.
◆ defaultValue() [3/5]
virtual VerifiableScalar& axom::inlet::VerifiableScalar::defaultValue |
( |
bool |
value | ) |
|
|
pure virtual |
Set the default value of this object.
Set the default value for the object in the input file.
- Parameters
-
[in] | value | The default boolean value |
- Returns
- Reference to calling object for chaining
Implemented in axom::inlet::AggregateField, and axom::inlet::Field.
◆ defaultValue() [4/5]
virtual VerifiableScalar& axom::inlet::VerifiableScalar::defaultValue |
( |
int |
value | ) |
|
|
pure virtual |
Set the default value of this object.
Set the default value for the object in the input file.
- Parameters
-
[in] | value | The default integer value |
- Returns
- Reference to calling object for chaining
Implemented in axom::inlet::AggregateField, and axom::inlet::Field.
◆ defaultValue() [5/5]
virtual VerifiableScalar& axom::inlet::VerifiableScalar::defaultValue |
( |
double |
value | ) |
|
|
pure virtual |
Set the default value of this object.
Set the default value for the object in the input file.
- Parameters
-
[in] | value | The default double value |
- Returns
- Reference to calling object for chaining
Implemented in axom::inlet::AggregateField, and axom::inlet::Field.
◆ range() [1/2]
virtual VerifiableScalar& axom::inlet::VerifiableScalar::range |
( |
double |
startVal, |
|
|
double |
endVal |
|
) |
| |
|
pure virtual |
Set the range of this object.
Set the continuous range for the object in the input file.
- Parameters
-
[in] | startVal | The start of the range |
[in] | endVal | The end of the range |
- Returns
- Reference to calling object for chaining
Implemented in axom::inlet::AggregateField, and axom::inlet::Field.
◆ range() [2/2]
virtual VerifiableScalar& axom::inlet::VerifiableScalar::range |
( |
int |
startVal, |
|
|
int |
endVal |
|
) |
| |
|
pure virtual |
Set the range of this object.
Set the continuous range for the object in the input file.
- Parameters
-
[in] | startVal | The start of the range |
[in] | endVal | The end of the range |
- Returns
- Reference to calling object for chaining
Implemented in axom::inlet::AggregateField, and axom::inlet::Field.
◆ validValues() [1/6]
virtual VerifiableScalar& axom::inlet::VerifiableScalar::validValues |
( |
const std::vector< int > & |
set | ) |
|
|
pure virtual |
Set the valid values for this object.
- Parameters
-
[in] | set | An vector containing the set of allowed integer values |
- Returns
- Reference to calling object for chaining
Implemented in axom::inlet::AggregateField, and axom::inlet::Field.
◆ validValues() [2/6]
virtual VerifiableScalar& axom::inlet::VerifiableScalar::validValues |
( |
const std::vector< double > & |
set | ) |
|
|
pure virtual |
Set the valid values for this object.
- Parameters
-
[in] | set | An vector containing the set of allowed double values |
- Returns
- Reference to calling object for chaining
Implemented in axom::inlet::AggregateField, and axom::inlet::Field.
◆ validValues() [3/6]
virtual VerifiableScalar& axom::inlet::VerifiableScalar::validValues |
( |
const std::vector< std::string > & |
set | ) |
|
|
pure virtual |
◆ validValues() [4/6]
virtual VerifiableScalar& axom::inlet::VerifiableScalar::validValues |
( |
const std::initializer_list< const char *> & |
set | ) |
|
|
pure virtual |
Set the valid values for this object.
- Parameters
-
[in] | set | An initializer list containing the set of allowed C-string values |
- Returns
- Reference to calling object for chaining
Implemented in axom::inlet::AggregateField, and axom::inlet::Field.
◆ validValues() [5/6]
virtual VerifiableScalar& axom::inlet::VerifiableScalar::validValues |
( |
const std::initializer_list< int > & |
set | ) |
|
|
pure virtual |
Set the valid values for this object.
- Parameters
-
[in] | set | An initializer list containing the valid integer values |
- Returns
- Reference to calling object for chaining
Implemented in axom::inlet::AggregateField, and axom::inlet::Field.
◆ validValues() [6/6]
virtual VerifiableScalar& axom::inlet::VerifiableScalar::validValues |
( |
const std::initializer_list< double > & |
set | ) |
|
|
pure virtual |
◆ verify()
virtual bool axom::inlet::VerifiableScalar::verify |
( |
| ) |
const |
|
pure virtual |
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/v0.5.0/src/axom/inlet/VerifiableScalar.hpp