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

#include <player_connection.hpp>

Public Member Functions

template<typename SocketPtr , typename... Args>
 player_record (const SocketPtr socket, Args &&... args)
 
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 ()
 
std::chrono::steady_clock::duration time_logged_on () const
 

Private Attributes

std::chrono::steady_clock::time_point login_time_
 
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<typename SocketPtr , typename... Args>
wesnothd::player_record::player_record ( const SocketPtr  socket,
Args &&...  args 
)
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 34 of file player_connection.cpp.

References game_.

◆ get_game() [1/2]

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

Definition at line 29 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 24 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 39 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_.

◆ time_logged_on()

std::chrono::steady_clock::duration wesnothd::player_record::time_logged_on ( ) const
inline

Definition at line 73 of file player_connection.hpp.

References login_time_.

Member Data Documentation

◆ game_

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

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

Referenced by client_ip().

◆ login_time_

std::chrono::steady_clock::time_point wesnothd::player_record::login_time_
private

Definition at line 79 of file player_connection.hpp.

Referenced by time_logged_on().

◆ player_

player wesnothd::player_record::player_
mutableprivate

Definition at line 81 of file player_connection.hpp.

Referenced by info(), and name().

◆ socket_

const any_socket_ptr wesnothd::player_record::socket_
private

Definition at line 80 of file player_connection.hpp.

Referenced by socket().


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