R-Type
Distributed multiplayer game engine in C++
Loading...
Searching...
No Matches
CommandContext.hpp
Go to the documentation of this file.
1/*
2** EPITECH PROJECT, 2025
3** Created on 14/01/2026.
4** File description:
5** CommandContext.hpp
6*/
7
8#pragma once
9
10#include <cstdint>
11#include <memory>
12#include <string>
13
14class Server; // Forward declaration in global namespace
15
16namespace server {
17 class Room;
18
29 uint32_t playerId;
30 std::string playerName;
31 std::shared_ptr<Room> room;
33
34 CommandContext(uint32_t pId, const std::string &pName, std::shared_ptr<Room> r, ::Server *srv)
35 : playerId(pId), playerName(pName), room(r), server(srv) {}
36 };
37
38} // namespace server
R-Type server application.
Definition Server.hpp:74
Concrete implementation of IRoom with game instance management.
Definition Room.hpp:26
Context information for command execution.
uint32_t playerId
ID of the player executing the command.
std::string playerName
Name of the player executing the command.
std::shared_ptr< Room > room
Room where the command is executed.
CommandContext(uint32_t pId, const std::string &pName, std::shared_ptr< Room > r, ::Server *srv)
::Server * server
Server instance for operations (global namespace)