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