Salome HOME
Merge remote-tracking branch 'remotes/origin/EDF_2020_Lot2'
[modules/shaper.git] / src / Selector / Selector_Algo.h
index 162f0cc24fc144fad9490f4435c236448c2c1f84..b9fa6b0cd241544994323f3baa25b6d45effa1ec 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2020  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
@@ -59,6 +59,8 @@ public:
   /// Initializes the algorithm
   SELECTOR_EXPORT Selector_Algo();
 
+  virtual ~Selector_Algo() {}
+
   /// Initializes the selector structure on the label.
   /// Stores the name data to restore after modification.
   /// \param theContext whole shape that contains the selected sub-shape
@@ -148,16 +150,29 @@ protected:
     static const Standard_GUID kSHAPE_TYPE("864b3267-cb9d-4107-bf58-c3ce1775b171");
     return kSHAPE_TYPE;
   }
+  /// old string identifier of the weak name in modification or intersection types of algorithm
+  static const std::wstring& oldWeakNameID()
+  {
+    static const std::wstring kWEAK_NAME_IDENTIFIER = L"weak_name_";
+    return kWEAK_NAME_IDENTIFIER;
+  }
+  /// old string identifier of the pure weak name
+  static const std::wstring& oldPureWeakNameID()
+  {
+    static const std::wstring kPURE_WEAK_NAME_IDENTIFIER = L"_weak_name_";
+    return kPURE_WEAK_NAME_IDENTIFIER;
+  }
   /// string identifier of the weak name in modification or intersection types of algorithm
   static const std::wstring& weakNameID()
   {
-    static const std::wstring kWEAK_NAME_IDENTIFIER = L"weak_name_";
+    static const std::wstring kWEAK_NAME_IDENTIFIER = std::wstring(L"new_") + oldWeakNameID();
     return kWEAK_NAME_IDENTIFIER;
   }
   /// string identifier of the pure weak name
   static const std::wstring& pureWeakNameID()
   {
-    static const std::wstring kPURE_WEAK_NAME_IDENTIFIER = L"_weak_name_";
+    static const std::wstring kPURE_WEAK_NAME_IDENTIFIER =
+        std::wstring(L"_new") + oldPureWeakNameID();
     return kPURE_WEAK_NAME_IDENTIFIER;
   }
   /// Stores the type of an algorithm in the data tree (in myLab)