2023-09-09 14:32:55 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <map>
|
2023-09-09 16:18:12 +00:00
|
|
|
#include <stdexcept>
|
2023-09-09 14:32:55 +00:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace waybar::util {
|
|
|
|
|
2023-09-09 16:18:12 +00:00
|
|
|
template <typename EnumType>
|
2023-09-09 14:32:55 +00:00
|
|
|
struct EnumParser {
|
2023-09-09 22:48:36 +00:00
|
|
|
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,
|
2023-09-09 22:48:36 +00:00
|
|
|
const std::map<std::string, EnumType>& enumMap);
|
2023-09-09 14:32:55 +00:00
|
|
|
};
|
2023-09-09 22:48:36 +00:00
|
|
|
|
2023-09-09 14:32:55 +00:00
|
|
|
} // namespace waybar::util
|