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

MessagePredicate checking for the author/sender of a message. More...

#include <AuthorPredicate.hpp>

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

Public Member Functions

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

Detailed Description

MessagePredicate checking for the author/sender of a message.

This predicate will only allow messages that are sent by a list of users, specified by their user names.

Constructor & Destructor Documentation

◆ AuthorPredicate()

chatterino::AuthorPredicate::AuthorPredicate ( const QStringList &  authors)

Create an AuthorPredicate with a list of users to search for.

Parameters
authorsa list of user names that a message should be sent from

Member Function Documentation

◆ appliesTo()

bool chatterino::AuthorPredicate::appliesTo ( const Message message)
virtual

Checks whether the message is authored by any of the users passed in the constructor.

Parameters
messagethe message to check
Returns
true if the message was authored by one of the specified users, false otherwise

Implements chatterino::MessagePredicate.


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