+++ /dev/null
-<HTML><b>
-<table width="100%" BORDER>
-<tr bgcolor="#FFFFCC">
-<td colspan="11"><font size="+3"><b><div align="center"><i>interface AddComponent</i></div></b></font></td>
-</tr>
-<td width="50%" bgcolor= "lightgreen" ><font size="+2"><div align="center"><b><i>IDL file</i></b></div></font></td>
-<td width="50%" bgcolor= "lightgreen"><font size="+2"><div align="center"><b><i>Python</i></b></div></font></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>Adder Addition ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Addition ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>double Add ( in double x, in double y, out double z )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>[ return_value, z ] = Add ( x, y )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>double LastResult ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = LastResult ( )</b></div></td>
-</tr>
-</table><br>
-<table width="100%" BORDER>
-<tr bgcolor="#FFFFCC">
-<td colspan="11"><font size="+3"><b><div align="center"><i>interface Adder</i></div></b></font></td>
-</tr>
-<td width="50%" bgcolor= "lightgreen" ><font size="+2"><div align="center"><b><i>IDL file</i></b></div></font></td>
-<td width="50%" bgcolor= "lightgreen"><font size="+2"><div align="center"><b><i>Python</i></b></div></font></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>double Add ( in double x, in double y, out double z )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>[ return_value, z ] = Add ( x, y )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>double AddAndCompare ( in double x, in double y, in Adder anOtherAdder, out double z )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>[ return_value, z ] = AddAndCompare ( x, y, anOtherAdder )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void SetLastResult ( in double z )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>SetLastResult ( z )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void LastResult ( out double z )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>z = LastResult ( )</b></div></td>
-</tr>
-</table><br>
-</b></HTML>
+++ /dev/null
-<HTML><b>
-<table width="100%" BORDER>
-<tr bgcolor="#FFFFCC">
-<td colspan="11"><font size="+3"><b><div align="center"><i>interface DivComponent</i></div></b></font></td>
-</tr>
-<td width="50%" bgcolor= "lightgreen" ><font size="+2"><div align="center"><b><i>IDL file</i></b></div></font></td>
-<td width="50%" bgcolor= "lightgreen"><font size="+2"><div align="center"><b><i>Python</i></b></div></font></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void Div ( in double x, in double y, out double z )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>z = Div ( x, y )</b></div></td>
-</tr>
-</table><br>
-</b></HTML>
+++ /dev/null
-<HTML><b>
-<table width="100%" BORDER>
-<tr bgcolor="#FFFFCC">
-<td colspan="11"><font size="+3"><b><div align="center"><i>interface FactorialComponent</i></div></b></font></td>
-</tr>
-<td width="50%" bgcolor= "lightgreen" ><font size="+2"><div align="center"><b><i>IDL file</i></b></div></font></td>
-<td width="50%" bgcolor= "lightgreen"><font size="+2"><div align="center"><b><i>Python</i></b></div></font></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>long eval ( in long n )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = eval ( n )</b></div></td>
-</tr>
-</table><br>
-</b></HTML>
+++ /dev/null
-<HTML><b>
-<table width="100%" BORDER>
-<tr bgcolor="#FFFFCC">
-<td colspan="11"><font size="+3"><b><div align="center"><i>interface MulComponent</i></div></b></font></td>
-</tr>
-<td width="50%" bgcolor= "lightgreen" ><font size="+2"><div align="center"><b><i>IDL file</i></b></div></font></td>
-<td width="50%" bgcolor= "lightgreen"><font size="+2"><div align="center"><b><i>Python</i></b></div></font></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void Mul ( in double x, in double y, out double z )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>z = Mul ( x, y )</b></div></td>
-</tr>
-</table><br>
-</b></HTML>
+++ /dev/null
-<HTML><b>
-<table width="100%" BORDER>
-<tr bgcolor="#FFFFCC">
-<td colspan="11"><font size="+3"><b><div align="center"><i>interface PCSRMat</i></div></b></font></td>
-</tr>
-<td width="50%" bgcolor= "lightgreen" ><font size="+2"><div align="center"><b><i>IDL file</i></b></div></font></td>
-<td width="50%" bgcolor= "lightgreen"><font size="+2"><div align="center"><b><i>Python</i></b></div></font></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>unsigned long NbRows ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = NbRows ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>unsigned long NbCols ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = NbCols ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void LMat ( out unsigned long start, out unsigned long end )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>[ start, end ] = LMat ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>CSRMatStruct ncsrmat ( in unsigned long start, in unsigned long end )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = ncsrmat ( start, end )</b></div></td>
-</tr>
-</table><br>
-<table width="100%" BORDER>
-<tr bgcolor="#FFFFCC">
-<td colspan="11"><font size="+3"><b><div align="center"><i>interface NPMatComponent</i></div></b></font></td>
-</tr>
-<td width="50%" bgcolor= "lightgreen" ><font size="+2"><div align="center"><b><i>IDL file</i></b></div></font></td>
-<td width="50%" bgcolor= "lightgreen"><font size="+2"><div align="center"><b><i>Python</i></b></div></font></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void SetFileName ( in string filename )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>SetFileName ( filename )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void ReadDataFromFile ( in string id_callback )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>ReadDataFromFile ( id_callback )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void SaveDataToFile ( in string id_callback )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>SaveDataToFile ( id_callback )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void SPGetData ( in string id_callback )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>SPGetData ( id_callback )</b></div></td>
-</tr>
-</table><br>
-</b></HTML>
+++ /dev/null
-<HTML><b>
-<table width="100%" BORDER>
-<tr bgcolor="#FFFFCC">
-<td colspan="11"><font size="+3"><b><div align="center"><i>interface NPSolveComponent</i></div></b></font></td>
-</tr>
-<td width="50%" bgcolor= "lightgreen" ><font size="+2"><div align="center"><b><i>IDL file</i></b></div></font></td>
-<td width="50%" bgcolor= "lightgreen"><font size="+2"><div align="center"><b><i>Python</i></b></div></font></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void Solve ( in PCSRMat A, in PVec b, out PVec x )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>x = Solve ( A, b )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void SPSolve ( in PCSRMat A, in PVec b, in string id_callback )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>SPSolve ( A, b, id_callback )</b></div></td>
-</tr>
-</table><br>
-</b></HTML>
+++ /dev/null
-<HTML><b>
-<table width="100%" BORDER>
-<tr bgcolor="#FFFFCC">
-<td colspan="11"><font size="+3"><b><div align="center"><i>interface PVec</i></div></b></font></td>
-</tr>
-<td width="50%" bgcolor= "lightgreen" ><font size="+2"><div align="center"><b><i>IDL file</i></b></div></font></td>
-<td width="50%" bgcolor= "lightgreen"><font size="+2"><div align="center"><b><i>Python</i></b></div></font></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>unsigned long Size ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Size ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void LVec ( out unsigned long start, out unsigned long end )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>[ start, end ] = LVec ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>DoubleVec nvec ( in unsigned long start, in unsigned long end )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = nvec ( start, end )</b></div></td>
-</tr>
-</table><br>
-<table width="100%" BORDER>
-<tr bgcolor="#FFFFCC">
-<td colspan="11"><font size="+3"><b><div align="center"><i>interface NPVecComponent</i></div></b></font></td>
-</tr>
-<td width="50%" bgcolor= "lightgreen" ><font size="+2"><div align="center"><b><i>IDL file</i></b></div></font></td>
-<td width="50%" bgcolor= "lightgreen"><font size="+2"><div align="center"><b><i>Python</i></b></div></font></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void SetFileName ( in string filename )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>SetFileName ( filename )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void ReadDataFromFile ( in string id_callback )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>ReadDataFromFile ( id_callback )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void SaveDataToFile ( in string id_callback )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>SaveDataToFile ( id_callback )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void SPGetData ( in string id_callback )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>SPGetData ( id_callback )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void SPPutData ( in PVec vec, in string id_callback )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>SPPutData ( vec, id_callback )</b></div></td>
-</tr>
-</table><br>
-</b></HTML>
+++ /dev/null
-<HTML><b>
-<table width="100%" BORDER>
-<tr bgcolor="#FFFFCC">
-<td colspan="11"><font size="+3"><b><div align="center"><i>interface SuperG</i></div></b></font></td>
-</tr>
-<td width="50%" bgcolor= "lightgreen" ><font size="+2"><div align="center"><b><i>IDL file</i></b></div></font></td>
-<td width="50%" bgcolor= "lightgreen"><font size="+2"><div align="center"><b><i>Python</i></b></div></font></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>Graph Graph ( in string aGraph )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Graph ( aGraph )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>Graph GraphE ( in string aGraph )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = GraphE ( aGraph )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>Value StringValue ( in string aString )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = StringValue ( aString )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>Value AnyValue ( in any anAny )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = AnyValue ( anAny )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>Graph getGraph ( in string ior )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = getGraph ( ior )</b></div></td>
-</tr>
-</table><br>
-<table width="100%" BORDER>
-<tr bgcolor="#FFFFCC">
-<td colspan="11"><font size="+3"><b><div align="center"><i>interface CNode</i></div></b></font></td>
-</tr>
-<td width="50%" bgcolor= "lightgreen" ><font size="+2"><div align="center"><b><i>IDL file</i></b></div></font></td>
-<td width="50%" bgcolor= "lightgreen"><font size="+2"><div align="center"><b><i>Python</i></b></div></font></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>string Name ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Name ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>Service Service ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Service ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>KindOfNode Kind ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Kind ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>SDate CreationDate ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = CreationDate ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>SDate LastUpdateDate ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = LastUpdateDate ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>string Version ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Version ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>string Author ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Author ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>string Comment ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Comment ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean SetName ( in string aNewName )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = SetName ( aNewName )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean SetAuthor ( in string anAuthor )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = SetAuthor ( anAuthor )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean SetComment ( in string aComment )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = SetComment ( aComment )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>Port Port ( in string aParameterName )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Port ( aParameterName )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>Port Input ( in string InputParameterName, in Value aValue )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Input ( InputParameterName, aValue )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>ListOfPorts Ports ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Ports ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>ListOfLinks Links ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Links ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsGraph ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsGraph ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsComputing ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsComputing ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsFactory ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsFactory ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsInLine ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsInLine ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsGOTO ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsGOTO ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsLoop ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsLoop ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsEndLoop ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsEndLoop ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsSwitch ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsSwitch ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsEndSwitch ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsEndSwitch ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>long SubGraph ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = SubGraph ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>long Thread ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Thread ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsWaiting ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsWaiting ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsReady ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsReady ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsRunning ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsRunning ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsDone ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsDone ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsSuspended ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsSuspended ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>GraphState State ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = State ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean ReadyW ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = ReadyW ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean RunningW ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = RunningW ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean DoneW ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = DoneW ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean SuspendedW ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = SuspendedW ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean Kill ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Kill ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean KillDone ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = KillDone ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean Stop ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Stop ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean Suspend ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Suspend ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean SuspendDone ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = SuspendDone ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean Resume ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Resume ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean ReRun ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = ReRun ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean ReRunAt ( in string aNodeName )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = ReRunAt ( aNodeName )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean ReStart ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = ReStart ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean ReStartAt ( in string aNodeName )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = ReStartAt ( aNodeName )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>AutomatonState AutoState ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = AutoState ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>ControlState Control ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Control ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void ControlClear ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>ControlClear ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean ContainerKill ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = ContainerKill ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void Coords ( in long X, in long Y )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>Coords ( X, Y )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>long X ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = X ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>long Y ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Y ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>long CpuUsed ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = CpuUsed ( )</b></div></td>
-</tr>
-</table><br>
-<table width="100%" BORDER>
-<tr bgcolor="#FFFFCC">
-<td colspan="11"><font size="+3"><b><div align="center"><i>interface FNode</i></div></b></font></td>
-</tr>
-<td width="50%" bgcolor= "lightgreen" ><font size="+2"><div align="center"><b><i>IDL file</i></b></div></font></td>
-<td width="50%" bgcolor= "lightgreen"><font size="+2"><div align="center"><b><i>Python</i></b></div></font></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>string GetComponentName ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = GetComponentName ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>string GetInterfaceName ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = GetInterfaceName ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>string GetContainer ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = GetContainer ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean SetComponentName ( in string aComponentName )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = SetComponentName ( aComponentName )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean SetInterfaceName ( in string anInterfaceName )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = SetInterfaceName ( anInterfaceName )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean SetContainer ( in string aContainer )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = SetContainer ( aContainer )</b></div></td>
-</tr>
-</table><br>
-<table width="100%" BORDER>
-<tr bgcolor="#FFFFCC">
-<td colspan="11"><font size="+3"><b><div align="center"><i>interface INode</i></div></b></font></td>
-</tr>
-<td width="50%" bgcolor= "lightgreen" ><font size="+2"><div align="center"><b><i>IDL file</i></b></div></font></td>
-<td width="50%" bgcolor= "lightgreen"><font size="+2"><div align="center"><b><i>Python</i></b></div></font></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void SetPyFunction ( in string FuncName, in ListOfStrings aPyInitFunction )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>SetPyFunction ( FuncName, aPyInitFunction )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>ListOfStrings PyFunction ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = PyFunction ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>string PyFuncName ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = PyFuncName ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>Port InPort ( in string aParameterName, in string aParameterType )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = InPort ( aParameterName, aParameterType )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>Port OutPort ( in string aParameterName, in string aParameterType )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = OutPort ( aParameterName, aParameterType )</b></div></td>
-</tr>
-</table><br>
-<table width="100%" BORDER>
-<tr bgcolor="#FFFFCC">
-<td colspan="11"><font size="+3"><b><div align="center"><i>interface GNode</i></div></b></font></td>
-</tr>
-<td width="50%" bgcolor= "lightgreen" ><font size="+2"><div align="center"><b><i>IDL file</i></b></div></font></td>
-<td width="50%" bgcolor= "lightgreen"><font size="+2"><div align="center"><b><i>Python</i></b></div></font></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean SetCoupled ( in string anInLineNode )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = SetCoupled ( anInLineNode )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>INode Coupled ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Coupled ( )</b></div></td>
-</tr>
-</table><br>
-<table width="100%" BORDER>
-<tr bgcolor="#FFFFCC">
-<td colspan="11"><font size="+3"><b><div align="center"><i>interface LNode</i></div></b></font></td>
-</tr>
-<td width="50%" bgcolor= "lightgreen" ><font size="+2"><div align="center"><b><i>IDL file</i></b></div></font></td>
-<td width="50%" bgcolor= "lightgreen"><font size="+2"><div align="center"><b><i>Python</i></b></div></font></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void SetPyInit ( in string MoreName, in ListOfStrings aPyMoreFunction )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>SetPyInit ( MoreName, aPyMoreFunction )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>ListOfStrings PyInit ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = PyInit ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>string PyInitName ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = PyInitName ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void SetPyMore ( in string MoreName, in ListOfStrings aPyMoreFunction )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>SetPyMore ( MoreName, aPyMoreFunction )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>ListOfStrings PyMore ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = PyMore ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>string PyMoreName ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = PyMoreName ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void SetPyNext ( in string NextName, in ListOfStrings aPyNextFunction )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>SetPyNext ( NextName, aPyNextFunction )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>ListOfStrings PyNext ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = PyNext ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>string PyNextName ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = PyNextName ( )</b></div></td>
-</tr>
-</table><br>
-<table width="100%" BORDER>
-<tr bgcolor="#FFFFCC">
-<td colspan="11"><font size="+3"><b><div align="center"><i>interface ELNode</i></div></b></font></td>
-</tr>
-<td width="50%" bgcolor= "lightgreen" ><font size="+2"><div align="center"><b><i>IDL file</i></b></div></font></td>
-<td width="50%" bgcolor= "lightgreen"><font size="+2"><div align="center"><b><i>Python</i></b></div></font></td>
-</tr>
-</table><br>
-<table width="100%" BORDER>
-<tr bgcolor="#FFFFCC">
-<td colspan="11"><font size="+3"><b><div align="center"><i>interface SNode</i></div></b></font></td>
-</tr>
-<td width="50%" bgcolor= "lightgreen" ><font size="+2"><div align="center"><b><i>IDL file</i></b></div></font></td>
-<td width="50%" bgcolor= "lightgreen"><font size="+2"><div align="center"><b><i>Python</i></b></div></font></td>
-</tr>
-</table><br>
-<table width="100%" BORDER>
-<tr bgcolor="#FFFFCC">
-<td colspan="11"><font size="+3"><b><div align="center"><i>interface ESNode</i></div></b></font></td>
-</tr>
-<td width="50%" bgcolor= "lightgreen" ><font size="+2"><div align="center"><b><i>IDL file</i></b></div></font></td>
-<td width="50%" bgcolor= "lightgreen"><font size="+2"><div align="center"><b><i>Python</i></b></div></font></td>
-</tr>
-</table><br>
-<table width="100%" BORDER>
-<tr bgcolor="#FFFFCC">
-<td colspan="11"><font size="+3"><b><div align="center"><i>interface Graph</i></div></b></font></td>
-</tr>
-<td width="50%" bgcolor= "lightgreen" ><font size="+2"><div align="center"><b><i>IDL file</i></b></div></font></td>
-<td width="50%" bgcolor= "lightgreen"><font size="+2"><div align="center"><b><i>Python</i></b></div></font></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>CNode CNode ( in Service aService )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = CNode ( aService )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>FNode FNode ( in string aComponentName, in string anInterfaceName, in Service aService )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = FNode ( aComponentName, anInterfaceName, aService )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>INode INode ( in string FuncName, in ListOfStrings aPythonFunction )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = INode ( FuncName, aPythonFunction )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>GNode GNode ( in string FuncName, in ListOfStrings aPythonFunction, in string anINode )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = GNode ( FuncName, aPythonFunction, anINode )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>LNode LNode ( in string InitName, in ListOfStrings InitFunction, in string MoreName, in ListOfStrings MoreFunction, in string NextName, in ListOfStrings NextFunction, out INode anEndOfLoop )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>[ return_value, anEndOfLoop ] = LNode ( InitName, InitFunction, MoreName, MoreFunction, NextName, NextFunction )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>SNode SNode ( in string FuncName, in ListOfStrings aPythonFunction, out INode anEndOfSwitch )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>[ return_value, anEndOfSwitch ] = SNode ( FuncName, aPythonFunction )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>Component ComponentRef ( in string aComputerContainer, in string aComponentName )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = ComponentRef ( aComputerContainer, aComponentName )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>Link Link ( in Port OutputPort, in Port InputPort )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Link ( OutputPort, InputPort )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean Import ( in string anXmlFile )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Import ( anXmlFile )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean Export ( in string anXmlFile )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Export ( anXmlFile )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsReadOnly ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsReadOnly ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean Run ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Run ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean EventNoW ( out CNode aNode, out GraphEvent anEvent, out GraphState aState )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>[ return_value, aNode, anEvent, aState ] = EventNoW ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean Event ( out CNode aNode, out GraphEvent anEvent, out GraphState aState )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>[ return_value, aNode, anEvent, aState ] = Event ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean EventW ( out CNode aNode, out GraphEvent anEvent, out GraphState aState )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>[ return_value, aNode, anEvent, aState ] = EventW ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>long LevelMax ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = LevelMax ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>ListOfNodes LevelNodes ( in long aLevel )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = LevelNodes ( aLevel )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>long ThreadsMax ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = ThreadsMax ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>long GraphsNumber ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = GraphsNumber ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>long Threads ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Threads ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>long SuspendedThreads ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = SuspendedThreads ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsValid ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsValid ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsExecutable ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsExecutable ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsDataFlow ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsDataFlow ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsEditing ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsEditing ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsExecuting ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsExecuting ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>long LastLevelDone ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = LastLevelDone ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean Start ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Start ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>Graph Copy ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Copy ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean Merge ( in Graph aGraph )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Merge ( aGraph )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>ListOfNodes Nodes ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Nodes ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>ListOfLinks GLinks ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = GLinks ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>string getIOR ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = getIOR ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>ListOfGraphs Graphs ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Graphs ( )</b></div></td>
-</tr>
-</table><br>
-<table width="100%" BORDER>
-<tr bgcolor="#FFFFCC">
-<td colspan="11"><font size="+3"><b><div align="center"><i>interface Link</i></div></b></font></td>
-</tr>
-<td width="50%" bgcolor= "lightgreen" ><font size="+2"><div align="center"><b><i>IDL file</i></b></div></font></td>
-<td width="50%" bgcolor= "lightgreen"><font size="+2"><div align="center"><b><i>Python</i></b></div></font></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>Port OutPort ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = OutPort ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>Port InPort ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = InPort ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>long CoordsSize ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = CoordsSize ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean AddCoord ( in long index, in long X, in long Y )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = AddCoord ( index, X, Y )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean ChangeCoord ( in long index, in long X, in long Y )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = ChangeCoord ( index, X, Y )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean RemoveCoord ( in long index )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = RemoveCoord ( index )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean Coords ( in long index, out long X, out long Y )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>[ return_value, X, Y ] = Coords ( index )</b></div></td>
-</tr>
-</table><br>
-<table width="100%" BORDER>
-<tr bgcolor="#FFFFCC">
-<td colspan="11"><font size="+3"><b><div align="center"><i>interface Value</i></div></b></font></td>
-</tr>
-<td width="50%" bgcolor= "lightgreen" ><font size="+2"><div align="center"><b><i>IDL file</i></b></div></font></td>
-<td width="50%" bgcolor= "lightgreen"><font size="+2"><div align="center"><b><i>Python</i></b></div></font></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>string ToString ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = ToString ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>any ToAny ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = ToAny ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsIOR ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsIOR ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>string ComponentDataType ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = ComponentDataType ( )</b></div></td>
-</tr>
-</table><br>
-<table width="100%" BORDER>
-<tr bgcolor="#FFFFCC">
-<td colspan="11"><font size="+3"><b><div align="center"><i>interface Port</i></div></b></font></td>
-</tr>
-<td width="50%" bgcolor= "lightgreen" ><font size="+2"><div align="center"><b><i>IDL file</i></b></div></font></td>
-<td width="50%" bgcolor= "lightgreen"><font size="+2"><div align="center"><b><i>Python</i></b></div></font></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean Input ( in Value aValue )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Input ( aValue )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>CNode Node ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Node ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>string Name ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Name ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>string Type ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Type ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>Link Link ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Link ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>ListOfLinks Links ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Links ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsInput ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsInput ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean HasInput ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = HasInput ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsLinked ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsLinked ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>KindOfPort Kind ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Kind ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsParam ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsParam ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsGate ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsGate ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsInLine ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsInLine ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsLoop ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsLoop ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsSwitch ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsSwitch ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsEndSwitch ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsEndSwitch ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>GraphState State ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = State ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>boolean IsDone ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsDone ( )</b></div></td>
-</tr>
-</table><br>
-</b></HTML>
+++ /dev/null
-<HTML><b>
-<table width="100%" BORDER>
-<tr bgcolor="#FFFFCC">
-<td colspan="11"><font size="+3"><b><div align="center"><i>interface SubComponent</i></div></b></font></td>
-</tr>
-<td width="50%" bgcolor= "lightgreen" ><font size="+2"><div align="center"><b><i>IDL file</i></b></div></font></td>
-<td width="50%" bgcolor= "lightgreen"><font size="+2"><div align="center"><b><i>Python</i></b></div></font></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void Sub ( in double x, in double y, out double z )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>z = Sub ( x, y )</b></div></td>
-</tr>
-</table><br>
-</b></HTML>
+++ /dev/null
-<HTML><b>
-<table width="100%" BORDER>
-<tr bgcolor="#FFFFCC">
-<td colspan="11"><font size="+3"><b><div align="center"><i>interface SyrComponent</i></div></b></font></td>
-</tr>
-<td width="50%" bgcolor= "lightgreen" ><font size="+2"><div align="center"><b><i>IDL file</i></b></div></font></td>
-<td width="50%" bgcolor= "lightgreen"><font size="+2"><div align="center"><b><i>Python</i></b></div></font></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>long C_ISEVEN ( in long anInteger )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = C_ISEVEN ( anInteger )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>long C_ISONE ( in long anOddInteger )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = C_ISONE ( anOddInteger )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>long C_M3 ( in long anOddInteger )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = C_M3 ( anOddInteger )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>long C_M3P1 ( in long anOddInteger )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = C_M3P1 ( anOddInteger )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>long C_DIV2 ( in long anEvenInteger )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = C_DIV2 ( anEvenInteger )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>long C_INCR ( in long aCount )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = C_INCR ( aCount )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>long C_MIN ( in long aMinVal, in long anInteger )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = C_MIN ( aMinVal, anInteger )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>long C_MAX ( in long aMaxVal, in long anInteger )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = C_MAX ( aMaxVal, anInteger )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>ListOfSyr C_LISTOFSYR ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = C_LISTOFSYR ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>ListOfSyr C_AVERAGE ( in ListOfSyr aListOfSyr, in long anInteger, in long aCount, out double anAverage )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>[ return_value, anAverage ] = C_AVERAGE ( aListOfSyr, anInteger, aCount )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>Syr Init ( in long anOddInteger )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Init ( anOddInteger )</b></div></td>
-</tr>
-</table><br>
-<table width="100%" BORDER>
-<tr bgcolor="#FFFFCC">
-<td colspan="11"><font size="+3"><b><div align="center"><i>interface ListOfSyr</i></div></b></font></td>
-</tr>
-<td width="50%" bgcolor= "lightgreen" ><font size="+2"><div align="center"><b><i>IDL file</i></b></div></font></td>
-<td width="50%" bgcolor= "lightgreen"><font size="+2"><div align="center"><b><i>Python</i></b></div></font></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>SeqOfSyr GetSeqOfSyr ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = GetSeqOfSyr ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void SetSeqOfSyr ( in SeqOfSyr aSeqOfSyr )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>SetSeqOfSyr ( aSeqOfSyr )</b></div></td>
-</tr>
-</table><br>
-<table width="100%" BORDER>
-<tr bgcolor="#FFFFCC">
-<td colspan="11"><font size="+3"><b><div align="center"><i>interface Syr</i></div></b></font></td>
-</tr>
-<td width="50%" bgcolor= "lightgreen" ><font size="+2"><div align="center"><b><i>IDL file</i></b></div></font></td>
-<td width="50%" bgcolor= "lightgreen"><font size="+2"><div align="center"><b><i>Python</i></b></div></font></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>long Initial ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Initial ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>long Current ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Current ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>long IsEven ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsEven ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>long IsOne ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = IsOne ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>long Count ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>return_value = Count ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void M3p1 ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>M3p1 ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void Div2 ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>Div2 ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void Incr ( )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>Incr ( )</b></div></td>
-</tr>
-</table><br>
-</b></HTML>
+++ /dev/null
-<HTML><b>
-<table width="100%" BORDER>
-<tr bgcolor="#FFFFCC">
-<td colspan="11"><font size="+3"><b><div align="center"><i>interface SyrControlComponent</i></div></b></font></td>
-</tr>
-<td width="50%" bgcolor= "lightgreen" ><font size="+2"><div align="center"><b><i>IDL file</i></b></div></font></td>
-<td width="50%" bgcolor= "lightgreen"><font size="+2"><div align="center"><b><i>Python</i></b></div></font></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void L_OneEven ( in long ValOne, in long ValEven, out long Finished, out long Incr, out long Even, out long Odd )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>[ Finished, Incr, Even, Odd ] = L_OneEven ( ValOne, ValEven )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void C_NotOneIsEven ( out long ValOne, out long ValEven )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>[ ValOne, ValEven ] = C_NotOneIsEven ( )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void LOOPN ( in long InLoop, in long NN, in long KK, in long min, in long max, out long OutLoop, out long N, out long K )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>[ OutLoop, N, K ] = LOOPN ( InLoop, NN, KK, min, max )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void WHILENOTONE ( in long N, out long OutLoop )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>OutLoop = WHILENOTONE ( N )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void IFNOTEVEN ( in long N, out long Odd, out long Even )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>[ Odd, Even ] = IFNOTEVEN ( N )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void LOOPi ( in long InLoop, in long ii, out long OutLoop, out long i )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>[ OutLoop, i ] = LOOPi ( InLoop, ii )</b></div></td>
-</tr>
-<tr>
-<td bgcolor= "lightgreen"><div align="center"><b>void WHILEEVEN ( in long N, out long OutLoop )</b></div></td>
-<td bgcolor= "lightgreen"><div align="center"><b>OutLoop = WHILEEVEN ( N )</b></div></td>
-</tr>
-</table><br>
-</b></HTML>
+++ /dev/null
-# Doxyfile 1.3-rc1
-
-#---------------------------------------------------------------------------
-# General configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = "SALOME - SUPERV - v.2.0.0"
-PROJECT_NUMBER = id#1.0
-OUTPUT_DIRECTORY = ../
-OUTPUT_LANGUAGE = English
-EXTRACT_ALL = YES
-EXTRACT_PRIVATE = YES
-EXTRACT_STATIC = YES
-EXTRACT_LOCAL_CLASSES = YES
-HIDE_UNDOC_MEMBERS = NO
-HIDE_UNDOC_CLASSES = NO
-HIDE_FRIEND_COMPOUNDS = NO
-HIDE_IN_BODY_DOCS = NO
-BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = NO
-ALWAYS_DETAILED_SEC = YES
-INLINE_INHERITED_MEMB = YES
-FULL_PATH_NAMES = NO
-STRIP_FROM_PATH =
-INTERNAL_DOCS = YES
-CASE_SENSE_NAMES = YES
-SHORT_NAMES = NO
-HIDE_SCOPE_NAMES = NO
-VERBATIM_HEADERS = YES
-SHOW_INCLUDE_FILES = YES
-JAVADOC_AUTOBRIEF = YES
-MULTILINE_CPP_IS_BRIEF = NO
-DETAILS_AT_TOP = NO
-INHERIT_DOCS = YES
-INLINE_INFO = YES
-SORT_MEMBER_DOCS = NO
-DISTRIBUTE_GROUP_DOC = NO
-TAB_SIZE = 5
-GENERATE_TODOLIST = YES
-GENERATE_TESTLIST = YES
-GENERATE_BUGLIST = YES
-GENERATE_DEPRECATEDLIST= YES
-ALIASES =
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 25
-OPTIMIZE_OUTPUT_FOR_C = YES
-OPTIMIZE_OUTPUT_JAVA = YES
-SHOW_USED_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = NO
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = YES
-WARN_FORMAT = "$file:$line: $text"
-WARN_LOGFILE = log.txt
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = ../../../share/salome/idl/SUPERV.idl
-FILE_PATTERNS =
-RECURSIVE = NO
-EXCLUDE =
-EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH = sources/
-INPUT_FILTER =
-FILTER_SOURCE_FILES = YES
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = NO
-INLINE_SOURCES = NO
-STRIP_CODE_COMMENTS = YES
-REFERENCED_BY_RELATION = NO
-REFERENCES_RELATION = YES
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX = NO
-COLS_IN_ALPHA_INDEX = 5
-IGNORE_PREFIX =
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML = YES
-HTML_OUTPUT = html
-HTML_FILE_EXTENSION = .html
-HTML_HEADER = sources/myheader.html
-HTML_FOOTER =
-HTML_STYLESHEET =
-HTML_ALIGN_MEMBERS = YES
-GENERATE_HTMLHELP = NO
-CHM_FILE =
-HHC_LOCATION =
-GENERATE_CHI = NO
-BINARY_TOC = YES
-TOC_EXPAND = YES
-DISABLE_INDEX = YES
-ENUM_VALUES_PER_LINE = 4
-GENERATE_TREEVIEW = YES
-TREEVIEW_WIDTH = 250
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX = NO
-LATEX_OUTPUT = latex
-LATEX_CMD_NAME = latex
-MAKEINDEX_CMD_NAME = makeindex
-COMPACT_LATEX = NO
-PAPER_TYPE = a4wide
-EXTRA_PACKAGES =
-LATEX_HEADER =
-PDF_HYPERLINKS = NO
-USE_PDFLATEX = NO
-LATEX_BATCHMODE = NO
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF = NO
-RTF_OUTPUT = rtf
-COMPACT_RTF = NO
-RTF_HYPERLINKS = NO
-RTF_STYLESHEET_FILE =
-RTF_EXTENSIONS_FILE =
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN = NO
-MAN_OUTPUT = man
-MAN_EXTENSION = .3
-MAN_LINKS = NO
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML = NO
-XML_SCHEMA =
-XML_DTD =
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF = NO
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-GENERATE_PERLMOD = NO
-PERLMOD_LATEX = NO
-PERLMOD_PRETTY = YES
-PERLMOD_MAKEVAR_PREFIX =
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = YES
-EXPAND_ONLY_PREDEF = NO
-SEARCH_INCLUDES = YES
-INCLUDE_PATH =
-INCLUDE_FILE_PATTERNS =
-PREDEFINED =
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = NO
-#---------------------------------------------------------------------------
-# Configuration::addtions related to external references
-#---------------------------------------------------------------------------
-TAGFILES =
-GENERATE_TAGFILE =
-ALLEXTERNALS = NO
-EXTERNAL_GROUPS = YES
-PERL_PATH = /usr/bin/perl
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS = YES
-HIDE_UNDOC_RELATIONS = NO
-HAVE_DOT = YES
-CLASS_GRAPH = YES
-COLLABORATION_GRAPH = NO
-TEMPLATE_RELATIONS = YES
-INCLUDE_GRAPH = YES
-INCLUDED_BY_GRAPH = NO
-GRAPHICAL_HIERARCHY = YES
-DOT_IMAGE_FORMAT = jpg
-DOT_PATH =
-DOTFILE_DIRS =
-MAX_DOT_GRAPH_WIDTH = 1024
-MAX_DOT_GRAPH_HEIGHT = 1200
-GENERATE_LEGEND = NO
-DOT_CLEANUP = YES
-#---------------------------------------------------------------------------
-# Configuration::addtions related to the search engine
-#---------------------------------------------------------------------------
-SEARCHENGINE = NO
-CGI_NAME = search.cgi
-CGI_URL =
-DOC_URL =
-DOC_ABSPATH =
-BIN_ABSPATH = /usr/local/bin/
-EXT_DOC_PATHS =
+++ /dev/null
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.73 [en] (WinNT; I) [Netscape]">
- <title>Main Page</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css">
-</head>
-<body>
-
-<center><table WIDTH="96%" >
-<tr>
-<td><a href="http://www.opencascade.com"><img src="sources/logocorp.gif" BORDER=0 height=46 width=122></a></td>
-
-
-<td>
-<div align=right><a href="http://www.opencascade.org/SALOME/"><img src="sources/application.gif" BORDER=0 height=46 width=108></a></div>
-</td>
-</tr>
-</table></center>
-
-
-</body>
-</html>
+++ /dev/null
-H1 { text-align: center; }
-CAPTION { font-weight: bold }
-A.qindex {}
-A.qindexRef {}
-A.el { text-decoration: none; font-weight: bold }
-A.elRef { font-weight: bold }
-A.code { text-decoration: none; font-weight: normal; color: #4444ee }
-A.codeRef { font-weight: normal; color: #4444ee }
-A:hover { text-decoration: none; background-color: lightblue }
-DL.el { margin-left: -1cm }
-DIV.fragment { width: 100%; border: none; background-color: #CCCCCC }
-DIV.ah { background-color: #CCCCCC; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }
-TD.md { background-color: lightblue; font-weight: bold; }
-TD.mdname1 { background-color: lightblue; font-weight: bold; color: #602020; }
-TD.mdname { background-color: lightblue; font-weight: bold; color: #602020; width: 600px; }
-DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold }
-DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller }
-BODY { background: url(sources/bg_salome.gif) }
-TD.indexkey {
- background-color: #CCCCCC;
- font-weight: bold;
- padding-right : 10px;
- padding-top : 2px;
- padding-left : 10px;
- padding-bottom : 2px;
- margin-left : 0px;
- margin-right : 0px;
- margin-top : 2px;
- margin-bottom : 2px
-}
-TD.indexvalue {
- background-color: #CCCCCC;
- font-style: italic;
- padding-right : 10px;
- padding-top : 2px;
- padding-left : 10px;
- padding-bottom : 2px;
- margin-left : 0px;
- margin-right : 0px;
- margin-top : 2px;
- margin-bottom : 2px
-}
-span.keyword { color: #008000 }
-span.keywordtype { color: #604020 }
-span.keywordflow { color: #e08000 }
-span.comment { color: #800000 }
-span.preprocessor { color: #806020 }
-span.stringliteral { color: #002080 }
-span.charliteral { color: #008080 }
+++ /dev/null
-<!DOCTYPE doctype PUBLIC "-//w3c//dtd html 4.0 transitional//en">\r
-<html>\r
-<head>\r
- \r
- <meta http-equiv="Content-Type"\r
- content="text/html; charset=iso-8859-1">\r
- \r
- <meta name="GENERATOR"\r
- content="Mozilla/4.73 [en] (WinNT; I) [Netscape]">\r
- <title>Main Page</title>\r
- \r
- <link href="doxygen.css" rel="stylesheet" type="text/css">\r
-</head>\r
- <body>\r
- \r
-<center>\r
-<table width="96%">\r
- <tbody>\r
- <tr>\r
- <td><a href="http://www.opencascade.com"><img\r
- src="sources/logocorp.gif" border="0" height="46" width="122">\r
- </a></td>\r
- <td> \r
- <div align="right"><a href="http://www.opencascade.org/SALOME/"><img\r
- src="sources/application.gif" border="0" height="46" width="108">\r
- </a></div>\r
- </td>\r
- </tr>\r
- \r
- </tbody>\r
-</table>\r
-</center>\r
- \r
-<h1><a name="page2">Examples</a> </h1>\r
- \r
-<h3><big><i><b>Interfaces:</b></i></big></h3>\r
-<br>\r
-<a href="#Graph"><big>SUPERV::Graph</big></a><br>\r
-<a href="#CNode"><big>SUPERV::CNode</big></a><br>\r
-<a href="#FNode"><big>SUPERV::FNode</big></a><big><br>\r
-<a href="#INode">SUPERV::INode</a></big><br>\r
-<a href="#LNode"><big>SUPERV::LNode</big></a><br>\r
-<a href="#Port"><big>SUPERV::Port</big></a><br>\r
-<a href="#Link"><big>SUPERV::Link</big></a><br>\r
-<b><br>\r
-<br>\r
-<br>\r
-</b><br>\r
-<div align="center"><big><big><b><u><br>\r
-</u></b></big></big></div>\r
-<div align="center"><big><u><b><big><a name="Graph"></a>SUPERV::Graph<br>\r
-</big></b></u></big><br>\r
-<div align="left"><big><b><a href="#CNode">CNode</a> CNode( in SALOME_ModuleCatalog::Service\r
-<i>aService</i> ) </b></big><br>\r
-<br>\r
-<u><i><big>Create a Computing Node in a Graph</big></i></u><br>\r
-<br>\r
-<a name="CreateCNode"></a>GraphEssai = Graph( 'GraphEssai' )<br>\r
-<br>\r
-AddAndCompare_ServiceinParameter = []<br>\r
-AddAndCompare_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter(\r
-'Adder' , 'Adder' ) )<br>\r
-AddAndCompare_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter(\r
-'double' , 'x' ) )<br>\r
-AddAndCompare_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter(\r
-'double' , 'y' ) )<br>\r
-AddAndCompare_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter(\r
-'Adder' , 'anOtherAdder' ) )<br>\r
-<br>\r
-AddAndCompare_ServiceoutParameter = []<br>\r
-AddAndCompare_ServiceoutParameter.append( SALOME_ModuleCatalog.ServicesParameter(\r
-'double' , 'FuncValue' ) )<br>\r
-AddAndCompare_ServiceoutParameter.append( SALOME_ModuleCatalog.ServicesParameter(\r
-'double' , 'z' ) )<br>\r
-AddAndCompare_Service = SALOME_ModuleCatalog.Service( 'AddAndCompare' , AddAndCompare_ServiceinParameter\r
-, AddAndCompare_ServiceoutParameter , 0 )<br>\r
-<br>\r
-AddAndCompare = GraphEssai.CNode( AddAndCompare_Service )<br>\r
-<br>\r
-<br>\r
-<br>\r
-</div>\r
-<div align="left"><big><b><a href="#FNode">FNode</a> FNode( in string <i>aComponentName</i>, \r
-in string <i>anInterfaceName</i>, in SALOME_ModuleCatalog::Service\r
-<i>aService</i> ) </b></big><br>\r
-<br>\r
-<u><i><big>Create a Factory Node in a Graph</big></i></u><br>\r
-<br>\r
-<a name="CreateFNode"></a>GraphEssai = Graph( 'GraphEssai' )<br>\r
-Add = GraphEssai.FNode( 'AddComponent' , 'AddComponent' , 'Add' )<br>\r
-<br>\r
-<br>\r
-<br>\r
-<b><big>INode INode( in string <i>FuncName</i>, in ListOfStrings <i>aPythonFunction</i>\r
-)</big></b><br>\r
-<br>\r
-<u><i><big>Create an InLine Node in a Graph</big></i></u><br>\r
-<br>\r
-<a name="CreateINode"></a>GraphEssai = Graph( 'GraphEssai' )<br>\r
-PyAdd = []<br>\r
-PyAdd.append( 'from time import * ' )<br>\r
-PyAdd.append( 'def Add(a,b) : \r
-' )<br>\r
-PyAdd.append( ' print "Add will wait 5 seconds" \r
-' )<br>\r
-PyAdd.append( ' d = dir() \r
-' )<br>\r
-PyAdd.append( ' print "Add",d \r
-' )<br>\r
-PyAdd.append( ' d = dir(sleep) \r
-' )<br>\r
-PyAdd.append( ' print "Add",d \r
-' )<br>\r
-PyAdd.append( ' sleep(5) \r
-' )<br>\r
-PyAdd.append( ' print "Add waited" \r
-' )<br>\r
-PyAdd.append( ' n = 0 ' )<br>\r
-PyAdd.append( ' while n < 10000 : \r
-' )<br>\r
-PyAdd.append( ' i = 0 \r
-' )<br>\r
-PyAdd.append( ' s = 0 \r
-' )<br>\r
-PyAdd.append( ' while i <= b\r
-: ' )<br>\r
-PyAdd.append( ' \r
-s = s + i ' )<br>\r
-PyAdd.append( ' \r
-i = i + 1 ' )<br>\r
-PyAdd.append( ' n = n + 1 \r
-' )<br>\r
-PyAdd.append( ' return s \r
-' )<br>\r
-PyAdd.append( '' )<br>\r
-Add = GraphEssai.INode( 'Add' , PyAdd )<br>\r
-<br>\r
-<br>\r
-<br>\r
-<b><big>GNode GNode( in string <i>FuncName</i> , in ListOfStrings <i>aPythonFunction</i>,\r
-in string <i>anINode</i> )</big></b><br>\r
-<br>\r
-<u><i><big>Create a GOTO node and link to the corresponding InLine node</big></i></u><br>\r
-<br>\r
-GraphEssai = Graph( 'GraphEssai' )<br>\r
-Pylabel_test = []<br>\r
-Pylabel_test.append( 'def label_test( ValEven , ValOne , NB , KB ):' )<br>\r
-Pylabel_test.append( ' print "label_begin",ValEven,ValOne,NB,KB'\r
-)<br>\r
-Pylabel_test.append( ' return ValEven,ValOne,NB,KB' )<br>\r
-label_test = GraphEssai.INode( 'label_test' , Pylabel_test )<br>\r
-Pycontrol = []<br>\r
-Pycontrol.append( 'def control_m3p1( N , K ):' )<br>\r
-Pycontrol.append( ' return 0,1,N,K' )<br>\r
-control = GraphEssai.GNode( 'control_m3p1' , Pycontrol , 'label_test' )<br>\r
-<br>\r
-<br>\r
-<br>\r
-<big><b>LNode LNode( in string <i>InitName</i> , in ListOfStrings <i>InitFunction</i>\r
-, in string <i>MoreName</i> , in ListOfStrings <i>MoreFunction</i> , in string\r
-<i>NextName</i> , in ListOfStrings <i>NextFunction</i> , out INode <i>anEndOfLoop</i>\r
-)</b></big><br>\r
-<br>\r
-<u><i><big>Create a "for" or "while" node and the corresponding end of loop\r
-node</big></i></u><br>\r
-<br>\r
-<a name="CreateLNode"></a>GraphEssai = Graph( 'GraphEssai' )<br>\r
-<br>\r
-PyforN = []<br>\r
-PyforN.append( 'def InitN( NN , K , SyrComponent , min , max ) :' )<br>\r
-PyforN.append( ' N = max' )<br>\r
-PyforN.append( ' if min > 0 :' )<br>\r
-PyforN.append( ' if max >= min\r
-:' )<br>\r
-PyforN.append( ' \r
-N = min' )<br>\r
-PyforN.append( ' return N,K,SyrComponent,min,max' )<br>\r
-<br>\r
-PyMoreforN = []<br>\r
-PyMoreforN.append( 'def MoreN( NN , KK , SyrComponent , min , max ) :' )<br>\r
-PyMoreforN.append( ' N = 0' )<br>\r
-PyMoreforN.append( ' OutLoop = 0' )<br>\r
-PyMoreforN.append( ' if max > NN :' )<br>\r
-PyMoreforN.append( ' N = NN' )<br>\r
-PyMoreforN.append( ' OutLoop =\r
-1' )<br>\r
-PyMoreforN.append( ' return OutLoop,N,0,SyrComponent,min,max'\r
-)<br>\r
-<br>\r
-PyNextforN = []<br>\r
-PyNextforN.append( 'def NextN( NN , KK , SyrComponent , min , max ) :' )<br>\r
-PyNextforN.append( ' N = NN + 1' )<br>\r
-PyNextforN.append( ' K = KK' )<br>\r
-PyNextforN.append( ' return N,K,SyrComponent,min,max' )<br>\r
-<br>\r
-forN,endforN = GraphEssai.LNode( 'InitN' , PyforN , 'MoreN' , PyMoreforN\r
-, 'NextN' , PyNextforN )<br>\r
-<br>\r
-<br>\r
-<b><big>SNode SNode( in string <i>FuncName,</i> in ListOfStrings <i>aPythonFunction,</i>\r
-out INode <i>anEndOfSwitch</i> )</big></b><br>\r
-<br>\r
-<u><i><big>Create a "if / elseif / else" or "switch" node and the corresponding\r
-end node</big></i></u><br>\r
-<br>\r
-GraphEssai = Graph( 'GraphEssai' )<br>\r
- <br>\r
-PyifNotEven = []<br>\r
-PyifNotEven.append( 'import SyrComponent_idl' )<br>\r
-PyifNotEven.append( 'def ifNotEven( SyrComponent , N , K ) :' )<br>\r
-PyifNotEven.append( ' Even = SyrComponent.C_ISEVEN( N )'\r
-)<br>\r
-PyifNotEven.append( ' Odd = 1 - Even' )<br>\r
-PyifNotEven.append( ' return Odd,Even,SyrComponent,N,K'\r
-)<br>\r
-<br>\r
-ifNotEven,endifNotEven = GraphEssai.SNode( 'ifNotEven' , PyifNotEven )<br>\r
-<br>\r
-<br>\r
-<big><b>Link Link( in Port <i>OutputPort</i> , in Port <i>InputPort</i>\r
-)</b></big><br>\r
-<br>\r
-<u><i><big>Creates a link connecting two ports of the nodes in a Graph</big></i></u><br>\r
-<br>\r
-GraphEssai = Graph( 'GraphEssai' )<br>\r
-Add = GraphEssai.FNode( 'AddComponent' , 'AddComponent' , 'Add' )<br>\r
-Mul = GraphEssai.FNode( 'MulComponent' , 'MulComponent' , 'Mul' )<br>\r
-Link = GraphEssai.Link( Add.Port( 'FuncValue' ), Mul.Port( 'x' ) )<br>\r
-<br>\r
-<br>\r
-<b><big>boolean Run()</big></b><br>\r
-<br>\r
-<u><i><big>Starts asynchronous execution of the graph</big></i></u><br>\r
-<br>\r
-...<br>\r
-GraphEssai.Run()<br>\r
-<br>\r
-<br>\r
-<b><big>boolean Event( out CNode <i>aNode</i> , out GraphEvent <i>anEvent</i>\r
-, out GraphState <i>aState</i> )</big></b><br>\r
-<br>\r
-<u><i><big>Runs Graph and prints information about Graph performance</big></i></u><br>\r
-<br>\r
-...<br>\r
-<a name="RunandWait"></a>GraphEssai.Run()<br>\r
-aStatus,aNode,anEvent,aState = GraphEssai.Event()<br>\r
-while aStatus :<br>\r
- print aNode.Thread(),aNode.SubGraph(),aNode.Name(),anEvent,aState<br>\r
- aStatus,aNode,anEvent,aState = GraphEssai.Event()<br>\r
-<br>\r
-<br>\r
-<br>\r
-<br>\r
-<div align="center"><big><b><big><a name="CNode"></a>SUPERV::CNode</big></b></big><br>\r
-</div>\r
-<br>\r
-<big><b>string Name() <br>\r
-string Author()<br>\r
-string Comment()<br>\r
-boolean SetName(in string <i>aNewName</i> ) <br>\r
-boolean SetAuthor(in string <i>anAuthor</i> ) <br>\r
-boolean SetComment(in string <i>aComment</i> ) <br>\r
-<br>\r
-</b><u><i>Get / Set methods for Name, Author and Comment strings of the node.</i></u><br>\r
-<b><br>\r
-</b><a href="#CreateCNode"><small>#Create CNode</small></a><b><br>\r
-</b></big>AddAndCompare.SetName( 'AddAndCompare' )<br>\r
-AddAndCompare.SetAuthor( 'NoBody' )<br>\r
-AddAndCompare.SetComment( 'Python function' )<br>\r
-print "Name:", AddAndCompare.Name(), " Author:", AddAndCompare.Author(),\r
-" Comment:", AddAndCompare.Comment()<br>\r
-<br>\r
-<br>\r
-<br>\r
-<big><b>Port Port( in string <i>aParameterName</i> )</b></big><br>\r
-<br>\r
-<big><u><i>Returns Port instance from created node</i></u></big><br>\r
-<br>\r
-<a href="#CreateFNode">#Create FNode</a><br>\r
-Addz = Add.Port('z')<br>\r
-<br>\r
-<br>\r
-<big><b>Port Input( in string <i>InputParameterName</i> , in Value\r
-<i>aValue</i> ) </b></big><br>\r
-<br>\r
-<i><u><big>Sets value into Port by its name and returs correspondent port\r
-instance</big></u></i><br>\r
-<br>\r
-<a href="#CreateFNode">#Create FNode</a><br>\r
-Addx = Add.Input("x",3.)<br>\r
-<br>\r
-<br>\r
-<br>\r
-<b><big>void Coords( in long <i>X</i> , in long <i>Y</i> )<br>\r
-</big><big>long X()</big></b><br>\r
-<b><big>long Y()</big></b><br>\r
-<br>\r
-<big><u><i>Methods to sets position of the node and getting current coordinates</i></u></big><br>\r
-<br>\r
-<a\r
- href="file:///vsv/salome/build/doc/html/html/examples_SUPERV.html#CreateFNode">#Create\r
-FNode</a><br>\r
-Add.Coords( 1 , 152 )<br>\r
-print "X=", Add.X(), " Y=", Add.Y()<br>\r
-<br>\r
-<br>\r
-<b><big>long CpuUsed()</big></b><br>\r
-<br>\r
-<u><i><big>Returns the Cpu used by a node in seconds</big></i></u><br>\r
-<br>\r
-<a href="#RunandWait">#Run Graph and wait for its finish</a><br>\r
-print "CPU used: ", Add.CpuUsed(), " sec"<br>\r
-<br>\r
-<br>\r
-<br>\r
-<br>\r
-<br>\r
-<div align="center"><big><b><big><a name="FNode"></a>SUPERV::FNode</big><br>\r
-</b></big></div>\r
-<br>\r
-<b><big>string GetContainer() <br>\r
-boolean SetContainer(in string <i>aContainer</i> ) <br>\r
-</big></b><br>\r
-<big><u><i>Get / Set method for container name</i></u></big><br>\r
-<br>\r
-<a\r
- href="file:///vsv/salome/build/doc/html/html/examples_SUPERV.html#CreateFNode">#Create\r
-FNode</a><br>\r
-Add.SetContainer( 'localhost/FactoryServer' )<br>\r
-print "Container: ", Add.GetContainer()<br>\r
-<br>\r
-<br>\r
-<br>\r
-<div align="center"><big><b><big><a name="INode"></a>SUPERV::INode</big></b></big><br>\r
-</div>\r
-<br>\r
-<br>\r
-<big><b>void SetPyFunction( in string <i>FuncName</i> , in ListOfStrings\r
-<i>aPyInitFunction</i> )</b></big><br>\r
-<br>\r
-<u><i><big>Replaces Python function of inline node by new one</big></i></u><br>\r
-<br>\r
-<a href="#CreateINode">#Create INode</a><br>\r
-PyIsOdd = []<br>\r
-PyIsOdd.append( 'def IsOdd(a) : ' )<br>\r
-PyIsOdd.append( ' print a,"IsOdd" ' )<br>\r
-PyIsOdd.append( ' return a ' )<br>\r
-Add.SetPyFunction("IsOdd", PyIsOdd)<br>\r
-<br>\r
-<br>\r
-<b><big>string PyFuncName()</big></b><br>\r
-<br>\r
-<div align="left"><u><i><big>Returns Name of the Python function</big></i></u><br>\r
-<br>\r
-<a\r
- href="file:///vsv/salome/build/doc/html/html/examples_SUPERV.html#CreateINode">#Create\r
-INode</a><br>\r
-print "Name:", Add.PyFuncName()<br>\r
-<br>\r
-<br>\r
- </div>\r
- <b><big>ListOfStrings PyFunction()<br>\r
-<br>\r
-</big></b><u><i><big>Returns Python function as a list of strings</big></i></u><br>\r
-<br>\r
-<a\r
- href="file:///vsv/salome/build/doc/html/html/examples_SUPERV.html#CreateINode">#Create\r
-INode</a><br>\r
-PyFunc = Add.PyFunction()<br>\r
-<br>\r
-<br>\r
-<b><big>SUPERV::Port InPort( in string <i>aParameterName</i> , in string\r
-<i>aParameterType</i> ) <br>\r
-SUPERV::Port OutPort( in string <i>aParameterName</i> , in string <i>aParameterType</i>\r
-) <br>\r
-</big></b><br>\r
-<u><i><big>Creation of In and Out ports of Inline Node</big></i></u><br>\r
-<br>\r
-<a name="CreatePorts"></a><a\r
- href="file:///vsv/salome/build/doc/html/html/examples_SUPERV.html#CreateINode">#Create\r
-INode</a><br>\r
-Add.InPort('a', 'long')<br>\r
-<div align="left">Add.InPort('b', 'long')<br>\r
- \r
-<div align="left">Add.OutPort('s', 'long')<br>\r
- <br>\r
- </div>\r
- <br>\r
- </div>\r
- <br>\r
-<div align="center"><big><b><big><a name="LNode"></a>SUPERV::LNode</big></b></big><br>\r
-</div>\r
-<br>\r
-<br>\r
-<b><big>void SetPyInit( in string <i>InitName</i> , in ListOfStrings\r
-<i>aPyInitFunction</i> )</big></b><br>\r
-<b><big>void SetPyMore( in string <i>MoreName</i> , in ListOfStrings\r
-<i>aPyMoreFunction</i> )<br>\r
-void SetPyNext( in string <i>NextName</i> , in ListOfStrings <i>aPyNextFunction</i>\r
-)<br>\r
-</big></b><br>\r
-<i><u><big>Sets (replaces) Python fonction of according clause (Init, More,\r
-Next) in Loop Node</big></u></i><br>\r
-<br>\r
-<a href="#CreateLNode">#Create Loop Node</a><br>\r
-Pyfori = []<br>\r
-Pyfori.append( 'def Initfori( ii , K ) :' )<br>\r
-Pyfori.append( ' return 1,0,K' )<br>\r
-PyMorefori = []<br>\r
-PyMorefori.append( 'def Morefori( ii , K ) :' )<br>\r
-PyMorefori.append( ' OutLoop = 0' )<br>\r
-PyMorefori.append( ' if 2 > ii :' )<br>\r
-PyMorefori.append( ' OutLoop =\r
-1' )<br>\r
-PyMorefori.append( ' return OutLoop,ii,K' )<br>\r
-PyNextfori = []<br>\r
-PyNextfori.append( 'def Nextfori( ii , K ) :' )<br>\r
-PyNextfori.append( ' ii = ii + 1' )<br>\r
-PyNextfori.append( ' return ii,K' )<br>\r
-forN.SetPyInit('Initfori', Pyfori)<br>\r
-<div align="left">forN.SetPyMore('Morefori', PyMorefori)<br>\r
- \r
-<div align="left">forN.SetPyNext('Nextfori', PyNextfori)<br>\r
- <br>\r
-<br>\r
-<br>\r
-<b><big>string PyInitName() <br>\r
-</big></b></div>\r
-<b><big>string PyMoreName()<br>\r
-string PyNextName()<br>\r
-</big></b> </div>\r
- <b><big><br>\r
-</big></b><u><i><big>Returns Python function name of according clause</big></i></u><br>\r
-<br>\r
-<a\r
- href="file:///vsv/salome/build/doc/html/html/examples_SUPERV.html#CreateLNode">#Create\r
-Loop Node</a><br>\r
-print "Init Name:", forN.PyInitName()<br>\r
-print "More Name:", forN.PyMoreName()<br>\r
-print "Next Name:", forN.PyNextName()<br>\r
-<br>\r
-<br>\r
-<b><big>ListOfStrings PyInit()<br>\r
-ListOfStrings PyMore()<br>\r
-ListOfStrings PyNext()<br>\r
-</big></b><br>\r
-<u><i><big>Returns Python function as a list of strings</big></i><i><big>\r
-from according clause</big></i></u><br>\r
-<br>\r
-<a\r
- href="file:///vsv/salome/build/doc/html/html/examples_SUPERV.html#CreateLNode">#Create\r
-Loop Node</a><br>\r
-InitFunc = forN.PyInit()<br>\r
-<div align="left">MoreFunc = forN.PyMoret()<br>\r
- \r
-<div align="left">NextFunc = forN.PyNext()<br>\r
- <br>\r
- <br>\r
- </div>\r
- <br>\r
- \r
-<div align="center"><big><b><big><a name="Port"></a>SUPERV::Port</big></b></big><br>\r
-</div>\r
-<br>\r
-<b><big>boolean Input( in Value <i>aValue</i> )</big></b><br>\r
-<br>\r
-<u><i><big>Sets value to the input port instance</big></i></u><br>\r
-<br>\r
-<a href="#CreatePorts">#CreatePorts</a><br>\r
-aPort = Add.Port('a')<br>\r
-aPort.Input(10)<br>\r
-<br>\r
-<br>\r
-<b><big>CNode Node()</big></b><br>\r
-<br>\r
-<u><i><big>Returns Node - owner of the port</big></i></u><br>\r
-<br>\r
-Add = aPort.Node()<br>\r
-<br>\r
-<br>\r
-<b><big>string Name()</big></b><br>\r
-<br>\r
-<u><i><big>Returns Name of the Port</big></i></u><br>\r
-<br>\r
-print "Port Name:", aPort.Name()<br>\r
-<br>\r
-<br>\r
-<br>\r
- \r
- </div>\r
-</div>\r
- </div>\r
-</div>\r
-</body>\r
-</html>\r
+++ /dev/null
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">\r
-<html>\r
-<head>\r
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\r
- <meta name="GENERATOR" content="Mozilla/4.73 [en] (WinNT; I) [Netscape]">\r
- <title>Main Page</title>\r
-<link href="doxygen.css" rel="stylesheet" type="text/css">\r
-</head>\r
-<body>\r
- \r
-<center>\r
- <table WIDTH="96%" >\r
- <tr> \r
- <td><a href="http://www.opencascade.com"><img src="sources/logocorp.gif" BORDER=0 height=46 width=122></a></td>\r
- <td> \r
- <div align=right><a href="http://www.opencascade.org/SALOME/"><img src="sources/application.gif" BORDER=0 height=46 width=108></a></div>\r
- </td>\r
- </tr>\r
- </table>\r
-</center>\r
-<h1><a name="page2">General overview</a> </h1>\r
-<a name="cont"></a><h2>Table of contents </h2>\r
-<b><i>\r
-<ul>\r
- <li><a href="#1">1. Introduction</a></li>\r
- <li><a href="#2">2. Definitions </a></li>\r
- <ul>\r
- <li><a href="#2_1">2.1 Computing scheme of type DataFlow</a></li>\r
- <li><a href="#2_2">2.2 Types of nodes </a></li>\r
- <ul>\r
- <li><a href="#2_2_1">2.2.1 Computation node </a></li>\r
- <li><a href="#2_2_2">2.2.2 Loop node </a></li>\r
- <li><a href="#2_2_3">2.2.3 Switch node </a></li>\r
- <li><a href="#2_2_4">2.2.4 GOTO node </a></li>\r
- </ul>\r
- </ul>\r
- <li><a href="#3">3. Services and features of the SUPERVISION component</a></li>\r
- <ul>\r
- <li><a href="#3_1">3.1 CNode class</a></li>\r
- <li><a href="#3_2">3.2 FNode class </a></li>\r
- <li><a href="#3_3">3.3 INode class </a></li>\r
- <li><a href="#3_4">3.4 GNode class </a></li>\r
- <li><a href="#3_5">3.5 LNode class </a></li>\r
- <li><a href="#3_6">3.6 ELNode class </a></li>\r
- <li><a href="#3_7">3.7 SNode class </a></li>\r
- <li><a href="#3_8">3.8 ESNode class </a></li>\r
- <li><a href="#3_9">3.9 Graph class </a></li>\r
- <li><a href="#3_10">3.10 Link class </a></li>\r
- <li><a href="#3_11">3.11 Value class </a></li>\r
- <li><a href="#3_12">3.12 Port class </a></li>\r
- <li><a href="#3_13">3.13 SuperG class </a></li>\r
- </ul>\r
-</ul>\r
-</i> </b> <br>\r
-<a name="1"></a><h2>1. Introduction </h2>\r
-<p>The Supervision module of the SALOME platform allows to define and execute \r
- a chain of distributed numeric components, as well as to control the progress \r
- of this chain. The various calculations to be chained and the exchanged data \r
- are specified in a computing scheme, which can be of two types : </p>\r
-<ul>\r
- <li>Data flow computing schemes. <br>\r
- These schemes are represented by graphs without loops, conditional branches \r
- or any operation of control. The execution of theses schemes can be automatically \r
- optimized by the supervision engine by detecting and executing simultaneously \r
- independant branches and by managing in a optimal way the life cycle of components.</li>\r
- <br>\r
- <br>\r
- <li>Script type computing schemes.<br>\r
- These schemes allow to define chainings or complex couplings of components \r
- using loops, conditional execution and control flow breaks by leaning on a \r
- scripting language (parametric studies, multi-physical coupling). Contrary \r
- in data flows, the specification of these schemes must define the sequence \r
- of execution of components. Notably, the simultaneous execution of components \r
- should be explicitly defined.</li>\r
-</ul>\r
-<p>Of simple conception, the data flow schemes can be built in a graphic way and \r
- validated automatically by the supervision engine.</p>\r
-<p>The script type computing schemes, which offer the possibility of building \r
- complex chains, should be conceived by warned users (developers) who master \r
- the syntax and the use of the scripting language.</p>\r
-<p>Once specified and validated, certain computing schemes defined by scripts \r
- can be made customizable (input and output data, parameter sets) and integrated \r
- into the platform to form components. These components can be used to build \r
- schemes of higher level. </p>\r
-<p>Besides the definition of computing schemes, the Supervision module must also \r
- take care of their execution and follow-up (complete execution or step by step) \r
- : </p>\r
-<ul>\r
- <li> Asking of instanciation of the components (kernel calls) and data (data \r
- servers calls),</li>\r
- <li>Launching computations specified in the computing scheme, </li>\r
- <li>Managing the events emitted or received by the supervision engine and the \r
- component,</li>\r
- <li> Recovering the results of computations and demand of filing for the data \r
- service. </li>\r
-</ul>\r
-<p>The user can visualize the progress of the scheme and the exchanged data, be \r
- informed about the evolution of the execution of a component (errors, warning, \r
- tracks, ...), to intervene by stopping, pausing or by resuming the execution \r
- of the scheme or a particular component. </p>\r
- <i><a href="#cont">Back to the contents</a></i>\r
-<a name="2"></a><h2>2. Defintions </h2>\r
-<a name="2_1"></a><h3>2.1 Computing scheme of type DataFlow</h3>\r
-<p>The computing schemes of type dataflow, feasible by the Supervision module, \r
- are directed acyclic graphs, described by a set of nodes and of directed links. \r
- A node represents a service of an instance of a computation component.</p>\r
-<p>A node is provided with input port(s) and/or output port(s). The input port(s) \r
- (resp. output port(s)) represent the input argument(s) (resp. output argument(s)) \r
- of the service. Certain services can possibly require the use of parameters \r
- which will be grouped together in configuration files (defined in the Data/Properties \r
- module, and recorded in the study).</p>\r
-<p>The computing schemes of type data flow do not contain either loops, conditional \r
- branches or any operation of control. They can thus be built easily in a graphic \r
- way, by connecting output ports to input ports of nodes. Although the graphic \r
- construction is the simplest way, these computing schemes can also be defined \r
- in the language of script.</p>\r
-<p>A node represents a service (function, method) of an instance of a component. \r
- If the component possesses a unique service (\93Run\94 method), one will omit the \r
- term \93service of\94. Various services of the same component can be used in various \r
- nodes of the graph, or the same service can be used several times.</p>\r
-<a name="2_2"></a><h3>2.2 Types of nodes </h3>\r
-<p>In the SUPERVISION module there are the following types of nodes: </p>\r
-<b>\r
-<ul>\r
- <li>computation node,</li>\r
- <li> loop node,</li>\r
- <li> switch node,</li>\r
- <li> GOTO node. </li>\r
-</ul>\r
-</b> \r
-<p>The dependance between different types of nodes is shown on the following picture: \r
-</p>\r
-<div align="center"><img src="nodestypes.jpg"> </div>\r
-<a name="2_2_1"></a><h4>2.2.1 Computation node </h4>\r
-<p>This node represents a computation algorithm in the graph structure. Nodes \r
- of such type can present a service registered in the Component Catalog (<b>Factory \r
- Node</b>) or an external service defined in Python script by user (<b>InLine node</b>). \r
- Python function of InLine node can be edited in Supervision Graph edit mode. \r
-</p>\r
-<a name="2_2_2"></a><h4><b>2.2.2 Loop node</b> </h4>\r
-<p>Loop node is a kind of Control nodes. In fact two nodes represent Loop: \r
-<b>start</b> loop and <b>end</b> loop nodes. Nodes of such type are always InLine nodes. \r
-User have to supply this type of node by service, which will check conditions of end of loop. </p>\r
-\r
-<p>With that kind of nodes may be defined all kinds of loops:<br><br>\r
-\r
-\93for( initial condition(s) ; end condition(s) ; end loop code )\94 or <br><br>\r
-\r
-\93while( end condition )\94<br><br>\r
-\r
-etc\85</p>\r
-<p>Here you can see a simple example of Python functions set in a Loop node:</p>\r
-<pre><code>\r
-def Init(Index,Min,Max,Incr) : \r
-\r
- if Min <= Max : \r
-\r
- Index = Min \r
-\r
- else : \r
-\r
- Index = Max \r
-\r
- return Index,Min,Max,Incr \r
-\r
- \r
-\r
-def More(Index,Min,Max,Incr) : \r
-\r
- if Index < Max : \r
-\r
- DoLoop = 1 \r
-\r
- else : \r
-\r
- DoLoop = 0 \r
-\r
- return DoLoop,Index,Min,Max,Incr \r
-\r
- \r
-\r
-def Next(Index,Min,Max,Incr) : \r
-\r
- Index = Index + Incr \r
-\r
- return Index,Min,Max,Incr\r
-</code></pre>\r
-\r
-<a name="2_2_3"></a><h4>2.2.3 Switch node </h4>\r
-<p>Switch node is a kind of Control node. In fact two nodes present Switch: <b>start</b> Switch and <b>end</b> Switch.\r
- Nodes of such type are always InLine nodes. You have to supply this type of node by service, which will perform switching. That's why nodes of such type can have at least two or more switch ports (Boolean), but only one switch port can have "True" value at a definite moment of graph execution.</p>\r
- \r
- <p> With that kind of node you can define all kinds of tests or switches :</p>\r
-\r
-<p>\93if( condition ) ; else if( condition ) \85 ; else\94 or<br><br>\r
-\r
-\93switch( variable ) ; case value \85; default\94.<br><br>\r
-\r
-Etc\85</p>\r
-<p>The associated Python function will have all input ports of the Switch node \r
- as input arguments. And that function must return a value for all output ports. \r
- A simple example of this Python function: </p>\r
- <pre><code>\r
- \r
-def Switch(x): \r
-\r
- i1=0 \r
-\r
- i2=0 \r
-\r
- i3=0 \r
-\r
- if x>13: \r
-\r
- i1=1 \r
-\r
- elif x==13: \r
-\r
- i2=1 \r
-\r
- else: \r
-\r
- i3=1 \r
-\r
- return i1,i2,i3 \r
- </code></pre>\r
-<p>In this example <b>i1</b>, <b>i2</b>, <b>i3</b> parameters of the function correspond to Switch \r
- ports of the node. So, depending on the result of execution of the initial condition \r
- (in our case it's a comparison of the input parameter with an integer 13), one \r
- of the switch ports will get the value 1. And this port will transmit further \r
- dataflow to the corresponding node. </p>\r
-<a name="2_2_4"></a><h4>2.2.4 GOTO node </h4>\r
-<p>GOTO node represents a simple transmitter of data from one port into another. \r
- This InLine node can be with service or without it. In the first case the data \r
- received by a GOTO node will be processed by this function and only after that \r
- it will be transferred to another node. GOTO nodes may have as many Input and \r
- Output ports as it's necessary. </p>\r
- <i><a href="#cont">Back to the contents</a></i>\r
-<a name="3"></a><h2>3. SUPERVISION module features and services </h2>\r
-<p>The functionality of the SUPERVISION module is provided by a set of classes which are combined into \r
-the <b>SUPERV</b> package.\r
-<p>The API reference of the SUPERVISION component can be found <a href="namespaceSUPERV.html">here</a>.</p>\r
-<a name="3_1"></a><h3>3.1 CNode class </h3>\r
-<p>This is a base class of the SUPERVISION module. It contains a set of methods allowing:</p>\r
-\r
-<ul>\r
- <li>creating a <b>Computation node </b>and setting its parameters (Name, Author, Comments \r
- etc.)</li>\r
- <li>checking the current state of the node in the data flow</li>\r
- <li>node execution follow-up</li>\r
- <li>management of the components, which can be initialized for execution of calculations in the data flow. (For that purpose\r
- CNode class inherits the methods of the <b>Engines:Container</b> class)</li>\r
-</ul>\r
-<p>The API reference for this class can be found <a href="interfaceSUPERV_1_1CNode.html">here</a>.</p>\r
-\r
-<a name="3_2"></a><h3>3.2 FNode class </h3>\r
-\r
-<p>This class is necessary for management of <b>Factory nodes</b> in the data flow. Besides the inherited methods it contains some methods allowing\r
-to define the component from the container, which will be called for execution of the calculation.</p>\r
-<p>The API reference for this class can be found <a href="interfaceSUPERV_1_1FNode.html">here</a>.</p>\r
-<a name="3_3"></a>\r
-<h3>3.3 INode class </h3>\r
-<p>This class is necessary for management of <b>Inline nodes</b> in the data flow. Besides the inherited methods it contains some methods allowing to set\r
-the Python function, which will be executed for performing calculations, as well as input and output parameters for the node.</p>\r
-<p>The API reference for this class can be found <a href="interfaceSUPERV_1_1INode.html">here</a>.</p>\r
-\r
-<a name="3_4"></a><h3>3.4 GNode class </h3>\r
-<p>This class is necessary for management of <b>GOTO nodes</b> in the data flow. Besides the inherited methods it contains some methods allowing to define\r
-the couple node, which will be linked to this one.</p>\r
-<p>The API reference for this class can be found <a href="interfaceSUPERV_1_1GNode.html">here</a>.</p>\r
-\r
-<a name="3_5"></a><h3>3.5 LNode class </h3>\r
-<p>This class is necessary for management of <b>Loop nodes</b> (or <b>Start Loop nodes</b>) in the data flow. Besides the inherited methods it contains some methods allowing to define\r
-the Python function, which will control the loop.</p>\r
-<p>The API reference for this class can be found <a href="interfaceSUPERV_1_1LNode.html">here</a>.</p>\r
-\r
-<a name="3_6"></a><h3>3.6 ELNode class </h3>\r
-<p>This class is necessary for management of <b>End Loop nodes</b> (or <b>start</b> Loop nodes) in the data flow.</p>\r
-<p>The API reference for this class can be found <a href="interfaceSUPERV_1_1ELNode.html">here</a>.</p>\r
-\r
-<a name="3_7"></a><h3>3.7 SNode class </h3>\r
-<p>This class is necessary for management of <b>Switch nodes</b> (or <b>Start Switch nodes</b>) in the data flow. </p>\r
-<p>The API reference for this class can be found <a href="interfaceSUPERV_1_1SNode.html">here</a>.</p>\r
-\r
-<a name="3_8"></a><h3>3.8 ESNode class </h3>\r
-<p>This class is necessary for management of <b>End Switch nodes</b> in the data flow. </p>\r
-<p>The API reference for this class can be found <a href="interfaceSUPERV_1_1ESNode.html">here</a>.</p>\r
-\r
-<a name="3_9"></a><h3>3.9 Graph class </h3>\r
-<p>This class is used for management of a data flow. It contains a set of methods, which allows:</p>\r
-<ul>\r
- <li>creation of a data flow consisting of one or several different nodes</li>\r
- <li>import/export of an existing data flow</li>\r
- <li>execution of the data flow </li>\r
- <li>follow-up of data flow execution</li>\r
- <li>checking the state of the data flow</li>\r
-</ul>\r
-<p>The API reference for this class can be found <a href="interfaceSUPERV_1_1Graph.html">here</a>.</p>\r
-<a name="3_10"></a><h3>3.10 Link class </h3>\r
-<p>This class contains a set of methods used for representation and management of the links connecting nodes in a data flow. </p>\r
-<p>The API reference for this class can be found <a href="interfaceSUPERV_1_1Link.html">here</a>.</p>\r
-\r
-<a name="3_11"></a><h3>3.11 Value class </h3>\r
-<p>This class contains a set of methods used for management of the values which can be set in the ports of nodes. </p>\r
-<p>The API reference for this class can be found <a href="interfaceSUPERV_1_1Value.html">here</a>.</p>\r
-\r
-<a name="3_12"></a><h3>3.12 Port class </h3>\r
-<p>This class contains a set of methods used for management of the ports of the nodes in a data flow: </p>\r
-\r
-<ul>\r
- <li>setting the attributes of a port</li>\r
- <li>initialization of input ports with initial values</li>\r
- <li>linking ports of different nodes</li>\r
-</ul>\r
-<p>The API reference for this class can be found <a href="interfaceSUPERV_1_1Port.html">here</a>.</p>\r
-\r
-<a name="3_13"></a><h3>3.13 SuperG class </h3>\r
-<p>The main class of the SUPERVISION ccomponent which is used for construction and initialization of a data flow. </p>\r
-<p>The API reference for this class can be found <a href="interfaceSUPERV_1_1SuperG.html">here</a>.</p>\r
-\r
-\r
-<i><a href="#cont">Back to the contents</a></i>\r
-</body>\r
-</html>\r
+++ /dev/null
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.73 [en] (WinNT; I) [Netscape]">
- <title>Main Page</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css">
-</head>
-<body>
-
-<center><table WIDTH="96%" >
-<tr>
-<td><a href="http://www.opencascade.com"><img src="sources/logocorp.gif" BORDER=0 height=46 width=122></a></td>
-
-
-<td>
-<div align=right><a href="http://www.opencascade.org/SALOME/"><img src="sources/application.gif" BORDER=0 height=46 width=108></a></div>
-</td>
-</tr>
-</table></center>
-
-
-</body>
-</html>
-<!-- Generated by Doxygen 1.3-rc2 -->
-<ul>
-<li><b>SALOME SUPERVISION module</b><ul>
-<li><a href="HTML/SUPERV.html">Mapping of SUPERV functions</a></li></ul>
-</li></ul>
-</body>
-</html>
+++ /dev/null
-foldersTree = gFld("<b>SALOME v.2.0.0 </b>", "", "")
- insDoc(foldersTree, gLnk("Main Page", "", "main.html"))
-
-aux1 = insFld(foldersTree, gFld("TUI Reference Guide", ""))
- aux2 = insFld(aux1, gFld("Modules", ""))
- aux3 = insFld(aux2, gFld("SALOME SUPERVISION module", ""))
- insDoc(aux3, gLnk("Overview", "", "overview_Supervision.html"))
- aux4 = insFld(aux3, gFld("Packages", ""))
- insDoc(aux4, gLnk("SUPERV", "", "namespaceSUPERV.html"))
- insDoc(aux3, gLnk("Examples", "", "examples_SUPERV.html"))
-
-
-/*! Data structures
-*/
- insDoc(aux1, gLnk("Data Structures", "", "annotated.html"))
-
-/*! insDoc(aux1, gLnk("SUPERV::CNode", "", "interfaceSUPERV_1_1CNode.html"))
- insDoc(aux1, gLnk("SUPERV::ELNode", "", "interfaceSUPERV_1_1ELNode.html"))
- insDoc(aux1, gLnk("SUPERV::ESNode", "", "interfaceSUPERV_1_1ESNode.html"))
- insDoc(aux1, gLnk("SUPERV::FNode", "", "interfaceSUPERV_1_1FNode.html"))
- insDoc(aux1, gLnk("SUPERV::GNode", "", "interfaceSUPERV_1_1GNode.html"))
- insDoc(aux1, gLnk("SUPERV::Graph", "", "interfaceSUPERV_1_1Graph.html"))
- insDoc(aux1, gLnk("SUPERV::INode", "", "interfaceSUPERV_1_1INode.html"))
- insDoc(aux1, gLnk("SUPERV::Link", "", "interfaceSUPERV_1_1Link.html"))
- insDoc(aux1, gLnk("SUPERV::ListOfNodes", "", "structSUPERV_1_1ListOfNodes.html"))
- insDoc(aux1, gLnk("SUPERV::LNode", "", "interfaceSUPERV_1_1LNode.html"))
- insDoc(aux1, gLnk("SUPERV::Port", "", "interfaceSUPERV_1_1Port.html"))
- insDoc(aux1, gLnk("SUPERV::SDate", "", "structSUPERV_1_1SDate.html"))
- insDoc(aux1, gLnk("SUPERV::SNode", "", "interfaceSUPERV_1_1SNode.html"))
- insDoc(aux1, gLnk("SUPERV::SuperG", "", "interfaceSUPERV_1_1SuperG.html"))
-*/
- insDoc(aux1, gLnk("Class Hierarchy", "", "hierarchy.html"))
-
-/*!
- aux3 = insFld(aux2, gFld("SUPERV::CNode", "", "interfaceSUPERV_1_1CNode.html"))
- insDoc(aux3, gLnk("SUPERV::FNode", "", "interfaceSUPERV_1_1FNode.html"))
- aux4 = insFld(aux3, gFld("SUPERV::INode", "", "interfaceSUPERV_1_1INode.html"))
- aux5 = insFld(aux4, gFld("SUPERV::GNode", "", "interfaceSUPERV_1_1GNode.html"))
- insDoc(aux5, gLnk("SUPERV::ELNode", "", "interfaceSUPERV_1_1ELNode.html"))
- insDoc(aux5, gLnk("SUPERV::ESNode", "", "interfaceSUPERV_1_1ESNode.html"))
- insDoc(aux5, gLnk("SUPERV::LNode", "", "interfaceSUPERV_1_1LNode.html"))
- insDoc(aux5, gLnk("SUPERV::SNode", "", "interfaceSUPERV_1_1SNode.html"))
- insDoc(aux4, gLnk("SUPERV::Graph", "", "interfaceSUPERV_1_1Graph.html"))
- insDoc(aux2, gLnk("SUPERV::Link", "", "interfaceSUPERV_1_1Link.html"))
- insDoc(aux2, gLnk("SUPERV::SuperG", "", "interfaceSUPERV_1_1SuperG.html"))
- aux3 = insFld(aux2, gFld("SUPERV::Value", "", "interfaceSUPERV_1_1Value.html"))
- insDoc(aux3, gLnk("SUPERV::Port", "", "interfaceSUPERV_1_1Port.html"))
- insDoc(aux2, gLnk("SUPERV::SuperG", "", "interfaceSUPERV_1_1SuperG.html"))
- insDoc(aux1, gLnk("SUPERV::ListOfNodes", "", "structSUPERV_1_1ListOfNodes.html"))
- insDoc(aux1, gLnk("SUPERV::SDate", "", "structSUPERV_1_1SDate.html"))
-*/
- insDoc(aux1, gLnk("Class methods list", "", "functions.html"))
-/*!
-aux1 = insFld(foldersTree, gFld("Namespace List", "", "namespaces.html"))
- insDoc(aux1, gLnk("SUPERV", "", "namespaceSUPERV.html"))
-*/
- insDoc(aux1, gLnk("Namespace Members", "", "namespacemembers.html"))
-
- insDoc(aux1, gLnk("File List", "", "files.html"))
-
-/*!
-
- insDoc(aux1, gLnk("SUPERV.idl", "", "SUPERV_8idl.html"))
-*/
-
-
-aux1 = insFld(foldersTree, gFld("IDL/Python mapping", ""))
- insDoc(aux1, gLnk("Mapping of SUPERVISION IDL definitions to Python language", "", "page2.html"))
-
-/*! insDoc(foldersTree, gLnk("Graphical Class Hierarchy", "", "inherits.html"))
-*/
+++ /dev/null
-//****************************************************************
-// You are free to copy the "Folder-Tree" script as long as you
-// keep this copyright notice:
-// Script found in: http://www.geocities.com/Paris/LeftBank/2178/
-// Author: Marcelino Alves Martins (martins@hks.com) December '97.
-//****************************************************************
-
-//Log of changes:
-// 17 Feb 98 - Fix initialization flashing problem with Netscape
-//
-// 27 Jan 98 - Root folder starts open; support for USETEXTLINKS;
-// make the ftien4 a js file
-//
-// DvH: Dec 2000 - Made some minor changes to support external
-// references
-
-// Definition of class Folder
-// *****************************************************************
-
-function Folder(folderDescription, tagName, hreference) //constructor
-{
- //constant data
- this.desc = folderDescription
- this.tagName = tagName
- this.hreference = hreference
- this.id = -1
- this.navObj = 0
- this.iconImg = 0
- this.nodeImg = 0
- this.isLastNode = 0
-
- //dynamic data
- this.isOpen = true
- this.iconSrc = "ftv2folderopen.png"
- this.children = new Array
- this.nChildren = 0
-
- //methods
- this.initialize = initializeFolder
- this.setState = setStateFolder
- this.addChild = addChild
- this.createIndex = createEntryIndex
- this.hide = hideFolder
- this.display = display
- this.renderOb = drawFolder
- this.totalHeight = totalHeight
- this.subEntries = folderSubEntries
- this.outputLink = outputFolderLink
-}
-
-function setStateFolder(isOpen)
-{
- var subEntries
- var totalHeight
- var fIt = 0
- var i=0
-
- if (isOpen == this.isOpen)
- return
-
- if (browserVersion == 2)
- {
- totalHeight = 0
- for (i=0; i < this.nChildren; i++)
- totalHeight = totalHeight + this.children[i].navObj.clip.height
- subEntries = this.subEntries()
- if (this.isOpen)
- totalHeight = 0 - totalHeight
- for (fIt = this.id + subEntries + 1; fIt < nEntries; fIt++)
- indexOfEntries[fIt].navObj.moveBy(0, totalHeight)
- }
- this.isOpen = isOpen
- propagateChangesInState(this)
-}
-
-function propagateChangesInState(folder)
-{
- var i=0
-
- if (folder.isOpen)
- {
- if (folder.nodeImg)
- if (folder.isLastNode)
- folder.nodeImg.src = "ftv2mlastnode.png"
- else
- folder.nodeImg.src = "ftv2mnode.png"
- folder.iconImg.src = "ftv2folderopen.png"
- for (i=0; i<folder.nChildren; i++)
- folder.children[i].display()
- }
- else
- {
- if (folder.nodeImg)
- if (folder.isLastNode)
- folder.nodeImg.src = "ftv2plastnode.png"
- else
- folder.nodeImg.src = "ftv2pnode.png"
- folder.iconImg.src = "ftv2folderclosed.png"
- for (i=0; i<folder.nChildren; i++)
- folder.children[i].hide()
- }
-}
-
-function hideFolder()
-{
- if (browserVersion == 1 || browserVersion == 3) {
- if (this.navObj.style.display == "none")
- return
- this.navObj.style.display = "none"
- } else {
- if (this.navObj.visibility == "hidden")
- return
- this.navObj.visibility = "hidden"
- }
-
- this.setState(0)
-}
-
-function initializeFolder(level, lastNode, leftSide)
-{
-var j=0
-var i=0
-var numberOfFolders
-var numberOfDocs
-var nc
-
- nc = this.nChildren
-
- this.createIndex()
-
- var auxEv = ""
-
- if (browserVersion > 0)
- auxEv = "<a href='javascript:clickOnNode("+this.id+")'>"
- else
- auxEv = "<a>"
-
- if (level>0)
- if (lastNode) //the last 'brother' in the children array
- {
- this.renderOb(leftSide + auxEv + "<img name='nodeIcon" + this.id + "' src='ftv2mlastnode.png' width=16 height=22 border=0></a>")
-// leftSide = leftSide + "<img src='ftv2blank.png' width=16 height=22>"
- this.isLastNode = 1
- }
- else
- {
- this.renderOb(leftSide + auxEv + "<img name='nodeIcon" + this.id + "' src='ftv2mnode.png' width=16 height=22 border=0></a>")
- leftSide = leftSide + "<img src='ftv2vertline.png' width=16 height=22>"
- this.isLastNode = 0
- }
- else
- this.renderOb("")
-
- if (nc > 0)
- {
- level = level + 1
- for (i=0 ; i < this.nChildren; i++)
- {
- if (i == this.nChildren-1)
- this.children[i].initialize(level, 1, leftSide)
- else
- this.children[i].initialize(level, 0, leftSide)
- }
- }
-}
-
-function drawFolder(leftSide)
-{
- if (browserVersion == 2) {
- if (!doc.yPos)
- doc.yPos=8
- doc.write("<layer id='folder" + this.id + "' top=" + doc.yPos + " visibility=hidden>")
- }
- if (browserVersion == 3)
- {
- doc.write("<div id='folder" + this.id + "' style='visibility:hide;'>")
- }
-
- doc.write("\n<table ")
- if (browserVersion == 1)
- doc.write(" id='folder" + this.id + "' style='position:block;' ")
- doc.write(" border=0 cellspacing=0 cellpadding=0>")
- doc.write("\n<tr><td>")
- doc.write(leftSide)
- this.outputLink()
- doc.write("<img name='folderIcon" + this.id + "' ")
- doc.write("src='" + this.iconSrc+"' border=0></a>")
- doc.write("</td>\n<td valign=middle nowrap>")
- if (USETEXTLINKS)
- {
- this.outputLink()
- doc.write(this.desc + "</a>")
- }
- else
- doc.write(this.desc)
-
-/*!
- if (this.tagName!="")
- {
- doc.write(" [external]")
- }
-*/
- doc.write("</td>")
- doc.write("\n</table>\n")
-
- if (browserVersion == 2) {
- doc.write("</layer>")
- }
- if (browserVersion == 3) {
- doc.write("</div>")
- }
-
- if (browserVersion == 1) {
- this.navObj = doc.all["folder"+this.id]
- this.iconImg = doc.all["folderIcon"+this.id]
- this.nodeImg = doc.all["nodeIcon"+this.id]
- } else if (browserVersion == 2) {
- this.navObj = doc.layers["folder"+this.id]
- this.iconImg = this.navObj.document.images["folderIcon"+this.id]
- this.nodeImg = this.navObj.document.images["nodeIcon"+this.id]
- doc.yPos=doc.yPos+this.navObj.clip.height
- } else if (browserVersion == 3) {
- this.navObj = doc.getElementById("folder"+this.id)
- this.iconImg = doc.images.namedItem("folderIcon"+this.id)
- this.nodeImg = doc.images.namedItem("nodeIcon"+this.id)
- }
-}
-
-function outputFolderLink()
-{
- if (this.hreference)
- {
- doc.write("<a ")
- if (this.tagName)
- {
- doc.write("doxygen='" + this.tagName + "' ");
- }
- doc.write("href='" + this.hreference + "' TARGET=\"basefrm\" ")
- if (browserVersion > 0)
- doc.write("onClick='javascript:clickOnFolder("+this.id+")'")
- doc.write(">")
- }
- else
- doc.write("<a>")
-}
-
-function addChild(childNode)
-{
- this.children[this.nChildren] = childNode
- this.nChildren++
- return childNode
-}
-
-function folderSubEntries()
-{
- var i = 0
- var se = this.nChildren
-
- for (i=0; i < this.nChildren; i++){
- if (this.children[i].children) //is a folder
- se = se + this.children[i].subEntries()
- }
-
- return se
-}
-
-
-// Definition of class Item (a document or link inside a Folder)
-// *************************************************************
-
-function Item(itemDescription, tagName, itemLink) // Constructor
-{
- // constant data
- this.desc = itemDescription
- this.tagName = tagName
- this.link = itemLink
- this.id = -1 //initialized in initalize()
- this.navObj = 0 //initialized in render()
- this.iconImg = 0 //initialized in render()
- this.iconSrc = "ftv2doc.png"
-
- // methods
- this.initialize = initializeItem
- this.createIndex = createEntryIndex
- this.hide = hideItem
- this.display = display
- this.renderOb = drawItem
- this.totalHeight = totalHeight
-}
-
-function hideItem()
-{
- if (browserVersion == 1 || browserVersion == 3) {
- if (this.navObj.style.display == "none")
- return
- this.navObj.style.display = "none"
- } else {
- if (this.navObj.visibility == "hidden")
- return
- this.navObj.visibility = "hidden"
- }
-}
-
-function initializeItem(level, lastNode, leftSide)
-{
- this.createIndex()
-
- if (level>0)
- if (lastNode) //the last 'brother' in the children array
- {
- this.renderOb(leftSide + "<img src='ftv2lastnode.png' width=16 height=22>")
- leftSide = leftSide + "<img src='ftv2blank.png' width=16 height=22>"
- }
- else
- {
- this.renderOb(leftSide + "<img src='ftv2node.png' width=16 height=22>")
- leftSide = leftSide + "<img src='ftv2vertline.png' width=16 height=22>"
- }
- else
- this.renderOb("")
-}
-
-function drawItem(leftSide)
-{
- if (browserVersion == 2)
- doc.write("<layer id='item" + this.id + "' top=" + doc.yPos + " visibility=hidden>")
- if (browserVersion == 3)
- doc.write("<div id='item" + this.id + "' style='display:block;'>")
-
- doc.write("\n<table ")
- if (browserVersion == 1)
- doc.write(" id='item" + this.id + "' style='position:block;' ")
- doc.write(" border=0 cellspacing=0 cellpadding=0>\n")
- doc.write("<tr><td>")
- doc.write(leftSide)
- if (this.link!="")
- {
- doc.write("<a href=" + this.link + ">")
- }
- doc.write("<img id='itemIcon"+this.id+"' ")
- doc.write("src='"+this.iconSrc+"' border=0>")
- if (this.link!="")
- {
- doc.write("</a>")
- }
- doc.write("</td>\n<td valign=middle nowrap>")
- if (USETEXTLINKS && this.link!="")
- doc.write("<a href=" + this.link + ">" + this.desc + "</a>")
- else
- doc.write(this.desc)
-/*!
- if (this.tagName!="")
- {
- doc.write(" [external]");
- }
-*/
- doc.write("\n</table>\n")
-
- if (browserVersion == 2)
- doc.write("</layer>")
- if (browserVersion == 3)
- doc.write("</div>")
-
- if (browserVersion == 1) {
- this.navObj = doc.all["item"+this.id]
- this.iconImg = doc.all["itemIcon"+this.id]
- } else if (browserVersion == 2) {
- this.navObj = doc.layers["item"+this.id]
- this.iconImg = this.navObj.document.images["itemIcon"+this.id]
- doc.yPos=doc.yPos+this.navObj.clip.height
- } else if (browserVersion == 3) {
- this.navObj = doc.getElementById("item"+this.id)
- this.iconImg = doc.images.namedItem("itemIcon"+this.id)
- }
-}
-
-
-// Methods common to both objects (pseudo-inheritance)
-// ********************************************************
-
-function display()
-{
- if (browserVersion == 1 || browserVersion == 3)
- this.navObj.style.display = "block"
- else
- this.navObj.visibility = "show"
-}
-
-function createEntryIndex()
-{
- this.id = nEntries
- indexOfEntries[nEntries] = this
- nEntries++
-}
-
-// total height of subEntries open
-function totalHeight() //used with browserVersion == 2
-{
- var h = this.navObj.clip.height
- var i = 0
-
- if (this.isOpen) //is a folder and _is_ open
- for (i=0 ; i < this.nChildren; i++)
- h = h + this.children[i].totalHeight()
-
- return h
-}
-
-
-// Events
-// *********************************************************
-
-function clickOnFolder(folderId)
-{
- var clicked = indexOfEntries[folderId]
-
- if (!clicked.isOpen)
- clickOnNode(folderId)
-
- return
-
- if (clicked.isSelected)
- return
-}
-
-function clickOnNode(folderId)
-{
- var clickedFolder = 0
- var state = 0
-
- clickedFolder = indexOfEntries[folderId]
- state = clickedFolder.isOpen
-
- clickedFolder.setState(!state) //open<->close
-}
-
-function initializeDocument()
-{
- doc = document;
- if (doc.all)
- browserVersion = 1 //IE4
- else
- if (doc.layers)
- browserVersion = 2 //NS4
- else if(navigator.userAgent.toLowerCase().indexOf('gecko') != -1)
- browserVersion = 3 //mozilla
- else
- browserVersion = 0 //other
-
- foldersTree.initialize(0, 1, "")
- foldersTree.display()
-
- if (browserVersion > 0)
- {
- if(browserVersion != 3)
- doc.write("<layer top="+indexOfEntries[nEntries-1].navObj.top+"> </layer>")
-
- // close the whole tree
- clickOnNode(0)
- // open the root folder
- clickOnNode(0)
- }
-}
-
-// Auxiliary Functions for Folder-Treee backward compatibility
-// *********************************************************
-
-function gFld(description, tagName, hreference)
-{
- folder = new Folder(description, tagName, hreference)
- return folder
-}
-
-function gLnk(description, tagName, linkData)
-{
- fullLink = ""
-
- if (linkData!="")
- {
- fullLink = "'"+linkData+"' target=\"basefrm\""
- }
-
- linkItem = new Item(description, tagName, fullLink)
- return linkItem
-}
-
-function insFld(parentFolder, childFolder)
-{
- return parentFolder.addChild(childFolder)
-}
-
-function insDoc(parentFolder, document)
-{
- parentFolder.addChild(document)
-}
-
-// Global variables
-// ****************
-
-USETEXTLINKS = 1
-indexOfEntries = new Array
-nEntries = 0
-doc = document
-browserVersion = 0
-selectedFolder=0
+++ /dev/null
-# Copyright (C) 2003 CEA/DEN, EDF R&D
-#
-#
-#
-# File : Makefile.in
-# Author : Vasily Rusyaev (Open Cascade NN)
-# Module : doc
-# $Header:
-
-top_srcdir=@top_srcdir@
-root_srcdir=@ROOT_SRCDIR@
-top_builddir=../..
-srcdir=@srcdir@
-VPATH=.:@srcdir@
-doxygen=@DOXYGEN@
-
-@COMMENCE@
-
-doc:
- cp -fr $(srcdir)/INPUT ./; \
- cd INPUT; \
- sed 's|../../../share/salome|$(root_srcdir)|' doxyfile > doxyfile1; \
- mv -f doxyfile1 doxyfile; \
- $(doxygen) ./doxyfile; \
- cd ..; \
- cp -fr $(srcdir)/INPUT/sources/static/*.* ./html/
- cp -fr $(srcdir)/INPUT/sources/ html/
- cp -fr $(srcdir)/INPUT/HTML/ html/
-
-clean:
- rm -rf html
-
-distclean: clean
- rm -rf INPUT
-
-install:
- $(INSTALL) -d $(docdir); \
- cp -rf html $(docdir)
-
-uninstall:
- rm -rf $(docdir)/html
+++ /dev/null
-// SuperVisionTest AddComponent : example of component that adds two numbers
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// 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
-//
-// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
-//
-//
-//
-// File : AddComponent_Impl.cxx
-// Author : Jean Rahuel, CEA
-// Module : SuperVisionTest
-
-using namespace std;
-#include <stdio.h>
-#include <unistd.h>
-#include <fstream>
-#include <sstream>
-#include <string>
-
-//#include "utilities.h"
-
-#include "AddComponent_Impl.hxx"
-#include "Adder_Impl.hxx"
-
-AddComponent_Impl::AddComponent_Impl( CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- PortableServer::ObjectId * contId,
- const char *instanceName,
- const char *interfaceName) :
- Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,true) {
- MESSAGE("AddComponent_Impl::AddComponent_Impl this " << hex << this << dec
- << "activate object instanceName("
- << instanceName << ") interfaceName(" << interfaceName << ")" )
- _thisObj = this ;
- _id = _poa->activate_object(_thisObj);
- LastAddition = 0 ;
-}
-
-AddComponent_Impl::AddComponent_Impl() {
- LastAddition = 0 ;
-}
-
-AddComponent_Impl::~AddComponent_Impl() {
-}
-
-SuperVisionTest::Adder_ptr AddComponent_Impl::Addition() {
- beginService( "AddComponent_Impl::Addition" );
- sendMessage(NOTIF_STEP, "AddComponent_Impl creates Adder_Impl");
- Adder_Impl * myAdder ;
- myAdder = new Adder_Impl( _orb , _poa, _contId,
- instanceName() , interfaceName() ,
- graphName() , nodeName() ) ;
- SuperVisionTest::Adder_var iobject ;
- PortableServer::ObjectId * id = myAdder->getId() ;
- CORBA::Object_var obj = _poa->id_to_reference(*id);
- iobject = SuperVisionTest::Adder::_narrow(obj) ;
- endService( "AddComponent_Impl::Addition" );
- return SuperVisionTest::Adder::_duplicate(iobject) ;
-}
-
-double AddComponent_Impl::Add( double x , double y , double & z ) {
- beginService( " AddComponent_Impl::Add" );
- z = x + y ;
- int S;
-
- sendMessage(NOTIF_STEP, "AddComponent_Impl::Add is Computing");
- S = 1+(int) (15.0*rand()/(RAND_MAX+1.0));
- sleep(S);
- MESSAGE( "AddComponent_Impl::Add( " << x << " , " << y << " , " << z
- << " ) returns " << (x - y) << " after " << S << " seconds" )
- LastAddition = z ;
- endService( " AddComponent_Impl::Add" );
- return (x - y) ;
-}
-
-long AddComponent_Impl::Sigma( long n ) {
- long sigma = 0 ;
- int i , j ;
- beginService( " AddComponent_Impl::Sigma" );
- for ( j = 0 ; j < 1000000 ; j++ ) {
- sigma = 0 ;
- for ( i = 1 ; i <= n ; i++ ) {
- sigma = sigma + i ;
- }
- }
- endService( " AddComponent_Impl::Sigma" );
- return sigma ;
-}
-
-double AddComponent_Impl::LastResult() {
- beginService( " AddComponent_Impl::LastResult" );
- sendMessage(NOTIF_STEP, "AddComponent_Impl::LastResult is Computing");
- int S;
- S = 1+(int) (15.0*rand()/(RAND_MAX+1.0));
- sleep(S);
- endService( " AddComponent_Impl::LastResult" );
- return LastAddition ;
-}
-
-extern "C"
-{
- PortableServer::ObjectId * AddComponentEngine_factory
- (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- PortableServer::ObjectId * contId,
- const char *instanceName,
- const char *interfaceName)
- {
- MESSAGE("AddComponentEngine_factory AddComponentEngine ("
- << instanceName << "," << interfaceName << "," << getpid() << ")");
- AddComponent_Impl * myAddComponent
- = new AddComponent_Impl(orb, poa, contId, instanceName, interfaceName);
- return myAddComponent->getId() ;
- }
-}
-
-Adder_Impl::Adder_Impl( CORBA::ORB_ptr orb ,
- PortableServer::POA_ptr poa ,
- PortableServer::ObjectId * contId ,
- const char * instanceName ,
- const char * interfaceName ,
- const char * graphName ,
- const char * nodeName ) :
- Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,true) {
- Names( graphName , nodeName ) ;
- MESSAGE("Adder_Impl::Adder_Impl activate object instanceName("
- << instanceName << ") interfaceName(" << interfaceName << ") --> "
- << hex << (void *) this << dec )
- beginService( "Adder_Impl::Adder_Impl" );
- _thisObj = this ;
- _id = _poa->activate_object(_thisObj);
- LastAddition = 0 ;
- sendMessage(NOTIF_STEP, "Adder_Impl is Created");
- endService( "Adder_Impl::Adder_Impl" );
-}
-
-Adder_Impl::Adder_Impl() {
- LastAddition = 0 ;
-}
-
-Adder_Impl::~Adder_Impl() {
- beginService( "Adder_Impl::~Adder_Impl" );
- endService( "Adder_Impl::~Adder_Impl" );
-}
-
-double Adder_Impl::Add( double x , double y , double & z ) {
- beginService( " Adder_Impl::Add" );
- z = x + y ;
- int S;
-
- sendMessage(NOTIF_STEP, "Adder_Impl::Add is Computing");
- S = 1+(int) (15.0*rand()/(RAND_MAX+1.0));
- sleep(S);
- MESSAGE( "Adder_Impl::Add( " << x << " , " << y << " , " << z
- << " ) returns " << -(x - y) << " after " << S << " seconds" )
- LastAddition = z ;
- endService( " Adder_Impl::Add" );
- return -(x - y) ;
-}
-
-double Adder_Impl::AddAndCompare( const double x , const double y ,
- const SuperVisionTest::Adder_ptr anOtherAdder ,
- double & z ) {
- beginService( " Adder_Impl::AddAndCompare" );
- z = x + y ;
- int S;
-
- sendMessage(NOTIF_STEP, "Adder_Impl::AddAndCompare is Computing");
- S = 1+(int) (15.0*rand()/(RAND_MAX+1.0));
- sleep(S);
- MESSAGE( "Adder_Impl::AddAndCompare( " << x << " , " << y << " , " << z
- << " ) returns " << -(x - y) << " after " << S << " seconds" )
- LastAddition = z ;
- double ValFunc ;
- sendMessage(NOTIF_TRACE, "Adder_Impl::AddAndCompare will call anOtherAdder->LastValue()");
- double RetVal ;
- anOtherAdder->LastResult( RetVal ) ;
- if ( RetVal > 0 ) {
- ValFunc = (x - y) ;
- }
- else {
- ValFunc = -(x - y) ;
- }
- sendMessage(NOTIF_TRACE, "Adder_Impl::AddAndCompare has called anOtherAdder->LastValue()");
- sendMessage(NOTIF_STEP, "Adder_Impl::AddAndCompare is Finished");
- endService( " Adder_Impl::AddAndCompare" );
- return ValFunc ;
-}
-
-void Adder_Impl::SetLastResult( double z ) {
- beginService( " Adder_Impl::SetLastResult" );
- sendMessage(NOTIF_STEP, "Adder_Impl::SetLastResult is Computing");
- int S;
- S = 1+(int) (15.0*rand()/(RAND_MAX+1.0));
- sleep(S);
- LastAddition = z ;
- endService( " Adder_Impl::SetLastResult" );
- return ;
-}
-
-void Adder_Impl::LastResult( double & z ) {
- beginService( " Adder_Impl::LastResult" );
- sendMessage(NOTIF_STEP, "Adder_Impl::LastResult is Computing");
- int S;
- S = 1+(int) (15.0*rand()/(RAND_MAX+1.0));
- sleep(S);
- z = LastAddition ;
- endService( " Adder_Impl::LastResult" );
- return ;
-}
-
-
char * NodeInfo( const char * aNodeName ) ;
bool LoadDataFlow( const GraphBase::SGraph * aDataFlow ) ;
- bool LoadXml( const char * myFileName ) ;
+// bool LoadXml( const char * myFileName ) ;
+ bool LoadXml( const char * myFileName , GraphBase::ListOfSGraphs & aListOfDataFlows ) ;
bool LoadInfo( const GraphBase::SNode &aDataFlowInfo ) ;
bool SaveXml(const char * myFileName ) ;
// void DateModification() ;
- GraphBase::SGraph * GetDataFlow() ;
+ GraphBase::ListOfSGraphs * GetDataFlows() ;
GraphBase::SNode * GetInfo() const ;
- GraphBase::ListOfNodes * GetNodes() const ;
- GraphBase::ListOfLinks * GetLinks() const ;
- GraphBase::ListOfGraphs * GetGraphs() const ;
- GraphBase::ListOfLinks * GetDatas() const ;
+ GraphBase::ListOfSNodes * GetNodes() const ;
+ GraphBase::ListOfSLinks * GetLinks() const ;
+ GraphBase::ListOfSGraphs * GetGraphs() const ;
+ GraphBase::ListOfSLinks * GetDatas() const ;
const SALOME_ModuleCatalog::Service * GetService() ;
GraphEditor::InNode * AddService (
bool HasInput(const char * ToServiceParameterName ) ;
- bool AddLinkValue( const char * FromNodeName ,
- const char * FromServiceParameterName ,
- const char * ToNodeName ,
- const char * ToServiceParameterName ,
- const CORBA::Any aValue ) {
- return AddLink( FromNodeName, FromServiceParameterName , ToNodeName ,
- ToServiceParameterName , aValue ) ; } ;
+// bool AddLinkValue( const char * FromNodeName ,
+// const char * FromServiceParameterName ,
+// const char * ToNodeName ,
+// const char * ToServiceParameterName ,
+// const CORBA::Any aValue ) {
+// return AddLinkValue( FromNodeName, FromServiceParameterName , ToNodeName ,
+// ToServiceParameterName , aValue ) ; } ;
bool AddLink( const char * FromNodeName ,
const char * FromServiceParameterName ,
const char * ToNodeName ,
- const char * ToServiceParameterName ,
- const CORBA::Any aValue = CORBA::Any() ) ;
+ const char * ToServiceParameterName ) ;
bool RemoveLink( const char * FromNodeName ,
const char * FromServiceParameterName ,
bool AddInputData( const char * ToNodeName ,
const char * ToParameterName ,
const CORBA::Any aValue = CORBA::Any() ) ;
- bool AddInputSharedData( const char * ToNodeName1 ,
- const char * ToParameterName1 ,
- const char * ToNodeName2 ,
- const char * ToParameterName2 ) ;
const CORBA::Any * GetInData( const char * ToNodeName ,
const char * ToParameterName ) ;
bool IsValid() ;
bool IsExecutable() ;
+ void Executing() ;
bool IsExecuting() ;
+ void Editing() ;
bool IsEditing() ;
void EditedAfterExecution(bool EditedAfterExecution ) ;
bool EditedAfterExecution() ;
return CORBA::string_dup( s.str().c_str() );
}
-inline bool GraphEditor::DataFlow::LoadDataFlow( const GraphBase::SGraph *aDataFlow ) {
+inline bool GraphEditor::DataFlow::LoadDataFlow( const GraphBase::SGraph * aDataFlow ) {
if ( _ReadOnly )
return false ;
_EditedAfterExecution = true ;
return GraphEditor::OutNode::LoadDataFlow( aDataFlow ) ;
} ;
-inline bool GraphEditor::DataFlow::LoadXml( const char* myFileName ) {
+inline bool GraphEditor::DataFlow::LoadXml( const char* myFileName ,
+ GraphBase::ListOfSGraphs & aListOfDataFlows ) {
if ( _ReadOnly )
return false ;
_EditedAfterExecution = true ;
- return GraphEditor::OutNode::LoadXml( myFileName ) ;
+ return GraphEditor::OutNode::LoadXml( myFileName , aListOfDataFlows ) ;
} ;
inline bool GraphEditor::DataFlow::LoadInfo( const GraphBase::SNode &aDataFlowInfo ) {
} ;
// get all DataFlow informations (for a .XML file) :
-inline GraphBase::SGraph * GraphEditor::DataFlow::GetDataFlow() {
- return GraphEditor::OutNode::GetDataFlow() ;
+inline GraphBase::ListOfSGraphs * GraphEditor::DataFlow::GetDataFlows() {
+ GraphBase::ListOfSGraphs * aListOfDataFlows = new GraphBase::ListOfSGraphs;
+ return GraphEditor::OutNode::GetDataFlows( aListOfDataFlows ) ;
} ;
// void DateModification() ;
// return GraphEditor::OutNode::GetInfo() ;
//} ;
-inline GraphBase::ListOfNodes * GraphEditor::DataFlow::GetNodes() const {
+inline GraphBase::ListOfSNodes * GraphEditor::DataFlow::GetNodes() const {
return Graph()->GetNodes() ;
} ;
-inline GraphBase::ListOfLinks * GraphEditor::DataFlow::GetLinks() const {
+inline GraphBase::ListOfSLinks * GraphEditor::DataFlow::GetLinks() const {
return Graph()->GetLinks() ;
} ;
-inline GraphBase::ListOfGraphs * GraphEditor::DataFlow::GetGraphs() const {
+inline GraphBase::ListOfSGraphs * GraphEditor::DataFlow::GetGraphs() const {
return Graph()->GetGraphs() ;
} ;
-inline GraphBase::ListOfLinks * GraphEditor::DataFlow::GetDatas() const {
+inline GraphBase::ListOfSLinks * GraphEditor::DataFlow::GetDatas() const {
return Graph()->GetDatas() ;
} ;
NodeComment , NodeX , NodeY ) ;
// MESSAGE( "<-- GraphEditor::DataFlow::AddNode( " << aNode->Name() << " )" ) ;
// cout << "<-- GraphEditor::DataFlow::AddNode( " << aNode->Name() << " )" << endl ;
- cdebug_out << "GraphEditor::DataFlow::AddNode( " << aNode->Name() << " )" << endl ;
+ cdebug_out << "GraphEditor::DataFlow::AddNode( " ;
+ if ( aNode ) {
+ cdebug << aNode->Name() << " )" ;
+ }
+ else {
+ cdebug << "NULL ) Node not created" ;
+ }
+ cdebug << endl ;
return aNode ;
} ;
inline bool GraphEditor::DataFlow::AddLink( const char* FromNodeName ,
const char* FromServiceParameterName ,
const char* ToNodeName ,
- const char* ToServiceParameterName ,
- const CORBA::Any aValue ) {
+ const char* ToServiceParameterName ) {
+// , const CORBA::Any aValue ) {
if ( !_ReadOnly ) {
GraphEditor::InNode * aFromNode = GetNode( FromNodeName ) ;
if ( aFromNode ) {
- GraphBase::OutPort * anOutPort = aFromNode->GetChangeOutPort( FromServiceParameterName ) ;
- if ( anOutPort ) {
- CORBA::Any const * theValue = anOutPort->Value() ; // Keep the type !
+// GraphBase::OutPort * anOutPort = aFromNode->GetChangeOutPort( FromServiceParameterName ) ;
+// if ( anOutPort ) {
+// CORBA::Any const * theValue = anOutPort->Value() ; // Keep the type !
_EditedAfterExecution = true ;
return GraphEditor::OutNode::AddLink( FromNodeName ,
FromServiceParameterName ,
ToNodeName ,
- ToServiceParameterName ,
- *theValue ) ;
- }
+ ToServiceParameterName ) ;
+// , *theValue ) ;
+// }
}
}
return false ;
inline bool GraphEditor::DataFlow::AddInputData( const char* ToNodeName ,
const char* ToParameterName ,
const CORBA::Any aValue ) {
-#if 0
- GraphBase::Node *toNode ;
- GraphBase::InPort *toPort ;
- char *aNode ;
- char *aPort ;
- NodePort( ToNodeName , ToParameterName , &aNode , &aPort ) ;
- toNode = GetChangeGraphNode( aNode ) ;
- if ( toNode ) {
- toPort = toNode->GetChangeInPort( aPort ) ;
- if ( toPort && ( toPort->IsConnected() ||
- toPort->IsDataConnected() ) ) {
- RemoveLink( toNode->Name() , toPort->PortName() ) ;
- }
- }
- else {
- toPort = NULL ;
- }
- delete aNode ;
- delete aPort ;
-#endif
if ( !IsValid() ) {
return false ;
}
return Graph()->AddInputData( ToNodeName , ToParameterName , aValue ) ;
} ;
-inline bool GraphEditor::DataFlow::AddInputSharedData(const char* ToNodeName1 ,
- const char* ToParameterName1 ,
- const char* ToNodeName2 ,
- const char* ToParameterName2 ) {
- if ( !IsValid() ) {
- return false ;
- }
- return GraphEditor::OutNode::AddInputData( ToNodeName1 , ToParameterName1 ,
- ToNodeName2 , ToParameterName2 ) ;
-} ;
-
inline const CORBA::Any *GraphEditor::DataFlow::GetInData(
const char * ToNodeName ,
const char * ToParameterName ) {
return GraphEditor::OutNode::IsExecutable() ;
}
+inline void GraphEditor::DataFlow::Executing() {
+ cdebug << "Executing _Executing = true " << endl ;
+ _Executing = true ;
+}
+
inline bool GraphEditor::DataFlow::IsExecuting() {
+#if 0
+ //cout << " +++++> Old!" << endl;
if ( _DataFlowExecutor ) {
if ( _DataFlowExecutor->IsDone() ) {
_Executing = false ;
else {
_Executing = false ;
}
+#endif
+// cdebug << "GraphEditor::DataFlow::IsExecuting _Executing " << _Executing << " DataFlowExecutor " << _DataFlowExecutor ;
+ if ( _DataFlowExecutor ) {
+ cdebug << " IsDone " << _DataFlowExecutor->IsDone() << " State " << _DataFlowExecutor->State() ;
+ }
+ cdebug << endl ;
+// cout << "+++++++++++++> _Executing = " << _Executing << " _DataFlowExecutor = " << _DataFlowExecutor << endl;
+ if ( _Executing && _DataFlowExecutor ) {
+ if ( _DataFlowExecutor->IsDone() ) {
+ _Executing = false ;
+ }
+ }
return _Executing ;
}
+inline void GraphEditor::DataFlow::Editing() {
+ cdebug << "Editing _Executing = false " << endl ;
+ _Executing = false ;
+}
+
inline bool GraphEditor::DataFlow::IsEditing() {
return !IsExecuting() ;
}
inline void GraphEditor::DataFlow::Executor(
GraphExecutor::DataFlow * DataFlowExecutor ) {
- _Executing = true ;
+// _Executing = true ;
_DataFlowExecutor = DataFlowExecutor ;
}
GraphEditor::InNode::InNode() {
}
+#if 0
+GraphEditor::InNode::InNode(GraphBase::GOTONode * aGOTONode ) {
+ _ComputingNode = aGOTONode ;
+ _GOTONode = aGOTONode ;
+}
+#endif
+
//ostream * fdebug = NULL ;
GraphEditor::InNode::InNode( CORBA::ORB_ptr ORB,
SALOME_NamingService * ptrNamingService ,
const char * NodeComputer ,
const char * NodeComment ,
const bool GeneratedName ,
- const int X ,
- const int Y ,
+ const int NodeX ,
+ const int NodeY ,
int * Graph_prof_debug,
ofstream * Graph_fdebug) {
SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ;
NodeLastModification ,
NodeEditorRelease , NodeAuthor ,
NodeComment , GeneratedName ,
- X , Y ,
+ NodeX , NodeY ,
Graph_prof_debug , Graph_fdebug ) ;
break ;
}
NodeLastModification ,
NodeEditorRelease , NodeAuthor ,
NodeComputer , NodeComment ,
- GeneratedName , X , Y ,
+ GeneratedName , NodeX , NodeY ,
Graph_prof_debug , Graph_fdebug ) ;
// cout << "GraphEditor::InNode::InNode SUPERV::FactoryNode : " << NodeName << endl ;
_ComputingNode = (GraphBase::ComputingNode *) _FactoryNode ;
NodeFirstCreation , NodeLastModification ,
NodeEditorRelease , NodeAuthor ,
NodeComment , GeneratedName ,
- X , Y ,
+ NodeX , NodeY ,
Graph_prof_debug , Graph_fdebug ) ;
_ComputingNode = (GraphBase::ComputingNode *) _InLineNode ;
break ;
}
+ case SUPERV::MacroNode : {
+ cdebug << "GraphEditor::InNode::InNode SUPERV::MacroNode : " << NodeName << endl ;
+ _GraphMacroNode = new GraphBase::Graph( ORB , ptrNamingService ,
+// aFuncName[0].c_str() , *aPythonFunction[0] ,
+ NodeName ,
+ akind ,
+// NodeFirstCreation , NodeLastModification ,
+// NodeEditorRelease , NodeAuthor ,
+// NodeComment , GeneratedName ,
+// NodeX , NodeY ,
+ Graph_prof_debug , Graph_fdebug ) ;
+ _ComputingNode = (GraphBase::ComputingNode *) _GraphMacroNode ;
+ _InLineNode = (GraphBase::InLineNode *) _ComputingNode ;
+ _GOTONode = (GraphBase::GOTONode *) _InLineNode ;
+ _GraphMacroNode->Coordinates( NodeX , NodeY ) ;
+ break ;
+ }
case SUPERV::GOTONode : {
cdebug << "GraphEditor::InNode::InNode SUPERV::GOTONode : " << NodeName << endl ;
_GOTONode = new GraphBase::GOTONode( ORB , ptrNamingService ,
NodeFirstCreation , NodeLastModification ,
NodeEditorRelease , NodeAuthor ,
NodeComment , GeneratedName ,
- X , Y ,
+ NodeX , NodeY ,
Graph_prof_debug , Graph_fdebug ) ;
_ComputingNode = (GraphBase::ComputingNode *) _GOTONode ;
_InLineNode = (GraphBase::InLineNode *) _ComputingNode ;
NodeFirstCreation , NodeLastModification ,
NodeEditorRelease , NodeAuthor ,
NodeComment , GeneratedName ,
- X , Y ,
+ NodeX , NodeY ,
Graph_prof_debug , Graph_fdebug ) ;
_ComputingNode = (GraphBase::ComputingNode *) _LoopNode ;
_GOTONode = (GraphBase::GOTONode *) _ComputingNode ;
NodeFirstCreation , NodeLastModification ,
NodeEditorRelease , NodeAuthor ,
NodeComment , GeneratedName ,
- X , Y ,
+ NodeX , NodeY ,
Graph_prof_debug , Graph_fdebug ) ;
_ComputingNode = (GraphBase::ComputingNode *) _EndOfLoopNode ;
_GOTONode = (GraphBase::GOTONode *) _ComputingNode ;
NodeFirstCreation , NodeLastModification ,
NodeEditorRelease , NodeAuthor ,
NodeComment , GeneratedName ,
- X , Y ,
+ NodeX , NodeY ,
Graph_prof_debug , Graph_fdebug ) ;
_ComputingNode = (GraphBase::ComputingNode *) _SwitchNode ;
_GOTONode = (GraphBase::GOTONode *) _ComputingNode ;
NodeFirstCreation , NodeLastModification ,
NodeEditorRelease , NodeAuthor ,
NodeComment , GeneratedName ,
- X , Y ,
+ NodeX , NodeY ,
Graph_prof_debug , Graph_fdebug ) ;
_ComputingNode = (GraphBase::ComputingNode *) _EndOfSwitchNode ;
_GOTONode = (GraphBase::GOTONode *) _ComputingNode ;
#ifndef _DATAFLOWEDITOR_INNODE_HXX
#define _DATAFLOWEDITOR_INNODE_HXX
+#include "DataFlowBase_Graph.hxx"
#include "DataFlowBase_FactoryNode.hxx"
#include "DataFlowBase_GOTONode.hxx"
#include "DataFlowBase_LoopNode.hxx"
GraphBase::EndOfLoopNode * _EndOfLoopNode ;
GraphBase::SwitchNode * _SwitchNode ;
GraphBase::EndOfSwitchNode * _EndOfSwitchNode ;
+ GraphBase::Graph * _GraphMacroNode ;
public:
InNode() ;
+// InNode(GraphBase::GOTONode * aGOTONode ) ;
InNode( CORBA::ORB_ptr ORB,
SALOME_NamingService* ptrNamingService ,
GraphBase::ListOfFuncName aFuncName ,
return _ComputingNode->IsOneOfInLineNodes() ; } ;
const bool IsOneOfGOTONodes() const {
return _ComputingNode->IsOneOfGOTONodes() ; } ;
+ const bool IsMacroNode() const {
+ return _ComputingNode->IsMacroNode() ; } ;
const bool IsDataFlowNode() const {
return _ComputingNode->IsDataFlowNode() ; } ;
const bool IsDataStreamNode() const {
return _SwitchNode ; } ;
GraphBase::EndOfSwitchNode * EndOfSwitchNode() {
return _EndOfSwitchNode ; } ;
+ GraphBase::Graph * GraphMacroNode() {
+ return _GraphMacroNode ; } ;
SUPERV::CNode_var ObjRef() const { return _ComputingNode->ObjRef() ; } ;
void SetObjRef(SUPERV::CNode_var aNode) {
_ComputingNode->SetObjRef( aNode ) ; } ;
+ Graph_Impl * ObjImpl() const { return _GraphMacroNode->ObjImpl() ; } ;
+ void SetObjImpl( Graph_Impl * aGraph ) {
+ _GraphMacroNode->SetObjImpl( aGraph ) ; } ;
+
const SALOME_ModuleCatalog::Service * GetService() const {
return _ComputingNode->GetService() ; } ;
using namespace std;
#include <sstream>
#include <iostream>
+#include "DataFlowEditor_DataFlow.hxx"
#include "DataFlowEditor_OutNode.hxx"
#include "DataFlowBase_EndOfLoopNode.hxx"
#include "DataFlowBase_EndOfSwitchNode.hxx"
+#include "DataFlowExecutor_DataFlow.hxx"
+extern GraphExecutor::FiniteStateMachine * theAutomaton ;
+
// Implementation de la classe GraphEditor::Graph
GraphEditor::OutNode::OutNode() {
// Graph() {
cdebug_in << "GraphEditor::OutNode::OutNode()" << endl;
+ _Graph = NULL ;
_Imported = false ;
_Valid = false ;
_Executable = false ;
const char * DebugFileName ,
const SUPERV::KindOfNode aKindOfNode ) {
// Graph( ORB , ptrNamingService , DataFlowName , DebugFileName ) {
+ _Graph = NULL ;
Set_prof_debug( ORB , DebugFileName ) ;
cdebug_in << "GraphEditor::OutNode::OutNode(" ;
if ( DataFlowName ) {
if ( aKindOfNode == SUPERV::DataFlowGraph ) {
_StreamGraph = NULL ;
// _Graph = new GraphBase::Graph( ORB , ptrNamingService , DataFlowName , DebugFileName ) ;
- _Graph = new GraphBase::Graph( ORB , ptrNamingService , DataFlowName ,
+ _Graph = new GraphBase::Graph( ORB , ptrNamingService , DataFlowName , aKindOfNode ,
_prof_debug , _fdebug ) ;
}
else if ( aKindOfNode == SUPERV::DataStreamGraph ) {
// _StreamGraph = new GraphBase::StreamGraph( ORB , ptrNamingService , DataFlowName , DebugFileName ) ;;
- _StreamGraph = new GraphBase::StreamGraph( ORB , ptrNamingService , DataFlowName ,
+ _StreamGraph = new GraphBase::StreamGraph( ORB , ptrNamingService , DataFlowName , aKindOfNode ,
_prof_debug , _fdebug ) ;
_Graph = _StreamGraph ;
}
+// if ( aKindOfNode == SUPERV::DataFlowGraph || aKindOfNode == SUPERV::DataStreamGraph ) {
+// theAutomaton->MapGraph( _Graph , _Graph->Name() ) ;
+// }
_Orb = CORBA::ORB::_duplicate( ORB ) ;
_Imported = false ;
_Valid = false ;
// DataFlowFirstCreation , DataFlowLastModification ,
// DataFlowEditorRelease , DataFlowAuthor ,
// DataFlowComputer , DataFlowComment , DebugFileName ) {
+ _Graph = NULL ;
Set_prof_debug( ORB , DebugFileName ) ;
if ( DataFlowkind == SUPERV::DataFlowGraph ) {
// DataFlowComputer , DataFlowComment , DebugFileName ) ;
_Graph = _StreamGraph ;
}
+// if ( DataFlowkind == SUPERV::DataFlowGraph || DataFlowkind == SUPERV::DataStreamGraph ) {
+// theAutomaton->MapGraph( _Graph , _Graph->Name() ) ;
+// }
_Orb = CORBA::ORB::_duplicate( ORB ) ;
_Imported = false ;
_Valid = false ;
} ;
GraphEditor::OutNode::~OutNode() {
+// theAutomaton->EraseGraph( Graph->Name() ) ;
// delete _DataFlowNode ;
// delete _DataFlowDatas ;
// delete _GT ;
}
+bool GraphEditor::OutNode::Name( const char * aName ) {
+ bool RetVal = false ;
+ if ( !theAutomaton->GraphName( aName ) ) {
+ char * aGraphName = Graph()->Name() ;
+ RetVal = Graph()->Name( aName ) ;
+ if ( RetVal ) {
+ theAutomaton->EraseGraph( aGraphName ) ;
+ theAutomaton->MapGraph( Graph() , aName ) ;
+ }
+ }
+ return RetVal ;
+}
+
void GraphEditor::OutNode::Set_prof_debug( CORBA::ORB_ptr ORB ,
const char * DebugFileName ) {
_Graph_prof_debug = 0 ;
}
}
-bool GraphEditor::OutNode::LoadDataFlow( const GraphBase::SGraph *aDataFlow ) {
+bool GraphEditor::OutNode::LoadDataFlow( const GraphBase::SGraph * aDataFlow ) {
bool RetVal = false ;
- cdebug_in << "GraphEditor::OutNode::LoadDataFlow() " << aDataFlow->Info.theName.c_str()
+ cdebug_in << "GraphEditor::OutNode::LoadDataFlow() " << (*aDataFlow).Info.theName.c_str()
<< " GraphNodesSize " << Graph()->GraphNodesSize() << endl;
if ( !_Imported ) {
- RetVal = LoadInfo( aDataFlow->Info ) ;
+ RetVal = LoadInfo( (*aDataFlow).Info ) ;
_Imported = true ;
}
- else if ( Graph()->IsDataStreamNode() || aDataFlow->Info.theKind == SUPERV::DataFlowGraph ) {
+ else if ( Graph()->IsDataStreamNode() || (*aDataFlow).Info.theKind == SUPERV::DataFlowGraph ) {
RetVal = true ;
}
cdebug << "GraphEditor::OutNode::LoadDataFlow() _Imported " << _Imported << " RetVal " << RetVal << endl;
map< string , int > aMapOfNodes ;
if ( RetVal ) {
cdebug << "GraphEditor::OutNode::LoadDataFlow() LoadNodes GraphNodesSize " << Graph()->GraphNodesSize() << endl;
- RetVal = LoadNodes( aMapOfNodes , aDataFlow->Nodes ) ;
+ RetVal = LoadNodes( aMapOfNodes , (*aDataFlow).Nodes ) ;
}
if ( RetVal ) {
cdebug << "GraphEditor::OutNode::LoadDataFlow() LoadLinks GraphNodesSize " << Graph()->GraphNodesSize() << endl;
- RetVal = LoadLinks( aMapOfNodes , aDataFlow->Links ) ;
+ RetVal = LoadLinks( aMapOfNodes , (*aDataFlow).Links ) ;
}
if ( RetVal ) {
Valid() ;
cdebug << "GraphEditor::OutNode::LoadDataFlow() LoadDatas GraphNodesSize " << Graph()->GraphNodesSize() << endl;
- RetVal = LoadDatas( aMapOfNodes , aDataFlow->Datas ) ;
+ RetVal = LoadDatas( aMapOfNodes , (*aDataFlow).Datas ) ;
}
cdebug_out << "GraphEditor::OutNode::LoadDataFlow done GraphNodesSize " << Graph()->GraphNodesSize() << endl;
return RetVal ;
}
+bool GraphEditor::OutNode::LoadXml( const char* myFileName , GraphBase::ListOfSGraphs & aListOfDataFlows ) {
+ bool RetVal = false ;
+// GraphBase::ListOfSGraphs aListOfDataFlows ;
+ if ( myFileName == NULL ) {
+ cdebug << "GraphEditor::OutNode::LoadXml() No file" << endl;
+ _Imported = true ;
+ char * aDataFlowName = Graph()->Name() ;
+ Name( theAutomaton->GraphInstanceName( Graph()->Name() ).c_str() ) ;
+ theAutomaton->MapGraph( Graph() , Graph()->Name() ) ;
+ cdebug << "GraphEditor::OutNode::LoadXml() " << aDataFlowName << " --> " << Graph()->Name() << endl;
+ RetVal = true ;
+ }
+ else {
+ cdebug_in << "GraphEditor::OutNode::LoadXml() " << myFileName << endl;
+ RetVal = Graph()->LoadXml( _Orb , myFileName , aListOfDataFlows ) ;
+// RetVal = LoadDataFlows( &aListOfDataFlows ) ;
+ cdebug_out << "GraphEditor::OutNode::LoadXml " << RetVal << " " << aListOfDataFlows.size()
+ << " Graphs" << endl;
+ }
+ return RetVal ;
+}
+
+#if 0
bool GraphEditor::OutNode::LoadXml( const char* myFileName ) {
bool RetVal = false ;
- GraphBase::SGraph aDataFlow ;
+ GraphBase::ListOfSGraphs aListOfDataFlows ;
if ( myFileName == NULL ) {
cdebug << "GraphEditor::OutNode::LoadXml() No file" << endl;
_Imported = true ;
RetVal = true ;
}
- else if ( Graph()->LoadXml( _Orb , myFileName , aDataFlow ) ) {
+ else if ( Graph()->LoadXml( _Orb , myFileName , aListOfDataFlows ) ) {
cdebug_in << "GraphEditor::OutNode::LoadXml() " << myFileName << endl;
- RetVal = LoadDataFlow( &aDataFlow ) ;
+ RetVal = LoadDataFlows( &aListOfDataFlows ) ;
cdebug_out << "GraphEditor::OutNode::LoadXml " << RetVal << endl;
}
return RetVal ;
-}
+}
+#endif
bool GraphEditor::OutNode::LoadInfo(const GraphBase::SNode &aDataFlowInfo ) {
bool RetVal = false ;
cdebug_in << "GraphEditor::OutNode::LoadInfo " << aDataFlowInfo.theName.c_str()
<< endl ;
-// MESSAGE( "GraphEditor::OutNode::LoadDataFlow" );
+// MESSAGE( "GraphEditor::OutNode::LoadInfo" );
// ComponentName( aDataFlowInfo.theComponentName.c_str() ) ;
// InterfaceName( aDataFlowInfo.theInterfaceName.c_str() ) ;
if ( Graph()->IsDataStreamNode() || aDataFlowInfo.theKind == SUPERV::DataFlowGraph ) {
- Graph()->Name( aDataFlowInfo.theName.c_str() ) ;
-// Graph()->Kind( aDataFlowInfo.theKind ) ;
- cdebug << "GraphEditor::OutNode::LoadInfo aDataFlowInfo.Kind " << aDataFlowInfo.theKind
- << " Kind() " << Graph()->Kind() << endl ;
+ char * aDataFlowName = Graph()->Name() ;
+ Graph()->Name( theAutomaton->GraphInstanceName( aDataFlowInfo.theName.c_str() ).c_str() ) ;
+ theAutomaton->MapGraph( Graph() , Graph()->Name() ) ;
+ cdebug << "GraphEditor::OutNode::LoadInfo " << aDataFlowName << " --> " << Graph()->Name()
+ << " aDataFlowInfo.Kind " << aDataFlowInfo.theKind << " Kind() " << Graph()->Kind() << endl ;
if ( Graph()->IsDataStreamNode() ) {
Graph()->Kind( SUPERV::DataStreamGraph ) ;
StreamGraph()->SetStreamParams( aDataFlowInfo.theTimeout , aDataFlowInfo.theDataStreamTrace , aDataFlowInfo.theDeltaTime ) ;
}
bool GraphEditor::OutNode::LoadNodes(map< string , int > & aMapOfNodes ,
- const GraphBase::ListOfNodes &aListOfNodes ) {
+ const GraphBase::ListOfSNodes &aListOfNodes ) {
GraphEditor::InNode * anInNode ;
cdebug_in << "GraphEditor::OutNode::LoadNodes " << endl ;
int i ;
for ( i = 0 ; i < (int ) aListOfNodes.size() ; i++ ) {
GraphBase::SNode aNode = aListOfNodes[ i ] ;
const char * aNodeName = aNode.theName.c_str() ;
- cout << "GraphEditor::OutNode::LoadNodes " << aNodeName << " "
- << aNode.theListOfInDataStreams.size() << " InDataStreams "
- << aNode.theListOfOutDataStreams.size() << " OutDataStreams "
- << " _prof_debug " << _prof_debug << endl ;
+// cout << "GraphEditor::OutNode::LoadNodes " << aNodeName << " "
+// << aNode.theService.ServiceinParameter.length() << " InParameters "
+// << aNode.theService.ServiceoutParameter.length() << " OutParameters "
+// << aNode.theListOfInDataStreams.size() << " InDataStreams "
+// << aNode.theListOfOutDataStreams.size() << " OutDataStreams "
+// << " _prof_debug " << _prof_debug << endl ;
cdebug << "GraphEditor::OutNode::LoadNodes " << aNodeName << " "
+ << aNode.theService.ServiceinParameter.length() << " InParameters "
+ << aNode.theService.ServiceoutParameter.length() << " OutParameters "
<< aNode.theListOfInDataStreams.size() << " InDataStreams "
<< aNode.theListOfOutDataStreams.size() << " OutDataStreams "
<< endl ;
aNode.theCoords.theX , aNode.theCoords.theY ) ;
string * aNodetheName = new string( aNode.theName ) ;
aMapOfNodes[ *aNodetheName ] = Graph()->GetGraphNodeIndex( anInNode->Name() ) ;
- if ( anInNode->IsOneOfInLineNodes() ) {
+ if ( anInNode->IsOneOfInLineNodes() || anInNode->IsMacroNode() ) {
anInNode->GraphEditor::InNode::InLineNode()->DefPortsOfNode(
_Orb , aNode.theService , anInNode->NamePtr() ,
anInNode->Kind() ,
aLNode->SetNextPythonFunction( aNode.theListOfFuncName[ 2 ].c_str() ,
*aNode.theListOfPythonFunctions[ 2 ] ) ;
}
- else if ( aINode->IsInLineNode() || aINode->IsGOTONode() ||
+ else if ( aINode->IsMacroNode() || aINode->IsInLineNode() || aINode->IsGOTONode() ||
aINode->IsSwitchNode() || aINode->IsEndSwitchNode() ) {
aINode->SetPythonFunction( aNode.theListOfFuncName[ 0 ].c_str() ,
*aNode.theListOfPythonFunctions[ 0 ] ) ;
if ( anInNode->IsOneOfGOTONodes() && strlen( aNode.theCoupledNode.c_str() ) ) {
GraphBase::GOTONode * aCoupledNode ;
aCoupledNode = (GraphBase::GOTONode * ) Graph()->GetGraphNode( aNode.theName.c_str() ) ;
- aCoupledNode->CoupledNode( (GraphBase::GOTONode * ) Graph()->GetChangeGraphNode( aNode.theCoupledNode.c_str() ) ) ;
+ GraphBase::GOTONode * aCoupledCoupledNode ;
+ aCoupledCoupledNode = (GraphBase::GOTONode * ) Graph()->GetChangeGraphNode( aNode.theCoupledNode.c_str() ) ;
+ if ( aCoupledCoupledNode != NULL ) {
+ aCoupledNode->CoupledNode( aCoupledCoupledNode ) ;
+ }
+ else {
+ aCoupledNode->CoupledNodeName( aNode.theCoupledNode.c_str() ) ;
+ }
}
}
cdebug_out << "GraphEditor::OutNode::LoadNodes" << endl ;
}
bool GraphEditor::OutNode::LoadLinks(map< string , int > & aMapOfNodes ,
- const GraphBase::ListOfLinks &aListOfLinks ) {
+ const GraphBase::ListOfSLinks &aListOfLinks ) {
bool RetVal = true ;
cdebug_in << "GraphEditor::OutNode::LoadLinks" << endl ;
// MESSAGE( "GraphEditor::OutNode::LoadLinks" );
<< aLink.ToServiceParameterName.c_str() << " )" << endl ;
if ( Graph()->GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] ) &&
Graph()->GetGraphNode( aMapOfNodes[ aLinkToNodeName->c_str() ] ) ) {
- GraphBase::ComputingNode * aFromNode = (GraphBase::ComputingNode * ) Graph()->GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] ) ;
- const GraphBase::OutPort * anOutPort = aFromNode->GetOutPort( aLink.FromServiceParameterName.c_str() ) ;
+// GraphBase::ComputingNode * aFromNode = (GraphBase::ComputingNode * ) Graph()->GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] ) ;
+// const GraphBase::OutPort * anOutPort = aFromNode->GetOutPort( aLink.FromServiceParameterName.c_str() ) ;
RetVal = AddLink( Graph()->GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] )->Name() ,
- aLink.FromServiceParameterName.c_str() ,
- Graph()->GetGraphNode( aMapOfNodes[ aLinkToNodeName->c_str() ] )->Name() ,
- aLink.ToServiceParameterName.c_str() ,
- *anOutPort->Value() ) ;
+ aLink.FromServiceParameterName.c_str() ,
+ Graph()->GetGraphNode( aMapOfNodes[ aLinkToNodeName->c_str() ] )->Name() ,
+ aLink.ToServiceParameterName.c_str() ) ;
+// , *anOutPort->Value() ) ;
}
else {
RetVal = false ;
}
bool GraphEditor::OutNode::LoadDatas(map< string , int > & aMapOfNodes ,
- const GraphBase::ListOfLinks &aListOfDatas ) {
+ const GraphBase::ListOfSLinks &aListOfDatas ) {
bool RetVal = true ;
cdebug_in << "GraphEditor::OutNode::LoadDatas" << endl ;
// MESSAGE( "GraphEditor::OutNode::LoadDatas" );
int i ;
for ( i = 0 ; i < (int ) aListOfDatas.size() ; i++ ) {
GraphBase::SLink aLink = aListOfDatas[ i ] ;
- if ( !strcmp( aLink.FromNodeName.c_str() , Graph()->Name() ) ) {
- cdebug << "GraphEditor::OutNode::LoadDatas Warning "
- << aLink.FromNodeName.c_str()
- << " and " << aLink.ToNodeName.c_str() << " differents from " << Graph()->Name()
- << endl ;
- }
+ cdebug << "OutNode::LoadDatas " << i << aLink.FromNodeName.c_str() << "(" << aLink.FromServiceParameterName
+ << ") --> " << aLink.ToNodeName.c_str() << "(" << aLink.ToServiceParameterName << ") CORBA::tk_xxx "
+ << aLink.aLinkValue.type()->kind() << endl ;
string * aLinkFromNodeName = new string( aLink.FromNodeName.c_str() ) ;
string * aLinkToNodeName = new string( aLink.ToNodeName.c_str() ) ;
// cout << "LoadDatas " << aLink.FromNodeName.c_str() << " "
cdebug_in << "GraphEditor::OutNode::SaveXml(" << filename << ")" << endl;
ofstream f(filename);
IsValid() ;
-// test = SaveXML( f );
- QDomDocument Graph ;
- test = SaveXML( Graph );
- if ( test ) {
- QString xml = Graph.toString() ;
+ QDomDocument DomGraph ;
+ QDomElement Domsupergraph ;
+ cdebug << "OutNode::SaveXML("<< filename << ") ---> OutNode::SaveXML( ostream & f , QDomDocument & , true "
+ << " , QDomElement & ) " << Graph()->Name() << endl ;
+ test = SaveXML( f , DomGraph , true , Domsupergraph );
+ QString xml = DomGraph.toString() ;
+ f << xml << endl ;
+
+ cdebug << "OutNode::SaveXML("<< filename << ") done" << endl ;
+// if ( test ) {
+// QString xml = Graph.toString() ;
// cout << "GraphEditor::OutNode::SaveXML " << xml << endl ;
- f << xml << endl ;
- }
+// f << xml << endl ;
+// }
cdebug_out << "GraphEditor::OutNode::SaveXml" << endl;
return test;
}
cdebug_in << "GraphEditor::OutNode::SavePy(" << filename << ")" << endl;
ofstream f( filename ) ;
IsValid() ;
- test = SavePY( f );
+ test = SavePY( f , true );
+ f << endl << Graph()->Name() << " = Def" << Graph()->Name() << "()" << endl ;
cdebug_out << "GraphEditor::OutNode::SavePy" << endl;
return test;
}
-GraphBase::SGraph * GraphEditor::OutNode::GetDataFlow() {
- GraphBase::SGraph * aDataFlow = new GraphBase::SGraph;
+GraphBase::ListOfSGraphs * GraphEditor::OutNode::GetDataFlows( GraphBase::ListOfSGraphs * aListOfDataFlows ) {
+// GraphBase::ListOfSGraphs * aListOfDataFlows = new GraphBase::ListOfSGraphs;
+ int index = aListOfDataFlows->size() ;
+ aListOfDataFlows->resize( index + 1 ) ;
if ( Graph()->IsDataFlowNode() ) {
- aDataFlow->Info = *Graph()->GetInfo() ;
- aDataFlow->Nodes = *Graph()->GetNodes() ;
- aDataFlow->Links = *Graph()->GetLinks( true ) ;
- aDataFlow->Datas = *Graph()->GetDatas() ;
+ (*aListOfDataFlows)[ index ].Info = *Graph()->GetInfo() ;
+ (*aListOfDataFlows)[ index ].Nodes = *Graph()->GetNodes() ;
+ (*aListOfDataFlows)[ index ].Links = *Graph()->GetLinks( true ) ;
+ (*aListOfDataFlows)[ index ].Datas = *Graph()->GetDatas() ;
}
else {
- aDataFlow->Info = *StreamGraph()->GetInfo() ;
- aDataFlow->Nodes = *StreamGraph()->GetNodes() ;
- aDataFlow->Links = *StreamGraph()->GetLinks( true ) ;
- aDataFlow->Datas = *StreamGraph()->GetDatas() ;
+ (*aListOfDataFlows)[ index ].Info = *StreamGraph()->GetInfo() ;
+ (*aListOfDataFlows)[ index ].Nodes = *StreamGraph()->GetNodes() ;
+ (*aListOfDataFlows)[ index ].Links = *StreamGraph()->GetLinks( true ) ;
+ (*aListOfDataFlows)[ index ].Datas = *StreamGraph()->GetDatas() ;
+ }
+ int i ;
+ for ( i = 0 ; i < (int ) (*aListOfDataFlows)[ index ].Nodes.size() ; i++ ) {
+ if ( Graph()->GetGraphNode( (*aListOfDataFlows)[ index ].Nodes[i].theName.c_str() )->IsMacroNode() ) {
+ string aCoupledNode = (*aListOfDataFlows)[ index ].Nodes[i].theCoupledNode ;
+ GraphBase::Graph * aGraph = theAutomaton->MapGraph( aCoupledNode.c_str() ) ;
+ aGraph->GraphEditor()->GraphEditor::OutNode::GetDataFlows( aListOfDataFlows ) ;
+ }
}
- return aDataFlow ;
+ return aListOfDataFlows ;
}
void GraphEditor::OutNode::DateModification() {
cdebug << " " << NodeKindOfNode << endl ;
char * RetVal = NULLSTRING ;
GraphEditor::InNode *Nd = NULL ;
- char * aNodeName = NULL ;
+ char * aNodeName = NULLSTRING ;
bool GeneratedName = false ;
if ( NodeKindOfNode == SUPERV::InLineNode ||
NodeKindOfNode == SUPERV::LoopNode ||
}
theNodeName = NULLSTRING ;
}
- if ( theNodeName == NULLSTRING || strlen( theNodeName ) == 0 ) {
+ if ( theNodeName == NULLSTRING || strlen( theNodeName ) == 0 || Graph()->GetGraphNode( theNodeName ) ) {
aNodeName = new char[ strlen( NodeService.ServiceName )+1 ] ;
strcpy( aNodeName , NodeService.ServiceName ) ;
if ( Graph()->GetGraphNode( NodeService.ServiceName ) ) {
aNodeName = new char[ strlen( theNodeName )+1 ] ;
strcpy( aNodeName , theNodeName ) ;
}
+ else {
+ aNodeName = NULLSTRING ;
+ }
}
if ( aNodeName != NULLSTRING ) {
Nd = new GraphEditor::InNode( _Orb , Graph()->NamingService() ,
return false ;
}
-bool GraphEditor::OutNode::AddInputData( const char* ToNodeName1 ,
- const char* ToParameterName1 ,
- const char* ToNodeName2 ,
- const char* ToParameterName2 ) {
- cdebug_in << "GraphEditor::OutNode::AddInputData" << endl;
- bool RetVal = Graph()->AddInputData( ToNodeName1 ,
- ToParameterName1 ,
- ToNodeName2 ,
- ToParameterName2 ) ;
- cdebug_out << "GraphEditor::OutNode::AddInputData" << endl;
+bool GraphEditor::OutNode::UnValid() {
+ bool RetVal = _Valid ;
_Valid = false ;
+ if ( Graph()->GraphMacroLevel() != 0 ) {
+ cdebug << "GraphEditor::OutNode::UnValid() GraphMacroLevel " << Graph()->GraphMacroLevel() << endl ;
+ RetVal = Valid() ;
+ }
return RetVal ;
}
cdebug_in << "GraphEditor::OutNode::Valid" << endl;
_Executable = false ;
- Graph()->CreateService() ;
+ if ( !Graph()->CreateService() ) {
+ cdebug_out << "GraphEditor::OutNode::Valid " << _Valid << endl;
+ return false ;
+ }
+ if ( Graph()->GraphMacroLevel() != 0 ) {
+ cdebug << "CoupledNode " << Graph()->CoupledNode() << endl ;
+ cdebug << "GraphEditor " << Graph()->CoupledNode()->GraphEditor() << endl ;
+ cdebug << "Graph " << Graph()->CoupledNode()->GraphEditor()->Graph() << endl ;
+ cdebug << "Name " << Graph()->CoupledNode()->GraphEditor()->Graph()->Name() << endl ;
+ cdebug << "Valid --> UpdateMacroPorts of " << Graph()->CoupledNodeName() << " of "
+ << Graph()->CoupledNode()->GraphEditor()->Graph()->Name() << endl ;
+ cdebug << Graph()->CoupledNode() << endl ;
+ Graph()->CoupledNode()->UpdateMacroPorts( Graph() ) ;
+ cdebug << Graph()->CoupledNode()->Name() << " Valid --> UnValid of graph "
+ << Graph()->CoupledNode()->GraphEditor()->Graph()->Name()
+ << " GraphMacroLevel " << Graph()->CoupledNode()->GraphEditor()->Graph()->GraphMacroLevel() << endl ;
+ Graph()->CoupledNode()->GraphEditor()->UnValid() ;
+ }
+
int SubStreamGraphsNumber = 0 ;
if ( !Graph()->Sort( SubStreamGraphsNumber ) ) {
- cdebug << "This DataFlow is not valid." << endl ;
+ cdebug_out << "This DataFlow is not valid." << endl ;
return false ;
}
if ( Graph()->IsDataStreamNode() ) {
_Valid = true ;
- cdebug_out << "GraphEditor::OutNode::Valid" << endl;
+ cdebug_out << "GraphEditor::OutNode::Valid " << _Valid << endl;
return _Valid ;
}
// << aLink.FromServiceParameterName.c_str()
// << "' )" << endl ;
// }
- f << "L" << aLink.FromNodeName.c_str() << aLink.FromServiceParameterName.c_str()
+ f << " " << "L" << aLink.FromNodeName.c_str() << aLink.FromServiceParameterName.c_str()
<< aLink.ToNodeName.c_str() << aLink.ToServiceParameterName.c_str() ;
if ( ((GraphBase::Graph *) Graph())->GetChangeGraphNode( aLink.FromNodeName.c_str() )->GetChangeOutPort( aLink.FromServiceParameterName.c_str() )->IsDataStream() ) {
f << " = " << aGraphName << ".StreamLink( " ;
f << aLink.ToNodeName.c_str() << aLink.ToServiceParameterName.c_str() << " )" << endl ;
}
else {
- f << "I"<< aLink.ToNodeName.c_str() << aLink.ToServiceParameterName.c_str()
+ f << " " << "I"<< aLink.ToNodeName.c_str() << aLink.ToServiceParameterName.c_str()
// << " = " << aLink.ToNodeName.c_str() << ".Input( '"
// << aLink.ToServiceParameterName.c_str() << "' , " ;
<< ".Input( " ;
}
int i ;
for ( i = 0 ; i < (int ) aLink.aListOfCoords.size() ; i++ ) {
- f << "L" << aLink.FromNodeName.c_str() << aLink.FromServiceParameterName.c_str()
+ f << " " << "L" << aLink.FromNodeName.c_str() << aLink.FromServiceParameterName.c_str()
<< aLink.ToNodeName.c_str() << aLink.ToServiceParameterName.c_str() << ".AddCoord( " << i+1 << " , "
<< aLink.aListOfCoords[ i ].theX << " , "
<< aLink.aListOfCoords[ i ].theY << " )" << endl ;
}
//bool GraphEditor::OutNode::SaveXML(ostream & f ) {
-bool GraphEditor::OutNode::SaveXML(QDomDocument & GraphQDom ) {
+bool GraphEditor::OutNode::SaveXML( ostream & f , QDomDocument & GraphQDom ,
+ bool aSuperGraph , QDomElement & supergraph ) {
+ cdebug_in << "OutNode::SaveXML( ostream & f , QDomDocument & , " << aSuperGraph << " , QDomElement & ) "
+ << Graph()->Name() << endl ;
int i ;
-// f << "<?xml version='1.0' encoding='us-ascii' ?>" << endl << endl ;
-// f << "<!-- XML Dataflow -->" << endl << endl ;
-// f << "<!-- Dataflow information -->" << endl ;
- QString Dataflow("Dataflow") ;
- GraphQDom = QDomDocument(Dataflow) ;
-// f << "<dataflow>" << endl ;
- QDomElement dataflow = GraphQDom.createElement( "dataflow" ) ;
- GraphQDom.appendChild( dataflow ) ;
-// f << " <info-list>" << endl ;
- QDomElement info = GraphQDom.createElement( "info-list" ) ;
- dataflow.appendChild( info ) ;
-// f << " <node>" << endl ;
+ QDomElement dataflow ;
+ if ( aSuperGraph ) {
+ QString SuperGraph("SuperGraph") ;
+ GraphQDom = QDomDocument(SuperGraph) ;
-// GraphBase::DataNode::SaveXML( f , " " , 0 , 0 ) ;
- Graph()->SaveXML( GraphQDom , info , 0 , 0 ) ;
+ supergraph = GraphQDom.createElement( "supergraph" ) ;
+ GraphQDom.appendChild( supergraph ) ;
+
+ dataflow = GraphQDom.createElement( "dataflow" ) ;
+ supergraph.appendChild( dataflow ) ;
+ }
+ else {
+// QString Dataflow("Dataflow") ;
+// GraphQDom = QDomDocument(Dataflow) ;
+
+ dataflow = GraphQDom.createElement( "dataflow" ) ;
+ supergraph.appendChild( dataflow ) ;
+ }
-// f << " </node>" << endl ;
+ QDomElement info = GraphQDom.createElement( "info-list" ) ;
+ dataflow.appendChild( info ) ;
-// f << " </info-list>" << endl << endl ;
+ Graph()->SaveXML( GraphQDom , info , 0 , 0 ) ;
-// f << " <node-list>" << endl ;
QDomElement nodelist = GraphQDom.createElement( "node-list" ) ;
dataflow.appendChild( nodelist ) ;
for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) {
Graph()->GraphNodes( i )->XCoordinate() ,
Graph()->GraphNodes( i )->YCoordinate() ) ;
}
- else if ( Graph()->GraphNodes( i )->IsInLineNode() ) {
+ else if ( Graph()->GraphNodes( i )->IsInLineNode() ) {
// ((GraphBase::InLineNode * ) GraphNodes( i ))->SaveXML( f ,
// " " ,
((GraphBase::InLineNode * ) Graph()->GraphNodes( i ))->SaveXML( GraphQDom , nodelist ,
Graph()->GraphNodes( i )->XCoordinate() ,
Graph()->GraphNodes( i )->YCoordinate() ) ;
}
+ else if ( Graph()->GraphNodes( i )->IsMacroNode() ) {
+// ((GraphBase::InLineNode * ) GraphNodes( i ))->SaveXML( f ,
+// " " ,
+ ((GraphBase::GOTONode * ) Graph()->GraphNodes( i ))->SaveXML( GraphQDom , nodelist ,
+ Graph()->GraphNodes( i )->XCoordinate() ,
+ Graph()->GraphNodes( i )->YCoordinate() ) ;
+ }
else if ( Graph()->GraphNodes( i )->IsGOTONode() ) {
// ((GraphBase::GOTONode * ) GraphNodes( i ))->SaveXML( f ,
// " " ,
// f << " <link-list>" << endl ;
QDomElement linklist = GraphQDom.createElement( "link-list" ) ;
dataflow.appendChild( linklist ) ;
- const GraphBase::ListOfLinks * Links = Graph()->GetLinks( true ) ;
+ const GraphBase::ListOfSLinks * Links = Graph()->GetLinks( true ) ;
for ( i = 0 ; i < (int ) Links->size() ; i++ ) {
// f << " <link>" << endl ;
QDomElement link = GraphQDom.createElement( "link" ) ;
// f << " <data-list>" << endl ;
QDomElement datalist = GraphQDom.createElement( "data-list" ) ;
dataflow.appendChild( datalist ) ;
- const GraphBase::ListOfLinks * Datas = Graph()->GetDatas() ;
- for ( i = 0 ; i < (int ) Datas->size() ; i++ ) {
+ if ( Graph()->GraphMacroLevel() == 0 ) {
+ const GraphBase::ListOfSLinks * Datas = Graph()->GetDatas() ;
+ for ( i = 0 ; i < (int ) Datas->size() ; i++ ) {
// f << " <data>" << endl ;
- QDomElement data = GraphQDom.createElement( "data" ) ;
- datalist.appendChild( data ) ;
+ QDomElement data = GraphQDom.createElement( "data" ) ;
+ datalist.appendChild( data ) ;
// LinkSaveXML( f , " " , (*Datas)[ i ] , true ) ;
- LinkSaveXML( GraphQDom , data , (*Datas)[ i ] , true ) ;
+ LinkSaveXML( GraphQDom , data , (*Datas)[ i ] , true ) ;
// f << " </data>" << endl ;
+ }
}
-//#if 0
-// const GraphEditor::OutNode * aDataNode = (GraphEditor::OutNode *) this ;
-// if ( aDataNode ) {
-// int i ;
-// for ( i = 0 ; i < aDataNode->GetNodeOutPortsSize() ; i++ ) {
-// const GraphBase::InPort *aLink = aDataNode->GetNodeOutPort(i)->GetLink() ;
-// if ( aLink ) {
-// f << " <data>" << endl ;
-// aLink->SaveXML( f , " " ) ;
-// f << " </data>" << endl ;
-// }
-// }
-// for ( i = 0 ; i < aDataNode->GetNodeInPortsSize() ; i++ ) {
-// const GraphBase::InPort *aLink = aDataNode->GetNodeInPort(i)->GetLink() ;
-// if ( aLink ) {
-// f << " <data>" << endl ;
-// aLink->SaveXML( f , " " ) ;
-// f << " </data>" << endl ;
-// }
-// }
-// }
-//#endif
-#if 0
- f << " </data-list>" << endl << endl ;
- f << "</dataflow>" << endl ;
-#endif
+ for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) {
+ if ( Graph()->GraphNodes( i )->IsMacroNode() ) {
+ GraphBase::GOTONode * aMacroNode = (GraphBase::GOTONode * ) Graph()->GraphNodes( i ) ;
+ GraphBase::Graph * aMacroGraph = (GraphBase::Graph * ) aMacroNode->CoupledNode() ;
+ cdebug << "OutNode::SaveXML ---> OutNode::SaveXML( ostream & f , QDomDocument & , false "
+ << " , QDomElement & ) MacroGraph " << aMacroGraph->Name() << endl ;
+ if ( !aMacroGraph->GraphEditor()->SaveXML( f , GraphQDom , false , supergraph ) ) {
+ return false ;
+ cdebug << "OutNode::SaveXML MacroGraph "<< aMacroGraph->Name() << " done" << endl ;
+ }
+ }
+ }
+
+ cdebug_out << "OutNode::SaveXML( ostream & f , QDomDocument & , " << aSuperGraph << " , QDomElement & ) "
+ << Graph()->Name() << endl ;
return true ;
}
-bool GraphEditor::OutNode::SavePY( ostream & f ) {
+bool GraphEditor::OutNode::SavePY( ostream & f , bool importSuperV ) {
int i ;
int j ;
- f << endl << "# Generated python file of Graph " << Graph()->Name() << endl << endl ;
+ if ( importSuperV ) {
+ f << endl << "# Generated python file of Graph " << Graph()->Name() << endl << endl ;
- f << "from SuperV import *" << endl ;
+ f << "from SuperV import *" << endl << endl ;
+ }
- f << "# Graph creation " << endl ;
+ f << "# Graph creation of " << Graph()->Name() << endl ;
+ f << "def Def" << Graph()->Name() << "() :" << endl ;
Graph()->SavePY( f , Graph()->Name() , 0 , 0 ) ;
- f << endl << "# Creation of Factory Nodes" << endl ;
+ f << " " << endl << " " << "# Creation of Factory Nodes" << endl ;
for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) {
if ( Graph()->GraphNodes( i )->IsFactoryNode() ) {
- f << endl ;
+ f << " " << endl ;
((GraphBase::FactoryNode * ) Graph()->GraphNodes( i ))->SavePY( f , Graph()->Name() ,
- Graph()->GraphNodes( i )->XCoordinate() ,
- Graph()->GraphNodes( i )->YCoordinate() ) ;
+ Graph()->GraphNodes( i )->XCoordinate() ,
+ Graph()->GraphNodes( i )->YCoordinate() ) ;
}
}
for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) {
if ( Graph()->GraphNodes( i )->IsComputingNode() ) {
if ( first ) {
- f << endl << "# Creation of Computing Nodes" << endl ;
+ f << " " << endl << " " << "# Creation of Computing Nodes" << endl ;
first = false ;
}
else {
- f << endl ;
+ f << " " << endl ;
}
((GraphBase::ComputingNode * ) Graph()->GraphNodes( i ))->SavePY( f , Graph()->Name() ,
- Graph()->GraphNodes( i )->XCoordinate() ,
- Graph()->GraphNodes( i )->YCoordinate() ) ;
+ Graph()->GraphNodes( i )->XCoordinate() ,
+ Graph()->GraphNodes( i )->YCoordinate() ) ;
}
}
for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) {
if ( Graph()->GraphNodes( i )->IsInLineNode() ) {
if ( first ) {
- f << endl << "# Creation of InLine Nodes" << endl ;
+ f << " " << endl << " " << "# Creation of InLine Nodes" << endl ;
first = false ;
}
else {
- f << endl ;
+ f << " " << endl ;
}
((GraphBase::InLineNode * ) Graph()->GraphNodes( i ))->SavePY( f , Graph()->Name() ,
- Graph()->GraphNodes( i )->XCoordinate() ,
- Graph()->GraphNodes( i )->YCoordinate() ) ;
+ Graph()->GraphNodes( i )->XCoordinate() ,
+ Graph()->GraphNodes( i )->YCoordinate() ) ;
}
}
for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) {
if ( Graph()->GraphNodes( i )->IsLoopNode() ) {
if ( first ) {
- f << endl << "# Creation of Loop Nodes" << endl ;
+ f << " " << endl << " " << "# Creation of Loop Nodes" << endl ;
first = false ;
}
else {
- f << endl ;
+ f << " " << endl ;
}
((GraphBase::LoopNode * ) Graph()->GraphNodes( i ))->SavePY( f , Graph()->Name() ,
- Graph()->GraphNodes( i )->XCoordinate() ,
- Graph()->GraphNodes( i )->YCoordinate() ) ;
+ Graph()->GraphNodes( i )->XCoordinate() ,
+ Graph()->GraphNodes( i )->YCoordinate() ) ;
}
}
for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) {
if ( Graph()->GraphNodes( i )->IsSwitchNode() ) {
if ( first ) {
- f << endl << "# Creation of Switch Nodes" << endl ;
+ f << " " << endl << " " << "# Creation of Switch Nodes" << endl ;
first = false ;
}
else {
- f << endl ;
+ f << " " << endl ;
}
((GraphBase::SwitchNode * ) Graph()->GraphNodes( i ))->SavePY( f , Graph()->Name() ,
- Graph()->GraphNodes( i )->XCoordinate() ,
- Graph()->GraphNodes( i )->YCoordinate() ) ;
+ Graph()->GraphNodes( i )->XCoordinate() ,
+ Graph()->GraphNodes( i )->YCoordinate() ) ;
}
}
for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) {
if ( Graph()->GraphNodes( i )->IsGOTONode() ) {
if ( first ) {
- f << endl << "# Creation of GOTO Nodes" << endl ;
+ f << " " << endl << " " << "# Creation of GOTO Nodes" << endl ;
+ first = false ;
+ }
+ else {
+ f << " " << endl ;
+ }
+ ((GraphBase::GOTONode * ) Graph()->GraphNodes( i ))->SavePY( f , Graph()->Name() ,
+ Graph()->GraphNodes( i )->XCoordinate() ,
+ Graph()->GraphNodes( i )->YCoordinate() ) ;
+ }
+ }
+
+ first = true ;
+ for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) {
+ if ( Graph()->GraphNodes( i )->IsMacroNode() ) {
+ if ( first ) {
+ f << " " << endl << " " << "# Creation of Macro Nodes" << endl ;
first = false ;
}
else {
- f << endl ;
+ f << " " << endl ;
}
((GraphBase::GOTONode * ) Graph()->GraphNodes( i ))->SavePY( f , Graph()->Name() ,
- Graph()->GraphNodes( i )->XCoordinate() ,
- Graph()->GraphNodes( i )->YCoordinate() ) ;
+ Graph()->GraphNodes( i )->XCoordinate() ,
+ Graph()->GraphNodes( i )->YCoordinate() ) ;
}
}
- const GraphBase::ListOfLinks * Links = Graph()->GetLinks() ;
+ const GraphBase::ListOfSLinks * Links = Graph()->GetLinks() ;
// bool intervar ;
// map< string , int > aMapOfOutPorts ;
first = true ;
for ( j = 0 ; j < (int ) Links->size() ; j++ ) {
if ( !strcmp( Graph()->GraphNodes( i )->Name() , (*Links)[ j ].FromNodeName.c_str() ) ) {
if ( first ) {
- f << endl
- << "# Creation of Links"
+ f << " " << endl
+ << " " << "# Creation of Links"
<< endl ;
first = false ;
}
else {
- f << endl ;
+ f << " " << endl ;
}
// char * NodePort = new char [ strlen( (*Links)[ j ].FromNodeName.c_str() ) +
// strlen( (*Links)[ j ].FromServiceParameterName.c_str() ) + 1 ] ;
}
}
- const GraphBase::ListOfLinks * Datas = Graph()->GetDatas() ;
- first = true ;
- for ( i = 0 ; i < (int ) Datas->size() ; i++ ) {
- if ( first ) {
- f << endl << "# Input datas" << endl ;
- first = false ;
+ if ( Graph()->GraphMacroLevel() == 0 ) {
+ const GraphBase::ListOfSLinks * Datas = Graph()->GetDatas() ;
+ first = true ;
+ for ( i = 0 ; i < (int ) Datas->size() ; i++ ) {
+ if ( first ) {
+ f << " " << endl << " " << "# Input datas" << endl ;
+ first = false ;
+ }
+ bool fromparam = true ;
+ bool toparam = true ;
+ LinkSavePY( f , Graph()->Name() , (*Datas)[ i ] , fromparam , toparam , true ) ;
}
- bool fromparam = true ;
- bool toparam = true ;
- LinkSavePY( f , Graph()->Name() , (*Datas)[ i ] , fromparam , toparam , true ) ;
}
first = true ;
char * aPortName ;
int j ;
for ( j = 0 ; j < (int ) strlen( aParam ) ; j++ ) {
- if ( aParam[ j ] == '\\' ) {
+// if ( aParam[ j ] == '\\' ) {
+ if ( aParam[ j ] == '_' && aParam[ j+1 ] == '_' ) {
aNodeName = new char[ j+1 ] ;
strncpy( aNodeName , aParam , j ) ;
aNodeName[ j ] = '\0' ;
- aPortName = new char[ strlen( aParam ) - j ] ;
- strncpy( aPortName , &aParam[ j+1 ] , strlen( aParam ) - j ) ;
+ aPortName = new char[ strlen( aParam ) - j-1 ] ;
+ strncpy( aPortName , &aParam[ j+2 ] , strlen( aParam ) - j-1 ) ;
break ;
}
}
const GraphBase::InPort * anInPort = Graph()->GetChangeGraphNode( aNodeName )->GetInPort( aPortName ) ;
if ( !anInPort->IsDataConnected() ) {
if ( first ) {
- f << endl << "# Input Ports of the graph" << endl ;
+ f << " " << endl << " " << "# Input Ports of the graph" << endl ;
first = false ;
}
- f << "#I" << aNodeName << aPortName << " = " << aNodeName << ".GetInPort( '"
+ f << " " << "#I" << aNodeName << aPortName << " = " << aNodeName << ".GetInPort( '"
<< aPortName << "' )" << endl ;
}
delete [] aNodeName ;
delete [] aPortName ;
}
- f << endl << "# Output Ports of the graph" << endl ;
+ f << " " << endl << " # Output Ports of the graph" << endl ;
const SALOME_ModuleCatalog::ListOfServicesParameter ListOfOutParam = Graph()->ServiceOutParameter() ;
for ( i = 0 ; i < (int ) ListOfOutParam.length() ; i++ ) {
string _aParam = CORBA::string_dup(ListOfOutParam[ i ].Parametername) ;
char * aPortName ;
int j ;
for ( j = 0 ; j < (int ) strlen( aParam ) ; j++ ) {
- if ( aParam[ j ] == '\\' ) {
+// if ( aParam[ j ] == '\\' ) {
+ if ( aParam[ j ] == '_' && aParam[ j+1 ] == '_' ) {
aNodeName = new char[ j+1 ] ;
strncpy( aNodeName , aParam , j ) ;
aNodeName[ j ] = '\0' ;
- aPortName = new char[ strlen( aParam ) - j ] ;
- strncpy( aPortName , &aParam[ j+1 ] , strlen( aParam ) - j ) ;
+ aPortName = new char[ strlen( aParam ) - j-1 ] ;
+ strncpy( aPortName , &aParam[ j+2 ] , strlen( aParam ) - j-1 ) ;
break ;
}
}
- f << "#O" << aNodeName << aPortName << " = " << aNodeName << ".GetOutPort( '"
+ f << " " << "#O" << aNodeName << aPortName << " = " << aNodeName << ".GetOutPort( '"
<< aPortName << "' )" << endl ;
delete [] aNodeName ;
delete [] aPortName ;
}
+
+ f << " " << "return " << Graph()->Name() << endl << endl ;
+
+// RECURSIVE CREATION OF GRAPHS OF MACRONODES
+ for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) {
+ if ( Graph()->GraphNodes( i )->IsMacroNode() ) {
+ GraphBase::GOTONode * aMacroNode = (GraphBase::GOTONode * ) Graph()->GraphNodes( i ) ;
+ GraphBase::Graph * aMacroGraph = (GraphBase::Graph * ) aMacroNode->CoupledNode() ;
+ cdebug << "OutNode::SavePY ---> OutNode::SavePY( ostream & f ) MacroGraph " << aMacroGraph->Name() << endl ;
+ GraphEditor::DataFlow * aDataFlow = aMacroGraph->GraphEditor() ;
+ cdebug << "SavePY of the Graph " << aDataFlow->Graph() << " of the MacroNode "
+ << aMacroGraph->Name() << endl ;
+ if ( !aDataFlow->SavePY( f , false ) ) {
+ return false ;
+ }
+ }
+ }
+
+// f << Graph()->Name() << " = " << Graph()->Name() << "()" << endl ;
+
return true ;
}
bool Executable() ;
bool LoadNodes( map< string , int > & aMapOfNodes ,
- const GraphBase::ListOfNodes &aNodes ) ;
+ const GraphBase::ListOfSNodes &aNodes ) ;
bool LoadLinks( map< string , int > & aMapOfNodes ,
- const GraphBase::ListOfLinks &aLinks ) ;
+ const GraphBase::ListOfSLinks &aLinks ) ;
bool LoadDatas( map< string , int > & aMapOfNodes ,
- const GraphBase::ListOfLinks &aDatas ) ;
+ const GraphBase::ListOfSLinks &aDatas ) ;
// bool GraphEditor::OutNode::LinkSaveXML( ostream &f , char *Tabs ,
bool GraphEditor::OutNode::LinkSaveXML( QDomDocument & Graph , QDomElement & link ,
GraphBase::SLink aLink ,
bool wdata ) const ;
// bool SaveXML(ostream &f ) ;QDomDocument & Graph
- bool SaveXML(QDomDocument & Graph ) ;
+ bool SaveXML( ostream & f , QDomDocument & Graph ,
+ bool aSuperGraph , QDomElement & supergraph ) ;
bool GraphEditor::OutNode::LinkSavePY( ostream &f ,
const char *aGraphName ,
bool fromparam ,
bool toparam ,
bool wdata ) const;
- bool SavePY(ostream &f ) ;
+ bool SavePY(ostream &f , bool importSuperV ) ;
void DateModification() ;
const char * DebugFileName ) ;
virtual ~OutNode();
+ GraphExecutor::FiniteStateMachine * Automaton() { return theAutomaton ; } ;
+
+ bool Name( const char * aName ) ;
+
void Set_prof_debug( CORBA::ORB_ptr ORB , const char * DebugFileName ) ;
GraphBase::StreamGraph * StreamGraph() {
return _StreamGraph ; } ;
return _Graph ; } ;
bool LoadDataFlow( const GraphBase::SGraph *aDataFlow ) ;
- bool LoadXml( const char* myFileName ) ;
+ bool LoadXml( const char* myFileName , GraphBase::ListOfSGraphs & aListOfDataFlows ) ;
+// bool LoadXml( const char* myFileName ) ;
bool LoadInfo( const GraphBase::SNode &aDataFlowInfo ) ;
bool SaveXml(const char* myFileName ) ;
bool SavePy(const char* myFileName ) ;
// get all DataFlow informations (for a .XML file) :
- GraphBase::SGraph * GetDataFlow() ;
+ GraphBase::ListOfSGraphs * GetDataFlows( GraphBase::ListOfSGraphs * aListOfDataFlows ) ;
// void DateModification() ;
bool AddLink( const char* FromNodeName ,
const char* FromServiceParameterName ,
const char* ToNodeName ,
- const char* ToServiceParameterName ,
- const CORBA::Any aValue ) {
+ const char* ToServiceParameterName ) {
+// , const CORBA::Any aValue ) {
DateModification() ;
_Valid = false ;
return _Graph->AddLink( FromNodeName , FromServiceParameterName ,
- ToNodeName , ToServiceParameterName ,
- aValue ) ; } ;
+ ToNodeName , ToServiceParameterName ) ; } ;
+// , aValue ) ; } ;
bool RemoveLink( const char* FromNodeName ,
const char* FromServiceParameterName ,
const char* ToServiceParameterName ,
const int index , long &X , long &Y ) ;
- bool AddInputData( const char* ToNodeName1 ,
- const char* ToParameterName1 ,
- const char* ToNodeName2 ,
- const char* ToParameterName2 ) ;
bool IsValid() {
if ( !_Valid )
return _Valid ; } ;
bool IsNotValid() const {
return !_Valid ; } ;
- bool UnValid() {
- bool RetVal = _Valid ;
- _Valid = false ;
- return RetVal ; } ;
+ bool UnValid() ;
bool IsExecutable() {
if ( !_Valid )
CPPFLAGS+= $(PYTHON_INCLUDES) $(QT_MT_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES) \
-I${KERNEL_ROOT_DIR}/include/salome
-CXXFLAGS= -g -D_DEBUG_ -D__x86__ -D__linux__ -ftemplate-depth-42 -Wall \
+CXXFLAGS+= -g -D_DEBUG_ -D__x86__ -D__linux__ -ftemplate-depth-42 -Wall \
-I${KERNEL_ROOT_DIR}/include/salome
LDFLAGS+= -lSalomeNS -lSalomeLifeCycleCORBA -lSalomeSuperVisionBase -lSalomeSuperVisionExecutor -lOpUtil -lSALOMELocalTrace \
-lc $(QT_MT_LIBS) $(OGL_LIBS) -L${KERNEL_ROOT_DIR}/lib/salome
cdebug_out << "GraphExecutor::DataFlow::DataFlow" << endl;
}
-GraphExecutor::DataFlow::DataFlow(
- CORBA::ORB_ptr ORB,
- SALOME_NamingService* ptrNamingService ,
- const SALOME_ModuleCatalog::Service& DataFlowService ,
- const char *DataFlowComponentName ,
- const char *DataFlowInterfaceName ,
- const char *DataFlowName ,
- const SUPERV::KindOfNode DataFlowkind ,
- const SUPERV::SDate DataFlowFirstCreation ,
- const SUPERV::SDate DataFlowLastModification ,
- const char * DataFlowExecutorRelease ,
- const char * DataFlowAuthor ,
- const char * DataFlowComputer ,
- const char * DataFlowComment ,
- const char * DebugFileName ) :
+GraphExecutor::DataFlow::DataFlow( CORBA::ORB_ptr ORB,
+ SALOME_NamingService* ptrNamingService ,
+ const SALOME_ModuleCatalog::Service& DataFlowService ,
+ const char *DataFlowComponentName ,
+ const char *DataFlowInterfaceName ,
+ const char *DataFlowName ,
+ const SUPERV::KindOfNode DataFlowkind ,
+ const SUPERV::SDate DataFlowFirstCreation ,
+ const SUPERV::SDate DataFlowLastModification ,
+ const char * DataFlowExecutorRelease ,
+ const char * DataFlowAuthor ,
+ const char * DataFlowComputer ,
+ const char * DataFlowComment ,
+ const char * DebugFileName ) :
OutNode( ORB, ptrNamingService , DataFlowService , DataFlowComponentName ,
DataFlowInterfaceName , DataFlowName , DataFlowkind ,
DataFlowFirstCreation , DataFlowLastModification ,
return RetVal ;
}
+bool GraphExecutor::DataFlow::InputOfAny( const char * ToServiceParameterName ,
+ const CORBA::Any & aValue ) {
+ cdebug_in "GraphExecutor::DataFlow::InputOfAny" << endl ;
+ bool RetVal = false ;
+ cdebug << pthread_self() << "GraphExecutor::DataFlow::::InputOfAny " << Graph()->Name() << "("
+ << ToServiceParameterName << ")" << endl ;
+ if ( Graph()->GraphMacroLevel() ) {
+ GraphBase::OutPort * anOutPort ;
+ anOutPort = Graph()->GetChangeInDataNodePort( ToServiceParameterName ) ;
+ cdebug << pthread_self() << "GraphExecutor::DataFlow::InputOfAny " << Graph()->Name()
+ << " " << ToServiceParameterName << " " << anOutPort->State() << " Done " << anOutPort->Done()
+ << endl ;
+ RetVal = AddInputData( Graph()->Name() , ToServiceParameterName , aValue ) ;
+ anOutPort->State( SUPERV::ReadyState ) ;
+ anOutPort->Done( true ) ;
+ GraphExecutor::InNode * anInNode = (GraphExecutor::InNode * ) Graph()->GetChangeGraphNode( anOutPort->InPorts( 0 )->NodeName() )->GetInNode() ;
+ cdebug << pthread_self() << "GraphExecutor::DataFlow::InputOfAny : " << anInNode->Name()
+ << "->SendSomeDataReady( " << Graph()->Name() << " ) " << endl ;
+ anInNode->SendSomeDataReady( Graph()->Name() ) ;
+ if ( anInNode->IsReady() ) {
+ cdebug << pthread_self() << "GraphExecutor::DataFlow::InputOfAny : " << anInNode->Name()
+ << "->SendEvent( GraphExecutor::ExecuteEvent ) "
+ << " " << anInNode->Name() << "->IsReady() " << anInNode->IsReady() << " State "
+ << anInNode->State() << endl ;
+ if ( anInNode->IsLockedDataWait() ) {
+ cdebug << pthread_self() << "GraphExecutor::DataFlow::InputOfAny : " << anInNode->Name()
+ << " IsLockedDataWait() ==> UnLockDataWait" << endl ;
+ anInNode->UnLockDataWait() ;
+ }
+ anInNode->CreateNewThread( true ) ;
+ anInNode->SendEvent( GraphExecutor::ExecuteEvent ) ;
+ State( GraphExecutor::ExecutingState ) ;
+ }
+ }
+ cdebug_out << "GraphExecutor::DataFlow::InputOfAny " << RetVal << endl ;
+ return RetVal ;
+}
+
+bool GraphExecutor::DataFlow::OutputOfAny( const char * aNodeName ,
+ const char * ToServiceParameterName ,
+ const CORBA::Any & aValue ) {
+ cdebug_in << "GraphExecutor::DataFlow::OutputOfAny" << endl ;
+ bool RetVal = false ;
+ GraphBase::Graph * aMacroGraph = (GraphBase::Graph * ) Graph()->GetChangeGraphNode( aNodeName ) ;
+// GraphExecutor::InNode * anInNode = (GraphExecutor::InNode * ) aMacroGraph->GetInNode() ;
+ RetVal = Graph()->AddOutputData( aNodeName , ToServiceParameterName , aValue ) ;
+ GraphBase::OutPort * anOutPort = aMacroGraph->GetChangeOutPort( ToServiceParameterName ) ;
+ int i ;
+ for ( i = 0 ; i < anOutPort->InPortsSize() ; i++ ) {
+ if ( strcmp( anOutPort->ChangeInPorts( i )->NodeName() , Graph()->Name() ) ) {
+ cdebug << "GraphExecutor::DataFlow::OutputOfAny toNodeName " << anOutPort->ChangeInPorts( i )->NodeName()
+ << "(" << anOutPort->ChangeInPorts( i )->PortName() << ")" << endl ;
+ GraphExecutor::InNode * aLinkedNode = (GraphExecutor::InNode * ) Graph()->GetChangeGraphNode( anOutPort->ChangeInPorts( i )->NodeName() )->GetInNode() ;
+ int sts ;
+ if ( aLinkedNode->IsLockedDataWait() ) {
+ cdebug << "GraphExecutor::DataFlow::OutputOfAny " << aLinkedNode->Name()
+ << " IsLockedDataWait --> UnLockDataWait" << endl ;
+ }
+ sts = aLinkedNode->SendSomeDataReady( (char * ) aNodeName ) ;
+ cdebug << "GraphExecutor::DataFlow::OutputOfAny " << aLinkedNode->Name()
+ << "->SendSomeDataReady( " << aNodeName << " ) sts " << sts << endl ;
+ if ( sts ) {
+ if ( aLinkedNode->State() == GraphExecutor::DataReadyState ) {
+ aLinkedNode->CreateNewThreadIf( true ) ;
+ aLinkedNode->UnLockDataWait() ;
+ int res = aLinkedNode->DataUndef_AllDataReadyAction() ;
+ }
+ }
+ }
+ else if ( Graph()->GraphMacroLevel() != 0 ) {
+ cdebug << "GraphExecutor::DataFlow::OutputOfAny to MacroGraph " << anOutPort->ChangeInPorts( i )->NodeName()
+ << "(" << anOutPort->ChangeInPorts( i )->PortName() << ") " << Graph()->CoupledNodeName () << endl ;
+ Graph()->CoupledNode()->GraphExecutor()->OutputOfAny( Graph()->CoupledNodeName() ,
+ anOutPort->ChangeInPorts( i )->PortName() ,
+ *anOutPort->Value() ) ;
+ }
+ else {
+ cdebug << "GraphExecutor::DataFlow::OutputOfAny to Graph " << anOutPort->ChangeInPorts( i )->NodeName()
+ << "(" << anOutPort->ChangeInPorts( i )->PortName() << ") ignored" << endl ;
+ }
+ }
+ cdebug_out << "GraphExecutor::DataFlow::OutputOfAny " << RetVal << endl ;
+ return RetVal ;
+}
+
bool GraphExecutor::DataFlow::Kill() {
cdebug_in << "GraphExecutor::DataFlow::Kill()" << endl;
bool RetVal = GraphExecutor::OutNode::Kill() ;
const char * DebugFileName = NULLSTRING ) ;
virtual ~DataFlow();
- bool LoadDataFlow( const GraphBase::SGraph &aDataFlow ) ;
- bool LoadXml( const char* myFileName ) ;
+ bool LoadDataFlow( const GraphBase::SGraph * aDataFlow ) ;
+// bool LoadXml( const char* myFileName ) ;
const SALOME_ModuleCatalog::Service * NodeService( const char * NodeName ) ;
- bool ChangeInputData( const char* ToNodeName ,
- const char* ToParameterName ,
+ bool AddInputData( const char * ToNodeName ,
+ const char * ToParameterName ,
+ const CORBA::Any aValue = CORBA::Any() ) ;
+ bool ChangeInputData( const char * ToNodeName ,
+ const char * ToParameterName ,
const CORBA::Any aValue = CORBA::Any() ) ;
- bool AddInputSharedData( const char* ToNodeName1 ,
- const char* ToParameterName1 ,
- const char* ToNodeName2 ,
- const char* ToParameterName2 ) ;
+ bool InputOfAny( const char * ToServiceParameterName ,
+ const CORBA::Any & aValue ) ;
+
+ bool OutputOfAny( const char * aNodeName ,
+ const char * ToServiceParameterName ,
+ const CORBA::Any & aValue ) ;
bool IsValid() ;
bool IsExecutable() ;
long LastLevelDone() ;
+ void State(GraphExecutor::AutomatonState aState ) ;
SUPERV::GraphState State() ;
SUPERV::GraphState State(const char * aNodeName ) ;
SUPERV::GraphState State( const char * aNodeName ,
long Thread() ;
long Thread(const char * aNodeName ) ;
- SUPERV::AutomatonState AutomatonState() ;
- SUPERV::AutomatonState AutomatonState(const char * aNodeName ) ;
+ GraphExecutor::AutomatonState AutomatonState() ;
+ GraphExecutor::AutomatonState AutomatonState(const char * aNodeName ) ;
SUPERV::ControlState ControlState() ;
SUPERV::ControlState ControlState(const char * aNodeName ) ;
#include "DataFlowExecutor_OutNode.hxx"
-inline bool GraphExecutor::DataFlow::LoadDataFlow(
- const GraphBase::SGraph &aDataFlow ) {
+inline bool GraphExecutor::DataFlow::LoadDataFlow( const GraphBase::SGraph * aDataFlow ) {
return GraphExecutor::OutNode::LoadDataFlow( aDataFlow ) ;
}
-inline bool GraphExecutor::DataFlow::LoadXml( const char* myFileName ) {
- return GraphExecutor::OutNode::LoadXml( myFileName ) ;
-}
+//inline bool GraphExecutor::DataFlow::LoadXml( const char* myFileName ) {
+// return GraphExecutor::OutNode::LoadXml( myFileName ) ;
+//}
-inline const SALOME_ModuleCatalog::Service * GraphExecutor::DataFlow::NodeService(
- const char * aNodeName ) {
+inline const SALOME_ModuleCatalog::Service * GraphExecutor::DataFlow::NodeService( const char * aNodeName ) {
if ( Graph()->GetGraphNode( aNodeName ) )
return Graph()->GetGraphNode( aNodeName )->GetService() ;
return NULL ;
}
-inline bool GraphExecutor::DataFlow::ChangeInputData( const char* ToNodeName ,
- const char* ToParameterName ,
- const CORBA::Any aValue ) {
+inline bool GraphExecutor::DataFlow::AddInputData( const char* ToNodeName ,
+ const char* ToParameterName ,
+ const CORBA::Any aValue ) {
if ( !IsValid() )
return false ;
- return Graph()->ChangeInputData( ToNodeName , ToParameterName , aValue ) ;
+ return Graph()->AddInputData( ToNodeName , ToParameterName , aValue ) ;
} ;
-inline bool GraphExecutor::DataFlow::AddInputSharedData(const char* ToNodeName1 ,
- const char* ToParameterName1 ,
- const char* ToNodeName2 ,
- const char* ToParameterName2 ) {
+inline bool GraphExecutor::DataFlow::ChangeInputData( const char* ToNodeName ,
+ const char* ToParameterName ,
+ const CORBA::Any aValue ) {
if ( !IsValid() )
return false ;
- return GraphExecutor::OutNode::AddInputData( ToNodeName1 ,
- ToParameterName1 ,
- ToNodeName2 ,
- ToParameterName2 ) ;
-// aKindOfPortValue ) ;
+ return Graph()->ChangeInputData( ToNodeName , ToParameterName , aValue ) ;
} ;
inline bool GraphExecutor::DataFlow::IsValid() {
return GraphExecutor::OutNode::EventQSize() ;
}
+inline void GraphExecutor::DataFlow::State(GraphExecutor::AutomatonState aState ) {
+ GraphExecutor::OutNode::State( aState ) ;
+}
+
inline SUPERV::GraphState GraphExecutor::DataFlow::State() {
return GraphExecutor::OutNode::State() ;
}
return GraphExecutor::OutNode::Thread( aNodeName ) ;
}
-inline SUPERV::AutomatonState GraphExecutor::DataFlow::AutomatonState() {
+inline GraphExecutor::AutomatonState GraphExecutor::DataFlow::AutomatonState() {
return GraphExecutor::OutNode::AutomatonState() ;
}
-inline SUPERV::AutomatonState GraphExecutor::DataFlow::AutomatonState(
+inline GraphExecutor::AutomatonState GraphExecutor::DataFlow::AutomatonState(
const char * aNodeName ) {
return GraphExecutor::OutNode::AutomatonState( aNodeName ) ;
}
#define ToKillDoneState SUPERV::ToKillDoneState
#define ToStopState SUPERV::ToStopState
+#if 0
// States :
-#define UnKnownState SUPERV::UnKnownState
-#define DataUndefState SUPERV::DataUndefState
-#define DataWaitingState SUPERV::DataWaitingState
-#define DataReadyState SUPERV::DataReadyState
-#define SuspendedReadyState SUPERV::SuspendedReadyState
-#define SuspendedReadyToResumeState SUPERV::SuspendedReadyToResumeState
-#define ResumedReadyState SUPERV::ResumedReadyState
-#define KilledReadyState SUPERV::KilledReadyState
-#define StoppedReadyState SUPERV::StoppedReadyState
-#define ExecutingState SUPERV::ExecutingState
-#define SuspendedExecutingState SUPERV::SuspendedExecutingState
-#define ResumedExecutingState SUPERV::ResumedExecutingState
-#define KilledExecutingState SUPERV::KilledExecutingState
-#define StoppedExecutingState SUPERV::StoppedExecutingState
-#define SuccessedExecutingState SUPERV::SuccessedExecutingState
-#define ErroredExecutingState SUPERV::ErroredExecutingState
-#define SuspendedSuccessedState SUPERV::SuspendedSuccessedState
-#define SuspendedErroredState SUPERV::SuspendedErroredState
-#define SuspendedSuccessedToReStartState SUPERV::SuspendedSuccessedToReStartState
-#define SuspendedErroredToReStartState SUPERV::SuspendedErroredToReStartState
-#define ResumedSuccessedState SUPERV::ResumedSuccessedState
-#define ResumedErroredState SUPERV::ResumedErroredState
-#define KilledSuccessedState SUPERV::KilledSuccessedState
-#define KilledErroredState SUPERV::KilledErroredState
-#define StoppedSuccessedState SUPERV::StoppedSuccessedState
-#define StoppedErroredState SUPERV::StoppedErroredState
-#define SuccessedState SUPERV::SuccessedState
-#define ErroredState SUPERV::ErroredState
-#define SuspendedState SUPERV::SuspendedState
-#define KilledState SUPERV::KilledState
-#define StoppedState SUPERV::StoppedState
-#define ReRunnedState SUPERV::ReRunnedState
-#define ReStartedState SUPERV::ReStartedState
-#define NumberOfAutomatonStates SUPERV::NumberOfAutomatonStates
+#define UnKnownState GraphExecutor::UnKnownState
+#define DataUndefState GraphExecutor::DataUndefState
+#define DataWaitingState GraphExecutor::DataWaitingState
+#define DataReadyState GraphExecutor::DataReadyState
+#define SuspendedReadyState GraphExecutor::SuspendedReadyState
+#define SuspendedReadyToResumeState GraphExecutor::SuspendedReadyToResumeState
+#define ResumedReadyState GraphExecutor::ResumedReadyState
+#define KilledReadyState GraphExecutor::KilledReadyState
+#define StoppedReadyState GraphExecutor::StoppedReadyState
+#define ExecutingState GraphExecutor::ExecutingState
+#define SuspendedExecutingState GraphExecutor::SuspendedExecutingState
+#define ResumedExecutingState GraphExecutor::ResumedExecutingState
+#define KilledExecutingState GraphExecutor::KilledExecutingState
+#define StoppedExecutingState GraphExecutor::StoppedExecutingState
+#define SuccessedExecutingState GraphExecutor::SuccessedExecutingState
+#define ErroredExecutingState GraphExecutor::ErroredExecutingState
+#define SuspendedSuccessedState GraphExecutor::SuspendedSuccessedState
+#define SuspendedErroredState GraphExecutor::SuspendedErroredState
+#define SuspendedSuccessedToReStartState GraphExecutor::SuspendedSuccessedToReStartState
+#define SuspendedErroredToReStartState GraphExecutor::SuspendedErroredToReStartState
+#define ResumedSuccessedState GraphExecutor::ResumedSuccessedState
+#define ResumedErroredState GraphExecutor::ResumedErroredState
+#define KilledSuccessedState GraphExecutor::KilledSuccessedState
+#define KilledErroredState GraphExecutor::KilledErroredState
+#define StoppedSuccessedState GraphExecutor::StoppedSuccessedState
+#define StoppedErroredState GraphExecutor::StoppedErroredState
+#define SuccessedState GraphExecutor::SuccessedState
+#define ErroredState GraphExecutor::ErroredState
+#define SuspendedState GraphExecutor::SuspendedState
+#define KilledState GraphExecutor::KilledState
+#define StoppedState GraphExecutor::StoppedState
+#define ReRunnedState GraphExecutor::ReRunnedState
+#define ReStartedState GraphExecutor::ReStartedState
+#define NumberOfAutomatonStates GraphExecutor::NumberOfAutomatonStates
+#endif
// Events :
#define UndefinedEvent GraphExecutor::UndefinedEvent
for ( i = 0 ; i < NumberOfAutomatonStates ; i++ ) {
for ( j = 0 ; j < NumberOfEvents ; j++ ) {
// id est = SameState and VoidAction
- _TransitionTable[ i ][ j ] = (SUPERV::AutomatonState ) i ;
+ _TransitionTable[ i ][ j ] = (GraphExecutor::AutomatonState ) i ;
_ActionTable[ i ][ j ] = GraphExecutor::ErrorAction ;
}
}
// SomeDataReadyEvent :
_TransitionTable[ DataWaitingState ][ SomeDataReadyEvent ] = DataUndefState ;
_ActionTable[ DataUndefState ][ SomeDataReadyEvent ] = DataWaiting_SomeDataReadyAction;
+ _TransitionTable[ DataReadyState ][ SomeDataReadyEvent ] = DataUndefState ;
+ _ActionTable[ DataUndefState ][ SomeDataReadyEvent ] = DataWaiting_SomeDataReadyAction;
// NotAllDataReadyEvent :
_TransitionTable[ DataUndefState ][ NotAllDataReadyEvent ] = DataWaitingState ;
_ActionTable[ DataWaitingState ][ NotAllDataReadyEvent ] = DataUndef_NotAllDataReadyAction;
_ExecNumber = 0 ;
_GraphExecutingNumber = 0 ;
_PyInitModule = false ;
-
+ _DbgFileNumber = 0 ;
// cdebug_out << "FiniteStateMachine::FiniteStateMachine _TransitionTable "
// << endl;
}
return RetVal ;
}
+GraphBase::Graph * GraphExecutor::FiniteStateMachine::MapGraph( const char * aGraphName ) {
+ GraphBase::Graph * aGraph = _MapOfGraphs[ aGraphName ] ;
+ //cout << "MapGraph " << aGraphName << " --> " << aGraph << endl ;
+ return aGraph ;
+}
+
+bool GraphExecutor::FiniteStateMachine::MapGraph( GraphBase::Graph * aGraph , const char * aGraphName ) {
+ if ( MapGraph( aGraphName ) ) {
+ return false ;
+ }
+ _MapOfGraphs[ aGraphName ] = aGraph ;
+ return true ;
+}
+
+void GraphExecutor::FiniteStateMachine::EraseGraph( const char * aGraphName ) {
+ _MapOfGraphs.erase( aGraphName ) ;
+}
+
+bool GraphExecutor::FiniteStateMachine::GraphName( const char * aGraphName ) {
+ return _MapOfGraphNames[ aGraphName ] ;
+}
+
+string GraphExecutor::FiniteStateMachine::GraphInstanceName( const char * aGraphName ) {
+ int GraphInstanceNumber = _MapOfGraphNames[ aGraphName ] ;
+ if ( GraphInstanceNumber ) {
+ _MapOfGraphNames[ aGraphName ] = GraphInstanceNumber + 1 ;
+ }
+ else {
+ GraphInstanceNumber = 0 ;
+ _MapOfGraphNames[ aGraphName ] = GraphInstanceNumber + 1 ;
+ }
+ string theGraphInstanceName = string( aGraphName ) ;
+ if ( GraphInstanceNumber ) {
+ theGraphInstanceName += "_" ;
+ ostringstream astr ;
+// astr << GraphInstanceNumber << ends ;
+ astr << GraphInstanceNumber ;
+ theGraphInstanceName += astr.str() ;
+ }
+ //cout << "GraphExecutor::FiniteStateMachine::GraphInstanceName( " << aGraphName << " ) --> "
+ // << theGraphInstanceName << endl ;
+ return theGraphInstanceName ;
+}
+
void GraphExecutor::FiniteStateMachine::JoinThread() {
if ( pthread_mutex_lock( &_MutexJoinWait ) ) {
perror("Join pthread_mutex_lock ") ;
}
}
+ostream & operator<< (ostream &f ,const GraphExecutor::AutomatonState & aState ) {
+ switch (aState) {
+ case GraphExecutor::UnKnownState :
+ f << "UnKnownState";
+ break;
+ case GraphExecutor::DataUndefState :
+ f << "DataUndefState";
+ break;
+ case GraphExecutor::DataWaitingState :
+ f << "DataWaitingState";
+ break;
+ case GraphExecutor::DataReadyState :
+ f << "DataReadyState";
+ break;
+ case GraphExecutor::SuspendedReadyState :
+ f << "SuspendedReadyState";
+ break;
+ case GraphExecutor::SuspendedReadyToResumeState :
+ f << "SuspendedReadyToResumeState";
+ break;
+ case GraphExecutor::ResumedReadyState :
+ f << "ResumedReadyState";
+ break;
+ case GraphExecutor::KilledReadyState :
+ f << "KilledReadyState";
+ break;
+ case GraphExecutor::StoppedReadyState :
+ f << "StoppedReadyState";
+ break;
+ case GraphExecutor::ExecutingState :
+ f << "ExecutingState";
+ break;
+ case GraphExecutor::SuspendedExecutingState :
+ f << "SuspendedExecutingState";
+ break;
+ case GraphExecutor::ResumedExecutingState :
+ f << "ResumedExecutingState";
+ break;
+ case GraphExecutor::KilledExecutingState :
+ f << "KilledExecutingState";
+ break;
+ case GraphExecutor::StoppedExecutingState :
+ f << "StoppedExecutingState";
+ break;
+ case GraphExecutor::SuccessedExecutingState :
+ f << "SuccessedExecutingState";
+ break;
+ case GraphExecutor::ErroredExecutingState :
+ f << "ErroredExecutingState";
+ break;
+ case GraphExecutor::SuspendedSuccessedState :
+ f << "SuspendedSuccessedState";
+ break;
+ case GraphExecutor::SuspendedErroredState :
+ f << "SuspendedErroredState";
+ break;
+ case GraphExecutor::ResumedSuccessedState :
+ f << "ResumedSuccessedState";
+ break;
+ case GraphExecutor::ResumedErroredState :
+ f << "ResumedErroredState";
+ break;
+ case GraphExecutor::KilledSuccessedState :
+ f << "KilledSuccessedState";
+ break;
+ case GraphExecutor::KilledErroredState :
+ f << "KilledErroredState";
+ break;
+ case GraphExecutor::StoppedSuccessedState :
+ f << "StoppedSuccessedState";
+ break;
+ case GraphExecutor::StoppedErroredState :
+ f << "StoppedErroredState";
+ break;
+ case GraphExecutor::SuccessedState :
+ f << "SuccessedState";
+ break;
+ case GraphExecutor::ErroredState :
+ f << "ErroredState";
+ break;
+ case GraphExecutor::SuspendedState :
+ f << "SuspendedState";
+ break;
+ case GraphExecutor::KilledState :
+ f << "KilledState";
+ break;
+ case GraphExecutor::StoppedState :
+ f << "StoppedState";
+ break;
+ case GraphExecutor::SuspendedSuccessedToReStartState :
+ f << "SuspendedSuccessedToReStartState";
+ break;
+ case GraphExecutor::SuspendedErroredToReStartState :
+ f << "SuspendedErroredToReStartState";
+ break;
+ case GraphExecutor::ReRunnedState :
+ f << "ReRunnedState";
+ break;
+ case GraphExecutor::ReStartedState :
+ f << "ReStartedState";
+ break;
+ default :
+ f << "GraphExecutor::AutomatonState_?";
+ break;
+ }
+
+ return f;
+}
+
//#include CORBA_SERVER_HEADER(SUPERV)
#include <SALOME_LifeCycleCORBA.hxx>
+namespace GraphBase {
+ class Graph ;
+}
+
namespace GraphExecutor {
+//The AutomatonState is an internal state of the automaton of the Executor
+ enum AutomatonState { UnKnownState ,
+ DataUndefState ,
+ DataWaitingState ,
+ DataReadyState ,
+ SuspendedReadyState,
+ SuspendedReadyToResumeState ,
+ ResumedReadyState ,
+ KilledReadyState ,
+ StoppedReadyState ,
+ ExecutingState ,
+ SuspendedExecutingState ,
+ ResumedExecutingState ,
+ KilledExecutingState ,
+ StoppedExecutingState ,
+ SuccessedExecutingState ,
+ ErroredExecutingState ,
+ SuspendedSuccessedState ,
+ SuspendedErroredState,
+ ResumedSuccessedState ,
+ ResumedErroredState ,
+ KilledSuccessedState ,
+ KilledErroredState ,
+ StoppedSuccessedState ,
+ StoppedErroredState ,
+ SuccessedState ,
+ ErroredState ,
+ SuspendedState ,
+ KilledState ,
+ StoppedState ,
+ SuspendedSuccessedToReStartState ,
+ SuspendedErroredToReStartState ,
+ ReRunnedState ,
+ ReStartedState ,
+ NumberOfAutomatonStates } ;
+
enum NodeEvent { UndefinedEvent , NewThreadEvent ,
SuspendEvent , ToResumeEvent , ResumeEvent ,
KillEvent , StopEvent ,
private :
char * _ControlStateName[ SUPERV::NumberOfControlStates ] ;
- char * _StateName[ SUPERV::NumberOfAutomatonStates ] ;
+ char * _StateName[ GraphExecutor::NumberOfAutomatonStates ] ;
char * _GraphStateName[ SUPERV::NumberOfGraphStates ] ;
char * _EventName[ GraphExecutor::NumberOfEvents ] ;
char * _ActionName[ NumberOfActions ] ;
- SUPERV::AutomatonState _TransitionTable[ SUPERV::NumberOfAutomatonStates ]
- [ GraphExecutor::NumberOfEvents ] ;
- GraphExecutor::StateEventAction _ActionTable[ SUPERV::NumberOfAutomatonStates ]
+ GraphExecutor::AutomatonState _TransitionTable[ GraphExecutor::NumberOfAutomatonStates ]
+ [ GraphExecutor::NumberOfEvents ] ;
+ GraphExecutor::StateEventAction _ActionTable[ GraphExecutor::NumberOfAutomatonStates ]
[ GraphExecutor::NumberOfEvents ] ;
pthread_mutex_t _MutexPythonWait ;
int _ExecNumber ;
int _GraphExecutingNumber ;
+ int _DbgFileNumber ;
+ map< string , GraphBase::Graph * > _MapOfGraphs ;
+ map< string , int > _MapOfGraphNames ;
+
bool _JoinThread ;
pthread_t _JoinThreadNo ;
pthread_mutex_t _MutexJoinWait ;
bool PyFunction( const char * aPyFuncName , PyObject * aPyFunction ) ;
PyObject * PyFunction( const char * aPyFuncName ) ;
+ string DbgFileNumber() {
+ _DbgFileNumber += 1 ;
+ ostringstream astr ;
+ astr << _DbgFileNumber ;
+ return astr.str() ; } ;
+ GraphBase::Graph * MapGraph( const char * aGraphName ) ;
+ bool MapGraph( GraphBase::Graph * aGraph , const char * aGraphName ) ;
+ void EraseGraph( const char * aGraphName ) ;
+ bool GraphName( const char * aGraphName ) ;
+ string GraphInstanceName( const char * aGraphName ) ;
+
void JoinThread() ;
void JoinThread( pthread_t aThread ) ;
const char * ControlStateName( const SUPERV::ControlState & aState ) const {
return _ControlStateName[ aState ] ; } ;
- const char * StateName( const SUPERV::AutomatonState & aState ) const {
+ const char * StateName( const GraphExecutor::AutomatonState & aState ) const {
return _StateName[ aState ] ; } ;
const char * StateName( const SUPERV::GraphState & aState ) const {
return _GraphStateName[ aState ] ; } ;
const char * ActionName( const GraphExecutor::StateEventAction & anAction ) const {
return _ActionName[ anAction ] ; } ;
- const SUPERV::AutomatonState NextState( const SUPERV::AutomatonState & aState ,
- const GraphExecutor::NodeEvent & anEvent ) const {
+ const GraphExecutor::AutomatonState NextState( const GraphExecutor::AutomatonState & aState ,
+ const GraphExecutor::NodeEvent & anEvent ) const {
return _TransitionTable[ aState ][ anEvent ] ; } ;
- const GraphExecutor::StateEventAction NextAction( const SUPERV::AutomatonState & aState ,
+ const GraphExecutor::StateEventAction NextAction( const GraphExecutor::AutomatonState & aState ,
const GraphExecutor::NodeEvent & anEvent ) const {
return _ActionTable[ aState ][ anEvent ] ; } ;
};
};
+ostream & operator<< (ostream &f ,const GraphExecutor::AutomatonState & aState ) ;
+
#endif
static void InitInNode( int &_RewindStack ,
SUPERV::ControlState &_ControlState ,
- SUPERV::AutomatonState &_currentState ,
+ GraphExecutor::AutomatonState &_currentState ,
GraphExecutor::InNode ** _aReStartNode ,
bool & _PyFuncRunned ,
PyObject ** _MyPyRunMethod ,
CORBA::ORB_ptr ORB ) {
_RewindStack = 0 ;
_ControlState = SUPERV::VoidState ;
- _currentState = SUPERV::UnKnownState ;
+ _currentState = GraphExecutor::UnKnownState ;
*_aReStartNode = NULL ;
_PyFuncRunned = false ;
*_MyPyRunMethod = NULL ;
_ComputingNode = (GraphBase::ComputingNode *) _InLineNode ;
break ;
}
+ case SUPERV::MacroNode : {
+ cdebug << "GraphExecutor::InNode::InNode SUPERV::MacroNode : " << NodeName << endl ;
+ _GraphMacroNode = new GraphBase::Graph( ORB , ptrNamingService ,
+// aFuncName[0].c_str() , *aPythonFunction[0] ,
+ NodeName , akind ,
+// NodeFirstCreation , NodeLastModification ,
+// NodeEditorRelease , NodeAuthor ,
+// NodeComment , GeneratedName ,
+// NodeX , NodeY ,
+ Graph_prof_debug , Graph_fdebug ) ;
+ _ComputingNode = (GraphBase::ComputingNode *) _GraphMacroNode ;
+ _InLineNode = (GraphBase::InLineNode *) _ComputingNode ;
+ _GOTONode = (GraphBase::GOTONode *) _InLineNode ;
+ _GraphMacroNode->Coordinates( NodeX , NodeY ) ;
+ break ;
+ }
case SUPERV::GOTONode : {
cdebug << "GraphEditor::InNode::InNode SUPERV::GOTONode : " << NodeName ;
_GOTONode = new GraphBase::GOTONode( ORB , ptrNamingService ,
if ( IsFactoryNode() ) {
RetVal = !CORBA::is_nil( _FactoryNode->Component() ) ;
if ( RetVal ) {
- if ( State() != SUPERV::SuspendedExecutingState ) {
+ if ( State() != GraphExecutor::SuspendedExecutingState ) {
try {
_FactoryNode->Component()->ping() ;
}
catch( ... ) {
cdebug << "InNode::Ping() catched" << endl ;
- State( SUPERV::ErroredState ) ;
- _OutNode->State( SUPERV::ErroredState ) ;
+ State( GraphExecutor::ErroredState ) ;
+ _OutNode->State( GraphExecutor::ErroredState ) ;
RetVal = false ;
}
}
}
catch( ... ) {
cdebug << "InNode::Suspend() catched" << endl ;
- State( SUPERV::ErroredState ) ;
- _OutNode->State( SUPERV::ErroredState ) ;
+ State( GraphExecutor::ErroredState ) ;
+ _OutNode->State( GraphExecutor::ErroredState ) ;
RetVal = false ;
}
if ( RetVal ) {
}
catch( ... ) {
cdebug << "InNode::Suspend() catched" << endl ;
- State( SUPERV::ErroredState ) ;
- _OutNode->State( SUPERV::ErroredState ) ;
+ State( GraphExecutor::ErroredState ) ;
+ _OutNode->State( GraphExecutor::ErroredState ) ;
RetVal = false ;
}
cdebug << "Component()->Kill_impl() returns status " << RetVal << endl ;
}
catch( ... ) {
cdebug << "InNode::Stop() catched" << endl ;
- State( SUPERV::ErroredState ) ;
- _OutNode->State( SUPERV::ErroredState ) ;
+ State( GraphExecutor::ErroredState ) ;
+ _OutNode->State( GraphExecutor::ErroredState ) ;
RetVal = false ;
}
if ( RetVal ) {
<< Automaton()->StateName( State() ) << endl;
bool RetVal = false ;
if ( IsSuspended() ) {
- if ( State() == SUPERV::SuspendedReadyState ) {
+ if ( State() == GraphExecutor::SuspendedReadyState ) {
ResumeAction( GraphExecutor::ToResumeEvent ) ;
RetVal = true ;
}
- else if ( State() == SUPERV::SuspendedExecutingState ) {
+ else if ( State() == GraphExecutor::SuspendedExecutingState ) {
if ( IsFactoryNode() || IsComputingNode() ) {
try {
RetVal = Component()->Resume_impl() ;
}
catch( ... ) {
cdebug << "InNode::Resume() catched" << endl ;
- State( SUPERV::ErroredState ) ;
- _OutNode->State( SUPERV::ErroredState ) ;
+ State( GraphExecutor::ErroredState ) ;
+ _OutNode->State( GraphExecutor::ErroredState ) ;
RetVal = false ;
}
}
}
- else if ( State() == SUPERV::SuspendedSuccessedState ) {
+ else if ( State() == GraphExecutor::SuspendedSuccessedState ) {
ResumeAction( GraphExecutor::ResumeEvent ) ;
RetVal = true ;
}
- else if ( State() == SUPERV::SuspendedErroredState ) {
+ else if ( State() == GraphExecutor::SuspendedErroredState ) {
ResumeAction( GraphExecutor::ResumeEvent ) ;
RetVal = true ;
}
#if 0
if ( ControlState() == SUPERV::ToSuspendRunState ||
( ControlState() == SUPERV::ToSuspendState &&
- State() == SUPERV::SuspendedReadyState) ) {
+ State() == GraphExecutor::SuspendedReadyState) ) {
if ( IsSuspended() ) {
- if ( State() == SUPERV::SuspendedReadyState ) {
+ if ( State() == GraphExecutor::SuspendedReadyState ) {
ResumeAction() ;
RetVal = true ;
}
- else if ( State() == SUPERV::SuspendedExecutingState ) {
+ else if ( State() == GraphExecutor::SuspendedExecutingState ) {
ResumeAction() ;
RetVal = Component()->Resume_impl() ;
}
}
else if ( ControlState() == SUPERV::ToSuspendDoneState ||
( ControlState() == SUPERV::ToSuspendState &&
- State() == SUPERV::SuspendedSuccessedState) ) {
+ State() == GraphExecutor::SuspendedSuccessedState) ) {
if ( IsSuspended() ) {
- if ( State() == SUPERV::SuspendedSuccessedState ) {
+ if ( State() == GraphExecutor::SuspendedSuccessedState ) {
ResumeAction() ;
RetVal = true ;
}
- else if ( State() == SUPERV::SuspendedErroredState ) {
+ else if ( State() == GraphExecutor::SuspendedErroredState ) {
ResumeAction() ;
RetVal = true ;
}
}
else if ( IsSuspended() ) {
if ( strcmp( AtNodeName , Name() ) ) {
- aRestartNode->State( SUPERV::SuspendedSuccessedState ) ;
+ aRestartNode->State( GraphExecutor::SuspendedSuccessedState ) ;
}
if ( AndSuspend ) {
ReStartAction( aRestartNode , GraphExecutor::ReStartAndSuspendEvent ) ;
bool GraphExecutor::InNode::IsWaiting() {
bool aret = false ;
// cdebug_in << "GraphExecutor::InNode::IsWaiting " << Name() << endl;
- SUPERV::AutomatonState aState = State() ;
- if ( aState == SUPERV::DataUndefState ||
- aState == SUPERV::DataWaitingState ||
- aState == SUPERV::SuspendedReadyState )
-// aState == SUPERV::SuspendedExecutingState ||
-// aState == SUPERV::SuspendedSuccessedState ||
-// aState == SUPERV::SuspendedErroredState ||
-// aState == SUPERV::SuspendedState
+ GraphExecutor::AutomatonState aState = State() ;
+ if ( aState == GraphExecutor::DataUndefState ||
+ aState == GraphExecutor::DataWaitingState ||
+ aState == GraphExecutor::SuspendedReadyState )
+// aState == GraphExecutor::SuspendedExecutingState ||
+// aState == GraphExecutor::SuspendedSuccessedState ||
+// aState == GraphExecutor::SuspendedErroredState ||
+// aState == GraphExecutor::SuspendedState
aret = true ;
// cdebug_out << "GraphExecutor::InNode::IsWaiting" << endl ;
return aret ;
bool GraphExecutor::InNode::IsReady() {
bool aret = false ;
// cdebug_in << "GraphExecutor::InNode::IsReady " << Name() << endl;
- SUPERV::AutomatonState aState = State() ;
- if ( aState == SUPERV::DataUndefState ||
- aState == SUPERV::DataWaitingState ||
- aState == SUPERV::DataReadyState ||
- aState == SUPERV::ResumedReadyState )
+ GraphExecutor::AutomatonState aState = State() ;
+// if ( aState == GraphExecutor::DataUndefState ||
+// aState == GraphExecutor::DataWaitingState ||
+ if ( aState == GraphExecutor::DataReadyState ||
+ aState == GraphExecutor::ResumedReadyState )
aret = true ;
// cdebug_out << "GraphExecutor::InNode::IsReady" << endl ;
return aret ;
bool GraphExecutor::InNode::IsRunning() {
bool aret = false ;
// cdebug_in << "GraphExecutor::InNode::IsRunning " << Name() << endl;
- SUPERV::AutomatonState aState = State() ;
- if ( aState == SUPERV::ExecutingState ||
- aState == SUPERV::ResumedExecutingState )
+ GraphExecutor::AutomatonState aState = State() ;
+ if ( aState == GraphExecutor::ExecutingState ||
+ aState == GraphExecutor::ResumedExecutingState )
aret = true ;
// cdebug_out << "GraphExecutor::InNode::IsRunning" << endl ;
return aret ;
bool GraphExecutor::InNode::IsDone() {
bool aret = false ;
// cdebug_in << "GraphExecutor::InNode::IsDone " << Name() << endl;
- SUPERV::AutomatonState aState = State() ;
- if ( aState == SUPERV::KilledReadyState ||
- aState == SUPERV::StoppedReadyState ||
- aState == SUPERV::KilledExecutingState ||
- aState == SUPERV::StoppedExecutingState ||
- aState == SUPERV::SuspendedSuccessedState ||
- aState == SUPERV::SuspendedErroredState ||
-// aState == SUPERV::SuccessedExecutingState ||
-// aState == SUPERV::ErroredExecutingState ||
- aState == SUPERV::SuccessedState ||
- aState == SUPERV::ErroredState ||
- aState == SUPERV::ResumedSuccessedState ||
- aState == SUPERV::ResumedErroredState ||
- aState == SUPERV::KilledSuccessedState ||
- aState == SUPERV::StoppedSuccessedState )
+ GraphExecutor::AutomatonState aState = State() ;
+ if ( aState == GraphExecutor::KilledReadyState ||
+ aState == GraphExecutor::StoppedReadyState ||
+ aState == GraphExecutor::KilledExecutingState ||
+ aState == GraphExecutor::StoppedExecutingState ||
+ aState == GraphExecutor::SuspendedSuccessedState ||
+ aState == GraphExecutor::SuspendedErroredState ||
+// aState == GraphExecutor::SuccessedExecutingState ||
+// aState == GraphExecutor::ErroredExecutingState ||
+ aState == GraphExecutor::SuccessedState ||
+ aState == GraphExecutor::ErroredState ||
+ aState == GraphExecutor::ResumedSuccessedState ||
+ aState == GraphExecutor::ResumedErroredState ||
+ aState == GraphExecutor::KilledSuccessedState ||
+ aState == GraphExecutor::StoppedSuccessedState )
aret = true ;
// cdebug_out << "GraphExecutor::InNode::IsDone" << endl ;
return aret ;
bool GraphExecutor::InNode::IsSuspended() {
bool aret = false ;
// cdebug_in << "GraphExecutor::InNode::IsSuspended " << Name() << endl;
- SUPERV::AutomatonState aState = State() ;
- if ( aState == SUPERV::SuspendedReadyState ||
- aState == SUPERV::SuspendedExecutingState ||
- aState == SUPERV::SuspendedSuccessedState ||
- aState == SUPERV::SuspendedErroredState )
+ GraphExecutor::AutomatonState aState = State() ;
+ if ( aState == GraphExecutor::SuspendedReadyState ||
+ aState == GraphExecutor::SuspendedExecutingState ||
+ aState == GraphExecutor::SuspendedSuccessedState ||
+ aState == GraphExecutor::SuspendedErroredState )
aret = true ;
// cdebug_out << "GraphExecutor::InNode::IsSuspended" << endl ;
return aret ;
bool GraphExecutor::InNode::IsKilled() {
bool aret = false ;
// cdebug_in << "GraphExecutor::InNode::IsKilled " << Name() << endl;
- SUPERV::AutomatonState aState = State() ;
- if ( aState == SUPERV::KilledReadyState ||
- aState == SUPERV::KilledExecutingState ||
- aState == SUPERV::KilledSuccessedState ||
- aState == SUPERV::KilledErroredState ||
- aState == SUPERV::KilledState )
+ GraphExecutor::AutomatonState aState = State() ;
+ if ( aState == GraphExecutor::KilledReadyState ||
+ aState == GraphExecutor::KilledExecutingState ||
+ aState == GraphExecutor::KilledSuccessedState ||
+ aState == GraphExecutor::KilledErroredState ||
+ aState == GraphExecutor::KilledState )
aret = true ;
// cdebug_out << "GraphExecutor::InNode::IsKilled" << endl ;
return aret ;
bool GraphExecutor::InNode::IsStopped() {
bool aret = false ;
// cdebug_in << "GraphExecutor::InNode::IsStopped " << Name() << endl;
- SUPERV::AutomatonState aState = State() ;
- if ( aState == SUPERV::StoppedReadyState ||
- aState == SUPERV::StoppedExecutingState ||
- aState == SUPERV::StoppedSuccessedState ||
- aState == SUPERV::StoppedErroredState ||
- aState == SUPERV::StoppedState )
+ GraphExecutor::AutomatonState aState = State() ;
+ if ( aState == GraphExecutor::StoppedReadyState ||
+ aState == GraphExecutor::StoppedExecutingState ||
+ aState == GraphExecutor::StoppedSuccessedState ||
+ aState == GraphExecutor::StoppedErroredState ||
+ aState == GraphExecutor::StoppedState )
aret = true ;
// cdebug_out << "GraphExecutor::InNode::IsStopped" << endl ;
return aret ;
break ;
}
default : {
- cdebug << " GraphExecutor::OutNode::StateWait Error Undefined State : "
+ cdebug << " SUPERV::OutNode::StateWait Error Undefined State : "
<< aState << endl ;
}
}
<< " with state " << theAutomaton->StateName( anOutPort->State() ) << endl ;
GetChangeNodeInPort(i)->State( anOutPort->State() ) ;
}
- else {
+ else if ( anOutPort->IsDataConnected() ) {
cdebug << "InPort" << i << " state change : " << anInPort->PortName() << " from OutPort "
<< anOutPort->PortName() << " from Node " << anOutPort->NodeName()
<< " with state ReadyState" << endl ;
GetChangeNodeInPort(i)->State( SUPERV::ReadyState ) ;
}
+ else {
+ cdebug << "InPort" << i << " state NOT changed : " << anInPort->PortName() << " from OutPort "
+ << anOutPort->PortName() << " " << anOutPort->PortStatus() << " from Node " << anOutPort->NodeName()
+ << " with state " << anOutPort->State() << endl ;
+ }
}
if ( anOutPort ) {
cdebug << "InPort" << i << " : " << anInPort->PortName() << " from OutPort "
}
}
- _currentState = Pc > 0 ? SUPERV::DataWaitingState
- : SUPERV::DataReadyState ;
+ _currentState = Pc > 0 ? GraphExecutor::DataWaitingState
+ : GraphExecutor::DataReadyState ;
if ( Pc == GetNodeInPortsSize() ) {
_OutNode->PushEvent( this , GraphExecutor::NoDataReadyEvent ,
_currentState ) ;
}
catch ( ... ) {
cdebug << "CpuUsed " << Name() << " --> Component()->CpuUsed_impl() ERROR catched " << endl ;
- State( SUPERV::ErroredState ) ;
- _OutNode->State( SUPERV::ErroredState ) ;
+ State( GraphExecutor::ErroredState ) ;
+ _OutNode->State( GraphExecutor::ErroredState ) ;
cpu = 0 ;
}
}
#include <Python.h>
+#include "DataFlowBase_Graph.hxx"
#include "DataFlowBase_FactoryNode.hxx"
#include "DataFlowBase_GOTONode.hxx"
#include "DataFlowBase_LoopNode.hxx"
GraphBase::EndOfLoopNode * _EndOfLoopNode ;
GraphBase::SwitchNode * _SwitchNode ;
GraphBase::EndOfSwitchNode * _EndOfSwitchNode ;
+ GraphBase::Graph * _GraphMacroNode ;
PyObject * _MyPyRunMethod ;
bool _createNewThread ;
bool _createNewThreadIf ;
int _RewindStack ;
- SUPERV::AutomatonState _OldState ;
- SUPERV::AutomatonState _currentState ;
+ GraphExecutor::AutomatonState _OldState ;
+ GraphExecutor::AutomatonState _currentState ;
GraphExecutor::NodeEvent _CurrentEvent ;
SUPERV::ControlState _ControlState ;
- SUPERV::AutomatonState _NextState ;
+ GraphExecutor::AutomatonState _NextState ;
GraphExecutor::StateEventAction _NextAction ;
bool _PyFuncRunned ;
return _ComputingNode->IsOneOfInLineNodes() ; } ;
const bool IsOneOfGOTONodes() const {
return _ComputingNode->IsOneOfGOTONodes() ; } ;
+ const bool IsMacroNode() const {
+ return _ComputingNode->IsMacroNode() ; } ;
const bool IsDataFlowNode() const {
return _ComputingNode->IsDataFlowNode() ; } ;
+ const bool IsDataStreamNode() const {
+ return _ComputingNode->IsDataStreamNode() ; } ;
const bool IsLoopNode() const {
return _ComputingNode->IsLoopNode() ; } ;
const bool IsEndLoopNode() const {
} ;
GraphBase::LoopNode * LoopNode() {
return _LoopNode ; } ;
+ GraphBase::Graph * GraphMacroNode() {
+ return _GraphMacroNode ; } ;
+
+ SUPERV::CNode_var ObjRef() const { return _ComputingNode->ObjRef() ; } ;
+ void SetObjRef( SUPERV::CNode_var aNode ) {
+ _ComputingNode->SetObjRef( aNode ) ; } ;
+
+ Graph_Impl * ObjImpl() const { return _GraphMacroNode->ObjImpl() ; } ;
+ void SetObjImpl( Graph_Impl * aGraph ) {
+ _GraphMacroNode->SetObjImpl( aGraph ) ; } ;
Engines::Component_var Component() const ;
Engines::Container_var Container() const ;
void RewindStack( int aRewindStack ) { _RewindStack = aRewindStack ; } ;
int RewindStack() const { return _RewindStack ; } ;
- SUPERV::AutomatonState State() const {
+ GraphExecutor::AutomatonState State() const {
return _currentState; };
- void State(SUPERV::AutomatonState aState ) {
+ void State(GraphExecutor::AutomatonState aState ) {
// cdebug << "GraphExecutor::InNode::State( "
// << Automaton()->StateName( _currentState ) << " --> "
// << Automaton()->StateName( aState ) << " )" << endl ;
#include <unistd.h>
#include <stdio.h>
+#if defined __GNUC__
+ #if __GNUC__ == 2
+ #define __GNUC_2__
+ #endif
+#endif
+
+#if defined __GNUC_2__
+// _CS_gbo_040604 include explicite pour l'utilisation de
+// std::transform dans UpperCase
+#include <cctype> // for toupper
+#include <algorithm> // for transform
+#endif
+
#include "Python.h"
#include "OpUtil.hxx"
//#include "StreamGraph_Impl.hxx"
-#include "DataFlowExecutor_OutNode.hxx"
+//#include "DataFlowExecutor_OutNode.hxx"
+#include "DataFlowExecutor_DataFlow.hxx"
static void UpperCase(std::string& rstr)
{
- std::transform(rstr.begin(), rstr.end(), rstr.begin(), towupper);
+#if defined __GNUC_2__
+ // _CS_gbo_040604 towupper n'existe pas. Utilisation de toupper. Par
+ // ailleurs, include explicite de cctype et algorithm pour toupper
+ // et transform respectivement.
+ std::transform(rstr.begin(), rstr.end(), rstr.begin(),toupper);
+#else
+ std::transform(rstr.begin(), rstr.end(), rstr.begin(),towupper);
+#endif
}
}
// State( _NextState ) ;
-// if ( _OldState == SUPERV::SuccessedExecutingState ||
-// _OldState == SUPERV::ErroredExecutingState ) {
+// if ( _OldState == GraphExecutor::SuccessedExecutingState ||
+// _OldState == GraphExecutor::ErroredExecutingState ) {
// DoneAction() ;
// }
<< " _RewindStack " << _RewindStack << endl ;
#if 0
- cout << pthread_self() << "/" << ThreadNo() << " SendedEvent Node " << Name()
+ //cout << pthread_self() << "/" << ThreadNo() << " SendedEvent Node " << Name()
<< endl << " ControlState : "
<< Automaton()->ControlStateName( ControlState() ) << endl
<< " OldState : " << Automaton()->StateName( _OldState ) << endl
pthread_t T;
int pthread_sts = 1 ;
// _OutNode->PushEvent( NULL , GraphExecutor::NewThreadEvent ,
-// SUPERV::ExecutingState ) ;
+// GraphExecutor::ExecutingState ) ;
while ( (pthread_sts = pthread_create(&T, NULL, run_function, this )) ) {
char * msg = "Cannot pthread_create " ;
perror( msg ) ;
<< Automaton()->StateName( State() ) << " "
<< Automaton()->ActionName( _NextAction ) << "(" << Name()
<< ") ReStartAction ==>" << endl;
- State( SUPERV::SuspendedSuccessedState ) ;
+ State( GraphExecutor::SuspendedSuccessedState ) ;
if ( !ReStartAction( this , GraphExecutor::ReStartEvent ) ) {
cdebug << pthread_self() << "/" << ThreadNo()
<< " executeAction STATE & CALLED "
cdebug << pthread_self() << "/" << ThreadNo() << " " << Name() << " "
<< anInPort->PortName() << " ControlPort inactive." << endl ;
}
+// That InPort get its value from an other node
else if ( strcmp( DataFromNode() , anOutPort->NodeName() ) ) {
if ( anInPort->State() == SUPERV::ReadyState ) {
InReady += 1 ;
<< LoopBeginning << endl ;
}
}
+// That InPort get its value from the sending node
else if ( anInPort->IsGate() ) {
const CORBA::Any * theValue = anOutPort->Value() ;
long GateOpened ;
cdebug << endl ;
}
}
- else {
+ else if ( anOutPort->Done() ) {
InReady += 1 ;
anInPort->State( SUPERV::ReadyState ) ;
cdebug << pthread_self() << "/" << ThreadNo() << " " << Name() << " "
- << anInPort->PortName() << " is Done from "
- << anOutPort->NodeName() << " " << anOutPort->PortName() << " " ;
+ << anInPort->PortName() << " " << anInPort->PortStatus() << " is Done from "
+ << anOutPort->NodeName() << " " << anOutPort->PortName() << " " << anOutPort->PortStatus() << " " ;
#ifdef _DEBUG_
- if ( GraphBase::Base::_prof_debug ) {
- anOutPort->StringValue( *GraphBase::Base::_fdebug ) ;
- }
+ if ( GraphBase::Base::_prof_debug ) {
+ anOutPort->StringValue( *GraphBase::Base::_fdebug ) ;
+ }
#endif
- cdebug << endl ;
+ cdebug << endl ;
+// MacroNode : give immediately the value to the corresponding graph
+ if ( IsMacroNode() ) {
+ GraphExecutor::DataFlow * aMacroGraph = GraphMacroNode()->CoupledNode()->GraphExecutor() ;
+ cdebug << "SomeDataReadyAction MacroNode " << aMacroGraph->Graph()->Name() << " --> InputOfAny "
+ << InReady << "/" << GetNodeInPortsSize() << " InPorts are Ready" << endl ;
+// GraphMacroNode()->MacroObject()->InputOfAny( anInPort->PortName() , *anOutPort->Value() ) ;
+ aMacroGraph->InputOfAny( anInPort->PortName() , *anOutPort->Value() ) ;
+ }
+ }
+ else {
+ cdebug << pthread_self() << "/" << ThreadNo() << " " << Name() << " "
+ << anInPort->PortName() << " " << anInPort->PortStatus() << " is NOT Done from "
+ << anOutPort->NodeName() << " " << anOutPort->PortName() << " " << anOutPort->PortStatus() << " " ;
}
}
-
+
if ( InReady == GetNodeInPortsSize() ) { // All Flags != 0 :
res = SendEvent( GraphExecutor::AllDataReadyEvent ); // ==> Ready to execute
}
// << " CreateNewThreadIf " << CreateNewThreadIf() << " IsLockedDataWait "
// << IsLockedDataWait() ;
if ( IsLockedDataWait() ) {
-// cdebug << " WOULD DEAD-LOCK" << endl ;
+ cdebug << "DataUndef_AllDataReadyAction() WOULD DEAD-LOCK" << endl ;
return 0 ; // ==> DataUndef_AllDataReadyAction() after UnLockDataWait()
}
// cdebug << endl ;
ThreadNo( pthread_self() ) ;
}
_OutNode->PushEvent( this , GraphExecutor::AllDataReadyEvent ,
- SUPERV::DataReadyState ) ;
+ GraphExecutor::DataReadyState ) ;
ReadyAction() ;
SUPERV::ControlState aControl = ControlState() ;
switch ( aControl ) {
<< " Threads " << _OutNode->Threads() << " SuspendedThreads "
<< _OutNode->SuspendedThreads() << endl;
_OutNode->PushEvent( this , GraphExecutor::SuspendedReadyEvent ,
- SUPERV::SuspendedReadyState ) ;
+ GraphExecutor::SuspendedReadyState ) ;
GraphExecutor::InNode * aReStartNode = SuspendAction() ;
cdebug << pthread_self() << "/" << ThreadNo()
<< "DataReady_SuspendAction Resumed " << Name() << endl;
<< Name() << endl;
// ResumeAction() ;
_OutNode->PushEvent( this , GraphExecutor::ResumedReadyEvent ,
- SUPERV::ResumedReadyState ) ;
+ GraphExecutor::ResumedReadyState ) ;
return 1 ;
}
int GraphExecutor::InNode::DataReady_KillAction() {
_OutNode->PushEvent( this , GraphExecutor::KilledReadyEvent ,
- SUPERV::KilledReadyState ) ;
+ GraphExecutor::KilledReadyState ) ;
KillAction() ;
cdebug << pthread_self() << "/" << ThreadNo() << "DataReady_KillAction " << Name()
<< " will pthread_exit()" << endl;
int GraphExecutor::InNode::DataReady_StopAction() {
_OutNode->PushEvent( this , GraphExecutor::StoppedReadyEvent ,
- SUPERV::StoppedReadyState ) ;
+ GraphExecutor::StoppedReadyState ) ;
StopAction() ;
cdebug << pthread_self() << "/" << ThreadNo() << "DataReady_StopAction " << Name()
<< " will pthread_exit()" << endl;
// cdebug << pthread_self() << "/" << ThreadNo() << " --> DataReady_ExecuteAction "
// << Name() << endl;
_OutNode->PushEvent( this , GraphExecutor::ExecuteEvent ,
- SUPERV::ExecutingState ) ;
+ GraphExecutor::ExecutingState ) ;
RunningAction() ;
+
+ bool Err = false ;
+
SUPERV::GraphState PortState = SUPERV::ReadyState ;
- SUPERV::AutomatonState NewState = SUPERV::DataUndefState ;
+ GraphExecutor::AutomatonState NewState = GraphExecutor::DataUndefState ;
GraphExecutor::NodeEvent NewEvent = GraphExecutor::UndefinedEvent ;
- bool Err = false ;
+ int nInParams ;
+ ServicesAnyData * InParametersList ;
+ int nOutParams ;
+ ServicesAnyData * OutParametersList ;
- int nInParams = GetNodeInPortsSize() ;
- ServicesAnyData * InParametersList = new ServicesAnyData[nInParams];
+ nInParams = GetNodeInPortsSize() ;
+ InParametersList = new ServicesAnyData[nInParams];
InParametersSet( Err , nInParams , InParametersList ) ;
- Engines::Container_var myContainer ;
- Engines::Component_var myObjComponent ;
- if ( !IsFactoryNode() ) {
-// cdebug << ThreadNo() << "No Component : NO StartComponent & No Ping" << endl ;
- if ( IsComputingNode() ) {
- ObjInterface( true ) ;
- CORBA::Object_ptr obj ;
- InParametersList[0].Value >>= obj ;
- CORBA::Object_var objvar = CORBA::Object_var( obj ) ;
- myObjComponent = Engines::Component::_narrow( objvar ) ;
- }
- else {
+ nOutParams = GetNodeOutPortsSize() ;
+ OutParametersList = new ServicesAnyData[nOutParams];
+ InOutParametersSet( nOutParams , OutParametersList ) ;
+
+ if ( !IsMacroNode() ) {
+
+ Engines::Container_var myContainer ;
+ Engines::Component_var myObjComponent ;
+ if ( !IsFactoryNode() ) {
+// cdebug << ThreadNo() << "No Component : NO StartComponent & No Ping" << endl ;
+ if ( IsComputingNode() ) {
+ ObjInterface( true ) ;
+ CORBA::Object_ptr obj ;
+ InParametersList[0].Value >>= obj ;
+ CORBA::Object_var objvar = CORBA::Object_var( obj ) ;
+ myObjComponent = Engines::Component::_narrow( objvar ) ;
+ }
+ else {
+ }
}
- }
- else if ( CORBA::is_nil( Component() ) ) {
- ostringstream astr ;
- astr << "Graph " << _OutNode->Graph()->Name() << " Node " << Name()
- << " : load of component " << ComponentName() << " in container "
- << Computer() ;
-// _OutNode->Graph()->ObjImpl()->sendMessage( NOTIF_STEP, astr.str().c_str() ) ;
- Err = !_OutNode->Graph()->StartComponent( ThreadNo() , Computer() ,
- my_strdup( ComponentName() ) ,
- myContainer , myObjComponent ) ;
- ObjInterface( false ) ;
- SetContainer( myContainer ) ;
- SetComponent( myObjComponent ) ;
- }
- else {
- myContainer = Container() ;
- myObjComponent = Component() ;
-// cdebug << ThreadNo() << "Component known : NO StartComponent & Ping"
-// << endl ;
- try {
- myObjComponent->ping() ;
+ else if ( CORBA::is_nil( Component() ) ) {
+// ostringstream astr ;
+// astr << "Graph " << _OutNode->Graph()->Name() << " Node " << Name()
+// << " : load of component " << ComponentName() << " in container "
+// << Computer() ;
+// _OutNode->Graph()->ObjImpl()->sendMessage( NOTIF_STEP, astr.str().c_str() ) ;
+ Err = !_OutNode->Graph()->StartComponent( ThreadNo() , Computer() ,
+ my_strdup( ComponentName() ) ,
+ myContainer , myObjComponent ) ;
+ ObjInterface( false ) ;
+ SetContainer( myContainer ) ;
+ SetComponent( myObjComponent ) ;
}
- catch( ... ) {
- cdebug << "ping() catched" << endl ;
- Err = true ;
+ else {
+ myContainer = Container() ;
+ myObjComponent = Component() ;
+// cdebug << ThreadNo() << "Component known : NO StartComponent & Ping"
+// << endl ;
+ try {
+ myObjComponent->ping() ;
+ }
+ catch( ... ) {
+ cdebug << "ping() catched" << endl ;
+ Err = true ;
+ }
}
- }
-
- int nOutParams = GetNodeOutPortsSize() ;
- ServicesAnyData * OutParametersList = new ServicesAnyData[nOutParams];
- InOutParametersSet( nOutParams , OutParametersList ) ;
if ( Err || ControlState() == SUPERV::ToKillState ||
ControlState() == SUPERV::ToKillDoneState ||
}
else {
if ( !Err ) {
- ostringstream astr ;
- astr << "Graph " << _OutNode->Graph()->Name() << " Run of Node " << Name() ;
+// ostringstream astr ;
+// astr << "Graph " << _OutNode->Graph()->Name() << " Run of Node " << Name() ;
// _OutNode->Graph()->ObjImpl()->sendMessage( NOTIF_STEP, astr.str().c_str() ) ;
cdebug << ThreadNo() << " Run( '" << ServiceName() << "'" ;
for ( i = 0 ; i < (int ) ServiceInParameter().length() ; i++ ) {
}
}
}
-// }
+ }
// else {
// sleep( 1 ) ;
// }
- ostringstream astr ;
- astr << "Graph " << _OutNode->Graph()->Name() << " Node " << Name() << " is done : "
- << Automaton()->StateName( State() ) ;
+// ostringstream astr ;
+// astr << "Graph " << _OutNode->Graph()->Name() << " Node " << Name() << " is done : "
+// << Automaton()->StateName( State() ) ;
// _OutNode->Graph()->ObjImpl()->sendMessage( NOTIF_STEP, astr.str().c_str() ) ;
if ( Err ) {
if ( ControlState() == SUPERV::ToKillState ||
ControlState() == SUPERV::ToKillDoneState ||
ControlState() == SUPERV::ToStopState ) {
PortState = SUPERV::ErrorState ;
- NewState = SUPERV::KilledState ;
+ NewState = GraphExecutor::KilledState ;
NewEvent = GraphExecutor::KillEvent ;
}
else {
PortState = SUPERV::ErrorState ;
- NewState = SUPERV::ErroredState ;
+ NewState = GraphExecutor::ErroredState ;
NewEvent = GraphExecutor::ErrorEvent ;
}
}
else {
PortState = SUPERV::ReadyState ;
- NewState = SUPERV::DataReadyState ;
+ NewState = GraphExecutor::DataReadyState ;
NewEvent = GraphExecutor::SuccessEvent ;
}
- bool ErrOut = OutParametersSet( Err , PortState , nOutParams , OutParametersList ) ;
-
- if ( !ErrOut ) {
- NewEvent = GraphExecutor::ErrorEvent ;
+ if ( !IsMacroNode() ) {
+ bool ErrOut = OutParametersSet( Err , PortState , nOutParams , OutParametersList ) ;
+ if ( !ErrOut ) {
+ NewEvent = GraphExecutor::ErrorEvent ;
+ }
+ delete [] InParametersList ;
+ delete [] OutParametersList ;
}
- delete [] InParametersList ;
- delete [] OutParametersList ;
-
-
- SendEvent( NewEvent );
+ if ( !IsMacroNode() ) {
+ SendEvent( NewEvent ) ;
+ }
+ else {
+ GraphExecutor::DataFlow * aMacroGraph = GraphMacroNode()->CoupledNode()->GraphExecutor() ;
+ cdebug << ThreadNo() << " DataReady_ExecuteAction " << aMacroGraph->Graph()->Name() << " ->DoneWait()"
+ << " State " << aMacroGraph->State() << endl;
+ aMacroGraph->DoneWait() ;
+ cdebug << ThreadNo() << " DataReady_ExecuteAction " << Name() << " State " << aMacroGraph->State() << endl;
+ if ( aMacroGraph->State() == SUPERV::DoneState ) {
+ PortState = SUPERV::ReadyState ;
+ NewState = GraphExecutor::DataReadyState ;
+ NewEvent = GraphExecutor::SuccessEvent ;
+ }
+ else {
+ Err = true ;
+ if ( ControlState() == SUPERV::ToKillState ||
+ ControlState() == SUPERV::ToKillDoneState ||
+ ControlState() == SUPERV::ToStopState ) {
+ PortState = SUPERV::ErrorState ;
+ NewState = GraphExecutor::KilledState ;
+ NewEvent = GraphExecutor::KillEvent ;
+ }
+ else {
+ PortState = SUPERV::ErrorState ;
+ NewState = GraphExecutor::ErroredState ;
+ NewEvent = GraphExecutor::ErrorEvent ;
+ }
+ }
+ bool ErrOut = OutParametersSet( Err , PortState , nOutParams , OutParametersList ) ;
+ if ( !ErrOut ) {
+ NewEvent = GraphExecutor::ErrorEvent ;
+ }
+ delete [] InParametersList ;
+ delete [] OutParametersList ;
+ SendEvent( NewEvent ) ;
+ }
// cdebug << ThreadNo() << " <-- DataReady_ExecuteAction " << Name() << endl;
return 1 ;
int GraphExecutor::InNode::Executing_SuspendAction() {
_OutNode->PushEvent( this , GraphExecutor::SuspendedExecutingEvent ,
- SUPERV::SuspendedExecutingState ) ;
+ GraphExecutor::SuspendedExecutingState ) ;
cdebug << ThreadNo() << " Executing_SuspendAction " << Name() << endl;
return 1 ;
}
int GraphExecutor::InNode::SuspendedExecuting_ResumeAction() {
cdebug << ThreadNo() << " SuspendedExecuting_ResumeAction " << Name() << endl;
- SUPERV::AutomatonState next_state ;
+ GraphExecutor::AutomatonState next_state ;
next_state = Automaton()->NextState( State() , GraphExecutor::ExecutingEvent ) ;
_OutNode->NewThread() ; // Only for Threads count
_OutNode->PushEvent( this , GraphExecutor::ResumedExecutingEvent ,
cdebug << "Executing_KillAction would pthread_canceled itself" << endl ;
KillAction() ;
_OutNode->PushEvent( this , GraphExecutor::KilledExecutingEvent ,
- SUPERV::KilledExecutingState ) ;
+ GraphExecutor::KilledExecutingState ) ;
RetVal = 1 ;
}
else if ( pthread_cancel( ThreadNo() ) ) {
KillAction() ;
_OutNode->ExitThread() ;
_OutNode->PushEvent( this , GraphExecutor::KilledExecutingEvent ,
- SUPERV::KilledExecutingState ) ;
+ GraphExecutor::KilledExecutingState ) ;
}
return RetVal ;
}
StopAction() ;
_OutNode->ExitThread() ;
_OutNode->PushEvent( this , GraphExecutor::StoppedExecutingEvent ,
- SUPERV::StoppedExecutingState ) ;
+ GraphExecutor::StoppedExecutingState ) ;
}
return RetVal ;
}
int GraphExecutor::InNode::Executing_SuccessAction() {
// cdebug << ThreadNo() << " --> Executing_SuccessAction " << Name() << endl;
_OutNode->PushEvent( this , GraphExecutor::SuccessedExecutingEvent ,
- SUPERV::SuccessedState ) ;
+ GraphExecutor::SuccessedState ) ;
SUPERV::ControlState aControl = ControlState() ;
switch ( aControl ) {
case SUPERV::VoidState : {
int GraphExecutor::InNode::Executing_ErrorAction() {
cdebug << ThreadNo() << " --> Executing_ErrorAction " << Name() << endl;
_OutNode->PushEvent( this , GraphExecutor::ErroredExecutingEvent ,
- SUPERV::ErroredState ) ;
+ GraphExecutor::ErroredState ) ;
SUPERV::ControlState aControl = ControlState() ;
switch ( aControl ) {
int i ;
int j ;
bool docdebug = false ;
- State( SUPERV::DataWaitingState ) ;
+ State( GraphExecutor::DataWaitingState ) ;
for ( i = 0 ; i < GetNodeInPortsSize() ; i++ ) {
GraphBase::InPort * anInPort = GetChangeNodeInPort( i ) ;
if ( anInPort->IsGate() ) { // Loop : Open the doors
}
else if ( anInPort->State() != SUPERV::WaitingState ) {
if ( !docdebug ) {
-// cdebug << ThreadNo()
-// << " --> GraphExecutor::InNodeThreads::SetWaitingStates " << Name() << endl;
+ cdebug << ThreadNo()
+ << " --> GraphExecutor::InNodeThreads::SetWaitingStates " << Name() << endl;
docdebug = true ;
}
if ( !anInPort->IsDataStream() ) {
!( IsEndLoopNode() && ( anOutPort->IsGate() ||
anOutPort->IsLoop() ) ) &&
!anOutPort->IsDataStream() &&
- !anOutPort->ChangeInPorts( j )->IsDataStream() ) {
-// cdebug << ThreadNo()
-// << " GraphExecutor::InNodeThreads::SetWaitingStates "
-// << Name() << "( " << anOutPort->PortName() << " ) --> InPort "
-// << anOutPort->ChangeInPorts( j )->PortName() << " from Node "
-// << anOutPort->ChangeInPorts( j )->NodeName() << endl;
+ !anOutPort->ChangeInPorts( j )->IsDataStream() &&
+ !anOutPort->ChangeInPorts( j )->IsExternConnected() ) {
+ cdebug << ThreadNo()
+ << " GraphExecutor::InNodeThreads::SetWaitingStates "
+ << Name() << "( " << anOutPort->PortName() << " " << anOutPort->PortStatus() << " ) --> InPort "
+ << anOutPort->ChangeInPorts( j )->PortName() << " "
+ << anOutPort->ChangeInPorts( j )->PortStatus() << " from Node "
+ << anOutPort->ChangeInPorts( j )->NodeName() << endl;
GraphExecutor::InNode * aNode = (GraphExecutor::InNode * ) _OutNode->Graph()->GetChangeGraphNode( anOutPort->ChangeInPorts( j )->NodeName() )->GetInNode() ;
if ( aNode != EndNode ) {
aNode->SetWaitingStates( EndNode ) ;
}
int GraphExecutor::InNode::Successed_SuccessAction() {
-// cdebug << ThreadNo() << " --> Successed_SuccessAction " << Name() << endl;
+ cdebug << ThreadNo() << " --> Successed_SuccessAction " << Name() << endl;
int res = 1;
int linkednodesnumber = LinkedNodesSize() ;
GraphExecutor::InNode *firstzeroNode = NULL ;
DoneAction() ;
+ if ( IsMacroNode() ) {
+ cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " LinkedNodes->SomeDataReady already done"
+ << endl ;
+ return 1;
+ }
+
if ( IsGOTONode() ||
( IsEndLoopNode() && GetNodeInLoop()->GetOutPort()->BoolValue() ) ) {
cdebug << ThreadNo() << " Successed_SuccessAction " << Name()
for ( i = 0 ; i < aGateOutPort->InPortsSize() ; i++ ) {
const GraphBase::InPort * anInPort = aGateOutPort->InPorts( i ) ;
GraphExecutor::InNode * aLabelNode = (GraphExecutor::InNode *) _OutNode->Graph()->GetChangeGraphNode( anInPort->NodeName() )->GetInNode() ;
-// cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " will Loop to HeadNode "
-// << aLabelNode->Name() << " from port " << anInPort->PortName() << endl ;
+ cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " will Loop to HeadNode "
+ << aLabelNode->Name() << " from port " << anInPort->PortName() << endl ;
aLabelNode->SetWaitingStates( this ) ;
for ( j = 0 ; j < aLabelNode->GetNodeInPortsSize() ; j++ ) {
const GraphBase::InPort * anInPort = aLabelNode->GetNodeInPort( j ) ;
if ( anInPort->GetOutPort() ) {
-// cdebug << aLabelNode->Name() << "(" << anInPort->PortName() << ") value : "
-// << anInPort->GetOutPort()->NodeName() << "(" << anInPort->GetOutPort()->PortName() << ")"
-// << endl ;
+ cdebug << aLabelNode->Name() << "(" << anInPort->PortName() << ") value : "
+ << anInPort->GetOutPort()->NodeName() << "(" << anInPort->GetOutPort()->PortName() << ")"
+ << endl ;
}
}
for ( j = 0 ; j < GetNodeOutPortsSize() ; j++ ) {
}
if ( aBusParamChangeInPort ) {
aBusParamChangeInPort->ChangeOutPort( aBusParamOutPort ) ;
-// cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " ChangeOutPort to HeadNode "
-// << aLabelNode->Name() << "(" << aBusParamChangeInPort->PortName() << ") from port "
-// << aBusParamOutPort->PortName() << endl ;
+ cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " ChangeOutPort to HeadNode "
+ << aLabelNode->Name() << "(" << aBusParamChangeInPort->PortName() << ") from port "
+ << aBusParamOutPort->PortName() << endl ;
if ( !aLabelNode->IsLockedDataWait() ) {
res = aLabelNode->SendSomeDataReady( Name() ) ;
if ( res ) {
if ( firsttoNode == NULL &&
aLabelNode->ThreadNo() == pthread_self() ) {
firsttoNode = aLabelNode ;
-// cdebug << ThreadNo() << " Successed_SuccessAction firsttoNode "
-// << aLabelNode->Name() << endl ;
+ cdebug << ThreadNo() << " Successed_SuccessAction firsttoNode "
+ << aLabelNode->Name() << endl ;
}
else if ( firstzeroNode == NULL &&
aLabelNode->ThreadNo() == 0 ) {
}
else {
SomeDataNodes.push_back( aLabelNode ) ;
-// cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " push "
-// << aLabelNode->Name() << " " << SomeDataNodes.size()
-// << endl ;
+ cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " push "
+ << aLabelNode->Name() << " " << SomeDataNodes.size()
+ << endl ;
}
}
}
else {
-// cdebug << ThreadNo()
-// << " Successed_SuccessAction Loop to HeadNode "
-// << aLabelNode->Name() << " with datas from " << Name() << "("
-// << aBusParamOutPort->PortName() << ") to port "
-// << aBusParamChangeInPort->PortName() << endl;
+ cdebug << ThreadNo()
+ << " Successed_SuccessAction Loop to HeadNode "
+ << aLabelNode->Name() << " with datas from " << Name() << "("
+ << aBusParamOutPort->PortName() << ") to port "
+ << aBusParamChangeInPort->PortName() << endl;
}
}
else {
-// cdebug << ThreadNo() << " ERROR in Successed_SuccessAction of " << Name()
-// << " NO port " << aBusParamOutPort->PortName() << " in "
-// << aLabelNode->Name() << endl;
+ cdebug << ThreadNo() << " ERROR in Successed_SuccessAction of " << Name()
+ << " NO port " << aBusParamOutPort->PortName() << " in "
+ << aLabelNode->Name() << endl;
}
}
}
for ( j = 0 ; j < aLabelNode->GetNodeInPortsSize() ; j++ ) {
const GraphBase::InPort * anInPort = aLabelNode->GetNodeInPort( j ) ;
if ( anInPort->GetOutPort() ) {
-// cdebug << aLabelNode->Name() << "(" << anInPort->PortName() << ") value : "
-// << anInPort->GetOutPort()->NodeName() << "(" << anInPort->GetOutPort()->PortName() << ")"
-// << endl ;
+ cdebug << aLabelNode->Name() << "(" << anInPort->PortName() << ") value : "
+ << anInPort->GetOutPort()->NodeName() << "(" << anInPort->GetOutPort()->PortName() << ")"
+ << endl ;
}
}
const GraphBase::InPort * aGateInPort = aLabelNode->GetNodeInGate() ;
if ( firsttoNode == NULL &&
aLabelNode->ThreadNo() == pthread_self() ) {
firsttoNode = aLabelNode ;
-// cdebug << ThreadNo() << " Successed_SuccessAction firsttoNode "
-// << aLabelNode->Name() << endl ;
+ cdebug << ThreadNo() << " Successed_SuccessAction firsttoNode "
+ << aLabelNode->Name() << endl ;
}
else if ( firstzeroNode == NULL &&
aLabelNode->ThreadNo() == 0 ) {
}
else {
SomeDataNodes.push_back( aLabelNode ) ;
-// cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " push "
-// << aLabelNode->Name() << " " << SomeDataNodes.size()
-// << endl ;
+ cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " push "
+ << aLabelNode->Name() << " " << SomeDataNodes.size()
+ << endl ;
}
}
}
}
else {
-// cdebug << ThreadNo() << " Successed_SuccessAction of " << Name()
-// << " with " << LinkedNodesSize() << " linked nodes :" ;
+ cdebug << ThreadNo() << " Successed_SuccessAction of " << Name()
+ << " with " << LinkedNodesSize() << " linked nodes :" ;
for ( i = 0 ; i < LinkedNodesSize() ; i++ ) {
if ( LinkedNodes( i )->IsDataFlowNode() ) {
linkednodesnumber -= 1 ;
}
-// cdebug << " " << LinkedNodes( i )->Name() ;
+ cdebug << " " << LinkedNodes( i )->Name() ;
}
-// cdebug << endl;
+ cdebug << endl;
for ( i = 0 ; i < LinkedNodesSize() ; i++ ) {
bool IgnoreForEndLoop = false ;
GraphBase::ComputingNode * aComputingNode ;
aComputingNode = (GraphBase::ComputingNode * ) LinkedNodes( i ) ;
toNode = (GraphExecutor::InNode *) aComputingNode->GetInNode() ;
-// cdebug << ThreadNo() << " Successed_SuccessAction of " << Name()
-// << " [" << i << "] " << LinkedNodes( i )->Name() << endl ;
+ cdebug << ThreadNo() << " Successed_SuccessAction of " << Name()
+ << " [" << i << "] " << LinkedNodes( i )->Name() << " toNode " << toNode << " IgnoreForEndLoop "
+ << IgnoreForEndLoop ;
+ if ( toNode ) {
+ cdebug << " " << toNode->Kind() << endl ;
+ }
if ( toNode && !toNode->IsDataFlowNode() ) {
if ( IsComputingNode() && toNode->IsInLineNode() ) {
GraphBase::InPort * toGateInPort = toNode->GetChangeNodeInGate() ;
toNode->GetChangeNodeInPort( j )->InitialOutPort() ;
}
}
+ cdebug << ThreadNo() << " Successed_SuccessAction " << toNode->Name() << "->SendSomeDataReady( "
+ << Name() << " )" << endl ;
res = toNode->SendSomeDataReady( Name() ) ;
if ( res ) {
if ( firsttoNode == NULL &&
toNode->ThreadNo() == pthread_self() ) {
firsttoNode = toNode ;
-// cdebug << ThreadNo() << " Successed_SuccessAction firsttoNode "
-// << toNode->Name() << endl ;
+ cdebug << ThreadNo() << " Successed_SuccessAction firsttoNode "
+ << toNode->Name() << endl ;
}
else if ( firstzeroNode == NULL &&
toNode->ThreadNo() == 0 ) {
}
else {
SomeDataNodes.push_back( toNode ) ;
-// cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " push "
-// << toNode->Name() << " " << SomeDataNodes.size() << endl ;
+ cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " push "
+ << toNode->Name() << " " << SomeDataNodes.size() << endl ;
}
}
}
if ( firsttoNode == NULL && firstzeroNode ) {
firsttoNode = firstzeroNode ;
-// cdebug << ThreadNo()
-// << " Successed_SuccessAction firsttoNode = firstzeroNode "
-// << endl ;
+ cdebug << ThreadNo()
+ << " Successed_SuccessAction firsttoNode = firstzeroNode "
+ << endl ;
}
else if ( firsttoNode && firstzeroNode ) {
SomeDataNodes.push_back( firstzeroNode ) ;
-// cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " push firstzeroNode "
-// << firstzeroNode->Name() << " " << SomeDataNodes.size() << endl ;
+ cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " push firstzeroNode "
+ << firstzeroNode->Name() << " " << SomeDataNodes.size() << endl ;
+ }
+ else {
+ cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " firsttoNode " << firsttoNode
+ << " firstzeroNode " << firstzeroNode << endl ;
}
while ( SomeDataNodes.size() ) {
// cdebug << pthread_self() << "/" << ThreadNo()
// << " Successed_SuccessAction pop "
// << SomeDataNodes.size() << " " << aNode->Name() << endl ;
- if ( aNode->State() == SUPERV::DataReadyState ) {
+ if ( aNode->State() == GraphExecutor::DataReadyState ) {
aNode->CreateNewThreadIf( true ) ;
aNode->UnLockDataWait() ;
res = aNode->DataUndef_AllDataReadyAction() ;
// << SomeDataNodes.size() << " " << firsttoNode->Name() << endl ;
firsttoNode->CreateNewThreadIf( false ) ;
firsttoNode->RewindStack( RewindStack() ) ;
- if ( firsttoNode->State() == SUPERV::SuccessedState ) {
+ if ( firsttoNode->State() == GraphExecutor::SuccessedState ) {
// cdebug << pthread_self() << "/" << ThreadNo() << " " << Name()
// << " : " << firsttoNode->Name() << " "
// << Automaton()->StateName( firsttoNode->State() )
// << " --> DataWaitingState for Thread "
// << firsttoNode->ThreadNo() << endl ;
- firsttoNode->State( SUPERV::DataWaitingState ) ;
+ firsttoNode->State( GraphExecutor::DataWaitingState ) ;
}
// pthread_t OldT = firsttoNode->ThreadNo() ;
firsttoNode->ThreadNo( pthread_self() ) ;
// << " !firsttoNode->CreateNewThreadIf() "
// << !firsttoNode->CreateNewThreadIf()
// << " " << Automaton()->StateName( firsttoNode->State() ) ;
- if ( firsttoNode->State() == SUPERV::DataReadyState ) {
+ if ( firsttoNode->State() == GraphExecutor::DataReadyState ) {
cdebug << endl ;
firsttoNode->UnLockDataWait() ;
res = firsttoNode->DataUndef_AllDataReadyAction() ;
bool GraphExecutor::InNode::SendSomeDataReady( char * FromNodeName ) {
bool RetVal = false ;
if ( IsDataFlowNode() ) {
-// cdebug << ThreadNo() << " ----> " << Name()
-// << " send Result to graph " << Name() << endl;
+ cdebug << ThreadNo() << " ----> " << Name()
+ << " send Result to graph " << Name() << endl;
}
else {
// cdebug << pthread_self() << "/" << ThreadNo() << " ----> " << FromNodeName
// << " CreateNewThreadIf() " << CreateNewThreadIf()
// << " LockedDataWait " << IsLockedDataWait() << endl;
#if 0
- cout << pthread_self() << "/" << ThreadNo() << " ----> " << FromNodeName
+ //cout << pthread_self() << "/" << ThreadNo() << " ----> " << FromNodeName
<< " send SomeDataReady to " << Name() << " "
<< Automaton()->StateName( State() )
<< " CreateNewThreadIf() " << CreateNewThreadIf()
<< " LockedDataWait " << IsLockedDataWait() << endl;
#endif
- if ( State() == SUPERV::SuccessedState ||
- State() == SUPERV::SuspendedSuccessedState ||
- State() == SUPERV::SuspendedSuccessedToReStartState ) {
+ if ( State() == GraphExecutor::SuccessedState ||
+ State() == GraphExecutor::SuspendedSuccessedState ||
+ State() == GraphExecutor::SuspendedSuccessedToReStartState ) {
// cdebug << ThreadNo() << " " << FromNodeName
// << " : " << Name() << " " << Automaton()->StateName( State() )
// << " --> DataWaitingState for Thread "
// << ThreadNo() << " " << endl ;
- State( SUPERV::DataWaitingState ) ;
+ State( GraphExecutor::DataWaitingState ) ;
}
LockDataWait() ;
DataFromNode( FromNodeName ) ;
<< " Threads " << _OutNode->Threads() << " SuspendedThreads "
<< _OutNode->SuspendedThreads() << endl;
_OutNode->PushEvent( this , GraphExecutor::SuspendedSuccessedEvent ,
- SUPERV::SuspendedSuccessedState ) ;
+ GraphExecutor::SuspendedSuccessedState ) ;
DoneAction() ;
GraphExecutor::InNode * aReStartNode = SuspendAction() ;
cdebug << ThreadNo() << " Successed_SuspendAction Resumed " << Name() ;
<< " Threads " << _OutNode->Threads() << " SuspendedThreads "
<< _OutNode->SuspendedThreads() << endl;
_OutNode->PushEvent( this , GraphExecutor::SuspendedErroredEvent ,
- SUPERV::SuspendedErroredState ) ;
+ GraphExecutor::SuspendedErroredState ) ;
DoneAction() ;
GraphExecutor::InNode * aReStartNode = SuspendAction() ;
cdebug << ThreadNo() << " Errored_SuspendAction Resumed " << Name()
cdebug << ThreadNo() << " SuspendedSuccessed_ResumeAction " << Name() << endl;
// ResumeAction() ;
_OutNode->PushEvent( this , GraphExecutor::ResumedSuccessedEvent ,
- SUPERV::ResumedSuccessedState ) ;
+ GraphExecutor::ResumedSuccessedState ) ;
SendEvent( ResumedSuccessedEvent ) ;
return 1 ;
}
cdebug << ThreadNo() << " SuspendedErrored_ResumeAction " << Name() << endl;
// ResumeAction() ;
_OutNode->PushEvent( this , GraphExecutor::ResumedErroredEvent ,
- SUPERV::ResumedErroredState ) ;
+ GraphExecutor::ResumedErroredState ) ;
SendEvent( ResumedErroredEvent ) ;
return 1 ;
}
int GraphExecutor::InNode::Successed_KillAction() {
KillAction() ;
_OutNode->PushEvent( this , GraphExecutor::KilledEvent ,
- SUPERV::KilledSuccessedState ) ;
+ GraphExecutor::KilledSuccessedState ) ;
cdebug << ThreadNo() << " Successed_KillAction " << Name() << endl;
return 1 ;
}
int GraphExecutor::InNode::Errored_KillAction() {
KillAction() ;
_OutNode->PushEvent( this , GraphExecutor::KilledEvent ,
- SUPERV::KilledErroredState ) ;
+ GraphExecutor::KilledErroredState ) ;
cdebug << ThreadNo() << " Errored_KillAction " << Name() << endl;
return 1 ;
}
int GraphExecutor::InNode::Successed_StopAction() {
StopAction() ;
_OutNode->PushEvent( this , GraphExecutor::StoppedEvent ,
- SUPERV::StoppedSuccessedState ) ;
+ GraphExecutor::StoppedSuccessedState ) ;
cdebug << ThreadNo() << " Successed_StopAction " << Name() << endl;
return 1 ;
}
int GraphExecutor::InNode::Errored_StopAction() {
StopAction() ;
_OutNode->PushEvent( this , GraphExecutor::StoppedEvent ,
- SUPERV::StoppedErroredState ) ;
+ GraphExecutor::StoppedErroredState ) ;
cdebug << ThreadNo() << " Errored_StopAction " << Name() << endl;
return 1 ;
}
int GraphExecutor::InNode::SuspendedSuccessed_ReStartAction() {
cdebug << ThreadNo() << " SuspendedSuccessed_ReStartAction " << Name() << endl;
_OutNode->PushEvent( this , GraphExecutor::ReStartedEvent ,
- SUPERV::ReStartedState ) ;
+ GraphExecutor::ReStartedState ) ;
int i ;
for ( i = 0 ; i < GetNodeInPortsSize() ; i++ ) {
GetChangeNodeInPort( i )->State( SUPERV::ReadyState ) ;
int GraphExecutor::InNode::SuspendedErrored_ReStartAction() {
cdebug << ThreadNo() << " SuspendedErrored_ReStartAction " << Name() << endl;
_OutNode->PushEvent( this , GraphExecutor::ReStartedEvent ,
- SUPERV::ReStartedState ) ;
+ GraphExecutor::ReStartedState ) ;
int i ;
for ( i = 0 ; i < GetNodeInPortsSize() ; i++ ) {
GetChangeNodeInPort( i )->State( SUPERV::ReadyState ) ;
cdebug << ThreadNo() << " SuspendedSuccessed_ReStartAndSuspendAction " << Name()
<< endl;
_OutNode->PushEvent( this , GraphExecutor::ReStartedAndSuspendEvent ,
- SUPERV::ReStartedState ) ;
- State( SUPERV::DataWaitingState ) ;
+ GraphExecutor::ReStartedState ) ;
+ State( GraphExecutor::DataWaitingState ) ;
if ( !Suspend() ) {
cdebug << "InNode::Suspend() Node " << Name() << endl ;
return false ;
cdebug << ThreadNo() << " SuspendedErrored_ReStartAndSuspendAction " << Name()
<< endl;
_OutNode->PushEvent( this , GraphExecutor::ReStartedAndSuspendEvent ,
- SUPERV::ReStartedState ) ;
- State( SUPERV::DataWaitingState ) ;
+ GraphExecutor::ReStartedState ) ;
+ State( GraphExecutor::DataWaitingState ) ;
if ( !Suspend() ) {
cdebug << "InNode::Suspend() Node " << Name() << endl ;
return false ;
int i ;
GraphBase::OutPort * aGateOutPort = NULL ;
bool OrSwitch = false ;
- if ( nOutParams ) {
+ cdebug << "OutParametersSet " << Name() << " nOutParams " << nOutParams << " NewState " << NewState << endl ;
+// cout << "OutParametersSet " << Name() << " nOutParams " << nOutParams << " NewState " << NewState << endl ;
+ if ( nOutParams && !IsMacroNode() ) {
GraphBase::OutPort * anOutPort ;
for ( i = 0 ; i < nOutParams ; i++ ) {
anOutPort = GetChangeNodeOutPort(i) ;
int j ;
for ( j = 0 ; j < anOutPort->InPortsSize() ; j++ ) {
bool fromGOTO = false ;
- GraphBase::OutPort * aGOTOPort = _OutNode->Graph()->GetChangeGraphNode( anOutPort->ChangeInPorts( j )->NodeName() )->GetChangeNodeInGate()->GetOutPort() ;
- if ( aGOTOPort ) {
- fromGOTO = aGOTOPort->IsGOTO() ;
- }
- if ( anOutPort->ChangeInPorts( j )->IsEndSwitch() || fromGOTO ) {
- cdebug << anOutPort->ChangeInPorts( j )->NodeName() << "("
- << anOutPort->ChangeInPorts( j )->PortName() << ","
- << anOutPort->ChangeInPorts( j )->Kind() << ") WILL BE changed from "
- << anOutPort->ChangeInPorts( j )->GetOutPort()->NodeName()
- << "("
- << anOutPort->ChangeInPorts( j )->GetOutPort()->PortName()
- << ") to " << anOutPort->NodeName() << "("
- << anOutPort->PortName() << ")" << endl ;
- anOutPort->ChangeInPorts( j )->ChangeOutPort( anOutPort ) ;
- }
+ const char * ToNodeName = anOutPort->ChangeInPorts( j )->NodeName() ;
+ if ( !strcmp( ToNodeName , _OutNode->Graph()->Name() ) && _OutNode->Graph()->GraphMacroLevel() != 0 ) {
+ cdebug << "OutParametersSet ToNodeName " << _OutNode->Graph()->CoupledNode()
+ << " GraphExecutor " << _OutNode->Graph()->CoupledNode()->GraphExecutor() << endl ;
+ _OutNode->Graph()->CoupledNode()->GraphExecutor()->OutputOfAny( _OutNode->Graph()->CoupledNodeName() ,
+ anOutPort->ChangeInPorts( j )->PortName() ,
+ *anOutPort->Value() ) ;
+ }
else {
- cdebug << anOutPort->ChangeInPorts( j )->NodeName() << "("
- << anOutPort->ChangeInPorts( j )->PortName() << ","
- << anOutPort->ChangeInPorts( j )->Kind() << ") NOT changed from "
- << anOutPort->ChangeInPorts( j )->GetOutPort()->NodeName()
- << "("
- << anOutPort->ChangeInPorts( j )->GetOutPort()->PortName()
- << ") to " << anOutPort->NodeName() << "("
- << anOutPort->PortName() << ")" << endl ;
+ GraphBase::ComputingNode * ToNode = _OutNode->Graph()->GetChangeGraphNode( ToNodeName ) ;
+ if ( ToNode ) {
+// cout << "OutParametersSet ToNodeName " << ToNodeName << endl ;
+ cdebug << "OutParametersSet ToNodeName " << ToNodeName << " " << ToNode->Name() << endl ;
+ GraphBase::OutPort * aGOTOPort = ToNode->GetChangeNodeInGate()->GetOutPort() ;
+ if ( aGOTOPort ) {
+ fromGOTO = aGOTOPort->IsGOTO() ;
+ }
+ if ( anOutPort->ChangeInPorts( j )->IsEndSwitch() || fromGOTO ) {
+ cdebug << anOutPort->ChangeInPorts( j )->NodeName() << "("
+ << anOutPort->ChangeInPorts( j )->PortName() << ","
+ << anOutPort->ChangeInPorts( j )->Kind() << ") WILL BE changed from "
+ << anOutPort->ChangeInPorts( j )->GetOutPort()->NodeName()
+ << "("
+ << anOutPort->ChangeInPorts( j )->GetOutPort()->PortName()
+ << ") to " << anOutPort->NodeName() << "("
+ << anOutPort->PortName() << ")" << endl ;
+ anOutPort->ChangeInPorts( j )->ChangeOutPort( anOutPort ) ;
+ }
+ else {
+ cdebug << anOutPort->ChangeInPorts( j )->NodeName() << "("
+ << anOutPort->ChangeInPorts( j )->PortName() << ","
+ << anOutPort->ChangeInPorts( j )->Kind() << ") NOT changed from "
+ << anOutPort->ChangeInPorts( j )->GetOutPort()->NodeName()
+ << "("
+ << anOutPort->ChangeInPorts( j )->GetOutPort()->PortName()
+ << ") to " << anOutPort->NodeName() << "("
+ << anOutPort->PortName() << ")" << endl ;
+ }
+ }
}
}
//#if 0
_Done = false ;
_Threads = 0 ;
_ControlState = SUPERV::VoidState ;
- _State = SUPERV::UnKnownState ;
+ _State = GraphExecutor::UnKnownState ;
_PyInitialized = false ;
pthread_mutex_init( &_MutexWait , NULL ) ;
pthread_mutex_init( &_PyMutexWait , NULL ) ;
if ( aKindOfNode == SUPERV::DataFlowGraph ) {
_StreamGraph = NULL ;
// _Graph = new GraphBase::Graph( ORB , ptrNamingService , DataFlowName , DebugFileName ) ;
- _Graph = new GraphBase::Graph( ORB , ptrNamingService , DataFlowName ,
+ _Graph = new GraphBase::Graph( ORB , ptrNamingService , DataFlowName , aKindOfNode ,
_prof_debug , _fdebug ) ;
}
else if ( aKindOfNode == SUPERV::DataStreamGraph ) {
// _StreamGraph = new GraphBase::StreamGraph( ORB , ptrNamingService , DataFlowName , DebugFileName ) ;;
- _StreamGraph = new GraphBase::StreamGraph( ORB , ptrNamingService , DataFlowName ,
+ _StreamGraph = new GraphBase::StreamGraph( ORB , ptrNamingService , DataFlowName , aKindOfNode ,
_prof_debug , _fdebug ) ;
_Graph = _StreamGraph ;
}
_Done = false ;
_Threads = 0 ;
_ControlState = SUPERV::VoidState ;
- _State = SUPERV::UnKnownState ;
+ _State = GraphExecutor::UnKnownState ;
_PyInitialized = false ;
_Orb = CORBA::ORB::_duplicate( ORB ) ;
pthread_mutex_init( &_MutexWait , NULL ) ;
cdebug_out << "GraphEditor::OutNode::OutNode" << endl;
}
-GraphExecutor::OutNode::OutNode(
- CORBA::ORB_ptr ORB,
- SALOME_NamingService* ptrNamingService ,
- const SALOME_ModuleCatalog::Service& DataFlowService ,
- const char *DataFlowComponentName ,
- const char *DataFlowInterfaceName ,
- const char *DataFlowName ,
- const SUPERV::KindOfNode DataFlowkind ,
- const SUPERV::SDate DataFlowFirstCreation ,
- const SUPERV::SDate DataFlowLastModification ,
- const char * DataFlowEditorRelease ,
- const char * DataFlowAuthor ,
- const char * DataFlowComputer ,
- const char * DataFlowComment ,
- const char * DebugFileName ) {
-// Graph( ORB , ptrNamingService , DataFlowService , DataFlowComponentName ,
-// DataFlowInterfaceName , DataFlowName , DataFlowkind ,
-// DataFlowFirstCreation , DataFlowLastModification ,
-// DataFlowEditorRelease , DataFlowAuthor ,
-// DataFlowComputer , DataFlowComment , DebugFileName ) {
+GraphExecutor::OutNode::OutNode( CORBA::ORB_ptr ORB,
+ SALOME_NamingService* ptrNamingService ,
+ const SALOME_ModuleCatalog::Service& DataFlowService ,
+ const char *DataFlowComponentName ,
+ const char *DataFlowInterfaceName ,
+ const char *DataFlowName ,
+ const SUPERV::KindOfNode DataFlowkind ,
+ const SUPERV::SDate DataFlowFirstCreation ,
+ const SUPERV::SDate DataFlowLastModification ,
+ const char * DataFlowEditorRelease ,
+ const char * DataFlowAuthor ,
+ const char * DataFlowComputer ,
+ const char * DataFlowComment ,
+ const char * DebugFileName ) {
+// Graph( ORB , ptrNamingService , DataFlowService , DataFlowComponentName ,
+// DataFlowInterfaceName , DataFlowName , DataFlowkind ,
+// DataFlowFirstCreation , DataFlowLastModification ,
+// DataFlowEditorRelease , DataFlowAuthor ,
+// DataFlowComputer , DataFlowComment , DebugFileName ) {
Set_prof_debug( ORB , DebugFileName ) ;
cdebug_in << "GraphEditor::OutNode::OutNode(" << DataFlowName << " , " << DataFlowkind << ")" << endl;
if ( DataFlowkind == SUPERV::DataFlowGraph ) {
_StreamGraph = NULL ;
_Graph = new GraphBase::Graph( ORB , ptrNamingService , DataFlowService , DataFlowComponentName ,
- DataFlowInterfaceName , DataFlowName , DataFlowkind ,
- DataFlowFirstCreation , DataFlowLastModification ,
- DataFlowEditorRelease , DataFlowAuthor ,
- DataFlowComputer , DataFlowComment ,
- _prof_debug , _fdebug ) ;
-// DataFlowComputer , DataFlowComment , DebugFileName ) ;
+ DataFlowInterfaceName , DataFlowName , DataFlowkind ,
+ DataFlowFirstCreation , DataFlowLastModification ,
+ DataFlowEditorRelease , DataFlowAuthor ,
+ DataFlowComputer , DataFlowComment ,
+ _prof_debug , _fdebug ) ;
+// DataFlowComputer , DataFlowComment , DebugFileName ) ;
}
else if ( DataFlowkind == SUPERV::DataStreamGraph ) {
_StreamGraph = new GraphBase::StreamGraph( ORB , ptrNamingService , DataFlowService , DataFlowComponentName ,
- DataFlowInterfaceName , DataFlowName , DataFlowkind ,
- DataFlowFirstCreation , DataFlowLastModification ,
- DataFlowEditorRelease , DataFlowAuthor ,
- DataFlowComputer , DataFlowComment ,
- _prof_debug , _fdebug ) ;
+ DataFlowInterfaceName , DataFlowName , DataFlowkind ,
+ DataFlowFirstCreation , DataFlowLastModification ,
+ DataFlowEditorRelease , DataFlowAuthor ,
+ DataFlowComputer , DataFlowComment ,
+ _prof_debug , _fdebug ) ;
_Graph = _StreamGraph ;
}
_Valid = false ;
_Done = false ;
_Threads = 0 ;
_ControlState = SUPERV::VoidState ;
- _State = SUPERV::UnKnownState ;
+ _State = GraphExecutor::UnKnownState ;
_PyInitialized = false ;
_Orb = CORBA::ORB::_duplicate( ORB ) ;
pthread_mutex_init( &_MutexWait , NULL ) ;
}
}
-bool GraphExecutor::OutNode::LoadDataFlow(const GraphBase::SGraph &aDataFlow ) {
+bool GraphExecutor::OutNode::LoadDataFlow(const GraphBase::SGraph * aDataFlow ) {
bool RetVal = false ;
- RetVal = LoadInfo( aDataFlow.Info ) ;
+ cdebug_in << "GraphExecutor::OutNode::LoadDataFlow " << (*aDataFlow).Info.theName << endl ;
+ RetVal = LoadInfo( (*aDataFlow).Info ) ;
if ( Graph()->ServiceName() != NULL ) {
// MESSAGE( "GraphExecutor::OutNode::LoadDataFlow" );
if ( RetVal ) {
- RetVal = LoadNodes( aDataFlow.Nodes ) ;
+ RetVal = LoadNodes( (*aDataFlow).Nodes ) ;
if ( RetVal ) {
- RetVal = LoadLinks( aDataFlow.Links ) ;
+ RetVal = LoadLinks( (*aDataFlow).Links ) ;
if ( RetVal ) {
IsValid() ;
- RetVal = LoadDatas( aDataFlow.Datas ) ;
+ RetVal = LoadDatas( (*aDataFlow).Datas ) ;
IsExecutable() ;
if ( !RetVal) {
cdebug << "GraphExecutor::OutNode::LoadDataFlow LoadDatas Error."
else {
cdebug << "GraphExecutor::OutNode::LoadDataFlow ServiceName Error." << endl ;
}
+ cdebug_in << "GraphExecutor::OutNode::LoadDataFlow " << RetVal << endl ;
return RetVal ;
}
+#if 0
bool GraphExecutor::OutNode::LoadXml( const char* myFileName ) {
bool RetVal = false ;
- GraphBase::SGraph aDataFlow ;
- if ( Graph()->LoadXml( _Orb , myFileName , aDataFlow ) ) {
- RetVal = LoadDataFlow( aDataFlow ) ;
+ GraphBase::ListOfSGraphs aListOfDataFlows ;
+ if ( Graph()->LoadXml( _Orb , myFileName , aListOfDataFlows ) ) {
+ RetVal = LoadDataFlow( aListOfDataFlows ) ;
// if ( aConstructor && RetVal )
// RetVal = Name( aDataFlow.Info.theName.c_str() ) ;
}
return RetVal ;
-}
+}
+#endif
bool GraphExecutor::OutNode::LoadInfo(const GraphBase::SNode &aDataFlowInfo ) {
cdebug << "GraphExecutor::OutNode::LoadInfo _StreamGraph " << _StreamGraph << endl ;
// ComponentName( aDataFlowInfo.theComponentName.c_str() ) ;
Graph()->Name( aDataFlowInfo.theName.c_str() ) ;
Graph()->Kind( aDataFlowInfo.theKind ) ;
- if ( Graph()->IsDataStreamNode() ) {
+ if ( Graph()->IsDataStreamNode() && aDataFlowInfo.theKind == SUPERV::DataStreamGraph ) {
StreamGraph()->SetStreamParams( aDataFlowInfo.theTimeout , aDataFlowInfo.theDataStreamTrace , aDataFlowInfo.theDeltaTime ) ;
}
Graph()->DataService( _Orb , aDataFlowInfo.theService , _prof_debug , _fdebug ) ;
return true ;
}
-bool GraphExecutor::OutNode::LoadNodes(const GraphBase::ListOfNodes &aListOfNodes ) {
+bool GraphExecutor::OutNode::LoadNodes(const GraphBase::ListOfSNodes &aListOfNodes ) {
bool RetVal = true ;
GraphExecutor::InNode * anInNode ;
cdebug << "GraphExecutor::OutNode::LoadNodes" << endl ;
RetVal = false ;
break ;
}
- if ( anInNode->IsOneOfInLineNodes() ) {
+ if ( anInNode->IsOneOfInLineNodes() || anInNode->IsMacroNode() ) {
anInNode->GraphExecutor::InNode::InLineNode()->DefPortsOfNode(
_Orb , aNode.theService , anInNode->NamePtr() ,
anInNode->Kind() ,
if ( anInNode->IsOneOfGOTONodes() && strlen( aNode.theCoupledNode.c_str() ) ) {
GraphBase::GOTONode * aCoupledNode ;
aCoupledNode = (GraphBase::GOTONode * ) Graph()->GetGraphNode( aNode.theName.c_str() ) ;
- aCoupledNode->CoupledNode( (GraphBase::GOTONode * ) Graph()->GetChangeGraphNode( aNode.theCoupledNode.c_str() ) ) ;
+ GraphBase::GOTONode * aCoupledCoupledNode ;
+ aCoupledCoupledNode = (GraphBase::GOTONode * ) Graph()->GetChangeGraphNode( aNode.theCoupledNode.c_str() ) ;
+ if ( aCoupledCoupledNode != NULL ) {
+ aCoupledNode->CoupledNode( aCoupledCoupledNode ) ;
+ }
+ else {
+ aCoupledNode->CoupledNodeName( aNode.theCoupledNode.c_str() ) ;
+ }
+ aCoupledNode->SetGraphExecutor( (GraphExecutor::DataFlow * ) this ) ;
}
}
return RetVal ;
}
-bool GraphExecutor::OutNode::LoadLinks(const GraphBase::ListOfLinks &aListOfLinks ) {
+bool GraphExecutor::OutNode::LoadLinks(const GraphBase::ListOfSLinks &aListOfLinks ) {
bool RetVal = true ;
cdebug << "GraphExecutor::OutNode::LoadLinks " << aListOfLinks.size()
<< endl ;
RetVal = Graph()->AddLink( aLink.FromNodeName.c_str() ,
aLink.FromServiceParameterName.c_str() ,
aLink.ToNodeName.c_str() ,
- aLink.ToServiceParameterName.c_str() ,
- aLink.aLinkValue ) ;
-// aLink.aLinkValue.Value , aLink.aLinkValue.Kind ) ;
+ aLink.ToServiceParameterName.c_str() ) ;
+// , aLink.aLinkValue ) ;
if ( !RetVal )
break ;
}
return RetVal ;
}
-bool GraphExecutor::OutNode::LoadDatas(const GraphBase::ListOfLinks &aListOfDatas ) {
+bool GraphExecutor::OutNode::LoadDatas(const GraphBase::ListOfSLinks &aListOfDatas ) {
bool RetVal = true ;
cdebug << "GraphExecutor::OutNode::LoadDatas " << aListOfDatas.size()
<< endl ;
RetVal = Graph()->AddInputData( aLink.ToNodeName.c_str() ,
aLink.ToServiceParameterName.c_str() ,
aLink.aLinkValue ) ;
-// aLink.aLinkValue.Value , aLink.aLinkValue.Kind ) ;
- else if ( !strcmp( aLink.ToNodeName.c_str() , Graph()->Name() ) ) {
- RetVal = Graph()->AddOutputData( aLink.FromNodeName.c_str() ,
- aLink.FromServiceParameterName.c_str() ,
- aLink.aLinkValue ) ;
-// aLink.aLinkValue.Value ,
-// aLink.aLinkValue.Kind ) ;
- Graph()->AddLink( aLink.FromNodeName.c_str() , (GraphBase::ComputingNode *) this ) ;
- }
+// else if ( !strcmp( aLink.ToNodeName.c_str() , Graph()->Name() ) ) {
+// RetVal = Graph()->AddOutputData( aLink.FromNodeName.c_str() ,
+// aLink.FromServiceParameterName.c_str() ) ;
+// Graph()->AddLink( aLink.FromNodeName.c_str() , (GraphBase::ComputingNode *) this ) ;
+// }
else {
cdebug << "GraphExecutor::OutNode::LoadDatas Error " << aLink.FromNodeName
<< " and " << aLink.ToNodeName << " differents from " << Graph()->Name()
}
-bool GraphExecutor::OutNode::AddInputData( const char* ToNodeName1 ,
- const char* ToParameterName1 ,
- const char* ToNodeName2 ,
- const char* ToParameterName2 ) {
- cdebug_in << "GraphExecutor::OutNode::AddInputData" << endl;
- bool RetVal = Graph()->AddInputData( ToNodeName1 ,
- ToParameterName1 ,
- ToNodeName2 ,
- ToParameterName2 ) ;
- cdebug_out << "GraphExecutor::OutNode::AddInputData" << endl;
- _Valid = false ;
- return RetVal ;
-}
-
bool GraphExecutor::OutNode::Valid() {
cdebug_in << "GraphExecutor::OutNode::Valid" << endl;
_Executable = false ;
}
- cdebug_out << "GraphExecutor::OutNode::Executable" << endl;
+ cdebug_out << "GraphExecutor::OutNode::Executable " << _Executable << endl;
return _Executable ;
}
GraphExecutor::InNode * anInNode = (GraphExecutor::InNode *) Graph()->GraphNodes( i )->GetInNode() ;
if ( anInNode->IsOneOfInLineNodes() ) {
if ( !anInNode->InitPythonFunctions( true ) ) {
- anInNode->State( SUPERV::ErroredState ) ;
- State( SUPERV::ErroredState ) ;
+ anInNode->State( GraphExecutor::ErroredState ) ;
+ State( GraphExecutor::ErroredState ) ;
cdebug_out << "GraphExecutor::OutNode::Run InitPythonFunctions ERROR "
<< anInNode->Name() << endl ;
return false ;
}
}
- cdebug << "Execution starting GraphExecutor::Action_DataOk_RunService Node "
- << Graph()->Name() << endl ;
-
- PushEvent( NULL , GraphExecutor::ReadyEvent ,
- SUPERV::DataReadyState ) ;
- State( SUPERV::DataReadyState ) ;
-
- for ( i = 0 ; i < Graph()->HeadNodesSize() ; i++ ) {
- GraphExecutor::InNode * anInNode = (GraphExecutor::InNode *) Graph()->HeadNodes( i )->GetInNode() ;
- if ( anInNode->State() != SUPERV::DataReadyState ) {
- cdebug << "GraphExecutor::OutNode::Run inconsistency State of Node "
- << anInNode->Name() << " : " << anInNode->State() << endl ;
- cdebug_out << "GraphExecutor::OutNode::Run State ERROR" << endl ;
- return false ;
+ for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) {
+ GraphExecutor::InNode * anInNode = (GraphExecutor::InNode *) Graph()->GraphNodes( i )->GetInNode() ;
+ if ( anInNode->IsMacroNode() ) {
+ GraphBase::Graph * aMacroGraph = anInNode->GraphMacroNode() ;
+ cdebug << "GraphExecutor::OutNode::Run " << anInNode << " MacroNode " << aMacroGraph
+ << aMacroGraph->Name() << endl ;
+ SUPERV::Graph_var iobject = anInNode->GraphMacroNode()->MacroObject() ;
+ if ( CORBA::is_nil( iobject ) ) {
+ cdebug << "MacroObject() is a nil object. Error" << endl ;
+ }
+ else {
+ cdebug << "MacroObject() is NOT a nil object." << endl ;
+ }
}
-// PushEvent( anInNode , GraphExecutor::ReadyEvent ,
-// SUPERV::DataReadyState ) ;
- anInNode->CreateNewThread( true ) ;
- anInNode->DataFromNode( Graph()->Name() ) ;
- if ( AndSuspend ) {
- anInNode->State( SUPERV::DataWaitingState ) ;
- anInNode->ControlState( SUPERV::ToSuspendStartState ) ;
- if ( !anInNode->SendEvent( GraphExecutor::SomeDataReadyEvent ) ) {
- cdebug << "InNode::SendEvent( SomeDataReadyEvent ) ERROR Node "
- << anInNode->Name() << endl ;
- cdebug_out << "GraphExecutor::OutNode::Run SendEvent ERROR" << endl ;
+ }
+
+ if ( Graph()->GraphMacroLevel() != 0 ) {
+ cdebug << "Execution starting GraphExecutor::Action_DataOk_RunService Node "
+ << Graph()->Name() << " GraphMacroLevel " << Graph()->GraphMacroLevel() << endl ;
+ PushEvent( NULL , GraphExecutor::NoDataReadyEvent ,
+ GraphExecutor::DataUndefState ) ;
+ }
+ else {
+ cdebug << "Execution starting GraphExecutor::Action_DataOk_RunService Node "
+ << Graph()->Name() << " GraphMacroLevel " << Graph()->GraphMacroLevel() << endl ;
+ PushEvent( NULL , GraphExecutor::ReadyEvent ,
+ GraphExecutor::DataReadyState ) ;
+ State( GraphExecutor::DataReadyState ) ;
+
+ cdebug << pthread_self() << " GraphExecutor::OutNode::Run Start of the " << Graph()->HeadNodesSize()
+ << " HeadNodes" << endl ;
+ for ( i = 0 ; i < Graph()->HeadNodesSize() ; i++ ) {
+ GraphExecutor::InNode * anInNode = (GraphExecutor::InNode *) Graph()->HeadNodes( i )->GetInNode() ;
+ cdebug << pthread_self() << "GraphExecutor::OutNode::Run Start of HeadNode " << i << " "
+ << anInNode->Name() << endl ;
+ if ( anInNode->State() != GraphExecutor::DataReadyState ) {
+ cdebug << "GraphExecutor::OutNode::Run inconsistency State of Node "
+ << anInNode->Name() << " : " << anInNode->State() << endl ;
+ cdebug_out << "GraphExecutor::OutNode::Run State ERROR" << endl ;
return false ;
}
- anInNode->SuspendedWait() ;
+// PushEvent( anInNode , GraphExecutor::ReadyEvent ,
+// GraphExecutor::DataReadyState ) ;
+ anInNode->CreateNewThread( true ) ;
+ anInNode->DataFromNode( Graph()->Name() ) ;
+ if ( AndSuspend ) {
+ anInNode->State( GraphExecutor::DataWaitingState ) ;
+ anInNode->ControlState( SUPERV::ToSuspendStartState ) ;
+ if ( !anInNode->SendEvent( GraphExecutor::SomeDataReadyEvent ) ) {
+ cdebug << "InNode::SendEvent( SomeDataReadyEvent ) ERROR Node "
+ << anInNode->Name() << endl ;
+ cdebug_out << "GraphExecutor::OutNode::Run SendEvent ERROR" << endl ;
+ return false ;
+ }
+ anInNode->SuspendedWait() ;
+ }
+ else if ( anInNode->IsMacroNode() ) {
+ if ( !anInNode->SendEvent( GraphExecutor::SomeDataReadyEvent ) ) {
+ cdebug << "InNode::SendEvent( SomeDataReadyEvent ) ERROR Node "
+ << anInNode->Name() << endl ;
+ cdebug_out << "GraphExecutor::OutNode::Run SendEvent ERROR" << endl ;
+ return false ;
+ }
+ cdebug << pthread_self() << " GraphExecutor::OutNode::Run " << anInNode->Name() << "->RunningWait"
+ << endl ;
+ anInNode->RunningWait() ;
+ cdebug << pthread_self() << " GraphExecutor::OutNode::Run " << anInNode->Name() << "->RunningWaited"
+ << endl ;
+ }
+ else if ( !anInNode->IsMacroNode() ) {
+ if ( !anInNode->SendEvent( GraphExecutor::ExecuteEvent ) ) {
+ cdebug << "InNode::SendEvent( ExecuteEvent ) ERROR Node "
+ << anInNode->Name() << endl ;
+ cdebug_out << "GraphExecutor::OutNode::Run SendEvent ERROR" << endl ;
+ return false ;
+ }
+ anInNode->RunningWait() ;
+ }
}
- else if ( !anInNode->SendEvent( GraphExecutor::ExecuteEvent ) ) {
- cdebug << "InNode::SendEvent( ExecuteEvent ) ERROR Node "
- << anInNode->Name() << endl ;
- cdebug_out << "GraphExecutor::OutNode::Run SendEvent ERROR" << endl ;
- return false ;
+
+ if ( AndSuspend ) {
+ PushEvent( NULL , GraphExecutor::SuspendedReadyEvent ,
+ GraphExecutor::SuspendedReadyState ) ;
}
else {
- anInNode->RunningWait() ;
+ PushEvent( NULL , GraphExecutor::ExecutingEvent ,
+ GraphExecutor::ExecutingState ) ;
+ if (AutomatonState() == GraphExecutor::DataReadyState) {
+ State( GraphExecutor::ExecutingState ) ;
+ };
}
+// ostringstream astr ;
+// astr << "Graph " << Graph()->Name() << " is running" ;
+// Graph()->ObjImpl()->sendMessage( NOTIF_STEP, astr.str().c_str() ) ;
+ RetVal = true ;
}
-
- if ( AndSuspend ) {
- PushEvent( NULL , GraphExecutor::SuspendedReadyEvent ,
- SUPERV::SuspendedReadyState ) ;
- }
- else {
- PushEvent( NULL , GraphExecutor::ExecutingEvent ,
- SUPERV::ExecutingState ) ;
- if (AutomatonState() == SUPERV::DataReadyState) {
- State( SUPERV::ExecutingState ) ;
- };
- }
-// ostringstream astr ;
-// astr << "Graph " << Graph()->Name() << " is running" ;
-// Graph()->ObjImpl()->sendMessage( NOTIF_STEP, astr.str().c_str() ) ;
- RetVal = true ;
- }
- else {
- PushEvent( NULL , GraphExecutor::NoDataReadyEvent ,
- SUPERV::DataUndefState ) ;
}
- cdebug_out << "GraphExecutor::OutNode::Run" << endl ;
+ cdebug_out << "GraphExecutor::OutNode::Run GraphMacroLevel " << Graph()->GraphMacroLevel() << endl ;
return RetVal ;
}
void GraphExecutor::OutNode::CheckAllDone() {
int j ;
cdebug_in << "GraphExecutor::OutNode::CheckAllDone " << endl;
- SUPERV::AutomatonState OutNodeState = SUPERV::SuccessedState ;
- SUPERV::AutomatonState InNodeState ;
+ GraphExecutor::AutomatonState OutNodeState = GraphExecutor::SuccessedState ;
+ GraphExecutor::AutomatonState InNodeState ;
bool AllDone = true ;
if ( !Done() ) {
for ( j = 0 ; j < Graph()->QueueNodesSize() ; j++ ) {
cdebug << j << ". "
<< ( (GraphExecutor::InNode * ) Graph()->QueueNodes( j )->GetInNode() )->Name()
<< " " << theAutomaton->StateName( InNodeState ) << endl ;
- if ( InNodeState != SUPERV::SuccessedState &&
- InNodeState != SUPERV::ErroredState &&
- InNodeState != SUPERV::DataWaitingState ) {
+ if ( InNodeState != GraphExecutor::SuccessedState &&
+ InNodeState != GraphExecutor::ErroredState &&
+ InNodeState != GraphExecutor::DataWaitingState ) {
AllDone = false ;
}
- if ( InNodeState != SUPERV::SuccessedState &&
- InNodeState != SUPERV::DataWaitingState &&
- InNodeState != SUPERV::DataReadyState ) {
+ if ( InNodeState != GraphExecutor::SuccessedState &&
+ InNodeState != GraphExecutor::DataWaitingState &&
+ InNodeState != GraphExecutor::DataReadyState ) {
OutNodeState = InNodeState ;
}
}
if ( AllDone ) {
if( _Threads == 0 && _SuspendedThreads == 0 ) {
- if ( OutNodeState != SUPERV::ErroredState ) {
- OutNodeState = SUPERV::SuccessedState ;
+ if ( OutNodeState != GraphExecutor::ErroredState ) {
+ OutNodeState = GraphExecutor::SuccessedState ;
}
}
else {
exit( 0 ) ;
}
if ( IsSuspended() ) {
- PushEvent( NULL , GraphExecutor::SuspendEvent , SUPERV::SuspendedState ) ;
+ PushEvent( NULL , GraphExecutor::SuspendEvent , GraphExecutor::SuspendedState ) ;
}
}
void GraphExecutor::OutNode::ResumeThread() {
return aGraphEvent ;
}
-SUPERV::GraphState GraphExecutor::OutNode::AutomatonGraphState(SUPERV::AutomatonState aState ) {
+SUPERV::GraphState GraphExecutor::OutNode::AutomatonGraphState(GraphExecutor::AutomatonState aState ) {
SUPERV::GraphState aGraphState ;
switch ( aState ) {
- case SUPERV::UnKnownState : {
+ case GraphExecutor::UnKnownState : {
aGraphState = SUPERV::UndefinedState ;
break ;
}
- case SUPERV::DataUndefState : {
+ case GraphExecutor::DataUndefState : {
aGraphState = SUPERV::UndefinedState ;
break ;
}
- case SUPERV::DataWaitingState : {
+ case GraphExecutor::DataWaitingState : {
aGraphState = SUPERV::WaitingState ;
break ;
}
- case SUPERV::DataReadyState : {
+ case GraphExecutor::DataReadyState : {
aGraphState = SUPERV::ReadyState ;
break ;
}
- case SUPERV::SuspendedReadyState : {
+ case GraphExecutor::SuspendedReadyState : {
aGraphState = SUPERV::SuspendReadyState ;
break ;
}
- case SUPERV::ResumedReadyState : {
+ case GraphExecutor::ResumedReadyState : {
aGraphState = SUPERV::ReadyState ;
break ;
}
- case SUPERV::KilledReadyState : {
+ case GraphExecutor::KilledReadyState : {
aGraphState = SUPERV::KillState ;
break ;
}
- case SUPERV::StoppedReadyState : {
+ case GraphExecutor::StoppedReadyState : {
aGraphState = SUPERV::StopState ;
break ;
}
- case SUPERV::ExecutingState : {
+ case GraphExecutor::ExecutingState : {
aGraphState = SUPERV::RunningState ;
break ;
}
- case SUPERV::SuspendedExecutingState : {
+ case GraphExecutor::SuspendedExecutingState : {
aGraphState = SUPERV::SuspendState ;
break ;
}
- case SUPERV::ResumedExecutingState : {
+ case GraphExecutor::ResumedExecutingState : {
aGraphState = SUPERV::RunningState ;
break ;
}
- case SUPERV::KilledExecutingState : {
+ case GraphExecutor::KilledExecutingState : {
aGraphState = SUPERV::KillState ;
break ;
}
- case SUPERV::StoppedExecutingState : {
+ case GraphExecutor::StoppedExecutingState : {
aGraphState = SUPERV::StopState ;
break ;
}
- case SUPERV::SuccessedExecutingState : {
+ case GraphExecutor::SuccessedExecutingState : {
aGraphState = SUPERV::DoneState ;
break ;
}
- case SUPERV::ErroredExecutingState : {
+ case GraphExecutor::ErroredExecutingState : {
aGraphState = SUPERV::ErrorState ;
break ;
}
- case SUPERV::SuspendedSuccessedState : {
+ case GraphExecutor::SuspendedSuccessedState : {
aGraphState = SUPERV::SuspendDoneState ;
break ;
}
- case SUPERV::SuspendedErroredState : {
+ case GraphExecutor::SuspendedErroredState : {
aGraphState = SUPERV::SuspendErroredState ;
break ;
}
- case SUPERV::ResumedSuccessedState : {
+ case GraphExecutor::ResumedSuccessedState : {
aGraphState = SUPERV::DoneState ;
break ;
}
- case SUPERV::ResumedErroredState : {
+ case GraphExecutor::ResumedErroredState : {
aGraphState = SUPERV::ErrorState ;
break ;
}
- case SUPERV::KilledSuccessedState : {
+ case GraphExecutor::KilledSuccessedState : {
aGraphState = SUPERV::KillState ;
break ;
}
- case SUPERV::KilledErroredState : {
+ case GraphExecutor::KilledErroredState : {
aGraphState = SUPERV::KillState ;
break ;
}
- case SUPERV::StoppedSuccessedState : {
+ case GraphExecutor::StoppedSuccessedState : {
aGraphState = SUPERV::StopState ;
break ;
}
- case SUPERV::StoppedErroredState : {
+ case GraphExecutor::StoppedErroredState : {
aGraphState = SUPERV::StopState ;
break ;
}
- case SUPERV::SuccessedState : {
+ case GraphExecutor::SuccessedState : {
aGraphState = SUPERV::DoneState ;
break ;
}
- case SUPERV::ErroredState : {
+ case GraphExecutor::ErroredState : {
aGraphState = SUPERV::ErrorState ;
break ;
}
- case SUPERV::SuspendedState : {
+ case GraphExecutor::SuspendedState : {
aGraphState = SUPERV::SuspendState ;
break ;
}
- case SUPERV::KilledState : {
+ case GraphExecutor::KilledState : {
aGraphState = SUPERV::KillState ;
break ;
}
- case SUPERV::StoppedState : {
+ case GraphExecutor::StoppedState : {
aGraphState = SUPERV::StopState ;
break ;
}
- case SUPERV::ReRunnedState : {
+ case GraphExecutor::ReRunnedState : {
aGraphState = SUPERV::ReRunState ;
break ;
}
- case SUPERV::ReStartedState : {
+ case GraphExecutor::ReStartedState : {
aGraphState = SUPERV::ReStartState ;
break ;
}
bool GraphExecutor::OutNode::PushEvent( GraphExecutor::InNode * aNode ,
GraphExecutor::NodeEvent anEvent ,
- SUPERV::AutomatonState aState ) {
+ GraphExecutor::AutomatonState aState ) {
// cdebug_in << "PushEvent Threads " << Threads() << " SuspendedThreads "
// << SuspendedThreads() << endl ;
if ( pthread_mutex_lock( &_MutexWait ) ) {
_EventNodes.size() > 0 ;
char * NodeName = "" ;
GraphExecutor::NodeEvent theEvent = GraphExecutor::UndefinedEvent ;
- SUPERV::AutomatonState theState = SUPERV::UnKnownState ;
+ GraphExecutor::AutomatonState theState = GraphExecutor::UnKnownState ;
anEvent = SUPERV::UndefinedEvent ;
aState = SUPERV::UndefinedState ;
if ( ( Done() || IsKilled() || IsStopped() ) && _EventNodes.size() == 0 ) {
cdebug << "--> EventW RetVal " << RetVal << endl ;
char * NodeName = "" ;
GraphExecutor::NodeEvent theEvent = GraphExecutor::UndefinedEvent ;
- SUPERV::AutomatonState theState = SUPERV::UnKnownState ;
+ GraphExecutor::AutomatonState theState = GraphExecutor::UnKnownState ;
anEvent = SUPERV::UndefinedEvent ;
aState = SUPERV::UndefinedState ;
if ( IsDone() && _EventNodes.size() == 0 ) {
}
list< char * >::iterator itEventNodes = _EventNodes.begin() ;
list< GraphExecutor::NodeEvent >::iterator itEvents = _Events.begin() ;
- list< SUPERV::AutomatonState >::iterator itStates = _States.begin() ;
+ list< GraphExecutor::AutomatonState >::iterator itStates = _States.begin() ;
while ( itEventNodes != _EventNodes.end() ) {
cdebug << pthread_self() << "EVENTSTACK "
<< *itEventNodes << " " << *itEvents << " "
}
}
-void GraphExecutor::OutNode::State(SUPERV::AutomatonState aState ) {
+void GraphExecutor::OutNode::SendSomeDataReady( const char * aNodeName ) {
+ cdebug_in << "GraphExecutor::OutNode::SendSomeDataReady " << aNodeName << "->SendSomeDataReady( "
+ << Graph()->Name() << " )" << endl;
+ int sts ;
+ sts = ((GraphExecutor::InNode * ) Graph()->GetChangeGraphNode( aNodeName )->GetInNode())->SendSomeDataReady( Graph()->Name() ) ;
+ cdebug_out << "GraphExecutor::OutNode::SendSomeDataReady sts " << sts << endl ;
+}
+
+void GraphExecutor::OutNode::State(GraphExecutor::AutomatonState aState ) {
// cdebug << "GraphExecutor::OutNode::State " << Graph()->Name() << " "
// << theAutomaton->StateName( AutomatonGraphState( _State ) ) << " ---> "
// << theAutomaton->StateName( AutomatonGraphState( aState ) ) << endl ;
SUPERV::GraphState GraphExecutor::OutNode::State( const char * NodeName ) {
// cdebug_in << "GraphExecutor::OutNode::State " << NodeName << endl;
- SUPERV::AutomatonState aret = SUPERV::UnKnownState ;
+ GraphExecutor::AutomatonState aret = GraphExecutor::UnKnownState ;
const GraphBase::ComputingNode * aCNode = Graph()->GetGraphNode( NodeName ) ;
if ( aCNode ) {
GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *)aCNode->GetInNode() ;
return aret ;
}
-SUPERV::AutomatonState GraphExecutor::OutNode::AutomatonState() {
+GraphExecutor::AutomatonState GraphExecutor::OutNode::AutomatonState() {
// cdebug_in << "GraphExecutor::OutNode::AutomatonState" << endl;
// cdebug_out << "GraphExecutor::OutNode::AutomatonState" << endl ;
return _State ;
}
-SUPERV::AutomatonState GraphExecutor::OutNode::AutomatonState( const char * NodeName ) {
+GraphExecutor::AutomatonState GraphExecutor::OutNode::AutomatonState( const char * NodeName ) {
// cdebug_in << "GraphExecutor::OutNode::AutomatonState " << NodeName << endl;
- SUPERV::AutomatonState aret = SUPERV::UnKnownState ;
+ GraphExecutor::AutomatonState aret = GraphExecutor::UnKnownState ;
GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) Graph()->GetGraphNode( NodeName )->GetInNode() ;
if ( anInNode )
aret = anInNode->State() ;
}
RetVal = true ;
}
- State( SUPERV::KilledState ) ;
+ State( GraphExecutor::KilledState ) ;
cdebug_out << "GraphExecutor::OutNode::ContainerKill" << endl ;
return RetVal ;
}
}
}
if ( RetVal ) {
- State( SUPERV::SuspendedState ) ;
+ State( GraphExecutor::SuspendedState ) ;
MESSAGE("================================================================================") ;
MESSAGE( Graph()->Name() << " IS SUSPENDED" ) ;
MESSAGE("================================================================================") ;
int RetVal = 0 ;
cdebug_in << "GraphExecutor::OutNode::Resume" << endl;
if ( IsSuspended() ) {
- State( SUPERV::ExecutingState ) ;
+ State( GraphExecutor::ExecutingState ) ;
int i ;
for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) {
GraphExecutor::InNode * aNode = (GraphExecutor::InNode * ) Graph()->GraphNodes( i )->GetInNode() ;
}
RetVal = true ;
}
- State( SUPERV::KilledState ) ;
+ State( GraphExecutor::KilledState ) ;
if ( RetVal ) {
MESSAGE("================================================================================") ;
MESSAGE( Graph()->Name() << " IS KILLED" << theAutomaton->StateName( AutomatonState() ) << " EventQSize "
bool _PyInitialized ;
bool _Valid ;
bool _Executable ;
- SUPERV::AutomatonState _State ;
+ GraphExecutor::AutomatonState _State ;
SUPERV::ControlState _ControlState ;
bool _Done ;
int _SuspendedThreads ;
list< char * > _EventNodes ;
list< GraphExecutor::NodeEvent > _Events ;
- list< SUPERV::AutomatonState > _States ;
+ list< GraphExecutor::AutomatonState > _States ;
bool Valid() ;
void UnValid() ;
bool Executable() ;
- bool LoadNodes( const GraphBase::ListOfNodes &aNodes ) ;
- bool LoadLinks( const GraphBase::ListOfLinks &aLinks ) ;
- bool LoadDatas( const GraphBase::ListOfLinks &aDatas ) ;
+ bool LoadNodes( const GraphBase::ListOfSNodes &aNodes ) ;
+ bool LoadLinks( const GraphBase::ListOfSLinks &aLinks ) ;
+ bool LoadDatas( const GraphBase::ListOfSLinks &aDatas ) ;
CORBA::ORB_ptr _Orb ;
GraphBase::Graph * Graph() const {
return _Graph ; } ;
- bool LoadDataFlow( const GraphBase::SGraph &aDataFlow ) ;
- bool LoadXml( const char* myFileName ) ;
+ bool LoadDataFlow( const GraphBase::SGraph * aDataFlow ) ;
+// bool LoadXml( const char* myFileName ) ;
bool LoadInfo( const GraphBase::SNode &aDataFlowInfo ) ;
GraphExecutor::InNode * AddNode(
const int NodeX = 0 ,
const int NodeY = 0 ) ;
- bool AddInputData( const char* ToNodeName1 ,
- const char* ToParameterName1 ,
- const char* ToNodeName2 ,
- const char* ToParameterName2 ) ;
-
bool IsValid() { if ( !_Valid )
return Valid() ;
return _Valid ; } ;
bool PushEvent( GraphExecutor::InNode * aNode ,
GraphExecutor::NodeEvent anEvent ,
- SUPERV::AutomatonState aState ) ;
+ GraphExecutor::AutomatonState aState ) ;
int GetListSize();
bool StateWait( SUPERV::GraphState aState ) ;
bool Event( char ** aNodeName ,
long EventQSize() ;
void EventList() ;
- void State(SUPERV::AutomatonState aState ) ;
- const char * StateName(SUPERV::AutomatonState aState ) {
+ void SendSomeDataReady( const char * aNodeName ) ;
+
+ void State(GraphExecutor::AutomatonState aState ) ;
+ const char * StateName(GraphExecutor::AutomatonState aState ) {
return theAutomaton->StateName( aState ) ; }
SUPERV::GraphState State() ;
const char * ServiceParameterName ) ;
SUPERV::GraphEvent AutomatonGraphEvent(GraphExecutor::NodeEvent anEvent) ;
- SUPERV::GraphState AutomatonGraphState(SUPERV::AutomatonState anAutomatonState) ;
+ SUPERV::GraphState AutomatonGraphState(GraphExecutor::AutomatonState anAutomatonState) ;
- SUPERV::AutomatonState AutomatonState() ;
- SUPERV::AutomatonState AutomatonState( const char * NodeName ) ;
+ GraphExecutor::AutomatonState AutomatonState() ;
+ GraphExecutor::AutomatonState AutomatonState( const char * NodeName ) ;
SUPERV::ControlState ControlState() ;
SUPERV::ControlState ControlState( const char * aNodeName ) ;
CPPFLAGS+= $(PYTHON_INCLUDES) $(QT_MT_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES) \
-I${KERNEL_ROOT_DIR}/include/salome
-CXXFLAGS= -g -D_DEBUG_ -D__x86__ -D__linux__ -ftemplate-depth-42 -Wall \
+CXXFLAGS+= -g -D_DEBUG_ -D__x86__ -D__linux__ -ftemplate-depth-42 -Wall \
-I${KERNEL_ROOT_DIR}/include/salome
LDFLAGS+= -export-dynamic -lSalomeNS -lSalomeLifeCycleCORBA -lSalomeSuperVisionBase -lOpUtil -lSALOMELocalTrace \
-lc $(QT_MT_LIBS) $(OGL_LIBS) \
+++ /dev/null
-// SuperVisionTest MulComponent : example of component that multiplies two numbers
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// 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
-//
-// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
-//
-//
-//
-// File : MulComponentEngine.cxx
-// Author : MARC TAJCHMAN, CEA
-// Module : SuperVisionTest
-
-using namespace std;
-#include <stdio.h>
-#include <unistd.h>
-#include <fstream>
-#include <sstream>
-#include <string>
-
-//#include "utilities.h"
-#include "MulComponent.hxx"
-
-MulComponentEngine::MulComponentEngine( CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- PortableServer::ObjectId * contId,
- const char *instanceName,
- const char *interfaceName) :
- Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,true)
-{
-// MESSAGE("MulComponentEngine::MulComponentEngine activate object instanceName("
-// << instanceName << ") interfaceName(" << interfaceName << ")" )
- _thisObj = this ;
- _id = _poa->activate_object(_thisObj);
- _nexec = 0 ;
-}
-
-MulComponentEngine::MulComponentEngine()
-{
-}
-
-MulComponentEngine::~MulComponentEngine()
-{
-}
-
-void MulComponentEngine::Mul( double x , double y , double & z ) {
- beginService( " MulComponentEngine::Mul" );
- z = x * y ;
- int S;
-
- sendMessage(NOTIF_STEP, "Mul is Computing");
- S = 1+(int) (15.0*rand()/(RAND_MAX+1.0));
- sleep(S);
- MESSAGE( "MulComponentEngine::Mul( " << x << " , " << y << " , " << z
- << " ) after " << S << " seconds" )
- endService( " MulComponentEngine::Mul" );
-}
-
-extern "C"
-{
- PortableServer::ObjectId * MulComponentEngine_factory
- (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- PortableServer::ObjectId * contId,
- const char *instanceName,
- const char *interfaceName)
- {
- MESSAGE("MulComponentEngine_factory MulComponentEngine ("
- << instanceName << "," << interfaceName << ")");
- MulComponentEngine * myMulComponent
- = new MulComponentEngine(orb, poa, contId, instanceName, interfaceName);
- return myMulComponent->getId() ;
- }
-}
-
-
+++ /dev/null
-// SuperVisionTest SubComponent : example of component that sunstracts one number from another
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// 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
-//
-// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
-//
-//
-//
-// File : SubComponentEngine.cxx
-// Author : MARC TAJCHMAN, CEA
-// Module : SuperVisionTest
-
-using namespace std;
-#include <stdio.h>
-#include <unistd.h>
-#include <fstream>
-#include <sstream>
-#include <string>
-
-//#include "utilities.h"
-#include "SubComponent.hxx"
-
-SubComponentEngine::SubComponentEngine( CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- PortableServer::ObjectId * contId,
- const char *instanceName,
- const char *interfaceName) :
- Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,true)
-{
-// MESSAGE("SubComponentEngine::SubComponentEngine activate object instanceName("
-// << instanceName << ") interfaceName(" << interfaceName << ")" )
- _thisObj = this ;
- _id = _poa->activate_object(_thisObj);
- _nexec = 0 ;
-}
-
-SubComponentEngine::SubComponentEngine()
-{
-}
-
-SubComponentEngine::~SubComponentEngine()
-{
-}
-
-void SubComponentEngine::Sub( double x , double y , double & z ) {
- beginService( " SubComponentEngine::Sub" );
- z = x - y ;
- int S;
-
- sendMessage(NOTIF_STEP, "Sub is Computing");
- S = 1+(int) (15.0*rand()/(RAND_MAX+1.0));
- sleep(S);
- MESSAGE( "SubComponentEngine::Sub( " << x << " , " << y << " , " << z
- << " ) after " << S << " seconds" )
- endService( " SubComponentEngine::Sub" );
-}
-
-extern "C"
-{
- PortableServer::ObjectId * SubComponentEngine_factory
- (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- PortableServer::ObjectId * contId,
- const char *instanceName,
- const char *interfaceName)
- {
- MESSAGE("SubComponentEngine_factory SubComponentEngine ("
- << instanceName << "," << interfaceName << ")");
- SubComponentEngine * mySubComponent
- = new SubComponentEngine(orb, poa, contId, instanceName, interfaceName);
- return mySubComponent->getId() ;
- }
-}
-
-
PortableServer::ObjectId * contId ,
const char *instanceName ,
const char *interfaceName ,
- const char *aDataFlowName ) :
+ const char *aDataFlowName ,
+ const SUPERV::KindOfNode aKindOfNode ) :
Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
// MESSAGE("CNode_Impl::CNode_Impl activate object instanceName("
// << instanceName << ") interfaceName(" << interfaceName << ") --> "
// _thisObj = this ;
// _id = _poa->activate_object(_thisObj);
// MESSAGE( "CNode_Impl::CNode_Impl " << aDataFlowName << " " );
- beginService( "CNode_Impl::CNode_Impl" );
+// beginService( "CNode_Impl::CNode_Impl" );
_Orb = CORBA::ORB::_duplicate(orb);
_Poa = poa ;
_ContId = contId ;
+ _DataFlowEditor = NULL ;
+ _DataFlowExecutor = NULL ;
_DataFlowNode = NULL ;
- _IsNode = false ;
- endService( "CNode_Impl::CNode_Impl" );
+ _DataFlowExecutorNode = NULL ;
+ if ( aKindOfNode == SUPERV::MacroNode ) {
+ _IsNode = true ;
+ }
+ else {
+ _IsNode = false ;
+ }
+// endService( "CNode_Impl::CNode_Impl" );
}
CNode_Impl::CNode_Impl() {
PortableServer::ObjectId * contId ,
const char *instanceName ,
const char *interfaceName ,
- GraphEditor::DataFlow * DataFlowEditor ,
+ GraphEditor::DataFlow * aDataFlowEditor ,
const SALOME_ModuleCatalog::Service &NodeService ,
const char * NodeName ,
const SUPERV::KindOfNode NodeKindOfNode ,
const char * FuncName ,
const SUPERV::ListOfStrings & PythonFunction ) :
Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
- beginService( "CNode_Impl::CNode_Impl" );
+// beginService( "CNode_Impl::CNode_Impl" );
// cout << "CNode_Impl::CNode_Impl -->" << endl ;
// if ( FuncName && NodeName ) {
// cout << "CNode_Impl::CNode_Impl " << (void *) NodeName << " " << NodeName
// << " " << strlen( FuncName ) << endl ;
// }
if ( NodeKindOfNode == SUPERV::ComputingNode ) {
- MESSAGE( "CNode_Impl::CNode_Impl " << FuncName << " _poa->activate_object" );
+// MESSAGE( "CNode_Impl::CNode_Impl " << FuncName << " _poa->activate_object" );
_thisObj = this ;
_id = _poa->activate_object(_thisObj);
}
_Orb = CORBA::ORB::_duplicate(orb);
_Poa = poa ;
_ContId = contId ;
- _DataFlowEditor = DataFlowEditor ;
+ _DataFlowEditor = aDataFlowEditor ;
+ _DataFlowExecutor = NULL ;
+ DataFlowEditor()->Graph()->SetGraphEditor( aDataFlowEditor ) ;
GraphBase::ListOfFuncName aFuncName ;
GraphBase::ListOfPythonFunctions aPythonFunction ;
if ( FuncName ) {
NodeKindOfNode ,
aFuncName ,
aPythonFunction ) ;
+ _DataFlowExecutorNode = NULL ;
_IsNode = true ;
- endService( "CNode_Impl::CNode_Impl" );
+// endService( "CNode_Impl::CNode_Impl" );
// cout << "<-- CNode_Impl::CNode_Impl" << endl ;
}
PortableServer::ObjectId * contId ,
const char *instanceName ,
const char *interfaceName ,
- GraphEditor::DataFlow * DataFlowEditor ,
+ GraphEditor::DataFlow * aDataFlowEditor ,
const SALOME_ModuleCatalog::Service &NodeService ,
const char * NodeName ,
const SUPERV::KindOfNode NodeKindOfNode ,
const GraphBase::ListOfFuncName & aFuncName ,
const GraphBase::ListOfPythonFunctions & aPythonFunction ) :
Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
- MESSAGE( NodeName << " " );
- beginService( "CNode_Impl::CNode_Impl" );
+// MESSAGE( NodeName << " " );
+// beginService( "CNode_Impl::CNode_Impl" );
if ( NodeName ) {
- MESSAGE("CNode_Impl::CNode_Impl " << NodeName << " " << strlen( NodeName ) ) ;
+// MESSAGE("CNode_Impl::CNode_Impl " << NodeName << " " << strlen( NodeName ) ) ;
}
if ( NodeKindOfNode == SUPERV::ComputingNode ) {
- MESSAGE( "CNode_Impl::CNode_Impl " << aFuncName[0] << " _poa->activate_object" );
+// MESSAGE( "CNode_Impl::CNode_Impl " << aFuncName[0] << " _poa->activate_object" );
_thisObj = this ;
_id = _poa->activate_object(_thisObj);
}
_Orb = CORBA::ORB::_duplicate(orb);
_Poa = poa ;
_ContId = contId ;
- _DataFlowEditor = DataFlowEditor ;
+ _DataFlowEditor = aDataFlowEditor ;
+ _DataFlowExecutor = NULL ;
+ DataFlowEditor()->Graph()->SetGraphEditor( aDataFlowEditor ) ;
_DataFlowNode = _DataFlowEditor->AddNode( NodeService , "" , "" , NodeName ,
NodeKindOfNode ,
aFuncName ,
aPythonFunction ) ;
+ _DataFlowExecutorNode = NULL ;
_IsNode = true ;
- endService( "CNode_Impl::CNode_Impl" );
+// endService( "CNode_Impl::CNode_Impl" );
}
CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb ,
PortableServer::ObjectId * contId ,
const char *instanceName ,
const char *interfaceName ,
- GraphEditor::DataFlow * DataFlowEditor ,
- GraphEditor::InNode * DataFlowNode ) :
+ GraphEditor::DataFlow * aDataFlowEditor ,
+ GraphEditor::InNode * aDataFlowNode ) :
Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
- MESSAGE( DataFlowNode->Name() << " " );
- beginService( "CNode_Impl::CNode_Impl" );
- if ( DataFlowNode->IsComputingNode() ) {
- MESSAGE( "CNode_Impl::CNode_Impl _poa->activate_object" );
+// beginService( "CNode_Impl::CNode_Impl" );
+ if ( aDataFlowNode && aDataFlowNode->IsComputingNode() ) {
+// MESSAGE( "CNode_Impl::CNode_Impl _poa->activate_object" );
_thisObj = this ;
_id = _poa->activate_object(_thisObj);
}
else {
- MESSAGE( "CNode_Impl::CNode_Impl NO _poa->activate_object " );
+// MESSAGE( "CNode_Impl::CNode_Impl NO _poa->activate_object " );
}
_Orb = CORBA::ORB::_duplicate(orb);
_Poa = poa ;
_ContId = contId ;
- _DataFlowEditor = DataFlowEditor ;
- _DataFlowNode = DataFlowNode ;
- _IsNode = true ;
- endService( "CNode_Impl::CNode_Impl" );
+ _DataFlowEditor = aDataFlowEditor ;
+ _DataFlowExecutor = NULL ;
+ DataFlowEditor()->Graph()->SetGraphEditor( aDataFlowEditor ) ;
+ _DataFlowNode = aDataFlowNode ;
+ _DataFlowExecutorNode = NULL ;
+ if ( aDataFlowNode ) {
+ _IsNode = true ;
+ }
+ else {
+ _IsNode = false ;
+ }
+// endService( "CNode_Impl::CNode_Impl" );
+}
+
+CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb ,
+ PortableServer::POA_ptr poa ,
+ PortableServer::ObjectId * contId ,
+ const char *instanceName ,
+ const char *interfaceName ,
+ GraphExecutor::DataFlow * aDataFlowExecutor ,
+ GraphExecutor::InNode * aDataFlowExecutorNode ) :
+ Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
+// beginService( "CNode_Impl::CNode_Impl" );
+ if ( aDataFlowExecutorNode && aDataFlowExecutorNode->IsComputingNode() ) {
+// MESSAGE( "CNode_Impl::CNode_Impl _poa->activate_object" );
+ _thisObj = this ;
+ _id = _poa->activate_object(_thisObj);
+ }
+ else {
+// MESSAGE( "CNode_Impl::CNode_Impl NO _poa->activate_object " );
+ }
+ _Orb = CORBA::ORB::_duplicate(orb);
+ _Poa = poa ;
+ _ContId = contId ;
+ _DataFlowEditor = NULL ;
+ _DataFlowExecutor = aDataFlowExecutor ;
+ DataFlowExecutor()->Graph()->SetGraphExecutor( aDataFlowExecutor ) ;
+ _DataFlowNode = NULL ;
+ _DataFlowExecutorNode = aDataFlowExecutorNode ;
+ if ( aDataFlowExecutorNode ) {
+ _IsNode = true ;
+ }
+ else {
+ _IsNode = false ;
+ }
+// endService( "CNode_Impl::CNode_Impl" );
}
CNode_Impl::~CNode_Impl() {
beginService( "CNode_Impl::Delete" );
bool RetVal = false ;
if ( _DataFlowEditor->IsEditing() ) {
+ DeletePorts() ;
RetVal = _DataFlowEditor->RemoveNode( Name() ) ;
if ( RetVal ) {
RetVal = _DataFlowEditor->UnValid() ;
return RetVal ;
}
+void CNode_Impl::DeletePorts() {
+ beginService( "CNode_Impl::DeletePorts" );
+ if ( _DataFlowEditor->IsEditing() && _DataFlowNode ) {
+ int i ;
+ for ( i = 0 ; i < _DataFlowNode->ComputingNode()->GetNodeInPortsSize() ; i++ ) {
+ SUPERV::Port_var aPort = _DataFlowNode->ComputingNode()->GetChangeNodeInPort( i )->ObjRef() ;
+ if ( !CORBA::is_nil( aPort ) ) {
+ aPort->Remove() ;
+ }
+ }
+ for ( i = 0 ; i < _DataFlowNode->ComputingNode()->GetNodeOutPortsSize() ; i++ ) {
+ SUPERV::Port_var aPort = _DataFlowNode->ComputingNode()->GetChangeNodeOutPort( i )->ObjRef() ;
+ if ( !CORBA::is_nil( aPort ) ) {
+ aPort->Remove() ;
+ }
+ }
+ }
+ endService( "CNode_Impl::DeletePorts" );
+}
+
SALOME_ModuleCatalog::Service * CNode_Impl::Service() {
// beginService( "CNode_Impl::Service" );
SALOME_ModuleCatalog::Service * RetVal ;
aDataFlowName ) ;
}
else {
- RetVal = _DataFlowEditor->Graph()->Name( aDataFlowName ) ;
+// RetVal = _DataFlowEditor->Graph()->Name( aDataFlowName ) ;
+ RetVal = _DataFlowEditor->Name( aDataFlowName ) ;
}
}
// endService( "CNode_Impl::SetName" );
// endService( "CNode_Impl::IsStreamGraph" );
return RetVal ;
}
+bool CNode_Impl::IsMacro() {
+// beginService( "CNode_Impl::IsMacro" );
+ bool RetVal = false ;
+ if ( _IsNode && _DataFlowNode->IsMacroNode() ) {
+ RetVal = true ;
+ }
+// endService( "CNode_Impl::IsMacro" );
+ return RetVal ;
+}
+bool CNode_Impl::IsFlowMacro() {
+// beginService( "CNode_Impl::IsFlowMacro" );
+ bool RetVal = false ;
+ if ( _IsNode && _DataFlowNode->IsMacroNode() && _DataFlowNode->ComputingNode()->MacroObject()->IsGraph() ) {
+ RetVal = true ;
+ }
+// endService( "CNode_Impl::IsFlowMacro" );
+ return RetVal ;
+}
+bool CNode_Impl::IsStreamMacro() {
+// beginService( "CNode_Impl::IsStreamMacro" );
+ bool RetVal = false ;
+ if ( _IsNode && _DataFlowNode->IsMacroNode() && _DataFlowNode->ComputingNode()->MacroObject()->IsStreamGraph() ) {
+ RetVal = true ;
+ }
+// endService( "CNode_Impl::IsStreamMacro" );
+ return RetVal ;
+}
+bool CNode_Impl::IsHeadGraph() {
+ bool RetVal = false ;
+ beginService( "CNode_Impl::IsHeadGraph" );
+ endService( "CNode_Impl::IsHeadGraph" );
+ return RetVal ;
+}
+long CNode_Impl::GraphLevel() {
+ long RetVal = 0 ;
+ beginService( "CNode_Impl::GraphLevel" );
+ RetVal = DataFlowEditor()->Graph()->GraphMacroLevel() ;
+ endService( "CNode_Impl::GraphLevel" );
+ return RetVal ;
+}
+
bool CNode_Impl::IsComputing() {
// beginService( "CNode_Impl::IsComputing" );
bool RetVal = SUPERV::UnknownNode ;
GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
bool sts = false ;
GraphBase::InPort * anInPort = NULL ;
- if ( _DataFlowEditor->IsEditing() ) {
+ if ( _DataFlowEditor->IsEditing() && _DataFlowEditor->Graph()->GraphMacroLevel() == 0 ) {
if ( _IsNode ) {
sts = _DataFlowEditor->AddInputData( _DataFlowNode->Name() ,
ToServiceParameterName ,
return SUPERV::Port::_duplicate( iobject ) ;
}
+#if 0
+bool CNode_Impl::InputOfAny( const char * ToServiceParameterName ,
+ const CORBA::Any & aValue ) {
+ beginService( "CNode_Impl::InputOfAny" );
+ GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
+ bool RetVal = false ;
+ MESSAGE( pthread_self() << "CNode_Impl::InputOfAny " << Name() << "(" << ToServiceParameterName << ")" ) ;
+ if ( !_DataFlowEditor->IsEditing() && _DataFlowExecutor && _DataFlowEditor->Graph()->GraphMacroLevel() ) {
+ if ( !_IsNode ) {
+ GraphBase::OutPort * anOutPort ;
+ anOutPort = _DataFlowExecutor->Graph()->GetChangeInDataNodePort( ToServiceParameterName ) ;
+ MESSAGE( pthread_self() << "CNode_Impl::InputOfAny " << _DataFlowExecutor->Graph()->Name() << " " << ToServiceParameterName
+ << " " << anOutPort->State() << " Done " << anOutPort->Done() ) ;
+ RetVal = _DataFlowExecutor->AddInputData( _DataFlowExecutor->Graph()->Name() ,
+ ToServiceParameterName ,
+ aValue ) ;
+ anOutPort->State( SUPERV::ReadyState ) ;
+ anOutPort->Done( true ) ;
+ GraphExecutor::InNode * anInNode = (GraphExecutor::InNode * ) _DataFlowExecutor->Graph()->GetChangeGraphNode( anOutPort->InPorts( 0 )->NodeName() )->GetInNode() ;
+ MESSAGE( pthread_self() << "CNode_Impl::InputOfAny : " << anInNode->Name() << "->SendSomeDataReady( "
+ << _DataFlowExecutor->Graph()->Name() << " ) " ) ;
+ anInNode->SendSomeDataReady( _DataFlowExecutor->Graph()->Name() ) ;
+ if ( anInNode->IsReady() ) {
+ MESSAGE( pthread_self() << "CNode_Impl::InputOfAny : " << anInNode->Name()
+ << "->SendEvent( GraphExecutor::ExecuteEvent ) "
+ << " " << anInNode->Name() << "->IsReady() " << anInNode->IsReady() << " State "
+ << anInNode->State() ) ;
+ if ( anInNode->IsLockedDataWait() ) {
+ MESSAGE( pthread_self() << "CNode_Impl::InputOfAny : " << anInNode->Name()
+ << " IsLockedDataWait() ==> UnLockDataWait" ) ;
+ anInNode->UnLockDataWait() ;
+ }
+ anInNode->CreateNewThread( true ) ;
+ anInNode->SendEvent( GraphExecutor::ExecuteEvent ) ;
+ _DataFlowExecutor->State( GraphExecutor::ExecutingState ) ;
+ }
+ }
+ }
+ endService( "CNode_Impl::InputOfAny" );
+ return RetVal ;
+}
+#endif
+
SUPERV::Port_ptr CNode_Impl::GetInPort( const char *aParameterName ) {
SUPERV::Port_ptr Inobject = SUPERV::Port::_nil() ;
Port_Impl * myInPort = NULL ;
return SUPERV::StreamPort::_duplicate( Outobject );
}
+bool CNode_Impl::HasStreamPort() {
+ bool RetVal = false ;
+ beginService( "CNode_Impl::HasStreamPort" );
+ endService( "CNode_Impl::HasStreamPort" );
+ return RetVal ;
+}
+
SUPERV::Link_ptr CNode_Impl::GetLink(const char * ToServiceParameterName ) {
bool begin = true ;
SUPERV::Link_var iobject = SUPERV::Link::_nil() ;
int PortCount = 0 ;
SUPERV::ListOfPorts_var RetVal = new SUPERV::ListOfPorts ;
if ( _IsNode ) {
-// RetVal->length( _DataFlowNode->GetNodeInPortsSize() +
-// _DataFlowNode->GetNodeOutPortsSize() ) ;
for ( i = 0 ; i < _DataFlowNode->GetNodeInPortsSize() ; i++ ) {
GraphBase::InPort * anInPort = _DataFlowNode->GetChangeNodeInPort( i ) ;
if ( !anInPort->IsDataStream() ) {
beginService( "CNode_Impl::Ports" );
begin = false ;
}
- if ( anInPort->IsLoop() || ( anInPort->IsGate() && !anInPort->IsConnected() &&
+ if ( anInPort->IsLoop() || ( anInPort->IsGate() && anInPort->IsNotConnected() &&
( _DataFlowEditor->IsExecuting() || _DataFlowEditor->IsReadOnly() ) ) ) {
- MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " ignored" ) ;
-// RetVal[ i ] = SUPERV::Port::_duplicate( SUPERV::Port::_narrow( CORBA::Object::_nil() ) ) ;
+// MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " ignored" ) ;
}
else if ( CORBA::is_nil( anInPort->ObjRef() ) ) {
- MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " IsExecuting "
- << _DataFlowEditor->IsExecuting() << " IsGate/IsConnected " << anInPort->IsGate()
- << "/" << anInPort->IsConnected() ) ;
+// MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " IsExecuting "
+// << _DataFlowEditor->IsExecuting() << " IsGate/IsConnected " << anInPort->IsGate()
+// << "/" << anInPort->IsNotConnected() ) ;
Port_Impl * myPort ;
if ( _DataFlowNode->HasInput( anInPort->PortName() ) ) {
const CORBA::Any * anAny = anInPort->GetOutPort()->Value() ;
anInPort->ObjRef( SUPERV::Port::_duplicate( iobject ) ) ;
}
else {
- MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() ) ;
+// MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() ) ;
PortCount += 1 ;
RetVal->length( PortCount ) ;
RetVal[ PortCount - 1 ] = SUPERV::Port::_duplicate( anInPort->ObjRef() ) ;
}
}
else {
- MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " IsDataStream" ) ;
-// RetVal[ i ] = SUPERV::Port::_duplicate( SUPERV::Port::_narrow( CORBA::Object::_nil() ) ) ;
+// MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " IsDataStream" ) ;
}
}
for ( i = 0 ; i < _DataFlowNode->GetNodeOutPortsSize() ; i++ ) {
beginService( "CNode_Impl::Ports" );
begin = false ;
}
- if ( anOutPort->IsLoop() || ( anOutPort->IsGate() && !anOutPort->IsConnected() &&
+ if ( anOutPort->IsLoop() || ( anOutPort->IsGate() && anOutPort->IsNotConnected() &&
( _DataFlowEditor->IsExecuting() || _DataFlowEditor->IsReadOnly() ) ) ) {
- MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() << " ignored" ) ;
-// RetVal[ _DataFlowNode->GetNodeInPortsSize() + i ] = SUPERV::Port::_duplicate( SUPERV::Port::_narrow( CORBA::Object::_nil() ) ) ;
+// MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() << " ignored" ) ;
}
else if ( CORBA::is_nil( anOutPort->ObjRef() ) ) {
- MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() ) ;
+// MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() ) ;
const CORBA::Any * anAny = anOutPort->Value() ;
Port_Impl * myPort = new Port_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
anOutPort->ObjRef( SUPERV::Port::_duplicate( iobject ) ) ;
}
else {
- MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() ) ;
+// MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() ) ;
PortCount += 1 ;
RetVal->length( PortCount ) ;
RetVal[ PortCount - 1 ] = SUPERV::Port::_duplicate( anOutPort->ObjRef() ) ;
}
}
else {
- MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() << " IsDataStream" ) ;
-// RetVal[ _DataFlowNode->GetNodeInPortsSize() + i ] = SUPERV::Port::_duplicate( SUPERV::Port::_narrow( CORBA::Object::_nil() ) ) ;
+// MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() << " IsDataStream" ) ;
}
}
}
}
}
else {
-// RetVal[ i ] = SUPERV::Port::_duplicate( SUPERV::Port::_narrow( CORBA::Object::_nil() ) ) ;
}
}
j = _DataFlowEditor->Graph()->GetNodeInDataNodePortsSize() ;
}
}
else {
-// RetVal[ j + i ] = SUPERV::Port::_duplicate( SUPERV::Port::_narrow( CORBA::Object::_nil() ) ) ;
}
}
}
}
-// int RetVallength = (unsigned int ) RetVal->length() ;
-// for ( i = 0 ; i < RetVallength ; i++ ) {
-// MESSAGE( "Port " << i << " " << RetVal[i]->Name() << " of Node " << Name() ) ;
-// }
+#if 0
+ int RetVallength = (unsigned int ) RetVal->length() ;
+ for ( i = 0 ; i < RetVallength ; i++ ) {
+ MESSAGE( "Port " << i << " " << RetVal[i]->Name() << " of Node " << Name() ) ;
+ }
+#endif
if ( !begin ) {
endService( "CNode_Impl::Ports " ) ;
}
beginService( "CNode_Impl::StreamPorts" );
begin = false ;
}
- if ( anInPort->IsLoop() || ( anInPort->IsGate() && !anInPort->IsConnected() &&
+ if ( anInPort->IsLoop() || ( anInPort->IsGate() && anInPort->IsNotConnected() &&
( _DataFlowEditor->IsExecuting() || _DataFlowEditor->IsReadOnly() ) ) ) {
MESSAGE( "InStreamPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " ignored" ) ;
// RetVal[ i ] = SUPERV::StreamPort::_duplicate( SUPERV::StreamPort::_narrow( CORBA::Object::_nil() ) ) ;
else if ( CORBA::is_nil( anInPort->ObjRef() ) ) {
MESSAGE( "InStreamPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " IsExecuting "
<< _DataFlowEditor->IsExecuting() << " IsGate/IsConnected " << anInPort->IsGate()
- << "/" << anInPort->IsConnected() ) ;
+ << "/" << anInPort->IsNotConnected() ) ;
StreamPort_Impl * myStreamPort ;
if ( _DataFlowNode->HasInput( anInPort->PortName() ) ) {
const CORBA::Any * anAny = anInPort->GetOutPort()->Value() ;
beginService( "CNode_Impl::StreamPorts" );
begin = false ;
}
- if ( anOutPort->IsLoop() || ( anOutPort->IsGate() && !anOutPort->IsConnected() &&
+ if ( anOutPort->IsLoop() || ( anOutPort->IsGate() && anOutPort->IsNotConnected() &&
( _DataFlowEditor->IsExecuting() || _DataFlowEditor->IsReadOnly() ) ) ) {
MESSAGE( "OutStreamPort " << i << " " << anOutPort->PortName() << " of Node " << Name() << " ignored" ) ;
// RetVal[ _DataFlowNode->GetNodeInPortsSize() + i ] = SUPERV::StreamPort::_duplicate( SUPERV::StreamPort::_narrow( CORBA::Object::_nil() ) ) ;
beginService( "CNode_Impl::Links" ) ;
SUPERV::ListOfLinks_var RetVal = new SUPERV::ListOfLinks ;
if ( _DataFlowNode ) {
+// MESSAGE( "CNode_Impl::Links " << DataFlowEditor() << " " << DataFlowEditor()->Graph() << " " << DataFlowEditor()->Graph()->ObjImpl() << " " << _DataFlowNode->ComputingNode() << " " << _DataFlowNode->ComputingNode()->Name() ) ;
RetVal = DataFlowEditor()->Graph()->ObjImpl()->Links( _DataFlowNode->ComputingNode() , NULL ) ;
}
else {
// endService( "CNode_Impl::Thread" );
return RetVal ;
}
-SUPERV::AutomatonState CNode_Impl::AutoState() {
+GraphExecutor::AutomatonState CNode_Impl::AutoState() {
// beginService( "CNode_Impl::AutoState" );
- SUPERV::AutomatonState RetVal = SUPERV::UnKnownState ;
+ GraphExecutor::AutomatonState RetVal = GraphExecutor::UnKnownState ;
GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
if ( _DataFlowExecutor ) {
if ( _IsNode ) {
beginService( "CNode_Impl::Run" );
bool RetVal = false ;
GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
+ MESSAGE( "CNode_Impl::Run DataFlowExecutor " << _DataFlowExecutor << Name() << " _IsNode " << _IsNode ) ;
if ( _DataFlowExecutor ) {
_DataFlowEditor->EditedAfterExecution( false ) ;
if ( _IsNode ) {
PortableServer::POA_ptr _Poa ;
PortableServer::ObjectId * _ContId ;
- GraphEditor::DataFlow * _DataFlowEditor ;
- GraphEditor::InNode * _DataFlowNode ;
+ GraphEditor::DataFlow * _DataFlowEditor ;
+ GraphExecutor::DataFlow * _DataFlowExecutor ;
+ GraphEditor::InNode * _DataFlowNode ;
+ GraphExecutor::InNode * _DataFlowExecutorNode ;
bool _IsNode ;
public:
PortableServer::ObjectId * contId ,
const char *instanceName ,
const char *interfaceName ,
- const char *aDataFlowName ) ;
+ const char *aDataFlowName ,
+ const SUPERV::KindOfNode aKindOfNode ) ;
CNode_Impl( CORBA::ORB_ptr orb ,
PortableServer::POA_ptr poa ,
PortableServer::ObjectId * contId ,
const char *interfaceName ,
GraphEditor::DataFlow * DataFlowEditor ,
GraphEditor::InNode * DataFlowNode ) ;
+ CNode_Impl( CORBA::ORB_ptr orb ,
+ PortableServer::POA_ptr poa ,
+ PortableServer::ObjectId * contId ,
+ const char *instanceName ,
+ const char *interfaceName ,
+ GraphExecutor::DataFlow * DataFlowExecutor ,
+ GraphExecutor::InNode * DataFlowExecutorNode ) ;
virtual ~CNode_Impl() ;
virtual void destroy() ;
virtual bool Delete() ;
+ void DeletePorts() ;
+
virtual void DataFlowEditor( GraphEditor::DataFlow * DataFlowEditor ) {
_DataFlowEditor = DataFlowEditor ; } ;
virtual GraphEditor::DataFlow * DataFlowEditor() {
return _DataFlowEditor ; } ;
+ virtual void DataFlowExecutor( GraphExecutor::DataFlow * DataFlowExecutor ) {
+ _DataFlowExecutor = DataFlowExecutor ; } ;
+ virtual GraphExecutor::DataFlow * DataFlowExecutor() {
+ return _DataFlowExecutor ; } ;
virtual void DataFlowNode( GraphEditor::InNode * DataFlowNode ) {
_DataFlowNode = DataFlowNode ; } ;
virtual GraphEditor::InNode * DataFlowNode() {
return _DataFlowNode ; } ;
+ virtual void DataFlowNode( GraphExecutor::InNode * DataFlowExecutorNode ) {
+ _DataFlowExecutorNode = DataFlowExecutorNode ; } ;
+ virtual GraphExecutor::InNode * DataFlowExecutorNode() {
+ return _DataFlowExecutorNode ; } ;
virtual char * Name() ;
virtual bool SetName( const char * aDataFlowName ) ;
_DataFlowNode->SetObjRef( aNode ) ;
}
else {
- _DataFlowEditor->Graph()->SetObjRef( SUPERV::Graph::_narrow( aNode ) ) ;
+ if ( _DataFlowEditor ) {
+ _DataFlowEditor->Graph()->SetObjRef( SUPERV::Graph::_narrow( aNode ) ) ;
+ }
+ if ( _DataFlowExecutor ) {
+ _DataFlowExecutor->Graph()->SetObjRef( SUPERV::Graph::_narrow( aNode ) ) ;
+ }
+
}
} ;
virtual SUPERV::Port_ptr Input( const char * ToServiceParameterName ,
const SUPERV::Value_ptr aValue ) ;
+// virtual bool InputOfAny( const char * ToServiceParameterName ,
+// const CORBA::Any & aValue ) ;
virtual SUPERV::Port_ptr GetInPort( const char * aParameterName ) ;
virtual SUPERV::Port_ptr GetOutPort( const char * aParameterName ) ;
virtual SUPERV::ListOfPorts * Ports() ;
virtual SUPERV::ListOfStreamPorts * StreamPorts() ;
+ virtual bool HasStreamPort() ;
+
virtual SUPERV::ListOfLinks * Links() ;
virtual SUPERV::ListOfStreamLinks * StreamLinks() ;
virtual bool IsStreamGraph() ;
virtual bool IsGraph() ;
+ virtual bool IsMacro() ;
+ virtual bool IsFlowMacro() ;
+ virtual bool IsStreamMacro() ;
+ virtual bool IsHeadGraph() ;
+ virtual long GraphLevel() ;
virtual bool IsComputing() ;
virtual bool IsFactory() ;
virtual bool IsInLine() ;
virtual long Thread() ;
- virtual SUPERV::AutomatonState AutoState() ;
+ GraphExecutor::AutomatonState AutoState() ;
virtual bool ReadyW() ;
virtual bool RunningW() ;
MESSAGE("--------> ELNode_Impl::Delete() BEGIN");
bool RetVal = false ;
if ( DataFlowEditor()->IsEditing() ) {
+ DeletePorts() ;
MESSAGE("--------> In Delete: Editing dataflow");
RetVal = DataFlowEditor()->RemoveNode( Name() ) ;
MESSAGE("--------> RetVal = "<<RetVal);
// beginService( "ESNode_Impl::Delete" );
bool RetVal = false ;
if ( DataFlowEditor()->IsEditing() ) {
+ DeletePorts() ;
RetVal = DataFlowEditor()->RemoveNode( Name() ) ;
if ( RetVal )
RetVal = DataFlowEditor()->IsValid() ;
// beginService( "FNode_Impl::Delete" );
bool RetVal = false ;
if ( DataFlowEditor()->IsEditing() ) {
+ DeletePorts() ;
RetVal = DataFlowEditor()->RemoveNode( Name() ) ;
if ( RetVal )
RetVal = DataFlowEditor()->IsValid() ;
GNode_Impl::GNode_Impl() {
}
+GNode_Impl::GNode_Impl( CORBA::ORB_ptr orb ,
+ PortableServer::POA_ptr poa ,
+ PortableServer::ObjectId * contId ,
+ const char *instanceName ,
+ const char *interfaceName ,
+ const char *aDataFlowName ,
+ const SUPERV::KindOfNode aKindOfNode ) :
+ INode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowName , aKindOfNode ) {
+// MESSAGE("GNode_Impl::GNode_Impl activate object instanceName("
+// << instanceName << ") interfaceName(" << interfaceName << ") --> "
+// << hex << (void *) this << dec )
+// _thisObj = this ;
+// _id = _poa->activate_object(_thisObj);
+// MESSAGE( "GNode_Impl::GNode_Impl " << aDataFlowName );
+// beginService( "GNode_Impl::GNode_Impl" );
+ _Orb = CORBA::ORB::_duplicate(orb);
+ _Poa = poa ;
+ _ContId = contId ;
+// endService( "INode_Impl::INode_Impl" );
+}
+
GNode_Impl::GNode_Impl( CORBA::ORB_ptr orb ,
PortableServer::POA_ptr poa ,
PortableServer::ObjectId * contId ,
// Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
INode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , FuncName , PythonFunction , NodeKindOfNode ) {
// MESSAGE( NodeName << " " );
- beginService( "GNode_Impl::GNode_Impl" );
+// beginService( "GNode_Impl::GNode_Impl" );
if ( FuncName ) {
// cout << "GNode_Impl::GNode_Impl " << (void *) FuncName << " " << FuncName
// << " " << strlen( FuncName ) << endl ;
// DataFlowNode( DataFlowEditor()->AddNode( SALOME_ModuleCatalog::Service() ,
// "" , "" , "" ,
// NodeKindOfNode ) ) ;
- endService( "GNode_Impl::GNode_Impl" );
+// endService( "GNode_Impl::GNode_Impl" );
}
GNode_Impl::GNode_Impl( CORBA::ORB_ptr orb ,
// Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
INode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , FuncNameList , PythonFunctionList , NodeKindOfNode ) {
// MESSAGE( NodeName << " " );
- beginService( "GNode_Impl::GNode_Impl" );
+// beginService( "GNode_Impl::GNode_Impl" );
if ( NodeKindOfNode == SUPERV::GOTONode ) {
_thisObj = this ;
_id = _poa->activate_object(_thisObj);
// DataFlowNode( DataFlowEditor()->AddNode( SALOME_ModuleCatalog::Service() ,
// "" , "" , "" ,
// NodeKindOfNode ) ) ;
- endService( "GNode_Impl::GNode_Impl" );
+// endService( "GNode_Impl::GNode_Impl" );
}
GNode_Impl::GNode_Impl( CORBA::ORB_ptr orb ,
GraphEditor::InNode * aDataFlowNode ) :
// Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
INode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , aDataFlowNode ) {
- MESSAGE( DataFlowNode()->Name() << " " );
- beginService( "GNode_Impl::GNode_Impl" );
- if ( DataFlowNode()->IsGOTONode() ) {
+// beginService( "GNode_Impl::GNode_Impl" );
+ if ( DataFlowNode() && DataFlowNode()->IsGOTONode() ) {
+// MESSAGE( "GNode_Impl::GNode_Impl " << DataFlowNode()->PyFuncName()
+// << " _poa->activate_object" );
_thisObj = this ;
_id = _poa->activate_object(_thisObj);
}
+ else {
+// MESSAGE( "GNode_Impl::GNode_Impl NO _poa->activate_object" );
+ }
_Orb = CORBA::ORB::_duplicate(orb);
_Poa = poa ;
_ContId = contId ;
- endService( "GNode_Impl::GNode_Impl" );
+// endService( "GNode_Impl::GNode_Impl" );
+}
+
+GNode_Impl::GNode_Impl( CORBA::ORB_ptr orb ,
+ PortableServer::POA_ptr poa ,
+ PortableServer::ObjectId * contId ,
+ const char *instanceName ,
+ const char *interfaceName ,
+ GraphExecutor::DataFlow * aDataFlowExecutor ,
+ GraphExecutor::InNode * aDataFlowExecutorNode ) :
+// Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
+ INode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowExecutor , aDataFlowExecutorNode ) {
+// beginService( "GNode_Impl::GNode_Impl" );
+ if ( DataFlowExecutorNode() && DataFlowExecutorNode()->IsGOTONode() ) {
+// MESSAGE( "GNode_Impl::GNode_Impl " << DataFlowExecutorNode()->Name()
+// << " _poa->activate_object" );
+ _thisObj = this ;
+ _id = _poa->activate_object(_thisObj);
+ }
+ else {
+// MESSAGE( "GNode_Impl::GNode_Impl NO _poa->activate_object" );
+ }
+ _Orb = CORBA::ORB::_duplicate(orb);
+ _Poa = poa ;
+ _ContId = contId ;
+// endService( "GNode_Impl::GNode_Impl" );
}
GNode_Impl::~GNode_Impl() {
beginService( "GNode_Impl::Delete" );
bool RetVal = false ;
if ( DataFlowEditor()->IsEditing() ) {
+ DeletePorts() ;
RetVal = DataFlowEditor()->RemoveNode( Name() ) ;
if ( RetVal )
RetVal = DataFlowEditor()->IsValid() ;
SUPERV::INode_ptr GNode_Impl::Coupled() {
// beginService( "GNode_Impl::Coupled" );
SUPERV::INode_var iobject = SUPERV::INode::_nil() ;
- if ( DataFlowNode()->CoupledNode() ) {
- if ( CORBA::is_nil( DataFlowNode()->CoupledNode()->ObjRef() ) ) {
- INode_Impl * myNode = new INode_Impl( _Orb , _Poa , _ContId ,
- instanceName() , interfaceName() ,
- DataFlowEditor() ,
- (GraphEditor::InNode *) DataFlowNode()->CoupledNode()->GetInNode() ) ;
- PortableServer::ObjectId * id = myNode->getId() ;
- CORBA::Object_var obj = _poa->id_to_reference(*id);
- iobject = SUPERV::INode::_narrow(obj) ;
- myNode->SetObjRef( SUPERV::INode::_duplicate( iobject ) ) ;
+ if ( DataFlowNode() ) {
+ if ( DataFlowNode()->CoupledNode() ) {
+ if ( CORBA::is_nil( DataFlowNode()->CoupledNode()->ObjRef() ) ) {
+ INode_Impl * myNode = new INode_Impl( _Orb , _Poa , _ContId ,
+ instanceName() , interfaceName() ,
+ DataFlowEditor() ,
+ (GraphEditor::InNode *) DataFlowNode()->CoupledNode()->GetInNode() ) ;
+ PortableServer::ObjectId * id = myNode->getId() ;
+ CORBA::Object_var obj = _poa->id_to_reference(*id);
+ iobject = SUPERV::INode::_narrow(obj) ;
+ myNode->SetObjRef( SUPERV::INode::_duplicate( iobject ) ) ;
+ }
+ else {
+ iobject = SUPERV::INode::_narrow( DataFlowNode()->CoupledNode()->ObjRef() ) ;
+ }
}
- else {
- iobject = SUPERV::INode::_narrow( DataFlowNode()->CoupledNode()->ObjRef() ) ;
+ }
+ else {
+ if ( DataFlowEditor()->Graph()->CoupledNode() ) {
+ if ( CORBA::is_nil( DataFlowEditor()->Graph()->CoupledNode()->ObjRef() ) ) {
+ INode_Impl * myNode = new INode_Impl( _Orb , _Poa , _ContId ,
+ instanceName() , interfaceName() ,
+ DataFlowEditor() ,
+ (GraphEditor::InNode *) DataFlowEditor()->Graph()->CoupledNode()->GetInNode() ) ;
+ PortableServer::ObjectId * id = myNode->getId() ;
+ CORBA::Object_var obj = _poa->id_to_reference(*id);
+ iobject = SUPERV::INode::_narrow(obj) ;
+ myNode->SetObjRef( SUPERV::INode::_duplicate( iobject ) ) ;
+ }
+ else {
+ iobject = SUPERV::INode::_narrow( DataFlowEditor()->Graph()->CoupledNode()->ObjRef() ) ;
+ }
}
}
// endService( "GNode_Impl::Coupled" );
public:
GNode_Impl();
+ GNode_Impl( CORBA::ORB_ptr orb ,
+ PortableServer::POA_ptr poa ,
+ PortableServer::ObjectId * contId ,
+ const char *instanceName ,
+ const char *interfaceName ,
+ const char *aDataFlowName ,
+ const SUPERV::KindOfNode aKindOfNode ) ;
GNode_Impl( CORBA::ORB_ptr orb ,
PortableServer::POA_ptr poa ,
PortableServer::ObjectId * contId ,
const char *interfaceName ,
GraphEditor::DataFlow * DataFlowEditor ,
GraphEditor::InNode * DataFlowNode ) ;
+ GNode_Impl( CORBA::ORB_ptr orb ,
+ PortableServer::POA_ptr poa ,
+ PortableServer::ObjectId * contId ,
+ const char *instanceName ,
+ const char *interfaceName ,
+ GraphExecutor::DataFlow * DataFlowExecutor ,
+ GraphExecutor::InNode * DataFlowExecutorNode ) ;
virtual ~GNode_Impl() ;
virtual void destroy() ;
virtual bool Delete() ;
//#include "utilities.h"
-#include "Graph_Impl.hxx"
+#include "StreamGraph_Impl.hxx"
#include "DataFlowEditor_DataFlow.hxx"
extern GraphExecutor::FiniteStateMachine * theAutomaton ;
-Graph_Impl::Graph_Impl( CORBA::ORB_ptr orb ,
- PortableServer::POA_ptr poa ,
- PortableServer::ObjectId * contId ,
- const char *instanceName ,
- const char *interfaceName ,
- const char *aDataFlowName ,
- const SUPERV::KindOfNode aKindOfNode ) :
- INode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowName ) {
-// MESSAGE("Graph_Impl::Graph_Impl activate object instanceName("
-// << instanceName << ") interfaceName(" << interfaceName << ") --> "
-// << hex << (void *) this << dec )
- beginService( "Graph_Impl::Graph_Impl" );
- _Orb = CORBA::ORB::_duplicate(orb);
- _Poa = poa ;
- _ContId = contId ;
- if ( aKindOfNode == SUPERV::DataFlowGraph ) {
- _thisObj = this ;
- _id = _poa->activate_object(_thisObj);
- }
-
- string dbgfile = "/tmp/" ;
+static void CreateEditor( CORBA::ORB_ptr orb ,
+ const char *instanceName ,
+ const char *aDataFlowName ,
+ const SUPERV::KindOfNode aKindOfNode ,
+ string & dbgfile ,
+ GraphEditor::DataFlow ** aDataFlowEditor ) {
+// string dbgfile = "/tmp/" ;
+ bool aXmlFile = false ;
+ dbgfile = "/tmp/" ;
dbgfile += instanceName ;
dbgfile += "_" ;
int lenname = strlen( aDataFlowName ) ;
if ( lenname > 4 && !strcmp( &aDataFlowName[ lenname - 4 ] , ".xml" ) ) {
strncpy( theDataFlowName , &aDataFlowName[ 0 ] , lenname-4 ) ;
theDataFlowName[ lenname-4 ] = '\0' ;
+ aXmlFile = true ;
int i ;
for ( i = lenname - 5 ; i >= 0 ; i-- ) {
if ( aDataFlowName[ i ] == '/' ) {
strncpy( theDataFlowName , &aDataFlowName[ i + 1 ] , lenname-5-i ) ;
theDataFlowName[ lenname-5-i ] = '\0' ;
break ;
- }
+ }
}
}
else {
strcpy( theDataFlowName , &aDataFlowName[ 0 ] ) ;
}
- dbgfile += theDataFlowName ;
}
- dbgfile += ".log" ;
- _DebugFileName = new char[ strlen( dbgfile.c_str() )+1 ] ;
- strcpy( _DebugFileName , dbgfile.c_str() ) ;
+ string theDataFlowInstanceName = theDataFlowName ;
+ if ( !aXmlFile ) {
+ theDataFlowInstanceName = theAutomaton->GraphInstanceName( theDataFlowName ) ;
+ }
+ dbgfile += theDataFlowInstanceName ;
+ dbgfile = dbgfile + "_" + theAutomaton->DbgFileNumber() + ".log" ;
+ SALOME_NamingService * NamingService = new SALOME_NamingService( orb ) ;
+ *aDataFlowEditor = new GraphEditor::DataFlow( orb , NamingService ,
+ theDataFlowInstanceName.c_str() , dbgfile.c_str() ,
+ aKindOfNode ) ;
+ MESSAGE( "CreateEditor " << theDataFlowName << " uniquely named " << theDataFlowInstanceName << " created with "
+ << dbgfile.c_str() ) ;
+ delete [] theDataFlowName ;
+}
+
+static void CreateEditor( CORBA::ORB_ptr orb ,
+ const char *instanceName ,
+ const char *aDataFlowName ,
+ const SUPERV::KindOfNode aKindOfNode ,
+ string & dbgfile ,
+ GraphExecutor::DataFlow ** aDataFlowExecutor ) {
+// string dbgfile = "/tmp/" ;
+ dbgfile = "/tmp/" ;
+ dbgfile += instanceName ;
+ dbgfile += "_" ;
+ int lenname = strlen( aDataFlowName ) ;
+ char * theDataFlowName = new char [ lenname+1 ] ;
+ strcpy( theDataFlowName , aDataFlowName ) ;
+ if ( aDataFlowName ) {
+ strcpy( theDataFlowName , &aDataFlowName[ 0 ] ) ;
+ }
+ string theDataFlowInstanceName = theDataFlowName ;
+ dbgfile += theDataFlowInstanceName ;
+ dbgfile = dbgfile + "_" + theAutomaton->DbgFileNumber() ;
+
+ ostringstream astr ;
+ astr << theAutomaton->ExecNumber() ;
+ dbgfile += astr.str() ;
+ dbgfile += string( "_Exec.log" ) ;
+
+ SALOME_NamingService * NamingService = new SALOME_NamingService( orb ) ;
+ *aDataFlowExecutor = new GraphExecutor::DataFlow( orb , NamingService ,
+ theDataFlowInstanceName.c_str() , dbgfile.c_str() ,
+ aKindOfNode ) ;
+ MESSAGE( "CreateEditor " << theDataFlowName << " " << theDataFlowInstanceName << " created with "
+ << dbgfile.c_str() ) ;
+ delete [] theDataFlowName ;
+}
+
+Graph_Impl::Graph_Impl( CORBA::ORB_ptr orb ,
+ PortableServer::POA_ptr poa ,
+ PortableServer::ObjectId * contId ,
+ const char *instanceName ,
+ const char *interfaceName ,
+ const char *aDataFlowName ,
+ const SUPERV::KindOfNode aKindOfNode ) :
+ GNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowName , aKindOfNode ) {
+// MESSAGE("Graph_Impl::Graph_Impl activate object instanceName("
+// << instanceName << ") interfaceName(" << interfaceName << ") --> "
+// << hex << (void *) this << dec )
+// beginService( "Graph_Impl::Graph_Impl" );
+ _Orb = CORBA::ORB::_duplicate(orb);
+ _Poa = poa ;
+ _ContId = contId ;
+ if ( aKindOfNode == SUPERV::DataFlowGraph || aKindOfNode == SUPERV::MacroNode ) {
+// MESSAGE( "Graph_Impl::Graph_Impl _poa->activate_object" );
+ _thisObj = this ;
+ _id = _poa->activate_object(_thisObj);
+ }
+ else {
+// MESSAGE( "Graph_Impl::Graph_Impl NO _poa->activate_object " );
+ }
- _NamingService = new SALOME_NamingService( orb ) ;
- GraphEditor::DataFlow * aDataFlowEditor ;
- aDataFlowEditor = new GraphEditor::DataFlow( _Orb , _NamingService ,
- theDataFlowName , _DebugFileName ,
- aKindOfNode ) ;
+ if ( aKindOfNode == SUPERV::DataFlowGraph || aKindOfNode == SUPERV::DataStreamGraph ) {
+ string dbgfile ;
+ GraphEditor::DataFlow * aDataFlowEditor ;
+ CreateEditor( orb , instanceName , aDataFlowName , aKindOfNode ,
+ dbgfile , &aDataFlowEditor ) ;
+ _DebugFileName = new char[ strlen( dbgfile.c_str() )+1 ] ;
+ strcpy( _DebugFileName , dbgfile.c_str() ) ;
+
+ _NamingService = new SALOME_NamingService( orb ) ;
+ DataFlowEditor( aDataFlowEditor ) ;
+ DataFlowEditor()->Graph()->SetGraphEditor( aDataFlowEditor ) ;
+ DataFlowEditor()->Graph()->SetObjImpl( this ) ;
+ }
+ pthread_mutex_init( &_MutexExecutorWait , NULL ) ;
+// DataFlowExecutor( NULL ) ;
+// endService( "Graph_Impl::Graph_Impl" );
+}
+
+Graph_Impl::Graph_Impl( CORBA::ORB_ptr orb ,
+ PortableServer::POA_ptr poa ,
+ PortableServer::ObjectId * contId ,
+ const char *instanceName ,
+ const char *interfaceName ,
+ GraphEditor::DataFlow * aDataFlowEditor ,
+ GraphEditor::InNode * aDataFlowNode ) :
+ GNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , aDataFlowNode ) {
+// beginService( "Graph_Impl::Graph_Impl" );
+// MESSAGE( aDataFlowEditor->Graph()->Name() << " " );
+ if ( aDataFlowEditor->Graph()->IsDataFlowNode() || aDataFlowNode->IsMacroNode() ) {
+// MESSAGE( "Graph_Impl::Graph_Impl _poa->activate_object" );
+ _thisObj = this ;
+ _id = _poa->activate_object(_thisObj);
+ }
+ else {
+// MESSAGE( "Graph_Impl::Graph_Impl NO _poa->activate_object " );
+ }
+ _Orb = CORBA::ORB::_duplicate(orb);
+ _Poa = poa ;
+ _ContId = contId ;
DataFlowEditor( aDataFlowEditor ) ;
+ DataFlowEditor()->Graph()->SetGraphEditor( aDataFlowEditor ) ;
DataFlowEditor()->Graph()->SetObjImpl( this ) ;
pthread_mutex_init( &_MutexExecutorWait , NULL ) ;
- _DataFlowExecutor = NULL ;
- delete [] theDataFlowName ;
- endService( "Graph_Impl::Graph_Impl" );
+// DataFlowExecutor( NULL ) ;
+// endService( "Graph_Impl::Graph_Impl" );
+}
+
+Graph_Impl::Graph_Impl( CORBA::ORB_ptr orb ,
+ PortableServer::POA_ptr poa ,
+ PortableServer::ObjectId * contId ,
+ const char *instanceName ,
+ const char *interfaceName ,
+ GraphExecutor::DataFlow * aDataFlowExecutor ,
+ GraphExecutor::InNode * aDataFlowExecutorNode ) :
+ GNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowExecutor , aDataFlowExecutorNode ) {
+// beginService( "Graph_Impl::Graph_Impl" );
+// MESSAGE( aDataFlowExecutor->Graph()->Name() << " " );
+ if ( aDataFlowExecutor->Graph()->IsDataFlowNode() || aDataFlowExecutorNode->IsMacroNode() ) {
+// MESSAGE( "Graph_Impl::Graph_Impl _poa->activate_object" );
+ _thisObj = this ;
+ _id = _poa->activate_object(_thisObj);
+ }
+ else {
+// MESSAGE( "Graph_Impl::Graph_Impl NO _poa->activate_object " );
+ }
+ _Orb = CORBA::ORB::_duplicate(orb);
+ _Poa = poa ;
+ _ContId = contId ;
+ DataFlowExecutor( aDataFlowExecutor ) ;
+ DataFlowExecutor()->Graph()->SetGraphExecutor( aDataFlowExecutor ) ;
+ DataFlowExecutor()->Graph()->SetObjImpl( this ) ;
+ pthread_mutex_init( &_MutexExecutorWait , NULL ) ;
+// DataFlowExecutor( NULL ) ;
+// endService( "Graph_Impl::Graph_Impl" );
}
Graph_Impl::Graph_Impl() {
// endService( "Graph_Impl::destroy" );
}
+
char* Graph_Impl::getIOR() {
- if (CORBA::is_nil(myServant)) {
+ if ( IsMacro() ) {
+ return CORBA::string_dup( NULLSTRING ) ;
+ }
+ else if ( CORBA::is_nil( myServant ) ) {
PortableServer::ObjectId* id = getId();
CORBA::Object_var obj;
obj = _poa->id_to_reference(*id);
SUPERV::Graph_ptr Graph_Impl::Copy() {
beginService( "Graph_Impl::Copy" );
- Graph_Impl * myGraph ;
- myGraph = new Graph_Impl( _Orb , _Poa, _ContId,
- instanceName() , interfaceName() ,
- DataFlowEditor()->Graph()->Name() , SUPERV::DataFlowGraph ) ;
- PortableServer::ObjectId * id = myGraph->getId() ;
- CORBA::Object_var obj = _poa->id_to_reference(*id);
- SUPERV::Graph_var iobject ;
- iobject = SUPERV::Graph::_narrow(obj) ;
- GraphBase::SGraph * aSGraph = GetGraph() ;
- myGraph->LoadGraph( aSGraph ) ;
+ SUPERV::Graph_var iobject = SUPERV::Graph::_nil() ;
+ if ( !IsMacro() ) {
+ Graph_Impl * myGraph ;
+ myGraph = new Graph_Impl( _Orb , _Poa, _ContId,
+ instanceName() , interfaceName() ,
+ DataFlowEditor()->Graph()->Name() , SUPERV::DataFlowGraph ) ;
+ PortableServer::ObjectId * id = myGraph->getId() ;
+ CORBA::Object_var obj = _poa->id_to_reference(*id);
+ iobject = SUPERV::Graph::_narrow(obj) ;
+ GraphBase::ListOfSGraphs * aListOfSGraphs = GetGraphs() ;
+ myGraph->LoadGraphs( aListOfSGraphs ) ;
+ }
endService( "Graph_Impl::Copy" );
return SUPERV::Graph::_duplicate(iobject) ;
}
return SUPERV::Graph::_duplicate(iobject) ;
}
-GraphBase::SGraph * Graph_Impl::GetGraph() {
- return DataFlowEditor()->GetDataFlow() ;
+GraphBase::ListOfSGraphs * Graph_Impl::GetGraphs() {
+ return DataFlowEditor()->GetDataFlows() ;
}
-#if 0
-char * Graph_Impl::DataFlowInfo() {
- beginService( "Graph_Impl::DataFlowInfo" );
- char * RetVal = DataFlowEditor()->DataFlowInfo() ;
- endService( "Graph_Impl::DataFlowInfo" );
- return CORBA::string_dup( RetVal ) ;
-}
-
-char * Graph_Impl::DataNodeInfo() {
- beginService( "Graph_Impl::DataNodeInfo" );
- char * RetVal = DataFlowEditor()->DataNodeInfo() ;
- endService( "Graph_Impl::DataNodeInfo" );
- return CORBA::string_dup( RetVal ) ;
-}
-
-char * Graph_Impl::NodeInfo( const char * aNodeName ) {
- beginService( "Graph_Impl::NodeInfo" );
- char * RetVal = DataFlowEditor()->NodeInfo( aNodeName ) ;
- endService( "Graph_Impl::NodeInfo" );
- return CORBA::string_dup( RetVal ) ;
-}
-#endif
-
-bool Graph_Impl::LoadGraph(const GraphBase::SGraph * aDataFlow ) {
-// beginService( "Graph_Impl::LoadGraph" );
+bool Graph_Impl::LoadGraphs( GraphBase::ListOfSGraphs * aListOfDataFlows ) {
+ beginService( "Graph_Impl::LoadGraphs" );
bool RetVal = false ;
if ( DataFlowEditor()->IsEditing() ) {
- RetVal = DataFlowEditor()->LoadDataFlow( aDataFlow ) ;
+// RetVal = DataFlowEditor()->LoadDataFlows( aListOfDataFlows ) ;
+ RetVal = LoadDataFlows( DataFlowEditor() , aListOfDataFlows , 0 ) ;
}
-// endService( "Graph_Impl::LoadGraph" );
+ endService( "Graph_Impl::LoadGraphs" );
return RetVal ;
}
bool Graph_Impl::Import(const char * aXmlFile ) {
-// beginService( "Graph_Impl::Import" );
+ beginService( "Graph_Impl::Import" );
bool RetVal = false ;
- if ( DataFlowEditor()->IsEditing() ) {
- RetVal = DataFlowEditor()->LoadXml( aXmlFile ) ;
+ if ( DataFlowEditor()->IsEditing() && !IsMacro() ) {
+ GraphBase::ListOfSGraphs aListOfDataFlows ;
+ RetVal = DataFlowEditor()->LoadXml( aXmlFile , aListOfDataFlows ) ;
+ if ( RetVal && aXmlFile != NULL ) {
+// RetVal = DataFlowEditor()->LoadDataFlows( &aListOfDataFlows ) ;
+ RetVal = LoadDataFlows( DataFlowEditor() , &aListOfDataFlows , 0 ) ;
+ }
}
-// endService( "Graph_Impl::Import" );
+ endService( "Graph_Impl::Import" );
return RetVal ;
}
bool Graph_Impl::Export(const char * anXmlFile ) {
beginService( "Graph_Impl::Export" );
- char * aFile = new char [ strlen( anXmlFile ) + 5 ] ;
- strcpy( aFile , anXmlFile ) ;
- int len = strlen( aFile ) ;
- if ( !strcmp( &aFile[ len - 4 ] , ".xml" ) ) {
- }
- else if ( !strcmp( &aFile[ len - 3 ] , ".py" ) ) {
- strcpy( &aFile[ len - 3 ] , ".xml" ) ;
- len = strlen( aFile ) ;
- }
- else {
- strcat( aFile , ".xml" ) ;
- len = strlen( aFile ) ;
- }
- bool RetVal = DataFlowEditor()->SaveXml( aFile ) ;
- if ( RetVal ) {
- strcpy( &aFile[ len - 4 ] , ".py" ) ;
- RetVal = DataFlowEditor()->SavePy( aFile ) ;
+ bool RetVal = false ;
+ if ( !IsMacro() ) {
+ char * aFile = new char [ strlen( anXmlFile ) + 5 ] ;
+ strcpy( aFile , anXmlFile ) ;
+ int len = strlen( aFile ) ;
+ if ( !strcmp( &aFile[ len - 4 ] , ".xml" ) ) {
+ }
+ else if ( !strcmp( &aFile[ len - 3 ] , ".py" ) ) {
+ strcpy( &aFile[ len - 3 ] , ".xml" ) ;
+ len = strlen( aFile ) ;
+ }
+ else {
+ strcat( aFile , ".xml" ) ;
+ len = strlen( aFile ) ;
+ }
+ RetVal = DataFlowEditor()->SaveXml( aFile ) ;
+ if ( RetVal ) {
+ strcpy( &aFile[ len - 4 ] , ".py" ) ;
+ RetVal = DataFlowEditor()->SavePy( aFile ) ;
+ }
+ delete [] aFile ;
}
- delete [] aFile ;
endService( "Graph_Impl::Export" );
return RetVal ;
}
-#if 0
-GraphBase::ListOfNodes * Graph_Impl::GetNodes() {
-// beginService( "Graph_Impl::GetNodes" );
- GraphBase::ListOfNodes * RetVal = DataFlowEditor()->GetNodes() ;
-// endService( "Graph_Impl::GetNodes" );
- return RetVal ;
-}
-GraphBase::ListOfLinks * Graph_Impl::GetLinks() {
-// beginService( "Graph_Impl::GetLinks" );
- GraphBase::ListOfLinks * RetVal = DataFlowEditor()->GetLinks() ;
-// endService( "Graph_Impl::GetLinks" );
- return RetVal ;
-}
-GraphBase::ListOfLinks * Graph_Impl::GetDatas() {
-// beginService( "Graph_Impl::GetDatas" );
- GraphBase::ListOfLinks * RetVal = DataFlowEditor()->GetDatas() ;
-// endService( "Graph_Impl::GetDatas" );
- return RetVal ;
-}
-#endif
-
SUPERV::CNode_ptr Graph_Impl::CNode( const SALOME_ModuleCatalog::Service &NodeService ) {
beginService( "Graph_Impl::CNode" );
SUPERV::CNode_var iobject = SUPERV::CNode::_nil() ;
- if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() ) {
+ if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() && !IsMacro() ) {
CNode_Impl * myNode = new CNode_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
DataFlowEditor() ,
const SALOME_ModuleCatalog::Service &NodeService ) {
beginService( "Graph_Impl::FNode" );
SUPERV::FNode_var iobject = SUPERV::FNode::_nil() ;
- if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() ) {
+ if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() && !IsMacro() ) {
FNode_Impl * myNode = new FNode_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
DataFlowEditor() ,
const SUPERV::ListOfStrings & PythonFuntion ) {
beginService( "Graph_Impl::INode" );
SUPERV::INode_var iobject = SUPERV::INode::_nil() ;
- if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() ) {
+ if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() && !IsMacro() ) {
INode_Impl * myNode = new INode_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
DataFlowEditor() ,
const char * anInLineNode ) {
beginService( "Graph_Impl::GNode" );
SUPERV::GNode_var iobject = SUPERV::GNode::_nil() ;
- if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() ) {
+ if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() && !IsMacro() ) {
GNode_Impl * myNode = new GNode_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
DataFlowEditor() ,
beginService( "Graph_Impl::LNode" );
SUPERV::LNode_var iobject = SUPERV::LNode::_nil() ;
SUPERV::ELNode_var iendobject = SUPERV::ELNode::_nil() ;
- if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() ) {
+ if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() && !IsMacro() ) {
GraphBase::ListOfFuncName FuncNameList ;
FuncNameList.resize(3) ;
FuncNameList[0] = InitName ;
beginService( "Graph_Impl::SNode" );
SUPERV::SNode_var iobject = SUPERV::SNode::_nil() ;
SUPERV::ESNode_var iendobject = SUPERV::ESNode::_nil() ;
- if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() ) {
+ if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() && !IsMacro() ) {
SNode_Impl * myNode = new SNode_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
DataFlowEditor() ,
return SUPERV::SNode::_duplicate( iobject ) ;
}
+// WARNING : THIS IS COMPLICATED :
+bool Graph_Impl::LoadDataFlows( GraphEditor::DataFlow * aDataFlowEditor ,
+ GraphBase::ListOfSGraphs * aListOfDataFlows ,
+ int index ) {
+ beginService( "Graph_Impl::EditorLoadDataFlows" ) ;
+ SUPERV::Graph_var iobject = SUPERV::Graph::_nil() ;
+ if ( !aDataFlowEditor->LoadDataFlow( &(*aListOfDataFlows)[ index ] ) ) {
+ MESSAGE("Graph_Impl::LoadDataFlows failed" ) ;
+ return false ;
+ }
+// That graph is not a StreamGraph :
+ else if ( !aDataFlowEditor->Graph()->HasDataStream() ) {
+ aDataFlowEditor->Graph()->Kind( SUPERV::DataFlowGraph ) ;
+ aDataFlowEditor->Graph()->SetGraphEditor( aDataFlowEditor ) ;
+ Graph_Impl * myGraph ;
+// We create a Graph ObjRef for that graph
+ myGraph = new Graph_Impl( _Orb , _Poa, _ContId,
+ instanceName() , interfaceName() ,
+ aDataFlowEditor , NULL ) ;
+ PortableServer::ObjectId * id = myGraph->getId() ;
+ CORBA::Object_var obj = _poa->id_to_reference(*id) ;
+ iobject = SUPERV::Graph::_narrow( obj ) ;
+ myGraph->SetObjRef( SUPERV::Graph::_duplicate( iobject ) ) ;
+ GraphBase::Graph * aGraph = myGraph->DataFlowEditor()->Graph() ;
+ int i ;
+ for ( i = 0 ; i < aGraph->GraphNodesSize() ; i++ ) {
+ if ( aGraph->GraphNodes( i )->IsMacroNode() ) {
+ GraphBase::GOTONode * aMacroNode = (GraphBase::GOTONode * ) aGraph->GraphNodes( i ) ;
+
+
+
+// Creation of a GraphMacroNode in the current editor
+ SUPERV::Graph_var macroiobject = SUPERV::Graph::_nil() ;
+ string aMacroNodeName = string( "Macro_" ) + string( myGraph->Name() ) ;
+ Graph_Impl * myMacroNode ;
+ myMacroNode = new Graph_Impl( _Orb , _Poa, _ContId,
+ instanceName() , interfaceName() ,
+ aMacroNodeName.c_str() , SUPERV::MacroNode ) ;
+ id = myMacroNode->getId() ;
+ obj = _poa->id_to_reference(*id);
+ macroiobject = SUPERV::Graph::_narrow( obj ) ;
+ myMacroNode->DataFlowEditor( DataFlowEditor() ) ;
+ aMacroNode->SetGraphEditor( DataFlowEditor() ) ;
+ GraphEditor::InNode * aDataFlowNode = (GraphEditor::InNode * ) aMacroNode->GetInNode() ;
+ myMacroNode->DataFlowNode( aDataFlowNode ) ;
+ aDataFlowNode->SetObjRef( SUPERV::CNode::_duplicate( SUPERV::CNode::_narrow( obj ) ) ) ;
+ aDataFlowNode->SetObjImpl( this ) ;
+
+
+
+
+
+ char * aCoupledNodeName = aMacroNode->CoupledNodeName() ;
+ MESSAGE( "LoadDataFlows MacroNode " << aMacroNode->Name() << " --> " << aCoupledNodeName
+ << " to be searched among " << (*aListOfDataFlows).size() << " Graphs" ) ;
+ int index ;
+ for ( index = 0 ; index < (int ) (*aListOfDataFlows).size() ; index++ ) {
+ if ( !strcmp( aCoupledNodeName , (*aListOfDataFlows)[index].Info.theName.c_str() ) ) {
+ string dbgfile ;
+// At first create the editor and a StreamGraph
+ GraphEditor::DataFlow * aMacroGraphDataFlowEditor ;
+ CreateEditor( _Orb , instanceName() , aCoupledNodeName , SUPERV::DataStreamGraph ,
+ dbgfile , &aMacroGraphDataFlowEditor ) ;
+// if ( !aDataFlowEditor->LoadDataFlow( aDataFlowEditor , aListOfDataFlows , index ) ) {
+ MESSAGE( "RECURSIVE IMPORT OF GRAPHS OF MACRONODES :" << aCoupledNodeName ) ;
+ if ( !LoadDataFlows( aMacroGraphDataFlowEditor , aListOfDataFlows , index ) ) {
+ MESSAGE("Graph_Impl::LoadDataFlows failed" ) ;
+ return false ;
+ }
+
+// That graph is not a StreamGraph :
+ else if ( !aMacroGraphDataFlowEditor->Graph()->HasDataStream() ) {
+ aMacroGraphDataFlowEditor->Graph()->Kind( SUPERV::DataFlowGraph ) ;
+ aMacroGraphDataFlowEditor->Graph()->SetGraphEditor( aMacroGraphDataFlowEditor ) ;
+ Graph_Impl * myMacroGraph ;
+// We create a Graph ObjRef for that graph
+ myMacroGraph = new Graph_Impl( _Orb , _Poa, _ContId,
+ instanceName() , interfaceName() ,
+ aMacroGraphDataFlowEditor , NULL ) ;
+ PortableServer::ObjectId * id = myMacroGraph->getId() ;
+ CORBA::Object_var obj = _poa->id_to_reference(*id);
+ SUPERV::Graph_var iobject = SUPERV::Graph::_narrow( obj ) ;
+ myMacroGraph->SetObjRef( SUPERV::Graph::_duplicate( iobject ) ) ;
+
+ GraphBase::Graph * aMacroGraph = myMacroGraph->DataFlowEditor()->Graph() ;
+ aMacroGraph->GraphMacroLevel( aGraph->GraphMacroLevel() + 1 ) ;
+ aMacroGraph->CoupledNode( aMacroNode ) ;
+
+ aMacroGraph->MacroObject( SUPERV::Graph::_duplicate( iobject ) ) ;
+ aMacroGraph->MacroObject( SUPERV::Graph::_duplicate( macroiobject ) ) ;
+
+// Set the GraphMacroNode ObjRef in the MacroNode
+ aMacroNode->CoupledNode( aMacroGraph ) ;
+ aMacroNode->MacroObject( SUPERV::Graph::_duplicate( iobject ) ) ;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ endService( "Graph_Impl::EditorLoadDataFlows" );
+ return true ;
+}
+
+bool Graph_Impl::LoadDataFlows( GraphExecutor::DataFlow * aDataFlowExecutor ,
+ GraphBase::ListOfSGraphs * aListOfDataFlows ,
+ int index ) {
+ beginService( "Graph_Impl::ExecutorLoadDataFlows" ) ;
+ MESSAGE("Graph_Impl::LoadDataFlows index " << index << " " << (*aListOfDataFlows)[index].Info.theName.c_str() ) ;
+ SUPERV::Graph_var iobject = SUPERV::Graph::_nil() ;
+// That method is recursive :
+// At first we load the supergraph with index = 0 :
+// (After we load the graph corresponding to each MacroNode :)
+ if ( !aDataFlowExecutor->LoadDataFlow( &(*aListOfDataFlows)[ index ] ) ) {
+ MESSAGE("Graph_Impl::LoadDataFlows failed" ) ;
+ return false ;
+ }
+// That graph is not a StreamGraph :
+ else if ( !aDataFlowExecutor->Graph()->HasDataStream() ) {
+ aDataFlowExecutor->Graph()->Kind( SUPERV::DataFlowGraph ) ;
+ GraphEditor::DataFlow * aDataFlowEditor ;
+ aDataFlowEditor = theAutomaton->MapGraph( (*aListOfDataFlows)[index].Info.theName.c_str() )->GraphEditor() ;
+ aDataFlowEditor->Executor( aDataFlowExecutor ) ;
+ aDataFlowEditor->Graph()->SetGraphEditor( aDataFlowEditor ) ;
+ aDataFlowEditor->Graph()->SetGraphExecutor( aDataFlowExecutor ) ;
+ aDataFlowExecutor->Graph()->SetGraphEditor( aDataFlowEditor ) ;
+ aDataFlowExecutor->Graph()->SetGraphExecutor( aDataFlowExecutor ) ;
+ Graph_Impl * myGraph ;
+// We create a Graph ObjRef for that graph
+ myGraph = new Graph_Impl( _Orb , _Poa, _ContId,
+ instanceName() , interfaceName() ,
+ aDataFlowExecutor , NULL ) ;
+ PortableServer::ObjectId * id = myGraph->getId() ;
+ CORBA::Object_var obj = _poa->id_to_reference(*id) ;
+ iobject = SUPERV::Graph::_narrow( obj ) ;
+ myGraph->SetObjRef( SUPERV::Graph::_duplicate( iobject ) ) ;
+ myGraph->DataFlowEditor( aDataFlowEditor ) ;
+ myGraph->DataFlowExecutor( aDataFlowExecutor ) ;
+ MESSAGE("ExecutorLoadDataFlows IsEditing " << myGraph->Name() << " "
+ << myGraph->DataFlowEditor() << " " << myGraph->DataFlowEditor()->IsEditing() << " "
+ << myGraph->DataFlowEditor()->Graph()->Name() << " "
+ << myGraph->DataFlowEditor()->Graph()->GraphEditor() << " "
+ << myGraph->DataFlowEditor()->Graph()->GraphEditor()->IsEditing() ) ;
+ GraphBase::Graph * aGraph = myGraph->DataFlowExecutor()->Graph() ;
+ int i ;
+// For the supergraph or each graph of MacroNodes we search MacroNodes recursively :
+ for ( i = 0 ; i < aGraph->GraphNodesSize() ; i++ ) {
+ if ( aGraph->GraphNodes( i )->IsMacroNode() ) {
+ GraphBase::GOTONode * aMacroNode = (GraphBase::GOTONode * ) aGraph->GraphNodes( i ) ;
+
+
+
+// Creation of a GraphMacroNode ObjRef in the current executor
+ SUPERV::Graph_var macroiobject = SUPERV::Graph::_nil() ;
+ string aMacroNodeName = string( "Macro_" ) + string( aGraph->Name() ) ;
+ Graph_Impl * myMacroNode ;
+ myMacroNode = new Graph_Impl( _Orb , _Poa, _ContId,
+ instanceName() , interfaceName() ,
+ aMacroNodeName.c_str() , SUPERV::MacroNode ) ;
+ id = myMacroNode->getId() ;
+ obj = _poa->id_to_reference(*id);
+ macroiobject = SUPERV::Graph::_narrow( obj ) ;
+ myMacroNode->DataFlowEditor( DataFlowEditor() ) ;
+ myMacroNode->DataFlowExecutor( DataFlowExecutor() ) ;
+ aMacroNode->SetGraphEditor( DataFlowEditor() ) ;
+ GraphExecutor::InNode * aDataFlowExecutorNode = (GraphExecutor::InNode * ) aMacroNode->GetInNode() ;
+ myMacroNode->DataFlowNode( aDataFlowExecutorNode ) ;
+ aDataFlowExecutorNode->SetObjRef( SUPERV::CNode::_duplicate( SUPERV::CNode::_narrow( obj ) ) ) ;
+ aDataFlowExecutorNode->SetObjImpl( this ) ;
+
+ char * aCoupledNodeName = aMacroNode->CoupledNodeName() ;
+ MESSAGE( "LoadDataFlows MacroNode " << aMacroNode->Name() << " --> " << aCoupledNodeName
+ << " to be searched among " << (*aListOfDataFlows).size() << " Graphs" ) ;
+ int index ;
+ for ( index = 0 ; index < (int ) (*aListOfDataFlows).size() ; index++ ) {
+ if ( !strcmp( aCoupledNodeName , (*aListOfDataFlows)[index].Info.theName.c_str() ) ) {
+ string dbgfile ;
+// At first create the editor and a StreamGraph
+ GraphExecutor::DataFlow * aMacroGraphDataFlowExecutor ;
+ CreateEditor( _Orb , instanceName() , aCoupledNodeName , SUPERV::DataStreamGraph ,
+ dbgfile , &aMacroGraphDataFlowExecutor ) ;
+// if ( !aDataFlowEditor->LoadDataFlow( aDataFlowEditor , aListOfDataFlows , index ) ) {
+ MESSAGE( "RECURSIVE IMPORT OF GRAPHS OF MACRONODES :" << aCoupledNodeName ) ;
+ if ( !LoadDataFlows( aMacroGraphDataFlowExecutor , aListOfDataFlows , index ) ) {
+ MESSAGE("Graph_Impl::LoadDataFlows failed" ) ;
+ return false ;
+ }
+
+// That graph is not a StreamGraph :
+ else if ( !aMacroGraphDataFlowExecutor->Graph()->HasDataStream() ) {
+ aMacroGraphDataFlowExecutor->Graph()->Kind( SUPERV::DataFlowGraph ) ;
+ aMacroGraphDataFlowExecutor->Graph()->SetGraphExecutor( aMacroGraphDataFlowExecutor ) ;
+ GraphEditor::DataFlow * aDataFlow = theAutomaton->MapGraph( aCoupledNodeName )->GraphEditor() ;
+ if ( aDataFlow == NULL ) {
+ MESSAGE( "ExecutorLoadDataFlows NULL GraphEditor ERROR" ) ;
+ }
+ aMacroGraphDataFlowExecutor->Graph()->SetGraphEditor( aDataFlow ) ;
+ aMacroGraphDataFlowExecutor->Graph()->SetGraphExecutor( aMacroGraphDataFlowExecutor ) ;
+ aMacroGraphDataFlowExecutor->Graph()->SetGraphPorts() ;
+ Graph_Impl * myMacroGraph ;
+// We create a Graph ObjRef for that graph
+ myMacroGraph = new Graph_Impl( _Orb , _Poa, _ContId,
+ instanceName() , interfaceName() ,
+ aMacroGraphDataFlowExecutor , NULL ) ;
+ PortableServer::ObjectId * id = myMacroGraph->getId() ;
+ CORBA::Object_var obj = _poa->id_to_reference(*id);
+ SUPERV::Graph_var iobject = SUPERV::Graph::_narrow( obj ) ;
+ myMacroGraph->SetObjRef( SUPERV::Graph::_duplicate( iobject ) ) ;
+ myMacroGraph->DataFlowEditor( aDataFlow ) ;
+ aDataFlow->Executor( aMacroGraphDataFlowExecutor ) ;
+ myMacroGraph->DebugFileName( (char * ) dbgfile.c_str() ) ;
+
+ GraphBase::Graph * aMacroGraph = myMacroGraph->DataFlowExecutor()->Graph() ;
+ aMacroGraph->GraphMacroLevel( aGraph->GraphMacroLevel() + 1 ) ;
+
+// Set the MacroNode ObjRef in the GraphMacroNode
+ aMacroGraph->CoupledNode( aMacroNode ) ;
+ aMacroGraph->MacroObject( SUPERV::Graph::_duplicate( macroiobject ) ) ;
+
+// Set the GraphMacroNode ObjRef in the MacroNode
+ aMacroNode->CoupledNode( aMacroGraph ) ;
+ aMacroNode->MacroObject( SUPERV::Graph::_duplicate( iobject ) ) ;
+
+ iobject->Run() ;
+ }
+ break ;
+ }
+ }
+ }
+ }
+ }
+
+ endService( "Graph_Impl::ExecutorLoadDataFlows" );
+ return true ;
+}
+
+SUPERV::Graph_ptr Graph_Impl::MNode( const char * aXmlFileName ) {
+ beginService( "Graph_Impl::MNode" );
+ SUPERV::Graph_var iobject = SUPERV::Graph::_nil() ;
+ if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() && !IsMacro() ) {
+ GraphBase::ListOfSGraphs aListOfDataFlows ;
+ string dbgfile ;
+// At first create the editor and a StreamGraph with the xml file
+ GraphEditor::DataFlow * aDataFlowEditor ;
+ CreateEditor( _Orb , instanceName() , aXmlFileName , SUPERV::DataStreamGraph ,
+ dbgfile , &aDataFlowEditor ) ;
+ int lenname = strlen( aXmlFileName ) ;
+ bool loaded = false ;
+// Import of the xml file
+ if ( lenname > 4 && !strcmp( &aXmlFileName[ lenname - 4 ] , ".xml" ) ) {
+ loaded = aDataFlowEditor->LoadXml( aXmlFileName , aListOfDataFlows ) ;
+ if ( loaded ) {
+ iobject = MNode( aDataFlowEditor , aListOfDataFlows ) ;
+ }
+ }
+ }
+ return iobject ;
+}
+
+// WARNING : THIS IS COMPLICATED :
+// I should have to remove duplicated code ...
+SUPERV::Graph_ptr Graph_Impl::MNode( GraphEditor::DataFlow * aMacroGraphDataFlowEditor ,
+ GraphBase::ListOfSGraphs aListOfDataFlows ) {
+ beginService( "Graph_Impl::MNode" ) ;
+ SUPERV::Graph_var iobject = SUPERV::Graph::_nil() ;
+ SUPERV::Graph_var macroiobject = SUPERV::Graph::_nil() ;
+
+ if ( !IsMacro() ) {
+ if ( !aMacroGraphDataFlowEditor->LoadDataFlow( &aListOfDataFlows[ 0 ] ) ) {
+ MESSAGE("Graph_Impl::MNode LoadDataFlow failed" ) ;
+ return false ;
+ }
+
+// That graph is not a StreamGraph :
+ else if ( !aMacroGraphDataFlowEditor->Graph()->HasDataStream() ) {
+ aMacroGraphDataFlowEditor->Graph()->Kind( SUPERV::DataFlowGraph ) ;
+ aMacroGraphDataFlowEditor->Graph()->SetGraphEditor( aMacroGraphDataFlowEditor ) ;
+ Graph_Impl * myMacroGraph ;
+// We create a Graph ObjRef for that graph
+ myMacroGraph = new Graph_Impl( _Orb , _Poa, _ContId,
+ instanceName() , interfaceName() ,
+ aMacroGraphDataFlowEditor , NULL ) ;
+ PortableServer::ObjectId * id = myMacroGraph->getId() ;
+ CORBA::Object_var obj = _poa->id_to_reference(*id);
+ iobject = SUPERV::Graph::_narrow( obj ) ;
+ myMacroGraph->SetObjRef( SUPERV::Graph::_duplicate( iobject ) ) ;
+
+
+
+// Creation of a GraphMacroNode in the current editor
+ string aMacroNodeName = string( "Macro_" ) + string( myMacroGraph->Name() ) ;
+ Graph_Impl * myMacroNode ;
+ myMacroNode = new Graph_Impl( _Orb , _Poa, _ContId,
+ instanceName() , interfaceName() ,
+ aMacroNodeName.c_str() , SUPERV::MacroNode ) ;
+ id = myMacroNode->getId() ;
+ obj = _poa->id_to_reference(*id);
+ macroiobject = SUPERV::Graph::_narrow( obj ) ;
+ myMacroNode->DataFlowEditor( DataFlowEditor() ) ;
+
+// Creation of the MacroNode itself in the current Graph
+ GraphBase::ListOfFuncName aFuncName ;
+ aFuncName.resize( 1 ) ;
+ aFuncName[0] = "" ;
+ SUPERV::ListOfStrings aListOfStrings ;
+ aListOfStrings.length( 1 ) ;
+ aListOfStrings[0] = "" ;
+ GraphBase::ListOfPythonFunctions aPythonFunction ;
+ aPythonFunction.resize( 1 ) ;
+ aPythonFunction[0] = &aListOfStrings ;
+ SALOME_ModuleCatalog::Service * aMacroNodeService = myMacroGraph->Service() ;
+ GraphEditor::InNode * aDataFlowNode = DataFlowEditor()->AddNode( *aMacroNodeService , "" , "" ,
+ aMacroNodeName.c_str() , SUPERV::MacroNode ,
+ aFuncName , aPythonFunction ) ;
+ aDataFlowNode->SetPythonFunction( "" , aListOfStrings ) ;
+ myMacroNode->DataFlowNode( aDataFlowNode ) ;
+ aDataFlowNode->ComputingNode()->SetService( *aMacroNodeService ) ;
+ aDataFlowNode->SetObjRef( SUPERV::CNode::_duplicate( SUPERV::CNode::_narrow( obj ) ) ) ;
+ aDataFlowNode->SetObjImpl( this ) ;
+
+
+
+ GraphBase::Graph * aGraph = myMacroGraph->DataFlowEditor()->Graph() ;
+ GraphBase::Graph * aGraphOfMacroGraph = myMacroNode->DataFlowEditor()->Graph() ;
+ GraphBase::Graph * aMacroGraph = myMacroNode->DataFlowNode()->GraphMacroNode() ;
+ aMacroGraph->Kind( SUPERV::MacroNode ) ;
+ aMacroGraph->SetGraphEditor( DataFlowEditor() ) ;
+// Creation of the Ports of the MacroNode from the ports of the GraphMacroNode
+ aMacroGraph->SetMacroPorts( aGraph ) ;
+// Valid ==> creation of Service and the ports of the current Graph
+ DataFlowEditor()->IsValid() ;
+// Set the Input Datas from the GraphMacroNode to the current Graph
+ aMacroGraph->SetMacroDatas( aGraph , aGraphOfMacroGraph ) ;
+ aMacroGraphDataFlowEditor->UnValid() ;
+// Set the MacroNode ObjRef in the GraphMacroNode
+ aGraph->CoupledNode( aMacroGraph ) ;
+ aGraph->MacroObject( SUPERV::Graph::_duplicate( macroiobject ) ) ;
+// Set the GraphMacroNode ObjRef in the MacroNode
+ aMacroGraph->CoupledNode( aGraph ) ;
+ aMacroGraph->MacroObject( SUPERV::Graph::_duplicate( iobject ) ) ;
+// aDataFlowNode->CoupledNode( aGraph ) ;
+// aDataFlowNode->ComputingNode()->MacroObject( SUPERV::Graph::_duplicate( iobject ) ) ;
+// Set the MacroLevel of that graph
+ aGraph->GraphMacroLevel( aGraphOfMacroGraph->GraphMacroLevel() + 1 ) ;
+ aMacroGraph->Coordinates( 0 , 0 ) ;
+ MESSAGE( "DataFlowNode Graph " << this << " DataFlowEditor " << DataFlowEditor() << " aDataFlowNode "
+ << aDataFlowNode << " " << aDataFlowNode->Name() << " created" ) ;
+ }
+ else {
+ delete aMacroGraphDataFlowEditor ;
+ }
+ }
+ endService( "Graph_Impl::MNode" );
+ return SUPERV::Graph::_duplicate( macroiobject ) ;
+}
+
+SUPERV::Graph_ptr Graph_Impl::GraphMNode( SUPERV::Graph_ptr myMacroGraph ) {
+ SUPERV::Graph_var iobject = myMacroGraph ;
+ beginService( "Graph_Impl::GraphMNode" ) ;
+
+// GraphBase::Graph * myMacroGraph = aGraph;
+ SUPERV::Graph_var macroiobject = SUPERV::StreamGraph::_nil() ;
+// Creation of a GraphMacroNode in the current editor
+ if ( !IsMacro() ) {
+ string aMacroNodeName = string( "Macro_" ) + string( myMacroGraph->Name() ) ;
+ MESSAGE( "GraphMNode( " << myMacroGraph->Name() << " )" ) ;
+ Graph_Impl * myMacroNode ;
+ myMacroNode = new Graph_Impl( _Orb , _Poa, _ContId,
+ instanceName() , interfaceName() ,
+ aMacroNodeName.c_str() , SUPERV::MacroNode ) ;
+ PortableServer::ObjectId * id = myMacroNode->getId() ;
+ CORBA::Object_var obj = _poa->id_to_reference(*id);
+ macroiobject = SUPERV::Graph::_narrow( obj ) ;
+ myMacroNode->DataFlowEditor( DataFlowEditor() ) ;
+
+// Creation of the MacroNode itself in the current Graph
+ GraphBase::ListOfFuncName aFuncName ;
+ aFuncName.resize( 1 ) ;
+ aFuncName[0] = "" ;
+ SUPERV::ListOfStrings aListOfStrings ;
+ aListOfStrings.length( 1 ) ;
+ aListOfStrings[0] = "" ;
+ GraphBase::ListOfPythonFunctions aPythonFunction ;
+ aPythonFunction.resize( 1 ) ;
+ aPythonFunction[0] = &aListOfStrings ;
+ SALOME_ModuleCatalog::Service * aMacroNodeService = myMacroGraph->Service() ;
+ GraphEditor::InNode * aDataFlowNode = DataFlowEditor()->AddNode( *aMacroNodeService , "" , "" ,
+ aMacroNodeName.c_str() , SUPERV::MacroNode ,
+ aFuncName , aPythonFunction ) ;
+ aDataFlowNode->SetPythonFunction( "" , aListOfStrings ) ;
+ myMacroNode->DataFlowNode( aDataFlowNode ) ;
+ aDataFlowNode->ComputingNode()->SetService( *aMacroNodeService ) ;
+ aDataFlowNode->SetObjRef( SUPERV::CNode::_duplicate( SUPERV::CNode::_narrow( obj ) ) ) ;
+ aDataFlowNode->SetObjImpl( this ) ;
+
+
+
+// GraphBase::Graph * aGraph = myMacroGraph->DataFlowEditor()->Graph() ;
+ GraphBase::Graph * aGraph = DataFlowEditor()->Automaton()->MapGraph( myMacroGraph->Name() ) ;
+ GraphBase::Graph * aGraphOfMacroGraph = myMacroNode->DataFlowEditor()->Graph() ;
+ GraphBase::Graph * aMacroGraph = myMacroNode->DataFlowNode()->GraphMacroNode() ;
+ aMacroGraph->Kind( SUPERV::MacroNode ) ;
+ aMacroGraph->SetGraphEditor( DataFlowEditor() ) ;
+// Creation of the Ports of the MacroNode from the ports of the GraphMacroNode
+ aMacroGraph->SetMacroPorts( aGraph ) ;
+// Valid ==> creation of Service and the ports of the current Graph
+ DataFlowEditor()->IsValid() ;
+// Set the Input Datas from the GraphMacroNode to the current Graph
+ aMacroGraph->SetMacroDatas( aGraph , aGraphOfMacroGraph ) ;
+// aMacroGraphDataFlowEditor->UnValid() ;
+ aGraph->GraphEditor()->UnValid() ;
+// Set the MacroNode ObjRef in the GraphMacroNode
+ aGraph->CoupledNode( aMacroGraph ) ;
+ aGraph->MacroObject( SUPERV::Graph::_duplicate( macroiobject ) ) ;
+// Set the GraphMacroNode ObjRef in the MacroNode
+ aMacroGraph->CoupledNode( aGraph ) ;
+ aMacroGraph->MacroObject( SUPERV::Graph::_duplicate( iobject ) ) ;
+// aDataFlowNode->CoupledNode( aGraph ) ;
+// aDataFlowNode->ComputingNode()->MacroObject( SUPERV::Graph::_duplicate( iobject ) ) ;
+// Set the MacroLevel of that graph
+ aGraph->GraphMacroLevel( aGraphOfMacroGraph->GraphMacroLevel() + 1 ) ;
+ aMacroGraph->Coordinates( 0 , 0 ) ;
+ MESSAGE( aGraph->Name() << "->CoupledNode()->GraphEditor() : " << aGraph->CoupledNode()->GraphEditor() ) ;
+ MESSAGE( aMacroGraph->Name() << "->CoupledNode()->GraphEditor() : " << aMacroGraph->CoupledNode()->GraphEditor() ) ;
+ MESSAGE( "DataFlowNode Graph " << this << " DataFlowEditor " << DataFlowEditor() << " aDataFlowNode "
+ << aDataFlowNode << " " << aDataFlowNode->Name() << " created" ) ;
+ }
+ endService( "Graph_Impl::GraphMNode" ) ;
+ return SUPERV::Graph::_duplicate( macroiobject ) ;
+}
+
+SUPERV::Graph_ptr Graph_Impl::FlowObjRef() {
+ beginService( "Graph_Impl::FlowObjRef" );
+ SUPERV::Graph_var iobject = SUPERV::Graph::_nil() ;
+ if ( IsMacro() ) {
+ iobject = SUPERV::Graph::_narrow( DataFlowNode()->GraphMacroNode()->MacroObject() ) ;
+ }
+ else if ( IsGraph() ) {
+ iobject = SUPERV::Graph::_narrow( DataFlowEditor()->Graph()->MacroObject() ) ;
+ }
+ if ( CORBA::is_nil( iobject ) ) {
+ MESSAGE( "Graph_Impl::FlowObjRef() returns a NIL Object" ) ;
+ }
+ endService( "Graph_Impl::FlowObjRef" );
+ return SUPERV::Graph::_duplicate( iobject ) ;
+}
+
+SUPERV::StreamGraph_ptr Graph_Impl::StreamObjRef() {
+ beginService( "Graph_Impl::StreamObjRef" );
+ SUPERV::StreamGraph_var iobject = SUPERV::StreamGraph::_nil() ;
+ if ( IsMacro() ) {
+ iobject = SUPERV::StreamGraph::_narrow( DataFlowNode()->GraphMacroNode()->MacroObject() ) ;
+ }
+ else if ( IsGraph() || IsStreamGraph() ) {
+ iobject = SUPERV::StreamGraph::_narrow( DataFlowEditor()->Graph()->MacroObject() ) ;
+ }
+ if ( CORBA::is_nil( iobject ) ) {
+ MESSAGE( "Graph_Impl::StreamObjRef() returns a NIL Object" ) ;
+ }
+ endService( "Graph_Impl::StreamObjRef" );
+ return SUPERV::StreamGraph::_duplicate( iobject ) ;
+}
SUPERV::CNode_ptr Graph_Impl::Node(char const * aNodeName ) {
// beginService( "Graph_Impl::Node" );
else {
iobject = DataFlowEditor()->GetNode( aNodeName )->ObjRef() ;
*/
- GraphEditor::InNode * anInNode = DataFlowEditor()->GetNode( aNodeName ) ;
- if ( anInNode ) {
- if ( CORBA::is_nil( anInNode->ObjRef() ) ) {
- SetNodeObjRef( anInNode ) ;
+ if ( !IsMacro() ) {
+ GraphEditor::InNode * anInNode = DataFlowEditor()->GetNode( aNodeName ) ;
+ if ( anInNode ) {
+ if ( CORBA::is_nil( anInNode->ObjRef() ) ) {
+ SetNodeObjRef( anInNode ) ;
+ }
+ iobject = anInNode->ObjRef() ;
}
- iobject = anInNode->ObjRef() ;
}
// endService( "Graph_Impl::Node" );
return SUPERV::CNode::_duplicate( iobject ) ;
beginService( "Graph_Impl::Link" );
SUPERV::Link_var iobject = SUPERV::Link::_nil() ;
if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() &&
- !OutPort->IsDataStream() && !InPort->IsDataStream() ) {
+ !OutPort->IsDataStream() && !InPort->IsDataStream() && !IsMacro() ) {
GraphBase::InPort * anInPort = DataFlowEditor()->GetNode( InPort->Node()->Name() )->ComputingNode()->GetChangeInPort( InPort->Name() ) ;
GraphBase::OutPort * anOutPort = DataFlowEditor()->GetNode( OutPort->Node()->Name() )->ComputingNode()->GetChangeOutPort( OutPort->Name() ) ;
if ( CORBA::is_nil( anOutPort->InPortObjRef( anInPort ) ) ) {
return SUPERV::Link::_duplicate( iobject ) ;
}
+// Only to see MacroNodes with actual GUI ... :
+#define GOTOMacroNode 0
+
void Graph_Impl::SetNodeObjRef( GraphEditor::InNode * anInNode ) {
+ MESSAGE("Graph_Impl::SetNodeObjRef " << anInNode->Name() << " " << anInNode->Kind() ) ;
CORBA::Object_var obj ;
if ( anInNode->IsComputingNode() ) {
CNode_Impl * myNode = new CNode_Impl( _Orb , _Poa , _ContId ,
SUPERV::INode_var iobject = SUPERV::INode::_narrow(obj) ;
myNode->SetObjRef( SUPERV::INode::_duplicate( iobject ) ) ;
}
+#if GOTOMacroNode
+ else if ( anInNode->IsGOTONode() || anInNode->IsMacroNode() ) {
+ if ( anInNode->IsMacroNode() ) {
+ anInNode->ComputingNode()->Kind( SUPERV::GOTONode ) ;
+ }
+#else
else if ( anInNode->IsGOTONode() ) {
+#endif
GNode_Impl * myNode = new GNode_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
DataFlowEditor() ,
SUPERV::GNode_var iobject = SUPERV::GNode::_narrow(obj) ;
myNode->SetObjRef( SUPERV::GNode::_duplicate( iobject ) ) ;
}
+ else if ( anInNode->IsMacroNode() ) {
+ Graph_Impl * myNode = new Graph_Impl( _Orb , _Poa , _ContId ,
+ instanceName() , interfaceName() ,
+ DataFlowEditor() ,
+ anInNode ) ;
+ PortableServer::ObjectId * id = myNode->getId() ;
+ obj = _poa->id_to_reference(*id);
+ SUPERV::Graph_var iobject = SUPERV::Graph::_narrow(obj) ;
+ myNode->SetObjRef( SUPERV::Graph::_duplicate( iobject ) ) ;
+ }
else if ( anInNode->IsLoopNode() ) {
LNode_Impl * myNode = new LNode_Impl( _Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
SUPERV::ListOfNodes_var Graph_Impl::SetNode( SUPERV::ListOfNodes_var RetVal ,
GraphBase::ComputingNode * aNode ) {
int index = 0 ;
- if ( _DataFlowExecutor ) {
+// if ( _DataFlowExecutor ) {
+ if ( DataFlowExecutor() ) {
MESSAGE("Graph_Impl::SetNode " << aNode->Name() << " " << aNode->Kind() << " "
- << _DataFlowExecutor->StateName( _DataFlowExecutor->AutomatonState( aNode->Name() ) ) ) ;
+ << DataFlowExecutor()->StateName( DataFlowExecutor()->AutomatonState( aNode->Name() ) ) ) ;
}
else {
MESSAGE("Graph_Impl::SetNode " << aNode->Name() << " " << aNode->Kind() ) ;
index = RetVal->INodes.length() ;
RetVal->INodes.length( index+1 );
}
+#if GOTOMacroNode
+ else if ( aNode->IsGOTONode() || aNode->IsMacroNode() ) {
+#else
else if ( aNode->IsGOTONode() ) {
+#endif
index = RetVal->GNodes.length() ;
RetVal->GNodes.length( index+1 );
}
+ else if ( aNode->IsMacroNode() ) {
+ index = RetVal->Graphs.length() ;
+ RetVal->Graphs.length( index+1 );
+ }
else if ( aNode->IsLoopNode() ) {
index = RetVal->LNodes.length() ;
RetVal->LNodes.length( index+1 );
else if ( aNode->IsInLineNode() ) {
RetVal->INodes[index] = SUPERV::INode::_duplicate( SUPERV::INode::_narrow( aNodeObjRef ) ) ;
}
+#if GOTOMacroNode
+ else if ( aNode->IsGOTONode() || aNode->IsMacroNode() ) {
+#else
else if ( aNode->IsGOTONode() ) {
+#endif
RetVal->GNodes[index] = SUPERV::GNode::_duplicate( SUPERV::GNode::_narrow( aNodeObjRef ) ) ;
}
+ else if ( aNode->IsMacroNode() ) {
+ RetVal->Graphs[index] = SUPERV::Graph::_duplicate( SUPERV::Graph::_narrow( aNodeObjRef ) ) ;
+ }
else if ( aNode->IsLoopNode() ) {
RetVal->LNodes[index] = SUPERV::LNode::_duplicate( SUPERV::LNode::_narrow( aNodeObjRef ) ) ;
}
RetVal->LNodes.length(0) ;
RetVal->SNodes.length(0) ;
RetVal->GNodes.length(0) ;
- int i ;
- for ( i = 0 ; i < DataFlowEditor()->Graph()->GraphNodesSize() ; i++ ) {
- GraphBase::ComputingNode * aNode = DataFlowEditor()->Graph()->GraphNodes( i ) ;
- RetVal = SetNode( RetVal , aNode ) ;
- }
+ RetVal->Graphs.length(0) ;
+ if ( !IsMacro() ) {
+ int i ;
+ for ( i = 0 ; i < DataFlowEditor()->Graph()->GraphNodesSize() ; i++ ) {
+ GraphBase::ComputingNode * aNode = DataFlowEditor()->Graph()->GraphNodes( i ) ;
+ RetVal = SetNode( RetVal , aNode ) ;
+ }
#if 0
- char * aStateG = "" ;
- if ( _DataFlowExecutor ) {
- aStateG = (char *) _DataFlowExecutor->StateName( _DataFlowExecutor->AutomatonState() ) ;
- }
- MESSAGE("Graph_Impl::Nodes GraphState " << aStateG
- << " CNodes " << RetVal->CNodes.length()
- << " FNodes " << RetVal->FNodes.length()
- << " INodes " << RetVal->INodes.length()
- << " GNodes " << RetVal->GNodes.length()
- << " LNodes " << RetVal->LNodes.length()
- << " ELNodes " << RetVal->ELNodes.length()
- << " SNodes " << RetVal->SNodes.length()
- << " ESNodes " << RetVal->ESNodes.length() ) ;
- if ( _DataFlowExecutor ) {
- _DataFlowExecutor->EventList() ;
- }
+ char * aStateG = "" ;
+ if ( DataFlowExecutor() ) {
+ aStateG = (char *) DataFlowExecutor()->StateName( DataFlowExecutor()->AutomatonState() ) ;
+ }
+ MESSAGE("Graph_Impl::Nodes GraphState " << aStateG << " CNodes " << RetVal->CNodes.length() ) ;
+ for ( i = 0 ; i < RetVal->CNodes.length() ; i++ ) {
+ MESSAGE(" " << RetVal->CNodes[ i ] ->Name() ) ;
+ }
+ MESSAGE("FNodes " << RetVal->FNodes.length() ) ;
+ for ( i = 0 ; i < RetVal->FNodes.length() ; i++ ) {
+ MESSAGE(" " << RetVal->FNodes[ i ] ->Name() ) ;
+ }
+ MESSAGE("INodes " << RetVal->INodes.length() ) ;
+ for ( i = 0 ; i < RetVal->INodes.length() ; i++ ) {
+ MESSAGE(" " << RetVal->INodes[ i ] ->Name() ) ;
+ }
+ MESSAGE("GNodes " << RetVal->GNodes.length() ) ;
+ for ( i = 0 ; i < RetVal->GNodes.length() ; i++ ) {
+ MESSAGE(" " << RetVal->GNodes[ i ] ->Name() ) ;
+ }
+ MESSAGE("LNodes " << RetVal->LNodes.length() ) ;
+ for ( i = 0 ; i < RetVal->LNodes.length() ; i++ ) {
+ MESSAGE(" " << RetVal->LNodes[ i ] ->Name() ) ;
+ }
+ MESSAGE("ELNodes " << RetVal->ELNodes.length() ) ;
+ for ( i = 0 ; i < RetVal->ELNodes.length() ; i++ ) {
+ MESSAGE(" " << RetVal->ELNodes[ i ] ->Name() ) ;
+ }
+ MESSAGE("SNodes " << RetVal->SNodes.length() ) ;
+ for ( i = 0 ; i < RetVal->SNodes.length() ; i++ ) {
+ MESSAGE(" " << RetVal->SNodes[ i ] ->Name() ) ;
+ }
+ MESSAGE("ESNodes " << RetVal->ESNodes.length() ) ;
+ for ( i = 0 ; i < RetVal->ESNodes.length() ; i++ ) {
+ MESSAGE(" " << RetVal->ESNodes[ i ] ->Name() ) ;
+ }
+ MESSAGE("Graphs " << RetVal->Graphs.length() ) ;
+ for ( i = 0 ; i < RetVal->Graphs.length() ; i++ ) {
+ MESSAGE(" " << RetVal->Graphs[ i ] ->Name() ) ;
+ }
+ if ( DataFlowExecutor() ) {
+ DataFlowExecutor()->EventList() ;
+ }
#endif
+ }
endService( "Graph_Impl::Nodes" );
return ( RetVal._retn() ) ;
}
bool begin = true ;
SUPERV::ListOfLinks_var RetVal = new SUPERV::ListOfLinks ;
RetVal->length( 0 ) ;
- int i , j , countlink ;
- countlink = 0 ;
- for ( i = 0 ; i < DataFlowEditor()->Graph()->GraphNodesSize() ; i++ ) {
- GraphEditor::InNode * aNode = NULL ;
- aNode = (GraphEditor::InNode * ) DataFlowEditor()->Graph()->GraphNodes( i )->GetInNode() ;
- bool ToProcess = false ;
- if ( theNode == NULL ) {
- ToProcess = true ;
- }
- else {
- if ( !strcmp( theNode->Name() , aNode->Name() ) ) {
- if ( !theNode->IsEndSwitchNode() ) {
- ToProcess = true ;
- }
- }
- else if ( theNode->IsEndSwitchNode() ) {
+ if ( !IsMacro() ) {
+ int i , j , countlink ;
+ countlink = 0 ;
+ for ( i = 0 ; i < DataFlowEditor()->Graph()->GraphNodesSize() ; i++ ) {
+ GraphEditor::InNode * aNode = NULL ;
+ aNode = (GraphEditor::InNode * ) DataFlowEditor()->Graph()->GraphNodes( i )->GetInNode() ;
+ bool ToProcess = false ;
+ if ( theNode == NULL ) {
ToProcess = true ;
}
- }
- if ( ToProcess ) {
- for ( j = 0 ; j < aNode->GetNodeInPortsSize() ; j++ ) {
- GraphBase::InPort * anInPort = NULL ;
- anInPort = aNode->GetChangeNodeInPort( j ) ;
- if ( anInputParam == NULL ||
- !strcmp( anInPort->PortName() , anInputParam ) ) {
- GraphBase::OutPort * anOutPort = NULL ;
- anOutPort = anInPort->GetOutPort() ;
- if ( anOutPort && !anOutPort->IsDataStream() ) {
- if ( strcmp( anOutPort->NodeName() , Name() ) ) {
-// MESSAGE("Graph_Impl::Links " << anOutPort->NodeName() << "("
-// << anOutPort->PortName() << ") --> " << aNode->Name() << "("
-// << anInPort->PortName() << ")" ) ;
- if ( theNode == NULL ||
- ( theNode != NULL && !theNode->IsEndSwitchNode() &&
- !strcmp( theNode->Name() , aNode->Name() ) ) ) {
- if ( anInPort->IsLoop() || anOutPort->IsLoop() ||
- ( aNode->IsEndLoopNode() && !strcmp( aNode->CoupledNode()->Name() ,
- anOutPort->NodeName() ) ) ) {
-// MESSAGE( "Link " << anOutPort->NodeName() << "("
-// << anOutPort->PortName() << ") --> " << aNode->Name() << "("
-// << anInPort->PortName() << ")" << " ignored" ) ;
- }
- else if ( CORBA::is_nil( anOutPort->InPortObjRef( anInPort ) ) ) {
- if ( begin ) {
- beginService( "Graph_Impl::Links" );
- begin = false ;
- }
- GraphEditor::InNode * anOutNode = NULL ;
- anOutNode = (GraphEditor::InNode * ) DataFlowEditor()->Graph()->GetChangeGraphNode( anOutPort->NodeName() )->GetInNode() ;
- if ( anOutNode ) {
- bool Success ;
- Link_Impl * myLink = new Link_Impl( _Orb , _Poa , _ContId ,
- instanceName() , interfaceName() ,
- DataFlowEditor() ,
- aNode ,
- anInPort->PortName() ,
- anOutNode ,
- anOutPort->PortName() ,
- false , true , Success ) ;
- if ( Success ) {
- PortableServer::ObjectId * id = myLink->getId() ;
- CORBA::Object_var obj = _poa->id_to_reference(*id);
- SUPERV::Link_var iobject ;
- iobject = SUPERV::Link::_narrow(obj) ;
- RetVal->length( countlink + 1 ) ;
- RetVal[ countlink++ ] = SUPERV::Link::_duplicate( iobject ) ;
- anOutPort->AddInPortObjRef( anInPort , SUPERV::Link::_duplicate( iobject ) ) ;
- }
- }
- }
- else {
- RetVal->length( countlink + 1 ) ;
- RetVal[ countlink++ ] = SUPERV::Link::_duplicate( anOutPort->InPortObjRef( anInPort ) ) ;
- }
-// MESSAGE( "Link " << anOutPort->NodeName() << "("
-// << anOutPort->PortName() << ") --> " << aNode->Name() << "("
-// << anInPort->PortName() << ")" << " selected" ) ;
- }
- else {
-// MESSAGE( "Link " << anOutPort->NodeName() << "("
-// << anOutPort->PortName() << ") --> " << aNode->Name() << "("
-// << anInPort->PortName() << ")" << " skipped" ) ;
- }
- }
- }
- }
+ else {
+ if ( !strcmp( theNode->Name() , aNode->Name() ) ) {
+ if ( !theNode->IsEndSwitchNode() ) {
+ ToProcess = true ;
+ }
+ }
+ else if ( theNode->IsEndSwitchNode() ) {
+ ToProcess = true ;
+ }
}
- }
- for ( j = 0 ; j < aNode->GetNodeOutPortsSize() ; j++ ) {
- GraphBase::OutPort * anOutPort = aNode->GetChangeNodeOutPort( j ) ;
- int k ;
- for ( k = 0 ; k < anOutPort->InPortsSize() ; k++ ) {
- GraphBase::InPort * anInPort = anOutPort->ChangeInPorts( k ) ;
- GraphEditor::InNode * toNode = (GraphEditor::InNode * ) DataFlowEditor()->Graph()->GetChangeGraphNode( anInPort->NodeName() )->GetInNode() ;
- if ( theNode == NULL ||
- !strcmp( theNode->Name() , aNode->Name() ) ) {
- if ( !anInPort->IsDataStream() ) {
- if ( theNode || ( toNode->IsEndSwitchNode() && !aNode->IsSwitchNode() ) ) {
- if ( anInputParam == NULL ||
- !strcmp( anInPort->PortName() , anInputParam ) ) {
- if ( anInPort->IsLoop() || anOutPort->IsLoop() ||
- ( toNode->IsEndLoopNode() && !strcmp( toNode->CoupledNode()->Name() ,
- anOutPort->NodeName() ) ) ) {
-// MESSAGE( "Link " << anOutPort->NodeName() << "("
-// << anOutPort->PortName() << ") --> " << toNode->Name() << "("
-// << anInPort->PortName() << ")" << " ignored" ) ;
- }
- else if ( CORBA::is_nil( anOutPort->InPortObjRef( anInPort ) ) ) {
- if ( begin ) {
- beginService( "Graph_Impl::Links" );
- begin = false ;
- }
- bool Success ;
- Link_Impl * myLink = new Link_Impl( _Orb , _Poa , _ContId ,
- instanceName() , interfaceName() ,
- DataFlowEditor() ,
- toNode ,
- anInPort->PortName() ,
- aNode ,
- anOutPort->PortName() ,
- false , true , Success ) ;
- if ( Success ) {
- PortableServer::ObjectId * id = myLink->getId() ;
- CORBA::Object_var obj = _poa->id_to_reference(*id);
- SUPERV::Link_var iobject ;
- iobject = SUPERV::Link::_narrow(obj) ;
- RetVal->length( countlink + 1 ) ;
- RetVal[ countlink++ ] = SUPERV::Link::_duplicate( iobject ) ;
- anOutPort->AddInPortObjRef( anInPort , SUPERV::Link::_duplicate( iobject ) ) ;
+ if ( ToProcess ) {
+ for ( j = 0 ; j < aNode->GetNodeInPortsSize() ; j++ ) {
+ GraphBase::InPort * anInPort = NULL ;
+ anInPort = aNode->GetChangeNodeInPort( j ) ;
+ if ( anInputParam == NULL ||
+ !strcmp( anInPort->PortName() , anInputParam ) ) {
+ GraphBase::OutPort * anOutPort = NULL ;
+ anOutPort = anInPort->GetOutPort() ;
+ if ( anOutPort && !anOutPort->IsDataStream() ) {
+ if ( strcmp( anOutPort->NodeName() , Name() ) ) {
+// MESSAGE("Graph_Impl::Links " << anOutPort->NodeName() << "("
+// << anOutPort->PortName() << ") --> " << aNode->Name() << "("
+// << anInPort->PortName() << ")" ) ;
+ if ( theNode == NULL ||
+ ( theNode != NULL && !theNode->IsEndSwitchNode() &&
+ !strcmp( theNode->Name() , aNode->Name() ) ) ) {
+ if ( anInPort->IsLoop() || anOutPort->IsLoop() ||
+ ( aNode->IsEndLoopNode() && !strcmp( aNode->CoupledNode()->Name() ,
+ anOutPort->NodeName() ) ) ) {
+// MESSAGE( "Link " << anOutPort->NodeName() << "("
+// << anOutPort->PortName() << ") --> " << aNode->Name() << "("
+// << anInPort->PortName() << ")" << " ignored" ) ;
}
+ else if ( CORBA::is_nil( anOutPort->InPortObjRef( anInPort ) ) ) {
+ if ( begin ) {
+ beginService( "Graph_Impl::Links" );
+ begin = false ;
+ }
+ GraphEditor::InNode * anOutNode = NULL ;
+ anOutNode = (GraphEditor::InNode * ) DataFlowEditor()->Graph()->GetChangeGraphNode( anOutPort->NodeName() )->GetInNode() ;
+ if ( anOutNode ) {
+ bool Success ;
+ Link_Impl * myLink = new Link_Impl( _Orb , _Poa , _ContId ,
+ instanceName() , interfaceName() ,
+ DataFlowEditor() ,
+ aNode ,
+ anInPort->PortName() ,
+ anOutNode ,
+ anOutPort->PortName() ,
+ false , true , Success ) ;
+ if ( Success ) {
+ PortableServer::ObjectId * id = myLink->getId() ;
+ CORBA::Object_var obj = _poa->id_to_reference(*id);
+ SUPERV::Link_var iobject ;
+ iobject = SUPERV::Link::_narrow(obj) ;
+ RetVal->length( countlink + 1 ) ;
+ RetVal[ countlink++ ] = SUPERV::Link::_duplicate( iobject ) ;
+ anOutPort->AddInPortObjRef( anInPort , SUPERV::Link::_duplicate( iobject ) ) ;
+ }
+ }
+ }
+ else {
+ RetVal->length( countlink + 1 ) ;
+ RetVal[ countlink++ ] = SUPERV::Link::_duplicate( anOutPort->InPortObjRef( anInPort ) ) ;
+ }
+// MESSAGE( "Link " << anOutPort->NodeName() << "("
+// << anOutPort->PortName() << ") --> " << aNode->Name() << "("
+// << anInPort->PortName() << ")" << " selected" ) ;
}
else {
- RetVal->length( countlink + 1 ) ;
- RetVal[ countlink++ ] = SUPERV::Link::_duplicate( SUPERV::Link::_narrow( anOutPort->InPortObjRef( anInPort ) ) ) ;
+// MESSAGE( "Link " << anOutPort->NodeName() << "("
+// << anOutPort->PortName() << ") --> " << aNode->Name() << "("
+// << anInPort->PortName() << ")" << " skipped" ) ;
}
-// MESSAGE( "Link " << anOutPort->NodeName() << "("
-// << anOutPort->PortName() << ") --> " << toNode->Name() << "("
-// << anInPort->PortName() << ")" << " selected" ) ;
}
- else {
-// MESSAGE( "Link " << anOutPort->NodeName() << "("
-// << anOutPort->PortName() << ") --> " << toNode->Name() << "("
-// << anInPort->PortName() << ")" << " skipped" ) ;
+ }
+ }
+ }
+ }
+ for ( j = 0 ; j < aNode->GetNodeOutPortsSize() ; j++ ) {
+ GraphBase::OutPort * anOutPort = aNode->GetChangeNodeOutPort( j ) ;
+// MESSAGE( "Graph_Impl::Links " << aNode->Name() << " Out" << j << " " << anOutPort->PortName() << " "
+// << anOutPort->PortStatus() << " PortConnected to " << anOutPort->InPortsSize() << " InPorts" ) ;
+ int k ;
+ for ( k = 0 ; k < anOutPort->InPortsSize() ; k++ ) {
+ GraphBase::InPort * anInPort = anOutPort->ChangeInPorts( k ) ;
+// MESSAGE( " --> In" << k << " " << anInPort->NodeName() << " " << anInPort->PortName()
+// << " " << anInPort->PortStatus() ) ;
+ if ( !anInPort->IsExternConnected() ) {
+ GraphEditor::InNode * toNode = (GraphEditor::InNode * ) DataFlowEditor()->Graph()->GetChangeGraphNode( anInPort->NodeName() )->GetInNode() ;
+ if ( theNode == NULL ||
+ !strcmp( theNode->Name() , aNode->Name() ) ) {
+ if ( !anInPort->IsDataStream() ) {
+ if ( theNode || ( toNode->IsEndSwitchNode() && !aNode->IsSwitchNode() ) ) {
+ if ( anInputParam == NULL ||
+ !strcmp( anInPort->PortName() , anInputParam ) ) {
+ if ( anInPort->IsLoop() || anOutPort->IsLoop() ||
+ ( toNode->IsEndLoopNode() && !strcmp( toNode->CoupledNode()->Name() ,
+ anOutPort->NodeName() ) ) ) {
+// MESSAGE( "Link " << anOutPort->NodeName() << "("
+// << anOutPort->PortName() << ") --> " << toNode->Name() << "("
+// << anInPort->PortName() << ")" << " ignored" ) ;
+ }
+ else if ( CORBA::is_nil( anOutPort->InPortObjRef( anInPort ) ) ) {
+ if ( begin ) {
+ beginService( "Graph_Impl::Links" );
+ begin = false ;
+ }
+ bool Success ;
+ Link_Impl * myLink = new Link_Impl( _Orb , _Poa , _ContId ,
+ instanceName() , interfaceName() ,
+ DataFlowEditor() ,
+ toNode ,
+ anInPort->PortName() ,
+ aNode ,
+ anOutPort->PortName() ,
+ false , true , Success ) ;
+ if ( Success ) {
+ PortableServer::ObjectId * id = myLink->getId() ;
+ CORBA::Object_var obj = _poa->id_to_reference(*id);
+ SUPERV::Link_var iobject ;
+ iobject = SUPERV::Link::_narrow(obj) ;
+ RetVal->length( countlink + 1 ) ;
+ RetVal[ countlink++ ] = SUPERV::Link::_duplicate( iobject ) ;
+ anOutPort->AddInPortObjRef( anInPort , SUPERV::Link::_duplicate( iobject ) ) ;
+ }
+ }
+ else {
+ RetVal->length( countlink + 1 ) ;
+ RetVal[ countlink++ ] = SUPERV::Link::_duplicate( SUPERV::Link::_narrow( anOutPort->InPortObjRef( anInPort ) ) ) ;
+ }
+// MESSAGE( "Link " << anOutPort->NodeName() << "("
+// << anOutPort->PortName() << ") --> " << toNode->Name() << "("
+// << anInPort->PortName() << ")" << " selected" ) ;
+ }
+ else {
+// MESSAGE( "Link " << anOutPort->NodeName() << "("
+// << anOutPort->PortName() << ") --> " << toNode->Name() << "("
+// << anInPort->PortName() << ")" << " skipped" ) ;
+ }
+ }
}
}
}
}
}
}
- }
+
#if 0
- const char * NodeName = "" ;
- const char * InputParamName = "" ;
- if ( theNode ) {
- NodeName = theNode->Name() ;
- }
- if ( anInputParam ) {
- InputParamName = anInputParam ;
- }
- MESSAGE( RetVal->length() << " Links of Node " << NodeName << " and of InPort " << InputParamName ) ;
- for ( i = 0 ; i < (int ) RetVal->length() ; i++ ) {
- MESSAGE( "Link " << RetVal[i]->OutPort()->Node()->Name() << "("
- << RetVal[i]->OutPort()->Name() << ") --> "
- << RetVal[i]->InPort()->Node()->Name() << "("
- << RetVal[i]->InPort()->Name() << ")" ) ;
- }
+ const char * NodeName = "" ;
+ const char * InputParamName = "" ;
+ if ( theNode ) {
+ NodeName = theNode->Name() ;
+ }
+ if ( anInputParam ) {
+ InputParamName = anInputParam ;
+ }
+ MESSAGE( RetVal->length() << " Links of Node " << NodeName << " and of InPort " << InputParamName ) ;
+ for ( i = 0 ; i < (int ) RetVal->length() ; i++ ) {
+ MESSAGE( "Link " << RetVal[i]->OutPort()->Node()->Name() << "("
+ << RetVal[i]->OutPort()->Name() << ") --> "
+ << RetVal[i]->InPort()->Node()->Name() << "("
+ << RetVal[i]->InPort()->Name() << ")" ) ;
+ }
#endif
- if ( !begin ) {
- endService( "Graph_Impl::Links" );
+ if ( !begin ) {
+ endService( "Graph_Impl::Links" );
+ }
}
return ( RetVal._retn() ) ;
}
Engines::Component_ptr Graph_Impl::ComponentRef( const char * aComputerContainer ,
const char * aComponentName ) {
- Engines::Container_var myContainer ;
- Engines::Component_var objComponent ;
- DataFlowEditor()->Graph()->StartComponent( 0 , aComputerContainer , aComponentName ,
- myContainer , objComponent ) ;
+ Engines::Component_var objComponent = Engines::Component::_nil() ;
+ if ( !IsMacro() ) {
+ Engines::Container_var myContainer ;
+ DataFlowEditor()->Graph()->StartComponent( 0 , aComputerContainer , aComponentName ,
+ myContainer , objComponent ) ;
+ }
return Engines::Component::_duplicate( objComponent ) ;
}
bool Graph_Impl::IsValid() {
// beginService( "Graph_Impl::IsValid" );
- bool RetVal = DataFlowEditor()->IsValid() ;
+ bool RetVal = false ;
+ if ( !IsMacro() ) {
+ RetVal = DataFlowEditor()->IsValid() ;
+ }
// endService( "Graph_Impl::IsValid" );
return RetVal ;
}
bool Graph_Impl::IsExecutable() {
// beginService( "Graph_Impl::IsExecutable" );
- bool RetVal = DataFlowEditor()->IsExecutable() ;
+ bool RetVal = false ;
+ if ( !IsMacro() ) {
+ RetVal = DataFlowEditor()->IsExecutable() ;
+ }
// endService( "Graph_Impl::IsExecutable" );
return RetVal ;
}
bool Graph_Impl::IsEditing() {
// beginService( "Graph_Impl::IsEditing" );
- bool RetVal = DataFlowEditor()->IsEditing() ;
+ bool RetVal = false ;
+ if ( !IsMacro() ) {
+ RetVal = DataFlowEditor()->IsEditing() ;
+ }
// endService( "Graph_Impl::IsEditing" );
return RetVal ;
}
bool Graph_Impl::IsExecuting() {
// beginService( "Graph_Impl::IsExecuting" );
- bool RetVal = !DataFlowEditor()->IsEditing() ;
+ bool RetVal = false ;
+ if ( !IsMacro() ) {
+ RetVal = !DataFlowEditor()->IsEditing() ;
+ }
// endService( "Graph_Impl::IsExecuting" );
return RetVal ;
}
bool Graph_Impl::IsReadOnly() {
// beginService( "Graph_Impl::IsExecuting" );
- bool RetVal = DataFlowEditor()->IsReadOnly() ;
+ bool RetVal = false ;
+ if ( !IsMacro() ) {
+ RetVal = DataFlowEditor()->IsReadOnly() ;
+ }
// endService( "Graph_Impl::IsExecuting" );
return RetVal ;
}
long Graph_Impl::LevelMax() {
// beginService( "Graph_Impl::LevelMax" );
- long RetVal = DataFlowEditor()->LevelMax() ;
+ long RetVal = 0 ;
+ if ( !IsMacro() ) {
+ RetVal = DataFlowEditor()->LevelMax() ;
+ }
// endService( "Graph_Impl::LevelMax" );
return RetVal ;
}
SUPERV::ListOfNodes * Graph_Impl::LevelNodes(long aLevel ) {
// beginService( "Graph_Impl::LevelNodes" );
SUPERV::ListOfNodes_var RetVal = new SUPERV::ListOfNodes;
- int i ;
- SUPERV::ListOfStrings_var Nodes = DataFlowEditor()->LevelNodes( aLevel ) ;
+ if ( !IsMacro() ) {
+ int i ;
+ SUPERV::ListOfStrings_var Nodes = DataFlowEditor()->LevelNodes( aLevel ) ;
// RetVal->length( Nodes->length() );
- for ( i = 0 ; i < (int ) Nodes->length() ; i++ ) {
+ for ( i = 0 ; i < (int ) Nodes->length() ; i++ ) {
// char * aNode = Nodes[ i ] ;
- GraphBase::ComputingNode * aNode = DataFlowEditor()->Graph()->GetChangeGraphNode( Nodes[ i ] ) ;
- RetVal = SetNode( RetVal , aNode ) ;
+ GraphBase::ComputingNode * aNode = DataFlowEditor()->Graph()->GetChangeGraphNode( Nodes[ i ] ) ;
+ RetVal = SetNode( RetVal , aNode ) ;
// cout << "Graph_Impl::LevelNodes( " << aLevel << " ) " << aNode->Name() << endl ;
// CNode_Impl * myNode = new CNode_Impl( _Orb , _Poa , _ContId ,
// instanceName() , interfaceName() ,
// SUPERV::CNode_var iobject ;
// iobject = SUPERV::CNode::_narrow(obj) ;
// RetVal[i] = SUPERV::CNode::_duplicate( iobject ) ;
+ }
}
// endService( "Graph_Impl::LevelNodes" );
return ( RetVal._retn() ) ;
}
long Graph_Impl::ThreadsMax() {
// beginService( "Graph_Impl::ThreadsMax" );
- long RetVal = DataFlowEditor()->ThreadsMax() ;
+ long RetVal = 0 ;
+ if ( !IsMacro() ) {
+ RetVal = DataFlowEditor()->ThreadsMax() ;
+ }
// endService( "Graph_Impl::ThreadsMax" );
return RetVal ;
}
long Graph_Impl::Threads() {
// beginService( "Node_Impl::Threads" );
- long RetVal = _DataFlowExecutor->Threads() ;
+ long RetVal = false ;
+ if ( !IsMacro() ) {
+ RetVal = DataFlowExecutor()->Threads() ;
+ }
// endService( "Node_Impl::Threads" );
return RetVal ;
}
long Graph_Impl::SuspendedThreads() {
// beginService( "Node_Impl::SuspendedThreads" );
- long RetVal = _DataFlowExecutor->SuspendedThreads() ;
+ long RetVal = false ;
+ if ( !IsMacro() ) {
+ RetVal = DataFlowExecutor()->SuspendedThreads() ;
+ }
// endService( "Node_Impl::SuspendedThreads" );
return RetVal ;
}
perror("pthread_mutex_lock _MutexExecutorWait") ;
exit( 0 ) ;
}
- if ( _DataFlowExecutor ) {
- MESSAGE( "Graph_Impl::Begin " << _DataFlowExecutor->Threads() << " threads" )
- if ( _DataFlowExecutor->Threads() ) {
- _DataFlowExecutor->JoinedWait() ;
+ if ( DataFlowExecutor() ) {
+ MESSAGE( "Graph_Impl::Begin " << DataFlowExecutor()->Threads() << " threads" )
+ if ( DataFlowExecutor()->Threads() ) {
+ DataFlowExecutor()->JoinedWait() ;
}
- delete _DataFlowExecutor ;
- _DataFlowExecutor = NULL ;
+ delete DataFlowExecutor() ;
+ DataFlowExecutor( NULL ) ;
DataFlowEditor()->Executor( NULL ) ;
}
- DataFlowEditor()->EditedAfterExecution( false ) ;
- int _ExecNumber = theAutomaton->ExecNumber() ;
- char ExecNumber[30] ;
- sprintf( ExecNumber , "_%d" , _ExecNumber ) ;
- int len = strlen( _DebugFileName ) ;
- char * DebugFileName = new char [ len + strlen( ExecNumber ) + 6 ] ;
- strncpy( DebugFileName , _DebugFileName , len - 4 ) ;
- DebugFileName[ len - 4 ] = '\0' ;
- strcat( DebugFileName , ExecNumber ) ;
- strcat( DebugFileName , "_Exec.log" ) ;
- GraphBase::SGraph * myGraph = DataFlowEditor()->GetDataFlow() ;
- _DataFlowExecutor = new GraphExecutor::DataFlow( _Orb , _NamingService ,
- myGraph->Info.theName.c_str() ,
- DebugFileName , Kind() ) ;
- MESSAGE( "Graph_Impl::Begin : DataFlowExecutor created" );
- RetVal = _DataFlowExecutor->LoadDataFlow( *myGraph ) ;
- if ( RetVal ) {
- _DataFlowExecutor->Graph()->SetObjImpl( DataFlowEditor()->Graph()->ObjImpl() ) ;
- DataFlowEditor()->Executor( _DataFlowExecutor ) ;
+ if ( DataFlowEditor()->IsExecutable() ) {
+ DataFlowEditor()->EditedAfterExecution( false ) ;
+ int _ExecNumber = theAutomaton->ExecNumber() ;
+ char ExecNumber[30] ;
+ sprintf( ExecNumber , "_%d" , _ExecNumber ) ;
+ int len = strlen( _DebugFileName ) ;
+ char * DebugFileName = new char [ len + strlen( ExecNumber ) + 6 ] ;
+ strncpy( DebugFileName , _DebugFileName , len - 4 ) ;
+ DebugFileName[ len - 4 ] = '\0' ;
+ strcat( DebugFileName , ExecNumber ) ;
+ strcat( DebugFileName , "_Exec.log" ) ;
+ GraphExecutor::DataFlow * aDataFlowExecutor ;
+ GraphBase::ListOfSGraphs * myListOfGraphs = DataFlowEditor()->GetDataFlows() ;
+ int i ;
+ for ( i = 0 ; i < (int ) myListOfGraphs->size() ; i++ ) {
+ GraphEditor::DataFlow * aDataFlowEditor ;
+ aDataFlowEditor = theAutomaton->MapGraph( (*myListOfGraphs)[ i ].Info.theName.c_str() )->GraphEditor() ;
+ MESSAGE("myListOfGraphs" << i << " " << (*myListOfGraphs)[ i ].Info.theName.c_str() << " "
+ << aDataFlowEditor << " IsEditing " << aDataFlowEditor->IsEditing() ) ;
+
+ }
+ aDataFlowExecutor = new GraphExecutor::DataFlow( _Orb , _NamingService ,
+ (*myListOfGraphs)[ 0 ].Info.theName.c_str() ,
+ DebugFileName , Kind() ) ;
+ DataFlowExecutor( aDataFlowExecutor ) ;
+ MESSAGE( "Graph_Impl::Begin : DataFlowExecutor created" );
+ RetVal = LoadDataFlows( DataFlowExecutor() , myListOfGraphs , 0 ) ;
+ if ( RetVal ) {
+ DataFlowExecutor()->Graph()->SetObjImpl( DataFlowEditor()->Graph()->ObjImpl() ) ;
+ DataFlowEditor()->Executor( DataFlowExecutor() ) ;
+ }
}
if ( pthread_mutex_unlock( &_MutexExecutorWait ) ) {
perror("pthread_mutex_unlock _MutexExecutorWait") ;
bool Graph_Impl::Run() {
beginService( "Graph_Impl::Run" );
bool RetVal = false ;
- if ( DataFlowEditor()->IsEditing() ) {
- MESSAGE( "Graph_Impl::Run IsEditing" );
- RetVal = Begin() ;
+ if ( DataFlowEditor()->IsEditing() && !IsMacro() ) {
+ MESSAGE( "Graph_Impl::Run " << DataFlowEditor()->Graph()->Name() << " " << DataFlowEditor() << " IsEditing" );
+ if ( DataFlowEditor()->Graph()->GraphMacroLevel() ) {
+ MESSAGE( "Graph_Impl::Run " << DataFlowEditor()->Graph()->Name() << " GraphMacroLevel "
+ << DataFlowEditor()->Graph()->GraphMacroLevel() ) ;
+ RetVal = true ;
+ }
+ else {
+ MESSAGE( "Graph_Impl::Run " << DataFlowEditor()->Graph()->Name() << " GraphMacroLevel "
+ << DataFlowEditor()->Graph()->GraphMacroLevel() << " --> Begin()" ) ;
+ RetVal = Begin() ;
+ }
if ( RetVal ) {
- MESSAGE( "Graph_Impl::(Re)Run " );
+ MESSAGE( "Graph_Impl::Run " );
+ DataFlowEditor()->Executing() ;
RetVal = CNode_Impl::Run() ;
}
}
- else {
- MESSAGE( "Graph_Impl::(Re)Run " );
+ else if ( !IsMacro() ) {
+ MESSAGE( "Graph_Impl::Run " << DataFlowEditor()->Graph()->Name() << " " << DataFlowEditor()
+ << " IsNOTEditing --> CNode_Impl::ReRun" );
+ DataFlowEditor()->Executing() ;
RetVal = CNode_Impl::ReRun() ;
}
endService( "Graph_Impl::Run" );
bool Graph_Impl::Start() {
beginService( "Graph_Impl::Start" );
bool RetVal = false ;
- if ( DataFlowEditor()->IsEditing() ) {
- MESSAGE( "Graph_Impl::Start IsEditing" );
- RetVal = Begin() ;
- }
- else {
- RetVal = true ;
- }
- if ( RetVal ) {
- MESSAGE( "Graph_Impl::(Re)Start " );
- RetVal = ReStart() ;
+ if ( !IsMacro() ) {
+ if ( DataFlowEditor()->IsEditing() ) {
+ MESSAGE( "Graph_Impl::Start IsEditing" );
+ RetVal = Begin() ;
+ }
+ else {
+ RetVal = true ;
+ }
+ if ( RetVal ) {
+ MESSAGE( "Graph_Impl::(Re)Start " );
+ // Added by NKV to fix PAL6222 --> to be confirm by JR
+ DataFlowEditor()->Executing() ;
+ // End of NKV's correction
+ RetVal = ReStart() ;
+ }
}
endService( "Graph_Impl::Start" );
return RetVal ;
perror("pthread_mutex_lock _MutexExecutorWait") ;
exit( 0 ) ;
}
- if ( _DataFlowExecutor &&
- ( _DataFlowExecutor->GetListSize() || !DataFlowEditor()->IsEditing() ) ) {
- RetVal = _DataFlowExecutor->Event( & aNodeName , theEvent , theState , false ) ;
+ if ( DataFlowExecutor() && !IsMacro() &&
+ ( DataFlowExecutor()->GetListSize() || !DataFlowEditor()->IsEditing() ) ) {
+ RetVal = DataFlowExecutor()->Event( & aNodeName , theEvent , theState , false ) ;
// endService( "Graph_Impl::Event" );
if ( strlen( aNodeName ) ) {
if ( strcmp( aNodeName , Name() ) ) {
else {
aNode = SUPERV::Graph::_duplicate( SUPERV::Graph::_nil() ) ;
}
-// cout << "Graph_Impl::EventNoW " << aNode->Name() << " QSize " << _DataFlowExecutor->GetListSize() << endl ;
+// cout << "Graph_Impl::EventNoW " << aNode->Name() << " QSize " << DataFlowExecutor()->GetListSize() << endl ;
}
else {
-// cout << "Graph_Impl::EventNoW NO DataFlowExecutor or QSize=0 " << endl ;
+// cout << "Graph_Impl::EventNoW NO DataFlowExecutor() or QSize=0 " << endl ;
}
if ( pthread_mutex_unlock( &_MutexExecutorWait ) ) {
perror("pthread_mutex_unlock _MutexExecutorWait") ;
perror("pthread_mutex_lock _MutexExecutorWait") ;
exit( 0 ) ;
}
- if ( _DataFlowExecutor &&
- ( _DataFlowExecutor->GetListSize() || !DataFlowEditor()->IsEditing() ) ){
- RetVal = _DataFlowExecutor->Event( & aNodeName , theEvent , theState ) ;
+ if ( DataFlowExecutor() && !IsMacro() &&
+ ( DataFlowExecutor()->GetListSize() || !DataFlowEditor()->IsEditing() ) ){
+ RetVal = DataFlowExecutor()->Event( & aNodeName , theEvent , theState ) ;
// endService( "Graph_Impl::Event" );
if ( strlen( aNodeName ) ) {
if ( strcmp( aNodeName , Name() ) ) {
else {
aNode = SUPERV::Graph::_duplicate( SUPERV::Graph::_nil() ) ;
}
-// cout << "Graph_Impl::Event " << aNode->Name() << " QSize " << _DataFlowExecutor->GetListSize() << endl ;
+// cout << "Graph_Impl::Event " << aNode->Name() << " QSize " << DataFlowExecutor()->GetListSize() << endl ;
}
else {
-// cout << "Graph_Impl::Event NO DataFlowExecutor or QSize=0 " << endl ;
+// cout << "Graph_Impl::Event NO DataFlowExecutor() or QSize=0 " << endl ;
}
if ( pthread_mutex_unlock( &_MutexExecutorWait ) ) {
perror("pthread_mutex_unlock _MutexExecutorWait") ;
perror("pthread_mutex_lock _MutexExecutorWait") ;
exit( 0 ) ;
}
- if ( _DataFlowExecutor &&
- ( _DataFlowExecutor->GetListSize() || !DataFlowEditor()->IsEditing() ) ) {
- RetVal = _DataFlowExecutor->EventW( & aNodeName , theEvent , theState ) ;
+ if ( DataFlowExecutor() && !IsMacro() &&
+ ( DataFlowExecutor()->GetListSize() || !DataFlowEditor()->IsEditing() ) ) {
+ RetVal = DataFlowExecutor()->EventW( & aNodeName , theEvent , theState ) ;
if ( RetVal && strcmp( aNodeName , Name() ) ) {
aNode = Node( aNodeName ) ;
}
perror("pthread_mutex_lock _MutexExecutorWait") ;
exit( 0 ) ;
}
- if ( _DataFlowExecutor ) {
- QSize = _DataFlowExecutor->EventQSize() ;
+ if ( DataFlowExecutor() && !IsMacro() ) {
+ QSize = DataFlowExecutor()->EventQSize() ;
}
if ( pthread_mutex_unlock( &_MutexExecutorWait ) ) {
perror("pthread_mutex_unlock _MutexExecutorWait") ;
exit( 0 ) ;
}
long RetVal = 0 ;
- if ( _DataFlowExecutor ) {
- RetVal = _DataFlowExecutor->LastLevelDone() ;
+ if ( DataFlowExecutor() && !IsMacro() ) {
+ RetVal = DataFlowExecutor()->LastLevelDone() ;
}
if ( pthread_mutex_unlock( &_MutexExecutorWait ) ) {
perror("pthread_mutex_unlock _MutexExecutorWait") ;
long Graph_Impl::SubGraphsNumber() {
// beginService( "Graph_Impl::SubGraphsNumber" );
long RetVal = 0 ;
- if ( DataFlowEditor()->IsExecutable() ) {
+ if ( DataFlowEditor()->IsExecutable() && !IsMacro() ) {
RetVal = DataFlowEditor()->SubGraphsNumber() ;
}
// endService( "Graph_Impl::SubGraphsNumber" );
SUPERV::ListOfNodes * Graph_Impl::SubGraphsNodes( const long aSubGraphNumber ) {
beginService( "Graph_Impl::SubGraphsNodes" );
SUPERV::ListOfNodes_var RetVal = new SUPERV::ListOfNodes ;
- if ( DataFlowEditor()->IsEditing() ) {
+ if ( DataFlowEditor()->IsEditing() && !IsMacro() ) {
SUPERV::ListOfNodes * aGraphNodes = Nodes() ;
int i ;
// ComputingNodes
bool Graph_Impl::Merge(const SUPERV::Graph_ptr aGraph ) {
// beginService( "Graph_Impl::Merge" );
bool RetVal = true ;
- map< string , int > aMapOfNodes ;
- RetVal = Merge( aGraph , aMapOfNodes ) ;
+ if ( !IsMacro() ) {
+ map< string , int > aMapOfNodes ;
+ RetVal = Merge( aGraph , aMapOfNodes ) ;
+ }
// endService( "Graph_Impl::Merge" );
return RetVal ;
}
bool Graph_Impl::Merge(const SUPERV::Graph_ptr aGraph , map< string , int > & aMapOfNodes ) {
beginService( "Graph_Impl::Merge" );
bool RetVal = true ;
- if ( DataFlowEditor()->IsEditing() ) {
+ if ( DataFlowEditor()->IsEditing() && !IsMacro() ) {
SUPERV::ListOfNodes * aGraphNodes = aGraph->Nodes() ;
int i ;
SUPERV::Port_ptr aPort ;
char * aPortName = aPort->Name() ;
char * aNodeName = new char[ strlen( aPortName ) + 1 ] ;
strcpy( aNodeName , aPortName ) ;
- char * thePortName = strchr( aNodeName , '\\' ) ;
- thePortName[ 0 ] = '\0' ;
- bool hasinput = aGraph->Node( aNodeName )->Port( thePortName + 1 )->HasInput() ;
+// char * thePortName = strchr( aNodeName , '\\' ) ;
+ char * thePortName = aNodeName ;
+ while ( ( thePortName = strchr( thePortName , '_' ) ) ) {
+ if ( thePortName[1] == '_' ) {
+ thePortName[ 0 ] = '\0' ;
+ break ;
+ }
+ else {
+ thePortName = &thePortName[2] ;
+ }
+ }
+ bool hasinput = aGraph->Node( aNodeName )->Port( thePortName + 2 )->HasInput() ;
// cout << "Graph_Impl::Merge " << " aNodeName " << aNodeName << " aPort " << thePortName + 1
// << " HasInput " << hasinput << endl ;
if ( hasinput ) {
RetVal = DataFlowEditor()->AddInputData( DataFlowEditor()->Graph()->GetGraphNode( aMapOfNodes[ aNodeName ] )->Name() ,
- thePortName + 1 ,
+ thePortName + 2 ,
*(aPort->ToAny()) ) ;
}
delete [] aNodeName ;
SUPERV::StreamGraph_ptr Graph_Impl::ToStreamGraph() {
SUPERV::StreamGraph_var iobject = SUPERV::StreamGraph::_nil() ;
beginService( "Graph_Impl::ToStreamGraph" );
- if ( IsStreamGraph() ) {
+ if ( IsStreamGraph() && !IsMacro() ) {
// StreamGraph_Impl * myStreamGraph = new StreamGraph_Impl( _Orb , _Poa , _ContId ,
// instanceName() , interfaceName() ) ;
// PortableServer::ObjectId * id = myStreamGraph->getId() ;
}
+
#include "DataFlowEditor_DataFlow.hxx"
#include "DataFlowExecutor_DataFlow.hxx"
-class Graph_Impl :public INode_Impl ,
- public POA_SUPERV::Graph {
+class Graph_Impl : public POA_SUPERV::Graph ,
+ public GNode_Impl {
private:
CORBA::ORB_ptr _Orb ;
char * _DebugFileName ;
pthread_mutex_t _MutexExecutorWait ;
- GraphExecutor::DataFlow * _DataFlowExecutor ;
+// GraphExecutor::DataFlow * _DataFlowExecutor ;
SUPERV::Graph_var myServant; // mpv 23.12.2002: store servant of graph to get constant IOR
const char *interfaceName ,
const char *aDataFlowName ,
const SUPERV::KindOfNode aKindOfNode ) ;
+ Graph_Impl( CORBA::ORB_ptr orb ,
+ PortableServer::POA_ptr poa ,
+ PortableServer::ObjectId * contId ,
+ const char *instanceName ,
+ const char *interfaceName ,
+ GraphEditor::DataFlow * DataFlowEditor ,
+ GraphEditor::InNode * DataFlowNode ) ;
+ Graph_Impl( CORBA::ORB_ptr orb ,
+ PortableServer::POA_ptr poa ,
+ PortableServer::ObjectId * contId ,
+ const char *instanceName ,
+ const char *interfaceName ,
+ GraphExecutor::DataFlow * DataFlowExecutor ,
+ GraphExecutor::InNode * DataFlowExecutorNode ) ;
virtual SUPERV::Graph_ptr Copy() ;
virtual ~Graph_Impl() ;
virtual void destroy() ;
+ void DebugFileName( char * aDebugFileName ) {
+ _DebugFileName = my_strdup( aDebugFileName ) ; } ;
+ char * DebugFileName() {
+ return _DebugFileName ; } ;
+
virtual char* getIOR();
virtual void ReadOnly() ;
// virtual char * DataNodeInfo() ;
// virtual char * NodeInfo( const char * aNodeName ) ;
- virtual GraphBase::SGraph * GetGraph() ;
+ virtual GraphBase::ListOfSGraphs * GetGraphs() ;
- virtual bool LoadGraph(const GraphBase::SGraph *aGraph ) ;
+ virtual bool LoadGraphs( GraphBase::ListOfSGraphs *aListOfGraphs ) ;
virtual bool Import(const char * aXmlFile ) ;
virtual bool Export(const char * aXmlFile ) ;
const SUPERV::ListOfStrings & PythonFunction ,
SUPERV::INode_out anEndOfSwitch ) ;
+ bool LoadDataFlows( GraphEditor::DataFlow * aDataFlowEditor ,
+ GraphBase::ListOfSGraphs * aListOfDataFlows ,
+ int index ) ;
+ bool LoadDataFlows( GraphExecutor::DataFlow * aDataFlowExecutor ,
+ GraphBase::ListOfSGraphs * aListOfDataFlows ,
+ int index ) ;
+ virtual SUPERV::Graph_ptr MNode( const char * aXmlFileName ) ;
+
+ virtual SUPERV::Graph_ptr MNode( GraphEditor::DataFlow * aDataFlowEditor ,
+ GraphBase::ListOfSGraphs aListOfDataFlows ) ;
+
+ virtual SUPERV::Graph_ptr GraphMNode( SUPERV::Graph_ptr aGraph ) ;
+
+ virtual SUPERV::Graph_ptr FlowObjRef() ;
+
+ virtual SUPERV::StreamGraph_ptr StreamObjRef() ;
+
virtual SUPERV::CNode_ptr Node( const char * NodeName );
virtual SUPERV::Link_ptr Link( SUPERV::Port_ptr OutPort ,
SUPERV::Port_ptr InPort ) ;
virtual SUPERV::ListOfNodes_var Graph_Impl::SetNode( SUPERV::ListOfNodes_var RetVal ,
- GraphBase::ComputingNode * aNode ) ;
+ GraphBase::ComputingNode * aNode ) ;
virtual SUPERV::ListOfNodes * Nodes() ;
virtual void SetNodeObjRef( GraphEditor::InNode * anInNode ) ;
PortableServer::ObjectId * contId ,
const char *instanceName ,
const char *interfaceName ,
- const char *aDataFlowName ) :
+ const char *aDataFlowName ,
+ const SUPERV::KindOfNode aKindOfNode ) :
// Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
- CNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowName ) {
+ CNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowName , aKindOfNode ) {
// MESSAGE("INode_Impl::INode_Impl activate object instanceName("
// << instanceName << ") interfaceName(" << interfaceName << ") --> "
// << hex << (void *) this << dec )
// _thisObj = this ;
// _id = _poa->activate_object(_thisObj);
- MESSAGE( "INode_Impl::INode_Impl " << aDataFlowName );
- beginService( "INode_Impl::INode_Impl" );
+// MESSAGE( "INode_Impl::INode_Impl " << aDataFlowName );
+// beginService( "INode_Impl::INode_Impl" );
_Orb = CORBA::ORB::_duplicate(orb);
_Poa = poa ;
_ContId = contId ;
- endService( "INode_Impl::INode_Impl" );
+// endService( "INode_Impl::INode_Impl" );
}
INode_Impl::INode_Impl() {
const SUPERV::KindOfNode NodeKindOfNode ) :
// Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
CNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , SALOME_ModuleCatalog::Service() , FuncName , NodeKindOfNode , FuncName , aPythonFunction ) {
- beginService( "INode_Impl::INode_Impl" );
+// beginService( "INode_Impl::INode_Impl" );
if ( FuncName ) {
// cout << "INode_Impl::CNode_Impl " << (void *) FuncName << " " << FuncName
// << " " << strlen( FuncName ) << endl ;
}
if ( NodeKindOfNode == SUPERV::InLineNode ) {
- MESSAGE( "INode_Impl::INode_Impl " << FuncName << " _poa->activate_object" );
+// MESSAGE( "INode_Impl::INode_Impl " << FuncName << " _poa->activate_object" );
_thisObj = this ;
_id = _poa->activate_object(_thisObj);
}
- MESSAGE("INode_Impl::INode_Impl " << FuncName << " " << strlen( FuncName ) ) ;
+// MESSAGE("INode_Impl::INode_Impl " << FuncName << " " << strlen( FuncName ) ) ;
_Orb = CORBA::ORB::_duplicate(orb);
_Poa = poa ;
_ContId = contId ;
// DataFlowNode()->SetPythonFunction( FuncName , aPythonFunction ) ;
- endService( "INode_Impl::INode_Impl" );
+// endService( "INode_Impl::INode_Impl" );
}
INode_Impl::INode_Impl( CORBA::ORB_ptr orb ,
const SUPERV::KindOfNode NodeKindOfNode ) :
// Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
CNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , SALOME_ModuleCatalog::Service() , FuncName[0].c_str() , NodeKindOfNode , FuncName , aPythonFunction ) {
- beginService( "INode_Impl::INode_Impl" );
+// beginService( "INode_Impl::INode_Impl" );
if ( NodeKindOfNode == SUPERV::InLineNode ) {
- MESSAGE( "INode_Impl::INode_Impl " << FuncName[0] << " _poa->activate_object" );
+// MESSAGE( "INode_Impl::INode_Impl " << FuncName[0] << " _poa->activate_object" );
_thisObj = this ;
_id = _poa->activate_object(_thisObj);
}
- MESSAGE("INode_Impl::INode_Impl " << FuncName[0].c_str() << " " << strlen( FuncName[0].c_str() ) ) ;
+// MESSAGE("INode_Impl::INode_Impl " << FuncName[0].c_str() << " " << strlen( FuncName[0].c_str() ) ) ;
_Orb = CORBA::ORB::_duplicate(orb);
_Poa = poa ;
_ContId = contId ;
// DataFlowNode()->SetPythonFunction( FuncName , aPythonFunction ) ;
- endService( "INode_Impl::INode_Impl" );
+// endService( "INode_Impl::INode_Impl" );
}
INode_Impl::INode_Impl( CORBA::ORB_ptr orb ,
GraphEditor::InNode * aDataFlowNode ) :
// Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
CNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , aDataFlowNode ) {
- MESSAGE( DataFlowNode()->Name() << " " );
- beginService( "INode_Impl::INode_Impl" );
- if ( DataFlowNode()->IsInLineNode() ) {
- MESSAGE( "INode_Impl::INode_Impl " << DataFlowNode()->PyFuncName()
- << " _poa->activate_object" );
+// beginService( "INode_Impl::INode_Impl" );
+ if ( DataFlowNode() && DataFlowNode()->IsInLineNode() ) {
+// MESSAGE( "INode_Impl::INode_Impl " << DataFlowNode()->PyFuncName()
+// << " _poa->activate_object" );
_thisObj = this ;
_id = _poa->activate_object(_thisObj);
}
+ else {
+// MESSAGE( "INode_Impl::INode_Impl NO _poa->activate_object" );
+ }
+ _Orb = CORBA::ORB::_duplicate(orb);
+ _Poa = poa ;
+ _ContId = contId ;
+// endService( "INode_Impl::INode_Impl" );
+}
+
+INode_Impl::INode_Impl( CORBA::ORB_ptr orb ,
+ PortableServer::POA_ptr poa ,
+ PortableServer::ObjectId * contId ,
+ const char *instanceName ,
+ const char *interfaceName ,
+ GraphExecutor::DataFlow * aDataFlowExecutor ,
+ GraphExecutor::InNode * aDataFlowExecutorNode ) :
+// Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
+ CNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowExecutor , aDataFlowExecutorNode ) {
+// beginService( "INode_Impl::INode_Impl" );
+ if ( DataFlowExecutorNode() && DataFlowExecutorNode()->IsInLineNode() ) {
+// MESSAGE( "INode_Impl::INode_Impl " << DataFlowExecutorNode()->Name()
+// << " _poa->activate_object" );
+ _thisObj = this ;
+ _id = _poa->activate_object(_thisObj);
+ }
+ else {
+// MESSAGE( "INode_Impl::INode_Impl NO _poa->activate_object" );
+ }
_Orb = CORBA::ORB::_duplicate(orb);
_Poa = poa ;
_ContId = contId ;
- endService( "INode_Impl::INode_Impl" );
+// endService( "INode_Impl::INode_Impl" );
}
INode_Impl::~INode_Impl() {
// beginService( "INode_Impl::Delete" );
bool RetVal = false ;
if ( DataFlowEditor()->IsEditing() ) {
+ DeletePorts() ;
RetVal = DataFlowEditor()->RemoveNode( Name() ) ;
if ( RetVal )
RetVal = DataFlowEditor()->UnValid() ;
SUPERV::Port_ptr InEndobject = SUPERV::Port::_nil() ;
Port_Impl * myInPort = NULL ;
bool InPortCreated = false ;
- MESSAGE( "CNode_Impl::InPort " << DataFlowNode()->Name() << "->AddInPort( " << aParameterName << " , "
- << aParameterType << " )" ) ;
+// MESSAGE( "CNode_Impl::InPort " << DataFlowNode()->Name() << "->AddInPort( " << aParameterName << " , "
+// << aParameterType << " )" ) ;
GraphBase::InPort * anInPort = DataFlowNode()->GetChangeInPort( aParameterName ) ;
if ( anInPort == NULL ) {
anInPort = DataFlowNode()->AddInPort( aParameterName , aParameterType , SUPERV::InLineParameter ) ;
const char *aParameterType ) {
Port_Impl * myOutPort = NULL ;
SUPERV::Port_ptr Outobject = SUPERV::Port::_nil() ;
- MESSAGE( "CNode_Impl::OutPort " << DataFlowNode()->Name() << "->AddOutPort( " << aParameterName << " , "
- << aParameterType << " )" ) ;
+// MESSAGE( "CNode_Impl::OutPort " << DataFlowNode()->Name() << "->AddOutPort( " << aParameterName << " , "
+// << aParameterType << " )" ) ;
GraphBase::OutPort * anOutPort = DataFlowNode()->GetChangeOutPort( aParameterName ) ;
if ( anOutPort == NULL ) {
anOutPort = DataFlowNode()->AddOutPort( aParameterName , aParameterType , SUPERV::InLineParameter ) ;
PortableServer::ObjectId * contId ,
const char *instanceName ,
const char *interfaceName ,
- const char *aDataFlowName ) ;
+ const char *aDataFlowName ,
+ const SUPERV::KindOfNode aKindOfNode ) ;
INode_Impl( CORBA::ORB_ptr orb ,
PortableServer::POA_ptr poa ,
PortableServer::ObjectId * contId ,
const char *interfaceName ,
GraphEditor::DataFlow * DataFlowEditor ,
GraphEditor::InNode * DataFlowNode ) ;
+ INode_Impl( CORBA::ORB_ptr orb ,
+ PortableServer::POA_ptr poa ,
+ PortableServer::ObjectId * contId ,
+ const char *instanceName ,
+ const char *interfaceName ,
+ GraphExecutor::DataFlow * DataFlowExecutor ,
+ GraphExecutor::InNode * DataFlowExecutorNode ) ;
virtual ~INode_Impl() ;
virtual void destroy() ;
virtual bool Delete() ;
beginService( "LNode_Impl::Delete" );
bool RetVal = false ;
if ( DataFlowEditor()->IsEditing() ) {
+ DeletePorts() ;
RetVal = DataFlowEditor()->RemoveNode( Name() ) ;
if ( RetVal ) {
RetVal = DataFlowEditor()->IsValid() ;
if ( anInPort->GetOutPort() ) {
anInPort->GetOutPort()->RemoveInPort( anInPort ) ;
}
- _DataFlowNode->DelInPort( _DataFlowPort->PortName() ) ;
- if ( _DataFlowNode->IsLoopNode() ) {
- _DataFlowNode->DelOutPort( _DataFlowPort->PortName() ) ;
- _DataFlowNode->CoupledNode()->DelInPort( _DataFlowPort->PortName() ) ;
- _DataFlowNode->CoupledNode()->DelOutPort( _DataFlowPort->PortName() ) ;
+ if ( _DataFlowNode->IsOneOfInLineNodes() ) {
+ _DataFlowNode->DelInPort( _DataFlowPort->PortName() ) ;
+ if ( _DataFlowNode->IsLoopNode() ) {
+ _DataFlowNode->DelOutPort( _DataFlowPort->PortName() ) ;
+ _DataFlowNode->CoupledNode()->DelInPort( _DataFlowPort->PortName() ) ;
+ _DataFlowNode->CoupledNode()->DelOutPort( _DataFlowPort->PortName() ) ;
+ }
+ }
+ else {
}
destroyed = true ;
}
- else if ( !_DataFlowNode->IsLoopNode() ) {
+ else if ( _DataFlowNode->IsOneOfInLineNodes() && !_DataFlowNode->IsLoopNode() ) {
_DataFlowNode->DelOutPort( _DataFlowPort->PortName() ) ;
destroyed = true ;
}
+ else {
+ destroyed = true ;
+ }
if ( destroyed ) {
_DataFlowEditor->UnValid() ;
-// _DataFlowEditor->IsValid() ;
}
}
if ( destroyed ) {
endService( "Port_Impl::destroy" );
}
+void Port_Impl::Remove() {
+ beginService( "Port_Impl::Remove" );
+ _poa->deactivate_object(*_id) ;
+ CORBA::release(_poa) ;
+ delete(_id) ;
+ _thisObj->_remove_ref();
+ endService( "Port_Impl::Remove" );
+}
+
bool Port_Impl::Input( const SUPERV::Value_ptr aValue ) {
return Input( aValue->ToAny() ) ;
}
bool Port_Impl::Input( const CORBA::Any * anAny ) {
beginService( "Port_Impl::Input" );
bool RetVal = false ;
- if ( _InputPort && _DataFlowEditor->IsEditing() ) {
- RetVal = true ;
- Value_Impl::Input( anAny ) ;
- RetVal = _DataFlowEditor->AddInputData( _DataFlowNode->Name() ,
- _DataFlowPort->PortName() ,
- *anAny ) ;
- }
- else if ( _DataFlowEditor->IsExecuting() ) {
- GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
-// if ( _DataFlowExecutor && ( _DataFlowExecutor->IsSuspended() ||
-// _DataFlowExecutor->IsSuspended( _DataFlowNode->Name() ) ) ) {
- if ( _DataFlowExecutor ) {
- RetVal = _DataFlowExecutor->ChangeInputData( _DataFlowNode->Name() ,
- _DataFlowPort->PortName() ,
- *anAny ) ;
+ if ( _DataFlowEditor->Graph()->GraphMacroLevel() == 0 ) {
+ if ( _InputPort && _DataFlowEditor->IsEditing() ) {
+ RetVal = true ;
+ Value_Impl::Input( anAny ) ;
+ RetVal = _DataFlowEditor->AddInputData( _DataFlowNode->Name() ,
+ _DataFlowPort->PortName() ,
+ *anAny ) ;
+ }
+ else if ( _DataFlowEditor->IsExecuting() ) {
+ GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
+// if ( _DataFlowExecutor && ( _DataFlowExecutor->IsSuspended() ||
+// _DataFlowExecutor->IsSuspended( _DataFlowNode->Name() ) ) ) {
+ if ( _DataFlowExecutor ) {
+ RetVal = _DataFlowExecutor->ChangeInputData( _DataFlowNode->Name() ,
+ _DataFlowPort->PortName() ,
+ *anAny ) ;
+ }
}
}
if ( !RetVal ) {
virtual ~Port_Impl() ;
virtual void destroy() ;
+ virtual void Remove() ;
+
GraphEditor::DataFlow * DataFlowEditor() {
return _DataFlowEditor ; } ;
GraphEditor::InNode * DataFlowNode() {
// beginService( "SNode_Impl::Delete" );
bool RetVal = false ;
if ( DataFlowEditor()->IsEditing() ) {
+ DeletePorts() ;
RetVal = DataFlowEditor()->RemoveNode( Name() ) ;
if ( RetVal )
RetVal = DataFlowEditor()->IsValid() ;
PortableServer::ObjectId * contId ,
const char *instanceName ,
const char *interfaceName ,
- const char *aDataFlowName ) :
- Graph_Impl(orb, poa, contId, instanceName, interfaceName, aDataFlowName , SUPERV::DataStreamGraph ) {
+ const char *aDataFlowName ,
+ const SUPERV::KindOfNode aKindOfGraphNode ) :
+// Graph_Impl(orb, poa, contId, instanceName, interfaceName, aDataFlowName , SUPERV::DataStreamGraph ) {
+ Graph_Impl(orb, poa, contId, instanceName, interfaceName, aDataFlowName , aKindOfGraphNode ) {
// MESSAGE("StreamGraph_Impl::StreamGraph_Impl activate object instanceName("
// << instanceName << ") interfaceName(" << interfaceName << ") --> "
// << hex << (void *) this << dec )
endService( "StreamGraph_Impl::StreamGraph_Impl" );
}
+StreamGraph_Impl::StreamGraph_Impl( CORBA::ORB_ptr orb ,
+ PortableServer::POA_ptr poa ,
+ PortableServer::ObjectId * contId ,
+ const char *instanceName ,
+ const char *interfaceName ,
+ GraphEditor::DataFlow * aDataFlowEditor ,
+ GraphEditor::InNode * aDataFlowNode ) :
+ Graph_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , aDataFlowNode ) {
+ MESSAGE( aDataFlowNode->Name() << " " );
+ beginService( "StreamGraph_Impl::StreamGraph_Impl" );
+ if ( aDataFlowNode->IsMacroNode() ) {
+ MESSAGE( "StreamGraph_Impl::StreamGraph_Impl _poa->activate_object" );
+ _thisObj = this ;
+ _id = _poa->activate_object(_thisObj);
+ }
+ else {
+ MESSAGE( "StreamGraph_Impl::StreamGraph_Impl NO _poa->activate_object " );
+ }
+ _Orb = CORBA::ORB::_duplicate(orb);
+ _Poa = poa ;
+ _ContId = contId ;
+ endService( "StreamGraph_Impl::StreamGraph_Impl" );
+}
+
StreamGraph_Impl::StreamGraph_Impl() {
}
SUPERV::StreamGraph_ptr StreamGraph_Impl::StreamCopy() {
beginService( "StreamGraph_Impl::StreamCopy" );
- StreamGraph_Impl * myStreamGraph ;
- myStreamGraph = new StreamGraph_Impl( _Orb , _Poa, _ContId,
- instanceName() , interfaceName() ,
- DataFlowEditor()->Graph()->Name() ) ;
- PortableServer::ObjectId * id = myStreamGraph->getId() ;
- CORBA::Object_var obj = _poa->id_to_reference(*id);
- SUPERV::StreamGraph_var iobject ;
- iobject = SUPERV::StreamGraph::_narrow(obj) ;
- GraphBase::SGraph * aSGraph = GetGraph() ;
- myStreamGraph->LoadGraph( aSGraph ) ;
+ SUPERV::StreamGraph_var iobject = SUPERV::StreamGraph::_nil() ;
+ if ( !IsMacro() ) {
+ StreamGraph_Impl * myStreamGraph ;
+ myStreamGraph = new StreamGraph_Impl( _Orb , _Poa, _ContId,
+ instanceName() , interfaceName() ,
+ DataFlowEditor()->Graph()->Name() ) ;
+ PortableServer::ObjectId * id = myStreamGraph->getId() ;
+ CORBA::Object_var obj = _poa->id_to_reference(*id);
+ iobject = SUPERV::StreamGraph::_narrow(obj) ;
+ GraphBase::ListOfSGraphs * aListOfSGraphs = GetGraphs() ;
+ myStreamGraph->LoadGraphs( aListOfSGraphs ) ;
+ }
endService( "StreamGraph_Impl::StreamCopy" );
return SUPERV::StreamGraph::_duplicate(iobject) ;
}
+SUPERV::StreamGraph_ptr StreamGraph_Impl::StreamMNode( const char * aXmlFileName ) {
+ beginService( "StreamGraph_Impl::StreamMNode" );
+ SUPERV::StreamGraph_var streamiobject = SUPERV::StreamGraph::_nil() ;
+ SUPERV::StreamGraph_var macroiobject = SUPERV::StreamGraph::_nil() ;
+#if 0
+ string dbgfile ;
+ GraphEditor::DataFlow * aDataFlowEditor ;
+ CreateEditor( _Orb , instanceName() , aXmlFileName , SUPERV::DataStreamGraph ,
+ dbgfile , &aDataFlowEditor ) ;
+ int lenname = strlen( aXmlFileName ) ;
+ bool created = false ;
+ if ( lenname > 4 && !strcmp( &aXmlFileName[ lenname - 4 ] , ".xml" ) ) {
+ created = aDataFlowEditor->LoadXml( aXmlFileName ) ;
+ }
+ if ( created ) {
+ StreamGraph_Impl * myStreamGraph ;
+ myStreamGraph = new StreamGraph_Impl( _Orb , _Poa, _ContId,
+ instanceName() , interfaceName() ,
+ aDataFlowEditor , NULL ) ;
+ PortableServer::ObjectId * id = myStreamGraph->getId() ;
+ CORBA::Object_var obj = _poa->id_to_reference(*id);
+ streamiobject = SUPERV::StreamGraph::_narrow( obj ) ;
+ myStreamGraph->SetObjRef( SUPERV::StreamGraph::_duplicate( streamiobject ) ) ;
+
+ StreamGraph_Impl * myStreamMacroNode ;
+ myStreamMacroNode = new StreamGraph_Impl( _Orb , _Poa, _ContId,
+ instanceName() , interfaceName() ,
+ aXmlFileName , SUPERV::StreamMacroNode ) ;
+ id = myStreamMacroNode->getId() ;
+ obj = _poa->id_to_reference(*id);
+ macroiobject = SUPERV::StreamGraph::_narrow( obj ) ;
+ myStreamMacroNode->DataFlowEditor( DataFlowEditor() ) ;
+ myStreamMacroNode->DataFlowEditor()->Graph()->SetObjImpl( this ) ;
+ myStreamMacroNode->SetObjRef( SUPERV::CNode::_duplicate( SUPERV::CNode::_narrow( obj ) ) ) ;
+ char * aMacroNodeName = myStreamGraph->Name() ;
+ GraphBase::ListOfFuncName aFuncName ;
+ aFuncName.resize( 1 ) ;
+ aFuncName[0] = "" ;
+ SUPERV::ListOfStrings aListOfStrings ;
+ aListOfStrings.length( 1 ) ;
+ aListOfStrings[0] = "" ;
+ GraphBase::ListOfPythonFunctions aPythonFunction ;
+ aPythonFunction.resize( 1 ) ;
+ aPythonFunction[0] = &aListOfStrings ;
+ SALOME_ModuleCatalog::Service * aMacroNodeService = myStreamGraph->Service() ;
+ GraphEditor::InNode * aDataFlowNode = DataFlowEditor()->AddNode( *aMacroNodeService , "" , "" ,
+ aMacroNodeName , SUPERV::StreamMacroNode ,
+ aFuncName , aPythonFunction ) ;
+ myStreamMacroNode->DataFlowNode( aDataFlowNode ) ;
+ myStreamGraph->MacroObject( SUPERV::StreamGraph::_duplicate( macroiobject ) ) ;
+ myStreamMacroNode->MacroObject( SUPERV::StreamGraph::_duplicate( streamiobject ) ) ;
+ MESSAGE( "DataFlowNode Graph " << this << " DataFlowEditor " << DataFlowEditor() << " aDataFlowNode "
+ << aDataFlowNode << " " << aDataFlowNode->Name()
+ << " created" ) ;
+ }
+ else {
+ delete aDataFlowEditor ;
+ }
+#endif
+ endService( "StreamGraph_Impl::StreamMNode" );
+ return SUPERV::StreamGraph::_duplicate( macroiobject ) ;
+}
+
+SUPERV::StreamGraph_ptr StreamGraph_Impl::StreamGraphMNode( SUPERV::StreamGraph_ptr myMacroStreamGraph ) {
+ SUPERV::StreamGraph_var iobject = myMacroStreamGraph ;
+// GraphBase::Graph * myMacroGraph = aGraph;
+ SUPERV::StreamGraph_var macroiobject = SUPERV::StreamGraph::_nil() ;
+ beginService( "StreamGraph_Impl::StreamGraphMNode" ) ;
+ endService( "StreamGraph_Impl::StreamGraphMNode" ) ;
+ return SUPERV::StreamGraph::_duplicate( macroiobject ) ;
+}
+
SUPERV::StreamLink_ptr StreamGraph_Impl::StreamLink( SUPERV::StreamPort_ptr OutStreamPort ,
SUPERV::StreamPort_ptr InStreamPort ) {
beginService( "StreamGraph_Impl::StreamLink" );
SUPERV::StreamLink_var iobject = SUPERV::StreamLink::_nil() ;
- if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() &&
+ if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() && !IsMacro() &&
OutStreamPort->IsDataStream() && InStreamPort->IsDataStream() ) {
GraphBase::InPort * anInPort = DataFlowEditor()->GetNode( InStreamPort->Node()->Name() )->ComputingNode()->GetChangeInPort( InStreamPort->Name() ) ;
GraphBase::OutPort * anOutPort = DataFlowEditor()->GetNode( OutStreamPort->Node()->Name() )->ComputingNode()->GetChangeOutPort( OutStreamPort->Name() ) ;
const char * anInputParam ) {
bool begin = true ;
SUPERV::ListOfStreamLinks_var RetVal = new SUPERV::ListOfStreamLinks ;
- int i , j , countlink ;
- countlink = 0 ;
- for ( i = 0 ; i < DataFlowEditor()->Graph()->GraphNodesSize() ; i++ ) {
- GraphEditor::InNode * aNode = NULL ;
- aNode = (GraphEditor::InNode * ) DataFlowEditor()->Graph()->GraphNodes( i )->GetInNode() ;
- bool ToProcess = false ;
- if ( theNode == NULL ) {
- ToProcess = true ;
- }
- else {
- if ( !strcmp( theNode->Name() , aNode->Name() ) ) {
- if ( !theNode->IsEndSwitchNode() ) {
+ if ( !IsMacro() ) {
+ int i , j , countlink ;
+ countlink = 0 ;
+ for ( i = 0 ; i < DataFlowEditor()->Graph()->GraphNodesSize() ; i++ ) {
+ GraphEditor::InNode * aNode = NULL ;
+ aNode = (GraphEditor::InNode * ) DataFlowEditor()->Graph()->GraphNodes( i )->GetInNode() ;
+ bool ToProcess = false ;
+ if ( theNode == NULL ) {
+ ToProcess = true ;
+ }
+ else {
+ if ( !strcmp( theNode->Name() , aNode->Name() ) ) {
+ if ( !theNode->IsEndSwitchNode() ) {
+ ToProcess = true ;
+ }
+ }
+ else if ( theNode->IsEndSwitchNode() ) {
ToProcess = true ;
- }
+ }
}
- else if ( theNode->IsEndSwitchNode() ) {
- ToProcess = true ;
+ if ( ToProcess ) {
+ for ( j = 0 ; j < aNode->GetNodeInPortsSize() ; j++ ) {
+ GraphBase::InPort * anInPort = NULL ;
+ anInPort = aNode->GetChangeNodeInPort( j ) ;
+ if ( anInputParam == NULL ||
+ !strcmp( anInPort->PortName() , anInputParam ) ) {
+ GraphBase::OutPort * anOutPort = NULL ;
+ anOutPort = anInPort->GetOutPort() ;
+ if ( anOutPort && anOutPort->IsDataStream() ) {
+ if ( strcmp( anOutPort->NodeName() , Name() ) ) {
+ MESSAGE("StreamGraph_Impl::StreamLinks " << anOutPort->NodeName() << "("
+ << anOutPort->PortName() << ") --> " << aNode->Name() << "("
+ << anInPort->PortName() << ")" ) ;
+ if ( theNode == NULL ||
+ ( theNode != NULL && !theNode->IsEndSwitchNode() &&
+ !strcmp( theNode->Name() , aNode->Name() ) ) ) {
+ if ( anInPort->IsLoop() || anOutPort->IsLoop() ||
+ ( aNode->IsEndLoopNode() && !strcmp( aNode->CoupledNode()->Name() ,
+ anOutPort->NodeName() ) ) ) {
+ MESSAGE( "StreamLink " << anOutPort->NodeName() << "("
+ << anOutPort->PortName() << ") --> " << aNode->Name() << "("
+ << anInPort->PortName() << ")" << " ignored" ) ;
+ }
+ else if ( CORBA::is_nil( anOutPort->InPortObjRef( anInPort ) ) ) {
+ if ( begin ) {
+ beginService( "StreamGraph_Impl::StreamLinks" );
+ begin = false ;
+ }
+ GraphEditor::InNode * anOutNode = NULL ;
+ anOutNode = (GraphEditor::InNode * ) DataFlowEditor()->Graph()->GetChangeGraphNode( anOutPort->NodeName() )->GetInNode() ;
+ if ( anOutNode ) {
+ bool Success ;
+ StreamLink_Impl * myStreamLink = new StreamLink_Impl(
+ _Orb , _Poa , _ContId ,
+ instanceName() , interfaceName() ,
+ DataFlowEditor() ,
+ aNode ,
+ anInPort->PortName() ,
+ anOutNode ,
+ anOutPort->PortName() ,
+ false , Success ) ;
+ if ( Success ) {
+ PortableServer::ObjectId * id = myStreamLink->getId() ;
+ CORBA::Object_var obj = _poa->id_to_reference(*id);
+ SUPERV::StreamLink_var iobject ;
+ iobject = SUPERV::StreamLink::_narrow(obj) ;
+ RetVal->length( countlink + 1 ) ;
+ RetVal[ countlink++ ] = SUPERV::StreamLink::_duplicate( iobject ) ;
+ anOutPort->AddInPortObjRef( anInPort , SUPERV::StreamLink::_duplicate( iobject ) ) ;
+ MESSAGE( "Link" << countlink-1 << " "
+ << RetVal[countlink-1]->OutStreamPort()->Node()->Name() << "("
+ << RetVal[countlink-1]->OutStreamPort()->Name() << ") --> "
+ << RetVal[countlink-1]->InStreamPort()->Node()->Name() << "("
+ << RetVal[countlink-1]->InStreamPort()->Name() << ")" ) ;
+ }
+ }
+ }
+ else {
+ RetVal->length( countlink + 1 ) ;
+ RetVal[ countlink++ ] = SUPERV::StreamLink::_duplicate( SUPERV::StreamLink::_narrow( anOutPort->InPortObjRef( anInPort ) ) ) ;
+ MESSAGE( "Link" << countlink-1 << " "
+ << RetVal[countlink-1]->OutStreamPort()->Node()->Name() << "("
+ << RetVal[countlink-1]->OutStreamPort()->Name() << ") --> "
+ << RetVal[countlink-1]->InStreamPort()->Node()->Name() << "("
+ << RetVal[countlink-1]->InStreamPort()->Name() << ")" ) ;
+ }
+ }
+ }
+ }
+ }
+ }
}
- }
- if ( ToProcess ) {
- for ( j = 0 ; j < aNode->GetNodeInPortsSize() ; j++ ) {
- GraphBase::InPort * anInPort = NULL ;
- anInPort = aNode->GetChangeNodeInPort( j ) ;
- if ( anInputParam == NULL ||
- !strcmp( anInPort->PortName() , anInputParam ) ) {
- GraphBase::OutPort * anOutPort = NULL ;
- anOutPort = anInPort->GetOutPort() ;
- if ( anOutPort && anOutPort->IsDataStream() ) {
- if ( strcmp( anOutPort->NodeName() , Name() ) ) {
- MESSAGE("StreamGraph_Impl::StreamLinks " << anOutPort->NodeName() << "("
- << anOutPort->PortName() << ") --> " << aNode->Name() << "("
- << anInPort->PortName() << ")" ) ;
- if ( theNode == NULL ||
- ( theNode != NULL && !theNode->IsEndSwitchNode() &&
- !strcmp( theNode->Name() , aNode->Name() ) ) ) {
- if ( anInPort->IsLoop() || anOutPort->IsLoop() ||
- ( aNode->IsEndLoopNode() && !strcmp( aNode->CoupledNode()->Name() ,
- anOutPort->NodeName() ) ) ) {
+ for ( j = 0 ; j < aNode->GetNodeOutPortsSize() ; j++ ) {
+ GraphBase::OutPort * anOutPort = aNode->GetChangeNodeOutPort( j ) ;
+ int k ;
+ for ( k = 0 ; k < anOutPort->InPortsSize() ; k++ ) {
+ GraphBase::InPort * anInPort = anOutPort->ChangeInPorts( k ) ;
+ GraphEditor::InNode * toNode = (GraphEditor::InNode * ) DataFlowEditor()->Graph()->GetChangeGraphNode( anInPort->NodeName() )->GetInNode() ;
+ if ( theNode == NULL ||
+ !strcmp( theNode->Name() , aNode->Name() ) ) {
+ if ( anInPort->IsDataStream() ) {
+ if ( theNode || ( toNode->IsEndSwitchNode() && !aNode->IsSwitchNode() ) ) {
+ if ( anInputParam == NULL ||
+ !strcmp( anInPort->PortName() , anInputParam ) ) {
MESSAGE( "StreamLink " << anOutPort->NodeName() << "("
- << anOutPort->PortName() << ") --> " << aNode->Name() << "("
- << anInPort->PortName() << ")" << " ignored" ) ;
- }
- else if ( CORBA::is_nil( anOutPort->InPortObjRef( anInPort ) ) ) {
- if ( begin ) {
- beginService( "StreamGraph_Impl::StreamLinks" );
- begin = false ;
- }
- GraphEditor::InNode * anOutNode = NULL ;
- anOutNode = (GraphEditor::InNode * ) DataFlowEditor()->Graph()->GetChangeGraphNode( anOutPort->NodeName() )->GetInNode() ;
- if ( anOutNode ) {
+ << anOutPort->PortName() << ") --> " << toNode->Name() << "("
+ << anInPort->PortName() << ")" ) ;
+ MESSAGE( " IOR " << DataFlowEditor()->ObjectToString( anOutPort->InPortObjRef( anInPort ) ) ) ;
+ if ( anInPort->IsLoop() || anOutPort->IsLoop() ||
+ ( toNode->IsEndLoopNode() && !strcmp( toNode->CoupledNode()->Name() ,
+ anOutPort->NodeName() ) ) ) {
+ MESSAGE( "StreamLink " << anOutPort->NodeName() << "("
+ << anOutPort->PortName() << ") --> " << toNode->Name() << "("
+ << anInPort->PortName() << ")" << " ignored" ) ;
+ }
+ else if ( CORBA::is_nil( anOutPort->InPortObjRef( anInPort ) ) ) {
+ if ( begin ) {
+ beginService( "Graph_Impl::StreamLinks" );
+ begin = false ;
+ }
bool Success ;
StreamLink_Impl * myStreamLink = new StreamLink_Impl(
_Orb , _Poa , _ContId ,
instanceName() , interfaceName() ,
DataFlowEditor() ,
- aNode ,
+ toNode ,
anInPort->PortName() ,
- anOutNode ,
+ aNode ,
anOutPort->PortName() ,
false , Success ) ;
if ( Success ) {
<< RetVal[countlink-1]->InStreamPort()->Name() << ")" ) ;
}
}
- }
- else {
- RetVal->length( countlink + 1 ) ;
- RetVal[ countlink++ ] = SUPERV::StreamLink::_duplicate( SUPERV::StreamLink::_narrow( anOutPort->InPortObjRef( anInPort ) ) ) ;
- MESSAGE( "Link" << countlink-1 << " "
- << RetVal[countlink-1]->OutStreamPort()->Node()->Name() << "("
- << RetVal[countlink-1]->OutStreamPort()->Name() << ") --> "
- << RetVal[countlink-1]->InStreamPort()->Node()->Name() << "("
- << RetVal[countlink-1]->InStreamPort()->Name() << ")" ) ;
- }
- }
- }
- }
- }
- }
- }
- for ( j = 0 ; j < aNode->GetNodeOutPortsSize() ; j++ ) {
- GraphBase::OutPort * anOutPort = aNode->GetChangeNodeOutPort( j ) ;
- int k ;
- for ( k = 0 ; k < anOutPort->InPortsSize() ; k++ ) {
- GraphBase::InPort * anInPort = anOutPort->ChangeInPorts( k ) ;
- GraphEditor::InNode * toNode = (GraphEditor::InNode * ) DataFlowEditor()->Graph()->GetChangeGraphNode( anInPort->NodeName() )->GetInNode() ;
- if ( theNode == NULL ||
- !strcmp( theNode->Name() , aNode->Name() ) ) {
- if ( anInPort->IsDataStream() ) {
- if ( theNode || ( toNode->IsEndSwitchNode() && !aNode->IsSwitchNode() ) ) {
- if ( anInputParam == NULL ||
- !strcmp( anInPort->PortName() , anInputParam ) ) {
- MESSAGE( "StreamLink " << anOutPort->NodeName() << "("
- << anOutPort->PortName() << ") --> " << toNode->Name() << "("
- << anInPort->PortName() << ")" ) ;
- MESSAGE( " IOR " << DataFlowEditor()->ObjectToString( anOutPort->InPortObjRef( anInPort ) ) ) ;
- if ( anInPort->IsLoop() || anOutPort->IsLoop() ||
- ( toNode->IsEndLoopNode() && !strcmp( toNode->CoupledNode()->Name() ,
- anOutPort->NodeName() ) ) ) {
- MESSAGE( "StreamLink " << anOutPort->NodeName() << "("
- << anOutPort->PortName() << ") --> " << toNode->Name() << "("
- << anInPort->PortName() << ")" << " ignored" ) ;
- }
- else if ( CORBA::is_nil( anOutPort->InPortObjRef( anInPort ) ) ) {
- if ( begin ) {
- beginService( "Graph_Impl::StreamLinks" );
- begin = false ;
- }
- bool Success ;
- StreamLink_Impl * myStreamLink = new StreamLink_Impl(
- _Orb , _Poa , _ContId ,
- instanceName() , interfaceName() ,
- DataFlowEditor() ,
- toNode ,
- anInPort->PortName() ,
- aNode ,
- anOutPort->PortName() ,
- false , Success ) ;
- if ( Success ) {
- PortableServer::ObjectId * id = myStreamLink->getId() ;
- CORBA::Object_var obj = _poa->id_to_reference(*id);
- SUPERV::StreamLink_var iobject ;
- iobject = SUPERV::StreamLink::_narrow(obj) ;
+ else {
RetVal->length( countlink + 1 ) ;
- RetVal[ countlink++ ] = SUPERV::StreamLink::_duplicate( iobject ) ;
- anOutPort->AddInPortObjRef( anInPort , SUPERV::StreamLink::_duplicate( iobject ) ) ;
+ RetVal[ countlink++ ] = SUPERV::StreamLink::_duplicate( SUPERV::StreamLink::_narrow( anOutPort->InPortObjRef( anInPort ) ) ) ;
MESSAGE( "Link" << countlink-1 << " "
<< RetVal[countlink-1]->OutStreamPort()->Node()->Name() << "("
<< RetVal[countlink-1]->OutStreamPort()->Name() << ") --> "
<< RetVal[countlink-1]->InStreamPort()->Node()->Name() << "("
<< RetVal[countlink-1]->InStreamPort()->Name() << ")" ) ;
- }
+ }
}
else {
- RetVal->length( countlink + 1 ) ;
- RetVal[ countlink++ ] = SUPERV::StreamLink::_duplicate( SUPERV::StreamLink::_narrow( anOutPort->InPortObjRef( anInPort ) ) ) ;
- MESSAGE( "Link" << countlink-1 << " "
- << RetVal[countlink-1]->OutStreamPort()->Node()->Name() << "("
- << RetVal[countlink-1]->OutStreamPort()->Name() << ") --> "
- << RetVal[countlink-1]->InStreamPort()->Node()->Name() << "("
- << RetVal[countlink-1]->InStreamPort()->Name() << ")" ) ;
+ MESSAGE( "StreamLink " << anOutPort->NodeName() << "("
+ << anOutPort->PortName() << ") --> " << toNode->Name() << "("
+ << anInPort->PortName() << ")" << " skipped" ) ;
}
}
- else {
- MESSAGE( "StreamLink " << anOutPort->NodeName() << "("
- << anOutPort->PortName() << ") --> " << toNode->Name() << "("
- << anInPort->PortName() << ")" << " skipped" ) ;
- }
}
}
- }
+ }
}
}
- }
//#if 0
- const char * NodeName = "" ;
- const char * InputParamName = "" ;
- if ( theNode ) {
- NodeName = theNode->Name() ;
- }
- if ( anInputParam ) {
- InputParamName = anInputParam ;
- }
- MESSAGE( RetVal->length() << " StreamLinks of Node " << NodeName << " and of InPort " << InputParamName ) ;
- for ( i = 0 ; i < (int ) RetVal->length() ; i++ ) {
- MESSAGE( "Link" << i << " " << RetVal[i]->OutStreamPort()->Node()->Name() << "("
- << RetVal[i]->OutStreamPort()->Name() << ") --> "
- << RetVal[i]->InStreamPort()->Node()->Name() << "("
- << RetVal[i]->InStreamPort()->Name() << ")" ) ;
- }
+ const char * NodeName = "" ;
+ const char * InputParamName = "" ;
+ if ( theNode ) {
+ NodeName = theNode->Name() ;
+ }
+ if ( anInputParam ) {
+ InputParamName = anInputParam ;
+ }
+ MESSAGE( RetVal->length() << " StreamLinks of Node " << NodeName << " and of InPort " << InputParamName ) ;
+ for ( i = 0 ; i < (int ) RetVal->length() ; i++ ) {
+ MESSAGE( "Link" << i << " " << RetVal[i]->OutStreamPort()->Node()->Name() << "("
+ << RetVal[i]->OutStreamPort()->Name() << ") --> "
+ << RetVal[i]->InStreamPort()->Node()->Name() << "("
+ << RetVal[i]->InStreamPort()->Name() << ")" ) ;
+ }
//#endif
- if ( !begin ) {
- endService( "StreamGraph_Impl::StreamLinks" );
+ if ( !begin ) {
+ endService( "StreamGraph_Impl::StreamLinks" );
+ }
}
return ( RetVal._retn() ) ;
}
bool StreamGraph_Impl::SetStreamParams( const long Timeout ,
const SUPERV::KindOfDataStreamTrace DataStreamTrace ,
const double DeltaTime ) {
- bool sts = DataFlowEditor()->StreamGraph()->SetStreamParams( Timeout , DataStreamTrace , DeltaTime ) ;
- if ( sts ) {
- DataFlowEditor()->UnValid() ;
+ bool sts = false ;
+ if ( !IsMacro() ) {
+ sts = DataFlowEditor()->StreamGraph()->SetStreamParams( Timeout , DataStreamTrace , DeltaTime ) ;
+ if ( sts ) {
+ DataFlowEditor()->UnValid() ;
+ }
}
return sts ;
}
void StreamGraph_Impl::StreamParams( long & Timeout ,
SUPERV::KindOfDataStreamTrace & DataStreamTrace ,
double & DeltaTime ) {
- DataFlowEditor()->StreamGraph()->StreamParams( Timeout , DataStreamTrace , DeltaTime ) ;
+ if ( !IsMacro() ) {
+ DataFlowEditor()->StreamGraph()->StreamParams( Timeout , DataStreamTrace , DeltaTime ) ;
+ }
}
long StreamGraph_Impl::SubStreamGraphsNumber() {
// beginService( "StreamGraph_Impl::StreamGraphsNumber" );
long RetVal = 0 ;
- if ( DataFlowEditor()->IsExecutable() ) {
+ if ( DataFlowEditor()->IsExecutable() && !IsMacro() ) {
RetVal = DataFlowEditor()->SubStreamGraphsNumber() ;
}
// endService( "StreamGraph_Impl::SubStreamGraphsNumber" );
SUPERV::ListOfNodes * StreamGraph_Impl::SubStreamGraphsNodes( const long aSubStreamGraphNumber ) {
beginService( "StreamGraph_Impl::SubStreamGraphsNodes" );
SUPERV::ListOfNodes_var RetVal = new SUPERV::ListOfNodes ;
- if ( DataFlowEditor()->IsEditing() ) {
+ if ( DataFlowEditor()->IsEditing() && !IsMacro() ) {
SUPERV::ListOfNodes * aGraphNodes = Nodes() ;
int i ;
// ComputingNodes
SUPERV::Graph_ptr StreamGraph_Impl::ToFlowGraph() {
SUPERV::Graph_var iobject = SUPERV::Graph::_nil() ;
beginService( "StreamGraph_Impl::ToFlowGraph" );
-// Graph_Impl * myFlowGraph = new Graph_Impl( _Orb , _Poa , _ContId ,
-// instanceName() , interfaceName() ) ;
-// PortableServer::ObjectId * id = myFlowGraph->getId() ;
-// CORBA::Object_var obj = _poa->id_to_reference(*id);
- if ( !CORBA::is_nil( DataFlowEditor()->StreamGraph()->ObjRef() ) ) {
- iobject = SUPERV::Graph::_narrow( DataFlowEditor()->StreamGraph()->ObjRef() ) ;
+ if ( !IsMacro() ) {
+// Graph_Impl * myFlowGraph = new Graph_Impl( _Orb , _Poa , _ContId ,
+// instanceName() , interfaceName() ) ;
+// PortableServer::ObjectId * id = myFlowGraph->getId() ;
+// CORBA::Object_var obj = _poa->id_to_reference(*id);
+ if ( !CORBA::is_nil( DataFlowEditor()->StreamGraph()->ObjRef() ) ) {
+ iobject = SUPERV::Graph::_narrow( DataFlowEditor()->StreamGraph()->ObjRef() ) ;
+ }
}
endService( "StreamGraph_Impl::ToFlowGraph" );
return SUPERV::Graph::_duplicate( iobject ) ;
bool StreamGraph_Impl::StreamMerge(const SUPERV::StreamGraph_ptr aStreamGraph ) {
beginService( "StreamGraph_Impl::StreamMerge" );
- map< string , int > aMapOfNodes ;
- bool RetVal = Merge( aStreamGraph , aMapOfNodes ) ;
- if ( RetVal ) {
- SUPERV::ListOfStreamLinks * aGraphLinks = aStreamGraph->GStreamLinks() ;
- SUPERV::ListOfStreamPorts * aGraphPorts = aStreamGraph->StreamPorts() ;
- cout << "Graph_Impl::Merge " << aGraphLinks->length() << " links " << aGraphPorts->length() << " GraphPorts"
- << endl ;
- int i ;
- for ( i = 0 ; i < (int ) aGraphLinks->length() ; i++ ) {
- SUPERV::StreamLink_var aLink = (*aGraphLinks)[ i ] ;
- SUPERV::StreamPort_var OutPort = aLink->OutStreamPort() ;
- SUPERV::StreamPort_var InPort = aLink->InStreamPort() ;
- string * aLinkFromNodeName = new string( OutPort->Node()->Name() ) ;
- string * aLinkToNodeName = new string( InPort->Node()->Name() ) ;
- cout << "Graph_Impl::Merge " << aLinkFromNodeName << "(" << OutPort->Name() << ") ---> "
- << aLinkToNodeName << "(" << InPort->Name() << ")" << endl ;
- RetVal = DataFlowEditor()->AddLink( DataFlowEditor()->Graph()->GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] )->Name() ,
- OutPort->Name() ,
- DataFlowEditor()->Graph()->GetGraphNode( aMapOfNodes[ aLinkToNodeName->c_str() ] )->Name() ,
- InPort->Name() ) ;
- cout << "Graph_Impl::Merge " << aLinkFromNodeName << "(" << OutPort->Name() << ") ---> "
- << aLinkToNodeName << "(" << InPort->Name() << ") RetVal" << RetVal << endl ;
- if ( RetVal ) {
- int j ;
- for ( j = 1 ; j <= aLink->CoordsSize() ; j++ ) {
- long X , Y ;
- RetVal = aLink->Coords( j , X , Y ) ;
- if ( !RetVal )
- break ;
- RetVal = DataFlowEditor()->AddLinkCoord( DataFlowEditor()->Graph()->GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] )->Name() ,
- OutPort->Name() ,
- DataFlowEditor()->Graph()->GetGraphNode( aMapOfNodes[ aLinkToNodeName->c_str() ] )->Name() ,
- InPort->Name() ,
- j , X , Y ) ;
- if ( !RetVal ) {
- break ;
- }
- }
- }
- delete aLinkFromNodeName ;
- delete aLinkToNodeName ;
- if ( !RetVal ) {
- break ;
- }
- }
+ bool RetVal = false ;
+ if ( !IsMacro() ) {
+ map< string , int > aMapOfNodes ;
+ RetVal = Merge( aStreamGraph , aMapOfNodes ) ;
if ( RetVal ) {
- for ( i = 0 ; i < (int ) aGraphPorts->length() ; i++ ) {
- SUPERV::StreamPort_var aPort = (*aGraphPorts)[ i ] ;
- if ( !aPort->IsGate() ) {
- MESSAGE( "Graph_Impl::Merge " << i << ". " << aPort->Node()->Name() << " " << aPort->Name() ) ;
- char * aPortName = aPort->Name() ;
- char * aNodeName = new char[ strlen( aPortName ) + 1 ] ;
- strcpy( aNodeName , aPortName ) ;
- char * thePortName = strchr( aNodeName , '\\' ) ;
- thePortName[ 0 ] = '\0' ;
- bool hasinput = aStreamGraph->Node( aNodeName )->Port( thePortName + 1 )->HasInput() ;
-// cout << "Graph_Impl::Merge " << " aNodeName " << aNodeName << " aPort " << thePortName + 1
-// << " HasInput " << hasinput << endl ;
- if ( hasinput ) {
- RetVal = DataFlowEditor()->AddInputData( DataFlowEditor()->StreamGraph()->GetGraphNode( aMapOfNodes[ aNodeName ] )->Name() ,
- thePortName + 1 ,
- *(aPort->ToAny()) ) ;
- }
- delete [] aNodeName ;
- if ( !RetVal ) {
- break ;
+ SUPERV::ListOfStreamLinks * aGraphLinks = aStreamGraph->GStreamLinks() ;
+ SUPERV::ListOfStreamPorts * aGraphPorts = aStreamGraph->StreamPorts() ;
+ //cout << "Graph_Impl::StreamMerge " << aGraphLinks->length() << " links " << aGraphPorts->length()
+// << " GraphPorts" << endl ;
+ int i ;
+ for ( i = 0 ; i < (int ) aGraphLinks->length() ; i++ ) {
+ SUPERV::StreamLink_var aLink = (*aGraphLinks)[ i ] ;
+ SUPERV::StreamPort_var OutPort = aLink->OutStreamPort() ;
+ SUPERV::StreamPort_var InPort = aLink->InStreamPort() ;
+ string * aLinkFromNodeName = new string( OutPort->Node()->Name() ) ;
+ string * aLinkToNodeName = new string( InPort->Node()->Name() ) ;
+ //cout << "Graph_Impl::StreamMerge " << aLinkFromNodeName << "(" << OutPort->Name() << ") ---> "
+// << aLinkToNodeName << "(" << InPort->Name() << ")" << endl ;
+ RetVal = DataFlowEditor()->AddLink( DataFlowEditor()->Graph()->GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] )->Name() ,
+ OutPort->Name() ,
+ DataFlowEditor()->Graph()->GetGraphNode( aMapOfNodes[ aLinkToNodeName->c_str() ] )->Name() ,
+ InPort->Name() ) ;
+ //cout << "Graph_Impl::StreamMerge " << aLinkFromNodeName << "(" << OutPort->Name() << ") ---> "
+// << aLinkToNodeName << "(" << InPort->Name() << ") RetVal" << RetVal << endl ;
+ if ( RetVal ) {
+ int j ;
+ for ( j = 1 ; j <= aLink->CoordsSize() ; j++ ) {
+ long X , Y ;
+ RetVal = aLink->Coords( j , X , Y ) ;
+ if ( !RetVal )
+ break ;
+ RetVal = DataFlowEditor()->AddLinkCoord( DataFlowEditor()->Graph()->GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] )->Name() ,
+ OutPort->Name() ,
+ DataFlowEditor()->Graph()->GetGraphNode( aMapOfNodes[ aLinkToNodeName->c_str() ] )->Name() ,
+ InPort->Name() ,
+ j , X , Y ) ;
+ if ( !RetVal ) {
+ break ;
+ }
}
- }
+ }
+ delete aLinkFromNodeName ;
+ delete aLinkToNodeName ;
+ if ( !RetVal ) {
+ break ;
+ }
+ }
+ if ( RetVal ) {
+ for ( i = 0 ; i < (int ) aGraphPorts->length() ; i++ ) {
+ SUPERV::StreamPort_var aPort = (*aGraphPorts)[ i ] ;
+ if ( !aPort->IsGate() ) {
+ MESSAGE( "Graph_Impl::StreamMerge " << i << ". " << aPort->Node()->Name() << " " << aPort->Name() ) ;
+ char * aPortName = aPort->Name() ;
+ char * aNodeName = new char[ strlen( aPortName ) + 1 ] ;
+ strcpy( aNodeName , aPortName ) ;
+// char * thePortName = strchr( aNodeName , '\\' ) ;
+ char * thePortName = strchr( aNodeName , '_' ) ;
+ thePortName[ 0 ] = '\0' ;
+ bool hasinput = aStreamGraph->Node( aNodeName )->Port( thePortName + 1 )->HasInput() ;
+// cout << "Graph_Impl::StreamMerge " << " aNodeName " << aNodeName << " aPort " << thePortName + 1
+// << " HasInput " << hasinput << endl ;
+ if ( hasinput ) {
+ RetVal = DataFlowEditor()->AddInputData( DataFlowEditor()->StreamGraph()->GetGraphNode( aMapOfNodes[ aNodeName ] )->Name() ,
+ thePortName + 1 ,
+ *(aPort->ToAny()) ) ;
+ }
+ delete [] aNodeName ;
+ if ( !RetVal ) {
+ break ;
+ }
+ }
+ }
}
}
}
#include "Graph_Impl.hxx"
-class StreamGraph_Impl : public Graph_Impl ,
- public POA_SUPERV::StreamGraph {
+class StreamGraph_Impl : public POA_SUPERV::StreamGraph ,
+ public Graph_Impl {
private:
CORBA::ORB_ptr _Orb ;
PortableServer::ObjectId * contId ,
const char *instanceName ,
const char *interfaceName ,
- const char *aDataFlowName ) ;
+ const char *aDataFlowName ,
+ const SUPERV::KindOfNode aKindOfGraphNode = SUPERV::DataStreamGraph ) ;
+ StreamGraph_Impl( CORBA::ORB_ptr orb ,
+ PortableServer::POA_ptr poa ,
+ PortableServer::ObjectId * contId ,
+ const char *instanceName ,
+ const char *interfaceName ,
+ GraphEditor::DataFlow * DataFlowEditor ,
+ GraphEditor::InNode * DataFlowNode ) ;
+
+ virtual ~StreamGraph_Impl() ;
+ virtual void destroy() ;
- virtual ~StreamGraph_Impl() ;
- virtual void destroy() ;
+ virtual SUPERV::StreamGraph_ptr StreamCopy() ;
- virtual SUPERV::StreamGraph_ptr StreamCopy() ;
+ virtual SUPERV::StreamGraph_ptr StreamMNode( const char * aXmlFileName ) ;
+ virtual SUPERV::StreamGraph_ptr StreamGraphMNode( SUPERV::StreamGraph_ptr aStreamGraph ) ;
- virtual SUPERV::StreamLink_ptr StreamLink( SUPERV::StreamPort_ptr OutStreamPort ,
- SUPERV::StreamPort_ptr InStreamPort ) ;
+ virtual SUPERV::StreamLink_ptr StreamLink( SUPERV::StreamPort_ptr OutStreamPort ,
+ SUPERV::StreamPort_ptr InStreamPort ) ;
- virtual SUPERV::ListOfStreamLinks * GStreamLinks() ;
+ virtual SUPERV::ListOfStreamLinks * GStreamLinks() ;
- virtual SUPERV::ListOfStreamLinks * StreamLinks( GraphBase::ComputingNode * aNode ,
- const char * anInputParam ) ;
+ virtual SUPERV::ListOfStreamLinks * StreamLinks( GraphBase::ComputingNode * aNode ,
+ const char * anInputParam ) ;
- virtual bool SetStreamParams( const long Timeout ,
- const SUPERV::KindOfDataStreamTrace DataStreamTrace ,
- const double DeltaTime ) ;
- virtual void StreamParams( long & Timeout ,
- SUPERV::KindOfDataStreamTrace & DataStreamTrace ,
- double & DeltaTime ) ;
+ virtual bool SetStreamParams( const long Timeout ,
+ const SUPERV::KindOfDataStreamTrace DataStreamTrace ,
+ const double DeltaTime ) ;
+ virtual void StreamParams( long & Timeout ,
+ SUPERV::KindOfDataStreamTrace & DataStreamTrace ,
+ double & DeltaTime ) ;
- virtual long SubStreamGraphsNumber() ;
- virtual SUPERV::ListOfNodes * SubStreamGraphsNodes( const long aSubStreamGraphNumber ) ;
+ virtual long SubStreamGraphsNumber() ;
+ virtual SUPERV::ListOfNodes * SubStreamGraphsNodes( const long aSubStreamGraphNumber ) ;
- virtual SUPERV::Graph_ptr ToFlowGraph() ;
+ virtual SUPERV::Graph_ptr ToFlowGraph() ;
- bool StreamMerge( const SUPERV::StreamGraph_ptr aStreamGraph ) ;
+ bool StreamMerge( const SUPERV::StreamGraph_ptr aStreamGraph ) ;
};
return self.N.IsStreamGraph()
def IsGraph( self ):
return self.N.IsGraph()
+ def IsMacro( self ):
+ return self.N.IsMacro()
+ def IsFlowMacro( self ):
+ return self.N.IsFlowMacro()
+ def IsStreamMacro( self ):
+ return self.N.IsStreamMacro()
def IsComputing( self ):
return self.N.IsComputing()
def IsFactory( self ):
return self.N.IsSwitch()
def IsEndSwitch( self ):
return self.N.IsEndSwitch()
+ def GraphLevel( self ) :
+ return self.N.GraphLevel()
def SubGraph( self ):
return self.N.SubGraph()
def SubStreamGraph( self ):
return self.N.Control()
def ControlClear( self ):
return self.N.ControlClear()
- def AutoState( self ):
- return self.N.AutoState()
def ReadyW( self ):
return self.N.ReadyW()
def RunningW( self ):
# self.Parametername = aServicesParameter.Parametername
##########################################################
-class Graph(INode):
+class Graph(GNode):
##########################################################
def __init__( self , aName ):
try:
try:
graph = aName.G.Copy()
except:
- graph = None
+ graph = aName
if graph != None :
if graph.IsStreamGraph() :
aGraph = graph.ToStreamGraph()
if self.G.Verbose :
print ErrMsg
return aNode
+ def MNode( self , aGraphXml ):
+ aMNode = self.G.MNode( aGraphXml )
+ if aMNode != None :
+ myMNode = MNode( aMNode , self.G.Verbose )
+ return myMNode
+ ErrMsg = "Failed to create a MNode"
+ if self.G.Verbose :
+ print ErrMsg
+ return aMNode
+ def GraphMNode( self , aGraph ):
+ aGraphMNode = self.G.GraphMNode( aGraph.G )
+ if aGraphMNode != None :
+ myMNode = MNode( aGraphMNode , self.G.Verbose )
+ return myMNode
+ ErrMsg = "Failed to create a MNode"
+ if self.G.Verbose :
+ print ErrMsg
+ return aGraphMNode
+ def FlowObjRef( self ) :
+ aGraph = self.G.FlowObjRef()
+ if aGraph != None :
+ myGraph = Graph( aGraph )
+ return myGraph
+ return aGraph
+ def StreamObjRef( self ) :
+ aGraph = self.G.StreamObjRef()
+ if aGraph != None :
+ myGraph = StreamGraph( aGraph )
+ return myGraph
+ return aGraph
def PrintService( self , aComponent , anInterface , aService ):
NodeComponent = modulecatalog.GetComponent( aComponent )
aService = NodeComponent.GetService( anInterface , aService )
pynodes.append( GNode( nodes.ESNodes[i] , self.G.Verbose ) )
i = i + 1
j = j + 1
+ n = len( nodes.Graphs )
+ i = 0
+ while i < n :
+ pynodes.append( MNode( nodes.Graphs[i] , self.G.Verbose ) )
+ i = i + 1
+ j = j + 1
return pynodes
def ListNodes( self , *args ):
nodes = self.Nodes()
nodes = self.Nodes()
i = 0
while i < len( nodes ) :
- print nodes[i].Name(),nodes[i].Thread(),nodes[i].State(),nodes[i].Control(),nodes[i].AutoState()
+ print nodes[i].Name(),nodes[i].Thread(),nodes[i].State(),nodes[i].Control(),nodes[i]
i = i + 1
def GLinks( self ):
links = self.G.GLinks()
while i < len( links ) :
links[ i ].Print()
i = i + 1
- def Graphs( self ):
- graphs = self.G.Graphs()
+ def SubGraphsNodes( self , ):
+ graphs = self.G.SubGraphsNodes()
outgraphs = graphs
i = 0
while i < len( graphs ) :
return StreamGraphE( aGraph )
return None
+##########################################################
+class MNode(Graph):
+##########################################################
+ def __init__( self , aMNode , Verbose ):
+ self.G = aMNode
+ self.G.Verbose = Verbose
+ self.N = aMNode
+ self.N.Verbose = Verbose
+
##########################################################
class StreamGraph(Graph):
##########################################################
if ( ParameterName != NULL ) {
_ParameterName = new char[ strlen( ParameterName ) + 1 ] ;
strcpy( _ParameterName , ParameterName ) ;
+ if ( DataFlowNode ) {
+ _NodeName = new char[ strlen( DataFlowNode->Name() ) + 1 ] ;
+ strcpy( _NodeName , DataFlowNode->Name() ) ;
+ }
+ else {
+ _NodeName = NULL ;
+ }
}
else {
_ParameterName = NULL ;
+ _NodeName = NULL ;
}
_InputValue = false ;
_Any = new CORBA::Any( *anAny ) ;
if ( ParameterName != NULL ) {
_ParameterName = new char[ strlen( ParameterName ) + 1 ] ;
strcpy( _ParameterName , ParameterName ) ;
+ if ( DataFlowNode ) {
+ _NodeName = new char[ strlen( DataFlowNode->Name() ) + 1 ] ;
+ strcpy( _NodeName , DataFlowNode->Name() ) ;
+ }
+ else {
+ _NodeName = NULL ;
+ }
}
else {
_ParameterName = NULL ;
+ _NodeName = NULL ;
}
_InputValue = false ;
_Any = new CORBA::Any() ;
GraphEditor::DataFlow * _DataFlowEditor ;
GraphEditor::InNode * _DataFlowNode ;
+ char * _NodeName ;
char * _ParameterName ;
bool _InputPort ;
bool _InputValue ;
+++ /dev/null
-// SuperVisionTest SyrComponent : example of component performing some mathinatical operations
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// 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
-//
-// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
-//
-//
-//
-// File : SyrComponent_Impl.cxx
-// Author : Jean Rahuel, CEA
-// Module : SuperVisionTest
-
-using namespace std;
-#include <stdio.h>
-#include <unistd.h>
-#include <fstream>
-#include <sstream>
-#include <string>
-
-//#include "utilities.h"
-
-#include "SyrComponent_Impl.hxx"
-#include "Adder_Impl.hxx"
-
-SyrComponent_Impl::SyrComponent_Impl( CORBA::ORB_ptr orb ,
- PortableServer::POA_ptr poa ,
- PortableServer::ObjectId * contId ,
- const char *instanceName ,
- const char *interfaceName ,
- const bool kactivate ) :
- Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,true) {
- MESSAGE("SyrComponent_Impl::SyrComponent_Impl this " << hex << this << dec
- << "activate object instanceName("
- << instanceName << ") interfaceName(" << interfaceName << ")" )
- if ( kactivate ) {
- _thisObj = this ;
- _id = _poa->activate_object(_thisObj);
- }
-}
-
-SyrComponent_Impl::SyrComponent_Impl() {
-}
-
-SyrComponent_Impl::~SyrComponent_Impl() {
-}
-
-long SyrComponent_Impl::C_ISEVEN( const long anInteger ) {
- bool RetVal ;
- beginService( " SyrComponent_Impl::C_ISEVEN" );
- sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_ISEVEN is Computing");
- int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0));
- sleep(S);
- RetVal = ( anInteger & 1 ) == 0 ;
- endService( " SyrComponent_Impl::C_ISEVEN" );
- return RetVal ;
-}
-
-long SyrComponent_Impl::C_ISONE( const long anOddInteger ) {
- bool RetVal ;
- beginService( " SyrComponent_Impl::C_ISONE" );
- sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_ISONE is Computing");
- int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0));
- sleep(S);
- RetVal = ( anOddInteger == 1 ) ;
- endService( " SyrComponent_Impl::C_ISONE" );
- return RetVal ;
-}
-
-long SyrComponent_Impl::C_M3( const long anOddInteger ) {
- beginService( " SyrComponent_Impl::C_M3" );
- sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_M3 is Computing");
- int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0));
- sleep(S);
- endService( " SyrComponent_Impl::C_M3" );
- if ( C_ISEVEN( anOddInteger ) )
- return 0 ;
- return ( 3*anOddInteger ) ;
-}
-
-long SyrComponent_Impl::C_M3P1( const long anOddInteger ) {
- beginService( " SyrComponent_Impl::C_M3P1" );
- sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_M3P1 is Computing");
- int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0));
- sleep(S);
- endService( " SyrComponent_Impl::C_M3P1" );
- if ( C_ISEVEN( anOddInteger ) )
- return 0 ;
- return ( 3*anOddInteger + 1 ) ;
-}
-
-long SyrComponent_Impl::C_DIV2( const long anEvenInteger ) {
- beginService( " SyrComponent_Impl::C_DIV2" );
- sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_DIV2 is Computing");
- int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0));
- sleep(S);
- endService( " SyrComponent_Impl::C_DIV2" );
- if ( !C_ISEVEN( anEvenInteger ) )
- return 0 ;
- return ( anEvenInteger >> 1 ) ;
-}
-
-long SyrComponent_Impl::C_INCR( const long aCount ) {
- beginService( " SyrComponent_Impl::C_INCR" );
- sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_INCR is Computing");
- int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0));
- sleep(S);
- endService( " SyrComponent_Impl::C_INCR" );
- return ( aCount + 1 ) ;
-}
-
-long SyrComponent_Impl::C_MIN( const long aMinVal , const long anInteger ) {
- beginService( " SyrComponent_Impl::C_MIN" );
- sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_MIN is Computing");
- int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0));
- sleep(S);
- int min = aMinVal ;
- if ( anInteger < min || aMinVal == 0 ) {
- min = anInteger ;
- }
- string trace = "SyrComponent_Impl::C_MIN : " ;
- char cmin[ 30 ] ;
- sprintf( cmin , "%d" , min ) ;
- trace += cmin ;
- sendMessage(NOTIF_TRACE, trace.c_str() );
- endService( " SyrComponent_Impl::C_MIN" );
- return min ;
-}
-
-long SyrComponent_Impl::C_MAX( const long aMaxVal , const long anInteger ) {
- beginService( " SyrComponent_Impl::C_MAX" );
- sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_MAX is Computing");
- int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0));
- sleep(S);
- int max = aMaxVal ;
- if ( anInteger > max ) {
- max = anInteger ;
- }
- string trace = "SyrComponent_Impl::C_MAX : " ;
- char cmax[ 30 ] ;
- sprintf( cmax , "%d" , max ) ;
- trace += cmax ;
- sendMessage(NOTIF_TRACE, trace.c_str() );
- endService( " SyrComponent_Impl::C_MAX" );
- return max ;
-}
-
-SuperVisionTest::ListOfSyr_ptr SyrComponent_Impl::C_LISTOFSYR() {
- beginService( " SyrComponent_Impl::C_LISTOFSYR" );
- sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_LISTOFSYR is Computing");
- int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0));
- sleep(S);
- ListOfSyr_Impl * aNewListOfSyr = new ListOfSyr_Impl( _orb , _poa, _contId,
- instanceName() , interfaceName() ,
- graphName() , nodeName() ) ;
- SuperVisionTest::ListOfSyr_var iobject = (SuperVisionTest::ListOfSyr_var ) NULL ;
- PortableServer::ObjectId * id = aNewListOfSyr->getId() ;
- CORBA::Object_var obj = _poa->id_to_reference(*id);
- iobject = SuperVisionTest::ListOfSyr::_narrow(obj) ;
- endService( " SyrComponent_Impl::C_LISTOFSYR" );
- return SuperVisionTest::ListOfSyr::_duplicate( iobject ) ;
-// return ( aNewListOfSyr._retn() ) ;
-}
-
-SuperVisionTest::ListOfSyr_ptr SyrComponent_Impl::C_AVERAGE(
- const SuperVisionTest::ListOfSyr_ptr aListOfSyr ,
- const long anInteger ,
- const long aCount ,
- double & anAverage ) {
- beginService( " SyrComponent_Impl::C_AVERAGE" );
- sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_AVERAGE is Computing");
- int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0));
- sleep(S);
- SuperVisionTest::SeqOfSyr * aSeqOfSyr = aListOfSyr->GetSeqOfSyr() ;
- int len = aSeqOfSyr->length() ;
- aSeqOfSyr->length( len + 1 ) ;
- (*aSeqOfSyr)[ len ] = anInteger ;
- aListOfSyr->SetSeqOfSyr( *aSeqOfSyr ) ;
- anAverage = 0 ;
- int i ;
- for ( i = 0 ; i < len + 1 ; i++ ) {
- anAverage += (*aSeqOfSyr)[ i ] ;
- }
- anAverage = anAverage / ( len + 1 ) ;
- string end = " SyrComponent_Impl::C_AVERAGE " ;
- char caverage[ 30 ] ;
- sprintf( caverage , "%fd" , anAverage ) ;
- end += caverage ;
- endService( end.c_str() );
- return SuperVisionTest::ListOfSyr::_duplicate( aListOfSyr ) ;
-}
-
-SuperVisionTest::Syr_ptr SyrComponent_Impl::Init( const long anOddInteger ) {
- beginService( "SyrComponent_Impl::Init" );
- sendMessage(NOTIF_STEP, "SyrComponent_Impl creates Syr_Impl");
- int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0));
- sleep(S);
- Syr_Impl * mySyr ;
- mySyr = new Syr_Impl( _orb , _poa, _contId,
- instanceName() , interfaceName() ,
- graphName() , nodeName() , anOddInteger ) ;
- SuperVisionTest::Syr_var iobject = (SuperVisionTest::Syr_var ) NULL ;
- PortableServer::ObjectId * id = mySyr->getId() ;
- CORBA::Object_var obj = _poa->id_to_reference(*id);
- iobject = SuperVisionTest::Syr::_narrow(obj) ;
- endService( "SyrComponent_Impl::Init" );
- return SuperVisionTest::Syr::_duplicate(iobject) ;
-}
-
-ListOfSyr_Impl::ListOfSyr_Impl( CORBA::ORB_ptr orb ,
- PortableServer::POA_ptr poa ,
- PortableServer::ObjectId * contId ,
- const char * instanceName ,
- const char * interfaceName ,
- const char * graphName ,
- const char * nodeName ) :
- Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,true) {
- Names( graphName , nodeName ) ;
- MESSAGE("ListOfSyr_Impl::ListOfSyr_Impl activate object instanceName("
- << instanceName << ") interfaceName(" << interfaceName << ") --> "
- << hex << (void *) this << dec )
- beginService( "ListOfSyr_Impl::ListOfSyr_Impl" );
- _thisObj = this ;
- _id = _poa->activate_object(_thisObj);
- sendMessage(NOTIF_STEP, "ListOfSyr_Impl is Created");
- endService( "ListOfSyr_Impl::ListOfSyr_Impl" );
-}
-
-ListOfSyr_Impl::ListOfSyr_Impl() {
-}
-
-ListOfSyr_Impl::~ListOfSyr_Impl() {
- beginService( "ListOfSyr_Impl::~ListOfSyr_Impl" );
- endService( "ListOfSyr_Impl::~ListOfSyr_Impl" );
-}
-
-SuperVisionTest::SeqOfSyr * ListOfSyr_Impl::GetSeqOfSyr() {
- SuperVisionTest::SeqOfSyr_var aSeqOfSyr = new SuperVisionTest::SeqOfSyr( _SeqOfSyr ) ;
- return ( aSeqOfSyr._retn() ) ;
-}
-
-void ListOfSyr_Impl::SetSeqOfSyr( const SuperVisionTest::SeqOfSyr & aSeqOfSyr ) {
- _SeqOfSyr = aSeqOfSyr ;
- return ;
-}
-
-extern "C"
-{
- PortableServer::ObjectId * SyrComponentEngine_factory
- (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- PortableServer::ObjectId * contId,
- const char *instanceName,
- const char *interfaceName)
- {
- MESSAGE("SyrComponentEngine_factory SyrComponentEngine ("
- << instanceName << "," << interfaceName << "," << getpid() << ")");
- SyrComponent_Impl * mySyrComponent
- = new SyrComponent_Impl(orb, poa, contId, instanceName, interfaceName);
- return mySyrComponent->getId() ;
- }
-}
-
-Syr_Impl::Syr_Impl( CORBA::ORB_ptr orb ,
- PortableServer::POA_ptr poa ,
- PortableServer::ObjectId * contId ,
- const char * instanceName ,
- const char * interfaceName ,
- const char * graphName ,
- const char * nodeName ,
- const long anOddInteger ) :
- SyrComponent_Impl(orb, poa, contId, instanceName, interfaceName,false) {
- Names( graphName , nodeName ) ;
- MESSAGE("Syr_Impl::Syr_Impl activate object instanceName("
- << instanceName << ") interfaceName(" << interfaceName << ") --> "
- << hex << (void *) this << dec )
- beginService( "Syr_Impl::Syr_Impl" );
- _thisObj = this ;
- _id = _poa->activate_object(_thisObj);
- _InitialInteger = anOddInteger ;
- _CurrentInteger = anOddInteger ;
- _Count = 0 ;
- sendMessage(NOTIF_STEP, "Syr_Impl is Created");
- endService( "Syr_Impl::Syr_Impl" );
-}
-
-Syr_Impl::Syr_Impl() {
-}
-
-Syr_Impl::~Syr_Impl() {
- beginService( "Syr_Impl::~Syr_Impl" );
- endService( "Syr_Impl::~Syr_Impl" );
-}
-
-long Syr_Impl::Initial() {
- beginService( " Syr_Impl::Initial" );
- sendMessage(NOTIF_STEP, "Syr_Impl::Initial is Computing");
- int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0));
- sleep(S);
- endService( " Syr_Impl::Initial" );
- return _InitialInteger ;
-}
-
-long Syr_Impl::Current() {
- beginService( " Syr_Impl::Current" );
- sendMessage(NOTIF_STEP, "Syr_Impl::Current is Computing");
- int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0));
- sleep(S);
- endService( " Syr_Impl::Current" );
- return _CurrentInteger ;
-}
-
-long Syr_Impl::IsEven() {
- bool RetVal ;
- beginService( " Syr_Impl::IsEven" );
- sendMessage(NOTIF_STEP, "Syr_Impl::IsEven is Computing");
- int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0));
- sleep(S);
- RetVal = ( _CurrentInteger & 1 ) == 0 ;
- MESSAGE( " Syr_Impl::IsEven " << _CurrentInteger << " " << RetVal );
- endService( " Syr_Impl::IsEven" );
- return RetVal ;
-}
-
-long Syr_Impl::IsOne() {
- bool RetVal ;
- beginService( " Syr_Impl::IsOne" );
- sendMessage(NOTIF_STEP, "Syr_Impl::IsOne is Computing");
- int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0));
- sleep(S);
- RetVal = ( _CurrentInteger == 1 ) ;
- MESSAGE( " Syr_Impl::IsOne " << _CurrentInteger << " " << RetVal );
- endService( " Syr_Impl::IsOne" );
- return RetVal ;
-}
-
-long Syr_Impl::Count() {
- beginService( " Syr_Impl::Count" );
- sendMessage(NOTIF_STEP, "Syr_Impl::Count is Computing");
- int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0));
- sleep(S);
- MESSAGE( " Syr_Impl::Count " << _Count );
- endService( " Syr_Impl::Count" );
- return _Count ;
-}
-
-void Syr_Impl::M3p1() {
- beginService( " Syr_Impl::M3p1" );
- sendMessage(NOTIF_STEP, "Syr_Impl::M3p1 is Computing");
- int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0));
- sleep(S);
- if ( IsEven() )
- _CurrentInteger = 0 ;
- else
- _CurrentInteger = 3*_CurrentInteger + 1 ;
- MESSAGE( " Syr_Impl::M3p1 " << _CurrentInteger );
- endService( " Syr_Impl::M3p1" );
-}
-
-void Syr_Impl::Div2() {
- beginService( " Syr_Impl::Div2" );
- sendMessage(NOTIF_STEP, "Syr_Impl::Div2 is Computing");
- int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0));
- sleep(S);
- if ( !IsEven() )
- _CurrentInteger = 0 ;
- else
- _CurrentInteger = ( _CurrentInteger >> 1 ) ;
- MESSAGE( " Syr_Impl::Div2 " << _CurrentInteger );
- endService( " Syr_Impl::Div2" );
-}
-
-void Syr_Impl::Incr() {
- beginService( " Syr_Impl::Incr" );
- sendMessage(NOTIF_STEP, "Syr_Impl::Incr is Computing");
- int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0));
- sleep(S);
- _Count = _Count + 1 ;
- MESSAGE( " Syr_Impl::Incr " << _Count );
- endService( " Syr_Impl::Incr" );
-}
-
-
-