Chatterino
Public Member Functions | List of all members
chatterino::MessagePredicate Class Referenceabstract

Abstract base class for message predicates. More...

#include <MessagePredicate.hpp>

Inheritance diagram for chatterino::MessagePredicate:
[legend]

Public Member Functions

virtual ~MessagePredicate ()=default
 
virtual bool appliesTo (const Message &message)=0
 Checks whether this predicate applies to the passed message. More...
 

Detailed Description

Abstract base class for message predicates.

Message predicates define certain features a message can satisfy. Features are represented by classes derived from this abstract class. A derived class must override appliesTo in order to test for the desired feature.

Constructor & Destructor Documentation

◆ ~MessagePredicate()

virtual chatterino::MessagePredicate::~MessagePredicate ( )
virtualdefault

Member Function Documentation

◆ appliesTo()

virtual bool chatterino::MessagePredicate::appliesTo ( const Message message)
pure virtual

Checks whether this predicate applies to the passed message.

Implementations of appliesTo should never change the message's content in order to be compatible with other MessagePredicates.

Parameters
messagethe message to check for this predicate
Returns
true if this predicate applies, false otherwise

Implemented in chatterino::MessageFlagsPredicate, chatterino::RegexPredicate, chatterino::SubstringPredicate, chatterino::AuthorPredicate, chatterino::BadgePredicate, chatterino::ChannelPredicate, chatterino::SubtierPredicate, and chatterino::LinkPredicate.


The documentation for this class was generated from the following file: