Salome HOME
Update copyrights
[modules/shaper.git] / src / ModelAPI / ModelAPI_AttributeSelection.h
index 65fd3a6c7998adb300d79c3bf9c4c5af1c7e30db..0f44acb010c7399b7ec31a293868b51a752e81f7 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 ModelAPI_AttributeSelection_H_
@@ -47,7 +46,7 @@ class ModelAPI_AttributeSelection : public ModelAPI_Attribute
   /// \param theContext object where the sub-shape was selected
   /// \param theSubShape selected sub-shape (if null, the whole context is selected)
   /// \param theTemporarily if it is true, do not store and name the added in the data framework
-  ///           (used to remove immideately, without the following updates)
+  ///           (used to remove immediately, without the following updates)
   /// \returns true if attribute was updated
   virtual bool setValue(
     const ObjectPtr& theContext, const std::shared_ptr<GeomAPI_Shape>& theSubShape,
@@ -78,7 +77,7 @@ class ModelAPI_AttributeSelection : public ModelAPI_Attribute
   /// Returns the context of the selection : result or feature
   virtual std::shared_ptr<ModelAPI_Object> contextObject() = 0;
 
-  /// Updates the underlied selection due to the changes in the referenced objects
+  /// Updates the selection due to the changes in the referenced objects
   /// \returns false if update is failed
   virtual bool update() = 0;
 
@@ -95,9 +94,6 @@ class ModelAPI_AttributeSelection : public ModelAPI_Attribute
   /// \param theDefaultValue a value, which is used if the naming name can not be obtained
   virtual std::string namingName(const std::string& theDefaultValue = "") = 0;
 
-  /// Returns an id of the selection
-  virtual int Id() = 0;
-
   /// Defines an id of the selection
   virtual void setId(int theID) = 0;
 
@@ -115,9 +111,17 @@ class ModelAPI_AttributeSelection : public ModelAPI_Attribute
   /// Returns true if recompute of selection become impossible
   virtual bool isInvalid() = 0;
 
+  /// Returns true if is geometrical selection.
+  virtual bool isGeometricalSelection() const = 0;
+
   /// To virtually destroy the fields of successors
   MODELAPI_EXPORT virtual ~ModelAPI_AttributeSelection();
 
+  /// Returns the name by context. Adds the part name if the context is located in other document
+  MODELAPI_EXPORT virtual std::string contextName(const ResultPtr& theContext) const = 0;
+
+  /// Makes the current local selection becomes all sub-shapes with same base geometry.
+  MODELAPI_EXPORT virtual void combineGeometrical() = 0;
 
  protected:
   /// Objects are created for features automatically