OpenLexocad  27.1
CmdCreateGenericCommand.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <Core/Command.h>
4 #include <OpenLxApp/Element.h>
5 
6 namespace OpenLxCmd
7 {
14 class LX_OPENLXCMD_EXPORT CmdCreateGenericCommand : public Core::Command
15 {
16 public:
17  CmdCreateGenericCommand() = default;
18  explicit CmdCreateGenericCommand(const std::string &commandName);
19  ~CmdCreateGenericCommand() = default;
20 
21  bool created() const;
22 
23  bool redo() override;
24  bool undo() override;
25 
26 private:
27  std::unique_ptr<Core::Command> _cmd;
28 };
29 }
bool undo(int id=0)
Will UNDO one step, returns False if no undo was done (Undos == 0).
bool redo(int id=0)
Will REDO one step, returns False if no redo was done (Redos == 0).
Definition: CmdAddBolt.h:7
Definition: Command.h:34
Creates a "generic" command given its name (if it exists)
Definition: CmdCreateGenericCommand.h:14