R-Type
Distributed multiplayer game engine in C++
Loading...
Searching...
No Matches
ListCommand.hpp
Go to the documentation of this file.
1
/*
2
** EPITECH PROJECT, 2025
3
** Created on 14/01/2026.
4
** File description:
5
** ListCommand.hpp
6
*/
7
8
#pragma once
9
10
#include <string>
11
#include <vector>
12
#include "
ICommand.hpp
"
13
14
namespace
server
{
15
26
class
ListCommand
:
public
ICommand
{
27
public
:
28
ListCommand
() =
default
;
29
~ListCommand
()
override
=
default
;
30
31
std::string
execute
(
const
std::vector<std::string> &args,
const
CommandContext
&context)
override
;
32
std::string
getName
()
const override
{
return
"list"
; }
33
std::string
getDescription
()
const override
{
return
"List all players and spectators in the room"
; }
34
std::string
getUsage
()
const override
{
return
"/list"
; }
35
};
36
37
}
// namespace server
ICommand.hpp
server::ICommand
Interface for all chat commands.
Definition
ICommand.hpp:23
server::ListCommand
Lists all players and spectators in the current room.
Definition
ListCommand.hpp:26
server::ListCommand::ListCommand
ListCommand()=default
server::ListCommand::execute
std::string execute(const std::vector< std::string > &args, const CommandContext &context) override
Execute the command.
Definition
ListCommand.cpp:15
server::ListCommand::getName
std::string getName() const override
Get command name.
Definition
ListCommand.hpp:32
server::ListCommand::getUsage
std::string getUsage() const override
Get command usage.
Definition
ListCommand.hpp:34
server::ListCommand::getDescription
std::string getDescription() const override
Get command description.
Definition
ListCommand.hpp:33
server::ListCommand::~ListCommand
~ListCommand() override=default
server
Definition
CommandContext.hpp:16
server::CommandContext
Context information for command execution.
Definition
CommandContext.hpp:28
server
Commands
ListCommand.hpp
Generated by
1.9.8