Chatterino
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
chatterino::SharedMessageBuilder Class Referenceabstract

#include <SharedMessageBuilder.hpp>

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

Public Member Functions

 SharedMessageBuilder ()=delete
 
 SharedMessageBuilder (Channel *_channel, const Communi::IrcPrivateMessage *_ircMessage, const MessageParseArgs &_args)
 
 SharedMessageBuilder (Channel *_channel, const Communi::IrcMessage *_ircMessage, const MessageParseArgs &_args, QString content, bool isAction)
 
virtual bool isIgnored () const
 
virtual void triggerHighlights ()
 
virtual MessagePtr build ()=0
 
- Public Member Functions inherited from chatterino::MessageBuilder
 MessageBuilder ()
 
 MessageBuilder (SystemMessageTag, const QString &text, const QTime &time=QTime::currentTime())
 
 MessageBuilder (TimeoutMessageTag, const QString &timeoutUser, const QString &sourceUser, const QString &systemMessageText, int times, const QTime &time=QTime::currentTime())
 
 MessageBuilder (TimeoutMessageTag, const QString &username, const QString &durationInSeconds, bool multipleTimes, const QTime &time=QTime::currentTime())
 
 MessageBuilder (const BanAction &action, uint32_t count=1)
 
 MessageBuilder (const UnbanAction &action)
 
 MessageBuilder (const AutomodUserAction &action)
 
 MessageBuilder (LiveUpdatesAddEmoteMessageTag, const QString &platform, const QString &actor, const std::vector< QString > &emoteNames)
 
 MessageBuilder (LiveUpdatesRemoveEmoteMessageTag, const QString &platform, const QString &actor, const std::vector< QString > &emoteNames)
 
 MessageBuilder (LiveUpdatesUpdateEmoteMessageTag, const QString &platform, const QString &actor, const QString &emoteName, const QString &oldEmoteName)
 
 MessageBuilder (LiveUpdatesUpdateEmoteSetMessageTag, const QString &platform, const QString &actor, const QString &emoteSetName)
 
virtual ~MessageBuilder ()=default
 
Messageoperator-> ()
 
Messagemessage ()
 
MessagePtr release ()
 
std::weak_ptr< MessageweakOf ()
 
void append (std::unique_ptr< MessageElement > element)
 
QString matchLink (const QString &string)
 
void addLink (const QString &origLink, const QString &matchedLink)
 
void addIrcMessageText (const QString &text)
 
template<typename T , typename... Args>
T * emplace (Args &&...args)
 

Static Public Member Functions

static std::pair< QString, QString > slashKeyValue (const QString &kvStr)
 
static std::vector< BadgeparseBadgeTag (const QVariantMap &tags)
 
static QString stylizeUsername (const QString &username, const Message &message)
 

Public Attributes

QString userName
 

Protected Member Functions

virtual void parse ()
 
virtual void parseUsernameColor ()
 
virtual void parseUsername ()
 
virtual Outcome tryAppendEmote (const EmoteName &name)
 
virtual void parseHighlights ()
 
void appendChannelName ()
 
- Protected Member Functions inherited from chatterino::MessageBuilder
virtual void addTextOrEmoji (EmotePtr emote)
 
virtual void addTextOrEmoji (const QString &value)
 

Protected Attributes

Channelchannel
 
const Communi::IrcMessage * ircMessage
 
MessageParseArgs args
 
const QVariantMap tags
 
QString originalMessage_
 
const bool action_ {}
 
QColor usernameColor_ = {153, 153, 153}
 
bool highlightAlert_ = false
 
bool highlightSound_ = false
 
QUrl highlightSoundUrl_
 
- Protected Attributes inherited from chatterino::MessageBuilder
MessageColor textColor_ = MessageColor::Text
 

Constructor & Destructor Documentation

◆ SharedMessageBuilder() [1/3]

chatterino::SharedMessageBuilder::SharedMessageBuilder ( )
delete

◆ SharedMessageBuilder() [2/3]

chatterino::SharedMessageBuilder::SharedMessageBuilder ( Channel _channel,
const Communi::IrcPrivateMessage *  _ircMessage,
const MessageParseArgs _args 
)
explicit

◆ SharedMessageBuilder() [3/3]

chatterino::SharedMessageBuilder::SharedMessageBuilder ( Channel _channel,
const Communi::IrcMessage *  _ircMessage,
const MessageParseArgs _args,
QString  content,
bool  isAction 
)
explicit

Member Function Documentation

◆ appendChannelName()

void chatterino::SharedMessageBuilder::appendChannelName ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ build()

virtual MessagePtr chatterino::SharedMessageBuilder::build ( )
pure virtual

◆ isIgnored()

bool chatterino::SharedMessageBuilder::isIgnored ( ) const
virtual

Reimplemented in chatterino::TwitchMessageBuilder.

Here is the call graph for this function:

◆ parse()

void chatterino::SharedMessageBuilder::parse ( )
protectedvirtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseBadgeTag()

std::vector< Badge > chatterino::SharedMessageBuilder::parseBadgeTag ( const QVariantMap &  tags)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseHighlights()

void chatterino::SharedMessageBuilder::parseHighlights ( )
protectedvirtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseUsername()

void chatterino::SharedMessageBuilder::parseUsername ( )
protectedvirtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseUsernameColor()

void chatterino::SharedMessageBuilder::parseUsernameColor ( )
protectedvirtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ slashKeyValue()

std::pair< QString, QString > chatterino::SharedMessageBuilder::slashKeyValue ( const QString &  kvStr)
static
Here is the caller graph for this function:

◆ stylizeUsername()

QString chatterino::SharedMessageBuilder::stylizeUsername ( const QString &  username,
const Message message 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ triggerHighlights()

void chatterino::SharedMessageBuilder::triggerHighlights ( )
virtual

Reimplemented in chatterino::TwitchMessageBuilder.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tryAppendEmote()

virtual Outcome chatterino::SharedMessageBuilder::tryAppendEmote ( const EmoteName &  name)
inlineprotectedvirtual
Here is the call graph for this function:

Member Data Documentation

◆ action_

const bool chatterino::SharedMessageBuilder::action_ {}
protected

◆ args

MessageParseArgs chatterino::SharedMessageBuilder::args
protected

◆ channel

Channel* chatterino::SharedMessageBuilder::channel
protected

◆ highlightAlert_

bool chatterino::SharedMessageBuilder::highlightAlert_ = false
protected

◆ highlightSound_

bool chatterino::SharedMessageBuilder::highlightSound_ = false
protected

◆ highlightSoundUrl_

QUrl chatterino::SharedMessageBuilder::highlightSoundUrl_
protected

◆ ircMessage

const Communi::IrcMessage* chatterino::SharedMessageBuilder::ircMessage
protected

◆ originalMessage_

QString chatterino::SharedMessageBuilder::originalMessage_
protected

◆ tags

const QVariantMap chatterino::SharedMessageBuilder::tags
protected

◆ userName

QString chatterino::SharedMessageBuilder::userName

◆ usernameColor_

QColor chatterino::SharedMessageBuilder::usernameColor_ = {153, 153, 153}
protected

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