123456789101112131415161718192021222324252627 |
- #ifndef COMMANDMANAGER_H
- #define COMMANDMANAGER_H
- #include <iostream>
- #include <unordered_map>
- #include <vector>
- #include "server/commands/ICommandSource.h"
- using namespace std;
- class CommandManager
- {
- public:
- CommandManager();
- virtual ~CommandManager();
-
- void execute(IGameServer& gs, ICommandSource& cs, const string& rawCommand) const;
- private:
- unordered_map<string, void (*) (IGameServer& gs, ICommandSource&, vector<string>&)> commands;
-
- void registerCommand(const string& name, void (*command) (IGameServer& gs, ICommandSource&, vector<string>&));
- };
- #endif
|