Salome HOME
Fix for the issue #2753 : error when dump/load script
[modules/shaper.git] / src / ModelAPI / ModelAPI_AttributeRefList.h
index 2a282108fb911197c2f837557fa4e62cd827865b..78d8ba769dfce1ccaa620fe49605ab0f8b849990 100644 (file)
@@ -1,8 +1,22 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-// File:        ModelAPI_AttributeRefList.h
-// Created:     8 May 2014
-// Author:      Mikhail PONIKAROV
+// 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 ModelAPI_AttributeRefList_H_
 #define ModelAPI_AttributeRefList_H_
@@ -52,12 +66,19 @@ class ModelAPI_AttributeRefList : public ModelAPI_Attribute
   ///\param theWithEmpty if it is false, counts the not-empty referenced objects only
   virtual ObjectPtr object(const int theIndex, const bool theWithEmpty = true) const = 0;
 
-  /// Substitutes the feature by another one. Does nothing if such object is not found.
+  /// Substitutes the object by another one. Does nothing if such object is not found.
   virtual void substitute(const ObjectPtr& theCurrent, const ObjectPtr& theNew) = 0;
 
+  /// Substitutes the object by another one and back. So, features wil become exchanged in the list
+  virtual void exchange(const ObjectPtr& theObject1, const ObjectPtr& theObject2) = 0;
+
   /// Removes the last element in the list.
   virtual void removeLast() = 0;
 
+  /// Removes the elements from the list.
+  /// \param theIndices a list of indices of elements to be removed
+  virtual void remove(const std::set<int>& theIndices) = 0;
+
   MODELAPI_EXPORT virtual ~ModelAPI_AttributeRefList();
  protected:
   /// Objects are created for features automatically