The Battle for Wesnoth  1.15.0+dev
Public Member Functions | Private Attributes | List of all members
wesnothd::player_record Class Reference

#include <player_connection.hpp>

Public Member Functions

 player_record (const socket_ptr socket, const player &player)
 
const socket_ptr socket () const
 
std::string saved_client_ip () const
 
playerinfo () const
 
const std::string & name () const
 
const std::shared_ptr< gameget_game () const
 
std::shared_ptr< game > & get_game ()
 
int game_id () const
 
void set_game (std::shared_ptr< game > new_game)
 
void enter_lobby ()
 

Private Attributes

const socket_ptr socket_
 
player player_
 
std::shared_ptr< gamegame_
 
std::string ip_address
 

Detailed Description

Definition at line 34 of file player_connection.hpp.

Constructor & Destructor Documentation

◆ player_record()

wesnothd::player_record::player_record ( const socket_ptr  socket,
const player player 
)
inline

Definition at line 37 of file player_connection.hpp.

Member Function Documentation

◆ enter_lobby()

void wesnothd::player_record::enter_lobby ( )

◆ game_id()

int wesnothd::player_record::game_id ( ) const

Definition at line 31 of file player_connection.cpp.

References game_.

Referenced by name().

◆ get_game() [1/2]

const std::shared_ptr< game > wesnothd::player_record::get_game ( ) const

Definition at line 21 of file player_connection.cpp.

References game_.

Referenced by wesnothd::server::create_game(), and name().

◆ get_game() [2/2]

std::shared_ptr< game > & wesnothd::player_record::get_game ( )

Definition at line 26 of file player_connection.cpp.

References game_.

◆ info()

player& wesnothd::player_record::info ( ) const
inline

Definition at line 55 of file player_connection.hpp.

References player_.

Referenced by wesnothd::server::create_game().

◆ name()

const std::string& wesnothd::player_record::name ( ) const
inline

◆ saved_client_ip()

std::string wesnothd::player_record::saved_client_ip ( ) const
inline

Definition at line 50 of file player_connection.hpp.

References ip_address.

◆ set_game()

void wesnothd::player_record::set_game ( std::shared_ptr< game new_game)

Definition at line 36 of file player_connection.cpp.

References game_.

Referenced by wesnothd::server::handle_join_game(), and name().

◆ socket()

const socket_ptr wesnothd::player_record::socket ( ) const
inline

Definition at line 45 of file player_connection.hpp.

References socket_.

Referenced by wesnothd::server::create_game(), and wesnothd::player_status().

Member Data Documentation

◆ game_

std::shared_ptr<game> wesnothd::player_record::game_
private

Definition at line 78 of file player_connection.hpp.

Referenced by enter_lobby(), game_id(), get_game(), and set_game().

◆ ip_address

std::string wesnothd::player_record::ip_address
private

Definition at line 79 of file player_connection.hpp.

Referenced by saved_client_ip().

◆ player_

player wesnothd::player_record::player_
mutableprivate

Definition at line 77 of file player_connection.hpp.

Referenced by info(), and name().

◆ socket_

const socket_ptr wesnothd::player_record::socket_
private

Definition at line 76 of file player_connection.hpp.

Referenced by socket().


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