This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type. More...
#include <MultiMooseEnum.h>
Public Member Functions | |
MultiMooseEnum (std::string valid_names, bool allow_out_of_range=false) | |
Constructor that takes a list of valid enumeration values, and does not set this instance to any particular value. More... | |
MultiMooseEnum (const MultiMooseEnum &other_enum) | |
Copy Constructor. More... | |
MultiMooseEnum & | operator= (const MultiMooseEnum &other_enum)=default |
Copy Assignment operator must be explicitly defined when a copy ctor exists and this method is used. More... | |
const std::string & | operator[] (unsigned int i) const |
Indexing operator Operator to retrieve an item from the MultiMooseEnum. More... | |
unsigned int | get (unsigned int i) const |
Indexing operator Operator to retrieve the id of an item from the MultiMooseEnum. More... | |
template<typename T > | |
std::vector< T > | getEnum () const |
get the current values cast to a vector of enum type T. Deprecated, use getSetValueIDs instead. More... | |
template<typename T > | |
std::vector< T > | getSetValueIDs () const |
get the current values cast to a vector of enum type T More... | |
unsigned int | size () const |
Return the number of active items in the MultiMooseEnum. More... | |
virtual bool | isValid () const override |
IsValid. More... | |
MooseEnumBase & | operator+= (const std::string &name) |
MooseEnumBase & | operator+= (const std::initializer_list< std::string > &names) |
void | addValidName (const std::string &name) |
Extends the range of possible values the variable can be set to. More... | |
void | addValidName (const std::initializer_list< std::string > &names) |
void | addValidName (const MultiMooseEnum &names) |
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... | |
MultiMooseEnum (std::string valid_names, std::string initialization_values, bool allow_out_of_range=false) | |
Constructor that takes a list of valid enumeration values, and a separate string to set default values for this instance. More... | |
MultiMooseEnum (std::string valid_names, const char *initialization_values, bool allow_out_of_range=false) | |
bool | operator== (const MultiMooseEnum &value) const |
Comparison operators for comparing with character constants, MultiMooseEnums or integer values. More... | |
bool | operator!= (const MultiMooseEnum &value) const |
bool | contains (const std::string &value) const |
Methods for seeing if a value is set in the MultiMooseEnum. More... | |
bool | contains (int value) const |
bool | contains (unsigned short value) const |
bool | contains (const MultiMooseEnum &value) const |
bool | contains (const MooseEnumItem &value) const |
bool | isValueSet (const std::string &value) const |
Methods for seeing if a value is set in the MultiMooseEnum. More... | |
bool | isValueSet (int value) const |
bool | isValueSet (unsigned short value) const |
bool | isValueSet (const MultiMooseEnum &value) const |
bool | isValueSet (const MooseEnumItem &value) const |
MultiMooseEnum & | operator= (const std::string &names) |
Assignment operators to set the objects value from the list of possible values. More... | |
MultiMooseEnum & | operator= (const std::vector< std::string > &names) |
MultiMooseEnum & | operator= (const std::set< std::string > &names) |
void | erase (const std::string &names) |
Un-assign, or unset a value. More... | |
void | erase (const std::vector< std::string > &names) |
void | erase (const std::set< std::string > &names) |
void | eraseSetValue (const std::string &names) |
Un-assign, or unset a value. More... | |
void | eraseSetValue (const std::vector< std::string > &names) |
void | eraseSetValue (const std::set< std::string > &names) |
void | push_back (const std::string &names) |
Insert operators Operator to insert (push_back) values into the enum. More... | |
void | push_back (const std::vector< std::string > &names) |
void | push_back (const std::set< std::string > &names) |
void | push_back (const MultiMooseEnum &other_enum) |
void | setAdditionalValue (const std::string &names) |
Insert operators Operator to insert (push_back) values into the enum. More... | |
void | setAdditionalValue (const std::vector< std::string > &names) |
void | setAdditionalValue (const std::set< std::string > &names) |
void | setAdditionalValue (const MultiMooseEnum &other_enum) |
MooseEnumIterator | begin () const |
Returns a begin/end iterator to all of the set values in the enum. More... | |
MooseEnumIterator | end () const |
void | clearSetValues () |
Clear the MultiMooseEnum. More... | |
void | clear () |
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 any of the current values are deprecated when called. More... | |
template<typename InputIterator > | |
MultiMooseEnum & | assignValues (InputIterator first, InputIterator last, bool append) |
Helper method for all inserts and assignment operators. More... | |
template<typename InputIterator > | |
void | removeSetValues (InputIterator first, InputIterator last) |
Helper method for un-assigning enumeration values. More... | |
MultiMooseEnum () | |
Protected constructor for use by libmesh::Parameters. More... | |
MultiMooseEnum (const MooseEnumBase &other_enum) | |
Protected constructor that can accept a MooseEnumBase for ::withOptionsFrom() 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::vector< MooseEnumItem > | _current_values |
The current value(s) of the MultiMooseEnum. More... | |
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... | |
Friends | |
class | libMesh::Parameters |
std::ostream & | operator<< (std::ostream &out, const MultiMooseEnum &obj) |
Operator for printing to iostreams. More... | |
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type.
There are two parts to a MultiMooseEnum: 1) The list of all possible values that a variable can have and 2) The subset of these values that the variable is actually set to. It should be initialized with a comma-separated list of strings which become the possible enum values. You may also optionally supply numeric ints for one or more values similar to a C++ enum. This is done with the "=" sign. It can be used any place where an integer (switch statements), const char* or * std::string is expected. In addition the InputParameters system has full support for this Enum type.
Definition at line 41 of file MultiMooseEnum.h.
MultiMooseEnum::MultiMooseEnum | ( | std::string | valid_names, |
std::string | initialization_values, | ||
bool | allow_out_of_range = false |
||
) |
Constructor that takes a list of valid enumeration values, and a separate string to set default values for this instance.
valid_names | - a list of all possible values (names) for this enumeration |
initialization_values | - the value(s) to set this enumeration instance to |
allow_out_of_range | - determines whether this enumeration will accept values outside of its range of initially defined values. A value of true allows the addition of valid values to an object after it has been initialized. |
Definition at line 24 of file MultiMooseEnum.C.
MultiMooseEnum::MultiMooseEnum | ( | std::string | valid_names, |
const char * | initialization_values, | ||
bool | allow_out_of_range = false |
||
) |
Definition at line 32 of file MultiMooseEnum.C.
MultiMooseEnum::MultiMooseEnum | ( | std::string | valid_names, |
bool | allow_out_of_range = false |
||
) |
Constructor that takes a list of valid enumeration values, and does not set this instance to any particular value.
valid_names | - a list of all possible values (names) for this enumeration |
allow_out_of_range | - determines whether this enumeration will accept values outside of its range of initially defined values. A value of true allows the addition of valid values to an object after it has been initialized. |
Definition at line 39 of file MultiMooseEnum.C.
MultiMooseEnum::MultiMooseEnum | ( | const MultiMooseEnum & | other_enum | ) |
Copy Constructor.
other_enum | - The other enumeration to copy state from |
Definition at line 45 of file MultiMooseEnum.C.
|
protected |
Protected constructor for use by libmesh::Parameters.
Private constuctor for use by libmesh::Parameters.
Definition at line 53 of file MultiMooseEnum.C.
|
protected |
Protected constructor that can accept a MooseEnumBase for ::withOptionsFrom()
other_enum | - MooseEnumBase type to copy names and out-of-range data from |
Definition at line 55 of file MultiMooseEnum.C.
|
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(), addValidName(), assignValues(), and ReporterProducerEnum::insert().
|
protectedinherited |
Definition at line 73 of file MooseEnumBase.C.
Referenced by ConvergenceIterationTypeEnum::addConvergenceIterationType(), MooseEnumBase::addEnumerationNames(), 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().
void MultiMooseEnum::addValidName | ( | const std::string & | name | ) |
Extends the range of possible values the variable can be set to.
Definition at line 341 of file MultiMooseEnum.C.
Referenced by addValidName().
void MultiMooseEnum::addValidName | ( | const std::initializer_list< std::string > & | names | ) |
Definition at line 355 of file MultiMooseEnum.C.
void MultiMooseEnum::addValidName | ( | const MultiMooseEnum & | names | ) |
Definition at line 369 of file MultiMooseEnum.C.
|
protected |
Helper method for all inserts and assignment operators.
first | An iterator specifying the beginning of the range of values to set |
last | An iterator specifying the end of the range of values to set |
Definition at line 261 of file MultiMooseEnum.C.
Referenced by operator=(), and setAdditionalValue().
|
inline |
Returns a begin/end iterator to all of the set values in the enum.
Items will always be capitalized.
Definition at line 212 of file MultiMooseEnum.h.
Referenced by Moose::createMapFromVectorAndMultiMooseEnum(), FunctorADConverterTempl< T >::FunctorADConverterTempl(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), GenericFunctorGradientMaterialTempl< is_ad >::GenericFunctorGradientMaterialTempl(), GenericFunctorMaterialTempl< is_ad >::GenericFunctorMaterialTempl(), GenericFunctorTimeDerivativeMaterialTempl< is_ad >::GenericFunctorTimeDerivativeMaterialTempl(), GenericVectorFunctorMaterialTempl< is_ad >::GenericVectorFunctorMaterialTempl(), ParsedFunctorMaterialTempl< is_ad >::ParsedFunctorMaterialTempl(), PiecewiseByBlockFunctorMaterialTempl< T >::PiecewiseByBlockFunctorMaterialTempl(), setAdditionalValue(), and VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl().
|
protectedinherited |
Check and warn deprecated values.
Definition at line 136 of file MooseEnumBase.C.
|
overrideprotectedvirtual |
Check whether any of the current values are deprecated when called.
Implements MooseEnumBase.
Definition at line 327 of file MultiMooseEnum.C.
Referenced by addValidName(), assignValues(), and ExecFlagEnum::operator+=().
void MultiMooseEnum::clear | ( | ) |
Definition at line 314 of file MultiMooseEnum.C.
void MultiMooseEnum::clearSetValues | ( | ) |
Clear the MultiMooseEnum.
Definition at line 308 of file MultiMooseEnum.C.
Referenced by assignValues(), clear(), AdvancedOutput::initExecutionTypes(), ExecFlagEnum::operator=(), and SetupInterface::SetupInterface().
|
inline |
Methods for seeing if a value is set in the MultiMooseEnum.
Definition at line 102 of file MultiMooseEnum.h.
Referenced by SetupDebugAction::act(), EigenProblem::checkProblemIntegrity(), Moose::PetscSupport::dontAddPetscFlag(), Moose::PetscSupport::petscSetOptionsHelper(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), and Moose::PetscSupport::setSinglePetscOptionIfAppropriate().
|
inline |
Definition at line 103 of file MultiMooseEnum.h.
|
inline |
Definition at line 104 of file MultiMooseEnum.h.
|
inline |
Definition at line 105 of file MultiMooseEnum.h.
|
inline |
Definition at line 106 of file MultiMooseEnum.h.
|
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.
|
inline |
Definition at line 213 of file MultiMooseEnum.h.
Referenced by FunctorADConverterTempl< T >::FunctorADConverterTempl(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), GenericFunctorGradientMaterialTempl< is_ad >::GenericFunctorGradientMaterialTempl(), GenericFunctorMaterialTempl< is_ad >::GenericFunctorMaterialTempl(), GenericFunctorTimeDerivativeMaterialTempl< is_ad >::GenericFunctorTimeDerivativeMaterialTempl(), GenericVectorFunctorMaterialTempl< is_ad >::GenericVectorFunctorMaterialTempl(), ParsedFunctorMaterialTempl< is_ad >::ParsedFunctorMaterialTempl(), PiecewiseByBlockFunctorMaterialTempl< T >::PiecewiseByBlockFunctorMaterialTempl(), setAdditionalValue(), and VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl().
void MultiMooseEnum::erase | ( | const std::string & | names | ) |
Un-assign, or unset a value.
Deprecated, use eraseSetValue instead.
names | - a string, set, or vector giving the name to erase from the enumeration values |
Definition at line 149 of file MultiMooseEnum.C.
void MultiMooseEnum::erase | ( | const std::vector< std::string > & | names | ) |
Definition at line 162 of file MultiMooseEnum.C.
void MultiMooseEnum::erase | ( | const std::set< std::string > & | names | ) |
Definition at line 175 of file MultiMooseEnum.C.
void MultiMooseEnum::eraseSetValue | ( | const std::string & | names | ) |
Un-assign, or unset a value.
names | - a string, set, or vector giving the name to erase from the enumeration values |
Definition at line 141 of file MultiMooseEnum.C.
Referenced by Console::Console(), and erase().
void MultiMooseEnum::eraseSetValue | ( | const std::vector< std::string > & | names | ) |
Definition at line 156 of file MultiMooseEnum.C.
void MultiMooseEnum::eraseSetValue | ( | const std::set< std::string > & | names | ) |
Definition at line 169 of file MultiMooseEnum.C.
|
inherited |
Locate an item.
Definition at line 206 of file MooseEnumBase.C.
Referenced by MooseEnumBase::addDocumentation(), MooseEnumBase::addEnumerationItem(), ExecFlagEnum::appendCurrent(), MooseEnum::assign(), 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.
Indexing operator Operator to retrieve the id of an item from the MultiMooseEnum.
i | index corresponding to the desired item |
Definition at line 250 of file MultiMooseEnum.C.
Referenced by PiecewiseMulticonstant::sample(), Moose::Builder::setScalarParameter(), Moose::PetscSupport::storePetscOptions(), and Transfer::Transfer().
std::vector< T > MultiMooseEnum::getEnum | ( | ) | const |
get the current values cast to a vector of enum type T. Deprecated, use getSetValueIDs instead.
Definition at line 308 of file MultiMooseEnum.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(), addValidName(), MooseEnum::assign(), 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(), assignValues(), Moose::createMapFromVectorAndMultiMooseEnum(), AdvancedOutput::enableOutputTypes(), MooseEnum::operator==(), PiecewiseConstant::validParams(), LeastSquaresFit::validParams(), BatchMeshGeneratorAction::validParams(), and ComparisonPostprocessor::validParams().
std::vector< T > MultiMooseEnum::getSetValueIDs | ( | ) | const |
get the current values cast to a vector of enum type T
Definition at line 294 of file MultiMooseEnum.h.
|
inlineinherited |
isOutOfRangeAllowed
Definition at line 88 of file MooseEnumBase.h.
|
inlineoverridevirtual |
IsValid.
Implements MooseEnumBase.
Definition at line 233 of file MultiMooseEnum.h.
Referenced by SetupDebugAction::act(), IterationInfo::declareHelper(), MeshInfo::declareHelper(), MeshInfo::possiblyAddSidesetInfo(), MeshInfo::possiblyAddSubdomainInfo(), and BlockRestrictionDebugOutput::printBlockRestrictionMap().
bool MultiMooseEnum::isValueSet | ( | const std::string & | value | ) | const |
Methods for seeing if a value is set in the MultiMooseEnum.
Definition at line 76 of file MultiMooseEnum.C.
Referenced by Moose::PetscSupport::addPetscFlagsToPetscOptions(), FEProblemBase::addTransfer(), AdvancedOutput::addValidParams(), MultiAppVariableValueSamplePostprocessorTransfer::cacheElemToPostprocessorData(), ChangeOverFixedPointPostprocessor::ChangeOverFixedPointPostprocessor(), ChangeOverTimePostprocessor::ChangeOverTimePostprocessor(), contains(), IterationInfo::declareHelper(), MeshInfo::declareHelper(), EigenExecutionerBase::init(), MultiAppReporterTransfer::initialSetup(), IntegralPreservingFunctionIC::initialSetup(), MultiAppVariableValueSamplePostprocessorTransfer::initialSetup(), Console::initialSetup(), EigenExecutionerBase::inversePowerIteration(), isValueSet(), MultiAppReporterTransfer::MultiAppReporterTransfer(), MultiAppVariableValueSamplePostprocessorTransfer::MultiAppVariableValueSamplePostprocessorTransfer(), operator==(), Console::output(), JSONOutput::outputReporters(), Console::outputSystemInformation(), XMLOutput::outputVectorPostprocessors(), MeshInfo::possiblyAddSidesetInfo(), MeshInfo::possiblyAddSubdomainInfo(), EigenExecutionerBase::postExecute(), ExecFlagEnum::removeAvailableFlags(), MultiAppVariableValueSamplePostprocessorTransfer::setupPostprocessorCommunication(), PerfGraphOutput::shouldOutput(), Output::shouldOutput(), FEProblemBase::shouldPrintExecution(), ElementReporter::shouldStore(), NodalReporter::shouldStore(), and GeneralReporter::shouldStore().
bool MultiMooseEnum::isValueSet | ( | int | value | ) | const |
Definition at line 85 of file MultiMooseEnum.C.
bool MultiMooseEnum::isValueSet | ( | unsigned short | value | ) | const |
Definition at line 94 of file MultiMooseEnum.C.
bool MultiMooseEnum::isValueSet | ( | const MultiMooseEnum & | value | ) | const |
Definition at line 103 of file MultiMooseEnum.C.
bool MultiMooseEnum::isValueSet | ( | const MooseEnumItem & | value | ) | const |
Definition at line 112 of file MultiMooseEnum.C.
|
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().
bool MultiMooseEnum::operator!= | ( | const MultiMooseEnum & | value | ) | const |
Definition at line 70 of file MultiMooseEnum.C.
MooseEnumBase & MultiMooseEnum::operator+= | ( | const std::string & | name | ) |
Definition at line 348 of file MultiMooseEnum.C.
MooseEnumBase & MultiMooseEnum::operator+= | ( | const std::initializer_list< std::string > & | names | ) |
Definition at line 362 of file MultiMooseEnum.C.
|
default |
Copy Assignment operator must be explicitly defined when a copy ctor exists and this method is used.
MultiMooseEnum & MultiMooseEnum::operator= | ( | const std::string & | names | ) |
Assignment operators to set the objects value from the list of possible values.
names | - a string, set, or vector representing one of the enumeration values. |
Definition at line 121 of file MultiMooseEnum.C.
MultiMooseEnum & MultiMooseEnum::operator= | ( | const std::vector< std::string > & | names | ) |
Definition at line 129 of file MultiMooseEnum.C.
MultiMooseEnum & MultiMooseEnum::operator= | ( | const std::set< std::string > & | names | ) |
Definition at line 135 of file MultiMooseEnum.C.
bool MultiMooseEnum::operator== | ( | const MultiMooseEnum & | value | ) | const |
Comparison operators for comparing with character constants, MultiMooseEnums or integer values.
value | - RHS value to compare against |
Definition at line 58 of file MultiMooseEnum.C.
const std::string & MultiMooseEnum::operator[] | ( | unsigned int | i | ) | const |
Indexing operator Operator to retrieve an item from the MultiMooseEnum.
The reference may not be used to change the item.
i | index |
Definition at line 240 of file MultiMooseEnum.C.
void MultiMooseEnum::push_back | ( | const std::string & | names | ) |
Insert operators Operator to insert (push_back) values into the enum.
Existing values are preserved and duplicates are stored. Deprecated, use setAdditionalValue instead.
names | - a string, set, or vector representing the enumeration values to set. |
Definition at line 190 of file MultiMooseEnum.C.
void MultiMooseEnum::push_back | ( | const std::vector< std::string > & | names | ) |
Definition at line 204 of file MultiMooseEnum.C.
void MultiMooseEnum::push_back | ( | const std::set< std::string > & | names | ) |
Definition at line 218 of file MultiMooseEnum.C.
void MultiMooseEnum::push_back | ( | const MultiMooseEnum & | other_enum | ) |
Definition at line 232 of file MultiMooseEnum.C.
|
protected |
Helper method for un-assigning enumeration values.
first | An iterator specifying the beginning of the range of values to set |
last | An iterator specifying the end of the range of values to set |
Definition at line 293 of file MultiMooseEnum.C.
Referenced by eraseSetValue().
void MultiMooseEnum::setAdditionalValue | ( | const std::string & | names | ) |
Insert operators Operator to insert (push_back) values into the enum.
Existing values are preserved and duplicates are stored.
names | - a string, set, or vector representing the enumeration values to set. |
Definition at line 182 of file MultiMooseEnum.C.
Referenced by Moose::PetscSupport::addPetscFlagsToPetscOptions(), Moose::PetscSupport::addPetscPairsToPetscOptions(), Console::Console(), Moose::PetscSupport::dontAddCommonSNESOptions(), Moose::PetscSupport::dontAddPetscFlag(), MultiAppTransfer::MultiAppTransfer(), Output::Output(), PetscOutput::PetscOutput(), and push_back().
void MultiMooseEnum::setAdditionalValue | ( | const std::vector< std::string > & | names | ) |
Definition at line 198 of file MultiMooseEnum.C.
void MultiMooseEnum::setAdditionalValue | ( | const std::set< std::string > & | names | ) |
Definition at line 212 of file MultiMooseEnum.C.
void MultiMooseEnum::setAdditionalValue | ( | const MultiMooseEnum & | other_enum | ) |
Definition at line 226 of file MultiMooseEnum.C.
unsigned int MultiMooseEnum::size | ( | ) | const |
Return the number of active items in the MultiMooseEnum.
Definition at line 321 of file MultiMooseEnum.C.
Referenced by Moose::createMapFromVectorAndMultiMooseEnum(), Moose::LibtorchArtificialNeuralNet::forward(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), Moose::LibtorchArtificialNeuralNet::LibtorchArtificialNeuralNet(), MultiAppPostprocessorToAuxScalarTransfer::MultiAppPostprocessorToAuxScalarTransfer(), MultiAppPostprocessorTransfer::MultiAppPostprocessorTransfer(), MultiAppReporterTransfer::MultiAppReporterTransfer(), MultiAppScalarToAuxScalarTransfer::MultiAppScalarToAuxScalarTransfer(), MultiAppVariableValueSamplePostprocessorTransfer::MultiAppVariableValueSamplePostprocessorTransfer(), MultiAppVariableValueSampleTransfer::MultiAppVariableValueSampleTransfer(), MultiAppVectorPostprocessorTransfer::MultiAppVectorPostprocessorTransfer(), operator==(), PiecewiseMulticonstant::PiecewiseMulticonstant(), RefineSidesetGenerator::RefineSidesetGenerator(), MooseMesh::setCoordSystem(), Moose::Builder::setVectorParameter(), SidesetInfoVectorPostprocessor::SidesetInfoVectorPostprocessor(), and Transfer::Transfer().
|
friend |
Definition at line 237 of file MultiMooseEnum.h.
|
friend |
Operator for printing to iostreams.
Definition at line 334 of file MultiMooseEnum.C.
|
protectedinherited |
Flag to enable enumeration items not previously defined.
Definition at line 163 of file MooseEnumBase.h.
Referenced by MooseEnum::assign(), assignValues(), MooseEnumBase::isOutOfRangeAllowed(), and MooseEnum::operator==().
|
protected |
The current value(s) of the MultiMooseEnum.
Definition at line 278 of file MultiMooseEnum.h.
Referenced by ExecFlagEnum::appendCurrent(), assignValues(), begin(), checkDeprecated(), clearSetValues(), end(), get(), getSetValueIDs(), isValid(), isValueSet(), operator<<(), operator[](), removeSetValues(), and size().
|
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(), addValidName(), ExecFlagEnum::appendCurrent(), MooseEnum::assign(), assignValues(), ReporterProducerEnum::clear(), MooseEnumBase::deprecate(), MooseEnumBase::find(), MooseEnumBase::getIDs(), MooseEnumBase::getNames(), MooseEnumBase::getNextValidID(), MooseEnumBase::getRawNames(), ExecFlagEnum::items(), MooseEnumBase::items(), MooseEnum::operator==(), and ExecFlagEnum::removeAvailableFlags().