21 template <
typename T,
typename C>
34 template <
typename T,
typename C>
39 mooseAssert(keys.size() == values.size(),
40 "Map should be made from keys (" + std::to_string(keys.size()) +
") and values (" +
41 std::to_string(values.size()) +
") of the same size");
48 std::transform(keys.begin(),
51 std::inserter(map, map.end()),
52 [](
const T & a,
const C & b) {
return std::make_pair(a, b); });
57 std::map<T, MooseEnum>
60 std::map<T, MooseEnum> map;
61 mooseAssert(keys.size() == values.
size(),
62 "Map should be made from keys and values of the same size");
66 std::transform(keys.begin(),
69 std::inserter(map, map.end()),
75 return std::make_pair(a, single_value);
const std::string & name() const
MooseEnumIterator begin() const
Returns a begin/end iterator to all of the set values in the enum.
unsigned int size() const
Return the number of active items in the MultiMooseEnum.
std::string getRawNames() const
Method for returning the raw name strings for this instance.
std::map< T, MooseEnum > createMapFromVectorAndMultiMooseEnum(const std::vector< T > &keys, const MultiMooseEnum &values)
Create a map from a vector of keys and MultiMooseEnum acting as a vector.
std::map< T, C > createMapFromVectors(const std::vector< T > &keys, const std::vector< C > &values)
Create a map from two vectors.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Class for containing MooseEnum item information.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type...