Chatterino
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RegexPredicate.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "QRegularExpression"
5 
6 namespace chatterino {
7 
15 {
16 public:
24  RegexPredicate(const QString &regex);
25 
35  bool appliesTo(const Message &message);
36 
37 private:
39  QRegularExpression regex_;
40 };
41 
42 } // namespace chatterino
Definition: Application.cpp:48
RegexPredicate(const QString &regex)
Create a RegexPredicate with a regex to match the message against.
Definition: RegexPredicate.cpp:5
MessagePredicate checking whether the message matches a given regex.
Definition: RegexPredicate.hpp:14
bool appliesTo(const Message &message)
Checks whether the message matches the regex passed in the constructor.
Definition: RegexPredicate.cpp:10
Abstract base class for message predicates.
Definition: MessagePredicate.hpp:17
Definition: Message.hpp:54