summaryrefslogtreecommitdiff
path: root/src/desktop/Rule.hpp
blob: 858b4ded156167c1b8c9511ffb631d0b2f0f4cd4 (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> regex;
    bool                                        negative = false;
};