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
14namespace 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
Interface for all chat commands.
Definition ICommand.hpp:23
virtual std::string getName() const =0
Get command name.
virtual std::string execute(const std::vector< std::string > &args, const CommandContext &context)=0
Execute the command.
virtual ~ICommand()=default
virtual std::string getUsage() const =0
Get command usage.
virtual std::string getDescription() const =0
Get command description.
Context information for command execution.