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::isGranted() const
39 boost::shared_ptr<ModelAPI_Document> ModuleBase_IOperation::document() const
41 return ModelAPI_PluginManager::get()->rootDocument();
44 void ModuleBase_IOperation::start()
46 document()->startOperation();
52 void ModuleBase_IOperation::resume()
56 void ModuleBase_IOperation::abort()
63 document()->abortOperation();
67 void ModuleBase_IOperation::commit()
74 document()->finishOperation();
78 void ModuleBase_IOperation::setRunning(bool theState)