Chatterino
MessageFlagsPredicate.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "common/FlagsEnum.hpp"
5 
6 namespace chatterino {
7 
8 using MessageFlags = FlagsEnum<MessageFlag>;
9 
17 {
18 public:
31  MessageFlagsPredicate(const QString &flags);
32 
41  bool appliesTo(const Message &message);
42 
43 private:
45  MessageFlags flags_;
46 };
47 
48 } // namespace chatterino
bool appliesTo(const Message &message)
Checks whether the message has any of the flags passed in the constructor.
Definition: MessageFlagsPredicate.cpp:57
Definition: Application.cpp:48
int64_t FlagsEnum< MessageFlag > MessageFlags
Definition: Channel.hpp:20
MessageFlagsPredicate(const QString &flags)
Create a MessageFlagsPredicate with a list of flags to search for.
Definition: MessageFlagsPredicate.cpp:7
Abstract base class for message predicates.
Definition: MessagePredicate.hpp:17
Definition: Message.hpp:54
MessagePredicate checking for message flags.
Definition: MessageFlagsPredicate.hpp:16