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

Implementation of the Verifiable interface for aggregates of BaseTypes. More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/inlet/Verifiable.hpp>

Inheritance diagram for axom::inlet::AggregateVerifiable< BaseType >:

Public Types

using Verifier = std::function< bool(const BaseType &, std::vector< VerificationError > *errors)>
 

Public Member Functions

 AggregateVerifiable (std::vector< std::reference_wrapper< BaseVerifiable >> &&verifiables)
 
AggregateVerifiablerequired (bool isRequired=true) override
 Set the required status of this object. More...
 
bool isRequired () const override
 Return the required status. More...
 
AggregateVerifiableregisterVerifier (typename Verifiable< BaseType >::Verifier lambda) override
 
bool verify (std::vector< VerificationError > *errors=nullptr) const override
 Verifies the object to make sure it satisfies the imposed requirements. More...
 
Verifiable< BaseType > & registerVerifier (std::function< bool(const BaseType &)> verifier)
 Registers the function object that will verify this object's contents during the verification stage. More...
 
virtual Verifiable< BaseType > & registerVerifier (Verifier verifier)=0
 Registers the function object that will verify this object's contents during the verification stage. More...
 

Detailed Description

template<typename BaseType>
class axom::inlet::AggregateVerifiable< BaseType >

Implementation of the Verifiable interface for aggregates of BaseTypes.

Template Parameters
BaseTypeThe "base" type of the object, used for the argument type of a verifying predicate

In practice this interface is used for the Container and Function classes.

Member Typedef Documentation

◆ Verifier

template<typename BaseType >
using axom::inlet::Verifiable< BaseType >::Verifier = std::function<bool(const BaseType&, std::vector<VerificationError>* errors)>
inherited

A function which can verify the contents of the item being verifier. It should report any errors via INLET_VERIFICATION_WARNING, passing in the given array of errors.

Constructor & Destructor Documentation

◆ AggregateVerifiable()

template<typename BaseType >
axom::inlet::AggregateVerifiable< BaseType >::AggregateVerifiable ( std::vector< std::reference_wrapper< BaseVerifiable >> &&  verifiables)
inline

Member Function Documentation

◆ required()

template<typename BaseType >
AggregateVerifiable& axom::inlet::AggregateVerifiable< BaseType >::required ( bool  isRequired = true)
inlineoverridevirtual

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]isRequiredBoolean value of whether object is required
Returns
Reference to calling object, for chaining

Implements axom::inlet::Verifiable< BaseType >.

References axom::inlet::AggregateVerifiable< BaseType >::isRequired(), and axom::inlet::AggregateVerifiable< BaseType >::required().

◆ isRequired()

template<typename BaseType >
bool axom::inlet::AggregateVerifiable< BaseType >::isRequired ( ) const
inlineoverridevirtual

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

Implements axom::inlet::Verifiable< BaseType >.

◆ registerVerifier() [1/3]

template<typename BaseType >
AggregateVerifiable& axom::inlet::AggregateVerifiable< BaseType >::registerVerifier ( typename Verifiable< BaseType >::Verifier  lambda)
inlineoverride

◆ verify()

template<typename BaseType >
bool axom::inlet::AggregateVerifiable< BaseType >::verify ( std::vector< VerificationError > *  errors = nullptr) const
inlineoverridevirtual

Verifies the object to make sure it satisfies the imposed requirements.

Parameters
[in]errorsAn 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::Verifiable< BaseType >.

◆ registerVerifier() [2/3]

template<typename BaseType >
Verifiable<BaseType>& axom::inlet::Verifiable< BaseType >::registerVerifier ( std::function< bool(const BaseType &)>  verifier)
inlineinherited

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

Parameters
[in]verifierThe function object.

◆ registerVerifier() [3/3]

template<typename BaseType >
virtual Verifiable<BaseType>& axom::inlet::Verifiable< BaseType >::registerVerifier ( Verifier  verifier)
pure virtualinherited

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

Parameters
[in]verifierThe function which will verify the contents of the container.

Implemented in axom::inlet::Function, and axom::inlet::Container.


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