R-Type
Distributed multiplayer game engine in C++
Loading...
Searching...
No Matches
server::CommandContext Struct Reference

Context information for command execution. More...

#include <CommandContext.hpp>

Collaboration diagram for server::CommandContext:
Collaboration graph

Public Member Functions

 CommandContext (uint32_t pId, const std::string &pName, std::shared_ptr< Room > r, ::Server *srv)
 

Public Attributes

uint32_t playerId
 ID of the player executing the command.
 
std::string playerName
 Name of the player executing the command.
 
std::shared_ptr< Roomroom
 Room where the command is executed.
 
::Serverserver
 Server instance for operations (global namespace)
 

Detailed Description

Context information for command execution.

Contains all necessary information for a command to execute properly:

  • Player information (ID, name)
  • Room information
  • Server reference for operations

Definition at line 28 of file CommandContext.hpp.

Constructor & Destructor Documentation

◆ CommandContext()

server::CommandContext::CommandContext ( uint32_t  pId,
const std::string &  pName,
std::shared_ptr< Room r,
::Server srv 
)
inline

Definition at line 34 of file CommandContext.hpp.

Member Data Documentation

◆ playerId

uint32_t server::CommandContext::playerId

ID of the player executing the command.

Definition at line 29 of file CommandContext.hpp.

Referenced by server::KickCommand::execute(), and server::CommandHandler::handleCommand().

◆ playerName

std::string server::CommandContext::playerName

Name of the player executing the command.

Definition at line 30 of file CommandContext.hpp.

Referenced by server::KickCommand::execute().

◆ room

std::shared_ptr<Room> server::CommandContext::room

Room where the command is executed.

Definition at line 31 of file CommandContext.hpp.

Referenced by server::KickCommand::execute(), and server::ListCommand::execute().

◆ server

::Server* server::CommandContext::server

Server instance for operations (global namespace)

Definition at line 32 of file CommandContext.hpp.

Referenced by server::KickCommand::execute(), and server::ListCommand::execute().


The documentation for this struct was generated from the following file: