*/
ComposedNode *ComposedNode::getLowestCommonAncestor(Node *node1, Node *node2) throw(YACS::Exception)
{
- const char what[]="2 nodes does not share the same genealogy";
+ const char what[]="The two nodes do not share the same genealogy";
if(node1==0 || node2==0)
throw Exception(what);
ComposedNode *temp;
return ret;
}
+
+//! Get the progress weight for all elementary nodes
+/*!
+ * Only elementary nodes have weight. A simple composed node only sum up weight of all his descendants
+ * (working is different for loop or switch nodes)
+ */
+list<ProgressWeight> ComposedNode::getProgressWeight() const
+{
+ list<ProgressWeight> ret;
+ list<Node *> setOfNode=edGetDirectDescendants();
+ for(list<Node *>::const_iterator iter=setOfNode.begin();iter!=setOfNode.end();iter++)
+ {
+ list<ProgressWeight> myCurrentSet=((ComposedNode*)(*iter))->getProgressWeight();
+ ret.insert(ret.end(),myCurrentSet.begin(),myCurrentSet.end());
+ }
+ return ret;
+}
+
//! Get the input port name
/*!
* get the input port name used by the current node, recursively built with children names.