]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/Model/Model_Application.cxx
Salome HOME
Implementation of features cashing and undo/redo functionality in document.
[modules/shaper.git] / src / Model / Model_Application.cxx
index aab352e75c7ecd02a8052759619e1afd879e7462..260db7d444ae0841f47903849630f20e3eb95b01 100644 (file)
@@ -8,6 +8,8 @@
 IMPLEMENT_STANDARD_HANDLE(Model_Application, TDocStd_Application)
 IMPLEMENT_STANDARD_RTTIEXT(Model_Application, TDocStd_Application)
 
+using namespace std;
+
 static Handle_Model_Application TheApplication = new Model_Application;
 
 //=======================================================================
@@ -23,7 +25,7 @@ Handle(Model_Application) Model_Application::getApplication()
 //function : getDocument
 //purpose  : 
 //=======================================================================
-std::shared_ptr<Model_Document> Model_Application::getDocument(std::string theDocID)
+std::shared_ptr<Model_Document> Model_Application::getDocument(string theDocID)
 {
   if (myDocs.find(theDocID) != myDocs.end())
     return myDocs[theDocID];
@@ -33,6 +35,11 @@ std::shared_ptr<Model_Document> Model_Application::getDocument(std::string theDo
   return aNew;
 }
 
+void Model_Application::deleteDocument(string theDocID)
+{
+  myDocs.erase(theDocID);
+}
+
 //=======================================================================
 //function : OCAFApp_Application
 //purpose  :