Salome HOME
Updated copyright comment
[modules/shaper.git] / src / Selector / Selector_FilterByNeighbors.h
index 721e4a923016ae531bb8a971a1398fedacec0f4f..61b592ddef5568959cf6b4a0dd17f39bc06d4ff6 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2024  CEA, EDF
 //
 // 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 Selector_FilterByNeighbors_H_
@@ -35,9 +34,11 @@ class Selector_FilterByNeighbors: public Selector_AlgoWithSubs
 {
   TopAbs_ShapeEnum myShapeType; ///< type of this shape
   std::list<int> myNBLevel; ///< list of integers corresponding to subs neighborhood level
+  TDF_Label myContext; ///< label where the context of filter is stored (for naming name strings)
 public:
   /// Initializes the selection of this kind
-  SELECTOR_EXPORT bool select(const TopoDS_Shape theContext, const TopoDS_Shape theValue);
+  SELECTOR_EXPORT bool select(
+    const TDF_Label theContextLab, const TopoDS_Shape theContext, const TopoDS_Shape theValue);
 
   /// Stores the name to the label and sub-labels tree
   SELECTOR_EXPORT virtual void store() override;
@@ -48,14 +49,14 @@ public:
 
   /// Restores the selected shape by the topological name string.
   /// Returns not empty label of the context.
-  SELECTOR_EXPORT virtual TDF_Label restoreByName(std::string theName,
+  SELECTOR_EXPORT virtual TDF_Label restoreByName(std::wstring theName,
     const TopAbs_ShapeEnum theShapeType, Selector_NameGenerator* theNameGenerator) override;
 
   /// Updates the current shape by the stored topological name
   SELECTOR_EXPORT virtual bool solve(const TopoDS_Shape& theContext) override;
 
   /// Returns the naming name of the selection
-  SELECTOR_EXPORT virtual std::string name(Selector_NameGenerator* theNameGenerator) override;
+  SELECTOR_EXPORT virtual std::wstring name(Selector_NameGenerator* theNameGenerator) override;
 private:
   /// Initializes selector
   Selector_FilterByNeighbors();