37 template <
typename EnumT>
38 std::vector<std::pair<std::string, EnumT>>
enumMap();
41 template <
typename EnumT>
44 std::vector<std::string> v;
45 for (
const auto& p : enumMap<EnumT>())
51 template <
typename EnumT>
54 for (
const auto& p : enumMap<EnumT>())
58 throw std::runtime_error(
"Could not match enum '" + v +
"'");
59 return static_cast<EnumT
>(0);
63 template <
typename EnumT>
66 for (
const auto& p : enumMap<EnumT>())
70 throw std::runtime_error(
"Could not match enum");
EnumT stringToEnum(const std::string &v)
std::string enumToString(const EnumT v)
std::vector< std::string > enumNames()
std::vector< std::pair< std::string, GeometryQuality > > enumMap()