68 std::set<MooseEnumItem>::const_iterator iter =
find(
name);
72 mooseError(context ? (*context +
":\n\n") : std::string(
""),
75 "\" in MooseEnum. Valid options (not case-sensitive) are \"",
99 std::set<MooseEnumItem>::const_iterator iter =
find(
value);
103 "\" in MooseEnum. Valid ids are \"",
115 std::set<MooseEnumItem>::const_iterator iter =
find(item);
119 "\" in MooseEnum. Valid ids are \"",
134 "Invalid string comparison \"" + upper +
135 "\" in MooseEnum. Valid options (not case-sensitive) are \"" +
getRawNames() +
144 return !(*
this ==
name);
189 mooseDeprecated(
"This method will be removed because the meaning is not well defined, please use " 190 "the 'compareCurrent' method instead.");
197 mooseDeprecated(
"This method will be removed because the meaning is not well defined, please use " 198 "the 'compareCurrent' method instead.");
std::string name(const ElemQuality q)
int getNextValidID() const
Compute the next valid ID.
bool operator!=(const char *value) const
const std::set< MooseEnumItem > & items() const
Return the complete set of available flags.
const std::string & name() const
std::string toUpper(const std::string &name)
Convert supplied string to upper case.
CompareMode
Enum item for controlling comparison in the compareCurrent method.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
static const int INVALID_ID
virtual void checkDeprecated() const override
Check whether the current value is deprecated when called.
std::string getRawNames() const
Method for returning the raw name strings for this instance.
The base class for both the MooseEnum and MultiMooseEnum classes.
MooseEnumItem _current
The current id.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
MooseEnum()
Constructor for use by libmesh::Parameters and ReporterMode.
virtual void checkDeprecated() const =0
Method that must be implemented to check derived class values against the _deprecated_names.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
std::vector< int > getIDs() const
Method for returning a vector of ids for this instance.
std::string stringify(const T &t)
conversion to string
void assign(const std::string &name, const std::optional< std::string > &context={})
std::set< MooseEnumItem > _items
Storage for the assigned items.
const int & id() const
Return the numeric, name, or raw name.
MooseEnum & operator=(const MooseEnum &other_enum)=default
Copy Assignment operator must be explicitly defined when a copy ctor exists and this method is used...
Class for containing MooseEnum item information.
bool operator==(const char *value) const
Comparison operators for comparing with character constants, MooseEnums or integer values...
bool compareCurrent(const MooseEnum &other, CompareMode mode=CompareMode::COMPARE_NAME) const
Method for comparing currently set values between MooseEnum.
std::set< MooseEnumItem >::const_iterator find(const MooseEnumItem &other) const
Locate an item.
bool _allow_out_of_range
Flag to enable enumeration items not previously defined.