aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/desktop/Rule.hpp
blob: 4b178ee8ee9a1ce48054a54307ff3ad2c5335dc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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;
};