BaseCommand.h 394 B

123456789101112131415161718192021222324
  1. #ifndef BASECOMMAND_H
  2. #define BASECOMMAND_H
  3. #include <iostream>
  4. #include <vector>
  5. #include "server/ICommandSource.h"
  6. using namespace std;
  7. class BaseCommand
  8. {
  9. public:
  10. BaseCommand(string name);
  11. virtual ~BaseCommand();
  12. const string& getName() const;
  13. virtual void execute(ICommandSource& cs, vector<string>& args) const = 0;
  14. private:
  15. const string name;
  16. };
  17. #endif