Salome HOME
Make SHAPER STUDY fields exported in SMESH into MED file
[modules/shaper.git] / src / FeaturesAPI / FeaturesAPI_BooleanCommon.h
index 56e49bb79e5b2ab706d266a4e63bf0ff34e27541..66d4e74cdbe266b8c6a324435d3048bbdaa4b2a3 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
 #ifndef FeaturesAPI_BooleanCommon_H_
@@ -41,17 +40,26 @@ public:
   FEATURESAPI_EXPORT
   explicit FeaturesAPI_BooleanCommon(const std::shared_ptr<ModelAPI_Feature>& theFeature);
 
+    /// Constructor with values.
+  FEATURESAPI_EXPORT
+  FeaturesAPI_BooleanCommon(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+                            const std::list<ModelHighAPI_Selection>& theMainObjects,
+                            const int theVersion = 0);
+
   /// Constructor with values.
   FEATURESAPI_EXPORT
   FeaturesAPI_BooleanCommon(const std::shared_ptr<ModelAPI_Feature>& theFeature,
                             const std::list<ModelHighAPI_Selection>& theMainObjects,
-                            const std::list<ModelHighAPI_Selection>& theToolObjects);
+                            const std::list<ModelHighAPI_Selection>& theToolObjects,
+                            const int theVersion = 0);
 
   /// Destructor.
   FEATURESAPI_EXPORT
   virtual ~FeaturesAPI_BooleanCommon();
 
-  INTERFACE_2(FeaturesPlugin_BooleanCommon::ID(),
+  INTERFACE_3(FeaturesPlugin_BooleanCommon::ID(),
+              creationMethod, FeaturesPlugin_BooleanCommon::CREATION_METHOD(),
+              ModelAPI_AttributeString, /** Creation method */,
               mainObjects, FeaturesPlugin_BooleanCommon::OBJECT_LIST_ID(),
               ModelAPI_AttributeSelectionList, /** Main objects */,
               toolObjects, FeaturesPlugin_BooleanCommon::TOOL_LIST_ID(),
@@ -65,6 +73,10 @@ public:
   FEATURESAPI_EXPORT
   void setToolObjects(const std::list<ModelHighAPI_Selection>& theToolObjects);
 
+  /// Set mode.
+  FEATURESAPI_EXPORT
+  void setAdvancedMode(const bool theMode);
+
   /// Dump wrapped feature
   FEATURESAPI_EXPORT
   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
@@ -75,9 +87,10 @@ typedef std::shared_ptr<FeaturesAPI_BooleanCommon> BooleanCommonPtr;
 
 /// \ingroup CPPHighAPI
 /// \brief Create Boolean Common feature.
-FEATURESAPI_EXPORT
-BooleanCommonPtr addCommon(const std::shared_ptr<ModelAPI_Document>& thePart,
-                           const std::list<ModelHighAPI_Selection>& theMainObjects,
-                           const std::list<ModelHighAPI_Selection>& theToolObjects);
+FEATURESAPI_EXPORT BooleanCommonPtr addCommon(
+    const std::shared_ptr<ModelAPI_Document>& part,
+    const std::list<ModelHighAPI_Selection>& objects,
+    const std::list<ModelHighAPI_Selection>& tools = std::list<ModelHighAPI_Selection>(),
+    const bool keepSubResults = false);
 
 #endif // FeaturesAPI_BooleanCommon_H_