LibreCAD
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
documentoperation.cpp
Go to the documentation of this file.
1 #include "documentoperation.h"
3 
4 using namespace lc;
5 using namespace operation;
6 
7 DocumentOperation::DocumentOperation(Document_SPtr document, const std::string& description) :
8  Undoable(description),
9  _document(document) {
10 }
11 
12 std::shared_ptr<Document> DocumentOperation::document() const {
13  return _document;
14 }
15 
18 }
19 
21  _document->execute(shared_from_this());
22 }
: Abstract class for a Undoable operations All operations you wnt to beable to get place in the undo ...
Definition: undoable.h:18
DocumentOperation(Document_SPtr document, const std::string &description)
virtual void execute()
execute this operation
Definition: cadentity.h:12