42 #ifndef CAST_IQ_MEMBER_H
43 #define CAST_IQ_MEMBER_H
49 #include "IterationPack_AlgorithmState.hpp"
50 #include "IterationPack_IterQuantityAccess.hpp"
52 namespace IterationPack {
62 const std::string&
iq_name()
const;
78 enum { NOT_SET_YET = AlgorithmState::DOES_NOT_EXIST - 1 };
187 if( iq_id_ == AlgorithmState::DOES_NOT_EXIST )
201 if( iq_id_ == AlgorithmState::DOES_NOT_EXIST )
212 #endif // CAST_IQ_MEMBER_H
IterQuantityAccess< T > & operator()(AlgorithmState &s) const
Get the iteration quantity from an AlgorithmState object.
const std::string iq_name_
void cache_iq_id(const AlgorithmState &s) const
Template class to be used to lookup an interation quantity, cast it to an IterQuantityAccess<T> objec...
Interface to typed iteration quantities.
bool exists_in(const AlgorithmState &s) const
Returns if the iteration quantity exists in the state object.
const std::string & iq_name() const
Name returns the name of the iteration quantity.
virtual IterQuantity & iter_quant(const std::string &iq_name)
Iteration quantity encapsulation object access with via iq_name.
Abstacts a set of iteration quantities for an iterative algorithm.
Base class for some of the implementation features of CastIQMember.
AlgorithmState::iq_id_type iq_id_
void throw_cast_error(const AlgorithmState::iq_id_type iq_id, const std::string &iqa_name) const