OpenRaider  0.1.4-dev
Open Source Tomb Raider Game Engine implementation
Command.h
Go to the documentation of this file.
1 
8 #ifndef _COMMAND_H_
9 #define _COMMAND_H_
10 
11 #include <istream>
12 #include <memory>
13 #include <string>
14 #include <vector>
15 
16 class Command {
17  public:
18  virtual ~Command();
19  virtual std::string name() = 0;
20  virtual std::string brief() = 0;
21  virtual void printHelp();
22  virtual int execute(std::istream& args) = 0;
23 
24  static void fillCommandList();
25  static int command(std::string c);
26  static int executeFile(std::string file);
27  static std::string autoComplete(std::string begin);
28 
29  private:
30  static std::vector<std::shared_ptr<Command>> commands;
31 };
32 
33 #endif
34 
virtual ~Command()
Definition: Command.cpp:21
static std::string autoComplete(std::string begin)
Definition: Command.cpp:122
static std::vector< std::shared_ptr< Command > > commands
Definition: Command.h:30
static int command(std::string c)
Definition: Command.cpp:38
virtual void printHelp()
Definition: Command.cpp:24
static void fillCommandList()
Definition: Command.cpp:28
virtual std::string name()=0
static int executeFile(std::string file)
Definition: Command.cpp:99
virtual std::string brief()=0
virtual int execute(std::istream &args)=0