Recast  1
Game with custom magic
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
ICommand.hpp
Go to the documentation of this file.
1 
11 #ifndef RECAST_SERVER_ICOMMAND_H
12 #define RECAST_SERVER_ICOMMAND_H
13 
14 #include <string>
15 #include <vector>
16 #include "ICommandSender.hpp"
17 
26 class ICommand {
27 public:
28  ICommand() {}
29 
30  ICommand(const ICommand &other) {}
31 
32  virtual bool isOnlyUICommand() { return false; }
33 
34  virtual bool isValid(const std::string &cmd,
35  const std::vector<std::string> &args) const = 0;
36 
47  virtual void onCommand(ICommandSender &sender, const std::string &cmd, const std::vector<std::string> &args) = 0;
48 };
49 
50 
51 #endif //RECAST_SERVER_ICOMMAND_H
ICommand()
Definition: ICommand.hpp:28
virtual bool isOnlyUICommand()
Definition: ICommand.hpp:32
virtual bool isValid(const std::string &cmd, const std::vector< std::string > &args) const =0
virtual void onCommand(ICommandSender &sender, const std::string &cmd, const std::vector< std::string > &args)=0
ICommand(const ICommand &other)
Definition: ICommand.hpp:30
Definition: ICommandSender.hpp:12
Superclass for Command object.
Definition: ICommand.hpp:26