Chatterino
Public Member Functions | List of all members
chatterino::SubtierPredicate Class Reference

MessagePredicate checking for the badges of a message. More...

#include <SubtierPredicate.hpp>

Inheritance diagram for chatterino::SubtierPredicate:
[legend]
Collaboration diagram for chatterino::SubtierPredicate:
[legend]

Public Member Functions

 SubtierPredicate (const QStringList &subtiers)
 Create an SubtierPredicate with a list of subtiers to search for. More...
 
bool appliesTo (const Message &message) override
 Checks whether the message contains any of the subtiers passed in the constructor. More...
 
- Public Member Functions inherited from chatterino::MessagePredicate
virtual ~MessagePredicate ()=default
 

Detailed Description

MessagePredicate checking for the badges of a message.

This predicate will only allow messages that are sent by a subscribed user who has a specified subtier (i.e. 1,2,3..)

Constructor & Destructor Documentation

◆ SubtierPredicate()

chatterino::SubtierPredicate::SubtierPredicate ( const QStringList &  subtiers)

Create an SubtierPredicate with a list of subtiers to search for.

Parameters
subtiersa list of subtiers that a message should contain

Member Function Documentation

◆ appliesTo()

bool chatterino::SubtierPredicate::appliesTo ( const Message message)
overridevirtual

Checks whether the message contains any of the subtiers passed in the constructor.

Parameters
messagethe message to check
Returns
true if the message contains a subtier listed in the specified subtiers, false otherwise

Implements chatterino::MessagePredicate.


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