Twitch SDK (Internal)
Classes | Namespaces | Enumerations | Functions
chatmessageparsing.h File Reference
#include "twitchsdk/chat/chattypes.h"
#include "twitchsdk/core/user/user.h"
#include <vector>
#include <regex>

Go to the source code of this file.

Classes

struct  ttv::chat::EmoticonRange
 
struct  ttv::chat::MentionRange
 
struct  ttv::chat::UrlRange
 
struct  ttv::chat::BitsRange
 
struct  ttv::chat::TokenRange
 
struct  ttv::chat::EmoteRange
 
union  ttv::chat::TokenRange.data
 

Namespaces

 ttv
 JSON (JavaScript Object Notation).
 
 ttv::chat
 

Enumerations

enum  ttv::chat::TokenRangeEnum { ttv::chat::TOKEN_RANGE_TYPE_URL, ttv::chat::TOKEN_RANGE_TYPE_MENTION, ttv::chat::TOKEN_RANGE_TYPE_EMOTICON, ttv::chat::TOKEN_RANGE_TYPE_BITS }
 

Functions

bool ttv::chat::SortTokenRangesByTypeThenRangeNum (const TokenRange &a, const TokenRange &b)
 
bool ttv::chat::SortTokenRangesByStartIndex (const TokenRange &a, const TokenRange &b)
 
bool ttv::chat::SortEmoticonRangesByEmoticonId (const TokenRange &a, const TokenRange &b)
 
void ttv::chat::RemoveOverlappingRanges (std::vector< TokenRange > &ranges)
 
void ttv::chat::AdjustByteRangesToUtf8Ranges (std::vector< TokenRange > &ranges, const std::string &message)
 
void ttv::chat::AdjustUtf8RangesToByteRanges (std::vector< TokenRange > &ranges, const std::string &message)
 
bool ttv::chat::ParseEmotesMessageTag (const std::string &emotesMessageTag, std::map< EmoticonId, std::vector< EmoteRange >> &result)
 
bool ttv::chat::ParseBadgesMessageTag (const std::string &messageTag, std::vector< std::pair< std::string, std::string >> &result)
 
bool ttv::chat::GenerateBadgesMessageTag (const std::vector< std::pair< std::string, std::string >> &badges, std::string &result)
 
bool ttv::chat::TokenizeLocalMessage (const std::shared_ptr< User > &user, ChannelId channelId, const std::string &message, std::string &emotesMessageTag, std::string &badgesMessageTag)
 
void ttv::chat::TokenizeServerMessage (const std::string &message, const TokenizationOptions &tokenizationOptions, const std::string &messageTags, const std::shared_ptr< BitsConfiguration > &bitsConfig, const std::vector< std::string > &localUserNames, MessageInfo &tokenizedMessage)
 
void ttv::chat::TokenizeServerMessage (const std::string &message, const TokenizationOptions &tokenizationOptions, const std::map< EmoticonId, std::vector< EmoteRange >> &emoticonRanges, const std::vector< std::string > &localUserNames, MessageInfo &tokenizedMessage)
 
void ttv::chat::TokenizeServerMessage (const std::string &message, const TokenizationOptions &tokenizationOptions, const std::map< EmoticonId, std::vector< EmoteRange >> &emoticonRanges, const std::shared_ptr< BitsConfiguration > &bitsConfig, const std::vector< std::string > &localUserNames, MessageInfo &tokenizedMessage)
 

Class Documentation

◆ ttv::chat::EmoticonRange

struct ttv::chat::EmoticonRange
Class Members
EmoticonId emoticonId

◆ ttv::chat::MentionRange

struct ttv::chat::MentionRange

◆ ttv::chat::UrlRange

struct ttv::chat::UrlRange

◆ ttv::chat::BitsRange

struct ttv::chat::BitsRange
Class Members
uint32_t numBits
uint32_t prefixLength

◆ ttv::chat::TokenRange

struct ttv::chat::TokenRange
Class Members
union TokenRange data
int endIndex
int rangeNum
int startIndex
TokenRangeEnum type

◆ ttv::chat::EmoteRange

struct ttv::chat::EmoteRange
Class Members
int endIndex
int startIndex

◆ ttv::chat::TokenRange.data

union ttv::chat::TokenRange.data
Class Members
BitsRange bits
EmoticonRange emoticon
MentionRange mention
UrlRange url