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

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

#include <BadgePredicate.hpp>

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

Public Member Functions

 BadgePredicate (const QStringList &badges)
 Create an BadgePredicate with a list of badges to search for. More...
 
bool appliesTo (const Message &message) override
 Checks whether the message contains any of the badges 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 list of users, specified by their user names, who have a badge specified (i.e 'staff').

Constructor & Destructor Documentation

◆ BadgePredicate()

chatterino::BadgePredicate::BadgePredicate ( const QStringList &  badges)

Create an BadgePredicate with a list of badges to search for.

Parameters
badgesa list of badges that a message should contain

Member Function Documentation

◆ appliesTo()

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

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

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

Implements chatterino::MessagePredicate.


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