Salome HOME
Fix for the issue #593: do not remove naming attribute, but use TNaming_Builder for...
[modules/shaper.git] / src / ExchangePlugin / ExchangePlugin_ExportFeature.h
index 94160a860721c53c5285dcd609ebac803e524970..774cbadd9c8a3618a004e91d1f1e3b5f773a2f13 100644 (file)
  */
 class ExchangePlugin_ExportFeature : public ModelAPI_Feature
 {
- public:
-  /// Extrusion kind
+public:
   inline static const std::string& ID()
   {
     static const std::string MY_EXPORT_ID("Export");
     return MY_EXPORT_ID;
   }
-  /// attribute name of referenced face
+  /// attribute name of file format
+  inline static const std::string& FILE_FORMAT_ID()
+  {
+    static const std::string MY_FILE_FORMAT_ID("export_file_format");
+    return MY_FILE_FORMAT_ID;
+  }
+  /// attribute name of file path
   inline static const std::string& FILE_PATH_ID()
   {
     static const std::string MY_FILE_PATH_ID("export_file_selector");
     return MY_FILE_PATH_ID;
   }
+  /// attribute name of selection list
+  inline static const std::string& SELECTION_LIST_ID()
+  {
+    static const std::string MY_SELECTION_LIST_ID("selection_list");
+    return MY_SELECTION_LIST_ID;
+  }
   /// default constructor
   EXCHANGEPLUGIN_EXPORT ExchangePlugin_ExportFeature();
   /// default destructor
@@ -46,17 +57,15 @@ class ExchangePlugin_ExportFeature : public ModelAPI_Feature
 
   /// Reimplemented from ModelAPI_Feature::isMacro(). Returns true.
   EXCHANGEPLUGIN_EXPORT virtual bool isMacro() const { return true; }
+
   /// Reimplemented from ModelAPI_Feature::isPreviewNeeded(). Returns false.
-  MODELAPI_EXPORT virtual bool isPreviewNeeded() const { return false; }
+  EXCHANGEPLUGIN_EXPORT virtual bool isPreviewNeeded() const { return false; }
 
- protected:
+protected:
   /// Performs the export of the file
-  EXCHANGEPLUGIN_EXPORT bool exportFile(const std::string& theFileName);
-
-private:
-  /// Loads Naming data structure to the document
-  void loadNamingDS(std::shared_ptr<GeomAPI_Shape> theGeomShape, 
-                    std::shared_ptr<ModelAPI_ResultBody> theResultBody);
+  EXCHANGEPLUGIN_EXPORT bool exportFile(const std::string& theFileName,
+                                        const std::string& theFormat,
+                                        std::shared_ptr<GeomAPI_Shape> theShape);
 };
 
 #endif /* EXPORT_EXPORTFEATURE_H_ */