Salome HOME
Addition of redundant CF links tool for evalyfx.
[modules/yacs.git] / src / engine / ComposedNode.cxx
index 7b846bd578f4fc1f18fe50962a11af7cc28d56db..09134bdb0f2d0717cef4876ede700147b9ee0cd9 100644 (file)
@@ -1100,6 +1100,20 @@ std::string ComposedNode::getLowestCommonAncestorStr(const std::string& node1, c
   return ret;
 }
 
+/*!
+ * This method recursively all redundant control links in this.
+ */
+void ComposedNode::removeRecursivelyRedundantCL()
+{
+  std::list<Node *> dd(edGetDirectDescendants());
+  for(std::list<Node *>::const_iterator it=dd.begin();it!=dd.end();it++)
+    {
+      ComposedNode *elt(dynamic_cast<ComposedNode *>(*it));
+      if(elt)
+        elt->removeRecursivelyRedundantCL();
+    }
+}
+
 list<ElementaryNode *> ComposedNode::getRecursiveConstituents() const
 {
   list<ElementaryNode *> ret;