The Battle for Wesnoth  1.15.0-dev
Public Member Functions | Private Attributes | List of all members
mp::chat_session Class Reference

this class memorizes a chat session. More...

#include <lobby_data.hpp>

Public Member Functions

 chat_session ()
 
void add_message (const std::time_t &timestamp, const std::string &user, const std::string &message)
 
void add_message (const std::string &user, const std::string &message)
 
const std::deque< chat_message > & history () const
 
void clear ()
 

Private Attributes

std::deque< chat_messagehistory_
 

Detailed Description

this class memorizes a chat session.

Definition at line 42 of file lobby_data.hpp.

Constructor & Destructor Documentation

◆ chat_session()

mp::chat_session::chat_session ( )

Definition at line 56 of file lobby_data.cpp.

Member Function Documentation

◆ add_message() [1/2]

void mp::chat_session::add_message ( const std::time_t &  timestamp,
const std::string &  user,
const std::string &  message 
)

◆ add_message() [2/2]

void mp::chat_session::add_message ( const std::string &  user,
const std::string &  message 
)

Definition at line 68 of file lobby_data.cpp.

References add_message().

◆ clear()

void mp::chat_session::clear ( )

Definition at line 73 of file lobby_data.cpp.

References history_.

Referenced by gui2::chatbox::close_window().

◆ history()

const std::deque<chat_message>& mp::chat_session::history ( ) const
inline

Definition at line 53 of file lobby_data.hpp.

References preferences::clear().

Member Data Documentation

◆ history_

std::deque<chat_message> mp::chat_session::history_
private

Definition at line 61 of file lobby_data.hpp.

Referenced by add_message(), and clear().


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