AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
A wrapper class that enables constraints on groups of Fields. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/inlet/Field.hpp>
Public Types | |
using | Verifier = std::function< bool(const axom::inlet::Field &, std::vector< VerificationError > *errors)> |
Public Member Functions | |
AggregateField (std::vector< std::reference_wrapper< VerifiableScalar >> &&fields) | |
virtual | ~AggregateField ()=default |
bool | verify (std::vector< VerificationError > *errors=nullptr) const override |
Verifies the object to make sure it satisfies the imposed requirements. More... | |
AggregateField & | required (bool isRequired) override |
Set the required status of this object. More... | |
bool | isRequired () const override |
Return the required status. More... | |
AggregateField & | defaultValue (const std::string &value) override |
Set the default value of this object. More... | |
AggregateField & | defaultValue (const char *value) override |
Set the default value of this object. More... | |
AggregateField & | defaultValue (bool value) override |
Set the default value of this object. More... | |
AggregateField & | defaultValue (int value) override |
Set the default value of this object. More... | |
AggregateField & | defaultValue (double value) override |
Set the default value of this object. More... | |
AggregateField & | range (double startVal, double endVal) override |
Set the range of this object. More... | |
AggregateField & | range (int startVal, int endVal) override |
Set the range of this object. More... | |
AggregateField & | validValues (const std::vector< int > &set) override |
Set the valid values for this object. More... | |
AggregateField & | validValues (const std::vector< double > &set) override |
Set the valid values for this object. More... | |
AggregateField & | validValues (const std::vector< std::string > &set) override |
Set the valid values for this object. More... | |
AggregateField & | validValues (const std::initializer_list< const char * > &set) override |
Set the valid values for this object. More... | |
AggregateField & | validValues (const std::initializer_list< int > &set) override |
Set the valid values for this object. More... | |
AggregateField & | validValues (const std::initializer_list< double > &set) override |
Set the valid values. More... | |
AggregateField & | registerVerifier (Verifier lambda) override |
Registers the function object that will verify this object's contents during the verification stage. More... | |
VerifiableScalar & | registerVerifier (std::function< bool(const axom::inlet::Field &)> lambda) |
Registers the function object that will verify this object's contents during the verification stage. More... | |
virtual VerifiableScalar & | registerVerifier (Verifier verifier)=0 |
Registers the function object that will verify this object's contents during the verification stage. More... | |
VerifiableScalar & | registerVerifier (std::function< bool(const axom::inlet::Field &)> lambda) |
Registers the function object that will verify this object's contents during the verification stage. More... | |
A wrapper class that enables constraints on groups of Fields.
|
inherited |
A function which can verify the contents of the item being verified. It should report any errors via the INLET_VERIFICATION_WARNING macro, passing in the given array of errors.
|
inline |
|
virtualdefault |
|
overridevirtual |
Verifies the object to make sure it satisfies the imposed requirements.
[in] | errors | An optional vector of errors to append to in the case of verification failure |
Ownership is not taken of errors, the raw pointer is only used for its optional reference semantics, as opposed to something like std::optional<std::reference_wrapper<T>>
Implements axom::inlet::VerifiableScalar.
|
overridevirtual |
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.
[in] | isRequired | Boolean value of whether object is required |
Implements axom::inlet::VerifiableScalar.
|
overridevirtual |
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.
Implements axom::inlet::VerifiableScalar.
|
overridevirtual |
Set the default value of this object.
Set the default value for the object in the input file.
[in] | value | The default string value |
Implements axom::inlet::VerifiableScalar.
|
overridevirtual |
Set the default value of this object.
Set the default value for the object in the input file.
[in] | value | The default string value |
Implements axom::inlet::VerifiableScalar.
|
overridevirtual |
Set the default value of this object.
Set the default value for the object in the input file.
[in] | value | The default boolean value |
Implements axom::inlet::VerifiableScalar.
|
overridevirtual |
Set the default value of this object.
Set the default value for the object in the input file.
[in] | value | The default integer value |
Implements axom::inlet::VerifiableScalar.
|
overridevirtual |
Set the default value of this object.
Set the default value for the object in the input file.
[in] | value | The default double value |
Implements axom::inlet::VerifiableScalar.
|
overridevirtual |
Set the range of this object.
Set the continuous range for the object in the input file.
[in] | startVal | The start of the range |
[in] | endVal | The end of the range |
Implements axom::inlet::VerifiableScalar.
|
overridevirtual |
Set the range of this object.
Set the continuous range for the object in the input file.
[in] | startVal | The start of the range |
[in] | endVal | The end of the range |
Implements axom::inlet::VerifiableScalar.
|
overridevirtual |
Set the valid values for this object.
[in] | set | An vector containing the set of allowed integer values |
Implements axom::inlet::VerifiableScalar.
|
overridevirtual |
Set the valid values for this object.
[in] | set | An vector containing the set of allowed double values |
Implements axom::inlet::VerifiableScalar.
|
overridevirtual |
Set the valid values for this object.
[in] | set | A vector containing the set of allowed string values |
Implements axom::inlet::VerifiableScalar.
|
overridevirtual |
Set the valid values for this object.
[in] | set | An initializer list containing the set of allowed C-string values |
Implements axom::inlet::VerifiableScalar.
|
overridevirtual |
Set the valid values for this object.
[in] | set | An initializer list containing the valid integer values |
Implements axom::inlet::VerifiableScalar.
|
overridevirtual |
Set the valid values.
[in] | set | An initializer list containing the valid double values |
Implements axom::inlet::VerifiableScalar.
|
overridevirtual |
Registers the function object that will verify this object's contents during the verification stage.
[in] | verifier | The function object. |
Implements axom::inlet::VerifiableScalar.
VerifiableScalar& axom::inlet::VerifiableScalar::registerVerifier |
Registers the function object that will verify this object's contents during the verification stage.
[in] | lambda | The function object. |
virtual VerifiableScalar& axom::inlet::VerifiableScalar::registerVerifier |
Registers the function object that will verify this object's contents during the verification stage.
[in] | verifier | The function object. |
|
inherited |
Registers the function object that will verify this object's contents during the verification stage.
[in] | lambda | The function object. |