]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/Model/Model_Document.h
Salome HOME
Task 5.1.7: To be able to export a part to a file and import it into an existing...
[modules/shaper.git] / src / Model / Model_Document.h
index 72a570738b5080a167838dc2fa0830d3f43eeebf..2cf44cbd0bcdb7b1d6eadf65e7036cf8d7977138 100644 (file)
@@ -56,6 +56,12 @@ class Model_Document : public ModelAPI_Document
   MODEL_EXPORT virtual bool load(
     const char* theDirName, const char* theFileName, DocumentPtr theThis);
 
+  //! Loads the OCAF document from the file into the current document.
+  //! All the features are added after the active feature.
+  //! \param theFileName name of the file to import
+  //! \returns true if file was loaded successfully
+  MODEL_EXPORT virtual bool import(const char* theFileName);
+
   //! Saves the OCAF document to the file.
   //! \param theDirName directory where the document will be saved
   //! \param theFileName a name of the document file to store
@@ -64,6 +70,12 @@ class Model_Document : public ModelAPI_Document
   MODEL_EXPORT virtual bool save(
     const char* theDirName, const char* theFileName, std::list<std::string>& theResults);
 
+  //! Export the list of features to the file
+  //! \param theFilename path to save the file
+  //! \param theExportFeatures list of features to export
+  MODEL_EXPORT virtual bool save(const char* theFilename,
+    const std::list<std::shared_ptr<ModelAPI_Feature> >& theExportFeatures) const;
+
   //! Removes document data
   //! \param theForever if it is false, document is just hidden
   //!                   (to keep possibility make it back on Undo/Redo)