AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::inlet::AggregateField Class Referenceabstract

A wrapper class that enables constraints on groups of Fields. More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/v0.5.0/src/axom/inlet/Field.hpp>

Inheritance diagram for axom::inlet::AggregateField:

Public Member Functions

 AggregateField (std::vector< std::reference_wrapper< VerifiableScalar >> &&fields)
 
virtual ~AggregateField ()=default
 
bool verify () const
 Called by Inlet::verify to verify the contents of this Field. More...
 
AggregateFieldrequired (bool isRequired)
 Set the required status of this Field. More...
 
bool isRequired () const
 Return the required status of this Field. More...
 
AggregateFielddefaultValue (const std::string &value)
 Set the default value of this Field. More...
 
AggregateFielddefaultValue (const char *value)
 Set the default value of this Field. More...
 
AggregateFielddefaultValue (bool value)
 Set the default value of this Field. More...
 
AggregateFielddefaultValue (int value)
 Set the default value of this Field. More...
 
AggregateFielddefaultValue (double value)
 Set the default value of this Field. More...
 
AggregateFieldrange (double startVal, double endVal)
 Set the range of this Field. More...
 
AggregateFieldrange (int startVal, int endVal)
 Set the range of this Field. More...
 
AggregateFieldvalidValues (const std::vector< int > &set)
 Set the valid values for this Field. More...
 
AggregateFieldvalidValues (const std::vector< double > &set)
 Set the valid values for this Field. More...
 
AggregateFieldvalidValues (const std::vector< std::string > &set)
 Set the valid values for this Field. More...
 
AggregateFieldvalidValues (const std::initializer_list< const char *> &set)
 Set the valid values for this Field. More...
 
AggregateFieldvalidValues (const std::initializer_list< int > &set)
 Set the valid values for this Field. More...
 
AggregateFieldvalidValues (const std::initializer_list< double > &set)
 Set the valid values for this Field. More...
 
AggregateFieldregisterVerifier (std::function< bool(const Field &)> lambda)
 Registers the function object that will verify this Field's contents during the verification stage. More...
 
virtual VerifiableScalarregisterVerifier (std::function< bool(const axom::inlet::Field &)> lambda)=0
 Registers the function object that will verify this object's contents during the verification stage. More...
 

Detailed Description

A wrapper class that enables constraints on groups of Fields.

Constructor & Destructor Documentation

◆ AggregateField()

◆ ~AggregateField()

virtual axom::inlet::AggregateField::~AggregateField ( )
virtualdefault

Member Function Documentation

◆ verify()

bool axom::inlet::AggregateField::verify ( ) const
virtual

Called by Inlet::verify to verify the contents of this Field.

Implements axom::inlet::VerifiableScalar.

◆ required()

AggregateField& axom::inlet::AggregateField::required ( bool  isRequired)
virtual

Set the required status of this Field.

Set whether this Field is required, or not, to be in the input file. The default behavior is to not be required.

Parameters
[in]isRequiredBoolean value of whether Field is required
Returns
Reference to this instance of this class

Implements axom::inlet::VerifiableScalar.

◆ isRequired()

bool axom::inlet::AggregateField::isRequired ( ) const
virtual

Return the required status of this Field.

Return that this Field is required, or not, to be in the input file. The default behavior is to not be required.

Returns
Boolean value of whether this Field is required

Implements axom::inlet::VerifiableScalar.

◆ defaultValue() [1/5]

AggregateField& axom::inlet::AggregateField::defaultValue ( const std::string &  value)
virtual

Set the default value of this Field.

Set the default value for the Field in the input file.

Parameters
[in]valueThe default string value
Returns
Reference to this Field instance

Implements axom::inlet::VerifiableScalar.

◆ defaultValue() [2/5]

AggregateField& axom::inlet::AggregateField::defaultValue ( const char *  value)
virtual

Set the default value of this Field.

Set the default value for the Field in the input file.

Parameters
[in]valueThe default string value
Returns
Reference to this Field instance

Implements axom::inlet::VerifiableScalar.

◆ defaultValue() [3/5]

AggregateField& axom::inlet::AggregateField::defaultValue ( bool  value)
virtual

Set the default value of this Field.

Set the default value for the Field in the input file.

Parameters
[in]valueThe default boolean value
Returns
Reference to this Field instance

Implements axom::inlet::VerifiableScalar.

◆ defaultValue() [4/5]

AggregateField& axom::inlet::AggregateField::defaultValue ( int  value)
virtual

Set the default value of this Field.

Set the default value for the Field in the input file.

Parameters
[in]valueThe default integer value
Returns
Reference to this Field instance

Implements axom::inlet::VerifiableScalar.

◆ defaultValue() [5/5]

AggregateField& axom::inlet::AggregateField::defaultValue ( double  value)
virtual

Set the default value of this Field.

Set the default value for the Field in the input file.

Parameters
[in]valueThe default double value
Returns
Reference to this Field instance

Implements axom::inlet::VerifiableScalar.

◆ range() [1/2]

AggregateField& axom::inlet::AggregateField::range ( double  startVal,
double  endVal 
)
virtual

Set the range of this Field.

Set the continuous range for the Field in the input file.

Parameters
[in]startValThe start of the range
[in]endValThe end of the range
Returns
Reference to this Field instance

Implements axom::inlet::VerifiableScalar.

◆ range() [2/2]

AggregateField& axom::inlet::AggregateField::range ( int  startVal,
int  endVal 
)
virtual

Set the range of this Field.

Set the continuous range for the Field in the input file.

Parameters
[in]startValThe start of the range
[in]endValThe end of the range
Returns
Reference to this Field instance

Implements axom::inlet::VerifiableScalar.

◆ validValues() [1/6]

AggregateField& axom::inlet::AggregateField::validValues ( const std::vector< int > &  set)
virtual

Set the valid values for this Field.

Parameters
[in]setAn vector containing the set of allowed integer values
Returns
Reference to this Field instance

Implements axom::inlet::VerifiableScalar.

◆ validValues() [2/6]

AggregateField& axom::inlet::AggregateField::validValues ( const std::vector< double > &  set)
virtual

Set the valid values for this Field.

Parameters
[in]setAn vector containing the set of allowed double values
Returns
Reference to this Field instance

Implements axom::inlet::VerifiableScalar.

◆ validValues() [3/6]

AggregateField& axom::inlet::AggregateField::validValues ( const std::vector< std::string > &  set)
virtual

Set the valid values for this Field.

Parameters
[in]setA vector containing the set of allowed string values
Returns
Reference to this Field instance

Implements axom::inlet::VerifiableScalar.

◆ validValues() [4/6]

AggregateField& axom::inlet::AggregateField::validValues ( const std::initializer_list< const char *> &  set)
virtual

Set the valid values for this Field.

Parameters
[in]setAn initializer list containing the set of allowed C-string values
Returns
Reference to this Field instance

Implements axom::inlet::VerifiableScalar.

◆ validValues() [5/6]

AggregateField& axom::inlet::AggregateField::validValues ( const std::initializer_list< int > &  set)
virtual

Set the valid values for this Field.

Parameters
[in]setAn initializer list containing the valid integer values
Returns
Reference to this Field instance

Implements axom::inlet::VerifiableScalar.

◆ validValues() [6/6]

AggregateField& axom::inlet::AggregateField::validValues ( const std::initializer_list< double > &  set)
virtual

Set the valid values for this Field.

Parameters
[in]setAn initializer list containing the valid double values
Returns
Reference to this Field instance

Implements axom::inlet::VerifiableScalar.

◆ registerVerifier() [1/2]

AggregateField& axom::inlet::AggregateField::registerVerifier ( std::function< bool(const Field &)>  lambda)

Registers the function object that will verify this Field's contents during the verification stage.

Parameters
[in]Thefunction object that will be called by Field::verify().
Returns
Reference to this Field instance

◆ registerVerifier() [2/2]

virtual VerifiableScalar& axom::inlet::VerifiableScalar::registerVerifier ( std::function< bool(const axom::inlet::Field &)>  lambda)
pure virtualinherited

Registers the function object that will verify this object's contents during the verification stage.

Parameters
[in]Thefunction object.

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