Open Source Tomb Raider Engine
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920212223242526272829303132
  1. /*!
  2. * \file include/commands/Command.h
  3. * \brief Command interface
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _COMMAND_H_
  8. #define _COMMAND_H_
  9. #include <istream>
  10. #include <memory>
  11. #include <string>
  12. #include <vector>
  13. class Command {
  14. public:
  15. virtual ~Command();
  16. virtual std::string name() = 0;
  17. virtual std::string brief() = 0;
  18. virtual void printHelp();
  19. virtual int execute(std::istream& args) = 0;
  20. static void fillCommandList();
  21. static int command(std::string c);
  22. private:
  23. static std::vector<std::shared_ptr<Command>> commands;
  24. };
  25. #endif