Enum for Convergence iteration type, which can have new values registered. More...
#include <ConvergenceIterationTypeEnum.h>
Public Types | |
enum | CompareMode { CompareMode::COMPARE_NAME, CompareMode::COMPARE_ID, CompareMode::COMPARE_BOTH } |
Enum item for controlling comparison in the compareCurrent method. More... | |
Public Member Functions | |
ConvergenceIterationTypeEnum () | |
const MooseEnumItem & | addConvergenceIterationType (const std::string &raw_name) |
Add a new Convergence iteration type. More... | |
operator int () const | |
Cast operators to make this object behave as value_types and std::string these methods can be used so that this class behaves more like a normal value_type enumeration. More... | |
operator std::string () const | |
bool | operator== (const char *value) const |
Comparison operators for comparing with character constants, MooseEnums or integer values. More... | |
bool | operator== (int value) const |
bool | operator== (unsigned short value) const |
bool | operator== (const MooseEnum &value) const |
bool | operator!= (const char *value) const |
bool | operator!= (int value) const |
bool | operator!= (unsigned short value) const |
bool | operator!= (const MooseEnum &value) const |
bool | compareCurrent (const MooseEnum &other, CompareMode mode=CompareMode::COMPARE_NAME) const |
Method for comparing currently set values between MooseEnum. More... | |
virtual bool | isValid () const override |
IsValid. More... | |
template<typename T > | |
T | getEnum () const |
get the current value cast to the enum type T More... | |
virtual void | deprecate (const std::string &name, const std::string &raw_name="") |
Deprecates various options in the MOOSE enum. More... | |
std::vector< std::string > | getNames () const |
Method for returning a vector of all valid enumeration names for this instance. More... | |
std::string | getRawNames () const |
Method for returning the raw name strings for this instance. More... | |
std::vector< int > | getIDs () const |
Method for returning a vector of ids for this instance. More... | |
bool | isOutOfRangeAllowed () const |
isOutOfRangeAllowed More... | |
const std::set< MooseEnumItem > & | items () const |
Return the complete set of available flags. More... | |
void | addDocumentation (const std::string &name, const std::string &doc) |
Add an item documentation string. More... | |
const std::map< MooseEnumItem, std::string > & | getItemDocumentation () const |
Get the map containing each item's documentation string. More... | |
int | getNextValidID () const |
Compute the next valid ID. More... | |
MooseEnumBase & | operator+= (const std::string &name) |
Adds an enumeration item from name. More... | |
MooseEnumBase & | operator+= (const std::initializer_list< std::string > &names) |
Adds enumeration items from a list of names. More... | |
void | assign (const std::string &name, const std::optional< std::string > &context={}) |
void | assign (int value) |
void | assign (const MooseEnumItem &item) |
std::set< MooseEnumItem >::const_iterator | find (const MooseEnumItem &other) const |
Locate an item. More... | |
std::set< MooseEnumItem >::const_iterator | find (const std::string &name) const |
std::set< MooseEnumItem >::const_iterator | find (int id) const |
Protected Member Functions | |
virtual void | checkDeprecated () const override |
Check whether the current value is deprecated when called. More... | |
void | checkDeprecated (const MooseEnumItem &item) const |
Check and warn deprecated values. More... | |
void | addEnumerationNames (const std::string &names) |
Methods to add possible enumeration value to the enum. More... | |
const MooseEnumItem & | addEnumerationName (const std::string &raw_name) |
const MooseEnumItem & | addEnumerationName (const std::string &name, const int &value) |
const MooseEnumItem & | addEnumerationItem (const MooseEnumItem &item) |
Protected Attributes | |
std::set< MooseEnumItem > | _items |
Storage for the assigned items. More... | |
std::map< MooseEnumItem, MooseEnumItem > | _deprecated_items |
The map of deprecated names and optional replacements. More... | |
bool | _allow_out_of_range |
Flag to enable enumeration items not previously defined. More... | |
std::map< MooseEnumItem, std::string > | _item_documentation |
The map of items and their respective documentation strings. More... | |
Enum for Convergence iteration type, which can have new values registered.
Definition at line 17 of file ConvergenceIterationTypeEnum.h.
|
stronginherited |
Enum item for controlling comparison in the compareCurrent method.
Enumerator | |
---|---|
COMPARE_NAME | |
COMPARE_ID | |
COMPARE_BOTH |
Definition at line 39 of file MooseEnum.h.
|
inline |
Definition at line 20 of file ConvergenceIterationTypeEnum.h.
|
inline |
Add a new Convergence iteration type.
Definition at line 23 of file ConvergenceIterationTypeEnum.h.
Referenced by moose::internal::ConvergenceIterationTypeRegistry::registerType().
|
inherited |
Add an item documentation string.
Definition at line 175 of file MooseEnumBase.C.
Referenced by PseudoTimestep::validParams(), and ReferenceResidualInterface::validParams().
|
protectedinherited |
Definition at line 117 of file MooseEnumBase.C.
Referenced by ExecFlagEnum::addAvailableFlags(), MooseEnumBase::addEnumerationName(), MultiMooseEnum::addValidName(), MultiMooseEnum::assignValues(), and ReporterProducerEnum::insert().
|
protectedinherited |
Definition at line 73 of file MooseEnumBase.C.
Referenced by addConvergenceIterationType(), MooseEnumBase::addEnumerationNames(), MultiMooseEnum::addValidName(), and MooseEnumBase::operator+=().
|
protectedinherited |
Definition at line 111 of file MooseEnumBase.C.
|
protectedinherited |
Methods to add possible enumeration value to the enum.
The MooseEnum/MultiMooseEnum are not designed to be modified, with respect to the list of possible values. However, this is not the case for the ExecFlagEnum which is a special type of MultiMooseEnum for managing the "execute_on" flags. These methods are used by ExecFlagEnum to allow users to modify the available execute flags for their object.
Definition at line 64 of file MooseEnumBase.C.
Referenced by MooseEnumBase::MooseEnumBase().
|
inherited |
Definition at line 60 of file MooseEnum.C.
Referenced by ReporterContextBase::init(), and MooseEnum::operator=().
Definition at line 91 of file MooseEnum.C.
|
inherited |
Definition at line 113 of file MooseEnum.C.
|
overrideprotectedvirtualinherited |
Check whether the current value is deprecated when called.
Implements MooseEnumBase.
Definition at line 203 of file MooseEnum.C.
Referenced by MooseEnum::assign().
|
protectedinherited |
Check and warn deprecated values.
Definition at line 136 of file MooseEnumBase.C.
|
inherited |
Method for comparing currently set values between MooseEnum.
Definition at line 172 of file MooseEnum.C.
|
virtualinherited |
Deprecates various options in the MOOSE enum.
For each deprecated option, you may supply an optional new option that will be used in a message telling the user which new option replaces the old one.
Definition at line 45 of file MooseEnumBase.C.
|
inherited |
Locate an item.
Definition at line 206 of file MooseEnumBase.C.
Referenced by MooseEnumBase::addDocumentation(), MooseEnumBase::addEnumerationItem(), ExecFlagEnum::appendCurrent(), MooseEnum::assign(), MultiMooseEnum::assignValues(), MooseEnumBase::deprecate(), FVAdvection::FVAdvection(), MooseEnum::operator==(), moose::internal::ExecFlagRegistry::registerFlag(), moose::internal::ConvergenceIterationTypeRegistry::registerType(), ExecFlagEnum::removeAvailableFlags(), ReadExecutorParamsAction::setupAutoPreconditioning(), and CreateExecutionerAction::setupAutoPreconditioning().
|
inherited |
Definition at line 190 of file MooseEnumBase.C.
|
inherited |
Definition at line 199 of file MooseEnumBase.C.
|
inherited |
get the current value cast to the enum type T
Definition at line 151 of file MooseEnum.h.
|
inherited |
Method for returning a vector of ids for this instance.
Definition at line 165 of file MooseEnumBase.C.
Referenced by MooseEnum::assign().
|
inherited |
Get the map containing each item's documentation string.
Definition at line 184 of file MooseEnumBase.C.
|
inherited |
Method for returning a vector of all valid enumeration names for this instance.
Definition at line 149 of file MooseEnumBase.C.
|
inherited |
Compute the next valid ID.
Definition at line 102 of file MooseEnumBase.C.
Referenced by MooseEnumBase::addEnumerationName(), MultiMooseEnum::addValidName(), MooseEnum::assign(), MultiMooseEnum::assignValues(), and moose::internal::ExecFlagRegistry::registerFlag().
|
inherited |
Method for returning the raw name strings for this instance.
Definition at line 159 of file MooseEnumBase.C.
Referenced by MooseEnum::assign(), MultiMooseEnum::assignValues(), Moose::createMapFromVectorAndMultiMooseEnum(), AdvancedOutput::enableOutputTypes(), MooseEnum::operator==(), PiecewiseConstant::validParams(), LeastSquaresFit::validParams(), BatchMeshGeneratorAction::validParams(), and ComparisonPostprocessor::validParams().
|
inlineinherited |
isOutOfRangeAllowed
Definition at line 88 of file MooseEnumBase.h.
|
inlineoverridevirtualinherited |
IsValid.
Implements MooseEnumBase.
Definition at line 118 of file MooseEnum.h.
Referenced by MultiAppPostprocessorTransfer::MultiAppPostprocessorTransfer().
|
inlineinherited |
Return the complete set of available flags.
Definition at line 93 of file MooseEnumBase.h.
Referenced by MooseEnum::assign(), FVAdvection::FVAdvection(), moose::internal::ConvergenceIterationTypeRegistry::registerType(), CreateExecutionerAction::setupAutoPreconditioning(), and ReadExecutorParamsAction::setupAutoPreconditioning().
|
inlineinherited |
Cast operators to make this object behave as value_types and std::string these methods can be used so that this class behaves more like a normal value_type enumeration.
Definition at line 74 of file MooseEnum.h.
|
inlineinherited |
Definition at line 75 of file MooseEnum.h.
|
inherited |
Definition at line 142 of file MooseEnum.C.
|
inherited |
Definition at line 154 of file MooseEnum.C.
|
inherited |
Definition at line 166 of file MooseEnum.C.
|
inherited |
Definition at line 195 of file MooseEnum.C.
|
inherited |
Adds an enumeration item from name.
Definition at line 216 of file MooseEnumBase.C.
Referenced by MultiMooseEnum::operator+=().
|
inherited |
Adds enumeration items from a list of names.
Definition at line 224 of file MooseEnumBase.C.
|
inherited |
Comparison operators for comparing with character constants, MooseEnums or integer values.
value | - RHS value to compare against |
Definition at line 129 of file MooseEnum.C.
|
inherited |
Definition at line 148 of file MooseEnum.C.
|
inherited |
Definition at line 160 of file MooseEnum.C.
|
inherited |
Definition at line 187 of file MooseEnum.C.
|
protectedinherited |
Flag to enable enumeration items not previously defined.
Definition at line 163 of file MooseEnumBase.h.
Referenced by MooseEnum::assign(), MultiMooseEnum::assignValues(), MooseEnumBase::isOutOfRangeAllowed(), and MooseEnum::operator==().
|
protectedinherited |
The map of deprecated names and optional replacements.
Definition at line 160 of file MooseEnumBase.h.
Referenced by MooseEnumBase::checkDeprecated(), and MooseEnumBase::deprecate().
|
protectedinherited |
The map of items and their respective documentation strings.
Definition at line 166 of file MooseEnumBase.h.
Referenced by MooseEnumBase::addDocumentation(), and MooseEnumBase::getItemDocumentation().
|
protectedinherited |
Storage for the assigned items.
Definition at line 157 of file MooseEnumBase.h.
Referenced by MooseEnumBase::addDocumentation(), MooseEnumBase::addEnumerationItem(), MultiMooseEnum::addValidName(), ExecFlagEnum::appendCurrent(), MooseEnum::assign(), MultiMooseEnum::assignValues(), ReporterProducerEnum::clear(), MooseEnumBase::deprecate(), MooseEnumBase::find(), MooseEnumBase::getIDs(), MooseEnumBase::getNames(), MooseEnumBase::getNextValidID(), MooseEnumBase::getRawNames(), ExecFlagEnum::items(), MooseEnumBase::items(), MooseEnum::operator==(), and ExecFlagEnum::removeAvailableFlags().