The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
display_chat_manager Class Reference

#include <display_chat_manager.hpp>

Classes

struct  chat_message
 

Public Member Functions

 display_chat_manager (display &disp)
 
void add_observer (const std::string &name)
 
void remove_observer (const std::string &name)
 
const std::set< std::string > & observers () const
 
void add_whisperer (const std::string &nick)
 
void remove_whisperer (const std::string &nick)
 
const std::set< std::string > & whisperers () const
 
void add_chat_message (const time_t &time, const std::string &speaker, int side, const std::string &msg, events::chat_handler::MESSAGE_TYPE type, bool bell)
 
void clear_chat_messages ()
 

Private Member Functions

void prune_chat_messages (bool remove_all=false)
 

Private Attributes

std::set< std::stringobservers_
 
std::set< std::stringwhisperers_
 
std::vector< chat_messagechat_messages_
 
displaymy_disp_
 

Friends

class game_display
 

Detailed Description

Definition at line 28 of file display_chat_manager.hpp.

Constructor & Destructor Documentation

display_chat_manager::display_chat_manager ( display disp)
inline

Definition at line 30 of file display_chat_manager.hpp.

Member Function Documentation

void display_chat_manager::add_chat_message ( const time_t &  time,
const std::string speaker,
int  side,
const std::string msg,
events::chat_handler::MESSAGE_TYPE  type,
bool  bell 
)
void display_chat_manager::add_observer ( const std::string name)
inline

Definition at line 32 of file display_chat_manager.hpp.

References observers_.

Referenced by turn_info::process_network_data().

void display_chat_manager::add_whisperer ( const std::string nick)
inline

Definition at line 36 of file display_chat_manager.hpp.

References whisperers_.

Referenced by add_chat_message().

void display_chat_manager::clear_chat_messages ( )
inline
const std::set<std::string>& display_chat_manager::observers ( ) const
inline

Definition at line 34 of file display_chat_manager.hpp.

References observers_.

void display_chat_manager::prune_chat_messages ( bool  remove_all = false)
private
void display_chat_manager::remove_observer ( const std::string name)
inline

Definition at line 33 of file display_chat_manager.hpp.

References observers_.

Referenced by turn_info::process_network_data().

void display_chat_manager::remove_whisperer ( const std::string nick)
inline

Definition at line 37 of file display_chat_manager.hpp.

References whisperers_.

Referenced by add_chat_message().

const std::set<std::string>& display_chat_manager::whisperers ( ) const
inline

Definition at line 38 of file display_chat_manager.hpp.

References whisperers_.

Referenced by add_chat_message().

Friends And Related Function Documentation

friend class game_display
friend

Definition at line 44 of file display_chat_manager.hpp.

Member Data Documentation

std::vector<chat_message> display_chat_manager::chat_messages_
private

Definition at line 60 of file display_chat_manager.hpp.

Referenced by add_chat_message(), and prune_chat_messages().

display& display_chat_manager::my_disp_
private

Definition at line 62 of file display_chat_manager.hpp.

Referenced by add_chat_message().

std::set<std::string> display_chat_manager::observers_
private

Definition at line 46 of file display_chat_manager.hpp.

Referenced by add_observer(), observers(), and remove_observer().

std::set<std::string> display_chat_manager::whisperers_
private

Definition at line 47 of file display_chat_manager.hpp.

Referenced by add_whisperer(), remove_whisperer(), and whisperers().


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