The Battle for Wesnoth  1.17.10+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)
 
bool operator< (const user_info &b) const
 
user_state get_state (int selected_game_id) const
 
user_relation get_relation () const
 

Public Attributes

std::string name
 
int forum_id
 
int game_id
 
bool registered
 
bool observing
 
bool moderator
 

Detailed Description

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

Definition at line 32 of file lobby_data.hpp.

Member Enumeration Documentation

◆ user_relation

Enumerator
ME 
FRIEND 
NEUTRAL 
IGNORED 

Definition at line 36 of file lobby_data.hpp.

◆ user_state

Enumerator
LOBBY 
GAME 
SEL_GAME 

Definition at line 43 of file lobby_data.hpp.

Constructor & Destructor Documentation

◆ user_info()

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

Definition at line 54 of file lobby_data.cpp.

Member Function Documentation

◆ get_relation()

user_info::user_relation mp::user_info::get_relation ( ) const

◆ get_state()

user_info::user_state mp::user_info::get_state ( int  selected_game_id) const

Definition at line 64 of file lobby_data.cpp.

References GAME, game_id, LOBBY, and SEL_GAME.

◆ operator<()

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

Definition at line 88 of file lobby_data.cpp.

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

Member Data Documentation

◆ forum_id

int mp::user_info::forum_id

Definition at line 55 of file lobby_data.hpp.

Referenced by gui2::dialogs::mp_lobby::open_profile_url().

◆ game_id

int mp::user_info::game_id

◆ moderator

bool mp::user_info::moderator

Definition at line 59 of file lobby_data.hpp.

◆ name

std::string mp::user_info::name

◆ observing

bool mp::user_info::observing

Definition at line 58 of file lobby_data.hpp.

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

◆ registered

bool mp::user_info::registered

Definition at line 57 of file lobby_data.hpp.


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