The Battle for Wesnoth  1.19.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 class  user_relation { ME , FRIEND , NEUTRAL , IGNORED }
 
enum class  user_state { LOBBY , GAME , 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 29 of file lobby_data.hpp.

Member Enumeration Documentation

◆ user_relation

Enumerator
ME 
FRIEND 
NEUTRAL 
IGNORED 

Definition at line 33 of file lobby_data.hpp.

◆ user_state

Enumerator
LOBBY 
GAME 
SEL_GAME 

Definition at line 40 of file lobby_data.hpp.

Constructor & Destructor Documentation

◆ user_info()

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

Definition at line 52 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 62 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 86 of file lobby_data.cpp.

References b, get_relation(), translation::icompare(), and name.

Member Data Documentation

◆ forum_id

int mp::user_info::forum_id

Definition at line 52 of file lobby_data.hpp.

◆ game_id

int mp::user_info::game_id

◆ moderator

bool mp::user_info::moderator

Definition at line 56 of file lobby_data.hpp.

◆ name

std::string mp::user_info::name

◆ observing

bool mp::user_info::observing

Definition at line 55 of file lobby_data.hpp.

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

◆ registered

bool mp::user_info::registered

Definition at line 54 of file lobby_data.hpp.


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