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

MessagePredicate checking for the channel a message was sent in. More...

#include <ChannelPredicate.hpp>

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

Public Member Functions

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

Detailed Description

MessagePredicate checking for the channel a message was sent in.

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

Constructor & Destructor Documentation

◆ ChannelPredicate()

chatterino::ChannelPredicate::ChannelPredicate ( const QStringList &  channels)

Create a ChannelPredicate with a list of channels to search for.

Parameters
channelsa list of channel names that a message should be sent in

Member Function Documentation

◆ appliesTo()

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

Checks whether the message was sent in any of the channels passed in the constructor.

Parameters
messagethe message to check
Returns
true if the message was sent in one of the specified channels, false otherwise

Implements chatterino::MessagePredicate.


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