]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModelAPI/ModelAPI_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 / ModelAPI / ModelAPI_Document.h
index 9cc95bad2be1874f0205d34a714ba8fb5cea26ce..101910fc62aeb06dbfb2dcb5a79363409624c75f 100644 (file)
@@ -259,6 +259,18 @@ public:
   MODELAPI_EXPORT virtual std::shared_ptr<ModelAPI_Feature> nextFeature(
     std::shared_ptr<ModelAPI_Feature> theCurrent, const bool theReverse = false) const = 0;
 
+  /// 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
+  MODELAPI_EXPORT virtual bool import(const char* theFileName) = 0;
+
+  /// Export the list of features to the file
+  /// \param theFilename path to save the file
+  /// \param theExportFeatures list of features to export
+  MODELAPI_EXPORT virtual bool save(const char* theFilename,
+    const std::list<std::shared_ptr<ModelAPI_Feature> >& theExportFeatures) const = 0;
+
 protected:
   //! Only for SWIG wrapping it is here
   MODELAPI_EXPORT ModelAPI_Document();