CommandManager.h 499 B

12345678910111213141516171819202122
  1. #ifndef COMMANDMANAGER_H
  2. #define COMMANDMANAGER_H
  3. #include "server/commands/ServerCommands.h"
  4. #include "common/utils/String.h"
  5. #include "common/utils/SplitString.h"
  6. #include "common/utils/HashMap.h"
  7. #include "common/utils/HashedString.h"
  8. class CommandManager {
  9. public:
  10. CommandManager();
  11. void execute(ServerCommands& sc, const String& rawCommand);
  12. private:
  13. typedef void (*Command) (ServerCommands&, const SplitString&);
  14. HashMap<HashedString, Command, 16> commands;
  15. };
  16. #endif