Salome HOME
updated copyright message
[modules/shaper.git] / src / ModelAPI / ModelAPI_CompositeFeature.h
index bc31a21eb80cc57f014b44c3e9478cf2843aaf4d..c10f497e191a5e478ee90902bd4b4fec7508dcb7 100644 (file)
@@ -1,8 +1,21 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-// File:        ModelAPI_CompositeFeature.h
-// Created:     20 Oct 2014
-// Author:      Mikhail PONIKAROV
+// Copyright (C) 2014-2023  CEA, EDF
+//
+// 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
+//
 
 #ifndef MODELAPI_COMPOSITEFEATURE_H_
 #define MODELAPI_COMPOSITEFEATURE_H_
@@ -28,7 +41,8 @@ public:
   virtual int numberOfSubs(bool forTree = false) const = 0;
 
   /// Returns the sub-feature by zero-base index
-  virtual std::shared_ptr<ModelAPI_Feature> subFeature(const int theIndex, bool forTree = false) = 0;
+  virtual std::shared_ptr<ModelAPI_Feature> subFeature(const int theIndex,
+                                                       bool forTree = false) = 0;
 
   /// Returns the sub-feature unique identifier in this composite feature by zero-base index
   virtual int subFeatureId(const int theIndex) const = 0;
@@ -40,9 +54,8 @@ public:
   /// structures of the owner (the remove from the document will be done outside just after)
   virtual void removeFeature(std::shared_ptr<ModelAPI_Feature> theFeature) = 0;
 
-  /// Exchanges IDs of two given features: needed for more correct naming in some cases (issue 769)
-  MODELAPI_EXPORT virtual void exchangeIDs(std::shared_ptr<ModelAPI_Feature> theFeature1,
-    std::shared_ptr<ModelAPI_Feature> theFeature2);
+  /// in addition removes all subs
+  MODELAPI_EXPORT virtual void erase();
 };
 
 //! Pointer on the composite feature object