icommand.h
Go to the documentation of this file.
1 #ifndef DNAI_INTERFACES_ICOMMAND_H
2 #define DNAI_INTERFACES_ICOMMAND_H
3 
4 #include <QString>
5 
6 namespace dnai
7 {
8  namespace commands {
9  class CommandManager;
10  class DebugDecorator;
11  }
12  namespace interfaces
13  {
14 
15  class ICommand
16  {
17  protected:
18  virtual ~ICommand() = default;
19 
23  virtual void execute() const = 0;
24 
28  virtual void executeSave() = 0;
29 
33  virtual void unExcute() const = 0;
38  virtual QString infos() const = 0;
43  virtual bool isSave() const = 0;
46  };
47  }
48 }
49 
50 
51 #endif // DNAI_INTERFACES_ICOMMAND_H
Definition: commandmanager.h:14
virtual bool isSave() const =0
Is the command is in a save state.
Definition: debugdecorator.h:9
virtual QString infos() const =0
Get display info for this command.
virtual void executeSave()=0
Save current state of the command for the reverse unExcute()
virtual void unExcute() const =0
Reverse the execute() function.
Definition: api.h:13
virtual void execute() const =0
Execute the command.
virtual ~ICommand()=default
Definition: icommand.h:15