The Battle for Wesnoth  1.15.12+dev
Public Member Functions | Private Attributes | List of all members
mp::chat_info Class Reference

#include <lobby_info.hpp>

Public Member Functions

void open_room (const std::string &name)
 Open a new chat room with the given name. More...
 
void close_room (const std::string &name)
 Close the chat room with the given name. More...
 
bool has_room (const std::string &name) const
 Returns whether a room with the given name has been opened. More...
 
room_infoget_room (const std::string &name)
 Returns info on room with the given name, or nullptr if it doesn't exist. More...
 
const room_infoget_room (const std::string &name) const
 Const overload of get_room. More...
 
chat_sessionget_whisper_log (const std::string &name)
 
const std::map< std::string, room_info > & rooms () const
 

Private Attributes

std::map< std::string, room_inforooms_
 
std::map< std::string, chat_sessionwhispers_
 

Detailed Description

Definition at line 152 of file lobby_info.hpp.

Member Function Documentation

◆ close_room()

void mp::chat_info::close_room ( const std::string &  name)

Close the chat room with the given name.

Definition at line 325 of file lobby_info.cpp.

References DBG_LB.

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

◆ get_room() [1/2]

room_info * mp::chat_info::get_room ( const std::string &  name)

◆ get_room() [2/2]

const room_info * mp::chat_info::get_room ( const std::string &  name) const

Const overload of get_room.

Definition at line 294 of file lobby_info.cpp.

◆ get_whisper_log()

chat_session& mp::chat_info::get_whisper_log ( const std::string &  name)
inline

◆ has_room()

bool mp::chat_info::has_room ( const std::string &  name) const

Returns whether a room with the given name has been opened.

Definition at line 303 of file lobby_info.cpp.

◆ open_room()

void mp::chat_info::open_room ( const std::string &  name)

Open a new chat room with the given name.

Definition at line 319 of file lobby_info.cpp.

Referenced by gui2::chatbox::find_or_create_window(), and gui2::chatbox::process_room_join().

◆ rooms()

const std::map<std::string, room_info>& mp::chat_info::rooms ( ) const
inline

Definition at line 175 of file lobby_info.hpp.

Member Data Documentation

◆ rooms_

std::map<std::string, room_info> mp::chat_info::rooms_
private

Definition at line 181 of file lobby_info.hpp.

◆ whispers_

std::map<std::string, chat_session> mp::chat_info::whispers_
private

Definition at line 183 of file lobby_info.hpp.


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