51 std::string default_names =
"",
52 bool allow_out_of_range =
false);
105 void erase(
const std::string & names);
106 void erase(
const std::vector<std::string> & names);
107 void erase(
const std::set<std::string> & names);
117 void push_back(
const std::string & names);
118 void push_back(
const std::vector<std::string> & names);
119 void push_back(
const std::set<std::string> & names);
130 const std::string &
operator[](
unsigned int i)
const;
138 unsigned int get(
unsigned int i)
const;
141 template <
typename T>
142 std::vector<T>
getEnum()
const;
161 unsigned int size()
const;
183 template <
typename InputIterator>
189 template <
typename InputIterator>
190 void remove(InputIterator first, InputIterator last);
212 template <
typename T>
216 #ifdef LIBMESH_HAVE_CXX11_TYPE_TRAITS 217 static_assert(std::is_enum<T>::value ==
true,
218 "The type requested from MooseEnum::getEnum must be an enum type!\n\n");
220 std::vector<T> enum_vec;
221 for (
const auto & current :
_current)
222 enum_vec.push_back(static_cast<T>(current.id()));
const std::string & operator[](unsigned int i) const
Indexing operator Operator to retrieve an item from the MultiMooseEnum.
virtual void checkDeprecated() const override
Check whether any of the current values are deprecated when called.
friend std::ostream & operator<<(std::ostream &out, const MultiMooseEnum &obj)
Operator for printing to iostreams.
A MultiMooseEnum object to hold "execute_on" flags.
MultiMooseEnum & assign(InputIterator first, InputIterator last, bool append)
Helper method for all inserts and assignment operators.
bool operator!=(const MultiMooseEnum &value) const
void setCurrentItems(const std::vector< MooseEnumItem > ¤t)
Set the current items.
std::vector< MooseEnumItem > _current
The current id.
MooseEnumIterator begin() const
Returns a begin/end iterator to all of the items in the enum.
MultiMooseEnum()
Protected constructor for use by libmesh::Parameters.
virtual bool isValid() const override
IsValid.
unsigned int size() const
Return the number of active items in the MultiMooseEnum.
MooseEnumIterator end() const
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
The base class for both the MooseEnum and MultiMooseEnum classes.
bool contains(const std::string &value) const
Contains methods for seeing if a value is in the MultiMooseEnum.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
std::vector< MooseEnumItem >::const_iterator MooseEnumIterator
void erase(const std::string &names)
Un-assign a value.
void clear()
Clear the MultiMooseEnum.
std::vector< T > getEnum() const
get the current values cast to a vector of enum type T
MultiMooseEnum & operator=(const MultiMooseEnum &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 MultiMooseEnum &value) const
Comparison operators for comparing with character constants, MultiMooseEnums or integer values...
void push_back(const std::string &names)
Insert operators Operator to insert (push_back) values into the enum.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
OStreamProxy out(std::cout)