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

MessagePredicate checking for message flags. More...

#include <MessageFlagsPredicate.hpp>

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

Public Member Functions

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

Detailed Description

MessagePredicate checking for message flags.

This predicate will only allow messages with a list of flags. Specified by user-friendly names for the flags.

Constructor & Destructor Documentation

◆ MessageFlagsPredicate()

chatterino::MessageFlagsPredicate::MessageFlagsPredicate ( const QString &  flags)

Create a MessageFlagsPredicate with a list of flags to search for.

The flags can be specified by user-friendly names. "deleted" and "disabled" are used for the "Disabled" flag. "sub" and "subscription" are used for the "Subscription" flag. "timeout" is used for the "Timeout" flag. "highlighted" is used for the "Highlighted" flag. "system" is used for the "System" flag.

Parameters
flagsa string comma seperated list of names for the flags a message should have

Member Function Documentation

◆ appliesTo()

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

Checks whether the message has any of the flags passed in the constructor.

Parameters
messagethe message to check
Returns
true if the message has at least one of the specified flags, false otherwise

Implements chatterino::MessagePredicate.


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