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

This class represents the information a client has about a room. More...

#include <lobby_data.hpp>

Public Member Functions

 room_info (const std::string &name)
 
const std::string & name () const
 
const std::set< std::string > & members () const
 
bool is_member (const std::string &user) const
 
void add_member (const std::string &user)
 
void remove_member (const std::string &user)
 
void process_room_members (const config &data)
 
const chat_sessionlog () const
 
chat_sessionlog ()
 

Private Attributes

std::string name_
 
std::set< std::string > members_
 
chat_session log_
 

Detailed Description

This class represents the information a client has about a room.

Definition at line 67 of file lobby_data.hpp.

Constructor & Destructor Documentation

◆ room_info()

mp::room_info::room_info ( const std::string &  name)
explicit

Definition at line 81 of file lobby_data.cpp.

Member Function Documentation

◆ add_member()

void mp::room_info::add_member ( const std::string &  user)

Definition at line 90 of file lobby_data.cpp.

References members_.

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

◆ is_member()

bool mp::room_info::is_member ( const std::string &  user) const

Definition at line 85 of file lobby_data.cpp.

References members_.

Referenced by mp::user_info::update_state().

◆ log() [1/2]

const chat_session& mp::room_info::log ( ) const
inline

◆ log() [2/2]

chat_session& mp::room_info::log ( )
inline

Definition at line 89 of file lobby_data.hpp.

◆ members()

const std::set<std::string>& mp::room_info::members ( ) const
inline

Definition at line 76 of file lobby_data.hpp.

References mp::chat_message::user.

◆ name()

const std::string& mp::room_info::name ( ) const
inline

Definition at line 72 of file lobby_data.hpp.

◆ process_room_members()

void mp::room_info::process_room_members ( const config data)

◆ remove_member()

void mp::room_info::remove_member ( const std::string &  user)

Definition at line 95 of file lobby_data.cpp.

References members_.

Member Data Documentation

◆ log_

chat_session mp::room_info::log_
private

Definition at line 97 of file lobby_data.hpp.

◆ members_

std::set<std::string> mp::room_info::members_
private

Definition at line 96 of file lobby_data.hpp.

Referenced by add_member(), is_member(), process_room_members(), and remove_member().

◆ name_

std::string mp::room_info::name_
private

Definition at line 95 of file lobby_data.hpp.


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