diff options
Diffstat (limited to 'src/desktop/Rule.hpp')
-rw-r--r-- | src/desktop/Rule.hpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/desktop/Rule.hpp b/src/desktop/Rule.hpp new file mode 100644 index 00000000..4b178ee8 --- /dev/null +++ b/src/desktop/Rule.hpp @@ -0,0 +1,21 @@ +#pragma once + +#include <memory> + +//NOLINTNEXTLINE +namespace re2 { + class RE2; +}; + +class CRuleRegexContainer { + public: + CRuleRegexContainer() = default; + + CRuleRegexContainer(const std::string& regex); + + bool passes(const std::string& str) const; + + private: + std::unique_ptr<re2::RE2> regex; + bool negative = false; +};
\ No newline at end of file |