|
R-Type
Distributed multiplayer game engine in C++
|
#include <Session.hpp>


Public Member Functions | |
| Session (const std::string &id) | |
| Constructor. | |
| ~Session () override=default | |
| std::string | getId () const override |
| Get the session ID. | |
| bool | isActive () const override |
| Check if session is active. | |
| uint32_t | getPlayerId () const |
| Get the player ID associated with this session. | |
| void | setPlayerId (uint32_t playerId) |
| Set the player ID for this session. | |
| bool | isSpectator () const |
| Check if this session is a spectator. | |
| void | setSpectator (bool spectator) |
| Set spectator mode for this session. | |
| void | setActive (bool active) |
| Set session active state. | |
Public Member Functions inherited from server::ISession | |
| virtual | ~ISession ()=default |
Private Attributes | |
| std::string | _id |
| uint32_t | _playerId |
| bool | _active {false} |
| bool | _isSpectator {false} |
Definition at line 14 of file Session.hpp.
|
explicit |
|
overridedefault |
|
overridevirtual |
Get the session ID.
Implements server::ISession.
Definition at line 14 of file Session.cpp.
References _id.
| uint32_t server::Session::getPlayerId | ( | ) | const |
Get the player ID associated with this session.
Definition at line 22 of file Session.cpp.
References _playerId.
|
overridevirtual |
Check if session is active.
Implements server::ISession.
Definition at line 18 of file Session.cpp.
References _active.
| bool server::Session::isSpectator | ( | ) | const |
Check if this session is a spectator.
Definition at line 30 of file Session.cpp.
References _isSpectator.
| void server::Session::setActive | ( | bool | active | ) |
Set session active state.
| active | true to activate, false to deactivate |
Definition at line 38 of file Session.cpp.
References _active.
| void server::Session::setPlayerId | ( | uint32_t | playerId | ) |
Set the player ID for this session.
| playerId | Player identifier to associate |
Definition at line 26 of file Session.cpp.
References _playerId.
| void server::Session::setSpectator | ( | bool | spectator | ) |
Set spectator mode for this session.
| spectator | true for spectator, false for player |
Definition at line 34 of file Session.cpp.
References _isSpectator.
|
private |
Definition at line 59 of file Session.hpp.
Referenced by isActive(), and setActive().
|
private |
Definition at line 57 of file Session.hpp.
Referenced by getId().
|
private |
Definition at line 60 of file Session.hpp.
Referenced by isSpectator(), and setSpectator().
|
private |
Definition at line 58 of file Session.hpp.
Referenced by getPlayerId(), and setPlayerId().