OpenLexocad  27.1
CmdAddStructuralAction.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 {
8 class LX_OPENLXCMD_EXPORT CmdAddStructuralAction : public Core::Command
9 {
10 public:
11  CmdAddStructuralAction() = default;
12  explicit CmdAddStructuralAction(Core::Command *command);
13  ~CmdAddStructuralAction() = default;
14 
15  bool redo() override;
16  bool undo() override;
17 
18  std::shared_ptr<OpenLxApp::Element> getNewElement() const;
19 
20 protected:
21  std::unique_ptr<Core::Command> _cmd;
22 };
23 
31 {
32 public:
34  explicit CmdAddStructuralCurveAction(std::shared_ptr<OpenLxApp::Element> relatingElement);
35  CmdAddStructuralCurveAction(std::shared_ptr<OpenLxApp::Element> relatingElement, const std::vector<Geom::Pnt>& pickedPoints);
36  ~CmdAddStructuralCurveAction() = default;
37 };
38 
46 {
47 public:
49  explicit CmdAddStructuralPlanarAction(std::shared_ptr<OpenLxApp::Element> relatingElement);
50  CmdAddStructuralPlanarAction(std::shared_ptr<OpenLxApp::Element> relatingElement, const std::vector<Geom::Pnt>& pickedPoints);
51  ~CmdAddStructuralPlanarAction() = default;
52 };
53 
61 {
62 public:
64  explicit CmdAddStructuralPointAction(std::shared_ptr<OpenLxApp::Element> relatingElement);
65  CmdAddStructuralPointAction(std::shared_ptr<OpenLxApp::Element> relatingElement, const Geom::Pnt &pickedPoint);
66  ~CmdAddStructuralPointAction() = default;
67 };
68 }
Defines a non-persistent 3D Cartesian point.
Definition: Pnt.h:43
Interface(s) to the command "CmdAddStructuralPointAction".
Definition: CmdAddStructuralAction.h:60
Definition: CmdAddStructuralAction.h:8
Interface(s) to the command "CmdAddStructuralCurveAction".
Definition: CmdAddStructuralAction.h:30
bool undo(int id=0)
Will UNDO one step, returns False if no undo was done (Undos == 0).
Interface(s) to the command "CmdAddStructuralPlanarAction".
Definition: CmdAddStructuralAction.h:45
bool redo(int id=0)
Will REDO one step, returns False if no redo was done (Redos == 0).
Definition: CmdAddBolt.h:7
std::unique_ptr< Core::Command > _cmd
Definition: CmdAddStructuralAction.h:21
Definition: Command.h:34