The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Public Attributes | List of all members
user_info Struct Reference

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

#include <data.hpp>

Public Types

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

Public Member Functions

 user_info (const config &c)
 
void update_state (int selected_game_id, const room_info *current_room=nullptr)
 
void update_relation ()
 
bool operator> (const user_info &b) const
 

Public Attributes

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

Detailed Description

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

Definition at line 102 of file data.hpp.

Member Enumeration Documentation

Enumerator
FRIEND 
ME 
NEUTRAL 
IGNORED 

Definition at line 110 of file data.hpp.

Enumerator
LOBBY 
SEL_ROOM 
GAME 
SEL_GAME 

Definition at line 116 of file data.hpp.

Constructor & Destructor Documentation

user_info::user_info ( const config c)
explicit

Definition at line 99 of file data.cpp.

References update_relation().

Member Function Documentation

bool user_info::operator> ( const user_info b) const
void user_info::update_relation ( )
void user_info::update_state ( int  selected_game_id,
const room_info current_room = nullptr 
)

Definition at line 110 of file data.cpp.

References GAME, game_id, room_info::is_member(), LOBBY, SEL_GAME, SEL_ROOM, state, and update_relation().

Member Data Documentation

int user_info::game_id
std::string user_info::name
bool user_info::observing
bool user_info::registered

Definition at line 129 of file data.hpp.

Referenced by gui2::tlobby_main::update_playerlist().

user_relation user_info::relation
user_state user_info::state

Definition at line 128 of file data.hpp.

Referenced by gui2::tlobby_main::update_playerlist(), and update_state().


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