ft_irc 1.0
読み取り中…
検索中…
一致する文字列を見つけられません
CommandManager.hpp
[詳解]
1
8#ifndef COMMAND_MANAGER_HPP
9#define COMMAND_MANAGER_HPP
10
11#include <map>
12#include <string>
13#include <vector>
14
15class Server;
16class Client;
17class ICommand;
18class PingCommand;
19class PongCommand;
20class NoticeCommand;
21class NamesCommand;
22class TopicCommand;
23class ModeCommand;
24class KickCommand;
25class ListCommand;
26class WhoCommand;
27class WhoisCommand;
28class InviteCommand;
29
40 private:
41 Server *_server;
44 // Private helper methods for parsing
50 std::string getCommand(const std::string &rawMessage);
51
57 std::vector<std::string> getArguments(const std::string &rawMessage);
58
59 public:
64 CommandManager(Server *server);
65
70
76 void parseAndExecute(Client *client, const std::string &rawMessage);
77};
78
79#endif
Represents an IRC client connected to the server.
Definition Client.hpp:25
Manages the registration, parsing, and execution of IRC commands.
void parseAndExecute(Client *client, const std::string &rawMessage)
Parses a raw message and executes the corresponding command.
~CommandManager()
Destroys the CommandManager object and frees all registered command objects.
Abstract base class (interface) for all IRC commands.
Definition ICommand.hpp:26
Implements the INVITE command.
Implements the KICK command.
Implements the LIST command.
Implements the MODE command.
Implements the NAMES command.
Implements the NOTICE command.
Implements the PING command.
Implements the PONG command.
Implements the core IRC server functionality as a Singleton.
Definition Server.hpp:49
Implements the TOPIC command.
Implements the WHO command.
Implements the WHOIS command.