54 MooseEnum(std::string names, std::string default_name =
"",
bool allow_out_of_range =
false);
109 void assign(
const std::string & name,
const std::optional<std::string> & context = {});
132 template <
typename T>
149 template <
typename T>
153 #ifdef LIBMESH_HAVE_CXX11_TYPE_TRAITS 154 static_assert(std::is_enum<T>::value ==
true,
155 "The type requested from MooseEnum::getEnum must be an enum type!\n\n");
bool operator!=(const char *value) const
CompareMode
Enum item for controlling comparison in the compareCurrent method.
static const int INVALID_ID
T getEnum() const
get the current value cast to the enum type T
virtual void checkDeprecated() const override
Check whether the current value is deprecated when called.
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
The base class for both the MooseEnum and MultiMooseEnum classes.
MooseEnumItem _current
The current id.
MooseEnum()
Constructor for use by libmesh::Parameters and ReporterMode.
virtual ~MooseEnum()=default
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
const std::string & rawName() const
void assign(const std::string &name, const std::optional< std::string > &context={})
friend std::ostream & operator<<(std::ostream &out, const MooseEnum &obj)
Operator for printing to iostreams.
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.
OStreamProxy out(std::cout)
virtual bool isValid() const override
IsValid.
void ErrorVector unsigned int