The Battle for Wesnoth  1.17.0-dev
Public Types | Public Member Functions | Public Attributes | List of all members
mp::user_info Struct Reference

This class represents the information a client has about another player. More...

#include <lobby_data.hpp>

Public Types

enum  user_relation { user_relation::ME, user_relation::FRIEND, user_relation::NEUTRAL, user_relation::IGNORED }
 
enum  user_state { user_state::LOBBY, user_state::GAME, user_state::SEL_GAME }
 

Public Member Functions

 user_info (const config &c)
 
void update_state (int selected_game_id)
 
void update_relation ()
 
bool operator< (const user_info &b) const
 

Public Attributes

std::string name
 
int forum_id
 
int game_id
 
user_relation relation
 
user_state state
 
bool registered
 
bool observing
 
bool moderator
 

Detailed Description

This class represents the information a client has about another player.

Definition at line 105 of file lobby_data.hpp.

Member Enumeration Documentation

◆ user_relation

Enumerator
ME 
FRIEND 
NEUTRAL 
IGNORED 

Definition at line 113 of file lobby_data.hpp.

◆ user_state

Enumerator
LOBBY 
GAME 
SEL_GAME 

Definition at line 120 of file lobby_data.hpp.

Constructor & Destructor Documentation

◆ user_info()

mp::user_info::user_info ( const config c)
explicit

Definition at line 111 of file lobby_data.cpp.

References update_relation().

Member Function Documentation

◆ operator<()

bool mp::user_info::operator< ( const user_info b) const

Definition at line 151 of file lobby_data.cpp.

References translation::icompare(), name, relation, and font::unicode_em_dash.

◆ update_relation()

void mp::user_info::update_relation ( )

◆ update_state()

void mp::user_info::update_state ( int  selected_game_id)

Definition at line 124 of file lobby_data.cpp.

References GAME, game_id, LOBBY, SEL_GAME, state, and update_relation().

Member Data Documentation

◆ forum_id

int mp::user_info::forum_id

Definition at line 129 of file lobby_data.hpp.

◆ game_id

int mp::user_info::game_id

◆ moderator

bool mp::user_info::moderator

Definition at line 135 of file lobby_data.hpp.

◆ name

std::string mp::user_info::name

◆ observing

bool mp::user_info::observing

Definition at line 134 of file lobby_data.hpp.

Referenced by gui2::dialogs::lobby_player_info::pre_show().

◆ registered

bool mp::user_info::registered

Definition at line 133 of file lobby_data.hpp.

◆ relation

user_relation mp::user_info::relation

◆ state

user_state mp::user_info::state

Definition at line 132 of file lobby_data.hpp.

Referenced by update_state().


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