2024-12-21 23:07:23 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
2025-01-23 21:55:41 +01:00
|
|
|
#include <hyprutils/memory/UniquePtr.hpp>
|
2024-12-21 23:07:23 +00:00
|
|
|
|
|
|
|
|
//NOLINTNEXTLINE
|
|
|
|
|
namespace re2 {
|
|
|
|
|
class RE2;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class CRuleRegexContainer {
|
|
|
|
|
public:
|
|
|
|
|
CRuleRegexContainer() = default;
|
|
|
|
|
|
|
|
|
|
CRuleRegexContainer(const std::string& regex);
|
|
|
|
|
|
|
|
|
|
bool passes(const std::string& str) const;
|
|
|
|
|
|
|
|
|
|
private:
|
2025-01-23 21:55:41 +01:00
|
|
|
Hyprutils::Memory::CUniquePointer<re2::RE2> regex;
|
|
|
|
|
bool negative = false;
|
2024-12-21 23:07:23 +00:00
|
|
|
};
|