The Battle for Wesnoth  1.19.5+dev
Public Member Functions | Public Attributes | 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 ()
 

Public Attributes

const std::chrono::steady_clock::time_point login_time
 

Private Attributes

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

Detailed Description

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

Member Function Documentation

◆ client_ip()

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

Definition at line 48 of file player_connection.hpp.

References ip_address.

◆ 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_.

◆ get_game() [1/2]

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

Definition at line 27 of file player_connection.cpp.

References game_.

◆ get_game() [2/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().

◆ info()

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

Definition at line 53 of file player_connection.hpp.

References player_.

◆ name()

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

Definition at line 58 of file player_connection.hpp.

References wesnothd::player::name(), and player_.

◆ 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().

◆ socket()

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

Definition at line 43 of file player_connection.hpp.

References socket_.

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 client_ip().

◆ login_time

const std::chrono::steady_clock::time_point wesnothd::player_record::login_time

Definition at line 73 of file player_connection.hpp.

◆ player_

player wesnothd::player_record::player_
mutableprivate

Definition at line 77 of file player_connection.hpp.

Referenced by info(), and name().

◆ socket_

const any_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: