parent
57921d7dbd
commit
31422ae25d
5 changed files with 61 additions and 34 deletions
21
src/desktop/Rule.hpp
Normal file
21
src/desktop/Rule.hpp
Normal file
|
|
@ -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;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue