Waybar/include/util/enum.hpp

20 lines
351 B
C++
Raw Normal View History

2023-09-09 14:32:55 +00:00
#pragma once
#include <map>
#include <stdexcept>
2023-09-09 14:32:55 +00:00
#include <string>
namespace waybar::util {
template <typename EnumType>
2023-09-09 14:32:55 +00:00
struct EnumParser {
public:
EnumParser();
~EnumParser();
2023-09-09 14:32:55 +00:00
2023-09-09 17:02:56 +00:00
EnumType parseStringToEnum(const std::string& str,
const std::map<std::string, EnumType>& enumMap);
2023-09-09 14:32:55 +00:00
};
2023-09-09 14:32:55 +00:00
} // namespace waybar::util