R-Type
Distributed multiplayer game engine in C++
Loading...
Searching...
No Matches
ICommand.hpp
Go to the documentation of this file.
1
/*
2
** EPITECH PROJECT, 2025
3
** Created on 14/01/2026.
4
** File description:
5
** ICommand.hpp
6
*/
7
8
#pragma once
9
10
#include <string>
11
#include <vector>
12
#include "
CommandContext.hpp
"
13
14
namespace
server
{
15
23
class
ICommand
{
24
public
:
25
virtual
~ICommand
() =
default
;
26
33
virtual
std::string
execute
(
const
std::vector<std::string> &args,
const
CommandContext
&context) = 0;
34
39
virtual
std::string
getName
()
const
= 0;
40
45
virtual
std::string
getDescription
()
const
= 0;
46
51
virtual
std::string
getUsage
()
const
= 0;
52
};
53
54
}
// namespace server
CommandContext.hpp
server::ICommand
Interface for all chat commands.
Definition
ICommand.hpp:23
server::ICommand::getName
virtual std::string getName() const =0
Get command name.
server::ICommand::execute
virtual std::string execute(const std::vector< std::string > &args, const CommandContext &context)=0
Execute the command.
server::ICommand::~ICommand
virtual ~ICommand()=default
server::ICommand::getUsage
virtual std::string getUsage() const =0
Get command usage.
server::ICommand::getDescription
virtual std::string getDescription() const =0
Get command description.
server
Definition
CommandContext.hpp:16
server::CommandContext
Context information for command execution.
Definition
CommandContext.hpp:28
server
Commands
ICommand.hpp
Generated by
1.9.8