Chatterino
Public Member Functions | Static Public Attributes | List of all members
chatterino::ChatterSet Class Reference

#include <ChatterSet.hpp>

Public Member Functions

 ChatterSet ()
 
void addRecentChatter (const QString &userName)
 
void updateOnlineChatters (const std::unordered_set< QString > &lowerCaseUsernames)
 
bool contains (const QString &userName) const
 Checks if a username is in the list. More...
 
std::vector< QString > filterByPrefix (const QString &prefix) const
 

Static Public Attributes

static constexpr size_t chatterLimit = 2000
 The limit of how many chatters can be saved for a channel. More...
 

Detailed Description

ChatterSet is a limited container that contains a list of recent chatters that can be referenced by name.

Constructor & Destructor Documentation

◆ ChatterSet()

chatterino::ChatterSet::ChatterSet ( )

Member Function Documentation

◆ addRecentChatter()

void chatterino::ChatterSet::addRecentChatter ( const QString &  userName)

Inserts a user name if it isn't contained. Doesn't replace the original if the casing hasn't changed.

Here is the call graph for this function:

◆ contains()

bool chatterino::ChatterSet::contains ( const QString &  userName) const

Checks if a username is in the list.

Here is the call graph for this function:

◆ filterByPrefix()

std::vector< QString > chatterino::ChatterSet::filterByPrefix ( const QString &  prefix) const

Get filtered usernames by a prefix for autocompletion. Contained items are in mixed case if available.

◆ updateOnlineChatters()

void chatterino::ChatterSet::updateOnlineChatters ( const std::unordered_set< QString > &  lowerCaseUsernames)

Removes chatters that aren't online anymore. Adds chatters that aren't in the list yet.

Here is the call graph for this function:

Member Data Documentation

◆ chatterLimit

constexpr size_t chatterino::ChatterSet::chatterLimit = 2000
static

The limit of how many chatters can be saved for a channel.


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