summaryrefslogtreecommitdiff
path: root/src/desktop/Rule.hpp
blob: 9d3de70e84c9d996e1b46c2c5e4c81b9960881d5 (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 <hyprutils/memory/UniquePtr.hpp>

//NOLINTNEXTLINE
namespace re2 {
    class RE2;
};

class CRuleRegexContainer {
  public:
    CRuleRegexContainer() = default;

    CRuleRegexContainer(const std::string& regex);

    bool passes(const std::string& str) const;

  private:
    Hyprutils::Memory::CUniquePointer<re2::RE2> m_regex;
    bool                                        m_negative = false;
};