Salome HOME
Merge branch 'Dev_0.7.1' of newgeom:newgeom.git into Dev_0.7.1
[modules/shaper.git] / src / NewGeom / NewGeom_DataModel.h
index 7beaf392fcf16fad598ccfe10f49f446214c2878..1024f275d6526488dff58f37acee2f9a42fcec8c 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
 
 #ifndef NEWGEOM_DATAMODEL_H
 #define NEWGEOM_DATAMODEL_H
@@ -5,11 +7,13 @@
 #include "NewGeom.h"
 #include <LightApp_DataModel.h>
 
+class NewGeom_Module;
+
 class NewGeom_EXPORT NewGeom_DataModel : public LightApp_DataModel
 {
   Q_OBJECT
  public:
-  NewGeom_DataModel(CAM_Module* theModule);
+  NewGeom_DataModel(NewGeom_Module* theModule);
   virtual ~NewGeom_DataModel();
 
   virtual bool open(const QString& thePath, CAM_Study* theStudy, QStringList theFiles);
@@ -23,9 +27,19 @@ class NewGeom_EXPORT NewGeom_DataModel : public LightApp_DataModel
 
   virtual void update(LightApp_DataObject* theObj = 0, LightApp_Study* theStudy = 0);
 
+protected:
+  /**
+   * Removes the directory with content if it exists
+   * \param theDirectoryName a directory name
+   */
+  static void removeDirectory(const QString& theDirectoryName);
+
  private:
   QString myStudyPath;
-
+  QString myTmpDirectory; /// a path to the temporary directory, created by opening a document file
+  /// it should be created because the files reading is postponed in the module. The directory
+  // should be removed after the model document is closed.
+  NewGeom_Module* myModule;
 };
 
 #endif