]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/Selector/Selector_Selector.cpp
Salome HOME
Initial implementation of restoreByName selector method
[modules/shaper.git] / src / Selector / Selector_Selector.cpp
index 2d8089485c7e49ae0a574c29e7bbb977a4f4ea12..22238b81617c875c2b9d877e78239ff070cc8661 100644 (file)
@@ -793,6 +793,21 @@ std::string Selector_Selector::name(Selector_NameGenerator* theNameGenerator) {
   return "";
 }
 
+TDF_Label Selector_Selector::restoreByName(std::string theName,
+  Selector_NameGenerator* theNameGenerator)
+{
+  if (theName.find('&') == std::string::npos) { // wihtout '&' it can be only primitive
+    myType = SELTYPE_PRIMITIVE;
+    TDF_Label aContext;
+    if (theNameGenerator->restoreContext(theName, aContext, myFinal)) {
+      if (!myFinal.IsNull())
+        return aContext;
+    }
+  } else {
+  }
+  return TDF_Label();
+}
+
 bool Selector_Selector::selectBySubSelector(
   const TopoDS_Shape theContext, const TopoDS_Shape theValue, const bool theUseNeighbors)
 {