2 * ModuleBase_IOperation.cpp
4 * Created on: May 5, 2014
8 #include "ModuleBase_IOperation.h"
9 #include "ModuleBase_OperationDescription.h"
11 #include <ModelAPI_Document.h>
12 #include <ModelAPI_PluginManager.h>
18 ModuleBase_IOperation::ModuleBase_IOperation(const QString& theId, QObject* theParent)
21 myDescription = new ModuleBase_OperationDescription(theId);
24 ModuleBase_IOperation::~ModuleBase_IOperation()
29 ModuleBase_OperationDescription* ModuleBase_IOperation::getDescription() const
34 bool ModuleBase_IOperation::canBeCommitted() const
39 bool ModuleBase_IOperation::isGranted(ModuleBase_IOperation* /*theOperation*/) const
44 boost::shared_ptr<ModelAPI_Document> ModuleBase_IOperation::document() const
46 return ModelAPI_PluginManager::get()->rootDocument();
49 void ModuleBase_IOperation::start()
51 document()->startOperation();
57 void ModuleBase_IOperation::resume()
62 void ModuleBase_IOperation::abort()
69 document()->abortOperation();
73 void ModuleBase_IOperation::commit()
80 document()->finishOperation();
83 afterCommitOperation();
86 void ModuleBase_IOperation::setRunning(bool theState)