181 std::vector<std::variant<TextPart, ClientTranslatedPart, UrlPart, RunCommandPart, SuggestCommandPart, ShowAchievementPart>>
m_Parts;
std::vector< AString > AStringVector
Container for a single chat message composed of multiple functional parts.
void Clear(void)
Removes all parts from the object.
AString CreateJsonString(bool a_ShouldUseChatPrefixes=true) const
void SetMessageType(eMessageType a_MessageType, const AString &a_AdditionalMessageTypeData="")
Sets the message type, which is indicated by prefixes added to the message when serializing Takes opt...
void UnderlineUrls(void)
Adds the "underline" style to each part that is an URL.
void AddUrlPart(const AString &a_Text, const AString &a_Url, const AString &a_Style="nc")
Adds a part that opens an URL when clicked.
AString ExtractText(void) const
Returns the text from the parts that comprises the human-readable data.
AString m_AdditionalMessageTypeData
Additional data pertaining to message type, for example, the name of a mtPrivateMsg sender.
void AddSuggestCommandPart(const AString &a_Text, const AString &a_SuggestedCommand, const AString &a_Style="nb")
Adds a part that suggests a command (enters it into the chat message area, but doesn't send) when cli...
void ParseText(const AString &a_ParseText)
Parses text into various parts, adds those.
const auto & GetParts(void) const
eMessageType GetMessageType(void) const
Returns the message type set previously by SetMessageType().
void AddTextPart(const AString &a_Message, const AString &a_Style="")
Adds a plain text part, with optional style.
void AddClientTranslatedPart(const AString &a_TranslationID, const AStringVector &a_Parameters, const AString &a_Style="")
Adds a part that is translated client-side, with the formatting parameters and optional style.
cCompositeChat(void)
Creates a new empty chat message.
void AddRunCommandPart(const AString &a_Text, const AString &a_Command, const AString &a_Style="na")
Adds a part that runs a command when clicked.
eMessageType m_MessageType
The message type, as indicated by prefixes.
void AddChatPartStyle(Json::Value &a_Value, const AString &a_PartStyle) const
Adds the chat part's style (represented by the part's stylestring) into the Json object.
std::vector< std::variant< TextPart, ClientTranslatedPart, UrlPart, RunCommandPart, SuggestCommandPart, ShowAchievementPart > > m_Parts
All the parts that.
void AddShowAchievementPart(const AString &a_PlayerName, const AString &a_Achievement, const AString &a_Style="")
Adds a part that fully formats a specified achievement using client translatable strings Takes achiev...
AString GetAdditionalMessageTypeData(void) const
Returns additional data pertaining to message type, for example, the name of a mtPrivateMsg sender.
static eLogLevel MessageTypeToLogLevel(eMessageType a_MessageType)
Converts the MessageType to a LogLevel value.
AString AdditionalStyleData