ft_irc 1.0
読み取り中…
検索中…
一致する文字列を見つけられません
ICommand.hpp
[詳解]
1
8#ifndef ICOMMAND_HPP
9#define ICOMMAND_HPP
10
11#include <string>
12#include <vector>
13
14class Client;
15class Server;
16
26class ICommand {
27 protected:
30 public:
35 ICommand(Server *server) : _server(server) {}
36
40 virtual ~ICommand() {}
41
47 virtual void execute(Client *client, const std::vector<std::string> &args) = 0;
48};
49
50#endif
Represents an IRC client connected to the server.
Definition Client.hpp:25
Abstract base class (interface) for all IRC commands.
Definition ICommand.hpp:26
Server * _server
Pointer to the IRC server instance.
Definition ICommand.hpp:28
virtual ~ICommand()
Virtual destructor for ICommand, ensuring proper cleanup of derived classes.
Definition ICommand.hpp:40
virtual void execute(Client *client, const std::vector< std::string > &args)=0
Pure virtual method to execute the command logic.
ICommand(Server *server)
Constructs an ICommand object, associating it with a server instance.
Definition ICommand.hpp:35
Implements the core IRC server functionality as a Singleton.
Definition Server.hpp:49