Salome HOME
Activation objects redesign : widgetActivated should not be processed in ReentrantMan...
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Partition.h
index eaa17dd232f7cecf63aec6bd0bd72f106c69deed..5db7fc5afbd81a419a1b29a1986149bc72bdb1bb 100755 (executable)
@@ -1,8 +1,22 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
-
-// File:        FeaturesPlugin_Partition.h
-// Created:     31 Jul 2015
-// Author:      Natalia ERMOLAEVA
+// Copyright (C) 2014-2017  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
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// 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
+//
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+//
 
 #ifndef FeaturesPlugin_Partition_H_
 #define FeaturesPlugin_Partition_H_
 
 #include <GeomAlgoAPI_Partition.h>
 
-/**\class FeaturesPlugin_Partition
- * \ingroup Plugins
- * \brief Feature for applying of Partition operations on Solids. Partition makes conjunctional
- * faces of solids as shared. The result of partitions is a compsolid.
- * Main objects are solids, tool objects are solids or faces
- */
+/// \class FeaturesPlugin_Partition
+/// \ingroup Plugins
+/// \brief Feature for applying of Partition operations on Shapes. Partition makes conjunctional
+/// faces of solids as shared. The result of partitions is a compsolid.
 class FeaturesPlugin_Partition : public ModelAPI_Feature
 {
 public:
-  /// Extrusion kind
+  /// Feature kind.
   inline static const std::string& ID()
   {
     static const std::string MY_ID("Partition");
     return MY_ID;
   }
-  /// attribute name of referenced object
-  inline static const std::string& OBJECT_LIST_ID()
-  {
-    static const std::string MY_OBJECT_LIST_ID("main_objects");
-    return MY_OBJECT_LIST_ID;
-  }
-  /// attribute name of tool object
-  inline static const std::string& TOOL_LIST_ID()
-  {
-    static const std::string MY_TOOL_LIST_ID("tool_objects");
-    return MY_TOOL_LIST_ID;
-  }
 
-  /// attribute name of combine flag
-  inline static const std::string& COMBINE_ID()
+  /// Attribute name of base objects.
+  inline static const std::string& BASE_OBJECTS_ID()
   {
-    static const std::string MY_COMBINE_ID("partition_combine");
-    return MY_COMBINE_ID;
+    static const std::string MY_BASE_OBJECTS_ID("base_objects");
+    return MY_BASE_OBJECTS_ID;
   }
 
-  /// Returns the kind of a feature
+  /// \return the kind of a feature.
   FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
   {
     static std::string MY_KIND = FeaturesPlugin_Partition::ID();
@@ -64,16 +64,12 @@ public:
   FeaturesPlugin_Partition();
 
 private:
-  std::shared_ptr<GeomAPI_Shape> getShape(const std::string& theAttrName);
-
-  /// Load Naming data structure of the feature to the document
-  void loadNamingDS(std::shared_ptr<ModelAPI_ResultBody> theResultBody,
-                    const std::shared_ptr<GeomAPI_Shape> theBaseShape,
-                    const ListOfShape& theTools,
-                    const std::shared_ptr<GeomAPI_Shape> theResultShape,
-                    GeomAlgoAPI_MakeShape& theMakeShape,
-                    GeomAPI_DataMapOfShapeShape& theMapOfShapes);
-
+  /// Stores result of generation.
+  void storeResult(ListOfShape& theObjects,
+                   ListOfShape& thePlanes,
+                   const GeomShapePtr theResultShape,
+                   const std::shared_ptr<GeomAlgoAPI_MakeShape> theMakeShape,
+                   const int theIndex = 0);
 };
 
 #endif