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

#include <player_connection.hpp>

Public Member Functions

template<class SocketPtr >
 player_record (const SocketPtr socket, const player &player)
 
const any_socket_ptr socket () const
 
std::string 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 any_socket_ptr socket_
 
player player_
 
std::shared_ptr< gamegame_
 
std::string ip_address
 

Detailed Description

Definition at line 32 of file player_connection.hpp.

Constructor & Destructor Documentation

◆ player_record()

template<class SocketPtr >
wesnothd::player_record::player_record ( const SocketPtr  socket,
const player player 
)
inline

Definition at line 36 of file player_connection.hpp.

Member Function Documentation

◆ client_ip()

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

Definition at line 49 of file player_connection.hpp.

References ip_address.

Referenced by wesnothd::player_status().

◆ enter_lobby()

void wesnothd::player_record::enter_lobby ( )

◆ game_id()

int wesnothd::player_record::game_id ( ) const

Definition at line 32 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 22 of file player_connection.cpp.

References game_.

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

◆ get_game() [2/2]

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

Definition at line 27 of file player_connection.cpp.

References game_.

◆ info()

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

Definition at line 54 of file player_connection.hpp.

References player_.

◆ name()

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

◆ set_game()

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

Definition at line 37 of file player_connection.cpp.

References game_.

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

◆ socket()

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

Definition at line 44 of file player_connection.hpp.

References socket_.

Member Data Documentation

◆ game_

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

Definition at line 77 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 78 of file player_connection.hpp.

Referenced by client_ip().

◆ player_

player wesnothd::player_record::player_
mutableprivate

Definition at line 76 of file player_connection.hpp.

Referenced by info(), and name().

◆ socket_

const any_socket_ptr wesnothd::player_record::socket_
private

Definition at line 75 of file player_connection.hpp.

Referenced by socket().


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