From c472be64ad2486a50e224af7c02e34eefaca9304 Mon Sep 17 00:00:00 2001 From: nri Date: Thu, 6 Nov 2003 09:42:32 +0000 Subject: [PATCH] NRI : Merge from 1.2c. --- Makefile.in | 2 +- adm_local/unix/config_files/README | 3 + adm_local/unix/make_commence.in | 32 +- doc/html/INPUT/HTML/SUPERV.html | 4 + doc/html/INPUT/doxyfile | 10 +- doc/html/INPUT/sources/Application-About.png | Bin 7684 -> 19226 bytes doc/html/INPUT/sources/Application-About1.jpg | Bin 21548 -> 14327 bytes doc/html/INPUT/sources/application.gif | Bin 2584 -> 2602 bytes doc/html/INPUT/sources/application.jpg | Bin 4664 -> 792 bytes doc/html/INPUT/sources/bg_salome.gif | Bin 0 -> 17294 bytes doc/html/INPUT/sources/static/doxygen.css | 49 + .../INPUT/sources/static/examples_SUPERV.html | 495 +++++++ doc/html/INPUT/sources/static/nodestypes.jpg | Bin 0 -> 9384 bytes .../sources/static/overview_Supervision.html | 324 +++++ doc/html/INPUT/sources/static/page2.html | 31 + doc/html/INPUT/sources/static/tree.js | 65 + doc/html/INPUT/sources/static/treeview.js | 505 +++++++ doc/html/Makefile.in | 18 +- examples/Makefile.in | 33 + idl/SUPERV.idl | 14 +- src/GraphBase/DataFlowBase_Base.cxx | 19 +- src/GraphBase/DataFlowBase_Base.hxx | 26 +- src/GraphBase/DataFlowBase_ComputingNode.cxx | 160 ++- src/GraphBase/DataFlowBase_ComputingNode.hxx | 10 +- src/GraphBase/DataFlowBase_DataNode.cxx | 18 +- src/GraphBase/DataFlowBase_DataNode.hxx | 6 +- src/GraphBase/DataFlowBase_DataPort.cxx | 237 +++- src/GraphBase/DataFlowBase_EndOfLoopNode.cxx | 6 +- src/GraphBase/DataFlowBase_EndOfLoopNode.hxx | 2 +- .../DataFlowBase_EndOfSwitchNode.cxx | 6 +- .../DataFlowBase_EndOfSwitchNode.hxx | 2 +- src/GraphBase/DataFlowBase_FactoryNode.cxx | 33 +- src/GraphBase/DataFlowBase_FactoryNode.hxx | 4 +- src/GraphBase/DataFlowBase_GOTONode.cxx | 6 +- src/GraphBase/DataFlowBase_GOTONode.hxx | 2 +- src/GraphBase/DataFlowBase_Graph.cxx | 347 +++-- src/GraphBase/DataFlowBase_Graph.hxx | 12 +- src/GraphBase/DataFlowBase_InLineNode.cxx | 19 +- src/GraphBase/DataFlowBase_InLineNode.hxx | 6 +- src/GraphBase/DataFlowBase_InPort.hxx | 2 +- src/GraphBase/DataFlowBase_LoopNode.cxx | 6 +- src/GraphBase/DataFlowBase_LoopNode.hxx | 2 +- src/GraphBase/DataFlowBase_Port.cxx | 26 +- src/GraphBase/DataFlowBase_Port.hxx | 2 +- src/GraphBase/DataFlowBase_PortsOfNode.cxx | 224 ++-- src/GraphBase/DataFlowBase_PortsOfNode.hxx | 41 +- src/GraphBase/DataFlowBase_Service.cxx | 8 +- src/GraphBase/DataFlowBase_Service.hxx | 4 +- src/GraphBase/DataFlowBase_SwitchNode.cxx | 6 +- src/GraphBase/DataFlowBase_SwitchNode.hxx | 2 +- src/GraphBase/DataFlowBase_XmlHandler.cxx | 44 +- src/GraphEditor/DataFlowEditor_DataFlow.cxx | 8 +- src/GraphEditor/DataFlowEditor_DataFlow.hxx | 176 +-- src/GraphEditor/DataFlowEditor_DataFlow.lxx | 70 +- src/GraphEditor/DataFlowEditor_InNode.cxx | 54 +- src/GraphEditor/DataFlowEditor_InNode.hxx | 10 +- src/GraphEditor/DataFlowEditor_OutNode.cxx | 390 +++--- src/GraphEditor/DataFlowEditor_OutNode.hxx | 2 +- .../DataFlowExecutor_DataFlow.hxx | 10 +- .../DataFlowExecutor_DynInvoke.cxx | 160 ++- src/GraphExecutor/DataFlowExecutor_InNode.cxx | 179 ++- src/GraphExecutor/DataFlowExecutor_InNode.hxx | 107 +- .../DataFlowExecutor_InNodeThreads.cxx | 1173 +++++++++++------ .../DataFlowExecutor_OutNode.cxx | 161 ++- .../DataFlowExecutor_OutNode.hxx | 49 +- .../DataFlowExecutor_PyDynInvoke.cxx | 465 ++++--- src/SUPERVGUI/SUPERVGUI.cxx | 118 +- src/SUPERVGUI/SUPERVGUI_Array.cxx | 13 +- src/SUPERVGUI/SUPERVGUI_BrowseNodeDlg.cxx | 2 +- src/SUPERVGUI/SUPERVGUI_ComputeNode.cxx | 25 +- src/SUPERVGUI/SUPERVGUI_ControlNode.cxx | 37 +- src/SUPERVGUI/SUPERVGUI_Def.h | 2 +- src/SUPERVGUI/SUPERVGUI_GraphNode.cxx | 67 +- src/SUPERVGUI/SUPERVGUI_GraphNode.h | 7 +- src/SUPERVGUI/SUPERVGUI_Information.cxx | 6 +- src/SUPERVGUI/SUPERVGUI_Main.cxx | 14 +- src/SUPERVGUI/SUPERVGUI_Node.cxx | 12 +- src/SUPERVGUI/SUPERVGUI_Node.h | 6 +- src/SUPERVGUI/SUPERVGUI_Port.cxx | 13 +- src/SUPERVGUI/SUPERV_msg_en.po | 4 +- src/Supervision/CNode_Impl.cxx | 84 +- src/Supervision/CNode_Impl.hxx | 8 +- src/Supervision/ELNode_Impl.cxx | 4 +- src/Supervision/ELNode_Impl.hxx | 2 +- src/Supervision/ESNode_Impl.cxx | 12 +- src/Supervision/ESNode_Impl.hxx | 2 +- src/Supervision/FNode_Impl.cxx | 46 +- src/Supervision/FNode_Impl.hxx | 18 +- src/Supervision/GNode_Impl.cxx | 8 +- src/Supervision/GNode_Impl.hxx | 18 +- src/Supervision/Graph_Impl.cxx | 73 +- src/Supervision/Graph_Impl.hxx | 2 +- src/Supervision/INode_Impl.cxx | 12 +- src/Supervision/INode_Impl.hxx | 2 +- src/Supervision/LNode_Impl.cxx | 4 +- src/Supervision/LNode_Impl.hxx | 2 +- src/Supervision/Link_Impl.cxx | 8 +- src/Supervision/Link_Impl.hxx | 2 +- src/Supervision/Port_Impl.cxx | 34 +- src/Supervision/Port_Impl.hxx | 3 +- src/Supervision/SNode_Impl.cxx | 4 +- src/Supervision/SNode_Impl.hxx | 2 +- src/Supervision/SuperV.py | 5 +- src/Supervision/SuperV_Impl.cxx | 10 +- src/Supervision/SuperV_Impl.hxx | 2 +- src/Supervision/Value_Impl.cxx | 51 +- src/Supervision/Value_Impl.hxx | 3 +- src/Supervision/batchmode_SuperV.py | 1 + 108 files changed, 4813 insertions(+), 1822 deletions(-) create mode 100644 adm_local/unix/config_files/README create mode 100755 doc/html/INPUT/sources/bg_salome.gif create mode 100755 doc/html/INPUT/sources/static/doxygen.css create mode 100755 doc/html/INPUT/sources/static/examples_SUPERV.html create mode 100755 doc/html/INPUT/sources/static/nodestypes.jpg create mode 100755 doc/html/INPUT/sources/static/overview_Supervision.html create mode 100755 doc/html/INPUT/sources/static/page2.html create mode 100755 doc/html/INPUT/sources/static/tree.js create mode 100644 doc/html/INPUT/sources/static/treeview.js create mode 100644 examples/Makefile.in diff --git a/Makefile.in b/Makefile.in index 028240c..a3c3ea3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -14,7 +14,7 @@ VPATH=.:@srcdir@:@top_srcdir@/bin:@top_srcdir@/resources:./bin:@top_srcdir@/idl @COMMENCE@ -SUBDIRS = idl src +SUBDIRS = idl src examples RESOURCES_FILES = \ components.png \ diff --git a/adm_local/unix/config_files/README b/adm_local/unix/config_files/README new file mode 100644 index 0000000..feb997b --- /dev/null +++ b/adm_local/unix/config_files/README @@ -0,0 +1,3 @@ +This file is only here for CVS: +CVS does not always create empty directory, and adm_local/unix/config_file +is needed by build_configure. diff --git a/adm_local/unix/make_commence.in b/adm_local/unix/make_commence.in index f6d5ea9..370582e 100644 --- a/adm_local/unix/make_commence.in +++ b/adm_local/unix/make_commence.in @@ -47,9 +47,8 @@ PYTHONHOME = @PYTHONHOME@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_VERSION = @PYTHON_VERSION@ -PYTHON_SITE = @PYTHON_SITE@ -PYTHON_SITE_INSTALL = @PYTHON_SITE_INSTALL@ - +PYTHON_SITE = $(prefix)/lib/python$(PYTHON_VERSION)/site-packages +PYTHON_SITE_INSTALL = $(prefix)/lib/python$(PYTHON_VERSION)/site-packages/salome # QT QT_ROOT = @QT_ROOT@ @@ -101,13 +100,18 @@ MED2_MT_LIBS=@MED2_MT_LIBS@ OCC_INCLUDES=@CAS_CPPFLAGS@ OCC_CXXFLAGS=@CAS_CXXFLAGS@ -OCC_KERNEL_LIBS=@CAS_KERNEL@ -OCC_OCAF_LIBS=@CAS_OCAF@ -OCC_VIEWER_LIBS=@CAS_VIEWER@ -OCC_MODELER_LIBS=@CAS_MODELER@ -OCC_DATAEXCHANGE_LIBS=@CAS_DATAEXCHANGE@ -OCC_LIBS=@CAS_LDFLAGS@ - +#OCC_KERNEL_LIBS=@CAS_KERNEL@ +#OCC_OCAF_LIBS=@CAS_OCAF@ +#OCC_VIEWER_LIBS=@CAS_VIEWER@ +#OCC_MODELER_LIBS=@CAS_MODELER@ +#OCC_DATAEXCHANGE_LIBS=@CAS_DATAEXCHANGE@ +#OCC_LIBS=@CAS_LDFLAGS@ +CAS_KERNEL=@CAS_KERNEL@ +CAS_OCAF=@CAS_OCAF@ +CAS_VIEWER=@CAS_VIEWER@ +CAS_MODELER=@CAS_MODELER@ +CAS_DATAEXCHANGE=@CAS_DATAEXCHANGE@ +CAS_LDPATH=@CAS_LDPATH@ # MPICH MPICH_INCLUDES=@MPICH_INCLUDES@ @@ -164,6 +168,8 @@ CXXFLAGS+= $(CORBA_CXXFLAGS) #LDFLAGS+= $(CORBA_LIBS) LIBS+=$(CORBA_LIBS) +DOXYGEN = @DOXYGEN@ + ## Shared libraries LT_STATIC_EXEC=@LT_STATIC_EXEC@ DYNAMIC_DIRS=@DYNAMIC_DIRS@ @@ -192,8 +198,9 @@ libdir=@libdir@/salome # warning : if user give this path in configure we could have salome/salome :-( includedir=@includedir@/salome datadir=@datadir@/salome -idldir=$(prefix)/idl/salome +idldir=${prefix}/idl/salome sharedpydir=@libdir@/python$(PYTHON_VERSION)/site-packages/salome/shared_modules +incmakedir=${prefix}/salome_adm/unix docdir=$(datadir)/doc @@ -201,7 +208,7 @@ docdir=$(datadir)/doc # begin of package rules # -.PHONY: all lib bin inc resources tests install uninstall dep depend depend_idl cleandep mostlyclean clean distclean +.PHONY: all lib bin inc resources data doc tests install uninstall dep depend depend_idl cleandep mostlyclean clean distclean .SUFFIXES: .cxx .cc .c .f .o .lo .idl .py .i .ui .po .qm @@ -212,6 +219,7 @@ all: $(MAKE) lib $(MAKE) bin $(MAKE) resources + $(MAKE) data # # add target to build administrative files diff --git a/doc/html/INPUT/HTML/SUPERV.html b/doc/html/INPUT/HTML/SUPERV.html index 22cd5ee..a191eaa 100644 --- a/doc/html/INPUT/HTML/SUPERV.html +++ b/doc/html/INPUT/HTML/SUPERV.html @@ -246,6 +246,10 @@
long Y ( )
return_value = Y ( )
+ +
long CpuUsed ( )
+
return_value = CpuUsed ( )
+
diff --git a/doc/html/INPUT/doxyfile b/doc/html/INPUT/doxyfile index df21814..923f7d5 100755 --- a/doc/html/INPUT/doxyfile +++ b/doc/html/INPUT/doxyfile @@ -3,7 +3,7 @@ #--------------------------------------------------------------------------- # General configuration options #--------------------------------------------------------------------------- -PROJECT_NAME = "SALOME PRO - SUPERV - v.1.2" +PROJECT_NAME = "SALOME - SUPERV - v.1.2" PROJECT_NUMBER = id#1.0 OUTPUT_DIRECTORY = ../ OUTPUT_LANGUAGE = English @@ -96,11 +96,11 @@ GENERATE_HTMLHELP = NO CHM_FILE = HHC_LOCATION = GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO +BINARY_TOC = YES +TOC_EXPAND = YES +DISABLE_INDEX = YES ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = NO +GENERATE_TREEVIEW = YES TREEVIEW_WIDTH = 250 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output diff --git a/doc/html/INPUT/sources/Application-About.png b/doc/html/INPUT/sources/Application-About.png index 80e0bcb063acf425fa1001d39beea368bb4497a3..7b58330d50856e28562e8f9ed80dae72d6e6dda3 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9tiRKt&)&ITr?ac8({6P=YSqnYJ2@@`x`5H3ir`H4 zPg_#B!Ee&QkUc^a+ygJ!Z1d{6|_Dd4=nLGDQ!%M@GAHK1buB z(1~E5IC^SuaS-_00G7Zec*6DT^QHdJa3)WE3_eZciSt{0e*TasPLu(-hXDI^Ukwe* zI%+UUVx^^}+WY1A;Sc=O;H$uk;kLiH%qa<+M0WoiUPlAq0SjHoEcfN)0wQ+vkA1AS zo!wgwGAo9==jeYvYn=Hg)lprsITzQpxgS6k3&N+10JKcr_ZRC{aqQ*zb@s)!96D<7 zL!hD<0zuoItqq5Q(5?gP*4?*&F9`5;-cu*zHbs`dN$q))?cY#*`cdG6Fem2EH_VNo zcru^7dDq^J;o^B%?h&BeGuh1ksmb7M=X=QHvubI^bDQrix6e?64gNE!O;zH{a3=zG zmO9`PF1fg0>w205W~MeRGPLN|dKwSj&DGV%=iMXwa3#C1H9yiyBG>l!zJH&J_?}Kv z`CE1yiMi;64y1c@r#RmqAW_f2TNKrsTQqMRCR_*k74*< k`S}lq!Gm=DKQ?!jf-m==2J|ThUw0vz>bh!$DvyHy3p+VbumAu6 diff --git a/doc/html/INPUT/sources/Application-About1.jpg b/doc/html/INPUT/sources/Application-About1.jpg index b8f2cfb6da8aa2f60922b1c60f642ce9e1eebab5..cf7ab8ba025d6bd9212f8bd5681e77d1aaef8e4f 100755 GIT binary patch literal 14327 zcmeHuWmFx(w&uY}upHbyxWmCExQF0w!QCNvaQ7g=-QAtwZU+tr3Blc6f=uqa@80+B zy7$ejnOQTxUiF{uuIjzJs&{>R*Z!(s7hl%_@8qOpr2sH6FaVi92jKMufG6&3X6$Na zO73ChYDunUX+|zBtN7`41t1PUMnptHL_kJDLVEKC`7J6o8Y&73Dgh=I1~v&H87T=N zF)=wc3oSV%6BRKr9S=Pd8#@;l7a1*|5HE)y3nv%HUxdKCdGiJp1r;9+4WEO8n1bVf zyS)AY0FeQAup)3UlmJ*D3>*;VbpSvNfC0cD{OQJj6eL)91Vm)Gzt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8owRfh&UOk_dQd^z6v2`jE9JR}*3l>C=OL!D0NxHCf$bDB%L9^%x*49(hi9=H1#F7;x^u?OuDK-}PN#TK}l|{qG7Q|F?0%O6MOs&lWrY diff --git a/doc/html/INPUT/sources/application.gif b/doc/html/INPUT/sources/application.gif index 10da488d2dcf2a063029d868686e1882e45487ab..0b05d5c18ee88779d283508781836e2b151f606f 100644 GIT binary patch literal 2602 zcmWlYYgkeT1Aq?~180Wokt? zN9KjhIWkmc<;NP*DKDKA7nyU+ypY}4Dr5PykNJGt`{Vuj{(Dn4CbQzUOMtb&aR7z= zOe3y?;W~z4$R^1EZ7-aRUCqX8HO?WK`Y@Bn#B1v%_HG7GX|Rnx&>Uu{IuWDMvzmPv(GuI$msO*9u}u_HMQi>Jo4Ew$Iv-p<%TQwClr!B|6vpzvNAQ zn$uq=9KNR2HaO?rhW(SOQ`yFCu*qbfu<%N{>{E8oE zaaV@4iM8bk)^?U8UtrKGY=!nF7&{?nPnfP=EkE0bqmY_S_Vwe}u?TE=j6hS?`=@ToBS?@q@cgtW`VTLl6(RiNx}nL}L* zE~p6+l;~yoLf5oTQU^;i7=n08LXp-v=aO%wimQ#*cAhXb%qv?6dhBvr%jXu4AcMi<)pJDPj_W@J+S4nboLdOfi%=cb+= z!01%Hw{X*{B8zAwW!h88uR zzO`Z!ty}8*&J(+{U1B{t_2$XF>%;q;rL}!Ar=kbOW-hegTid&xj+&kC*>y6R(O*N0V0etv*T=~?OiN)MB92@n=4;hmO7JIxsM_om?27nbo?uu;8 zFYW*de*V_;C{5aRhHyW!50$y*HEjq#A2ikHH(l`V5&1`FlxHR%KV|+VmO%DT&gOOc zh6lhACc)V5H&sMAFtXvG=xWBVx%W#OYL3`km(ku_fVB*myOCR-Z`3xTfRkx7(b~_Y zXT0O07Gj2@71GHnf7!B?Czr?sBagR%0Qd2czf?B|{oHaDLh7kIJA%vI^PbW(8=TWh z?S1KT?~5zTY3?ieH~;)Npb*WPIqFx~1cBSe{K*Giuuy!$!q;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($DvV0AR!y=(xed4*(>8(rOYx0KgKFh(s#f5QGw#;W}#|gc-U=y<3RF1Ey1f3OwKi zZg>C;-e3p1z`zYYFyU<8a0L^n2Y|D=z!B+F9~cU;iy#1i40|ZSU)%t#Bru~GB}hUl zu;K=f?2j@2rdh*bIA0FO1~3VQI3fVJ z;11Iq@ra_(LY$nai4p+dh{~`d801G7P)Z~cJcx`XD+xw0_E3}g6O<=^nZHmr6FHPj z1#(LHKjft2mis_XGXT(x5_w>n&CDcnEXf&4u7(Hsqb4zn@P%dS5P1`cqeLDlz)bd# zo)Z3vBRm5by?Pd+fLx%4BV>t*cgFFN@oeKM>50603UHqbMV=d?$B{)P48z#WSEexpcW-Jwe+Uc097+KF^EBIA{XV5feaWi3<`ii7&*`dDR6NJC@{be zD=5Pv@_+>{kYN*lFzQh++6_X0;a57Kf?jz6iUACu6M*f6DXMURag1XdRhYvA5)gv` zT;UQXkjNA`AlJFh^=y=g1sqOMfFXc_7_2Zw7z*10ROH|RTUbW`?y-&pumJ~{z!nc%w>wuV+9WhvzW(BW-@;uAOJf)#?Y4l diff --git a/doc/html/INPUT/sources/application.jpg b/doc/html/INPUT/sources/application.jpg index 6d3b6a0a8c281dca8747fdd34b4d4de0f737c4a3..a6979ab9999552ccb91a0358f75103b09db5246c 100755 GIT binary patch literal 792 zcmex=LJ%Z3brs z4mLJ+HdYRHc6Lrq4lW)MULJ049!Vi#ei2zIc{y1r85so?J#_^o9c39A4RcK$149!N z6M1z@TMHu_J!2CikRgnmoSZz|JQBRT5=M$Libf=Z{|6WZIT%D3%$OOK7?=bZnFSgD zA7PMUU}Rthc>@7h+1MFbn1ONz0t}4I%#5t;OzcouMkZz!23A2KHbq0nKw(j(pu~w6 z3mZjLjGdA<9t7%;U}RuoMwkR-0lADUKp6!=1|~)pMph(AMnRxyib95giG>^g-(uil z25J^$7G$tz*b}$dob931la92ii?S2$h#I_dt2w(?+0U=MwPfirm!)r|%QL=xciqQ* zvhOkDlnJl1?mV9H$SWkch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LtZHdErUv%E3-@APE9`+ zGexz^>FZxwK#NNlhA*iM1nZLt%kGxXo9c6UJ)TC1hS6H5IpK9hzjtYF=R7|7PI3Mp#v-$Me%F>DNcEc&y!u7KKPIB#0 zXYuI@#~O1D#Zwb|Gk3XOAD6!V(p$fsNDRo*2a-(v#dDs$(O;1F0+G=UjQM^OStVH&5q3?06|V zV#XQO6lB2k+s(o3Coqmn5wR~>W6Wztf}IZ5jVx5{IriB4=}=>;TYq$hZf0g)P;uv%1D|CCn;fZq5lkZ4*6AfuMAZkS!YB3 zbx4hA!nx#Z8m2OkWW9(Vaq9CDS9Q)xJC8E&9q4k7Z;?PErt%}D_Funy@13|8`?g{5 z@>X38BI};XTv=_stNNmyyzsNqp2EUt(POr;i8JscF^OUb#ESQ~^zI=1=^)_-=I#Na zmWcd6m~+Zlbv{deDNnE4Tz?7`f|KukvDo>ma>v)rSXy`sx3pcB<&38ltEw%13&r~7 z73R6>59LrANsE4$^QO^b!_%5cUtg0t+MFiM$KK_rtlU7Q(AuUCjALFdoETWleZMw| zTYb_m>My_)l(>B`;My%WbkyD_=@!Rj@5hWqczFEpVnS!A)>;zp$GiOpdHg%)*Dp#K z2;64X6mr> XJGIWw3pUly>lLb4Wn_sb)B64kGG>E? diff --git a/doc/html/INPUT/sources/bg_salome.gif b/doc/html/INPUT/sources/bg_salome.gif new file mode 100755 index 0000000000000000000000000000000000000000..677b70468f798fe4fbc20fac3d706e61179ff12b GIT binary patch literal 17294 zcmWh!hc_FJ_pQBxgosd75MqnbqNPT}ZYB2KYPM#JE;J#;icRgkH$_n^HWhodwTsfC z+R{&3zwht;0q>mm&bjBk`|f?Z`eEFvNThr>lhMa9I#5D0|0xVVIb zgruaTl$4aTw6u(jjI6AzoSYmIiIkU@S5Qz;R8&+_Qo4Eb=B-<|l$DiLR8&+|Rd3(E zedo>{H8nMLb@jVgML=?(Xj4;ql^R4<9~y z^vK`eKOi6=FfcGEC@45MI3y(G@#Du&o;(Q+4Gjwm3l9%}`t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=^ROv6Ji7b1H5BDQrSGRNpB41G8XLDaPd1w#nMJP)a^v98}un{+aX znEu_3kT)aJ{GU831Wo%zlFm2-BU6oJjPgkTN&f_0j8{%V-vw6eO3MUWVJvtt#_X%u z8)eqD#W^DtN26>ZX-F_0><9;4gqIQ(Mg!Fl!s8&;69`CzkbwaSN7o^kv=I-DEvq0W zQyCcB-ZCB3Hu72sk$6b26hi<6E?>NM?aGDA7A{@2X4TTAE0?Z>vSiKLrOVeYUc7MO z+U4ulLtGIF+S(D<;&PDOZk!$cq?6gS#63GDt9US1w_^bOr1AD;Us_wM^~`<|~&$Su2AfBpQ?B zE@HeYx(yl87f6F~dH&)x3oTES1PN-4o0M^`S` + + + + + + + Main Page + + + + +   +
+

+ + + + + + + +
+ + +
+ + +

Examples

+ +

Interfaces:

+
+SUPERV::Graph
+SUPERV::CNode
+SUPERV::FNode
+SUPERV::INode

+SUPERV::LNode
+SUPERV::Port
+SUPERV::Link
+
+
+
+

+

+
+
SUPERV::Graph
+

+
CNode CNode( in SALOME_ModuleCatalog::Service +aService )
+
+Create a Computing Node in a Graph
+
+GraphEssai = Graph( 'GraphEssai' )
+
+AddAndCompare_ServiceinParameter = []
+AddAndCompare_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( +'Adder' , 'Adder' ) )
+AddAndCompare_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( +'double' , 'x' ) )
+AddAndCompare_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( +'double' , 'y' ) )
+AddAndCompare_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( +'Adder' , 'anOtherAdder' ) )
+
+AddAndCompare_ServiceoutParameter = []
+AddAndCompare_ServiceoutParameter.append( SALOME_ModuleCatalog.ServicesParameter( +'double' , 'FuncValue' ) )
+AddAndCompare_ServiceoutParameter.append( SALOME_ModuleCatalog.ServicesParameter( +'double' , 'z' ) )
+AddAndCompare_Service = SALOME_ModuleCatalog.Service( 'AddAndCompare' , AddAndCompare_ServiceinParameter +, AddAndCompare_ServiceoutParameter , 0 )
+
+AddAndCompare = GraphEssai.CNode( AddAndCompare_Service )
+
+
+
+
+
FNode FNode( in string aComponentName,  +in string anInterfaceName,  in SALOME_ModuleCatalog::Service +aService )
+
+Create a Factory Node in a Graph
+
+GraphEssai = Graph( 'GraphEssai' )
+Add = GraphEssai.FNode( 'AddComponent' , 'AddComponent' , 'Add' )
+
+
+
+INode INode( in string FuncName, in ListOfStrings aPythonFunction +)
+
+Create an InLine Node in a Graph
+
+GraphEssai = Graph( 'GraphEssai' )
+PyAdd = []
+PyAdd.append( 'from time import *       ' )
+PyAdd.append( 'def Add(a,b) :           +' )
+PyAdd.append( '    print "Add will wait 5 seconds"         +' )
+PyAdd.append( '    d = dir()        +' )
+PyAdd.append( '    print "Add",d        +' )
+PyAdd.append( '    d = dir(sleep)        +' )
+PyAdd.append( '    print "Add",d        +' )
+PyAdd.append( '    sleep(5)         +' )
+PyAdd.append( '    print "Add waited"         +' )
+PyAdd.append( '    n = 0     ' )
+PyAdd.append( '    while n < 10000 :     +' )
+PyAdd.append( '        i = 0     +' )
+PyAdd.append( '        s = 0     +' )
+PyAdd.append( '        while i <= b +:     ' )
+PyAdd.append( '            +s = s + i     ' )
+PyAdd.append( '            +i = i + 1     ' )
+PyAdd.append( '        n = n + 1     +' )
+PyAdd.append( '    return s          +' )
+PyAdd.append( '' )
+Add = GraphEssai.INode( 'Add' , PyAdd )
+
+
+
+GNode GNode( in string FuncName , in ListOfStrings aPythonFunction, +in string anINode )
+
+Create a GOTO node and link to the corresponding InLine node
+
+GraphEssai = Graph( 'GraphEssai' )
+Pylabel_test = []
+Pylabel_test.append( 'def label_test( ValEven , ValOne , NB , KB ):' )
+Pylabel_test.append( '    print "label_begin",ValEven,ValOne,NB,KB' +)
+Pylabel_test.append( '    return ValEven,ValOne,NB,KB' )
+label_test = GraphEssai.INode( 'label_test' , Pylabel_test )
+Pycontrol = []
+Pycontrol.append( 'def control_m3p1( N , K ):' )
+Pycontrol.append( '    return 0,1,N,K' )
+control = GraphEssai.GNode( 'control_m3p1' , Pycontrol , 'label_test' )
+
+
+
+LNode LNode( in string InitName , in ListOfStrings InitFunction +, in string MoreName , in ListOfStrings MoreFunction , in string +NextName , in ListOfStrings NextFunction , out INode anEndOfLoop +)
+
+Create a "for" or "while" node and the corresponding end of loop +node
+
+GraphEssai = Graph( 'GraphEssai' )
+
+PyforN = []
+PyforN.append( 'def InitN( NN , K , SyrComponent , min , max ) :' )
+PyforN.append( '    N = max' )
+PyforN.append( '    if min > 0 :' )
+PyforN.append( '        if max >= min +:' )
+PyforN.append( '            +N = min' )
+PyforN.append( '    return N,K,SyrComponent,min,max' )
+
+PyMoreforN = []
+PyMoreforN.append( 'def MoreN( NN , KK , SyrComponent , min , max ) :' )
+PyMoreforN.append( '    N = 0' )
+PyMoreforN.append( '    OutLoop = 0' )
+PyMoreforN.append( '    if max > NN :' )
+PyMoreforN.append( '        N = NN' )
+PyMoreforN.append( '        OutLoop = +1' )
+PyMoreforN.append( '    return OutLoop,N,0,SyrComponent,min,max' +)
+
+PyNextforN = []
+PyNextforN.append( 'def NextN( NN , KK , SyrComponent , min , max ) :' )
+PyNextforN.append( '    N = NN + 1' )
+PyNextforN.append( '    K = KK' )
+PyNextforN.append( '    return N,K,SyrComponent,min,max' )
+
+forN,endforN = GraphEssai.LNode( 'InitN' , PyforN , 'MoreN' , PyMoreforN +, 'NextN' , PyNextforN )
+
+
+SNode SNode( in string FuncName, in ListOfStrings aPythonFunction, +out INode anEndOfSwitch )
+
+Create a "if / elseif / else" or "switch" node and the corresponding +end node
+
+GraphEssai = Graph( 'GraphEssai' )
+
+PyifNotEven = []
+PyifNotEven.append( 'import SyrComponent_idl' )
+PyifNotEven.append( 'def ifNotEven( SyrComponent , N , K ) :' )
+PyifNotEven.append( '    Even = SyrComponent.C_ISEVEN( N )' +)
+PyifNotEven.append( '    Odd = 1 - Even' )
+PyifNotEven.append( '    return Odd,Even,SyrComponent,N,K' +)
+
+ifNotEven,endifNotEven = GraphEssai.SNode( 'ifNotEven' , PyifNotEven )
+
+
+Link Link( in Port OutputPort ,  in Port InputPort +)
+
+Creates a link  connecting two ports of the nodes in a Graph
+
+GraphEssai = Graph( 'GraphEssai' )
+Add = GraphEssai.FNode( 'AddComponent' , 'AddComponent' , 'Add' )
+Mul = GraphEssai.FNode( 'MulComponent' , 'MulComponent' , 'Mul' )
+Link = GraphEssai.Link(  Add.Port( 'FuncValue' ), Mul.Port( 'x' ) )
+
+
+boolean Run()
+
+Starts asynchronous execution of the graph
+
+...
+GraphEssai.Run()
+
+
+boolean Event( out CNode aNode , out GraphEvent anEvent +, out GraphState aState )
+
+Runs Graph and prints information about Graph performance
+
+...
+GraphEssai.Run()
+aStatus,aNode,anEvent,aState = GraphEssai.Event()
+while aStatus :
+    print aNode.Thread(),aNode.SubGraph(),aNode.Name(),anEvent,aState
+    aStatus,aNode,anEvent,aState = GraphEssai.Event()
+
+
+
+
+
SUPERV::CNode
+
+
+string Name()
+string Author()
+string Comment()
+boolean SetName(in string aNewName )
+boolean SetAuthor(in string anAuthor )
+boolean SetComment(in string aComment )
+
+
Get / Set methods for Name, Author and Comment strings of the node.
+
+
#Create CNode
+
AddAndCompare.SetName( 'AddAndCompare' )
+AddAndCompare.SetAuthor( 'NoBody' )
+AddAndCompare.SetComment( 'Python function' )
+print "Name:", AddAndCompare.Name(), "  Author:", AddAndCompare.Author(), +"   Comment:", AddAndCompare.Comment()
+
+
+
+Port Port( in string aParameterName )
+
+Returns Port instance from created node
+
+#Create FNode
+Addz = Add.Port('z')
+
+
+Port Input( in string InputParameterName ,  in Value +aValue )
+
+Sets value into Port by its name and returs correspondent port +instance
+
+#Create FNode
+Addx = Add.Input("x",3.)
+
+
+
+void Coords( in long X , in long Y )
+
long X()

+long Y()
+
+Methods to sets position of the node and getting current coordinates
+
+#Create +FNode
+Add.Coords( 1 , 152 )
+print "X=", Add.X(), "   Y=", Add.Y()
+
+
+long CpuUsed()
+
+Returns the Cpu used by a node in seconds
+
+#Run Graph and wait for its finish
+print "CPU used: ", Add.CpuUsed(), " sec"
+
+
+
+
+
+
SUPERV::FNode
+
+
+string GetContainer()
+boolean SetContainer(in string aContainer )
+

+Get / Set method for container name
+
+#Create +FNode
+Add.SetContainer( 'localhost/FactoryServer' )
+print "Container: ", Add.GetContainer()
+
+
+
+
SUPERV::INode
+
+
+
+void SetPyFunction( in string FuncName ,  in ListOfStrings +aPyInitFunction )
+
+Replaces Python function of inline node by new one
+
+#Create INode
+PyIsOdd = []
+PyIsOdd.append( 'def IsOdd(a) :   ' )
+PyIsOdd.append( '    print a,"IsOdd"  ' )
+PyIsOdd.append( '    return a ' )
+Add.SetPyFunction("IsOdd", PyIsOdd)
+
+
+string PyFuncName()
+
+
Returns Name of the Python function
+
+#Create +INode
+print "Name:",  Add.PyFuncName()
+
+
+
+ ListOfStrings PyFunction()
+
+
Returns Python function as a list of strings
+
+#Create +INode
+PyFunc = Add.PyFunction()
+
+
+SUPERV::Port InPort( in string aParameterName , in string +aParameterType )
+SUPERV::Port OutPort( in string aParameterName , in string aParameterType +)
+

+Creation of In and Out ports of Inline Node
+
+#Create +INode
+Add.InPort('a', 'long')
+
Add.InPort('b', 'long')
+ +
Add.OutPort('s', 'long')
+
+
+
+
+
+
SUPERV::LNode
+
+
+
+void SetPyInit( in string InitName ,  in ListOfStrings +aPyInitFunction )
+void SetPyMore( in string MoreName ,  in ListOfStrings +aPyMoreFunction )
+void SetPyNext( in string NextName ,  in ListOfStrings aPyNextFunction +)
+

+Sets (replaces) Python fonction of according clause (Init, More, +Next) in Loop Node
+
+#Create Loop Node
+Pyfori = []
+Pyfori.append( 'def Initfori( ii , K ) :' )
+Pyfori.append( '    return 1,0,K' )
+PyMorefori = []
+PyMorefori.append( 'def Morefori( ii , K ) :' )
+PyMorefori.append( '    OutLoop = 0' )
+PyMorefori.append( '    if 2 > ii :' )
+PyMorefori.append( '        OutLoop = +1' )
+PyMorefori.append( '    return OutLoop,ii,K' )
+PyNextfori = []
+PyNextfori.append( 'def Nextfori( ii , K ) :' )
+PyNextfori.append( '    ii = ii + 1' )
+PyNextfori.append( '    return ii,K' )
+forN.SetPyInit('Initfori', Pyfori)
+
forN.SetPyMore('Morefori', PyMorefori)
+ +
forN.SetPyNext('Nextfori', PyNextfori)
+
+
+
+string PyInitName()
+
+string PyMoreName()
+string PyNextName()
+
+
+
Returns Python function name of according clause
+
+#Create +Loop Node
+print "Init Name:", forN.PyInitName()
+print "More Name:", forN.PyMoreName()
+print "Next Name:", forN.PyNextName()
+
+
+ListOfStrings PyInit()
+ListOfStrings PyMore()
+ListOfStrings PyNext()
+

+Returns Python function as a list of strings +from according clause
+
+#Create +Loop Node
+InitFunc = forN.PyInit()
+
MoreFunc = forN.PyMoret()
+ +
NextFunc = forN.PyNext()
+
+
+
+
+ +
SUPERV::Port
+
+
+boolean Input( in Value aValue )
+
+Sets value to the input port instance
+
+#CreatePorts
+aPort = Add.Port('a')
+aPort.Input(10)
+
+
+CNode Node()
+
+Returns Node - owner of the port
+
+Add = aPort.Node()
+
+
+string Name()
+
+Returns Name of the Port
+
+print "Port Name:", aPort.Name()
+
+
+
+ +
+
+
+ + + diff --git a/doc/html/INPUT/sources/static/nodestypes.jpg b/doc/html/INPUT/sources/static/nodestypes.jpg new file mode 100755 index 0000000000000000000000000000000000000000..22f0ce4cd298f0ff6b67c19803454d1f348f0f8c GIT binary patch literal 9384 zcmcIp2Rzm7+y9xzEM#O9*=2=;k{ps_^hn3fNRb^yX2uaADPQA|)sa6~S$SM@mXcK~8a+lJd03IhJ!G|Kk_-JwQzYOyEfq;IRYv)OZBc zc-TgO6+9;q-j5gX>kAK`fRKn7LPAPL4!)s;3c$xBAiyUiAR;0p1mEor{vRNuCZahf zEK7U}aSy_7ODpm;G?9ekT0tG1TF)A%sF9r)DH%P(X+|b4ZXVwA7ocL|5|=JZ%3YU- zD<~={t7~X#Y3tn9HNJ0RYG!U>`PkmU(aG86iT5)fU%%)60b${>3r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9!|KbhKR#N>kxvfJ z(z=qldyfds{{7XQtxveS9k{1GjWPA`HWrMUToF}`4^1s84uJ3~skJ}7Df&W$cPQIr zKLFMk mSa+eg`mi|nXSVQN3n*6)lBPYcQCX-3#$tBIAC)BRr~d*XFJ^}T literal 0 HcmV?d00001 diff --git a/doc/html/INPUT/sources/static/overview_Supervision.html b/doc/html/INPUT/sources/static/overview_Supervision.html new file mode 100755 index 0000000..ef630f8 --- /dev/null +++ b/doc/html/INPUT/sources/static/overview_Supervision.html @@ -0,0 +1,324 @@ + + + + + + Main Page + + + +  +
+ + + + + +
+
+
+
+

General overview

+

Table of contents

+ + +
+

1. Introduction

+

The Supervision module of the SALOME platform allows to define and execute + a chain of distributed numeric components, as well as to control the progress + of this chain. The various calculations to be chained and the exchanged data + are specified in a computing scheme, which can be of two types :

+
    +
  • Data flow computing schemes.
    + These schemes are represented by graphs without loops, conditional branches + or any operation of control. The execution of theses schemes can be automatically + optimized by the supervision engine by detecting and executing simultaneously + independant branches and by managing in a optimal way the life cycle of components.
  • +
    +
    +
  • Script type computing schemes.
    + These schemes allow to define chainings or complex couplings of components + using loops, conditional execution and control flow breaks by leaning on a + scripting language (parametric studies, multi-physical coupling). Contrary + in data flows, the specification of these schemes must define the sequence + of execution of components. Notably, the simultaneous execution of components + should be explicitly defined.
  • +
+

Of simple conception, the data flow schemes can be built in a graphic way and + validated automatically by the supervision engine.

+

The script type computing schemes, which offer the possibility of building + complex chains, should be conceived by warned users (developers) who master + the syntax and the use of the scripting language.

+

Once specified and validated, certain computing schemes defined by scripts + can be made customizable (input and output data, parameter sets) and integrated + into the platform to form components. These components can be used to build + schemes of higher level.

+

Besides the definition of computing schemes, the Supervision module must also + take care of their execution and follow-up (complete execution or step by step) + :

+
    +
  • Asking of instanciation of the components (kernel calls) and data (data + servers calls),
  • +
  • Launching computations specified in the computing scheme,
  • +
  • Managing the events emitted or received by the supervision engine and the + component,
  • +
  • Recovering the results of computations and demand of filing for the data + service.
  • +
+

The user can visualize the progress of the scheme and the exchanged data, be + informed about the evolution of the execution of a component (errors, warning, + tracks, ...), to intervene by stopping, pausing or by resuming the execution + of the scheme or a particular component.

+ Back to the contents +

2. Defintions

+

2.1 Computing scheme of type DataFlow

+

The computing schemes of type dataflow, feasible by the Supervision module, + are directed acyclic graphs, described by a set of nodes and of directed links. + A node represents a service of an instance of a computation component.

+

A node is provided with input port(s) and/or output port(s). The input port(s) + (resp. output port(s)) represent the input argument(s) (resp. output argument(s)) + of the service. Certain services can possibly require the use of parameters + which will be grouped together in configuration files (defined in the Data/Properties + module, and recorded in the study).

+

The computing schemes of type data flow do not contain either loops, conditional + branches or any operation of control. They can thus be built easily in a graphic + way, by connecting output ports to input ports of nodes. Although the graphic + construction is the simplest way, these computing schemes can also be defined + in the language of script.

+

A node represents a service (function, method) of an instance of a component. + If the component possesses a unique service (“Run” method), one will omit the + term “service of”. Various services of the same component can be used in various + nodes of the graph, or the same service can be used several times.

+

2.2 Types of nodes

+

In the SUPERVISION module there are the following types of nodes:

+ +
    +
  • computation node,
  • +
  • loop node,
  • +
  • switch node,
  • +
  • GOTO node.
  • +
+
+

The dependance between different types of nodes is shown on the following picture: +

+
+

2.2.1 Computation node

+

This node represents a computation algorithm in the graph structure. Nodes + of such type can present a service registered in the Component Catalog (Factory + Node) or an external service defined in Python script by user (InLine node). + Python function of InLine node can be edited in Supervision Graph edit mode. +

+

2.2.2 Loop node

+

Loop node is a kind of Control nodes. In fact two nodes represent Loop: +start loop and end loop nodes. Nodes of such type are always InLine nodes. +User have to supply this type of node by service, which will check conditions of end of loop.

+ +

With that kind of nodes may be defined all kinds of loops:

+ +“for( initial condition(s) ; end condition(s) ; end loop code )” or

+ +“while( end condition )”

+ +etcÂ…

+

Here you can see a simple example of Python functions set in a Loop node:

+

+def Init(Index,Min,Max,Incr) :  
+
+    if Min <= Max :  
+
+        Index = Min  
+
+    else :  
+
+        Index = Max  
+
+    return Index,Min,Max,Incr  
+
+ 
+
+def More(Index,Min,Max,Incr) :  
+
+    if Index < Max :  
+
+        DoLoop = 1  
+
+    else :  
+
+        DoLoop = 0  
+
+    return DoLoop,Index,Min,Max,Incr  
+
+ 
+
+def Next(Index,Min,Max,Incr) :  
+
+    Index = Index + Incr  
+
+    return Index,Min,Max,Incr
+
+ +

2.2.3 Switch node

+

Switch node is a kind of Control node. In fact two nodes present Switch: start Switch and end Switch. + 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.

+ +

With that kind of node you can define all kinds of tests or switches :

+ +

“if( condition ) ; else if( condition ) … ; else” or

+ +“switch( variable ) ; case value …; default”.

+ +EtcÂ…

+

The associated Python function will have all input ports of the Switch node + as input arguments. And that function must return a value for all output ports. + A simple example of this Python function:

+

+  
+def Switch(x):    
+
+	i1=0    
+
+	i2=0    
+
+	i3=0    
+
+	if x>13:    
+
+		i1=1    
+
+	elif x==13:    
+
+		i2=1    
+
+	else:    
+
+		i3=1    
+
+	return i1,i2,i3 
+ 
+

In this example i1, i2, i3 parameters of the function correspond to Switch + ports of the node. So, depending on the result of execution of the initial condition + (in our case it's a comparison of the input parameter with an integer 13), one + of the switch ports will get the value 1. And this port will transmit further + dataflow to the corresponding node.

+

2.2.4 GOTO node

+

GOTO node represents a simple transmitter of data from one port into another. + This InLine node can be with service or without it. In the first case the data + received by a GOTO node will be processed by this function and only after that + it will be transferred to another node. GOTO nodes may have as many Input and + Output ports as it's necessary.

+ Back to the contents +

3. SUPERVISION module features and services

+

The functionality of the SUPERVISION module is provided by a set of classes which are combined into +the SUPERV package. +

The API reference of the SUPERVISION component can be found here.

+

3.1 CNode class

+

This is a base class of the SUPERVISION module. It contains a set of methods allowing:

+ +
    +
  • creating a Computation node and setting its parameters (Name, Author, Comments + etc.)
  • +
  • checking the current state of the node in the data flow
  • +
  • node execution follow-up
  • +
  • management of the components, which can be initialized for execution of calculations in the data flow. (For that purpose + CNode class inherits the methods of the Engines:Container class)
  • +
+

The API reference for this class can be found here.

+ +

3.2 FNode class

+ +

This class is necessary for management of Factory nodes in the data flow. Besides the inherited methods it contains some methods allowing +to define the component from the container, which will be called for execution of the calculation.

+

The API reference for this class can be found here.

+ +

3.3 INode class

+

This class is necessary for management of Inline nodes in the data flow. Besides the inherited methods it contains some methods allowing to set +the Python function, which will be executed for performing calculations, as well as input and output parameters for the node.

+

The API reference for this class can be found here.

+ +

3.4 GNode class

+

This class is necessary for management of GOTO nodes in the data flow. Besides the inherited methods it contains some methods allowing to define +the couple node, which will be linked to this one.

+

The API reference for this class can be found here.

+ +

3.5 LNode class

+

This class is necessary for management of Loop nodes (or Start Loop nodes) in the data flow. Besides the inherited methods it contains some methods allowing to define +the Python function, which will control the loop.

+

The API reference for this class can be found here.

+ +

3.6 ELNode class

+

This class is necessary for management of End Loop nodes (or start Loop nodes) in the data flow.

+

The API reference for this class can be found here.

+ +

3.7 SNode class

+

This class is necessary for management of Switch nodes (or Start Switch nodes) in the data flow.

+

The API reference for this class can be found here.

+ +

3.8 ESNode class

+

This class is necessary for management of End Switch nodes in the data flow.

+

The API reference for this class can be found here.

+ +

3.9 Graph class

+

This class is used for management of a data flow. It contains a set of methods, which allows:

+
    +
  • creation of a data flow consisting of one or several different nodes
  • +
  • import/export of an existing data flow
  • +
  • execution of the data flow
  • +
  • follow-up of data flow execution
  • +
  • checking the state of the data flow
  • +
+

The API reference for this class can be found here.

+

3.10 Link class

+

This class contains a set of methods used for representation and management of the links connecting nodes in a data flow.

+

The API reference for this class can be found here.

+ +

3.11 Value class

+

This class contains a set of methods used for management of the values which can be set in the ports of nodes.

+

The API reference for this class can be found here.

+ +

3.12 Port class

+

This class contains a set of methods used for management of the ports of the nodes in a data flow:

+ +
    +
  • setting the attributes of a port
  • +
  • initialization of input ports with initial values
  • +
  • linking ports of different nodes
  • +
+

The API reference for this class can be found here.

+ +

3.13 SuperG class

+

The main class of the SUPERVISION ccomponent which is used for construction and initialization of a data flow.

+

The API reference for this class can be found here.

+ + +Back to the contents + + diff --git a/doc/html/INPUT/sources/static/page2.html b/doc/html/INPUT/sources/static/page2.html new file mode 100755 index 0000000..064a2c9 --- /dev/null +++ b/doc/html/INPUT/sources/static/page2.html @@ -0,0 +1,31 @@ + + + + + + Main Page + + + +  +
+ + + + + + +
+
+
+ + + + + + + + diff --git a/doc/html/INPUT/sources/static/tree.js b/doc/html/INPUT/sources/static/tree.js new file mode 100755 index 0000000..f5cdde5 --- /dev/null +++ b/doc/html/INPUT/sources/static/tree.js @@ -0,0 +1,65 @@ +foldersTree = gFld("SALOME v.1.2 ", "", "") + 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")) +*/ + diff --git a/doc/html/INPUT/sources/static/treeview.js b/doc/html/INPUT/sources/static/treeview.js new file mode 100644 index 0000000..55eb43d --- /dev/null +++ b/doc/html/INPUT/sources/static/treeview.js @@ -0,0 +1,505 @@ +//**************************************************************** +// 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 0) + auxEv = "" + else + auxEv = "" + + if (level>0) + if (lastNode) //the last 'brother' in the children array + { + this.renderOb(leftSide + auxEv + "") +// leftSide = leftSide + "" + this.isLastNode = 1 + } + else + { + this.renderOb(leftSide + auxEv + "") + leftSide = leftSide + "" + 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("") + } + if (browserVersion == 3) + { + doc.write("
") + } + + doc.write("\n") + doc.write("\n\n") + doc.write("\n
") + doc.write(leftSide) + this.outputLink() + doc.write("") + doc.write("") + if (USETEXTLINKS) + { + this.outputLink() + doc.write(this.desc + "") + } + else + doc.write(this.desc) + +/*! + if (this.tagName!="") + { + doc.write(" [external]") + } +*/ + doc.write("
\n") + + if (browserVersion == 2) { + doc.write("") + } + if (browserVersion == 3) { + doc.write("
") + } + + 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(" 0) + doc.write("onClick='javascript:clickOnFolder("+this.id+")'") + doc.write(">") + } + else + doc.write("") +} + +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 + "") + leftSide = leftSide + "" + } + else + { + this.renderOb(leftSide + "") + leftSide = leftSide + "" + } + else + this.renderOb("") +} + +function drawItem(leftSide) +{ + if (browserVersion == 2) + doc.write("") + if (browserVersion == 3) + doc.write("
") + + doc.write("\n\n") + doc.write("\n
") + doc.write(leftSide) + if (this.link!="") + { + doc.write("") + } + doc.write("") + if (this.link!="") + { + doc.write("") + } + doc.write("") + if (USETEXTLINKS && this.link!="") + doc.write("" + this.desc + "") + else + doc.write(this.desc) +/*! + if (this.tagName!="") + { + doc.write(" [external]"); + } +*/ + doc.write("\n
\n") + + if (browserVersion == 2) + doc.write("") + if (browserVersion == 3) + doc.write("
") + + 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(" ") + + // 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 diff --git a/doc/html/Makefile.in b/doc/html/Makefile.in index 6b636a2..cd62723 100644 --- a/doc/html/Makefile.in +++ b/doc/html/Makefile.in @@ -1,11 +1,14 @@ -# -* Makefile *- +# Copyright (C) 2003 CEA/DEN, EDF R&D # -# Author : Vasily Rusyaev (Open Cascade NN) -# Date : 13/02/2003 -# $Header: # -# source path +# +# 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@ @@ -16,13 +19,12 @@ doxygen=@DOXYGEN@ doc: cp -fr $(srcdir)/INPUT ./; \ cd INPUT; \ - sed 's|../../../share/salome|../$(top_srcdir)|' doxyfile > doxyfile1; \ + sed 's|../../../share/salome|$(root_srcdir)|' doxyfile > doxyfile1; \ mv -f doxyfile1 doxyfile; \ $(doxygen) ./doxyfile; \ cd ..; \ - cp -f $(srcdir)/INPUT/sources/doxygen.css ./html/doxygen.css + cp -fr $(srcdir)/INPUT/sources/static/*.* ./html/ cp -fr $(srcdir)/INPUT/sources/ html/ - cp -fr $(srcdir)/INPUT/exemple/ html/ cp -fr $(srcdir)/INPUT/HTML/ html/ clean: diff --git a/examples/Makefile.in b/examples/Makefile.in new file mode 100644 index 0000000..48f9d93 --- /dev/null +++ b/examples/Makefile.in @@ -0,0 +1,33 @@ +# Copyright (C) 2003 CEA/DEN, EDF R&D +# +# +# +# File : Makefile.in +# Author : Vasily Rusyaev (Open Cascade NN) +# Module : doc +# $Header: + +top_srcdir=@top_srcdir@ +top_builddir=.. +srcdir=@srcdir@ +VPATH=.:@srcdir@ +curdir = $(shell pwd) +instdatadir=${prefix}/examples + +SUBDIRS=. + +@COMMENCE@ + +data: + (cd $(srcdir) ; cp -fr `ls | grep -v "Makefile.in"` $(curdir)) + +clean: + rm -rf `ls | grep -v "Makefile"` + +install: + rm -rf $(instdatadir) + mkdir $(instdatadir) + cp -rf `ls | grep -v "Makefile"` $(instdatadir) + +uninstall: + rm -rf $(instdatadir) diff --git a/idl/SUPERV.idl b/idl/SUPERV.idl index c92b7bf..b78f1e4 100644 --- a/idl/SUPERV.idl +++ b/idl/SUPERV.idl @@ -25,16 +25,14 @@ /*! \file SUPERV.idl This file contains a set of interfaces of the %SUPERVISION module */ -/*! - \defgroup Supervision SALOME SUPERVISION module -*/ + #ifndef __SUPERV_IDL__ #define __SUPERV_IDL__ #include "SALOME_ModuleCatalog.idl" #include "SALOME_Component.idl" #include "SALOMEDS.idl" -/*! \ingroup Supervision +/*! The main package of interfaces of %SUPERVISION module */ module SUPERV { @@ -414,7 +412,7 @@ Returns the current state of the graph. boolean Resume(); /*! - Restarts execution of the node(graph). + Restarts execution of the node. */ boolean ReRun(); /*! @@ -427,7 +425,7 @@ Restarts execution of the graph beginning from a definite node. */ boolean ReStart(); /*! -Restarts and suspends execution of the graph beginning from a definite node. +Restarts and suspends execution of the graph beginning from a defined node. */ boolean ReStartAt( in string aNodeName ); @@ -456,7 +454,9 @@ Returns the position of the node along X-axis. Returns the position of the node along Y-axis. */ long Y() ; - +/*! +Returns the Cpu used by a node in seconds. +*/ long CpuUsed() ; } ; diff --git a/src/GraphBase/DataFlowBase_Base.cxx b/src/GraphBase/DataFlowBase_Base.cxx index 22d6b6a..7853f57 100644 --- a/src/GraphBase/DataFlowBase_Base.cxx +++ b/src/GraphBase/DataFlowBase_Base.cxx @@ -29,7 +29,7 @@ using namespace std; #include "DataFlowBase_Base.hxx" -char *SuperVision_Version = "1.04" ; +char *SuperVision_Version = "1.05" ; char *NULLSTRING = "" ; @@ -41,10 +41,19 @@ GraphBase::Base::Base() { } void GraphBase::Base::SetDebug( CORBA::ORB_ptr ORB , - int * theprof_debug , ostream * thefdebug ) { - _Orb = CORBA::ORB::_duplicate( ORB ) ; - _prof_debug = theprof_debug ; - _fdebug = thefdebug ; + int * theprof_debug , ofstream * thefdebug ) { + if ( _prof_debug == NULL ) { +// *thefdebug << "GraphBase::Base::SetDebug Done _fdebug " << _fdebug << " = thefdebug " << thefdebug +// << endl ; + if ( theprof_debug ) { + _Orb = CORBA::ORB::_duplicate( ORB ) ; + _prof_debug = theprof_debug ; + _fdebug = thefdebug ; + } + } +// cdebug_in << "GraphBase::Base::SetDebug" << endl ; +// cdebug << "GraphBase::Base::SetDebug" << endl ; +// cdebug_out << "GraphBase::Base::SetDebug" << endl ; } char * GraphBase::Base::ObjectToString( CORBA::Object_ptr obj ) const { diff --git a/src/GraphBase/DataFlowBase_Base.hxx b/src/GraphBase/DataFlowBase_Base.hxx index 174a1ea..3b0a7fc 100644 --- a/src/GraphBase/DataFlowBase_Base.hxx +++ b/src/GraphBase/DataFlowBase_Base.hxx @@ -29,9 +29,10 @@ #ifndef _DATAFLOW_BASE_HXX #define _DATAFLOW_BASE_HXX +//#include #include #include -#include +#include #include #include #include @@ -48,8 +49,6 @@ #include "utilities.h" #include "OpUtil.hxx" -#include "SALOME_NamingService.hxx" - extern char *SuperVision_Version ; extern char *NULLSTRING ; @@ -146,14 +145,14 @@ namespace GraphBase { public: - int * _prof_debug; - ostream * _fdebug; + int * _prof_debug ; + ofstream * _fdebug ; Base() ; virtual ~Base() {} ; void SetDebug( CORBA::ORB_ptr ORB , - int * prof_debug , ostream * fdebug ) ; + int * prof_debug , ofstream * fdebug ) ; char * ObjectToString( CORBA::Object_ptr obj ) const ; CORBA::Object_ptr StringToObject(char * obj ) const ; @@ -161,17 +160,14 @@ namespace GraphBase { } ; # ifdef _DEBUG_ -# define cdebug \ - if ( GraphBase::Base::_prof_debug ) \ - *GraphBase::Base::_fdebug << " " /*<< setw(3*(*GraphBase::Base::_prof_debug)) */<< " " +// *GraphBase::Base::_fdebug << " " /*<< setw(3*(*GraphBase::Base::_prof_debug)) */<< " " + +# define cdebug if ( GraphBase::Base::_fdebug ) *GraphBase::Base::_fdebug << " " << " " + +# define cdebug_in if ( GraphBase::Base::_fdebug ) *GraphBase::Base::_fdebug << endl << "-->" << " " -# define cdebug_in \ - if ( GraphBase::Base::_prof_debug ) \ - *GraphBase::Base::_fdebug << endl << "-->" /*<< setw(3*((*GraphBase::Base::_prof_debug)++)) */<< " " +# define cdebug_out if ( GraphBase::Base::_fdebug ) *GraphBase::Base::_fdebug << endl << "<--" << " " -# define cdebug_out \ - if ( GraphBase::Base::_prof_debug ) \ - *GraphBase::Base::_fdebug << endl << "<--" /*<< setw(3*(--(*GraphBase::Base::_prof_debug)))*/ << " " # else # define cdebug while (false) std::cerr diff --git a/src/GraphBase/DataFlowBase_ComputingNode.cxx b/src/GraphBase/DataFlowBase_ComputingNode.cxx index ad86cd8..bb47f9e 100644 --- a/src/GraphBase/DataFlowBase_ComputingNode.cxx +++ b/src/GraphBase/DataFlowBase_ComputingNode.cxx @@ -10,8 +10,8 @@ // $Header: using namespace std; -#include -#include +//#include +//#include #include "DataFlowBase_InLineNode.hxx" #include "DataFlowBase_LoopNode.hxx" @@ -77,10 +77,7 @@ GraphBase::ComputingNode::ComputingNode() : _InNode = NULL ; _ThreadNo = pthread_self() ; _Name = NULL ; - cdebug << "GraphBase::Node::Node " << this - << " _Name " - << (void *) _Name << " " << _Name << " _Comment " - << (void *) _Comment << " " << _Comment << " " << endl ; + cdebug << "GraphBase::Node::Node " << this << " " << endl ; } @@ -88,9 +85,10 @@ GraphBase::ComputingNode::ComputingNode( CORBA::ORB_ptr ORB , SALOME_NamingService* ptrNamingService , const char * aDataFlowName , int * Graph_prof_debug , - ostream * Graph_fdebug ) : + ofstream * Graph_fdebug ) : GraphBase::PortsOfNode::PortsOfNode( aDataFlowName ) { + MESSAGE( "GraphBase::ComputingNode::ComputingNode( " << aDataFlowName << " Graph_fdebug " << Graph_fdebug ) ; InitFields( _Kind , _FirstCreation , _LastModification , @@ -106,26 +104,30 @@ GraphBase::ComputingNode::ComputingNode( CORBA::ORB_ptr ORB , _ORB = CORBA::ORB::_duplicate( ORB ) ; _NamingService = ptrNamingService ; - _Graph_prof_debug = Graph_prof_debug ; - _Graph_fdebug = Graph_fdebug ; _Node = SUPERV::CNode::_nil() ; _InNode = NULL ; _ThreadNo = pthread_self() ; - if ( aDataFlowName && strlen( aDataFlowName ) ) { + if ( aDataFlowName != NULLSTRING && strlen( aDataFlowName ) ) { _Name = new char[ strlen( aDataFlowName )+1 ] ; strcpy( _Name , aDataFlowName ) ; } - else - _Name = NULL ; + else { + _Name = NULLSTRING ; + } if ( Graph_prof_debug ) { +// MESSAGE( "GraphBase::ComputingNode::ComputingNode --> SetDebug" ) ; +// cout << "GraphBase::ComputingNode::ComputingNode --> SetDebug" << endl ; + _Graph_prof_debug = Graph_prof_debug ; + _Graph_fdebug = Graph_fdebug ; SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ; -// MESSAGE( "Invalid DataFlow Name." ); } +// else { +// cout << "GraphBase::ComputingNode::ComputingNode NO SetDebug" << endl ; +// } cdebug << "GraphBase::ComputingNode::ComputingNode " << this << "' _Name " - << (void *) _Name << " '" << _Name << " _Comment " - << (void *) _Comment << " " << _Comment << " " << _FirstCreation + << (void *) _Name << " '" << _Name << " " << _FirstCreation << " " << _LastModification << endl ; } @@ -143,13 +145,11 @@ GraphBase::ComputingNode::ComputingNode( CORBA::ORB_ptr ORB , const long X , const long Y , int * Graph_prof_debug , - ostream * Graph_fdebug ) : + ofstream * Graph_fdebug ) : GraphBase::PortsOfNode::PortsOfNode() { _ORB = CORBA::ORB::_duplicate( ORB ) ; _NamingService = ptrNamingService ; - _Graph_prof_debug = Graph_prof_debug ; - _Graph_fdebug = Graph_fdebug ; _Node = SUPERV::CNode::_nil() ; _InNode = NULL ; _ThreadNo = pthread_self() ; @@ -166,7 +166,7 @@ GraphBase::ComputingNode::ComputingNode( CORBA::ORB_ptr ORB , _FirstCreation.Month = _LastModification.Month = Tm->tm_mon + 1; _FirstCreation.Year = _LastModification.Year = Tm->tm_year + 1900; - if ( NodeEditorRelease ) { + if ( NodeEditorRelease != NULLSTRING ) { _EditorRelease = new char[ strlen( NodeEditorRelease ) + 1 ] ; strcpy( _EditorRelease , NodeEditorRelease ) ; } @@ -175,19 +175,21 @@ GraphBase::ComputingNode::ComputingNode( CORBA::ORB_ptr ORB , strcpy( _EditorRelease , SuperVision_Version ) ; } - if ( NodeAuthor ) { + if ( NodeAuthor != NULLSTRING ) { _Author = new char[ strlen( NodeAuthor ) + 1 ] ; strcpy( _Author , NodeAuthor ) ; } - else + else { _Author = NULLSTRING ; + } - if ( NodeComment ) { + if ( NodeComment != NULLSTRING ) { _Comment = new char[ strlen( NodeComment ) + 1 ] ; strcpy( _Comment , NodeComment ) ; } - else + else { _Comment = NULLSTRING ; + } _SubGraphNumber = 0 ; _HeadNode = false ; @@ -204,20 +206,27 @@ GraphBase::ComputingNode::ComputingNode( CORBA::ORB_ptr ORB , _X = X ; _Y = Y ; - if ( Graph_prof_debug ) - SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ; +// MESSAGE( "GraphBase::ComputingNode::ComputingNode --> SetDebug " << Graph_prof_debug << " Graph_fdebug " +// << Graph_fdebug ) ; +// cout << "GraphBase::ComputingNode::ComputingNode --> SetDebug " << Graph_prof_debug << " Graph_fdebug " +// << Graph_fdebug << endl ; + _Graph_prof_debug = Graph_prof_debug ; + _Graph_fdebug = Graph_fdebug ; + SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ; +// MESSAGE( "GraphBase::ComputingNode::ComputingNode SetDebug Done " << Graph_prof_debug << " Graph_fdebug " +// << Graph_fdebug << " aService.ServiceName " << aService.ServiceName ) ; +// cout << "GraphBase::ComputingNode::ComputingNode SetDebug Done " << Graph_prof_debug << " Graph_fdebug " +// << Graph_fdebug << endl ; +// cout << "GraphBase::ComputingNode::ComputingNode(" << aService.ServiceName << "," << aNodeName << "," +// << akind << ")" << endl; + cdebug_in << "GraphBase::ComputingNode::ComputingNode(" << aService.ServiceName << "," << aNodeName << "," + << akind << ")" << endl; + - DefPortsOfNode( ORB , aService , NamePtr() , Kind() , - Graph_prof_debug , Graph_fdebug ) ; + DefPortsOfNode( ORB , aService , NamePtr() , Kind() , Graph_prof_debug , Graph_fdebug ) ; - cdebug_in << "GraphBase::ComputingNode::ComputingNode(" << aService.ServiceName << "," - << aNodeName << "," << akind - << "," << NodeComment << ")" << endl; - cdebug << "GraphBase::ComputingNode::ComputingNode " << this - << " _Name " - << (void *) _Name << " '" << _Name << "' _Comment " - << (void *) _Comment << " " << _Comment << " " + << " _Name " << (void *) _Name << " '" << _Name << " KindOfNode " << _Kind << " ServiceName " << ServiceName() << " In(" << ServiceInParameter().length() << ") Out(" << ServiceOutParameter().length() << ")" << endl ; @@ -243,19 +252,21 @@ GraphBase::ComputingNode::~ComputingNode() { } bool GraphBase::ComputingNode::Name( const char * aName) { + cdebug_in << "GraphBase::ComputingNode::Name " << _Name << endl; if ( _Name ) { cdebug << "GraphBase::ComputingNode::ReName " << _Name << " --> " << aName << endl ; delete [] _Name ; } _Name = new char[strlen(aName)+1] ; strcpy( _Name , aName ) ; + cdebug_out << "GraphBase::ComputingNode::Name " << _Name << endl; return true ; } SUPERV::SDate GraphBase::ComputingNode::FirstCreation () const { - cdebug << "GraphBase::ComputingNode::FirstCreation " - << "' _Name " << _Name << " " << _FirstCreation << " " - << _LastModification << endl ; +// cdebug << "GraphBase::ComputingNode::FirstCreation " +// << "' _Name " << _Name << " " << _FirstCreation << " " +// << _LastModification << endl ; return _FirstCreation; } @@ -284,18 +295,20 @@ bool GraphBase::ComputingNode::EditorRelease(const char * c){ } bool GraphBase::ComputingNode::Author(const char * a) { + cdebug_in << "GraphBase::ComputingNode::Author " << _Author << endl; if ( _Author && _Author != NULLSTRING ) delete _Author; _Author = my_strdup(a); + cdebug_out << "GraphBase::ComputingNode::Author " << _Author << endl; return true ; } bool GraphBase::ComputingNode::Comment(const char *c) { - cdebug_in << "GraphBase::ComputingNode::Comment" << endl; + cdebug_in << "GraphBase::ComputingNode::Comment " << _Comment << endl; if ( _Comment != NULLSTRING ) delete [] _Comment; _Comment = my_strdup(c); - cdebug_out << "GraphBase::ComputingNode::Comment" << endl; + cdebug_out << "GraphBase::ComputingNode::Comment " << _Comment << endl; return true ; } @@ -597,7 +610,12 @@ bool GraphBase::ComputingNode::SaveXML( QDomDocument & Graph , QDomElement & inf QDomElement inParametertype = Graph.createElement("inParameter-type") ; // mpv: Linux 8.0 compiler compatibility // aField = Graph.createTextNode( (char *)ServiceInParameter()[i].Parametertype ) ; - aField = Graph.createTextNode( strdup(ServiceInParameter()[i].Parametertype) ) ; + if ( strlen( ServiceInParameter()[i].Parametertype ) ) { + aField = Graph.createTextNode( strdup( ServiceInParameter()[i].Parametertype ) ) ; + } + else { + aField = Graph.createTextNode( "?" ) ; + } inParameter.appendChild(inParametertype) ; inParametertype.appendChild( aField ) ; // f << Tabs << " " @@ -606,7 +624,12 @@ bool GraphBase::ComputingNode::SaveXML( QDomDocument & Graph , QDomElement & inf QDomElement inParametername = Graph.createElement("inParameter-name") ; // mpv: Linux 8.0 compiler compatibility // aField = Graph.createTextNode( (char *) ServiceInParameter()[i].Parametername ) ; - aField = Graph.createTextNode( strdup(ServiceInParameter()[i].Parametername) ) ; + if ( strlen( ServiceInParameter()[i].Parametername ) ) { + aField = Graph.createTextNode( strdup(ServiceInParameter()[i].Parametername) ) ; + } + else { + aField = Graph.createTextNode( "?" ) ; + } inParameter.appendChild(inParametername) ; inParametername.appendChild( aField ) ; // f << Tabs << " " << endl ; @@ -625,7 +648,12 @@ bool GraphBase::ComputingNode::SaveXML( QDomDocument & Graph , QDomElement & inf QDomElement outParametertype = Graph.createElement("outParameter-type") ; // mpv: Linux 8.0 compiler compatibility // aField = Graph.createTextNode( (char *) ServiceOutParameter()[i].Parametertype ) ; - aField = Graph.createTextNode( strdup(ServiceOutParameter()[i].Parametertype) ) ; + if ( strlen( ServiceOutParameter()[i].Parametertype ) ) { + aField = Graph.createTextNode( strdup(ServiceOutParameter()[i].Parametertype) ) ; + } + else { + aField = Graph.createTextNode( "?" ) ; + } outParameter.appendChild(outParametertype) ; outParametertype.appendChild( aField ) ; // f << Tabs << " " @@ -634,7 +662,12 @@ bool GraphBase::ComputingNode::SaveXML( QDomDocument & Graph , QDomElement & inf QDomElement outParametername = Graph.createElement("outParameter-name") ; // mpv: Linux 8.0 compiler compatibility // aField = Graph.createTextNode( (char *) ServiceOutParameter()[i].Parametername ) ; - aField = Graph.createTextNode( strdup(ServiceOutParameter()[i].Parametername) ) ; + if ( strlen( ServiceOutParameter()[i].Parametername ) ) { + aField = Graph.createTextNode( strdup(ServiceOutParameter()[i].Parametername) ) ; + } + else { + aField = Graph.createTextNode( "?" ) ; + } outParameter.appendChild(outParametername) ; outParametername.appendChild( aField ) ; // f << Tabs << " " << endl ; @@ -684,7 +717,7 @@ bool GraphBase::ComputingNode::SaveXML( QDomDocument & Graph , QDomElement & inf QDomElement PyFunction = Graph.createElement("PyFunction") ; PyFunctionlist.appendChild( PyFunction ) ; int j ; - for ( j = 0 ; j < (*PythonFunctions[i]).length() ; j++ ) { + for ( j = 0 ; j < (int ) (*PythonFunctions[i]).length() ; j++ ) { if ( j == 0 ) { // if ( i == 0 ) { // f << Tabs << " " << FuncNames[i].c_str() @@ -716,12 +749,12 @@ bool GraphBase::ComputingNode::SaveXML( QDomDocument & Graph , QDomElement & inf // char * aCDATAChar = (char *) (*PythonFunctions[i])[j] ; char * aCDATAChar = strdup ((*PythonFunctions[i])[j]) ; int i ; - for ( i = 0 ; i < strlen( aCDATAChar ) ; i++ ) { + for ( i = 0 ; i < (int ) strlen( aCDATAChar ) ; i++ ) { if ( aCDATAChar[ i ] != ' ' ) { break ; } } - if ( i == strlen( aCDATAChar ) ) { + if ( i == (int ) strlen( aCDATAChar ) ) { aCDATA = Graph.createCDATASection( "?" ) ; } else { @@ -820,13 +853,13 @@ bool GraphBase::ComputingNode::SavePY( ostream &f , const char * aGraphName , else if ( IsComputingNode() ) { int i ; f << Name() << "_ServiceinParameter = []" << endl ; - for ( i = 0 ; i < ServiceInParameter().length() ; i++ ) { + for ( i = 0 ; i < (int ) ServiceInParameter().length() ; i++ ) { f << Name() << "_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( '" << ServiceInParameter()[i].Parametertype << "' , '" << ServiceInParameter()[i].Parametername << "' ) )" << endl ; } f << Name() << "_ServiceoutParameter = []" << endl ; - for ( i = 0 ; i < ServiceOutParameter().length() ; i++ ) { + for ( i = 0 ; i < (int ) ServiceOutParameter().length() ; i++ ) { f << Name() << "_ServiceoutParameter.append( SALOME_ModuleCatalog.ServicesParameter( '" << ServiceOutParameter()[i].Parametertype << "' , '" << ServiceOutParameter()[i].Parametername << "' ) )" << endl ; @@ -848,7 +881,7 @@ bool GraphBase::ComputingNode::SavePY( ostream &f , const char * aGraphName , SUPERV::ListOfStrings aPyFunc ; if ( PythonFunctions.size() ) { aPyFunc = *PythonFunctions[0] ; - for ( i = 0 ; i < aPyFunc.length() ; i++ ) { + for ( i = 0 ; i < (int ) aPyFunc.length() ; i++ ) { f << "Py" << Name() << ".append( '" << aPyFunc[i] << "' )" << endl ; } } @@ -876,11 +909,11 @@ bool GraphBase::ComputingNode::SavePY( ostream &f , const char * aGraphName , SUPERV::ListOfStrings aPyMore = *PythonFunctions[1] ; SUPERV::ListOfStrings aPyNext = *PythonFunctions[2] ; f << "PyMore" << Name() << " = []" << endl ; - for ( i = 0 ; i < aPyMore.length() ; i++ ) { + for ( i = 0 ; i < (int ) aPyMore.length() ; i++ ) { f << "PyMore" << Name() << ".append( '" << aPyMore[i] << "' )" << endl ; } f << "PyNext" << Name() << " = []" << endl ; - for ( i = 0 ; i < aPyNext.length() ; i++ ) { + for ( i = 0 ; i < (int ) aPyNext.length() ; i++ ) { f << "PyNext" << Name() << ".append( '" << aPyNext[i] << "' )" << endl ; } f << Name() << "," << EndName << " = " << aGraphName << ".LNode( '" @@ -904,7 +937,7 @@ bool GraphBase::ComputingNode::SavePY( ostream &f , const char * aGraphName , << aCoupledNode->YCoordinate() << " )" << endl ; SUPERV::ListOfStrings aPyFunc = *aCoupledNode->PythonFunction() ; f << "Py" << aCoupledNode->Name() << " = []" << endl ; - for ( i = 0 ; i < aPyFunc.length() ; i++ ) { + for ( i = 0 ; i < (int ) aPyFunc.length() ; i++ ) { f << "Py" << aCoupledNode->Name() << ".append( '" << aPyFunc[i] << "' )" << endl ; } @@ -926,6 +959,18 @@ bool GraphBase::ComputingNode::SavePY( ostream &f , const char * aGraphName , } delete [] EndName ; } + } + + f << Name() << ".SetName( '" << Name() << "' )" << endl ; + f << Name() << ".SetAuthor( '" << Author() << "' )" << endl ; + if ( IsFactoryNode() ) { + f << Name() << ".SetContainer( '" << Computer << "' )" << endl ; + } + f << Name() << ".SetComment( '" << Comment() << "' )" << endl ; + f << Name() << ".Coords( " << XCoordinate << " , " << YCoordinate << " )" << endl ; + + if ( IsOneOfInLineNodes() ) { + int i ; for ( i = 0 ; i < GetNodeInPortsSize() ; i++ ) { const GraphBase::InPort * anInPort = GetNodeInPort(i) ; if ( anInPort->IsInLine() ) { @@ -942,14 +987,6 @@ bool GraphBase::ComputingNode::SavePY( ostream &f , const char * aGraphName , } } - f << Name() << ".SetName( '" << Name() << "' )" << endl ; - f << Name() << ".SetAuthor( '" << Author() << "' )" << endl ; - if ( IsFactoryNode() ) { - f << Name() << ".SetContainer( '" << Computer << "' )" << endl ; - } - f << Name() << ".SetComment( '" << Comment() << "' )" << endl ; - f << Name() << ".Coords( " << XCoordinate << " , " << YCoordinate << " )" << endl ; - #if 0 if ( IsLoopNode() || IsSwitchNode() ) { f << EndName << ".SetName( '" << CoupledNode @@ -975,8 +1012,7 @@ bool GraphBase::ComputingNode::SavePY( ostream &f , const char * aGraphName , return true ; } -void GraphBase::ComputingNode::NodeInfo(ostrstream & s) const { - int i ; +void GraphBase::ComputingNode::NodeInfo(ostream & s) const { s << *this ; ListPorts( s , true ) ; s << ends ; diff --git a/src/GraphBase/DataFlowBase_ComputingNode.hxx b/src/GraphBase/DataFlowBase_ComputingNode.hxx index 91a0f2d..3774b2d 100644 --- a/src/GraphBase/DataFlowBase_ComputingNode.hxx +++ b/src/GraphBase/DataFlowBase_ComputingNode.hxx @@ -12,6 +12,8 @@ #ifndef _DATAFLOWBASE_NODE_HXX #define _DATAFLOWBASE_NODE_HXX +#include "SALOME_NamingService.hxx" + #include "DataFlowBase_PortsOfNode.hxx" namespace GraphBase { @@ -25,7 +27,7 @@ namespace GraphBase { CORBA::ORB_ptr _ORB ; SALOME_NamingService * _NamingService ; int * _Graph_prof_debug ; - ostream * _Graph_fdebug ; + ofstream * _Graph_fdebug ; SUPERV::CNode_var _Node ; void * _InNode ; // From GraphExecutor:: or GraphEditor:: bool _ObjInterface ; @@ -71,7 +73,7 @@ namespace GraphBase { SALOME_NamingService* ptrNamingService , const char * DataFlowName , int * Graph_prof_debug = NULL , - ostream * Graph_fdebug = NULL ) ; + ofstream * Graph_fdebug = NULL ) ; ComputingNode( CORBA::ORB_ptr ORB , SALOME_NamingService* ptrNamingService , const SALOME_ModuleCatalog::Service& NodeService , @@ -86,7 +88,7 @@ namespace GraphBase { const long X , const long Y , int * Graph_prof_debug = NULL , - ostream * Graph_fdebug = NULL ) ; + ofstream * Graph_fdebug = NULL ) ; virtual ~ComputingNode() ; SALOME_NamingService * NamingService() const { @@ -281,7 +283,7 @@ namespace GraphBase { const GraphBase::ListOfPythonFunctions PythonFunctions , int X , int Y ) const ; - void NodeInfo(ostrstream & s) const ; + void NodeInfo(ostream & s) const ; void ListLinks(ostream &f ) const ; diff --git a/src/GraphBase/DataFlowBase_DataNode.cxx b/src/GraphBase/DataFlowBase_DataNode.cxx index 63051cd..96cf474 100644 --- a/src/GraphBase/DataFlowBase_DataNode.cxx +++ b/src/GraphBase/DataFlowBase_DataNode.cxx @@ -70,12 +70,10 @@ void GraphBase::DataNode::DataService( CORBA::ORB_ptr ORB , SALOME_ModuleCatalog::Service aService , int * Graph_prof_debug , - ostream * Graph_fdebug ) { -// cout << "GraphBase::DataNode::DataService : DataFlowPortsOfNode of " -// << aService.ServiceName << endl ; -// DefPortsOfNode( aService , aService.ServiceName ) ; + ofstream * Graph_fdebug ) { + cdebug << "GraphBase::DataNode::DataService : DataFlowPortsOfNode of " + << aService.ServiceName << endl ; DefPortsOfNode( ORB , aService , NamePtr() , Kind() , -// true , false , false , false , Graph_prof_debug , Graph_fdebug ) ; if ( _Created ) @@ -85,11 +83,10 @@ void GraphBase::DataNode::DataService( aReversedService.ServiceinParameter = aService.ServiceoutParameter ; aReversedService.ServiceoutParameter = aService.ServiceinParameter ; _DataFlowDataPorts = new PortsOfNode() ; -// cout << "GraphBase::DataNode::DataService : Mirrored DataFlowPortsOfNode of " -// << aReversedService.ServiceName << endl ; + cdebug << "GraphBase::DataNode::DataService : Mirrored DataFlowPortsOfNode of " + << aReversedService.ServiceName << endl ; _DataFlowDataPorts->DefPortsOfNode( ORB , aReversedService , NamePtr() , Kind() , -// true , false , false , false , Graph_prof_debug , Graph_fdebug ) ; _Created = true ; } @@ -139,12 +136,11 @@ int GraphBase::DataNode::CheckDataServerNodes() const { return ierr ; } -void GraphBase::DataNode::ListDatas(ostrstream & f ) const { +void GraphBase::DataNode::ListDatas(ostream & f ) const { _DataFlowDataPorts->ListPorts( f , false ) ; } -void GraphBase::DataNode::DataNodeInfo(ostrstream & s ) const { - int i ; +void GraphBase::DataNode::DataNodeInfo(ostream & s ) const { s << *this ; s << "Ports :" << endl ; ListPorts( s , true ) ; diff --git a/src/GraphBase/DataFlowBase_DataNode.hxx b/src/GraphBase/DataFlowBase_DataNode.hxx index d3ed5e0..c2ceff0 100644 --- a/src/GraphBase/DataFlowBase_DataNode.hxx +++ b/src/GraphBase/DataFlowBase_DataNode.hxx @@ -61,7 +61,7 @@ namespace GraphBase { void DataService( CORBA::ORB_ptr ORB , const SALOME_ModuleCatalog::Service aService , int * Graph_prof_debug , - ostream * Graph_fdebug ) ; + ofstream * Graph_fdebug ) ; int CheckDataServerNodes() const ; @@ -86,9 +86,9 @@ namespace GraphBase { InPort * GetChangeOutDataNodePort( const char * DataFlowOutPortName ) { return _DataFlowDataPorts->GetChangeInPort( DataFlowOutPortName ) ; } ; - void DataNodeInfo(ostrstream & s ) const ; + void DataNodeInfo(ostream & s ) const ; - void ListDatas(ostrstream & f) const ; + void ListDatas(ostream & f) const ; // bool SaveXML( ostream &f , char *Tabs , bool SaveXML( QDomDocument & Graph , QDomElement & info , diff --git a/src/GraphBase/DataFlowBase_DataPort.cxx b/src/GraphBase/DataFlowBase_DataPort.cxx index 4334283..a623fdf 100644 --- a/src/GraphBase/DataFlowBase_DataPort.cxx +++ b/src/GraphBase/DataFlowBase_DataPort.cxx @@ -48,27 +48,51 @@ void GraphBase::DataPort::InitialValues(CORBA::Any aValue ) { CORBA::Any InitialValue ; cdebug << "InitialValues " << NodeName() << " " << PortName() << " " << PortType() << " : " ; - if ( !strcmp( Type , "string" ) ) { + if ( !strcmp( Type , "" ) ) { + cdebug << "void" << endl ; + InitialValue <<= (void *) NULL ; + } + else if ( !strcmp( Type , "string" ) ) { cdebug << "string" << endl ; InitialValue <<= (char *) NULL ; } - else if ( !strcmp( Type , "double" ) ) { - cdebug << "double" << endl ; - InitialValue <<= 0. ; + else if ( !strcmp( Type , "boolean" ) ) { + cdebug << "boolean" << endl ; + InitialValue <<= (long ) 0 ; + } + else if ( !strcmp( Type , "char" ) ) { + cdebug << "char" << endl ; + InitialValue <<= (long ) 0 ; + } + else if ( !strcmp( Type , "short" ) ) { + cdebug << "short" << endl ; + InitialValue <<= (long ) 0 ; + } + else if ( !strcmp( Type , "int" ) ) { + cdebug << "long" << endl ; + InitialValue <<= (long ) 0 ; } else if ( !strcmp( Type , "long" ) ) { cdebug << "long" << endl ; InitialValue <<= (long ) 0 ; } - else if ( !strcmp( Type , "objref" ) ) { + else if ( !strcmp( Type , "float" ) ) { + cdebug << "float" << endl ; + InitialValue <<= (double ) 0. ; + } + else if ( !strcmp( Type , "double" ) ) { + cdebug << "double" << endl ; + InitialValue <<= (double ) 0. ; + } + else { // Default cdebug << "objref" << endl ; // InitialValue.replace(CORBA::_tc_Object, NULL); InitialValue <<= CORBA::Object::_nil() ; } - else { - cdebug << "InitialValues ERROR (other) " << Type << endl ; - InitialValue <<= (long ) 0 ; - } +// else { +// cdebug << "InitialValues ERROR (other) " << Type << endl ; +// InitialValue <<= (long ) 0 ; +// } _InitialValue = new CORBA::Any( InitialValue ) ; _Value = &_InitialValue ; } @@ -88,43 +112,180 @@ void GraphBase::DataPort::Value( const CORBA::Any * aDataValue ) { // << endl ; delete _theValue ; - _theValue = aDataValue ; - *_Value = aDataValue ; -// Done( true ) ; -#if 0 - cdebug << "NewValue " << NodeName() << " " << PortName() << " " << PortType() - << " : " << _Value << " *_Value " << *_Value << " " ; - switch (_theValue->type()->kind()) { - case CORBA::tk_string: { + string _Type = CORBA::string_dup( GetServicesParameter().Parametertype ) ; + const char * Type = _Type.c_str() ; + _Value = &_theValue ; +// cdebug << "NewValue " << NodeName() << " " << PortName() << " " << PortType() +// << " : " << aDataValue << " kind " << aDataValue->type()->kind() << " " ; + switch (aDataValue->type()->kind()) { // Input Value + case CORBA::tk_string: { // Input string Value char * t; - *_theValue >>= t; - cdebug << "Value( " << t << ") (string)"; + *aDataValue >>= t; + cdebug << t << " (string)" ; + if ( !strcmp( Type , "string" ) ) { // SuperVision Value + _theValue = aDataValue ; + *_theValue >>= t; +// cdebug << " == Value( " << t << ") (string)"; + } + else { + CORBA::Any * theValue = new CORBA::Any() ; + if ( !strcmp( Type , "boolean" ) || !strcmp( Type , "char" ) || + !strcmp( Type , "short" ) || !strcmp( Type , "int" ) || !strcmp( Type , "long" ) ) { + long l ; + sscanf( t , "%ld" , &l ) ; + *theValue <<= l ; + *theValue >>= l; +// cdebug << " --> Value( " << l << ") (long) kind " << theValue->type()->kind() ; + } + else if ( !strcmp( Type , "float" ) || !strcmp( Type , "double" ) ) { + double d ; + sscanf( t , "%lf" , &d ) ; + *theValue <<= d ; + *theValue >>= d; +// cdebug << " --> Value( " << d << ") (double) kind " << theValue->type()->kind() ; + } + else { // Default + CORBA::Object_ptr ObjRef ; + try { + ObjRef = StringToObject( t ) ; + *theValue <<= ObjRef ; + } + catch( ... ) { + *theValue <<= CORBA::Object::_nil() ; + } + *theValue >>= ObjRef ; +// cdebug << " --> Value( " << ObjectToString( ObjRef ) << ") (object reference) kind " +// << theValue->type()->kind() ; + } + _theValue = theValue ; + *_Value = theValue ; + } break; } - case CORBA::tk_double: { - double d; - *_theValue >>= d; - cdebug << "Value( " << d << ") (double)"; + case CORBA::tk_long: { // Input long Value + long l; + *aDataValue >>= l; +// cdebug << "Value( " << l << ") (long)"; + if ( !strcmp( Type , "boolean" ) || !strcmp( Type , "char" ) || + !strcmp( Type , "short" ) || !strcmp( Type , "int" ) || !strcmp( Type , "long" ) ) { // SuperVision Value + _theValue = aDataValue ; + *_Value = aDataValue ; + *_theValue >>= l; +// cdebug << " == Value( " << l << ") (long)"; + } + else { + CORBA::Any * theValue = new CORBA::Any() ; + if ( !strcmp( Type , "string" ) ) { + char t[40] ; + sprintf( t , "%ld" , l ) ; + *theValue <<= t ; + char *tt ; + *theValue >>= tt ; +// cdebug << " --> Value( " << t << ") (string) kind " << theValue->type()->kind() ; + } + else if ( !strcmp( Type , "float" ) || !strcmp( Type , "double" ) ) { + double d = l ; + *theValue <<= d ; + *theValue >>= d ; +// cdebug << " --> Value( " << d << ") (double) kind " << theValue->type()->kind() ; + } + else { // Default + CORBA::Object_ptr ObjRef ; + *theValue <<= CORBA::Object::_nil() ; + *theValue >>= ObjRef ; +// cdebug << " --> Value( " << ObjectToString( ObjRef ) << ") (object reference) kind " +// << theValue->type()->kind() ; + } + _theValue = theValue ; + *_Value = theValue ; + } break; } - case CORBA::tk_long: { - long l; - *_theValue >>= l; - cdebug << "Value( " << l << ") (long)"; + case CORBA::tk_double: { // Input double Value + double d; + *aDataValue >>= d; +// cdebug << "Value( " << d << ") (double)"; + if ( !strcmp( Type , "float" ) || !strcmp( Type , "double" ) ) { // SuperVision Value + _theValue = aDataValue ; + *_Value = aDataValue ; + *_theValue >>= d; +// cdebug << " == Value( " << d << ") (double)"; + } + else { + CORBA::Any * theValue = new CORBA::Any() ; + if ( !strcmp( Type , "string" ) ) { + char t[40] ; + sprintf( t , "%lf" , d ) ; + *theValue <<= t ; + char *tt ; + *theValue >>= tt ; +// cdebug << " --> Value( " << t << ") (string) kind " << theValue->type()->kind() ; + } + else if ( !strcmp( Type , "boolean" ) || !strcmp( Type , "char" ) || + !strcmp( Type , "short" ) || !strcmp( Type , "int" ) || !strcmp( Type , "long" ) ) { + long l = (long ) d ; + *theValue <<= l ; + *theValue >>= l; +// cdebug << " --> Value( " << l << ") (long) kind " << theValue->type()->kind() ; + } + else { // Default + CORBA::Object_ptr ObjRef ; + *theValue <<= CORBA::Object::_nil() ; + *theValue >>= ObjRef ; +// cdebug << " --> Value( " << ObjectToString( ObjRef ) << ") (object reference) kind " +// << theValue->type()->kind() ; + } + _theValue = theValue ; + *_Value = theValue ; + } break; } - case CORBA::tk_objref: { - cdebug << "Value( " << ") (object reference)"; + case CORBA::tk_objref: { // Input objref Value + CORBA::Object_ptr obj ; + *aDataValue >>= obj; +// cdebug << "Value( " << ObjectToString( obj ) << ") (object reference)"; + if ( strcmp( Type , "string" ) && + strcmp( Type , "boolean" ) && strcmp( Type , "char" ) && + strcmp( Type , "short" ) && strcmp( Type , "long" ) && + strcmp( Type , "double" ) ) { // SuperVision Default Value + _theValue = aDataValue ; + *_Value = aDataValue ; + *_theValue >>= obj; +// cdebug << " == Value( " << ObjectToString( obj ) << ") (object reference)"; + } + else { + CORBA::Any * theValue = new CORBA::Any() ; + if ( !strcmp( Type , "string" ) ) { + *theValue <<= ObjectToString( obj ) ; + *theValue >>= obj ; +// cdebug << " --> Value( " << ObjectToString( obj ) << ") (string) kind " << theValue->type()->kind() ; + } + else if ( !strcmp( Type , "boolean" ) || !strcmp( Type , "char" ) || + !strcmp( Type , "short" ) || !strcmp( Type , "int" ) || !strcmp( Type , "long" ) ) { + long l = (long ) obj ; + *theValue <<= l ; + *theValue >>= l; +// cdebug << " --> Value( " << l << ") (long) kind " << theValue->type()->kind() ; + } + else if ( !strcmp( Type , "float" ) || !strcmp( Type , "double" ) ) { + double d = (double ) 0. ; + *theValue <<= d ; + *theValue >>= d; +// cdebug << " --> Value( " << d << ") (double) kind " << theValue->type()->kind() ; + } + _theValue = theValue ; + *_Value = theValue ; + } break; } default: { - cdebug << "Value" << " (other(tk_string,tk_double,tk_long,tk_objref)) ERROR"; + cdebug << "Value" << " (other(tk_string,tk_double,tk_long,tk_objref)) ERROR kind " + << aDataValue->type()->kind() ; break; } } cdebug << endl ; -#endif if ( pthread_mutex_unlock( &_MutexWait ) ) { perror( "unlock DataValue" ) ; exit( 0 ) ; @@ -180,8 +341,14 @@ CORBA::Any const * GraphBase::DataPort::Value() const { const CORBA::Any *const Value = *_Value ; CORBA::Any * theValue ; // cdebug << pthread_self() << " Value " << NodeName() << " " << PortName() << " " -// << PortType() << " _Value " << _Value << " *_Value " << *_Value << " kind " -// << Value->type()->kind() << " :" << endl ; +// << PortType() << " _Value " << _Value << " *_Value " << *_Value << " Value->type " +// << Value->type() ; + if ( Value->type() ) { +// cdebug << " kind " << Value->type()->kind() << " :" << endl ; + } + else { +// cdebug << " Null" << endl ; + } if ( Done() ) { theValue = new CORBA::Any( *Value ) ; switch ( theValue->type()->kind() ) { @@ -218,8 +385,8 @@ CORBA::Any const * GraphBase::DataPort::Value() const { break; } default: { - cdebug << "GraphBase::DataPort::Value() : " - << "(other(tk_string,tk_double,tk_long,tk_objref)) ERROR" << endl ; + cdebug << "GraphBase::DataPort::Value() : " << NodeName() << "( " << PortName() << " ) " << PortType() + << " (other(tk_string,tk_double,tk_long,tk_objref)) ERROR" << endl ; break; } } diff --git a/src/GraphBase/DataFlowBase_EndOfLoopNode.cxx b/src/GraphBase/DataFlowBase_EndOfLoopNode.cxx index b88d135..ae2a873 100644 --- a/src/GraphBase/DataFlowBase_EndOfLoopNode.cxx +++ b/src/GraphBase/DataFlowBase_EndOfLoopNode.cxx @@ -10,8 +10,8 @@ // $Header: using namespace std; -#include -#include +//#include +//#include #include "DataFlowBase_EndOfLoopNode.hxx" @@ -39,7 +39,7 @@ GraphBase::EndOfLoopNode::EndOfLoopNode( CORBA::ORB_ptr ORB , const long X , const long Y , int * Graph_prof_debug , - ostream * Graph_fdebug ) : + ofstream * Graph_fdebug ) : GraphBase::GOTONode::GOTONode( ORB , ptrNamingService , FuncName , anInitPythonFunction , NodeName , akind , NodeFirstCreation , diff --git a/src/GraphBase/DataFlowBase_EndOfLoopNode.hxx b/src/GraphBase/DataFlowBase_EndOfLoopNode.hxx index 2e3de4b..70b1fa0 100644 --- a/src/GraphBase/DataFlowBase_EndOfLoopNode.hxx +++ b/src/GraphBase/DataFlowBase_EndOfLoopNode.hxx @@ -38,7 +38,7 @@ namespace GraphBase { const long X , const long Y , int * Graph_prof_debug = NULL , - ostream * Graph_fdebug = NULL ) ; + ofstream * Graph_fdebug = NULL ) ; virtual ~EndOfLoopNode() ; }; diff --git a/src/GraphBase/DataFlowBase_EndOfSwitchNode.cxx b/src/GraphBase/DataFlowBase_EndOfSwitchNode.cxx index da5459a..dc3e23c 100644 --- a/src/GraphBase/DataFlowBase_EndOfSwitchNode.cxx +++ b/src/GraphBase/DataFlowBase_EndOfSwitchNode.cxx @@ -10,8 +10,8 @@ // $Header: using namespace std; -#include -#include +//#include +//#include #include "DataFlowBase_EndOfSwitchNode.hxx" @@ -39,7 +39,7 @@ GraphBase::EndOfSwitchNode::EndOfSwitchNode( CORBA::ORB_ptr ORB , const long X , const long Y , int * Graph_prof_debug , - ostream * Graph_fdebug ) : + ofstream * Graph_fdebug ) : GraphBase::GOTONode::GOTONode( ORB , ptrNamingService , FuncName , aPythonFunction , NodeName , akind , NodeFirstCreation , diff --git a/src/GraphBase/DataFlowBase_EndOfSwitchNode.hxx b/src/GraphBase/DataFlowBase_EndOfSwitchNode.hxx index 501b7cf..f362634 100644 --- a/src/GraphBase/DataFlowBase_EndOfSwitchNode.hxx +++ b/src/GraphBase/DataFlowBase_EndOfSwitchNode.hxx @@ -38,7 +38,7 @@ namespace GraphBase { const long X , const long Y , int * Graph_prof_debug = NULL , - ostream * Graph_fdebug = NULL ) ; + ofstream * Graph_fdebug = NULL ) ; virtual ~EndOfSwitchNode() ; }; diff --git a/src/GraphBase/DataFlowBase_FactoryNode.cxx b/src/GraphBase/DataFlowBase_FactoryNode.cxx index 52d09f5..3095735 100644 --- a/src/GraphBase/DataFlowBase_FactoryNode.cxx +++ b/src/GraphBase/DataFlowBase_FactoryNode.cxx @@ -10,17 +10,14 @@ // $Header: using namespace std; -#include -#include +//#include +//#include #include "DataFlowBase_FactoryNode.hxx" static void InitFields( char * &_ComponentName , char * &_InterfaceName , char * &_Computer ) { - time_t T = time(NULL); - struct tm * Tm = localtime(&T); - _ComponentName = NULLSTRING ; _InterfaceName = NULLSTRING ; @@ -48,7 +45,7 @@ GraphBase::FactoryNode::FactoryNode( CORBA::ORB_ptr ORB , SALOME_NamingService* ptrNamingService , const char * aDataFlowName , int * Graph_prof_debug , - ostream * Graph_fdebug ) : + ofstream * Graph_fdebug ) : GraphBase::ComputingNode::ComputingNode( ORB , ptrNamingService , aDataFlowName , Graph_prof_debug , Graph_fdebug ) { @@ -70,11 +67,11 @@ GraphBase::FactoryNode::FactoryNode( CORBA::ORB_ptr ORB , } GraphBase::FactoryNode::FactoryNode( CORBA::ORB_ptr ORB , - SALOME_NamingService* ptrNamingService , + SALOME_NamingService * ptrNamingService , const SALOME_ModuleCatalog::Service& aService , - const char *ComponentName , - const char* InterfaceName , - const char *NodeName , + const char * ComponentName , + const char * InterfaceName , + const char * NodeName , const SUPERV::KindOfNode akind , const SUPERV::SDate NodeFirstCreation , const SUPERV::SDate NodeLastModification , @@ -86,7 +83,7 @@ GraphBase::FactoryNode::FactoryNode( CORBA::ORB_ptr ORB , const long X , const long Y , int * Graph_prof_debug , - ostream * Graph_fdebug ) : + ofstream * Graph_fdebug ) : GraphBase::ComputingNode::ComputingNode( ORB , ptrNamingService , aService , NodeName , akind , NodeFirstCreation , NodeLastModification , @@ -103,16 +100,16 @@ GraphBase::FactoryNode::FactoryNode( CORBA::ORB_ptr ORB , _InterfaceName = new char[strlen(InterfaceName)+1]; strcpy(_InterfaceName , InterfaceName ) ; - if ( NodeComputer ) { + if ( NodeComputer != NULLSTRING) { _Computer = new char[ strlen( NodeComputer ) + 1 ] ; strcpy( _Computer , NodeComputer ) ; } - else + else { _Computer = FACTORYSERVER ; + } - cdebug_in << "GraphBase::FactoryNode::FactoryNode(" << aService.ServiceName << "," - << ComponentName << "," << Name() << "," << akind - << "," << NodeComputer << "," << Comment() << ")" << endl; + cdebug_in << "GraphBase::FactoryNode::FactoryNode( '" << aService.ServiceName << "','" + << _ComponentName << "','" << Name() << "'," << akind << ",'" << _Computer << "'" << endl; cdebug << "GraphBase::FactoryNode::FactoryNode " << this << " _ComponentName " @@ -121,8 +118,8 @@ GraphBase::FactoryNode::FactoryNode( CORBA::ORB_ptr ORB , << (void *) _InterfaceName << " '" << _InterfaceName << "' _Name " << (void *) Name() << " '" << Name() << "' _Computer " << (void *) _Computer << " " << _Computer << " _Comment " - << (void *) Comment() << " " << Comment() << " " - << " KindOfNode " << Kind() + << (void *) Comment() << " '" << Comment() << " " + << "' KindOfNode " << Kind() << " ServiceName " << ServiceName() << " In(" << ServiceInParameter().length() << ") Out(" << ServiceOutParameter().length() << ")" << endl ; diff --git a/src/GraphBase/DataFlowBase_FactoryNode.hxx b/src/GraphBase/DataFlowBase_FactoryNode.hxx index 7c7e03d..e4d86a8 100644 --- a/src/GraphBase/DataFlowBase_FactoryNode.hxx +++ b/src/GraphBase/DataFlowBase_FactoryNode.hxx @@ -35,7 +35,7 @@ namespace GraphBase { SALOME_NamingService* ptrNamingService , const char * DataFlowName , int * Graph_prof_debug = NULL , - ostream * Graph_fdebug = NULL ) ; + ofstream * Graph_fdebug = NULL ) ; FactoryNode( CORBA::ORB_ptr ORB , SALOME_NamingService* ptrNamingService , const SALOME_ModuleCatalog::Service& NodeService , @@ -53,7 +53,7 @@ namespace GraphBase { const long X , const long Y , int * Graph_prof_debug = NULL , - ostream * Graph_fdebug = NULL ) ; + ofstream * Graph_fdebug = NULL ) ; virtual ~FactoryNode() ; Engines::Container_var Container() const { return _Container ; } ; diff --git a/src/GraphBase/DataFlowBase_GOTONode.cxx b/src/GraphBase/DataFlowBase_GOTONode.cxx index 1aba05f..e31dee6 100644 --- a/src/GraphBase/DataFlowBase_GOTONode.cxx +++ b/src/GraphBase/DataFlowBase_GOTONode.cxx @@ -10,8 +10,8 @@ // $Header: using namespace std; -#include -#include +//#include +//#include #include "DataFlowBase_GOTONode.hxx" @@ -40,7 +40,7 @@ GraphBase::GOTONode::GOTONode( CORBA::ORB_ptr ORB , const long X , const long Y , int * Graph_prof_debug , - ostream * Graph_fdebug ) : + ofstream * Graph_fdebug ) : GraphBase::InLineNode::InLineNode( ORB , ptrNamingService , FuncName , aPythonFunction , NodeName , akind , NodeFirstCreation , NodeLastModification , NodeEditorRelease , diff --git a/src/GraphBase/DataFlowBase_GOTONode.hxx b/src/GraphBase/DataFlowBase_GOTONode.hxx index b3aa9c9..97089aa 100644 --- a/src/GraphBase/DataFlowBase_GOTONode.hxx +++ b/src/GraphBase/DataFlowBase_GOTONode.hxx @@ -40,7 +40,7 @@ namespace GraphBase { const long X , const long Y , int * Graph_prof_debug = NULL , - ostream * Graph_fdebug = NULL ) ; + ofstream * Graph_fdebug = NULL ) ; virtual ~GOTONode() ; void CoupledNode( InLineNode * aCoupledNode ) { diff --git a/src/GraphBase/DataFlowBase_Graph.cxx b/src/GraphBase/DataFlowBase_Graph.cxx index f9db952..c57f950 100644 --- a/src/GraphBase/DataFlowBase_Graph.cxx +++ b/src/GraphBase/DataFlowBase_Graph.cxx @@ -42,26 +42,26 @@ GraphBase::Graph::Graph( CORBA::ORB_ptr ORB , const char *DataFlowName , const char * DebugFileName ) : DataNode( ORB ,ptrNamingService , DataFlowName ) { - cdebug << "GraphBase::Graph::Graph" << endl ; + Set_prof_debug( ORB , DebugFileName ) ; + cdebug << "GraphBase::Graph::Graph( " << DataFlowName << ")" << endl ; _Orb = CORBA::ORB::_duplicate( ORB ) ; _GraphNodesSize = 0 ; - Set_prof_debug( ORB , DebugFileName ) ; } GraphBase::Graph::Graph( 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 ) : + 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 ) : DataNode( ORB , ptrNamingService , DataFlowService , DataFlowName , DataFlowkind , DataFlowFirstCreation , DataFlowLastModification , @@ -84,10 +84,9 @@ void GraphBase::Graph::Set_prof_debug( CORBA::ORB_ptr ORB , if ( DebugFileName ) { _Graph_fdebug = new ofstream( DebugFileName ); MESSAGE( endl << "Trace redirected to file " << DebugFileName << endl) + SetDebug( ORB , &_Graph_prof_debug , _Graph_fdebug ) ; } - else - _Graph_fdebug = &(std::cerr); - SetDebug( ORB , &_Graph_prof_debug , _Graph_fdebug ) ; + cdebug << "GraphBase::Graph::Set_prof_debug redirect Trace to file " << DebugFileName << endl ; } GraphBase::SNode * GraphBase::Graph::GetInfo() const { @@ -251,7 +250,7 @@ GraphBase::ListOfNodes * GraphBase::Graph::GetNodes() const { // Function : GetLinks // Purpose : get a links list //---------------------------------------------------------------------- -GraphBase::ListOfLinks * GraphBase::Graph::GetLinks() const { +GraphBase::ListOfLinks * GraphBase::Graph::GetLinks(bool AllLinks ) const { GraphBase::ListOfLinks * _list_links = new GraphBase::ListOfLinks; @@ -261,31 +260,42 @@ GraphBase::ListOfLinks * GraphBase::Graph::GetLinks() const { int ind = 0 ; int k ; for ( k = 0 ; k < GraphNodesSize() ; k++ ) { - GraphBase::ComputingNode * aNode = GraphNodes( k ) ; + GraphBase::ComputingNode * fromNode = GraphNodes( k ) ; int i ; - for ( i = 0 ; i < aNode->GetNodeOutPortsSize() ; i++ ) { - const GraphBase::OutPort* fromPort = aNode->GetNodeOutPort( i ) ; -// cout << "GraphBase::Graph::GetLinks " << aNode->Name() << " " -// << fromPort->PortName() << " " << fromPort->IsPortConnected() -// << " " << fromPort->InPortsSize() << endl ; - if ( fromPort->IsPortConnected() ) { + for ( i = 0 ; i < fromNode->GetNodeOutPortsSize() ; i++ ) { + const GraphBase::OutPort* fromPort = fromNode->GetNodeOutPort( i ) ; +// if ( fromPort->IsPortConnected() && ( !fromPort->IsLoop() || AllLinks ) ) { int j ; for ( j = 0 ; j < fromPort->InPortsSize() ; j++ ) { - _list_links->resize( ind+1 ); - (*_list_links)[ind].FromNodeName = CORBA::string_dup( aNode->Name() ); - (*_list_links)[ind].FromServiceParameterName = fromPort->GetServicesParameter().Parametername; const GraphBase::InPort* toPort = fromPort->InPorts( j ) ; - (*_list_links)[ind].ToNodeName = CORBA::string_dup( toPort->NodeName() ); - (*_list_links)[ind].ToServiceParameterName = toPort->GetServicesParameter().Parametername; - (*_list_links)[ind].aLinkValue = *fromPort->Value() ; - if ( toPort->IsEndSwitch() ) { - (*_list_links)[ind++].aListOfCoords = *(fromPort->Coords()) ; +// Desole pour ce cast mais avec les maps difficile de faire const ... + const GraphBase::ComputingNode * toNode = ((GraphBase::Graph * ) this)->GetGraphNode( toPort->NodeName() ) ; + if ( !(fromPort->IsLoop() && toPort->IsLoop() ) || AllLinks ) { + cdebug << "GraphBase::Graph::GetLinks " << fromNode->Name() << " (" + << fromPort->PortName() << " ) IsPortConnected" << fromPort->IsPortConnected() + << " --> " << toNode->Name() << "( " << toPort->PortName() << " ) " + << " " << fromPort->InPortsSize() << " ports" << endl ; + _list_links->resize( ind+1 ); + (*_list_links)[ind].FromNodeName = CORBA::string_dup( fromNode->Name() ); + (*_list_links)[ind].FromServiceParameterName = fromPort->GetServicesParameter().Parametername; + (*_list_links)[ind].ToNodeName = CORBA::string_dup( toPort->NodeName() ); + (*_list_links)[ind].ToServiceParameterName = toPort->GetServicesParameter().Parametername; + (*_list_links)[ind].aLinkValue = *fromPort->Value() ; + if ( toPort->IsEndSwitch() ) { + (*_list_links)[ind++].aListOfCoords = *(fromPort->Coords()) ; + } + else { + (*_list_links)[ind++].aListOfCoords = *(toPort->Coords()) ; + } } else { - (*_list_links)[ind++].aListOfCoords = *(toPort->Coords()) ; + cdebug << "GraphBase::Graph::GetLinks " << fromNode->Name() << " " + << fromPort->PortName() << " ) IsPortConnected" << fromPort->IsPortConnected() + << " --> " << toNode->Name() << "( " << toPort->PortName() << " ) " + << " " << fromPort->InPortsSize() << " ports ignored" << endl ; } } - } +// } } } @@ -562,7 +572,7 @@ bool GraphBase::Graph::AddLink( const char* ToServiceParameterName , const CORBA::Any aValue ) { bool RetVal ; - int index ; +// int index ; cdebug_in << "GraphBase::Graph::AddLink(" << FromNodeName << "(" << FromServiceParameterName << ") ---> " << ToNodeName << "(" << ToServiceParameterName << ") )" << endl; @@ -617,7 +627,7 @@ bool GraphBase::Graph::AddLink( GraphBase::OutPort *fromPort , GraphBase::ComputingNode *toNode , GraphBase::InPort *toPort ) { - bool RetVal ; +// bool RetVal ; if ( !fromNode ) { cdebug << "AddLink fromNode not found." << endl ; @@ -789,8 +799,8 @@ bool GraphBase::Graph::RemoveLink( const char* FromNodeName , const char* FromServiceParameterName , const char* ToNodeName , const char* ToServiceParameterName ) { - cdebug_in << "GraphBase::Graph::RemoveLink to " << ToNodeName << "(" - << ToServiceParameterName << ")" << endl; + cdebug_in << "GraphBase::Graph::RemoveLink from " << FromNodeName << "(" << FromServiceParameterName << ")" + << " to " << ToNodeName << "(" << ToServiceParameterName << ")" << endl; bool RetVal = false ; GraphBase::ComputingNode * toNode = GetChangeGraphNode( ToNodeName ) ; if ( toNode ) { @@ -802,11 +812,35 @@ bool GraphBase::Graph::RemoveLink( const char* FromNodeName , anInPort->RemoveOutPort() ; const char * FromNodeName = anOutPort->NodeName() ; GraphBase::ComputingNode * fromNode = GetChangeGraphNode( FromNodeName ) ; - if ( fromNode ) { - fromNode->RemoveLink( toNode ) ; - } - if ( fromNode->IsSwitchNode() ) { - anOutPort->Kind( SUPERV::InLineParameter ) ; + if ( RetVal ) { + if ( fromNode ) { + fromNode->RemoveLink( toNode ) ; + } + if ( fromNode->IsSwitchNode() ) { + anOutPort->Kind( SUPERV::InLineParameter ) ; + } +#if 0 + if ( fromNode->IsEndLoopNode() ) { + toNode = ((GraphBase::EndOfLoopNode * ) fromNode)->CoupledNode() ; + if ( toNode ) { + anInPort = toNode->GetChangeInPort( ToServiceParameterName ) ; + RetVal = AddLink( fromNode , anOutPort , toNode , anInPort ) ; + } + else { + RetVal = false ; + } + } + if ( toNode->IsLoopNode() ) { + fromNode = ((GraphBase::LoopNode * ) toNode)->CoupledNode() ; + if ( fromNode ) { + anOutPort = fromNode->GetChangeOutPort( FromServiceParameterName ) ; + RetVal = AddLink( fromNode , anOutPort , toNode , toNode->GetChangeInPort( ToServiceParameterName ) ) ; + } + else { + RetVal = false ; + } + } +#endif } } } @@ -926,12 +960,12 @@ bool GraphBase::Graph::AddInputData( const char* ToNodeName , return RetVal ; } -bool GraphBase::Graph::ChangeInputData( const char* ToNodeName , - const char* ToServiceParameterName , +bool GraphBase::Graph::ChangeInputData( const char * ToNodeName , + const char * ToServiceParameterName , const CORBA::Any aValue ) { bool RetVal = false ; - cdebug_in << "GraphBase::Graph::ChangeInputData(" << ToNodeName << "," - << ToServiceParameterName << " Any " ; + cdebug_in << "GraphBase::Graph::ChangeInputData( '" << ToNodeName << "' , '" + << ToServiceParameterName << "' , Any " ; switch (aValue.type()->kind()) { case CORBA::tk_string: char * t; @@ -980,7 +1014,7 @@ bool GraphBase::Graph::ChangeInputData( const char* ToNodeName , } } else { - cdebug << "ChangeInputData Node not found" << endl ; + cdebug << "ChangeInputData Node not found : " << ToNodeName << endl ; } cdebug_out << "GraphBase::Graph::ChangeInputData" << endl; @@ -1117,10 +1151,10 @@ bool GraphBase::Graph::AddOutputData( bool GraphBase::Graph::CreateService() { cdebug_in << "GraphBase::Graph::CreateService" << endl; - + bool RetVal = true ; SALOME_ModuleCatalog::Service aService ; int i , j ; - GraphBase::ComputingNode * iN ; + GraphBase::ComputingNode * aToNode ; int dostore ; int innbr ; int outnbr ; @@ -1135,18 +1169,34 @@ bool GraphBase::Graph::CreateService() { innbr = 0 ; outnbr = 0 ; for ( i = 0 ; i < GraphNodesSize() ; i++ ) { - iN = GraphNodes( i ) ; - for ( j = 0 ; j < iN->GetNodeInPortsSize() ; j++ ) { - GraphBase::InPort *anInPort = iN->GetChangeNodeInPort(j) ; - if ( !anInPort->IsConnected() && !anInPort->IsGate() ) { -// !anInPort->IsLoop() ) { -// if ( !anInPort->IsGate() && !anInPort->IsConnected() && -// !( iN->IsLoopNode() && anInPort->IsBus() && anInPort->IsParam() )) { + aToNode = GraphNodes( i ) ; + for ( j = 0 ; j < aToNode->GetNodeInPortsSize() ; j++ ) { + GraphBase::InPort *anInPort = aToNode->GetChangeNodeInPort(j) ; +#if 0 + if ( dostore == 0 && + strcmp( anInPort->ServicesParameterType() , "string" ) && + strcmp( anInPort->ServicesParameterType() , "long" ) && + strcmp( anInPort->ServicesParameterType() , "double" ) && + strcmp( anInPort->ServicesParameterType() , "objref" ) ) { + cdebug << "CreateService Node " << aToNode->Name() << ". Input port " << anInPort->PortName() + << " has illegal type " << anInPort->ServicesParameterType() << endl ; + RetVal = false ; + } +#endif + bool isfromcouplednode = false ; + if ( anInPort->IsConnected() && anInPort->GetOutPort() ) { + GraphBase::ComputingNode * aFromNode = GetChangeGraphNode( anInPort->GetOutPort()->NodeName() ) ; + if ( aFromNode->IsEndLoopNode() && ((GraphBase::EndOfLoopNode * ) aFromNode)->CoupledNode() == aToNode ) { + isfromcouplednode = true ; + } + } + if ( !anInPort->IsGate() && !anInPort->IsLoop() && + ( !anInPort->IsConnected() || ( anInPort->IsConnected() && isfromcouplednode ) ) ) { if ( dostore == 0 ) { - cdebug << "CreateService " << iN->Name() << " Input port " - << anInPort->PortName() << " is NOT connected " ; + cdebug << "CreateService " << aToNode->Name() << " Input port " + << anInPort->PortName() << " " << anInPort->Kind() << " is NOT connected " ; if ( anInPort->GetOutPort() ) { - cdebug << *(anInPort->GetOutPort()) ; + cdebug << "DataConnected from " << *(anInPort->GetOutPort() ) ; } cdebug << endl ; innbr += 1 ; @@ -1156,15 +1206,53 @@ bool GraphBase::Graph::CreateService() { aService.ServiceinParameter[innbr++].Parametername = CORBA::string_dup( anInPort->NodePortName() ) ; } } + else { + cdebug << "CreateService " << aToNode->Name() << " Input port " << anInPort->PortName() ; + if ( anInPort->IsConnected() ) { + cdebug << " is connected " ; + } + else { + cdebug << " is NOT connected " ; + } + if ( anInPort->IsGate() ) { + cdebug << " IsGate " ; + } + if ( anInPort->GetOutPort() ) { + cdebug << "DataConnected from " << *(anInPort->GetOutPort()) ; + } + else { + cdebug << "NOT DataConnected" ; + } + cdebug << endl ; + } } - if ( !iN->IsGOTONode() ) { - for ( j = 0 ; j < iN->GetNodeOutPortsSize() ; j++ ) { - GraphBase::OutPort *anOutPort = iN->GetChangeNodeOutPort(j) ; + GraphBase::ComputingNode * aFromNode = aToNode ; + for ( j = 0 ; j < aFromNode->GetNodeOutPortsSize() ; j++ ) { + GraphBase::OutPort *anOutPort = aFromNode->GetChangeNodeOutPort(j) ; + cdebug << "CreateService Node " << aFromNode->Name() << ". Output port[" << j << "] "; + if ( anOutPort ) { + cdebug << anOutPort->PortName() << " " << anOutPort->ServicesParameterType() << endl ; + } + else { + cdebug << " NULL" << endl ; + } +#if 0 + if ( dostore == 0 && + strcmp( anOutPort->ServicesParameterType() , "string" ) && + strcmp( anOutPort->ServicesParameterType() , "long" ) && + strcmp( anOutPort->ServicesParameterType() , "double" ) && + strcmp( anOutPort->ServicesParameterType() , "objref" ) ) { + cdebug << "CreateService Node " << aFromNode->Name() << ". Output port " << anOutPort->PortName() + << " has illegal type " << anOutPort->ServicesParameterType() << endl ; + RetVal = false ; + } +#endif + if ( !aFromNode->IsGOTONode() ) { if ( !anOutPort->IsGate() && -//!anOutPort->IsLoop() && -// !( iN->IsEndLoopNode() && anOutPort->IsBus() ) && ( anOutPort->IsNotConnected() || anOutPort->IsDataConnected() ) ) { if ( dostore == 0 ) { + cdebug << "CreateService " << aFromNode->Name() << " Output port " + << anOutPort->PortName() << endl ; outnbr += 1 ; } else { @@ -1195,12 +1283,10 @@ bool GraphBase::Graph::CreateService() { // Restore input datas : for ( i = 0 ; i < GraphNodesSize() ; i++ ) { -// iN = (GraphEditor::InNode * ) GraphNodes( i ) ; - iN = GraphNodes( i ) ; - for ( j = 1 ; j < iN->GetNodeInPortsSize() ; j++ ) { - GraphBase::InPort *anInPort = iN->GetChangeNodeInPort(j) ; + aToNode = GraphNodes( i ) ; + for ( j = 0 ; j < aToNode->GetNodeInPortsSize() ; j++ ) { + GraphBase::InPort *anInPort = aToNode->GetChangeNodeInPort(j) ; if ( anInPort->IsDataConnected() ) { -// GraphBase::Graph::AddInputData( anInPort->NodeName() , AddInputData( anInPort->NodeName() , anInPort->PortName() , anInPort->GetOutPort()->ValuePtr() ) ; @@ -1209,7 +1295,7 @@ bool GraphBase::Graph::CreateService() { } cdebug_out << "GraphBase::Graph::CreateService" << endl; - return true ; + return RetVal ; } bool GraphBase::Graph::InLineServices() { @@ -1307,7 +1393,7 @@ bool GraphBase::Graph::Sort() { << _CnxInPortsNumber[ i ] << endl ; if ( !_Sorted[ i ] && _CnxInPortsNumber[ i ] == 0 ) { // All inputs of GraphNodes( i ) are available - if ( _NodesNumber.size() != _LevelsNumber+1 ) { + if ( (int ) _NodesNumber.size() != _LevelsNumber+1 ) { _NodesNumber.resize( _LevelsNumber+1 ) ; _SortedNodes.resize( _LevelsNumber+1 ) ; _NodesNumber[ _LevelsNumber ] = -1 ; @@ -1493,25 +1579,25 @@ bool GraphBase::Graph::ComputingNodes() const { cdebug << "GraphExecutor::GraphControl::ComputingNodes ()" << endl; // list aComputingNodesList = _G->ComputingNodesList() ; -// list::iterator iN = aComputingNodesList.begin(); +// list::iterator aNode = aComputingNodesList.begin(); // GraphEditor::Port * iP; -// for (iN = _G->ComputingNodesList().begin(); iN !=_G->ComputingNodesList().end(); iN++) { -// while ( iN != aComputingNodesList.end() ) { +// for (aNode = _G->ComputingNodesList().begin(); aNode !=_G->ComputingNodesList().end(); aNode++) { +// while ( aNode != aComputingNodesList.end() ) { int i ; - GraphBase::ComputingNode * iN ; + GraphBase::ComputingNode * aNode ; for ( i = 0 ; i < GraphNodesSize() ; i++ ) { - iN = GraphNodes( i ) ; + aNode = GraphNodes( i ) ; // Tous les ports d'entree de tous les noeuds de calcul sont bien connectes // Enregistrement eventuel dans la liste des noeuds "tete" de graphe -// if ((*iN)->GetNodeInPortsSize() == 0) -// _headNodes.push_front(*iN); +// if ((*aNode)->GetNodeInPortsSize() == 0) +// _headNodes.push_front(*aNode); int j ; - for ( j = 1; j < iN->GetNodeInPortsSize() ; j++ ) { - const GraphBase::InPort *iP = iN->GetNodeInPort(j); + for ( j = 1 ; j < aNode->GetNodeInPortsSize() ; j++ ) { + const GraphBase::InPort *iP = aNode->GetNodeInPort(j); if ( !iP->IsConnected() ){ cdebug << "Le port d'entree " << iP->PortName() - << " du noeud de calcul " << iN->Name() << " du graphe " + << " du noeud de calcul " << aNode->Name() << " du graphe " << Name() << " n'est pas connecte "<< endl; RetVal = false ; }; @@ -1520,21 +1606,21 @@ bool GraphBase::Graph::ComputingNodes() const { // Tous les noeuds de calcul ont au moins un port de sortie connecte bool oneOutPortConnected = false; - for ( j = 1; j < iN->GetNodeOutPortsSize() ; j++) { - const GraphBase::OutPort *iP = iN->GetNodeOutPort(j); + for ( j = 1 ; j < aNode->GetNodeOutPortsSize() ; j++) { + const GraphBase::OutPort *iP = aNode->GetNodeOutPort(j); if ( iP->IsPortConnected() || iP->IsDataConnected() ){ oneOutPortConnected = true ; // break; } else { cdebug << "Le port de sortie " << iP->PortName() - << " du noeud de calcul " << iN->Name() << " du graphe " + << " du noeud de calcul " << aNode->Name() << " du graphe " << Name() << " n'est pas connecte "<< endl; RetVal = false ; } }; if (!oneOutPortConnected) { - cdebug << "Le noeud de calcul " << iN->Name() << " du graphe " + cdebug << "Le noeud de calcul " << aNode->Name() << " du graphe " << Name() << " n'a aucun port de sortie connecte "<< endl; // _computingError.push_front(2); } @@ -1543,6 +1629,67 @@ bool GraphBase::Graph::ComputingNodes() const { return RetVal ; } +bool GraphBase::Graph::LinkLoopNodes(bool & NewLink ) { + bool RetVal = true ; + NewLink = false ; + int i , j ; + cdebug_in << "GraphBase::Graph::LinkLoopNodes()" << endl; + for ( i = 0 ; i < GraphNodesSize() ; i++ ) { + GraphBase::ComputingNode * aNode = GraphNodes( i ) ; + if ( aNode->IsLoopNode() ) { + GraphBase::LoopNode * aLoopNode = (GraphBase::LoopNode * ) aNode ; + for ( j = 0 ; j < aLoopNode->GetNodeInPortsSize() ; j++ ) { + GraphBase::InPort *anInPort = aLoopNode->GetChangeNodeInPort(j) ; + if ( !anInPort->IsGate() && !anInPort->IsConnected() && !anInPort->IsDataConnected() ) { + if ( !AddLink( aLoopNode->CoupledNode() , aLoopNode->CoupledNode()->GetChangeNodeOutPort( j ) , + aLoopNode , anInPort ) ) { + cdebug << "GraphBase::Graph::CreateService AddLink ERROR " << aLoopNode->CoupledNode()->Name() + << "( " << aLoopNode->CoupledNode()->GetChangeNodeOutPort( j )->PortName() << " ) --> " + << aLoopNode->Name() << "( " << anInPort->PortName() << " )" << endl ; + RetVal = false ; + } + else { + NewLink = true ; + } + } + } + for ( j = 0 ; j < aLoopNode->CoupledNode()->GetNodeInPortsSize() ; j++ ) { + GraphBase::InPort *anInPort = aLoopNode->CoupledNode()->GetChangeNodeInPort( j ) ; + if ( !anInPort->IsConnected() ) { + if ( !AddLink( aLoopNode , aLoopNode->GetChangeNodeOutPort( j ) , + aLoopNode->CoupledNode() , anInPort ) ) { + cdebug << "GraphBase::Graph::CreateService AddLink ERROR " << aLoopNode->Name() << "( " + << aLoopNode->GetChangeNodeOutPort( j )->PortName() << " ) --> " + << aLoopNode->CoupledNode()->Name() << "( " << anInPort->PortName() << " )" << endl ; + RetVal = false ; + } + else { + NewLink = true ; + } + } + } + } + else if ( aNode->IsGOTONode() ) { + GraphBase::GOTONode * aGOTONode = (GraphBase::GOTONode * ) aNode ; + GraphBase::OutPort *anOutGate = aGOTONode->GetChangeNodeOutGate() ; + if ( !anOutGate->IsConnected() ) { + if ( !AddLink( aGOTONode , anOutGate , + aGOTONode->CoupledNode() , aGOTONode->CoupledNode()->GetChangeNodeInGate() ) ) { + cdebug << "GraphBase::Graph::CreateService AddLink ERROR " << aGOTONode->Name() << "( " + << anOutGate->PortName() << " ) --> " << aGOTONode->CoupledNode()->Name() << "( " + << aGOTONode->CoupledNode()->GetChangeNodeInGate()->PortName() << " )" << endl ; + RetVal = false ; + } + else { + NewLink = true ; + } + } + } + } + cdebug_out << "GraphBase::Graph::LinkLoopNodes() " << RetVal << endl; + return RetVal ; +} + // Controle de la coherence des noeuds de calcul // Enregistrement dans la liste des noeuds "tete" de graphe @@ -1568,32 +1715,32 @@ bool GraphBase::Graph::DataServerNodes() const { ierr = CheckDataServerNodes() ; // list aComputingNodesList = _G->ComputingNodesList() ; -// list::iterator iN = aComputingNodesList.begin(); +// list::iterator aNode = aComputingNodesList.begin(); if ( GraphNodesSize() == 0 ) { ierr++ ; } else { - GraphBase::ComputingNode * iN ; + GraphBase::ComputingNode * aNode ; for ( i = 0 ; i < GraphNodesSize() ; i++ ) { - iN = GraphNodes( i ) ; -// while ( iN != aComputingNodesList.end() ) { - if ( iN->IsFactoryNode() ) { - GraphBase::FactoryNode * FiN = (GraphBase::FactoryNode * ) iN ; - if ( !strlen( FiN->Computer() ) ) { - cdebug << "ComputerName missing for node " << FiN->Name() ; - if ( !strlen( FiN->Computer() ) ) { + aNode = GraphNodes( i ) ; +// while ( aNode != aComputingNodesList.end() ) { + if ( aNode->IsFactoryNode() ) { + GraphBase::FactoryNode * FaNode = (GraphBase::FactoryNode * ) aNode ; + if ( !strlen( FaNode->Computer() ) ) { + cdebug << "ComputerName missing for node " << FaNode->Name() ; + if ( !strlen( FaNode->Computer() ) ) { ierr++ ; cdebug << endl ; } else { - cdebug << ". " << FiN->Computer() << " will be used." << endl ; + cdebug << ". " << FaNode->Computer() << " will be used." << endl ; } } } // For Outputs of the DataFlow : - for ( j = 0 ; j < iN->GetNodeOutPortsSize() ; j++ ) { - if ( !iN->GetNodeOutPort(j)->IsConnected() ) { - iN->AddLink( (GraphBase::ComputingNode *) this ) ; + for ( j = 0 ; j < aNode->GetNodeOutPortsSize() ; j++ ) { + if ( !aNode->GetNodeOutPort(j)->IsConnected() ) { + aNode->AddLink( (GraphBase::ComputingNode *) this ) ; } } } diff --git a/src/GraphBase/DataFlowBase_Graph.hxx b/src/GraphBase/DataFlowBase_Graph.hxx index 4be9739..9b585d4 100644 --- a/src/GraphBase/DataFlowBase_Graph.hxx +++ b/src/GraphBase/DataFlowBase_Graph.hxx @@ -45,7 +45,7 @@ namespace GraphBase { private: int _Graph_prof_debug; - ostream * _Graph_fdebug; + ofstream * _Graph_fdebug; CORBA::ORB_ptr _Orb ; SUPERV::Graph_var _Graph ; Graph_Impl * _GraphImpl ; @@ -103,8 +103,11 @@ namespace GraphBase { void Set_prof_debug( CORBA::ORB_ptr ORB , const char * DebugFileName ) ; - int * Graph_prof_debug() { return &_Graph_prof_debug ; } ; - ostream * Graph_fdebug() { return _Graph_fdebug ; } ; + int * Graph_prof_debug() { +// MESSAGE( "Graph_prof_debug _Graph_prof_debug " << &_Graph_prof_debug << " _Graph_fdebug " +// << _Graph_fdebug ) ; + return &_Graph_prof_debug ; } ; + ofstream * Graph_fdebug() { return _Graph_fdebug ; } ; SUPERV::Graph_var ObjRef() const { return _Graph ; } ; void SetObjRef( SUPERV::Graph_var aGraph ) { @@ -214,7 +217,7 @@ namespace GraphBase { GraphBase::SNode * GetInfo() const ; GraphBase::ListOfNodes * GetNodes() const ; - GraphBase::ListOfLinks * GetLinks() const ; + GraphBase::ListOfLinks * GetLinks(bool AllLinks = false ) const ; GraphBase::ListOfGraphs * GetGraphs() const ; GraphBase::ListOfLinks * GetDatas() const ; // SALOME_ModuleCatalog::Service * GetService() const ; @@ -264,6 +267,7 @@ namespace GraphBase { bool Sort() ; bool ComputingNodes() const ; + bool LinkLoopNodes(bool & NewLink ) ; bool DataServerNodes() const ; long LevelMax() { diff --git a/src/GraphBase/DataFlowBase_InLineNode.cxx b/src/GraphBase/DataFlowBase_InLineNode.cxx index b6285e6..e182718 100644 --- a/src/GraphBase/DataFlowBase_InLineNode.cxx +++ b/src/GraphBase/DataFlowBase_InLineNode.cxx @@ -10,8 +10,8 @@ // $Header: using namespace std; -#include -#include +//#include +//#include #include "DataFlowBase_InLineNode.hxx" @@ -24,7 +24,7 @@ GraphBase::InLineNode::InLineNode( CORBA::ORB_ptr ORB , SALOME_NamingService* ptrNamingService , const char * aDataFlowName , int * Graph_prof_debug , - ostream * Graph_fdebug ) : + ofstream * Graph_fdebug ) : GraphBase::ComputingNode::ComputingNode( ORB , ptrNamingService , aDataFlowName , Graph_prof_debug , Graph_fdebug ) { _PythonFunction = SUPERV::ListOfStrings() ; @@ -48,7 +48,7 @@ GraphBase::InLineNode::InLineNode( CORBA::ORB_ptr ORB , const long X , const long Y , int * Graph_prof_debug , - ostream * Graph_fdebug ) : + ofstream * Graph_fdebug ) : GraphBase::ComputingNode::ComputingNode( ORB , ptrNamingService , NodeService , NodeName , akind , NodeFirstCreation , @@ -85,7 +85,7 @@ GraphBase::InLineNode::InLineNode( CORBA::ORB_ptr ORB , const long X , const long Y , int * Graph_prof_debug , - ostream * Graph_fdebug ) : + ofstream * Graph_fdebug ) : GraphBase::ComputingNode::ComputingNode( ORB , ptrNamingService , SALOME_ModuleCatalog::Service() , NodeName , akind , NodeFirstCreation , @@ -131,8 +131,11 @@ GraphBase::InLineNode::~InLineNode() { void GraphBase::InLineNode::SetPythonFunction( const char * FuncName , const SUPERV::ListOfStrings & aPythonFunction ) { int i ; - cdebug << "GraphBase::InLineNode::PythonFunction length " << aPythonFunction.length() - << endl ; + cdebug << "GraphBase::InLineNode::PythonFunction length " << aPythonFunction.length() ; + if ( aPythonFunction.length() == 1 ) { + cdebug << " aPythonFunction[ 0 ] '" << aPythonFunction[ 0 ] << "'" ; + } + cdebug << endl ; _FuncName = my_strdup( FuncName ) ; if ( ( aPythonFunction.length() == 0 ) || ( aPythonFunction.length() == 1 && strlen( aPythonFunction[ 0 ] ) == 0 ) ) { @@ -140,7 +143,7 @@ void GraphBase::InLineNode::SetPythonFunction( const char * FuncName , } else { _PythonFunction.length( aPythonFunction.length() ) ; - for ( i = 0 ; i < aPythonFunction.length() ; i++ ) { + for ( i = 0 ; i < (int ) aPythonFunction.length() ; i++ ) { cdebug << aPythonFunction[ i ] << endl ; _PythonFunction[ i ] = CORBA::string_dup( aPythonFunction[ i ] ) ; } diff --git a/src/GraphBase/DataFlowBase_InLineNode.hxx b/src/GraphBase/DataFlowBase_InLineNode.hxx index e818348..0e34176 100644 --- a/src/GraphBase/DataFlowBase_InLineNode.hxx +++ b/src/GraphBase/DataFlowBase_InLineNode.hxx @@ -33,7 +33,7 @@ namespace GraphBase { SALOME_NamingService* ptrNamingService , const char * DataFlowName , int * Graph_prof_debug = NULL , - ostream * Graph_fdebug = NULL ) ; + ofstream * Graph_fdebug = NULL ) ; InLineNode( CORBA::ORB_ptr ORB , SALOME_NamingService* ptrNamingService , const SALOME_ModuleCatalog::Service& NodeService , @@ -48,7 +48,7 @@ namespace GraphBase { const long X , const long Y , int * Graph_prof_debug = NULL , - ostream * Graph_fdebug = NULL ) ; + ofstream * Graph_fdebug = NULL ) ; InLineNode( CORBA::ORB_ptr ORB , SALOME_NamingService* ptrNamingService , const char * FuncName , @@ -64,7 +64,7 @@ namespace GraphBase { const long X , const long Y , int * Graph_prof_debug = NULL , - ostream * Graph_fdebug = NULL ) ; + ofstream * Graph_fdebug = NULL ) ; virtual ~InLineNode() ; void SetPythonFunction( const char * FuncName , diff --git a/src/GraphBase/DataFlowBase_InPort.hxx b/src/GraphBase/DataFlowBase_InPort.hxx index 497270d..6aa2f79 100644 --- a/src/GraphBase/DataFlowBase_InPort.hxx +++ b/src/GraphBase/DataFlowBase_InPort.hxx @@ -44,7 +44,7 @@ namespace GraphBase { public: InPort() { - cout << "InPort()" << endl ; +// cout << "InPort()" << endl ; _State = SUPERV::UndefinedState ; _OutPort = NULL ; _InitialOutPort = NULL ; diff --git a/src/GraphBase/DataFlowBase_LoopNode.cxx b/src/GraphBase/DataFlowBase_LoopNode.cxx index 5166dec..aa87e30 100644 --- a/src/GraphBase/DataFlowBase_LoopNode.cxx +++ b/src/GraphBase/DataFlowBase_LoopNode.cxx @@ -10,8 +10,8 @@ // $Header: using namespace std; -#include -#include +//#include +//#include #include "DataFlowBase_LoopNode.hxx" @@ -43,7 +43,7 @@ GraphBase::LoopNode::LoopNode( CORBA::ORB_ptr ORB , const long X , const long Y , int * Graph_prof_debug , - ostream * Graph_fdebug ) : + ofstream * Graph_fdebug ) : GraphBase::GOTONode::GOTONode( ORB , ptrNamingService , InitName , anInitPythonFunction , NodeName , akind , NodeFirstCreation , NodeLastModification , NodeEditorRelease , diff --git a/src/GraphBase/DataFlowBase_LoopNode.hxx b/src/GraphBase/DataFlowBase_LoopNode.hxx index 08054ac..833aeed 100644 --- a/src/GraphBase/DataFlowBase_LoopNode.hxx +++ b/src/GraphBase/DataFlowBase_LoopNode.hxx @@ -49,7 +49,7 @@ namespace GraphBase { const long X , const long Y , int * Graph_prof_debug = NULL , - ostream * Graph_fdebug = NULL ) ; + ofstream * Graph_fdebug = NULL ) ; virtual ~LoopNode() ; void SetMorePythonFunction( const char * MoreName , diff --git a/src/GraphBase/DataFlowBase_Port.cxx b/src/GraphBase/DataFlowBase_Port.cxx index 2e773b6..14a89f5 100644 --- a/src/GraphBase/DataFlowBase_Port.cxx +++ b/src/GraphBase/DataFlowBase_Port.cxx @@ -39,7 +39,7 @@ bool GraphBase::Port::AddCoord( const int index , return false ; } else { - if ( index <= 0 || index > _X.size()+1 ) + if ( index <= 0 || index > (int ) _X.size()+1 ) return false ; _X.resize( _X.size()+1 ) ; _Y.resize( _Y.size()+1 ) ; @@ -66,7 +66,7 @@ bool GraphBase::Port::ChangeCoord( const int index , return false ; } else { - if ( index <= 0 || index > _X.size() ) + if ( index <= 0 || index > (int ) _X.size() ) return false ; _X[ index - 1 ] = x ; _Y[ index - 1 ] = y ; @@ -85,10 +85,10 @@ bool GraphBase::Port::RemoveCoord( const int index ) { return false ; } else { - if ( index <= 0 || index > _X.size() ) + if ( index <= 0 || index > (int ) _X.size() ) return false ; int i ; - for ( i = index - 1 ; i < _X.size() - 1 ; i++ ) { + for ( i = index - 1 ; i < (int ) _X.size() - 1 ; i++ ) { _X[ i ] = _X[ i+1 ] ; _Y[ i ] = _Y[ i+1 ] ; } @@ -126,7 +126,7 @@ bool GraphBase::Port::GetCoord( int *x , int *y ) const { return false ; } else { - for ( i = 0 ; i < _X.size() ; i++ ) { + for ( i = 0 ; i < (int ) _X.size() ; i++ ) { x[ i ] = _X[ i ] ; y[ i ] = _Y[ i ] ; } @@ -139,7 +139,7 @@ const GraphBase::ListOfCoords * GraphBase::Port::Coords() const { int i ; if ( !IsEndSwitch() ) { _list_Coords->resize( _X.size() ); - for ( i = 0 ; i < _X.size() ; i++ ) { + for ( i = 0 ; i < (int ) _X.size() ; i++ ) { (*_list_Coords)[ i ].theX = _X[ i ] ; (*_list_Coords)[ i ].theY = _Y[ i ] ; } @@ -152,7 +152,7 @@ bool GraphBase::Port::GetCoord( const int index , long &x , long &y ) const { return false ; } else { - if ( index <= 0 || index > _X.size() ) + if ( index <= 0 || index > (int ) _X.size() ) return false ; x = _X[ index - 1 ] ; y = _Y[ index - 1 ] ; @@ -168,24 +168,30 @@ bool GraphBase::Port::GetCoord( const int index , long &x , long &y ) const { ostream & operator<< (ostream & f ,const SUPERV::KindOfPort & s ) { switch (s) { + case SUPERV::UndefinedParameter : + f << "UndefinedParameter"; + break; case SUPERV::ServiceParameter : f << "ServiceParameter"; break; case SUPERV::GateParameter : f << "GateParameter"; break; - case SUPERV::LoopParameter : - f << "LoopParameter"; - break; case SUPERV::InLineParameter : f << "InLineParameter"; break; + case SUPERV::LoopParameter : + f << "LoopParameter"; + break; case SUPERV::SwitchParameter : f << "SwitchParameter"; break; case SUPERV::EndSwitchParameter : f << "EndSwitchParameter"; break; + case SUPERV::GOTOParameter : + f << "GOTOParameter"; + break; default : f << "UnknownKindOfPort"; break; diff --git a/src/GraphBase/DataFlowBase_Port.hxx b/src/GraphBase/DataFlowBase_Port.hxx index 72c8427..ddee288 100644 --- a/src/GraphBase/DataFlowBase_Port.hxx +++ b/src/GraphBase/DataFlowBase_Port.hxx @@ -48,7 +48,7 @@ namespace GraphBase { public: Port() { - cout << "Port()" << endl ; +// cout << "Port()" << endl ; _NodeName = NULL ; _Port = SUPERV::Port::_nil() ; _KindOfPort = SUPERV::UndefinedParameter ; diff --git a/src/GraphBase/DataFlowBase_PortsOfNode.cxx b/src/GraphBase/DataFlowBase_PortsOfNode.cxx index a06b2a0..da89abd 100644 --- a/src/GraphBase/DataFlowBase_PortsOfNode.cxx +++ b/src/GraphBase/DataFlowBase_PortsOfNode.cxx @@ -31,16 +31,18 @@ using namespace std; GraphBase::PortsOfNode::PortsOfNode() : GraphBase::Service::Service( SALOME_ModuleCatalog::Service() ) { - cdebug << "GraphBase::PortsOfNode::PortsOfNode " << this - << endl ; +// MESSAGE( "GraphBase::PortsOfNode::PortsOfNode " << this ) ; +// cout << "GraphBase::PortsOfNode::PortsOfNode " << this << endl ; +// cdebug << "GraphBase::PortsOfNode::PortsOfNode " << this << endl ; _NodeInPortsSize = 0 ; _NodeOutPortsSize = 0 ; } GraphBase::PortsOfNode::PortsOfNode( const char *DataFlowName ) : GraphBase::Service::Service( SALOME_ModuleCatalog::Service() ) { - cdebug << "GraphBase::PortsOfNode::PortsOfNode " << this - << endl ; +// MESSAGE( "GraphBase::PortsOfNode::PortsOfNode " << this ) ; +// cout << "GraphBase::PortsOfNode::PortsOfNode " << this << endl ; +// cdebug << "GraphBase::PortsOfNode::PortsOfNode " << this << endl ; _NodeInPortsSize = 0 ; _NodeOutPortsSize = 0 ; } @@ -62,12 +64,8 @@ void GraphBase::PortsOfNode::DefPortsOfNode( const SALOME_ModuleCatalog::Service& aService , const char *const * NodeName , const SUPERV::KindOfNode aKind , -// const bool DataFlowOrComputing , -// const bool WithInLoop , -// const bool WithInGate , -// const bool WithOutGate , int * Graph_prof_debug , - ostream * Graph_fdebug ) { + ofstream * Graph_fdebug ) { int i ; cdebug_in << "DefPortsOfNode : " << *NodeName << endl ; const bool DataFlowOrComputing = (aKind == SUPERV::DataFlowNode) || @@ -116,26 +114,6 @@ void GraphBase::PortsOfNode::DefPortsOfNode( int iVec = 0 ; _NodeInPortsSize = aService.ServiceinParameter.length() ; - if ( WithInGate ) { - SALOME_ModuleCatalog::ServicesParameter anInGateParameter ; - _NodeInPortsSize = _NodeInPortsSize + 1 ; - iVec += 1 ; - char *aParametername = "InGate" ; - if ( aKind == SUPERV::EndSwitchNode ) { - aParametername = "Default" ; - } - anInGateParameter.Parametertype = CORBA::string_dup( "bool" ) ; - anInGateParameter.Parametername = CORBA::string_dup( aParametername ) ; - _NodeInPorts.resize( _NodeInPortsSize ); - _MapOfNodeInPorts[ aParametername ] = iVec ; - _NodeInPorts[iVec-1] = new GraphBase::InPort( NodeName , anInGateParameter , - SUPERV::GateParameter ); -// _NodeInPorts[iVec-1]->Kind( SUPERV::GateParameter ) ; - _NodeInPorts[iVec-1]->SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ; - cdebug << "DefPortsOfNode : " << "_MapOfNodeInPorts[ " << aParametername - << " ] = " << iVec << " " << _NodeInPorts[iVec-1]->Kind() << " " - << _NodeInPorts[iVec-1] << endl ; - } if ( WithInLoop ) { SALOME_ModuleCatalog::ServicesParameter anInLoopParameter ; _NodeInPortsSize = _NodeInPortsSize + 1 ; @@ -144,21 +122,21 @@ void GraphBase::PortsOfNode::DefPortsOfNode( if ( aKind == SUPERV::EndLoopNode ) { aParametername = "DoLoop" ; } - anInLoopParameter.Parametertype = CORBA::string_dup( "bool" ) ; + anInLoopParameter.Parametertype = CORBA::string_dup( "long" ) ; anInLoopParameter.Parametername = CORBA::string_dup( aParametername ) ; - if ( _NodeInPortsSize > _NodeInPorts.size() ) { + if ( _NodeInPortsSize > (int ) _NodeInPorts.size() ) { _NodeInPorts.resize( _NodeInPortsSize ); } _MapOfNodeInPorts[ aParametername ] = iVec ; _NodeInPorts[iVec-1] = new GraphBase::InPort( NodeName , anInLoopParameter , SUPERV::LoopParameter ); -// _NodeInPorts[iVec-1]->Kind( SUPERV::LoopParameter ) ; +// MESSAGE( "GraphBase::PortsOfNode::DefPortsOfNode " << aParametername << " --> SetDebug" ) ; _NodeInPorts[iVec-1]->SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ; cdebug << "DefPortsOfNode : " << "_MapOfNodeInPorts[ " << aParametername << " ] = " << iVec << " " << _NodeInPorts[iVec-1]->Kind() << " " << _NodeInPorts[iVec-1] << endl ; } - if ( _NodeInPortsSize > _NodeInPorts.size() ) { + if ( _NodeInPortsSize > (int ) _NodeInPorts.size() ) { _NodeInPorts.resize(_NodeInPortsSize); } cdebug << "NodeInPortsSize " << _NodeInPortsSize << endl ; @@ -181,53 +159,55 @@ void GraphBase::PortsOfNode::DefPortsOfNode( const SALOME_ModuleCatalog::ServicesParameter aServiceParameter = aService.ServiceinParameter[i-iVec] ; _NodeInPorts[i] = new GraphBase::InPort( NodeName , aServiceParameter , aPortKind ); +// MESSAGE( "GraphBase::PortsOfNode::DefPortsOfNode " << aParametername << " --> SetDebug" ) ; _NodeInPorts[i]->SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ; cdebug << i << ". " << *_NodeInPorts[i] << " " << _NodeInPorts[i]->Kind() << endl ; } } - - iVec = 0 ; - _NodeOutPortsSize = aService.ServiceoutParameter.length() ; - if ( WithOutGate ) { - SALOME_ModuleCatalog::ServicesParameter anOutGateParameter ; - _NodeOutPortsSize = _NodeOutPortsSize + 1 ; + iVec += aService.ServiceinParameter.length() ; + if ( WithInGate ) { + SALOME_ModuleCatalog::ServicesParameter anInGateParameter ; + _NodeInPortsSize = _NodeInPortsSize + 1 ; iVec += 1 ; - char *aParametername = "OutGate" ; - if ( aKind == SUPERV::SwitchNode ) { + char *aParametername = "InGate" ; + if ( aKind == SUPERV::EndSwitchNode ) { aParametername = "Default" ; } - anOutGateParameter.Parametertype = CORBA::string_dup( "bool" ) ; - anOutGateParameter.Parametername = CORBA::string_dup( aParametername ) ; - _NodeOutPorts.resize(_NodeOutPortsSize); - _MapOfNodeOutPorts[ aParametername ] = iVec ; - _NodeOutPorts[iVec-1] = new GraphBase::OutPort( NodeName , anOutGateParameter , - SUPERV::GateParameter ); -// _NodeOutPorts[iVec-1]->Kind( SUPERV::GateParameter ) ; - _NodeOutPorts[iVec-1]->SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ; - cdebug << "DefPortsOfNode : " << "_MapOfNodeOutPorts[ " << aParametername - << " ] = " << iVec << " " << _NodeOutPorts[iVec-1]->Kind() << " " - << _NodeOutPorts[iVec-1] << endl ; + anInGateParameter.Parametertype = CORBA::string_dup( "long" ) ; + anInGateParameter.Parametername = CORBA::string_dup( aParametername ) ; + _NodeInPorts.resize( _NodeInPortsSize ); + _MapOfNodeInPorts[ aParametername ] = iVec ; + _NodeInPorts[iVec-1] = new GraphBase::InPort( NodeName , anInGateParameter , + SUPERV::GateParameter ); +// MESSAGE( "GraphBase::PortsOfNode::DefPortsOfNode " << aParametername << " --> SetDebug" ) ; + _NodeInPorts[iVec-1]->SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ; + cdebug << "DefPortsOfNode : " << "_MapOfNodeInPorts[ " << aParametername + << " ] = " << iVec << " " << _NodeInPorts[iVec-1]->Kind() << " " + << _NodeInPorts[iVec-1] << endl ; } + + iVec = 0 ; + _NodeOutPortsSize = aService.ServiceoutParameter.length() ; if ( WithInLoop ) { SALOME_ModuleCatalog::ServicesParameter anOutLoopParameter ; _NodeOutPortsSize = _NodeOutPortsSize + 1 ; iVec += 1 ; char *aParametername = "DoLoop" ; - anOutLoopParameter.Parametertype = CORBA::string_dup( "bool" ) ; + anOutLoopParameter.Parametertype = CORBA::string_dup( "long" ) ; anOutLoopParameter.Parametername = CORBA::string_dup( aParametername ) ; - if ( _NodeOutPortsSize > _NodeOutPorts.size() ) { + if ( _NodeOutPortsSize > (int ) _NodeOutPorts.size() ) { _NodeOutPorts.resize(_NodeOutPortsSize); } _MapOfNodeOutPorts[ aParametername ] = iVec ; _NodeOutPorts[iVec-1] = new GraphBase::OutPort( NodeName , anOutLoopParameter , SUPERV::LoopParameter ); -// _NodeOutPorts[iVec-1]->Kind( SUPERV::LoopParameter ) ; +// MESSAGE( "GraphBase::PortsOfNode::DefPortsOfNode " << aParametername << " --> SetDebug" ) ; _NodeOutPorts[iVec-1]->SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ; cdebug << "DefPortsOfNode : " << "_MapOfNodeOutPorts[ " << aParametername << " ] = " << iVec << " " << _NodeOutPorts[iVec-1]->Kind() << " " << _NodeOutPorts[iVec-1] << endl ; } - if ( _NodeOutPortsSize > _NodeOutPorts.size() ) { + if ( _NodeOutPortsSize > (int ) _NodeOutPorts.size() ) { _NodeOutPorts.resize(_NodeOutPortsSize); } cdebug << "NodeOutPortsSize " << _NodeOutPortsSize << endl ; @@ -250,22 +230,43 @@ void GraphBase::PortsOfNode::DefPortsOfNode( const SALOME_ModuleCatalog::ServicesParameter aServiceParameter = aService.ServiceoutParameter[i-iVec] ; _NodeOutPorts[i] = new GraphBase::OutPort( NodeName , aServiceParameter , aPortKind ); +// MESSAGE( "GraphBase::PortsOfNode::DefPortsOfNode " << aParametername << " --> SetDebug" ) ; _NodeOutPorts[i]->SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ; cdebug << i << ". " << *_NodeOutPorts[i] << " " << _NodeOutPorts[i]->Kind() << endl ; } } + iVec += aService.ServiceoutParameter.length() ; + if ( WithOutGate ) { + SALOME_ModuleCatalog::ServicesParameter anOutGateParameter ; + _NodeOutPortsSize = _NodeOutPortsSize + 1 ; + iVec += 1 ; + char *aParametername = "OutGate" ; + if ( aKind == SUPERV::SwitchNode ) { + aParametername = "Default" ; + } + anOutGateParameter.Parametertype = CORBA::string_dup( "long" ) ; + anOutGateParameter.Parametername = CORBA::string_dup( aParametername ) ; + _NodeOutPorts.resize(_NodeOutPortsSize); + _MapOfNodeOutPorts[ aParametername ] = iVec ; + _NodeOutPorts[iVec-1] = new GraphBase::OutPort( NodeName , anOutGateParameter , + SUPERV::GateParameter ); +// MESSAGE( "GraphBase::PortsOfNode::DefPortsOfNode " << aParametername << " --> SetDebug" ) ; + _NodeOutPorts[iVec-1]->SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ; + cdebug << "DefPortsOfNode : " << "_MapOfNodeOutPorts[ " << aParametername + << " ] = " << iVec << " " << _NodeOutPorts[iVec-1]->Kind() << " " + << _NodeOutPorts[iVec-1] << endl ; + } cdebug_out << "DefPortsOfNode : " << *NodeName << endl ; } -GraphBase::InPort * GraphBase::PortsOfNode::AddInPort( - CORBA::ORB_ptr ORB , - const char *const * NodeName , - const SUPERV::KindOfNode aKind , - const char * InputParameterName , - const char * InputParameterType , - int * Graph_prof_debug , - ostream * Graph_fdebug ) { - cdebug_in << "DefPortsOfNode::InPort : " << *NodeName << " " << aKind << " " +GraphBase::InPort * GraphBase::PortsOfNode::AddInPort( CORBA::ORB_ptr ORB , + const char *const * NodeName , + const SUPERV::KindOfNode aKind , + const char * InputParameterName , + const char * InputParameterType , + int * Graph_prof_debug , + ofstream * Graph_fdebug ) { + cdebug_in << "DefPortsOfNode::AddInPort : " << *NodeName << " " << aKind << " " << InputParameterName << " " << InputParameterType << endl ; GraphBase::InPort * anInPort = NULL ; if ( aKind == SUPERV::InLineNode || aKind == SUPERV::LoopNode || @@ -279,36 +280,53 @@ GraphBase::InPort * GraphBase::PortsOfNode::AddInPort( if ( anInPort == NULL ) { _NodeInPortsSize = _NodeInPortsSize + 1 ; _NodeInPorts.resize(_NodeInPortsSize); - _MapOfNodeInPorts[ InputParameterName ] = _NodeInPortsSize ; SALOME_ModuleCatalog::ServicesParameter aServiceParameter ; aServiceParameter.Parametername = InputParameterName ; aServiceParameter.Parametertype = InputParameterType ; SUPERV::KindOfPort aPortKind = SUPERV::ServiceParameter ; - _NodeInPorts[_NodeInPortsSize-1] = new GraphBase::InPort( NodeName , - aServiceParameter , - aPortKind ) ; - _NodeInPorts[_NodeInPortsSize-1]->Kind( SUPERV::InLineParameter ) ; - _NodeInPorts[_NodeInPortsSize-1]->SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ; - anInPort = _NodeInPorts[_NodeInPortsSize-1] ; + if ( aKind != SUPERV::EndLoopNode ) { + _NodeInPorts[ _NodeInPortsSize-1 ] = _NodeInPorts[ _NodeInPortsSize-2 ] ; // Gate - Default + _MapOfNodeInPorts.erase( _NodeInPorts[ _NodeInPortsSize-1 ]->PortName() ) ; + _MapOfNodeInPorts[ _NodeInPorts[ _NodeInPortsSize-1 ]->PortName() ] = _NodeInPortsSize-1 + 1 ; + _MapOfNodeInPorts[ InputParameterName ] = _NodeInPortsSize-2 + 1 ; + _NodeInPorts[_NodeInPortsSize-2] = new GraphBase::InPort( NodeName , + aServiceParameter , + aPortKind ) ; + _NodeInPorts[_NodeInPortsSize-2]->Kind( SUPERV::InLineParameter ) ; +// MESSAGE( "GraphBase::PortsOfNode::DefPortsOfNode " << InputParameterName << " --> SetDebug" ) ; + _NodeInPorts[_NodeInPortsSize-2]->SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ; + anInPort = _NodeInPorts[_NodeInPortsSize-2] ; + cdebug << "NodeInPorts[ " << _NodeInPortsSize-2 << " ]" << endl ; + } + else { + _MapOfNodeInPorts[ InputParameterName ] = _NodeInPortsSize-1 + 1 ; + _NodeInPorts[_NodeInPortsSize-1] = new GraphBase::InPort( NodeName , + aServiceParameter , + aPortKind ) ; + _NodeInPorts[_NodeInPortsSize-1]->Kind( SUPERV::InLineParameter ) ; +// MESSAGE( "GraphBase::PortsOfNode::DefPortsOfNode " << InputParameterName << " --> SetDebug" ) ; + _NodeInPorts[_NodeInPortsSize-1]->SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ; + anInPort = _NodeInPorts[_NodeInPortsSize-1] ; + cdebug << "NodeInPorts[ " << _NodeInPortsSize-1 << " ]" << endl ; + } } else { cdebug << "InPort already exists" << endl ; } } - cdebug_out << "DefPortsOfNode::InPort _NodeInPortsSize " << _NodeInPortsSize + cdebug_out << "DefPortsOfNode::AddInPort _NodeInPortsSize " << _NodeInPortsSize << " " << anInPort->Kind() << endl ; return anInPort ; } -GraphBase::OutPort * GraphBase::PortsOfNode::AddOutPort( - CORBA::ORB_ptr ORB , - const char *const * NodeName , - const SUPERV::KindOfNode aKind , - const char * OutputParameterName , - const char * OutputParameterType , - int * Graph_prof_debug , - ostream * Graph_fdebug ) { - cdebug_in << "DefPortsOfNode::OutPort : " << *NodeName << " " << aKind << " " +GraphBase::OutPort * GraphBase::PortsOfNode::AddOutPort( CORBA::ORB_ptr ORB , + const char * const * NodeName , + const SUPERV::KindOfNode aKind , + const char * OutputParameterName , + const char * OutputParameterType , + int * Graph_prof_debug , + ofstream * Graph_fdebug ) { + cdebug_in << "DefPortsOfNode::AddOutPort : " << *NodeName << " " << aKind << " " << OutputParameterName << " " << OutputParameterType << endl ; GraphBase::OutPort * anOutPort = NULL ; if ( aKind == SUPERV::InLineNode || aKind == SUPERV::LoopNode || @@ -319,22 +337,40 @@ GraphBase::OutPort * GraphBase::PortsOfNode::AddOutPort( if ( anOutPort == NULL ) { _NodeOutPortsSize = _NodeOutPortsSize + 1 ; _NodeOutPorts.resize(_NodeOutPortsSize); - _MapOfNodeOutPorts[ OutputParameterName ] = _NodeOutPortsSize ; SALOME_ModuleCatalog::ServicesParameter aServiceParameter ; aServiceParameter.Parametername = OutputParameterName ; aServiceParameter.Parametertype = OutputParameterType ; - _NodeOutPorts[_NodeOutPortsSize-1] = new GraphBase::OutPort( NodeName , - aServiceParameter , - aPortKind ); - _NodeOutPorts[_NodeOutPortsSize-1]->Kind( SUPERV::InLineParameter ) ; - _NodeOutPorts[_NodeOutPortsSize-1]->SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ; - anOutPort = _NodeOutPorts[_NodeOutPortsSize-1] ; + if ( aKind == SUPERV::SwitchNode ) { + _NodeOutPorts[ _NodeOutPortsSize-1 ] = _NodeOutPorts[ _NodeOutPortsSize-2 ] ; // Default + _MapOfNodeOutPorts.erase( _NodeOutPorts[ _NodeOutPortsSize-1 ]->PortName() ) ; + _MapOfNodeOutPorts[ _NodeOutPorts[ _NodeOutPortsSize-1 ]->PortName() ] = _NodeOutPortsSize-1 + 1 ; + _MapOfNodeOutPorts[ OutputParameterName ] = _NodeOutPortsSize - 1 ; + _NodeOutPorts[_NodeOutPortsSize-2] = new GraphBase::OutPort( NodeName , + aServiceParameter , + aPortKind ); + _NodeOutPorts[_NodeOutPortsSize-2]->Kind( SUPERV::InLineParameter ) ; +// MESSAGE( "GraphBase::PortsOfNode::DefPortsOfNode " << OutputParameterName << " --> SetDebug" ) ; + _NodeOutPorts[_NodeOutPortsSize-2]->SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ; + anOutPort = _NodeOutPorts[_NodeOutPortsSize-2] ; + cdebug << "NodeInPorts[ " << _NodeInPortsSize-2 << " ]" << endl ; + } + else { + _MapOfNodeOutPorts[ OutputParameterName ] = _NodeOutPortsSize ; + _NodeOutPorts[_NodeOutPortsSize-1] = new GraphBase::OutPort( NodeName , + aServiceParameter , + aPortKind ); + _NodeOutPorts[_NodeOutPortsSize-1]->Kind( SUPERV::InLineParameter ) ; +// MESSAGE( "GraphBase::PortsOfNode::DefPortsOfNode " << OutputParameterName << " --> SetDebug" ) ; + _NodeOutPorts[_NodeOutPortsSize-1]->SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ; + anOutPort = _NodeOutPorts[_NodeOutPortsSize-1] ; + cdebug << "NodeInPorts[ " << _NodeInPortsSize-1 << " ]" << endl ; + } } else { cdebug << "OutPort already exists" << endl ; } } - cdebug_out << "DefPortsOfNode::OutPort _NodeOutPortsSize " + cdebug_out << "DefPortsOfNode::AddOutPort _NodeOutPortsSize " << _NodeOutPortsSize << " " << anOutPort->Kind() << endl ; return anOutPort ; } @@ -378,7 +414,7 @@ void GraphBase::PortsOfNode::DelOutPort( const char * OutputParameterName ) { _MapOfNodeOutPorts.erase( OutputParameterName ) ; _NodeOutPorts[ index ]->destroy() ; int i ; - for ( i = index ; i < _NodeOutPortsSize ; i++ ) { + for ( i = index ; i < _NodeOutPortsSize - 1 ; i++ ) { _MapOfNodeOutPorts.erase( _NodeOutPorts[ i+1 ]->PortName() ) ; _MapOfNodeOutPorts[ _NodeOutPorts[ i+1 ]->PortName() ] = i+1 ; _NodeOutPorts[ i ] = _NodeOutPorts[ i+1 ] ; @@ -417,7 +453,7 @@ const GraphBase::OutPort *GraphBase::PortsOfNode::GetOutPort( const char *name) return GetChangeOutPort( name ) ; } -GraphBase::InPort *GraphBase::PortsOfNode::GetChangeInPort( const char *name) { +GraphBase::InPort *GraphBase::PortsOfNode::GetChangeInPort( const char * name) { // cdebug_in << "GraphBase::PortsOfNode::GetChangePort " << name <<" " << way // << endl; @@ -435,7 +471,7 @@ GraphBase::InPort *GraphBase::PortsOfNode::GetChangeInPort( const char *name) { return pP; } -GraphBase::OutPort *GraphBase::PortsOfNode::GetChangeOutPort( const char *name ) { +GraphBase::OutPort *GraphBase::PortsOfNode::GetChangeOutPort( const char * name ) { // cdebug_in << "GraphBase::PortsOfNode::GetChangePort " << name <<" " << way // << endl; @@ -485,7 +521,7 @@ bool GraphBase::PortsOfNode::RemoveLinks() { } #endif -void GraphBase::PortsOfNode::ListPorts( ostrstream & f, +void GraphBase::PortsOfNode::ListPorts( ostream & f, const bool klink ) const { int i ; diff --git a/src/GraphBase/DataFlowBase_PortsOfNode.hxx b/src/GraphBase/DataFlowBase_PortsOfNode.hxx index 0b22633..395c81a 100644 --- a/src/GraphBase/DataFlowBase_PortsOfNode.hxx +++ b/src/GraphBase/DataFlowBase_PortsOfNode.hxx @@ -64,7 +64,7 @@ namespace GraphBase { // const bool WithInGate , // const bool WithOutGate , int * Graph_prof_debug , - ostream * Graph_fdebug ) ; + ofstream * Graph_fdebug ) ; InPort * AddInPort( CORBA::ORB_ptr ORB , const char *const * NodeName , @@ -72,36 +72,53 @@ namespace GraphBase { const char * InputParameterName , const char * InputParameterType , int * Graph_prof_debug , - ostream * Graph_fdebug ) ; + ofstream * Graph_fdebug ) ; OutPort * AddOutPort( CORBA::ORB_ptr ORB , const char *const * NodeName , const SUPERV::KindOfNode aKind , const char * OutputParameterName , const char * InputParameterType , int * Graph_prof_debug , - ostream * Graph_fdebug ) ; + ofstream * Graph_fdebug ) ; // void InOutPort( InPort * InputPort , OutPort * OutputPort ) ; void DelInPort( const char * InputParameterName ) ; void DelOutPort( const char * OutputParameterName ) ; const int GetNodeInPortsSize() const { return _NodeInPortsSize ; } ; - const InPort *GetNodeInPort(int i) const { + const InPort * GetNodeInLoop() const { + return _NodeInPorts[0] ; } ; + const InPort * GetNodeInGate() const { + return _NodeInPorts[GetNodeInPortsSize()-1] ; } ; + const InPort * GetNodeInPort(int i) const { return _NodeInPorts[i] ; } ; - InPort *GetChangeNodeInPort(int i) const { + InPort * GetChangeNodeInLoop() const { + return _NodeInPorts[0] ; } ; + InPort * GetChangeNodeInGate() const { + return _NodeInPorts[GetNodeInPortsSize()-1] ; } ; + InPort * GetChangeNodeInPort(int i) const { return _NodeInPorts[i] ; } ; const int GetNodeOutPortsSize() const { return _NodeOutPortsSize ; } ; - const OutPort *GetNodeOutPort(int i) const { + const OutPort * GetNodeOutLoop() const { + return _NodeOutPorts[0] ; } ; + const OutPort * GetNodeOutGate() const { + return _NodeOutPorts[GetNodeOutPortsSize()-1] ; } ; + const OutPort * GetNodeOutPort(int i) const { return _NodeOutPorts[i] ; } ; - OutPort *GetChangeNodeOutPort(int i) const { + OutPort * GetChangeNodeOutLoop() const { + return _NodeOutPorts[0] ; } ; + OutPort * GetChangeNodeOutGate() const { + return _NodeOutPorts[GetNodeOutPortsSize()-1] ; } ; + OutPort * GetChangeNodeOutPort(int i) const { return _NodeOutPorts[i] ; } ; - const InPort *GetInPort( const char *name ) ; - const OutPort *GetOutPort( const char *name ) ; - InPort *GetChangeInPort( const char *name ) ; - OutPort *GetChangeOutPort( const char *name ) ; + const InPort * GetInPort( const char *name ) ; + const OutPort * GetOutPort( const char *name ) ; + InPort * GetChangeInPort( const char *name ) ; + OutPort * GetChangeOutPort( const char *name ) ; - void ListPorts( ostrstream & , const bool klink = true ) const ; +// void ListPorts( ostream & , const bool klink = true ) const ; + void ListPorts( ostream & , const bool klink = true ) const ; }; }; diff --git a/src/GraphBase/DataFlowBase_Service.cxx b/src/GraphBase/DataFlowBase_Service.cxx index 8ef3689..857188c 100644 --- a/src/GraphBase/DataFlowBase_Service.cxx +++ b/src/GraphBase/DataFlowBase_Service.cxx @@ -34,11 +34,11 @@ void GraphBase::Service::SetService( const SALOME_ModuleCatalog::Service aServic _Service.ServiceinParameter.length( aService.ServiceinParameter.length() ) ; _Service.ServiceoutParameter.length( aService.ServiceoutParameter.length() ) ; int i ; - for ( i = 0 ; i < _Service.ServiceinParameter.length() ; i++ ) { + for ( i = 0 ; i < (int ) _Service.ServiceinParameter.length() ; i++ ) { _Service.ServiceinParameter[ i ].Parametertype = CORBA::string_dup( aService.ServiceinParameter[ i ].Parametertype ) ; _Service.ServiceinParameter[ i ].Parametername = CORBA::string_dup( aService.ServiceinParameter[ i ].Parametername ) ; } - for ( i = 0 ; i < _Service.ServiceoutParameter.length() ; i++ ) { + for ( i = 0 ; i < (int ) _Service.ServiceoutParameter.length() ; i++ ) { _Service.ServiceoutParameter[ i ].Parametertype = CORBA::string_dup( aService.ServiceoutParameter[ i ].Parametertype ) ; _Service.ServiceoutParameter[ i ].Parametername = CORBA::string_dup( aService.ServiceoutParameter[ i ].Parametername ) ; } @@ -49,7 +49,7 @@ void GraphBase::Service::SetService( const SALOME_ModuleCatalog::Service aServic ostream & operator<< (ostream & f ,const SALOME_ModuleCatalog::Service & s ) { f << "Name " << s.ServiceName << endl ; int i ; - for ( i = 0 ; i < s.ServiceinParameter.length() ; i++ ) { + for ( i = 0 ; i < (int ) s.ServiceinParameter.length() ; i++ ) { if ( i == 0 ) f << " Inparameters " << i ; else @@ -57,7 +57,7 @@ ostream & operator<< (ostream & f ,const SALOME_ModuleCatalog::Service & s ) { f << ". " << s.ServiceinParameter[i].Parametername << ". " << s.ServiceinParameter[i].Parametertype << endl ; } - for ( i = 0 ; i < s.ServiceoutParameter.length() ; i++ ) { + for ( i = 0 ; i < (int ) s.ServiceoutParameter.length() ; i++ ) { if ( i == 0 ) f << " Outparameters " << i ; else diff --git a/src/GraphBase/DataFlowBase_Service.hxx b/src/GraphBase/DataFlowBase_Service.hxx index 4283b53..e6b7b05 100644 --- a/src/GraphBase/DataFlowBase_Service.hxx +++ b/src/GraphBase/DataFlowBase_Service.hxx @@ -44,6 +44,8 @@ namespace GraphBase { Service( const SALOME_ModuleCatalog::Service aService ) { SetService( aService ) ; +// MESSAGE( "GraphBase::Service::Service : " << _Service ) ; +// cout << "GraphBase::Service::Service : " << _Service << endl ; cdebug << "GraphBase::Service::Service : " << _Service << endl ; } ; Service( const char * aServiceName ) { @@ -51,7 +53,7 @@ namespace GraphBase { cdebug << "GraphBase::Service::Service : " << _Service << endl ; _Instance = 0 ; } ; virtual ~Service() { - MESSAGE( "GraphBase::Service::~Service" ); + cdebug << "GraphBase::Service::~Service" << endl ; } ; void SetService( const SALOME_ModuleCatalog::Service aService ) ; diff --git a/src/GraphBase/DataFlowBase_SwitchNode.cxx b/src/GraphBase/DataFlowBase_SwitchNode.cxx index 411abe6..e75a394 100644 --- a/src/GraphBase/DataFlowBase_SwitchNode.cxx +++ b/src/GraphBase/DataFlowBase_SwitchNode.cxx @@ -10,8 +10,8 @@ // $Header: using namespace std; -#include -#include +//#include +//#include #include "DataFlowBase_SwitchNode.hxx" @@ -39,7 +39,7 @@ GraphBase::SwitchNode::SwitchNode( CORBA::ORB_ptr ORB , const long X , const long Y , int * Graph_prof_debug , - ostream * Graph_fdebug ) : + ofstream * Graph_fdebug ) : GraphBase::GOTONode::GOTONode( ORB , ptrNamingService , FuncName , aPythonFunction , NodeName , akind , NodeFirstCreation , NodeLastModification , NodeEditorRelease , diff --git a/src/GraphBase/DataFlowBase_SwitchNode.hxx b/src/GraphBase/DataFlowBase_SwitchNode.hxx index 4f44757..de44def 100644 --- a/src/GraphBase/DataFlowBase_SwitchNode.hxx +++ b/src/GraphBase/DataFlowBase_SwitchNode.hxx @@ -38,7 +38,7 @@ namespace GraphBase { const long X , const long Y , int * Graph_prof_debug = NULL , - ostream * Graph_fdebug = NULL ) ; + ofstream * Graph_fdebug = NULL ) ; virtual ~SwitchNode() ; }; diff --git a/src/GraphBase/DataFlowBase_XmlHandler.cxx b/src/GraphBase/DataFlowBase_XmlHandler.cxx index 9330837..662a680 100644 --- a/src/GraphBase/DataFlowBase_XmlHandler.cxx +++ b/src/GraphBase/DataFlowBase_XmlHandler.cxx @@ -80,7 +80,7 @@ bool GraphBase::XmlHandler::startElement( const QString&, const QString&, dataflowxml = TRUE; } if ( dataflowxml ) { - fieldname[depth++] = qName ; + fieldname[depth++] = (const char * ) qName ; } if ( depth == maxlevel+1 ) return false ; @@ -296,7 +296,7 @@ bool GraphBase::XmlHandler::endElement( const QString&, if ( fieldvalue[depth] == NULLSTRING ) return returnfalse( this , "depth3-3" , qName ) ; // kind ok - sscanf( fieldvalue[depth].c_str() ,"%d" , &aNode.theKind ) ; + sscanf( fieldvalue[depth].c_str() ,"%d" , (int * ) &aNode.theKind ) ; fieldvalue[depth] = NULLSTRING ; step[depth]++ ; step[4] = 0 ; @@ -375,7 +375,7 @@ bool GraphBase::XmlHandler::endElement( const QString&, char Date[23] ; strcpy( Date , fieldvalue[depth].c_str() ) ; int i ; - for ( i = 0 ; i < strlen(Date) ; i++ ) { + for ( i = 0 ; i < (int ) strlen(Date) ; i++ ) { if ( Date[i] == '/' || Date[i] == '-' || Date[i] == ':' ) Date[i] = ' ' ; } @@ -406,7 +406,7 @@ bool GraphBase::XmlHandler::endElement( const QString&, char Date[23] ; strcpy( Date , fieldvalue[depth].c_str() ) ; int i ; - for ( i = 0 ; i < strlen(Date) ; i++ ) { + for ( i = 0 ; i < (int ) strlen(Date) ; i++ ) { if ( Date[i] == '/' || Date[i] == '-' || Date[i] == ':' ) Date[i] = ' ' ; } @@ -486,7 +486,7 @@ bool GraphBase::XmlHandler::endElement( const QString&, if ( qName == "x-position" ) { if ( fieldvalue[depth] == NULLSTRING ) return returnfalse( this , "depth3-14" , qName ) ; - sscanf( fieldvalue[depth].c_str() , "%d" , &aNode.theCoords.theX ) ; + sscanf( fieldvalue[depth].c_str() , "%ld" , &aNode.theCoords.theX ) ; fieldvalue[depth] = NULLSTRING ; step[depth]++ ; // x-position ok @@ -498,7 +498,7 @@ bool GraphBase::XmlHandler::endElement( const QString&, if ( qName == "y-position" ) { if ( fieldvalue[depth] == NULLSTRING ) return returnfalse( this , "depth3-15" , qName ) ; - sscanf( fieldvalue[depth].c_str() , "%d" , &aNode.theCoords.theY ) ; + sscanf( fieldvalue[depth].c_str() , "%ld" , &aNode.theCoords.theY ) ; fieldvalue[depth] = NULLSTRING ; step[depth]++ ; // y-position ok @@ -755,7 +755,7 @@ bool GraphBase::XmlHandler::endElement( const QString&, if ( qName == "coord" ) { if ( fieldvalue[depth] != NULLSTRING ) return returnfalse( this , "depth4-5" , qName ) ; - if ( VXSize == VX.size() ) { + if ( VXSize == (int ) VX.size() ) { VX.resize( VX.size() + 10 ) ; VY.resize( VY.size() + 10 ) ; } @@ -867,7 +867,12 @@ bool GraphBase::XmlHandler::endElement( const QString&, if ( qName == "inParameter-type" ) { if ( fieldvalue[depth] == NULLSTRING ) return returnfalse( this , "depth5-4" , qName ) ; - aParameter.Parametertype = fieldvalue[depth].c_str() ; + if ( strcmp( fieldvalue[depth].c_str() , "?" ) ) { + aParameter.Parametertype = fieldvalue[depth].c_str() ; + } + else { + aParameter.Parametertype = "" ; + } fieldvalue[depth] = NULLSTRING ; step[depth]++ ; } @@ -878,7 +883,12 @@ bool GraphBase::XmlHandler::endElement( const QString&, if ( qName == "inParameter-name" ) { if ( fieldvalue[depth] == NULLSTRING ) return returnfalse( this , "depth5-5" , qName ) ; - aParameter.Parametername = fieldvalue[depth].c_str() ; + if ( strcmp( fieldvalue[depth].c_str() , "?" ) ) { + aParameter.Parametername = fieldvalue[depth].c_str() ; + } + else { + aParameter.Parametername = "" ; + } fieldvalue[depth] = NULLSTRING ; step[depth]++ ; } @@ -889,7 +899,12 @@ bool GraphBase::XmlHandler::endElement( const QString&, if ( qName == "outParameter-type" ) { if ( fieldvalue[depth] == NULLSTRING ) return returnfalse( this , "depth5-6" , qName ) ; - aParameter.Parametertype = fieldvalue[depth].c_str() ; + if ( strcmp( fieldvalue[depth].c_str() , "?" ) ) { + aParameter.Parametertype = fieldvalue[depth].c_str() ; + } + else { + aParameter.Parametertype = "" ; + } fieldvalue[depth] = NULLSTRING ; step[depth]++ ; } @@ -900,7 +915,12 @@ bool GraphBase::XmlHandler::endElement( const QString&, if ( qName == "outParameter-name" ) { if ( fieldvalue[depth] == NULLSTRING ) return returnfalse( this , "depth5-7" , qName ) ; - aParameter.Parametername = fieldvalue[depth].c_str() ; + if ( strcmp( fieldvalue[depth].c_str() , "?" ) ) { + aParameter.Parametername = fieldvalue[depth].c_str() ; + } + else { + aParameter.Parametername = "" ; + } fieldvalue[depth] = NULLSTRING ; step[depth]++ ; } @@ -1039,7 +1059,7 @@ bool GraphBase::XmlHandler::characters( const QString& ch ) { if ( depth < 0 || fieldvalue[depth] != NULLSTRING ) return returnfalse( this , "characters " , ch ) ; - fieldvalue[depth] = ch ; + fieldvalue[depth] = (const char * ) ch ; return TRUE; } diff --git a/src/GraphEditor/DataFlowEditor_DataFlow.cxx b/src/GraphEditor/DataFlowEditor_DataFlow.cxx index 40e2639..73654b3 100644 --- a/src/GraphEditor/DataFlowEditor_DataFlow.cxx +++ b/src/GraphEditor/DataFlowEditor_DataFlow.cxx @@ -41,15 +41,20 @@ GraphEditor::DataFlow::DataFlow() : cdebug_out << "GraphEditor::DataFlow::DataFlowEditor()" << endl; } +//extern ostream * fdebug ; + GraphEditor::DataFlow::DataFlow( CORBA::ORB_ptr ORB, SALOME_NamingService* ptrNamingService , const char *DataFlowName , const char * DebugFileName ) : OutNode( ORB, ptrNamingService , DataFlowName , DebugFileName ) { +// cout << "GraphEditor::DataFlow::DataFlow(" ; cdebug_in << "GraphEditor::DataFlow::DataFlow(" ; if ( DataFlowName ) { - cdebug << DataFlowName ; +// cout << DataFlowName << " , " << DebugFileName ; + cdebug << DataFlowName << " , " << DebugFileName; } +// cout << ")" << endl; cdebug << ")" << endl; _theNamingService = ptrNamingService ; @@ -58,6 +63,7 @@ GraphEditor::DataFlow::DataFlow( CORBA::ORB_ptr ORB, _Executing = false ; cdebug_out << "GraphEditor::DataFlow::DataFlow" << endl; +// fdebug = new ofstream( DebugFileName ); // GraphBase::Base::_fdebug ; } GraphEditor::DataFlow::DataFlow( diff --git a/src/GraphEditor/DataFlowEditor_DataFlow.hxx b/src/GraphEditor/DataFlowEditor_DataFlow.hxx index 2209f7c..23e65b1 100644 --- a/src/GraphEditor/DataFlowEditor_DataFlow.hxx +++ b/src/GraphEditor/DataFlowEditor_DataFlow.hxx @@ -47,10 +47,10 @@ namespace GraphEditor { public: DataFlow(); - DataFlow( CORBA::ORB_ptr ORB, SALOME_NamingService* ptrNamingService , + DataFlow( CORBA::ORB_ptr ORB, SALOME_NamingService * ptrNamingService , const char * DataFlowName , const char * DebugFileName ); - DataFlow( CORBA::ORB_ptr ORB, SALOME_NamingService* ptrNamingService , + DataFlow( CORBA::ORB_ptr ORB, SALOME_NamingService * ptrNamingService , const SALOME_ModuleCatalog::Service& DataFlowService , const char * DataFlowComponentName , const char * DataFlowInterfaceName , @@ -58,11 +58,11 @@ namespace GraphEditor { const SUPERV::KindOfNode DataFlowkind = SUPERV::ComputingNode , const SUPERV::SDate DataFlowFirstCreation = SUPERV::SDate() , const SUPERV::SDate DataFlowLastModification = SUPERV::SDate() , - const char * DataFlowEditorRelease = NULL , - const char * DataFlowAuthor = NULL , - const char * DataFlowComputer = NULL , - const char * DataFlowComment = NULL , - const char * DebugFileName = NULL ) ; + const char * DataFlowEditorRelease = NULLSTRING , + const char * DataFlowAuthor = NULLSTRING , + const char * DataFlowComputer = NULLSTRING , + const char * DataFlowComment = NULLSTRING , + const char * DebugFileName = NULLSTRING ) ; virtual ~DataFlow(); void ReadOnly() ; @@ -70,12 +70,12 @@ namespace GraphEditor { char * DataNodeInfo() ; char * NodeInfo( const char * aNodeName ) ; - 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 ) ; - bool SaveXml(const char* myFileName ) ; - bool SavePy(const char* myFileName ) ; + bool SaveXml(const char * myFileName ) ; + bool SavePy(const char * myFileName ) ; // void DateModification() ; @@ -90,125 +90,125 @@ namespace GraphEditor { GraphEditor::InNode * AddService ( SALOME_ModuleCatalog::Service& aService , - const char *NodeComponentName , - const char* NodeInterfaceName ) { + const char * NodeComponentName , + const char * NodeInterfaceName ) { return AddNode( aService , NodeComponentName , NodeInterfaceName ) ; } ; GraphEditor::InNode * AddNode( const SALOME_ModuleCatalog::Service& NodeService , - const char* NodeComponentName , - const char* NodeInterfaceName , - const char* NodeName = NULL , + const char * NodeComponentName , + const char * NodeInterfaceName , + const char * NodeName = NULLSTRING , const SUPERV::KindOfNode NodeKindOfNode = SUPERV::ComputingNode , GraphBase::ListOfFuncName aFuncName = GraphBase::ListOfFuncName() , GraphBase::ListOfPythonFunctions aPythonFunction = GraphBase::ListOfPythonFunctions() , const SUPERV::SDate NodeFirstCreation = SUPERV::SDate() , const SUPERV::SDate NodeLastModification = SUPERV::SDate() , - const char * NodeEditorRelease = NULL , - const char * NodeAuthor = NULL , - const char * NodeComputer = NULL , - const char * NodeComment = NULL , + const char * NodeEditorRelease = NULLSTRING , + const char * NodeAuthor = NULLSTRING , + const char * NodeComputer = NULLSTRING , + const char * NodeComment = NULLSTRING , const int NodeX = 0 , const int NodeY = 0 ) ; GraphEditor::InNode * GetNode( const char* NodeName ) ; - bool RemoveNode( const char* NodeName ) ; - bool ReNameNode( const char* OldNodeName , - const char* NewNodeName ) ; + bool RemoveNode( const char * NodeName ) ; + bool ReNameNode( const char * OldNodeName , + const char * NewNodeName ) ; const SALOME_ModuleCatalog::Service * NodeService( const char * NodeName ) ; void Coordinates( const int X , const int Y ) ; const int XCoordinate() ; const int YCoordinate() ; - void Coordinates( const char* NodeName , const int X , const int Y ) ; - const int XCoordinate( const char* NodeName ) ; - const int YCoordinate( const char* NodeName ) ; + void Coordinates( const char * NodeName , const int X , const int Y ) ; + const int XCoordinate( const char * NodeName ) ; + const int YCoordinate( const char * NodeName ) ; - const GraphBase::InPort *GetInPort( const char *name ) ; - const GraphBase::OutPort *GetOutPort( const char *name ) ; - GraphBase::InPort *GetChangeInPort( const char *name ) ; - GraphBase::OutPort *GetChangeOutPort( const char *name ) ; + const GraphBase::InPort * GetInPort( const char * name ) ; + const GraphBase::OutPort * GetOutPort( const char * name ) ; + GraphBase::InPort * GetChangeInPort( const char * name ) ; + GraphBase::OutPort * GetChangeOutPort( const char * name ) ; bool HasInput(const char * ToServiceParameterName ) ; - bool AddLinkValue( const char *FromNodeName , - const char *FromServiceParameterName , - const char *ToNodeName , - 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 AddLink( const char* FromNodeName , - const char* FromServiceParameterName , - const char* ToNodeName , - const char* ToServiceParameterName , + bool AddLink( const char * FromNodeName , + const char * FromServiceParameterName , + const char * ToNodeName , + const char * ToServiceParameterName , const CORBA::Any aValue = CORBA::Any() ) ; - bool RemoveLink( const char* FromNodeName , - const char* FromServiceParameterName , - const char* ToNodeName , - const char* ToServiceParameterName ) ; + bool RemoveLink( const char * FromNodeName , + const char * FromServiceParameterName , + const char * ToNodeName , + const char * ToServiceParameterName ) ; - bool GetLink(const char* ToNodeName , - const char* ToServiceParameterName , - char** FromNodeName , - char** FromServiceParameterName ) ; + bool GetLink(const char * ToNodeName , + const char * ToServiceParameterName , + char ** FromNodeName , + char ** FromServiceParameterName ) ; GraphBase::SLink * GetLink( GraphBase::ComputingNode * aNode , const char* ToServiceParameterName ) ; - bool AddLinkCoord( const char* FromNodeName , - const char* FromServiceParameterName , - const char* ToNodeName , - const char* ToServiceParameterName , + bool AddLinkCoord( const char * FromNodeName , + const char * FromServiceParameterName , + const char * ToNodeName , + const char * ToServiceParameterName , const int nXY , - const int* X , - const int* Y ) ; - bool AddLinkCoord( const char* FromNodeName , - const char* FromServiceParameterName , - const char* ToNodeName , - const char* ToServiceParameterName , + const int * X , + const int * Y ) ; + bool AddLinkCoord( const char * FromNodeName , + const char * FromServiceParameterName , + const char * ToNodeName , + const char * ToServiceParameterName , const int index , const int X , const int Y ) ; - bool ChangeLinkCoord( const char* FromNodeName , - const char* FromServiceParameterName , - const char* ToNodeName , - const char* ToServiceParameterName , + bool ChangeLinkCoord( const char * FromNodeName , + const char * FromServiceParameterName , + const char * ToNodeName , + const char * ToServiceParameterName , const int index , const int X , const int Y ) ; - bool RemoveLinkCoord( const char* FromNodeName , - const char* FromServiceParameterName , - const char* ToNodeName , - const char* ToServiceParameterName , + bool RemoveLinkCoord( const char * FromNodeName , + const char * FromServiceParameterName , + const char * ToNodeName , + const char * ToServiceParameterName , const int index ) ; - int GetLinkCoordSize( const char* FromNodeName , - const char* FromServiceParameterName , - const char* ToNodeName , - const char* ToServiceParameterName ) ; - bool GetLinkCoord( const char* FromNodeName , - const char* FromServiceParameterName , - const char* ToNodeName , - const char* ToServiceParameterName , - int *X , int *Y ) ; - bool GetLinkCoord( const char* FromNodeName , - const char* FromServiceParameterName , - const char* ToNodeName , - const char* ToServiceParameterName , + int GetLinkCoordSize( const char * FromNodeName , + const char * FromServiceParameterName , + const char * ToNodeName , + const char * ToServiceParameterName ) ; + bool GetLinkCoord( const char * FromNodeName , + const char * FromServiceParameterName , + const char * ToNodeName , + const char * ToServiceParameterName , + int * X , int * Y ) ; + bool GetLinkCoord( const char * FromNodeName , + const char * FromServiceParameterName , + const char * ToNodeName , + const char * ToServiceParameterName , const int index , long &X , long &Y ) ; - bool AddInputData( const char* ToNodeName , - const char* ToParameterName , + 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 ) ; - const CORBA::Any *GetOutData( const char * FromNodeName , - const char * FromParameterName ) ; + bool AddInputSharedData( const char * ToNodeName1 , + const char * ToParameterName1 , + const char * ToNodeName2 , + const char * ToParameterName2 ) ; + + const CORBA::Any * GetInData( const char * ToNodeName , + const char * ToParameterName ) ; + const CORBA::Any * GetOutData( const char * FromNodeName , + const char * FromParameterName ) ; bool IsValid() ; bool IsExecutable() ; diff --git a/src/GraphEditor/DataFlowEditor_DataFlow.lxx b/src/GraphEditor/DataFlowEditor_DataFlow.lxx index b248b3b..1a783e8 100644 --- a/src/GraphEditor/DataFlowEditor_DataFlow.lxx +++ b/src/GraphEditor/DataFlowEditor_DataFlow.lxx @@ -34,31 +34,30 @@ inline void GraphEditor::DataFlow::ReadOnly() { } inline char * GraphEditor::DataFlow::DataFlowInfo() { - ostrstream s; + ostringstream s; IsValid() ; GraphEditor::DataFlow::DataFlow aDataFlow = *this ; s << aDataFlow << ends ; - return CORBA::string_dup( s.str() ); + return CORBA::string_dup( s.str().c_str() ); } inline char * GraphEditor::DataFlow::DataNodeInfo() { - ostrstream s; + ostringstream s; IsValid() ; GraphBase::DataNode::DataNodeInfo( s ) ; - return CORBA::string_dup(s.str()); + return CORBA::string_dup( s.str().c_str() ); } inline char * GraphEditor::DataFlow::NodeInfo( const char * aNodeName ) { - ostrstream s; + ostringstream s; if ( GetGraphNode( aNodeName ) ) GetGraphNode( aNodeName )->NodeInfo( s ) ; else s << aNodeName << " not found" << ends ; - return CORBA::string_dup( s.str() ); + 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 ; @@ -135,10 +134,22 @@ inline GraphEditor::InNode * GraphEditor::DataFlow::AddNode( const char * NodeComment, const int NodeX, const int NodeY) { - if ( _ReadOnly ) + if ( NodeName != NULLSTRING && strlen( NodeName ) ) { +// MESSAGE( "--> GraphEditor::DataFlow::AddNode( " << NodeName << " )" ) ; +// cout << "--> GraphEditor::DataFlow::AddNode( " << NodeName << " )" << endl ; + cdebug_in << "GraphEditor::DataFlow::AddNode( " << NodeName << " )" << endl ; + } + else { +// MESSAGE( "--> GraphEditor::DataFlow::AddNode( NULL )" ) ; +// cout << "--> GraphEditor::DataFlow::AddNode( NULL )" << endl ; + NodeName = NULLSTRING ; + cdebug_in << "GraphEditor::DataFlow::AddNode( NULL )" << endl ; + } + if ( _ReadOnly ) { return (GraphEditor::InNode * ) NULL ; + } _EditedAfterExecution = true ; - return GraphEditor::OutNode::AddNode( NodeService , + GraphEditor::InNode * aNode = GraphEditor::OutNode::AddNode( NodeService , aFuncName , aPythonFunction , NodeComponentName , NodeInterfaceName , @@ -147,7 +158,11 @@ inline GraphEditor::InNode * GraphEditor::DataFlow::AddNode( NodeLastModification , NodeEditorRelease , NodeAuthor , NodeComputer , - NodeComment , NodeX , NodeY ) ; + NodeComment , NodeX , NodeY ) ; +// MESSAGE( "<-- GraphEditor::DataFlow::AddNode( " << aNode->Name() << " )" ) ; +// cout << "<-- GraphEditor::DataFlow::AddNode( " << aNode->Name() << " )" << endl ; + cdebug_out << "GraphEditor::DataFlow::AddNode( " << aNode->Name() << " )" << endl ; + return aNode ; } ; inline GraphEditor::InNode * GraphEditor::DataFlow::GetNode( const char* NodeName ) { @@ -155,24 +170,27 @@ inline GraphEditor::InNode * GraphEditor::DataFlow::GetNode( const char* NodeNam } ; inline bool GraphEditor::DataFlow::RemoveNode( const char* NodeName ) { - if ( _ReadOnly ) + if ( _ReadOnly ) { return false ; + } _EditedAfterExecution = true ; return GraphEditor::OutNode::RemoveNode( NodeName ) ; } ; inline bool GraphEditor::DataFlow::ReNameNode( const char* OldNodeName , const char* NewNodeName ) { - if ( _ReadOnly ) + if ( _ReadOnly ) { return false ; + } _EditedAfterExecution = true ; return GraphEditor::OutNode::ReNameNode( OldNodeName , NewNodeName ) ; } ; inline const SALOME_ModuleCatalog::Service * GraphEditor::DataFlow::NodeService( const char * aNodeName ) { - if ( GetGraphNode( aNodeName ) ) + if ( GetGraphNode( aNodeName ) ) { return GetGraphNode( aNodeName )->GetService() ; + } return NULL ; } @@ -224,8 +242,9 @@ inline bool GraphEditor::DataFlow::AddLink( const char* FromNodeName , const char* ToNodeName , const char* ToServiceParameterName , const CORBA::Any aValue ) { - if ( _ReadOnly ) + if ( _ReadOnly ) { return false ; + } CORBA::Any const * theValue = GetNode( FromNodeName )->GetOutPort( FromServiceParameterName )->Value() ; // Keep the type ! _EditedAfterExecution = true ; return GraphEditor::OutNode::AddLink( FromNodeName , @@ -355,8 +374,9 @@ inline bool GraphEditor::DataFlow::RemoveLink( const char* FromServiceParameterName , const char* ToNodeName , const char* ToServiceParameterName ) { - if ( _ReadOnly ) + if ( _ReadOnly ) { return false ; + } _EditedAfterExecution = true ; return GraphEditor::OutNode::RemoveLink( FromNodeName , FromServiceParameterName , @@ -387,8 +407,9 @@ inline bool GraphEditor::DataFlow::AddInputData( const char* ToNodeName , delete aNode ; delete aPort ; #endif - if ( !IsValid() ) + if ( !IsValid() ) { return false ; + } return GraphBase::Graph::AddInputData( ToNodeName , ToParameterName , aValue ) ; } ; @@ -397,8 +418,9 @@ inline bool GraphEditor::DataFlow::AddInputSharedData(const char* ToNodeName1 , const char* ToParameterName1 , const char* ToNodeName2 , const char* ToParameterName2 ) { - if ( !IsValid() ) + if ( !IsValid() ) { return false ; + } return GraphEditor::OutNode::AddInputData( ToNodeName1 , ToParameterName1 , ToNodeName2 , ToParameterName2 ) ; } ; @@ -456,26 +478,30 @@ inline bool GraphEditor::DataFlow::IsReadOnly() { } inline long GraphEditor::DataFlow::LevelMax() { - if ( !IsValid() ) + if ( !IsValid() ) { return 0 ; + } return GraphBase::Graph::LevelMax() ; } inline SUPERV::ListOfStrings * GraphEditor::DataFlow::LevelNodes(long aLevel ) { - if ( !IsValid() ) + if ( !IsValid() ) { return ((SUPERV::ListOfStrings * ) NULL ) ; + } return GraphBase::Graph::LevelNodes( aLevel ) ; } inline long GraphEditor::DataFlow::ThreadsMax() { - if ( !IsValid() ) + if ( !IsValid() ) { return 0 ; + } return GraphBase::Graph::ThreadsMax() ; } inline long GraphEditor::DataFlow::GraphsNumber() { - if ( !IsValid() ) + if ( !IsValid() ) { return 0 ; + } return GraphBase::Graph::GraphsNumber() ; } diff --git a/src/GraphEditor/DataFlowEditor_InNode.cxx b/src/GraphEditor/DataFlowEditor_InNode.cxx index 034c99e..28044aa 100644 --- a/src/GraphEditor/DataFlowEditor_InNode.cxx +++ b/src/GraphEditor/DataFlowEditor_InNode.cxx @@ -25,22 +25,23 @@ // Module : SUPERV using namespace std; -#include -#include -#include +//#include +//#include +//#include #include "DataFlowEditor_InNode.hxx" GraphEditor::InNode::InNode() { } +//ostream * fdebug = NULL ; GraphEditor::InNode::InNode( CORBA::ORB_ptr ORB, - SALOME_NamingService* ptrNamingService , + SALOME_NamingService * ptrNamingService , GraphBase::ListOfFuncName aFuncName , GraphBase::ListOfPythonFunctions aPythonFunction , const SALOME_ModuleCatalog::Service& aService , const char * ComponentName , - const char* NodeInterfaceName , + const char * NodeInterfaceName , const char * NodeName , const SUPERV::KindOfNode akind , const SUPERV::SDate NodeFirstCreation , @@ -53,9 +54,15 @@ GraphEditor::InNode::InNode( CORBA::ORB_ptr ORB, const int X , const int Y , int * Graph_prof_debug, - ostream * Graph_fdebug) { + ofstream * Graph_fdebug) { SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ; - +// cout << "GraphEditor::InNode::InNode GraphBase::Base::_fdebug " << GraphBase::Base::_fdebug << endl ; + cdebug_in << "GraphEditor::InNode::InNode" << endl ; +// if ( GraphBase::Base::_fdebug ) +// *GraphBase::Base::_fdebug << endl << "xxx-->" << " " << "GraphEditor::InNode::InNode" << endl ; +// if ( fdebug ) +// (*fdebug) << endl << "xxxxxx-->" << " " << "GraphEditor::InNode::InNode" << endl ; +// cout << "GraphEditor::InNode::InNode GraphBase::Base::_fdebug " << GraphBase::Base::_fdebug << endl ; _ComputingNode = NULL ; _FactoryNode = NULL ; _InLineNode = NULL ; @@ -66,7 +73,7 @@ GraphEditor::InNode::InNode( CORBA::ORB_ptr ORB, _EndOfSwitchNode = NULL ; switch ( akind ) { case SUPERV::ComputingNode : { - cdebug << "GraphEditor::InNode::InNode SUPERV::ComputingNode : " << NodeName ; + cdebug << "GraphEditor::InNode::InNode SUPERV::ComputingNode : " << NodeName << endl ; _ComputingNode = new GraphBase::ComputingNode( ORB , ptrNamingService , aService , NodeName , akind , NodeFirstCreation , @@ -78,7 +85,8 @@ GraphEditor::InNode::InNode( CORBA::ORB_ptr ORB, break ; } case SUPERV::FactoryNode : { - cdebug << "GraphEditor::InNode::InNode SUPERV::FactoryNode : " << NodeName ; +// cout << "GraphEditor::InNode::InNode SUPERV::FactoryNode : " << NodeName << endl ; + cdebug << "GraphEditor::InNode::InNode SUPERV::FactoryNode : " << NodeName << endl ; _FactoryNode = new GraphBase::FactoryNode( ORB , ptrNamingService , aService , ComponentName , NodeInterfaceName , NodeName , akind , @@ -88,11 +96,12 @@ GraphEditor::InNode::InNode( CORBA::ORB_ptr ORB, NodeComputer , NodeComment , GeneratedName , X , Y , Graph_prof_debug , Graph_fdebug ) ; +// cout << "GraphEditor::InNode::InNode SUPERV::FactoryNode : " << NodeName << endl ; _ComputingNode = (GraphBase::ComputingNode *) _FactoryNode ; break ; } case SUPERV::InLineNode : { - cdebug << "GraphEditor::InNode::InNode SUPERV::InLineNode : " << NodeName ; + cdebug << "GraphEditor::InNode::InNode SUPERV::InLineNode : " << NodeName << endl ; _InLineNode = new GraphBase::InLineNode( ORB , ptrNamingService , aFuncName[0].c_str() , *aPythonFunction[0] , NodeName , akind , @@ -105,7 +114,7 @@ GraphEditor::InNode::InNode( CORBA::ORB_ptr ORB, break ; } case SUPERV::GOTONode : { - cdebug << "GraphEditor::InNode::InNode SUPERV::GOTONode : " << NodeName ; + cdebug << "GraphEditor::InNode::InNode SUPERV::GOTONode : " << NodeName << endl ; _GOTONode = new GraphBase::GOTONode( ORB , ptrNamingService , aFuncName[0].c_str() , *aPythonFunction[0] , NodeName , akind , @@ -115,10 +124,11 @@ GraphEditor::InNode::InNode( CORBA::ORB_ptr ORB, X , Y , Graph_prof_debug , Graph_fdebug ) ; _ComputingNode = (GraphBase::ComputingNode *) _GOTONode ; + _InLineNode = (GraphBase::InLineNode *) _ComputingNode ; break ; } case SUPERV::LoopNode : { - cdebug << "GraphEditor::InNode::InNode SUPERV::LoopNode : " << NodeName ; + cdebug << "GraphEditor::InNode::InNode SUPERV::LoopNode : " << NodeName << endl ; _LoopNode = new GraphBase::LoopNode( ORB , ptrNamingService , aFuncName[0].c_str() , *aPythonFunction[0] , aFuncName[1].c_str() , *aPythonFunction[1] , @@ -131,10 +141,11 @@ GraphEditor::InNode::InNode( CORBA::ORB_ptr ORB, Graph_prof_debug , Graph_fdebug ) ; _ComputingNode = (GraphBase::ComputingNode *) _LoopNode ; _GOTONode = (GraphBase::GOTONode *) _ComputingNode ; + _InLineNode = (GraphBase::InLineNode *) _ComputingNode ; break ; } case SUPERV::EndLoopNode : { - cdebug << "GraphEditor::InNode::InNode SUPERV::EndOfLoopNode : " << NodeName ; + cdebug << "GraphEditor::InNode::InNode SUPERV::EndOfLoopNode : " << NodeName << endl ; _EndOfLoopNode = new GraphBase::EndOfLoopNode( ORB , ptrNamingService , aFuncName[0].c_str() , *aPythonFunction[0] , @@ -146,10 +157,11 @@ GraphEditor::InNode::InNode( CORBA::ORB_ptr ORB, Graph_prof_debug , Graph_fdebug ) ; _ComputingNode = (GraphBase::ComputingNode *) _EndOfLoopNode ; _GOTONode = (GraphBase::GOTONode *) _ComputingNode ; + _InLineNode = (GraphBase::InLineNode *) _ComputingNode ; break ; } case SUPERV::SwitchNode : { - cdebug << "GraphEditor::InNode::InNode SUPERV::SwitchNode : " << NodeName ; + cdebug << "GraphEditor::InNode::InNode SUPERV::SwitchNode : " << NodeName << endl ; _SwitchNode = new GraphBase::SwitchNode( ORB , ptrNamingService , aFuncName[0].c_str() , *aPythonFunction[0] , NodeName , akind , @@ -160,10 +172,11 @@ GraphEditor::InNode::InNode( CORBA::ORB_ptr ORB, Graph_prof_debug , Graph_fdebug ) ; _ComputingNode = (GraphBase::ComputingNode *) _SwitchNode ; _GOTONode = (GraphBase::GOTONode *) _ComputingNode ; + _InLineNode = (GraphBase::InLineNode *) _ComputingNode ; break ; } case SUPERV::EndSwitchNode : { - cdebug << "GraphEditor::InNode::InNode SUPERV::EndOfSwitchNode : " << NodeName ; + cdebug << "GraphEditor::InNode::InNode SUPERV::EndOfSwitchNode : " << NodeName << endl ; _EndOfSwitchNode = new GraphBase::EndOfSwitchNode( ORB , ptrNamingService , aFuncName[0].c_str() , *aPythonFunction[0] , @@ -175,12 +188,19 @@ GraphEditor::InNode::InNode( CORBA::ORB_ptr ORB, Graph_prof_debug , Graph_fdebug ) ; _ComputingNode = (GraphBase::ComputingNode *) _EndOfSwitchNode ; _GOTONode = (GraphBase::GOTONode *) _ComputingNode ; + _InLineNode = (GraphBase::InLineNode *) _ComputingNode ; break ; } + case SUPERV::DataFlowNode : { + cdebug << "GraphEditor::InNode::InNode ERROR SUPERV::DataFlowNode : " << NodeName << endl ; + } + case SUPERV::UnknownNode : { + cdebug << "GraphEditor::InNode::InNode ERROR SUPERV::UnknownNode : " << NodeName << endl ; + } } - cdebug << "GraphEditor::InNode::InNode " << (void *) this - << " _ComputingNode " << (void *) _ComputingNode ; _ComputingNode->InNode( this ) ; + cdebug_out << "GraphEditor::InNode::InNode " << (void *) this + << " _ComputingNode " << (void *) _ComputingNode << endl ; } GraphEditor::InNode::~InNode() { diff --git a/src/GraphEditor/DataFlowEditor_InNode.hxx b/src/GraphEditor/DataFlowEditor_InNode.hxx index 2c8cfd9..c94afc4 100644 --- a/src/GraphEditor/DataFlowEditor_InNode.hxx +++ b/src/GraphEditor/DataFlowEditor_InNode.hxx @@ -71,7 +71,7 @@ namespace GraphEditor { const int NodeX , const int NodeY , int * Graph_prof_debug = NULL , - ostream * Graph_fdebug = NULL ) ; + ofstream * Graph_fdebug = NULL ) ; virtual ~InNode() ; char * Name() const { return _ComputingNode->Name() ; } ; @@ -184,17 +184,17 @@ namespace GraphEditor { GraphBase::InPort * AddInPort( const char * InputParameterName , const char * InputParameterType ) { - return _ComputingNode->AddInPort( InputParameterName , + return _InLineNode->AddInPort( InputParameterName , InputParameterType ) ; } ; GraphBase::OutPort * AddOutPort( const char * OutputParameterName , const char * OutputParameterType ) { - return _ComputingNode->AddOutPort( OutputParameterName , + return _InLineNode->AddOutPort( OutputParameterName , OutputParameterType ) ; } ; void DelInPort( const char * InputParameterName ) { - _ComputingNode->DelInPort( InputParameterName ) ; } ; + _InLineNode->DelInPort( InputParameterName ) ; } ; void DelOutPort( const char * OutputParameterName ) { - _ComputingNode->DelOutPort( OutputParameterName ) ; } ; + _InLineNode->DelOutPort( OutputParameterName ) ; } ; bool IsLinked(const char * ToServiceParameterName ) { return _ComputingNode->IsLinked( ToServiceParameterName ) ; } ; diff --git a/src/GraphEditor/DataFlowEditor_OutNode.cxx b/src/GraphEditor/DataFlowEditor_OutNode.cxx index bdb00d8..7b3d503 100644 --- a/src/GraphEditor/DataFlowEditor_OutNode.cxx +++ b/src/GraphEditor/DataFlowEditor_OutNode.cxx @@ -25,6 +25,8 @@ // Module : SUPERV using namespace std; +#include +#include #include "DataFlowEditor_OutNode.hxx" #include "DataFlowBase_EndOfLoopNode.hxx" #include "DataFlowBase_EndOfSwitchNode.hxx" @@ -43,8 +45,8 @@ GraphEditor::OutNode::OutNode() : } GraphEditor::OutNode::OutNode( CORBA::ORB_ptr ORB , - SALOME_NamingService* ptrNamingService , - const char *DataFlowName , + SALOME_NamingService * ptrNamingService , + const char * DataFlowName , const char * DebugFileName ) : Graph( ORB , ptrNamingService , DataFlowName , DebugFileName ) { cdebug_in << "GraphEditor::OutNode::OutNode(" ; @@ -63,11 +65,11 @@ GraphEditor::OutNode::OutNode( CORBA::ORB_ptr ORB , GraphEditor::OutNode::OutNode( CORBA::ORB_ptr ORB , - SALOME_NamingService* ptrNamingService , + SALOME_NamingService * ptrNamingService , const SALOME_ModuleCatalog::Service& DataFlowService , - const char *DataFlowComponentName , - const char *DataFlowInterfaceName , - const char *DataFlowName , + const char * DataFlowComponentName , + const char * DataFlowInterfaceName , + const char * DataFlowName , const SUPERV::KindOfNode DataFlowkind , const SUPERV::SDate DataFlowFirstCreation , const SUPERV::SDate DataFlowLastModification , @@ -95,35 +97,27 @@ GraphEditor::OutNode::~OutNode() { // delete _GT ; } -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() << endl; -// if ( GraphBase::Service::ServiceName() == NULL || -// !strlen( GraphBase::Service::ServiceName() ) || !aConstructor ) { if ( !_Imported ) { RetVal = LoadInfo( aDataFlow->Info ) ; _Imported = true ; } - else + else { RetVal = true ; + } - map< string , int > aMapOfNodes ; - if ( RetVal ) - RetVal = LoadNodes( aMapOfNodes , aDataFlow->Nodes ) ; - if ( RetVal ) - RetVal = LoadLinks( aMapOfNodes , aDataFlow->Links ) ; - if ( RetVal ) { - Valid() ; - RetVal = LoadDatas( aMapOfNodes , aDataFlow->Datas ) ; - } -// } -// else { -// cdebug << "GraphEditor::OutNode::LoadDataFlow Error. ServiceName : " -// << (void *) GraphBase::Service::ServiceName() << " '" -// << GraphBase::Service::ServiceName() << "'" << endl ; -// } + map< string , int > aMapOfNodes ; + if ( RetVal ) + RetVal = LoadNodes( aMapOfNodes , aDataFlow->Nodes ) ; + if ( RetVal ) + RetVal = LoadLinks( aMapOfNodes , aDataFlow->Links ) ; + if ( RetVal ) { + Valid() ; + RetVal = LoadDatas( aMapOfNodes , aDataFlow->Datas ) ; + } cdebug_out << "GraphEditor::OutNode::LoadDataFlow" << endl; return RetVal ; } @@ -131,17 +125,16 @@ bool GraphEditor::OutNode::LoadDataFlow( bool GraphEditor::OutNode::LoadXml( const char* myFileName ) { bool RetVal = false ; GraphBase::SGraph aDataFlow ; - cdebug_in << "GraphEditor::OutNode::LoadXml() " << endl; if ( myFileName == NULL ) { + cdebug << "GraphEditor::OutNode::LoadXml() No file" << endl; _Imported = true ; RetVal = true ; } else if ( GraphBase::Graph::LoadXml( _Orb , myFileName , aDataFlow ) ) { + cdebug_in << "GraphEditor::OutNode::LoadXml() " << endl; RetVal = LoadDataFlow( &aDataFlow ) ; -// if ( RetVal ) -// RetVal = Name( aDataFlow.Info.theName.c_str() ) ; + cdebug_out << "GraphEditor::OutNode::LoadXml " << RetVal << endl; } - cdebug_out << "GraphEditor::OutNode::LoadXml" << endl; return RetVal ; } @@ -171,92 +164,59 @@ bool GraphEditor::OutNode::LoadNodes(map< string , int > & aMapOfNodes , GraphEditor::InNode * anInNode ; cdebug_in << "GraphEditor::OutNode::LoadNodes" << endl ; int i ; - for ( i = 0 ; i < aListOfNodes.size() ; i++ ) { + for ( i = 0 ; i < (int ) aListOfNodes.size() ; i++ ) { GraphBase::SNode aNode = aListOfNodes[ i ] ; -// if ( aConstructor ) { -// anInNode = AddNode( aNode.theService , aNode.theComponentName.c_str() , -// aNode.theInterfaceName.c_str() , -// aNode.theName.c_str() , -// aNode.theKind , -// aNode.theFirstCreation , aNode.theLastModification , -// aNode.theEditorRelease.c_str() , -// aNode.theAuthor.c_str() , aNode.theContainer.c_str() , -// aNode.theComment.c_str() , -// aNode.theCoords.theX , aNode.theCoords.theY ) ; -// } -// else { - const char * aNodeName = aNode.theName.c_str() ; - if ( aNode.theListOfFuncName.size() == 0 ) { - aNode.theListOfFuncName.resize( 1 ) ; - aNode.theListOfFuncName[ 0 ] = "" ; - aNode.theListOfPythonFunctions.resize( 1 ) ; - aNode.theListOfPythonFunctions[ 0 ] = new SUPERV::ListOfStrings() ; - } - if ( GetGraphNode( aNode.theName.c_str() ) ) - aNodeName = NULL ; - anInNode = AddNode( aNode.theService , - aNode.theListOfFuncName , - aNode.theListOfPythonFunctions , - aNode.theComponentName.c_str() , - aNode.theInterfaceName.c_str() , aNodeName , - aNode.theKind , - aNode.theFirstCreation , aNode.theLastModification , - aNode.theEditorRelease.c_str() , - aNode.theAuthor.c_str() , aNode.theContainer.c_str() , - aNode.theComment.c_str() , - aNode.theCoords.theX , aNode.theCoords.theY ) ; - string * aNodetheName = new string( aNode.theName ) ; - aMapOfNodes[ *aNodetheName ] = GetGraphNodeIndex( anInNode->Name() ) ; - if ( anInNode->IsOneOfInLineNodes() ) { - anInNode->GraphEditor::InNode::InLineNode()->DefPortsOfNode( - _Orb , aNode.theService , anInNode->NamePtr() , - anInNode->Kind() , -// false , // DataFlowOrComputing -// anInNode->IsLoopNode() || anInNode->IsEndLoopNode() , // WithInLoop -// anInNode->IsInLineNode() || anInNode->IsLoopNode() || anInNode->IsSwitchNode() || anInNode->IsEndSwitchNode() , // WithInGate -// anInNode->IsInLineNode() || anInNode->IsSwitchNode() || anInNode->IsGOTONode() , // WithOutGate + const char * aNodeName = aNode.theName.c_str() ; + if ( aNode.theListOfFuncName.size() == 0 ) { + aNode.theListOfFuncName.resize( 1 ) ; + aNode.theListOfFuncName[ 0 ] = "" ; + aNode.theListOfPythonFunctions.resize( 1 ) ; + aNode.theListOfPythonFunctions[ 0 ] = new SUPERV::ListOfStrings() ; + } + if ( GetGraphNode( aNode.theName.c_str() ) ) { + aNodeName = NULL ; + } + anInNode = AddNode( aNode.theService , + aNode.theListOfFuncName , + aNode.theListOfPythonFunctions , + aNode.theComponentName.c_str() , + aNode.theInterfaceName.c_str() , aNodeName , + aNode.theKind , + aNode.theFirstCreation , aNode.theLastModification , + aNode.theEditorRelease.c_str() , + aNode.theAuthor.c_str() , aNode.theContainer.c_str() , + aNode.theComment.c_str() , + aNode.theCoords.theX , aNode.theCoords.theY ) ; + string * aNodetheName = new string( aNode.theName ) ; + aMapOfNodes[ *aNodetheName ] = GetGraphNodeIndex( anInNode->Name() ) ; + if ( anInNode->IsOneOfInLineNodes() ) { + anInNode->GraphEditor::InNode::InLineNode()->DefPortsOfNode( + _Orb , aNode.theService , anInNode->NamePtr() , + anInNode->Kind() , Graph_prof_debug() , Graph_fdebug() ) ; - GraphBase::InLineNode * aINode = anInNode->InLineNode() ; - GraphBase::LoopNode * aLNode = NULL ; - if ( aINode->IsLoopNode() ) { - aLNode = anInNode->LoopNode() ; - aLNode->SetPythonFunction( aNode.theListOfFuncName[ 0 ].c_str() , - *aNode.theListOfPythonFunctions[ 0 ] ) ; - aLNode->SetMorePythonFunction( aNode.theListOfFuncName[ 1 ].c_str() , - *aNode.theListOfPythonFunctions[ 1 ] ) ; - aLNode->SetNextPythonFunction( aNode.theListOfFuncName[ 2 ].c_str() , - *aNode.theListOfPythonFunctions[ 2 ] ) ; - } - else if ( aINode->IsInLineNode() || aINode->IsGOTONode() || - aINode->IsSwitchNode() || aINode->IsEndSwitchNode() ) { - aINode->SetPythonFunction( aNode.theListOfFuncName[ 0 ].c_str() , - *aNode.theListOfPythonFunctions[ 0 ] ) ; - } + GraphBase::InLineNode * aINode = anInNode->InLineNode() ; + GraphBase::LoopNode * aLNode = NULL ; + if ( aINode->IsLoopNode() ) { + aLNode = anInNode->LoopNode() ; + aLNode->SetPythonFunction( aNode.theListOfFuncName[ 0 ].c_str() , + *aNode.theListOfPythonFunctions[ 0 ] ) ; + aLNode->SetMorePythonFunction( aNode.theListOfFuncName[ 1 ].c_str() , + *aNode.theListOfPythonFunctions[ 1 ] ) ; + aLNode->SetNextPythonFunction( aNode.theListOfFuncName[ 2 ].c_str() , + *aNode.theListOfPythonFunctions[ 2 ] ) ; } -#if 0 - if ( aNode.theListOfParameters.size() ) { - int j ; - for ( j = 0 ; j < aNode.theListOfParameters.size() ; j++ ) { - if ( IsInLineNode() ) { - GraphBase::InPort * InputPort = anInNode->AddInPort( - aNode.theListOfParameters[ j ].theInParameter.Parametername , - aNode.theListOfParameters[ j ].theInParameter.Parametertype ) ; - GraphBase::OutPort * OutputPort = anInNode->AddOutPort( - aNode.theListOfParameters[ j ].theOutParameter.Parametername , - aNode.theListOfParameters[ j ].theOutParameter.Parametertype ) ; - anInNode->InOutPort( InputPort , OutputPort ) ; - } - } + else if ( aINode->IsInLineNode() || aINode->IsGOTONode() || + aINode->IsSwitchNode() || aINode->IsEndSwitchNode() ) { + aINode->SetPythonFunction( aNode.theListOfFuncName[ 0 ].c_str() , + *aNode.theListOfPythonFunctions[ 0 ] ) ; } -#endif -// cout << "LoadNodes " << aNodetheName << " " -// << GetGraphNodeIndex( anInNode->Name() ) << endl ; - delete aNodetheName ; -// } - if ( !anInNode ) + } + delete aNodetheName ; + if ( !anInNode ) { return false ; + } } - for ( i = 0 ; i < aListOfNodes.size() ; i++ ) { + for ( i = 0 ; i < (int ) aListOfNodes.size() ; i++ ) { GraphBase::SNode aNode = aListOfNodes[ i ] ; cdebug << "GraphEditor::OutNode::LoadNodes " << aNode.theName.c_str() << " Coupled to " << aNode.theCoupledNode.c_str() << endl ; @@ -277,7 +237,7 @@ bool GraphEditor::OutNode::LoadLinks(map< string , int > & aMapOfNodes , cdebug_in << "GraphEditor::OutNode::LoadLinks" << endl ; // MESSAGE( "GraphEditor::OutNode::LoadLinks" ); int i , j ; - for ( i = 0 ; i < aListOfLinks.size() ; i++ ) { + for ( i = 0 ; i < (int ) aListOfLinks.size() ; i++ ) { GraphBase::SLink aLink = aListOfLinks[ i ] ; string * aLinkFromNodeName = new string( aLink.FromNodeName.c_str() ) ; string * aLinkToNodeName = new string( aLink.ToNodeName.c_str() ) ; @@ -285,16 +245,22 @@ bool GraphEditor::OutNode::LoadLinks(map< string , int > & aMapOfNodes , << aLink.FromServiceParameterName.c_str() << " ) --> " << aLinkToNodeName->c_str() << "( " << aLink.FromServiceParameterName.c_str() << " )" << endl ; - RetVal = AddLink( GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] )->Name() , - aLink.FromServiceParameterName.c_str() , - GetGraphNode( aMapOfNodes[ aLinkToNodeName->c_str() ] )->Name() , - aLink.ToServiceParameterName.c_str() , - *((GraphBase::ComputingNode *) GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] ))->GetOutPort( aLink.FromServiceParameterName.c_str() )->Value() ) ; + if ( GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] ) && + GetGraphNode( aMapOfNodes[ aLinkToNodeName->c_str() ] ) ) { + RetVal = AddLink( GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] )->Name() , + aLink.FromServiceParameterName.c_str() , + GetGraphNode( aMapOfNodes[ aLinkToNodeName->c_str() ] )->Name() , + aLink.ToServiceParameterName.c_str() , + *((GraphBase::ComputingNode *) GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] ))->GetOutPort( aLink.FromServiceParameterName.c_str() )->Value() ) ; + } + else { + RetVal = false ; + } // aLink.aLinkValue ) ; if ( !RetVal ) break ; else { - for ( j = 0 ; j < aLink.aListOfCoords.size() ; j++ ) { + for ( j = 0 ; j < (int ) aLink.aListOfCoords.size() ; j++ ) { RetVal = AddLinkCoord( GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] )->Name() , aLink.FromServiceParameterName.c_str() , GetGraphNode( aMapOfNodes[ aLink.ToNodeName.c_str() ] )->Name() , @@ -319,7 +285,7 @@ bool GraphEditor::OutNode::LoadDatas(map< string , int > & aMapOfNodes , cdebug_in << "GraphEditor::OutNode::LoadDatas" << endl ; // MESSAGE( "GraphEditor::OutNode::LoadDatas" ); int i ; - for ( i = 0 ; i < aListOfDatas.size() ; i++ ) { + for ( i = 0 ; i < (int ) aListOfDatas.size() ; i++ ) { GraphBase::SLink aLink = aListOfDatas[ i ] ; if ( !strcmp( aLink.FromNodeName.c_str() , Name() ) ) { cdebug << "GraphEditor::OutNode::LoadDatas Warning " @@ -377,7 +343,7 @@ GraphBase::SGraph * GraphEditor::OutNode::GetDataFlow() { GraphBase::SGraph * aDataFlow = new GraphBase::SGraph; aDataFlow->Info = *GetInfo() ; aDataFlow->Nodes = *GetNodes() ; - aDataFlow->Links = *GetLinks() ; + aDataFlow->Links = *GetLinks( true ) ; aDataFlow->Datas = *GetDatas() ; return aDataFlow ; } @@ -410,13 +376,13 @@ const int GraphEditor::OutNode::YCoordinate( const char* NodeName ) { return ((GraphEditor::InNode * ) GetChangeGraphNode( NodeName ))->YCoordinate() ; } -GraphEditor::InNode *GraphEditor::OutNode::AddNode( +GraphEditor::InNode * GraphEditor::OutNode::AddNode( const SALOME_ModuleCatalog::Service& NodeService , GraphBase::ListOfFuncName aFuncName , GraphBase::ListOfPythonFunctions aPythonFunction , - const char *NodeComponentName , - const char* NodeInterfaceName , - const char *theNodeName , + const char * NodeComponentName , + const char * NodeInterfaceName , + const char * theNodeName , const SUPERV::KindOfNode NodeKindOfNode , const SUPERV::SDate NodeFirstCreation , const SUPERV::SDate NodeLastModification , @@ -426,8 +392,19 @@ GraphEditor::InNode *GraphEditor::OutNode::AddNode( const char * NodeComment , const int NodeX , const int NodeY ) { - cdebug_in << "GraphEditor::OutNode::AddNode(" << NodeComponentName << " , " - << theNodeName << ")" << endl; + cdebug_in << "GraphEditor::OutNode::AddNode( " ; + if ( NodeComponentName != NULLSTRING && strlen( NodeComponentName ) ) { + cdebug << NodeComponentName << " , " ; + } + else { + cdebug << "NodeComponentName[NULL] )" << endl; + } + if ( theNodeName != NULLSTRING && strlen( theNodeName ) ) { + cdebug << theNodeName << " )" << endl; + } + else { + cdebug << "NodeName[NULL] )" << endl; + } char * RetVal = NULLSTRING ; GraphEditor::InNode *Nd = NULL ; char * aNodeName = NULL ; @@ -438,7 +415,7 @@ GraphEditor::InNode *GraphEditor::OutNode::AddNode( NodeKindOfNode == SUPERV::SwitchNode || NodeKindOfNode == SUPERV::EndSwitchNode || NodeKindOfNode == SUPERV::GOTONode ) { - if ( theNodeName == NULL || strlen( theNodeName ) == 0 ) { + if ( theNodeName == NULLSTRING || strlen( theNodeName ) == 0 ) { if ( NodeKindOfNode == SUPERV::InLineNode ) { ((SALOME_ModuleCatalog::Service& ) NodeService).ServiceName = my_strdup( "InLine" ) ; } @@ -461,20 +438,21 @@ GraphEditor::InNode *GraphEditor::OutNode::AddNode( else { ((SALOME_ModuleCatalog::Service& ) NodeService).ServiceName = CORBA::string_dup( theNodeName ) ; } - theNodeName = NULL ; + theNodeName = NULLSTRING ; } - if ( theNodeName == NULL ) { + if ( theNodeName == NULLSTRING || strlen( theNodeName ) == 0 ) { aNodeName = new char[ strlen( NodeService.ServiceName )+1 ] ; strcpy( aNodeName , NodeService.ServiceName ) ; if ( GetGraphNode( NodeService.ServiceName ) ) { GeneratedName = true ; while ( GetGraphNode( aNodeName ) ) { - if ( aNodeName ) + if ( aNodeName ) { delete [] aNodeName ; + } int num = GetServiceNameNumber( NodeService.ServiceName ) ; - ostrstream s ; - s << num << ends ; - const char * n_instance = s.str() ; + ostringstream astr ; + astr << num << ends ; + const char * n_instance = astr.str().c_str() ; int lname = strlen( NodeService.ServiceName ) + 1 + strlen( n_instance ) + 1 ; aNodeName = new char[lname] ; @@ -490,7 +468,7 @@ GraphEditor::InNode *GraphEditor::OutNode::AddNode( strcpy( aNodeName , theNodeName ) ; } } - if ( aNodeName != NULL ) { + if ( aNodeName != NULLSTRING ) { Nd = new GraphEditor::InNode( _Orb , NamingService() , aFuncName , aPythonFunction , NodeService , NodeComponentName , NodeInterfaceName , @@ -693,15 +671,23 @@ bool GraphEditor::OutNode::Valid() { } bool GraphEditor::OutNode::Executable() { - cdebug_in << "GraphEditor::OutNode::Executable" << endl; - if ( !IsValid() ) + bool NewLink ; + if ( LinkLoopNodes( NewLink ) ) { + if ( NewLink ) { + _Valid = false ; + } + } + else { + cdebug << "This DataFlow is not executable." << endl ; + _Executable = false ; + } + if ( !IsValid() ) { Valid() ; - if ( !IsValid() ) + } + if ( !IsValid() ) { return false ; -// if ( !_GT ) -// GraphExecutor::GraphControl _GT = new GraphExecutor::GraphControl( this ); - + } if ( DataServerNodes() ) _Executable = true ; else { @@ -860,7 +846,7 @@ bool GraphEditor::OutNode::LinkSaveXML( QDomDocument & Graph , QDomElement & lin link.appendChild( coordlist ) ; int i ; - for ( i = 0 ; i < aLink.aListOfCoords.size() ; i++ ) { + for ( i = 0 ; i < (int ) aLink.aListOfCoords.size() ; i++ ) { // f << Tabs << " " << endl ; QDomElement coord = Graph.createElement( "coord" ) ; coordlist.appendChild( coord ) ; @@ -941,7 +927,7 @@ bool GraphEditor::OutNode::LinkSavePY( ostream &f , const char * aGraphName , f << ")" << endl ; } int i ; - for ( i = 0 ; i < aLink.aListOfCoords.size() ; i++ ) { + for ( i = 0 ; i < (int ) aLink.aListOfCoords.size() ; i++ ) { f << aLink.ToNodeName.c_str() << aLink.ToServiceParameterName.c_str() << ".AddCoord( " << i+1 << " , " << aLink.aListOfCoords[ i ].theX << " , " @@ -1043,8 +1029,8 @@ bool GraphEditor::OutNode::SaveXML(QDomDocument & Graph ) { // f << " " << endl ; QDomElement linklist = Graph.createElement( "link-list" ) ; dataflow.appendChild( linklist ) ; - const GraphBase::ListOfLinks * Links = GetLinks() ; - for ( i = 0 ; i < Links->size() ; i++ ) { + const GraphBase::ListOfLinks * Links = GetLinks( true ) ; + for ( i = 0 ; i < (int ) Links->size() ; i++ ) { // f << " " << endl ; QDomElement link = Graph.createElement( "link" ) ; linklist.appendChild( link ) ; @@ -1058,7 +1044,7 @@ bool GraphEditor::OutNode::SaveXML(QDomDocument & Graph ) { QDomElement datalist = Graph.createElement( "data-list" ) ; dataflow.appendChild( datalist ) ; const GraphBase::ListOfLinks * Datas = GetDatas() ; - for ( i = 0 ; i < Datas->size() ; i++ ) { + for ( i = 0 ; i < (int ) Datas->size() ; i++ ) { // f << " " << endl ; QDomElement data = Graph.createElement( "data" ) ; datalist.appendChild( data ) ; @@ -1099,6 +1085,7 @@ bool GraphEditor::OutNode::SaveXML(QDomDocument & Graph ) { bool GraphEditor::OutNode::SavePY( ostream & f ) { int i ; + int j ; f << endl << "# Generated python file of Graph " << Name() << endl << endl ; f << "from SuperV import *" << endl ; @@ -1109,6 +1096,7 @@ bool GraphEditor::OutNode::SavePY( ostream & f ) { f << endl << "# Creation of Factory Nodes" << endl ; for ( i = 0 ; i < GraphNodesSize() ; i++ ) { if ( GraphNodes( i )->IsFactoryNode() ) { + f << endl ; ((GraphBase::FactoryNode * ) GraphNodes( i ))->SavePY( f , Name() , GraphNodes( i )->XCoordinate() , GraphNodes( i )->YCoordinate() ) ; @@ -1122,6 +1110,9 @@ bool GraphEditor::OutNode::SavePY( ostream & f ) { f << endl << "# Creation of Computing Nodes" << endl ; first = false ; } + else { + f << endl ; + } ((GraphBase::ComputingNode * ) GraphNodes( i ))->SavePY( f , Name() , GraphNodes( i )->XCoordinate() , GraphNodes( i )->YCoordinate() ) ; @@ -1135,6 +1126,9 @@ bool GraphEditor::OutNode::SavePY( ostream & f ) { f << endl << "# Creation of InLine Nodes" << endl ; first = false ; } + else { + f << endl ; + } ((GraphBase::InLineNode * ) GraphNodes( i ))->SavePY( f , Name() , GraphNodes( i )->XCoordinate() , GraphNodes( i )->YCoordinate() ) ; @@ -1148,6 +1142,9 @@ bool GraphEditor::OutNode::SavePY( ostream & f ) { f << endl << "# Creation of Loop Nodes" << endl ; first = false ; } + else { + f << endl ; + } ((GraphBase::LoopNode * ) GraphNodes( i ))->SavePY( f , Name() , GraphNodes( i )->XCoordinate() , GraphNodes( i )->YCoordinate() ) ; @@ -1161,6 +1158,9 @@ bool GraphEditor::OutNode::SavePY( ostream & f ) { f << endl << "# Creation of Switch Nodes" << endl ; first = false ; } + else { + f << endl ; + } ((GraphBase::SwitchNode * ) GraphNodes( i ))->SavePY( f , Name() , GraphNodes( i )->XCoordinate() , GraphNodes( i )->YCoordinate() ) ; @@ -1174,6 +1174,9 @@ bool GraphEditor::OutNode::SavePY( ostream & f ) { f << endl << "# Creation of GOTO Nodes" << endl ; first = false ; } + else { + f << endl ; + } ((GraphBase::GOTONode * ) GraphNodes( i ))->SavePY( f , Name() , GraphNodes( i )->XCoordinate() , GraphNodes( i )->YCoordinate() ) ; @@ -1183,68 +1186,46 @@ bool GraphEditor::OutNode::SavePY( ostream & f ) { const GraphBase::ListOfLinks * Links = GetLinks() ; bool intervar ; map< string , int > aMapOfOutPorts ; - first = true ; - for ( i = 0 ; i < Links->size() ; i++ ) { - if ( GetGraphNode( (*Links)[ i ].FromNodeName.c_str() )->IsComputingNode() && - GetGraphNode( (*Links)[ i ].ToNodeName.c_str() )->IsComputingNode() ) { - if ( first ) { - f << endl - << "# Creation of intermediate Output variables and of Computing Links" - << endl ; - first = false ; - } - char * NodePort = new char [ strlen( (*Links)[ i ].FromNodeName.c_str() ) + - strlen( (*Links)[ i ].FromServiceParameterName.c_str() ) + 1 ] ; - strcpy( NodePort , (*Links)[ i ].FromNodeName.c_str() ) ; - strcat( NodePort , (*Links)[ i ].FromServiceParameterName.c_str() ) ; - if ( aMapOfOutPorts[ NodePort ] == 0 ) { - aMapOfOutPorts[ NodePort ] = i + 1 ; - intervar = true ; - } - else { - intervar = false ; - } - LinkSavePY( f , Name() , (*Links)[ i ] , intervar , false ) ; - delete [] NodePort ; - } - } - -#if 0 first = true ; for ( i = 0 ; i < GraphNodesSize() ; i++ ) { - if ( GraphNodes( i )->IsInLineNode() || - GraphNodes( i )->IsGOTONode() ) { - int j ; - for ( j = 0 ; j < GraphNodes( i )->GetNodeInPortsSize() ; j++ ) { - if ( GraphNodes( i )->GetNodeInPort( j )->IsBus() ) { - if ( first ) { - f << endl - << "# Creation of Output variables and of Bus Ports" - << endl ; - first = false ; - } - f << GraphNodes( i )->Name() << ".InOutPort( '" - << GraphNodes( i )->GetNodeInPort( j )->PortName() << "' , '" - << GraphNodes( i )->GetNodeInPort( j )->PortType() << "' , '" - << GraphNodes( i )->GetNodeOutPort( GraphNodes( i )->GetNodeInPort( j )->PortIndex() )->PortName() - << "' , '" - << GraphNodes( i )->GetNodeOutPort( GraphNodes( i )->GetNodeInPort( j )->PortIndex() )->PortType() - << "' )" << endl ; - } + for ( j = 0 ; j < (int ) Links->size() ; j++ ) { + if ( !strcmp( GraphNodes( i )->Name() , (*Links)[ j ].FromNodeName.c_str() ) ) { + if ( first ) { + f << endl + << "# Creation of Links" + << endl ; + first = false ; + } + else { + f << endl ; + } + char * NodePort = new char [ strlen( (*Links)[ j ].FromNodeName.c_str() ) + + strlen( (*Links)[ j ].FromServiceParameterName.c_str() ) + 1 ] ; + strcpy( NodePort , (*Links)[ j ].FromNodeName.c_str() ) ; + strcat( NodePort , (*Links)[ j ].FromServiceParameterName.c_str() ) ; + if ( aMapOfOutPorts[ NodePort ] == 0 ) { + aMapOfOutPorts[ NodePort ] = j + 1 ; + intervar = true ; + } + else { + intervar = false ; + } + LinkSavePY( f , Name() , (*Links)[ j ] , intervar , false ) ; + delete [] NodePort ; } } } -#endif +#if 0 first = true ; for ( i = 0 ; i < Links->size() ; i++ ) { - if ( !( GetGraphNode( (*Links)[ i ].FromNodeName.c_str() )->IsComputingNode() && - GetGraphNode( (*Links)[ i ].ToNodeName.c_str() )->IsComputingNode() ) && - !( GetGraphNode( (*Links)[ i ].FromNodeName.c_str() )->IsGOTONode() && - GetGraphNode( (*Links)[ i ].ToNodeName.c_str() )->IsInLineNode() ) ) { + if ( GetGraphNode( (*Links)[ i ].FromNodeName.c_str() )->IsSwitchNode() || + GetGraphNode( (*Links)[ i ].ToNodeName.c_str() )->IsSwitchNode() || + GetGraphNode( (*Links)[ i ].FromNodeName.c_str() )->IsEndSwitchNode() || + GetGraphNode( (*Links)[ i ].ToNodeName.c_str() )->IsEndSwitchNode() ) { if ( first ) { f << endl - << "# Creation of intermediate Output variables and of Control Links" + << "# Creation of Switch Links" << endl ; first = false ; } @@ -1289,10 +1270,11 @@ bool GraphEditor::OutNode::SavePY( ostream & f ) { delete [] NodePort ; } } +#endif const GraphBase::ListOfLinks * Datas = GetDatas() ; first = true ; - for ( i = 0 ; i < Datas->size() ; i++ ) { + for ( i = 0 ; i < (int ) Datas->size() ; i++ ) { if ( first ) { f << endl << "# Creation of Input datas" << endl ; first = false ; @@ -1302,13 +1284,13 @@ bool GraphEditor::OutNode::SavePY( ostream & f ) { first = true ; const SALOME_ModuleCatalog::ListOfServicesParameter ListOfInParam = ServiceInParameter() ; - for ( i = 0 ; i < ListOfInParam.length() ; i++ ) { + for ( i = 0 ; i < (int ) ListOfInParam.length() ; i++ ) { string _aParam = CORBA::string_dup(ListOfInParam[ i ].Parametername) ; const char * aParam = _aParam.c_str() ; char * aNodeName ; char * aPortName ; - int j , k ; - for ( j = 0 ; j < strlen( aParam ) ; j++ ) { + int j ; + for ( j = 0 ; j < (int ) strlen( aParam ) ; j++ ) { if ( aParam[ j ] == '\\' ) { aNodeName = new char[ j+1 ] ; strncpy( aNodeName , aParam , j ) ; @@ -1332,13 +1314,13 @@ bool GraphEditor::OutNode::SavePY( ostream & f ) { f << endl << "# Creation of Output variables" << endl ; const SALOME_ModuleCatalog::ListOfServicesParameter ListOfOutParam = ServiceOutParameter() ; - for ( i = 0 ; i < ListOfOutParam.length() ; i++ ) { + for ( i = 0 ; i < (int ) ListOfOutParam.length() ; i++ ) { string _aParam = CORBA::string_dup(ListOfOutParam[ i ].Parametername) ; const char * aParam = _aParam.c_str() ; char * aNodeName ; char * aPortName ; - int j , k ; - for ( j = 0 ; j < strlen( aParam ) ; j++ ) { + int j ; + for ( j = 0 ; j < (int ) strlen( aParam ) ; j++ ) { if ( aParam[ j ] == '\\' ) { aNodeName = new char[ j+1 ] ; strncpy( aNodeName , aParam , j ) ; @@ -1358,7 +1340,7 @@ bool GraphEditor::OutNode::SavePY( ostream & f ) { -ostrstream & operator<< (ostrstream & f,const GraphEditor::OutNode & G) { +ostream & operator<< (ostream & f,const GraphEditor::OutNode & G) { f << (GraphBase::ComputingNode ) G ; f << endl ; diff --git a/src/GraphEditor/DataFlowEditor_OutNode.hxx b/src/GraphEditor/DataFlowEditor_OutNode.hxx index 780bee9..c36b243 100644 --- a/src/GraphEditor/DataFlowEditor_OutNode.hxx +++ b/src/GraphEditor/DataFlowEditor_OutNode.hxx @@ -280,7 +280,7 @@ namespace GraphEditor { }; -ostrstream & operator << (ostrstream &,const GraphEditor::OutNode & G); +ostream & operator << (ostream &,const GraphEditor::OutNode & G); ostream & operator << (ostream &,const SUPERV::SDate &); #endif diff --git a/src/GraphExecutor/DataFlowExecutor_DataFlow.hxx b/src/GraphExecutor/DataFlowExecutor_DataFlow.hxx index 0206493..3d94a13 100644 --- a/src/GraphExecutor/DataFlowExecutor_DataFlow.hxx +++ b/src/GraphExecutor/DataFlowExecutor_DataFlow.hxx @@ -51,11 +51,11 @@ namespace GraphExecutor { const SUPERV::KindOfNode DataFlowkind = SUPERV::ComputingNode , const SUPERV::SDate DataFlowFirstCreation = SUPERV::SDate() , const SUPERV::SDate DataFlowLastModification = SUPERV::SDate() , - const char * DataFlowEditorRelease = NULL , - const char * DataFlowAuthor = NULL , - const char * DataFlowComputer = NULL , - const char * DataFlowComment = NULL , - const char * DebugFileName = NULL ) ; + const char * DataFlowEditorRelease = NULLSTRING , + const char * DataFlowAuthor = NULLSTRING , + const char * DataFlowComputer = NULLSTRING , + const char * DataFlowComment = NULLSTRING , + const char * DebugFileName = NULLSTRING ) ; virtual ~DataFlow(); bool LoadDataFlow( const GraphBase::SGraph &aDataFlow ) ; diff --git a/src/GraphExecutor/DataFlowExecutor_DynInvoke.cxx b/src/GraphExecutor/DataFlowExecutor_DynInvoke.cxx index 8e4ae74..dba4753 100644 --- a/src/GraphExecutor/DataFlowExecutor_DynInvoke.cxx +++ b/src/GraphExecutor/DataFlowExecutor_DynInvoke.cxx @@ -36,80 +36,159 @@ using namespace CORBA ; -void GraphExecutor::InNode::DynInvoke(Engines::Component_ptr obj , +void GraphExecutor::InNode::DynInvoke(Engines::Component_ptr objComponent , const char *method , ServicesAnyData * inParams , int nInParams , ServicesAnyData * outParams , int nOutParams ) { - Request_var req = obj->_request( method ) ; - const char *s ; + Request_var req = objComponent->_request( method ) ; + const char *ArgName ; + int Type ; - NVList_ptr arguments =req->arguments() ; + NVList_ptr arguments = req->arguments() ; int i ; int n_in = nInParams ; int n_out = nOutParams ; + char * aComponent = ObjectToString( objComponent ) ; + MESSAGE( aComponent << "->" << method ) ; for ( i = 0 ; i < n_in ; i++ ) { CORBA::Any & data = inParams[i].Value ; - s = inParams[i].Name.c_str() ; - arguments->add_value( s , data , CORBA::ARG_IN ) ; -#if 0 - switch ( data.type()->kind() ) { - case CORBA::tk_string : + ArgName = inParams[i].Name.c_str() ; + Type = data.type()->kind() ; + arguments->add_value( ArgName , data , CORBA::ARG_IN ) ; +//#if 0 + switch ( Type ) { + case CORBA::tk_string : { char * t ; data >>= t ; - MESSAGE( "ArgIn" << i << " : " << s << " Value " << t << " (string)") ; + MESSAGE( "ArgIn" << i << " : " << ArgName << " Value " << t << " (string)" ) ; break ; - case CORBA::tk_double : - double d ; - data >>= d ; - MESSAGE( "ArgIn" << i << " : " << s << " Value " << d << " (double)") ; + } + case CORBA::tk_boolean : { + bool b ; + data >>= (CORBA::Any::to_boolean ) b ; + MESSAGE( "ArgIn" << i << " : " << ArgName << " Value " << b << " (boolean)" ) ; + break ; + } + case CORBA::tk_char : { + unsigned char c ; + data >>= (CORBA::Any::to_char ) c ; + MESSAGE( "ArgIn" << i << " : " << ArgName << " Value " << (int ) c << " (char)" ) ; + break ; + } + case CORBA::tk_short : { + short s ; + data >>= s ; + MESSAGE( "ArgIn" << i << " : " << ArgName << " Value " << s << " (short)" ) ; break ; - case CORBA::tk_long : + } + case CORBA::tk_long : { long l ; data >>= l ; - MESSAGE( "ArgIn" << i << " : " << s << " Value " << l << " (long)") ; + MESSAGE( "ArgIn" << i << " : " << ArgName << " Value " << l << " (long)" ) ; break ; - case CORBA::tk_objref : - MESSAGE( "ArgIn" << i << " : " << s << " Value " << "(object reference)") ; + } + case CORBA::tk_float : { + float f ; + data >>= f ; + MESSAGE( "ArgIn" << i << " : " << ArgName << " Value " << f << " (float)" ) ; break ; - default : - MESSAGE( "ArgIn" << i << " : " << s << " Value " << "(other ERROR)") ; } - MESSAGE() ; -#endif + case CORBA::tk_double : { + double d ; + data >>= d ; + MESSAGE( "ArgIn" << i << " : " << ArgName << " Value " << d << " (double)" ) ; + break ; + } + case CORBA::tk_objref : { + CORBA::Object_ptr obj ; + char * retstr = "Catched ERROR"; + try { + data >>= obj ; + retstr = ObjectToString( obj ) ; + } + catch( ... ) { + } + MESSAGE( "ArgIn" << i << " : " << ArgName << " Value " << retstr << "(object reference)" ) ; + break ; + } + default : { + MESSAGE( "ArgIn" << i << " : " << ArgName << " Value " << "(other ERROR) kind " << Type ) ; + } + } + MESSAGE("") ; +//#endif } for ( i = 0 ; i < n_out ; i++ ) { CORBA::Any & data = outParams[i].Value ; - s = outParams[i].Name.c_str() ; - arguments->add_value( s , data , CORBA::ARG_OUT ) ; -#if 0 - switch ( data.type()->kind() ) { - case CORBA::tk_string : + ArgName = outParams[i].Name.c_str() ; + Type = data.type()->kind() ; + arguments->add_value( ArgName , data , CORBA::ARG_OUT ) ; +//#if 0 + switch ( Type ) { + case CORBA::tk_string : { char * t ; data >>= t ; - MESSAGE( "ArgOut" << i << " : " << s << " Value " << t << " (string)") ; + MESSAGE( "ArgOut" << i << " : " << ArgName << " Value " << t << " (string)" ) ; break ; - case CORBA::tk_double : - double d ; - data >>= d ; - MESSAGE( "ArgOut" << i << " : " << s << " Value " << d << " (double)") ; + } + case CORBA::tk_boolean : { + bool b ; + data >>= (CORBA::Any::to_boolean ) b ; + MESSAGE( "ArgOut" << i << " : " << ArgName << " Value " << b << " (boolean)" ) ; break ; - case CORBA::tk_long : + } + case CORBA::tk_char : { + unsigned char c ; + data >>= (CORBA::Any::to_char ) c ; + MESSAGE( "ArgOut" << i << " : " << ArgName << " Value " << (int ) c << " (char)" ) ; + break ; + } + case CORBA::tk_short : { + short s ; + data >>= s ; + MESSAGE( "ArgOut" << i << " : " << ArgName << " Value " << s << " (short)" ) ; + break ; + } + case CORBA::tk_long : { long l ; data >>= l ; - MESSAGE( "ArgOut" << i << " : " << s << " Value " << l << " (long)") ; + MESSAGE( "ArgOut" << i << " : " << ArgName << " Value " << l << " (long)" ) ; break ; - case CORBA::tk_objref : - MESSAGE( "ArgOut" << i << " : " << s << " Value " << "(object reference)") ; + } + case CORBA::tk_float : { + float f ; + data >>= f ; + MESSAGE( "ArgOut" << i << " : " << ArgName << " Value " << f << " (float)" ) ; + break ; + } + case CORBA::tk_double : { + double d ; + data >>= d ; + MESSAGE( "ArgOut" << i << " : " << ArgName << " Value " << d << " (double)" ) ; break ; - default : - MESSAGE( "ArgOut" << i << " : " << s << " Value " << "(other ERROR)") ; } - MESSAGE() ; -#endif + case CORBA::tk_objref : { + CORBA::Object_ptr obj ; + char * retstr = "Catched ERROR"; + try { + data >>= obj ; + retstr = ObjectToString( obj ) ; + } + catch( ... ) { + } + MESSAGE( "ArgOut" << i << " : " << ArgName << " Value " << retstr << "(object reference)" ) ; + break ; + } + default : { + MESSAGE( "ArgOut" << i << " : " << ArgName << " Value " << "(other ERROR) kind " << Type ) ; + } + } + MESSAGE("") ; +//#endif } req->invoke(); @@ -133,7 +212,6 @@ void GraphExecutor::InNode::DynInvoke( Engines::Component_ptr obj , const char * aGraphName , const char * aNodeName ) { Request_var req = obj->_request( method ) ; - const char *s; NVList_ptr arguments =req->arguments() ; diff --git a/src/GraphExecutor/DataFlowExecutor_InNode.cxx b/src/GraphExecutor/DataFlowExecutor_InNode.cxx index b2b6be3..8663bad 100644 --- a/src/GraphExecutor/DataFlowExecutor_InNode.cxx +++ b/src/GraphExecutor/DataFlowExecutor_InNode.cxx @@ -1,11 +1,32 @@ +// SUPERV GraphExecutor : contains classes that permit execution of graphs and particularly the execution automaton +// +// 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 : DataFlowExecutor_InNode.cxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: + using namespace std; -//============================================================================= -// File : DataFlowBase_InNode.cxx -// Created : 2002 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= #include #include @@ -16,7 +37,7 @@ using namespace std; #include #include CORBA_CLIENT_HEADER(SALOME_Component) -#include "SALOME_NamingService.hxx" +//#include "SALOME_NamingService.hxx" #include "SALOME_LifeCycleCORBA.hxx" #include "DataFlowBase_FactoryNode.hxx" @@ -28,7 +49,8 @@ using namespace std; #include "DataFlowExecutor_OutNode.hxx" -static void InitInNode( SUPERV::ControlState &_ControlState , +static void InitInNode( int &_RewindStack , + SUPERV::ControlState &_ControlState , SUPERV::AutomatonState &_currentState , GraphExecutor::InNode ** _aReStartNode , bool & _PyFuncRunned , @@ -51,6 +73,7 @@ static void InitInNode( SUPERV::ControlState &_ControlState , GraphExecutor::FiniteStateMachine * theAutomaton , CORBA::ORB_ptr * _Orb , CORBA::ORB_ptr ORB ) { + _RewindStack = 0 ; _ControlState = SUPERV::VoidState ; _currentState = SUPERV::UnKnownState ; *_aReStartNode = NULL ; @@ -104,7 +127,8 @@ GraphExecutor::FiniteStateMachine * theAutomaton = new //GraphExecutor::InNode::InNode() : // GraphBase::FactoryNode() { GraphExecutor::InNode::InNode() { - InitInNode( _ControlState , + InitInNode( _RewindStack , + _ControlState , _currentState , &_aReStartNode , _PyFuncRunned , @@ -148,7 +172,7 @@ GraphExecutor::InNode::InNode(CORBA::ORB_ptr ORB, const int NodeX , const int NodeY , int * Graph_prof_debug, - ostream * Graph_fdebug) { + ofstream * Graph_fdebug) { // ostream * Graph_fdebug = NULL ) : // GraphBase::FactoryNode( ORB , ptrNamingService , aService , // ComponentName , NodeInterfaceName , @@ -158,7 +182,8 @@ GraphExecutor::InNode::InNode(CORBA::ORB_ptr ORB, // NodeComputer , NodeComment , GeneratedName , // 0 , 0 , // Graph_prof_debug , Graph_fdebug ) { - InitInNode( _ControlState , + InitInNode( _RewindStack , + _ControlState , _currentState , &_aReStartNode , _PyFuncRunned , @@ -243,6 +268,7 @@ GraphExecutor::InNode::InNode(CORBA::ORB_ptr ORB, NodeX , NodeY , Graph_prof_debug , Graph_fdebug ) ; _ComputingNode = (GraphBase::ComputingNode *) _GOTONode ; + _InLineNode = (GraphBase::InLineNode *) _ComputingNode ; break ; } case SUPERV::LoopNode : { @@ -259,6 +285,7 @@ GraphExecutor::InNode::InNode(CORBA::ORB_ptr ORB, Graph_prof_debug , Graph_fdebug ) ; _ComputingNode = (GraphBase::ComputingNode *) _LoopNode ; _GOTONode = (GraphBase::GOTONode *) _ComputingNode ; + _InLineNode = (GraphBase::InLineNode *) _ComputingNode ; break ; } case SUPERV::EndLoopNode : { @@ -274,6 +301,7 @@ GraphExecutor::InNode::InNode(CORBA::ORB_ptr ORB, Graph_prof_debug , Graph_fdebug ) ; _ComputingNode = (GraphBase::ComputingNode *) _EndOfLoopNode ; _GOTONode = (GraphBase::GOTONode *) _ComputingNode ; + _InLineNode = (GraphBase::InLineNode *) _ComputingNode ; break ; } case SUPERV::SwitchNode : { @@ -288,6 +316,7 @@ GraphExecutor::InNode::InNode(CORBA::ORB_ptr ORB, Graph_prof_debug , Graph_fdebug ) ; _ComputingNode = (GraphBase::ComputingNode *) _SwitchNode ; _GOTONode = (GraphBase::GOTONode *) _ComputingNode ; + _InLineNode = (GraphBase::InLineNode *) _ComputingNode ; break ; } case SUPERV::EndSwitchNode : { @@ -303,8 +332,15 @@ GraphExecutor::InNode::InNode(CORBA::ORB_ptr ORB, Graph_prof_debug , Graph_fdebug ) ; _ComputingNode = (GraphBase::ComputingNode *) _EndOfSwitchNode ; _GOTONode = (GraphBase::GOTONode *) _ComputingNode ; + _InLineNode = (GraphBase::InLineNode *) _ComputingNode ; break ; } + case SUPERV::DataFlowNode : { + cdebug << "GraphEditor::InNode::InNode SUPERV::DataFlowNode ERROR : " << NodeName ; + } + case SUPERV::UnknownNode : { + cdebug << "GraphEditor::InNode::InNode SUPERV::UnknownNode ERROR : " << NodeName ; + } } cdebug << "GraphExecutor::InNode::InNode " << (void *) this << " _ComputingNode " << (void *) _ComputingNode ; @@ -329,6 +365,32 @@ void GraphExecutor::InNode::UnLockDataWait() { } } +Engines::Component_var GraphExecutor::InNode::Component() const { + if ( IsFactoryNode() ) { + return _FactoryNode->Component() ; + } + else { + CORBA::Any const * anAnyComponent = GetChangeNodeInPort( 0 )->GetOutPort()->Value() ; // this + CORBA::Object_ptr obj ; + try { + *anAnyComponent >>= obj ; + return Engines::Component::_narrow( obj ) ; + } + catch( ... ) { + cdebug << "GraphExecutor::InNode::Component Component catch" << endl ; + } + } + return Engines::Component::_nil() ; +} + +Engines::Container_var GraphExecutor::InNode::Container() const { + if ( IsFactoryNode() ) { + return _FactoryNode->Container() ; + } + return Engines::Container::_nil() ; +} + + bool GraphExecutor::InNode::Ping() { // cdebug_in << "GraphExecutor::InNode::Ping" << endl; bool RetVal ; @@ -1020,7 +1082,7 @@ void GraphExecutor::InNode::InitialState( GraphExecutor::OutNode * theOutNode ) } } // if ( ( anInPort->IsGate() || anInPort->IsBus() ) && anOutPort == NULL ) { - if ( ( anInPort->IsGate() ) && anOutPort == NULL ) { + if ( anInPort->IsGate() && anOutPort == NULL ) { Pc-- ; } else { @@ -1110,29 +1172,84 @@ void GraphExecutor::InNode::InitialState( GraphExecutor::OutNode * theOutNode ) cdebug << "CurrentState = " << theAutomaton->StateName( _currentState ) << endl; -#if 0 - GraphExecutor::InNode * anInNode = (GraphExecutor::InNode *) _OutNode->GetGraphNode( "label_begin" ) ; - const GraphBase::InPort * anInPort = anInNode->GetNodeInPort(0) ; - GraphBase::OutPort * anOutPort = anInPort->GetLink() ; - if ( anOutPort ) { - cdebug << "InPort" << i << " : " << anInPort->PortName() << " from OutPort " - << anOutPort->PortName() << " from Node " << anOutPort->NodeName() - << " with state " ; - if ( anOutPort->State() == SUPERV::WaitingState ) { - cdebug << "WaitingState" ; + cdebug_out << "GraphExecutor::InNode::InitialState" << endl; +} + +const long GraphExecutor::InNode::CpuUsed( bool tot ) { + CORBA::Long cpu = 0 ; +// cdebug_in << "GraphExecutor::InNode::CpuUsed( " << tot << " )" << Name() << endl ; + if ( IsOneOfInLineNodes() ) { +// cdebug << "CpuUsed " << Name() << " --> PyCpuUsed()" << endl ; +// cout << "CpuUsed " << Name() << " --> PyCpuUsed()" << endl ; + cpu = PyCpuUsed( tot ) ; + } + else { + if ( !CORBA::is_nil( Component() ) ) { +// cdebug << "CpuUsed " << Name() << " --> Component()->CpuUsed_impl()" << endl ; +// cout << "CpuUsed " << Name() << " --> Component()->CpuUsed_impl()" << endl ; + try { + cpu = Component()->CpuUsed_impl() ; + } + catch ( ... ) { + cdebug << "CpuUsed " << Name() << " --> Component()->CpuUsed_impl() ERROR catched " << endl ; + cpu = 0 ; + } } - else if ( anOutPort->State() == SUPERV::ReadyState ) { - cdebug << "ReadyState" ; + } +// cdebug_out << "GraphExecutor::InNode::CpuUsed " << Name() << " CpuUsed : " << cpu << endl ; +// cout << "CpuUsed " << Name() << " CpuUsed : " << cpu << endl ; + return cpu ; +} + +#include +#include +#include + +long GraphExecutor::InNode::PyCpu() { + struct rusage usage ; + long cpu ; + if ( getrusage( RUSAGE_SELF , &usage ) == -1 ) { + perror("GraphExecutor::InNode::PyCpu") ; + return 0 ; + } +// return usage.ru_utime.__time_t tv_sec ; +// cdebug << pthread_self() << "PyCpu " << Name() << " " << usage.ru_utime.tv_sec << " " +// << usage.ru_utime.tv_usec << " " << usage.ru_stime.tv_sec << " " << usage.ru_stime.tv_usec +// << endl ; + cpu = usage.ru_utime.tv_sec ; + return cpu ; +} + +long GraphExecutor::InNode::PyCpuUsed( bool tot ) { + long cpu ; + if ( _PyTotCpuUsed == -1 ) { + if ( _Pythread == pthread_self() ) { +// cdebug << pthread_self() << "GraphExecutor::InNode::PyCpuUsed(" << tot << ") " << Name() +// << " _PyTotCpuUsed " << _PyTotCpuUsed << " PyCpu() " << PyCpu() << " - " << " _PyCpuUsed " +// << _PyCpuUsed << endl ; + cpu = PyCpu() - _PyCpuUsed ; + if ( tot ) { + _PyTotCpuUsed = cpu ; + } } else { - cdebug << "???" ; + cpu = 0 ; } - cdebug << " PortConnected(" - << anOutPort->IsPortConnected() << ") DataConnected(" - << anOutPort->IsDataConnected() << ")" << endl ; } -#endif + else { + cpu = _PyTotCpuUsed ; + } +// cdebug << pthread_self() << "GraphExecutor::InNode::PyCpuUsed(" << tot << ") " << Name() << "_PyTotCpuUsed" +// << _PyTotCpuUsed << " CpuUsed : " << cpu << endl ; + return cpu ; +} - cdebug_out << "GraphExecutor::InNode::InitialState" << endl; +void GraphExecutor::InNode::SetPyCpuUsed() { + _PyTotCpuUsed = -1 ; + _PyCpuUsed = 0 ; + _Pythread = pthread_self() ; + _PyCpuUsed = PyCpu() ; +// cdebug << pthread_self() << "GraphExecutor::InNode::SetPyCpuUsed " << Name() << " _PyCpuUsed : " +// << _PyCpuUsed << endl ; } diff --git a/src/GraphExecutor/DataFlowExecutor_InNode.hxx b/src/GraphExecutor/DataFlowExecutor_InNode.hxx index 7fdf945..ec6d305 100644 --- a/src/GraphExecutor/DataFlowExecutor_InNode.hxx +++ b/src/GraphExecutor/DataFlowExecutor_InNode.hxx @@ -1,10 +1,30 @@ -//============================================================================= -// File : DataFlowBase_InNode.hxx -// Created : 2002 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphExecutor : contains classes that permit execution of graphs and particularly the execution automaton +// +// 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 : DataFlowBase_InNode.hxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: #ifndef _DATAFLOWEXECUTOR_INNODE_HXX #define _DATAFLOWEXECUTOR_INNODE_HXX @@ -55,7 +75,10 @@ namespace GraphExecutor { bool _createNewThread ; bool _createNewThreadIf ; + int _RewindStack ; + SUPERV::AutomatonState _OldState ; SUPERV::AutomatonState _currentState ; + GraphExecutor::NodeEvent _CurrentEvent ; SUPERV::ControlState _ControlState ; SUPERV::AutomatonState _NextState ; GraphExecutor::StateEventAction _NextAction ; @@ -83,13 +106,17 @@ namespace GraphExecutor { bool _KillSync ; pthread_cond_t _StopWait ; + pthread_t _Pythread ; + long _PyCpuUsed ; + long _PyTotCpuUsed ; + GraphExecutor::FiniteStateMachine * _Automaton ; - CORBA::ORB_ptr _Orb; + CORBA::ORB_ptr _Orb; - GraphExecutor::OutNode * _OutNode ; + GraphExecutor::OutNode * _OutNode ; - char * _DataFromNode ; + char * _DataFromNode ; public: @@ -104,15 +131,15 @@ namespace GraphExecutor { GraphBase::ListOfPythonFunctions aPythonFunction = GraphBase::ListOfPythonFunctions() , const SUPERV::SDate NodeFirstCreation = SUPERV::SDate() , const SUPERV::SDate NodeLastModification = SUPERV::SDate() , - const char * NodeEditorRelease = NULL , - const char * NodeAuthor = NULL , - const char * NodeComputer = NULL , - const char * NodeComment = NULL , + const char * NodeEditorRelease = NULLSTRING , + const char * NodeAuthor = NULLSTRING , + const char * NodeComputer = NULLSTRING , + const char * NodeComment = NULLSTRING , const bool GeneratedName = false , const int NodeX = 0 , const int NodeY = 0 , int * Graph_prof_debug = NULL , - ostream * Graph_fdebug = NULL ) ; + ofstream * Graph_fdebug = NULL ) ; virtual ~InNode() ; pthread_t ThreadNo() { @@ -176,10 +203,8 @@ namespace GraphExecutor { GraphBase::LoopNode * LoopNode() { return _LoopNode ; } ; - Engines::Component_var Component() const { - return _FactoryNode->Component() ; } ; - Engines::Container_var Container() const { - return _FactoryNode->Container() ; } ; + Engines::Component_var Component() const ; + Engines::Container_var Container() const ; void SetContainer(Engines::Container_var aContainer) { _FactoryNode->SetContainer( aContainer ) ; } ; void SetComponent(Engines::Component_var anObjComponent) { @@ -223,14 +248,30 @@ namespace GraphExecutor { const int GetNodeInPortsSize() const { return _ComputingNode->GetNodeInPortsSize() ; } ; + const GraphBase::InPort *GetNodeInLoop() const { + return _ComputingNode->GetNodeInLoop() ; } ; + const GraphBase::InPort *GetNodeInGate() const { + return _ComputingNode->GetNodeInGate() ; } ; const GraphBase::InPort *GetNodeInPort(int i) const { return _ComputingNode->GetNodeInPort( i ) ; } ; + GraphBase::InPort *GetChangeNodeInLoop() const { + return _ComputingNode->GetChangeNodeInLoop() ; } ; + GraphBase::InPort *GetChangeNodeInGate() const { + return _ComputingNode->GetChangeNodeInGate() ; } ; GraphBase::InPort *GetChangeNodeInPort(int i) const { return _ComputingNode->GetChangeNodeInPort( i ) ; } ; const int GetNodeOutPortsSize() const { return _ComputingNode->GetNodeOutPortsSize() ; } ; + const GraphBase::OutPort *GetNodeOutLoop() const { + return _ComputingNode->GetNodeOutLoop() ; } ; + const GraphBase::OutPort *GetNodeOutGate() const { + return _ComputingNode->GetNodeOutGate() ; } ; const GraphBase::OutPort *GetNodeOutPort(int i) const { return _ComputingNode->GetNodeOutPort( i ) ; } ; + GraphBase::OutPort *GetChangeNodeOutLoop() const { + return _ComputingNode->GetChangeNodeOutLoop() ; } ; + GraphBase::OutPort *GetChangeNodeOutGate() const { + return _ComputingNode->GetChangeNodeOutGate() ; } ; GraphBase::OutPort *GetChangeNodeOutPort(int i) const { return _ComputingNode->GetChangeNodeOutPort( i ) ; } ; @@ -272,14 +313,16 @@ namespace GraphExecutor { bool CreateNewThread() { return _createNewThread ; } ; bool CreateNewThreadIf() { return _createNewThreadIf ; } ; void NewThread( pthread_t aThread ) ; - void ExitThread() ; + void ExitThread() ; + void RewindStack( int aRewindStack ) { _RewindStack = aRewindStack ; } ; + int RewindStack() const { return _RewindStack ; } ; SUPERV::AutomatonState State() const { return _currentState; }; void State(SUPERV::AutomatonState aState ) { - cdebug << "GraphExecutor::InNode::State( " - << Automaton()->StateName( _currentState ) << " --> " - << Automaton()->StateName( aState ) << " )" << endl ; +// cdebug << "GraphExecutor::InNode::State( " +// << Automaton()->StateName( _currentState ) << " --> " +// << Automaton()->StateName( aState ) << " )" << endl ; _currentState = aState ; } ; SUPERV::ControlState ControlState() const { return _ControlState; }; @@ -377,14 +420,20 @@ namespace GraphExecutor { void InParametersSet( bool & Err , int nInParams , - ServicesAnyData * aListOfInParameters ) ; - void InOutParameters( int nOutParams , - ServicesAnyData * aListOfOutParameters ) ; - bool OutParameters( bool Err , SUPERV::GraphState NewState , - int nOutParams , - ServicesAnyData * aListOfOutParameters ) ; + ServicesAnyData * InParametersList ) ; + void InOutParametersSet( int nOutParams , + ServicesAnyData * OutParametersList ) ; + bool OutParametersSet( bool Err , SUPERV::GraphState NewState , + int nOutParams , + ServicesAnyData * OutParametersList ) ; void coutbegin() ; void coutexit() ; + + const long CpuUsed( bool tot = false ) ; + + long PyCpuUsed( bool tot = false ) ; + void SetPyCpuUsed() ; + long PyCpu() ; } ; } ; diff --git a/src/GraphExecutor/DataFlowExecutor_InNodeThreads.cxx b/src/GraphExecutor/DataFlowExecutor_InNodeThreads.cxx index 847324d..70deb4e 100644 --- a/src/GraphExecutor/DataFlowExecutor_InNodeThreads.cxx +++ b/src/GraphExecutor/DataFlowExecutor_InNodeThreads.cxx @@ -1,11 +1,32 @@ +// SUPERV GraphExecutor : contains classes that permit execution of graphs and particularly the execution automaton +// +// 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 : DataFlowBase_InNodeThreads.cxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: + using namespace std; -//============================================================================= -// File : DataFlowBase_InNodeThreads.cxx -// Created : 2002 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= #include #include @@ -18,31 +39,31 @@ using namespace std; #include #include CORBA_CLIENT_HEADER(SALOME_Component) -#include "SALOME_NamingService.hxx" +//#include "SALOME_NamingService.hxx" #include "SALOME_LifeCycleCORBA.hxx" //#include "DataFlowExecutor_InNode.hxx" #include "DataFlowExecutor_OutNode.hxx" -static char *containerName = "FactoryServer" ; +//static char *containerName = "FactoryServer" ; int GraphExecutor::InNode::SendEvent( const GraphExecutor::NodeEvent anEvent ) { - SUPERV::AutomatonState old_state ; + _CurrentEvent = (GraphExecutor::NodeEvent ) anEvent ; cdebug << pthread_self() << "/" << ThreadNo() << " -->SendEvent Node " << Name() << " ControlState : " << Automaton()->ControlStateName( ControlState() ) << " Event : " << Automaton()->EventName( anEvent ) - << " State : " << Automaton()->StateName( State() ) << endl; + << " State : " << Automaton()->StateName( State() ) << " _RewindStack " << _RewindStack << endl; - old_state = State() ; - _NextState = Automaton()->NextState( old_state , anEvent ) ; - if ( _NextState == old_state ) { + _OldState = State() ; + _NextState = Automaton()->NextState( _OldState , anEvent ) ; + if ( _NextState == _OldState ) { cdebug << pthread_self() << "/" << ThreadNo() << " GraphExecutor::InNodeThreads::SendEvent SameStates " - << old_state << endl ; + << _OldState << endl ; _NextAction = GraphExecutor::VoidAction ; } else { @@ -50,25 +71,26 @@ int GraphExecutor::InNode::SendEvent( } // State( _NextState ) ; -// if ( old_state == SUPERV::SuccessedExecutingState || -// old_state == SUPERV::ErroredExecutingState ) { +// if ( _OldState == SUPERV::SuccessedExecutingState || +// _OldState == SUPERV::ErroredExecutingState ) { // DoneAction() ; // } cdebug << pthread_self() << "/" << ThreadNo() << " SendedEvent Node " << Name() << endl << " ControlState : " << Automaton()->ControlStateName( ControlState() ) << endl - << " OldState : " << Automaton()->StateName( old_state ) << endl + << " OldState : " << Automaton()->StateName( _OldState ) << endl << " Event : " << Automaton()->EventName( anEvent ) << endl << " NextState : " << Automaton()->StateName( _NextState ) << endl << " Action : " << Automaton()->ActionName( _NextAction ) << endl - << " CreateNewThread " << CreateNewThread() << endl ; + << " CreateNewThread " << CreateNewThread() << endl + << " _RewindStack " << _RewindStack << endl ; #if 0 cout << pthread_self() << "/" << ThreadNo() << " SendedEvent Node " << Name() << endl << " ControlState : " << Automaton()->ControlStateName( ControlState() ) << endl - << " OldState : " << Automaton()->StateName( old_state ) << endl + << " OldState : " << Automaton()->StateName( _OldState ) << endl << " Event : " << Automaton()->EventName( anEvent ) << endl << " NextState : " << Automaton()->StateName( _NextState ) << endl << " Action : " << Automaton()->ActionName( _NextAction ) << endl @@ -77,7 +99,7 @@ int GraphExecutor::InNode::SendEvent( int sts = executeAction() ; - cdebug << pthread_self() << "/" << ThreadNo() << " <- SendEvent Node " << Name() + cdebug << pthread_self() << "/" << ThreadNo() << " <--- SendEvent Node " << Name() << " Event : " << Automaton()->EventName( anEvent ) << " State : " << Automaton()->StateName( State() ) << endl; @@ -395,11 +417,16 @@ void GraphExecutor::InNode::StopAction() { } int GraphExecutor::InNode::executeAction() { + if ( !CreateNewThread() && _RewindStack > 101 ) { + CreateNewThread( true ) ; + ThreadNo( 0 ) ; + } if ( CreateNewThread() ) { CreateNewThread( false ) ; if ( ThreadNo() == 0 ) { + _RewindStack = 1 ; cdebug << pthread_self() << "/" << ThreadNo() - << " executeAction start Thread " + << " executeAction start Thread _RewindStack " << _RewindStack << " " << Automaton()->ActionName( _NextAction ) << "(" << Name() << ")" << endl; pthread_t T; @@ -409,10 +436,18 @@ int GraphExecutor::InNode::executeAction() { while ( (pthread_sts = pthread_create(&T, NULL, run_function, this )) ) { char * msg = "Cannot pthread_create " ; perror( msg ) ; - cdebug << ThreadNo() << " " << msg << endl ; + cdebug << ThreadNo() << " " << msg << " --> sleep(5)" << endl ; cdebug << ThreadNo() << " PTHREAD_THREADS_MAX : " - << PTHREAD_THREADS_MAX << " " << pthread_sts << endl ; -// sleep( 1 ) ; + << PTHREAD_THREADS_MAX << " pthread_create status : " ; + if ( pthread_sts == EAGAIN ) { + cdebug << "EAGAIN(" << pthread_sts << ")" << endl ; + cdebug << "It seems to me that with gdb we are limited to 256 threads because of defunct" << endl ; + } + else { + cdebug << pthread_sts << endl ; + } + string smsg = msg ; + delete [] msg ; pthread_exit( msg ) ; } cdebug << pthread_self() << "/" << ThreadNo() @@ -420,19 +455,16 @@ int GraphExecutor::InNode::executeAction() { } else { cdebug << pthread_self() << "/" << ThreadNo() - << " executeAction restart Thread " + << " executeAction restart Thread _RewindStack " << _RewindStack << " " << Automaton()->StateName( State() ) << " " << Automaton()->ActionName( _NextAction ) << "(" << Name() << ") ReStartAction ==>" << endl; - SUPERV::AutomatonState oldstate = State() ; State( SUPERV::SuspendedSuccessedState ) ; if ( !ReStartAction( this , GraphExecutor::ReStartEvent ) ) { -// State( oldstate ) ; cdebug << pthread_self() << "/" << ThreadNo() << " executeAction STATE & CALLED " << Automaton()->ActionName( _NextAction ) << "(" << Name() << ") ERROR-DEBUG " << endl; -// return ExecuteAction() ; } else { cdebug << pthread_self() << "/" << ThreadNo() << " executeAction NO CALL " @@ -442,23 +474,24 @@ int GraphExecutor::InNode::executeAction() { } } else { + if ( _CurrentEvent == ExecuteEvent ) { + _RewindStack += 1 ; + } cdebug << pthread_self() << "/" << ThreadNo() << " executeAction call " - << Automaton()->ActionName( _NextAction ) << "(" << Name() << ")" + << Automaton()->ActionName( _NextAction ) << "(" << Name() << ") _RewindStack " << _RewindStack << endl; return ExecuteAction() ; } - return 1; + return 1 ; } void GraphExecutor::InNode::coutbegin() { cdebug << ThreadNo() << " " << pthread_self() << " run_function begin" - << " " << Name() << " " << Automaton()->StateName( State() ) - << endl ; + << " " << Name() << " " << Automaton()->StateName( State() ) << endl ; } void GraphExecutor::InNode::coutexit() { - cdebug << pthread_self() << "/" << ThreadNo() << " run_function pthread_exit" - << " " << Name() << " " << Automaton()->StateName( State() ) - << endl ; + cdebug << pthread_self() << "/" << ThreadNo() << " run_function pthread_exit _RewindStack " << _RewindStack + << " " << Name() << " " << Automaton()->StateName( State() ) << endl ; } void * run_function(void *p) { GraphExecutor::InNode *aNode = (GraphExecutor::InNode *) p; @@ -474,11 +507,12 @@ void * run_function(void *p) { } aNode->ExecuteAction() ; char * msg = new char[40] ; - sprintf( msg , "%d" , aNode->ThreadNo() ) ; + sprintf( msg , "%d" , (int ) aNode->ThreadNo() ) ; strcat( msg , " thread exit" ) ; aNode->coutexit() ; aNode->ExitThread() ; string smsg = msg ; + delete [] msg ; pthread_exit( (void * ) smsg.c_str() ) ; return msg ; } @@ -649,16 +683,16 @@ int GraphExecutor::InNode::DataWaiting_SomeDataReadyAction() { bool LoopBeginning = false ; bool SwitchFinished = false ; - if ( IsEndLoopNode() && !GetChangeNodeInPort( 0 )->GetOutPort()->BoolValue() ) { + if ( IsEndLoopNode() && !GetChangeNodeInLoop()->GetOutPort()->BoolValue() ) { LoopFinished = true ; // End of Loop } - if ( IsLoopNode() && GetChangeNodeInPort( 1 )->GetOutPort()->BoolValue() ) { + if ( IsLoopNode() && GetChangeNodeInLoop()->GetOutPort()->BoolValue() ) { LoopBeginning = true ; // Beginning of Loop } - if ( IsEndSwitchNode() && !GetChangeNodeInPort( 0 )->GetOutPort()->BoolValue() ) { + if ( IsEndSwitchNode() && !GetChangeNodeInGate()->GetOutPort()->BoolValue() ) { SwitchFinished = true ; } - for ( k = 0 ; k < GetNodeInPortsSize() ; k++ ) { + for ( k = 0 ; k < (unsigned int ) GetNodeInPortsSize() ; k++ ) { GraphBase::InPort * anInPort = GetChangeNodeInPort(k) ; GraphBase::OutPort * anOutPort = anInPort->GetOutPort() ; if ( anInPort->IsGate() && anOutPort == NULL ) { @@ -681,7 +715,6 @@ int GraphExecutor::InNode::DataWaiting_SomeDataReadyAction() { #endif cdebug << endl ; } -// else if ( LoopBeginning && anInPort->IsDataConnected() ) { else if ( IsLoopNode() && anInPort->IsDataConnected() ) { anInPort->State( SUPERV::ReadyState ) ; InReady += 1 ; @@ -938,8 +971,8 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() { bool Err = false ; int nInParams = GetNodeInPortsSize() ; - ServicesAnyData * aListOfInParameters = new ServicesAnyData[nInParams]; - InParametersSet( Err , nInParams , aListOfInParameters ) ; + ServicesAnyData * InParametersList = new ServicesAnyData[nInParams]; + InParametersSet( Err , nInParams , InParametersList ) ; Engines::Container_var myContainer ; Engines::Component_var myObjComponent ; @@ -950,7 +983,7 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() { if ( IsComputingNode() ) { ObjInterface( true ) ; CORBA::Object_ptr obj ; - aListOfInParameters[1].Value >>= obj ; + InParametersList[0].Value >>= obj ; CORBA::Object_var objvar = CORBA::Object_var( obj ) ; myObjComponent = Engines::Component::_narrow( objvar ) ; } @@ -963,7 +996,7 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() { myContainer , myObjComponent ) ; // if ( !Err && nInParams > 1 && // strcmp( ComponentName() , InterfaceName() ) && -// aListOfInParameters[ 1 ].Value.type()->kind() == +// InParametersList[ 1 ].Value.type()->kind() == // CORBA::tk_objref ) { // } // else { @@ -981,8 +1014,8 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() { } int nOutParams = GetNodeOutPortsSize() ; - ServicesAnyData * aListOfOutParameters = new ServicesAnyData[nOutParams]; - InOutParameters( nOutParams , aListOfOutParameters ) ; + ServicesAnyData * OutParametersList = new ServicesAnyData[nOutParams]; + InOutParametersSet( nOutParams , OutParametersList ) ; // if ( strlen( ComponentName() ) ) { if ( Err || ControlState() == SUPERV::ToKillState || @@ -994,14 +1027,20 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() { else { if ( !Err ) { cdebug << ThreadNo() << " Run( '" << ServiceName() << "'" ; - for ( i = 0 ; i < nInParams ; i++ ) { - cdebug << " , " << aListOfInParameters[ i ].Name ; + for ( i = 0 ; i < (int ) ServiceInParameter().length() ; i++ ) { + cdebug << " , " << InParametersList[ i ].Name << "[kind" + << InParametersList[ i ].Value.type()->kind() << "]" ; + } + for ( i = 0 ; i < (int ) ServiceOutParameter().length() ; i++ ) { + cdebug << " , " << OutParametersList[ i ].Name << "[kind" + << OutParametersList[ i ].Value.type()->kind() << "]" ; } cdebug << ")" << endl ; if ( IsOneOfInLineNodes() ) { bool StsPyDynInvoke = true ; - _OutNode->PThreadLock() ; + _OutNode->PyThreadLock() ; + SetPyCpuUsed() ; try { if ( IsInLineNode() && (*InLineNode()->PythonFunction()).length() && strlen( InLineNode()->PyFuncName() ) ) { @@ -1010,18 +1049,18 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() { << "' IsInLineNode PyDynInvoke" << endl ; StsPyDynInvoke = PyDynInvoke( InLineNode()->PyRunMethod() , InLineNode()->PyFuncName() , - &aListOfInParameters[1] , ServiceInParameter().length() , - &aListOfOutParameters[1] , ServiceOutParameter().length() ) ; + &InParametersList[0] , ServiceInParameter().length() , + &OutParametersList[0] , ServiceOutParameter().length() ) ; } else if ( IsLoopNode() ) { - if ( GetNodeInPort( 1 )->GetOutPort()->BoolValue() ) { // InLoop Port + if ( GetNodeInLoop()->GetOutPort()->BoolValue() ) { // InLoop Port cdebug << ThreadNo() << " !ObjInterface " << Name() << " IsLoopNode PyDynInvoke '" << InLineNode()->PyFuncName() << "'" << endl ; StsPyDynInvoke = PyDynInvoke( InLineNode()->PyRunMethod() , InLineNode()->PyFuncName() , - &aListOfInParameters[2] , ServiceInParameter().length() , - &aListOfOutParameters[1] , ServiceOutParameter().length() ) ; + &InParametersList[1] , ServiceInParameter().length() , + &OutParametersList[1] , ServiceOutParameter().length() ) ; } else { cdebug << ThreadNo() << " !ObjInterface " << Name() @@ -1029,8 +1068,8 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() { << "'" << endl ; StsPyDynInvoke = PyDynInvoke( LoopNode()->PyNextMethod() , LoopNode()->PyNextName() , - &aListOfInParameters[2] , ServiceInParameter().length() , - &aListOfOutParameters[1] , ServiceOutParameter().length() ) ; + &InParametersList[1] , ServiceInParameter().length() , + &OutParametersList[1] , ServiceOutParameter().length() ) ; } if ( StsPyDynInvoke ) { cdebug << ThreadNo() << " !ObjInterface " << Name() @@ -1038,40 +1077,59 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() { << "' Copy of " << ServiceInParameter().length() << " OutParameters" << endl ; int i ; - for ( i = 0 ; i < ServiceInParameter().length() ; i++ ) { - aListOfInParameters[2 + i].Value = aListOfOutParameters[1+ i].Value ; - aListOfInParameters[2 + i].Name = aListOfOutParameters[1+ i].Name ; - switch ( aListOfInParameters[2 + i].Value.type()->kind() ) { + for ( i = 1 ; i <= (int ) ServiceInParameter().length() ; i++ ) { + InParametersList[i].Value = OutParametersList[i].Value ; + InParametersList[i].Name = OutParametersList[i].Name ; +//#if 0 + switch ( InParametersList[i].Value.type()->kind() ) { case CORBA::tk_string : - cdebug << "Arg" << i << " : " - << aListOfInParameters[2 + i].Name.c_str() - << " Value(string) " << endl ; + char * t; + InParametersList[i].Value >>= t ; + cdebug << "ArgOut->In" << i << " : " + << InParametersList[i].Name.c_str() + << " Value(string) " << t << endl ; break ; case CORBA::tk_double : - cdebug << "Arg" << i << " : " - << aListOfInParameters[2 + i].Name.c_str() - << " Value(double) " << endl ; + double d; + InParametersList[i].Value >>= d; + cdebug << "ArgOut->In" << i << " : " + << InParametersList[i].Name.c_str() + << " Value(double) " << d << endl ; break ; case CORBA::tk_long : - cdebug << "Arg" << i << " : " - << aListOfInParameters[2 + i].Name.c_str() - << " Value(long) " << endl ; + long l; + InParametersList[i].Value >>= l; + cdebug << "ArgOut->In" << i << " : " + << InParametersList[i].Name.c_str() + << " Value(long) " << l << endl ; break ; case CORBA::tk_objref : - cdebug << "Arg" << i << " : " - << aListOfInParameters[2 + i].Name.c_str() - << " Value(object reference) " << endl ; + CORBA::Object_ptr obj ; + char * retstr ; + try { + InParametersList[i].Value >>= obj ; + retstr = ObjectToString( obj ); + cdebug << "ArgOut->In" << i << " : " + << InParametersList[i].Name.c_str() + << " Value(object reference) " << retstr << endl ; + } + catch ( ... ) { + cdebug << "ArgOut->In" << i << " : " + << InParametersList[i].Name.c_str() + << " Value(object reference) Catched ERROR" << endl ; + } break ; default : - cdebug << "Arg" << i << " : " - << aListOfInParameters[2 + i].Name.c_str() + cdebug << "ArgOut->In" << i << " : " + << InParametersList[i].Name.c_str() << " Value(other) ERROR" << endl ; } +//#endif } StsPyDynInvoke = PyDynInvoke( LoopNode()->PyMoreMethod() , LoopNode()->PyMoreName() , - &aListOfInParameters[2] , ServiceInParameter().length() , - &aListOfOutParameters[0] , ServiceOutParameter().length()+1 ) ; + &InParametersList[1] , ServiceInParameter().length() , + &OutParametersList[0] , ServiceOutParameter().length()+1 ) ; } else { Err = true ; @@ -1087,8 +1145,8 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() { << "' IsSwitchNode PyDynInvoke" << endl ; StsPyDynInvoke = PyDynInvoke( InLineNode()->PyRunMethod() , InLineNode()->PyFuncName() , - &aListOfInParameters[1] , ServiceInParameter().length() , - &aListOfOutParameters[1] , ServiceOutParameter().length() ) ; + &InParametersList[0] , ServiceInParameter().length() , + &OutParametersList[0] , ServiceOutParameter().length() ) ; } else if ( IsGOTONode() && (*GOTONode()->PythonFunction()).length() && strlen( InLineNode()->PyFuncName() ) ) { @@ -1097,8 +1155,8 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() { << "' IsGOTONode PyDynInvoke" << endl ; StsPyDynInvoke = PyDynInvoke( InLineNode()->PyRunMethod() , InLineNode()->PyFuncName() , - &aListOfInParameters[1] , ServiceInParameter().length() , - &aListOfOutParameters[1] , ServiceOutParameter().length() ) ; + &InParametersList[0] , ServiceInParameter().length() , + &OutParametersList[0] , ServiceOutParameter().length() ) ; } else if ( IsEndSwitchNode() && (*InLineNode()->PythonFunction()).length() && strlen( InLineNode()->PyFuncName() ) ) { @@ -1107,8 +1165,8 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() { << "' IsSwitchNode PyDynInvoke" << endl ; StsPyDynInvoke = PyDynInvoke( InLineNode()->PyRunMethod() , InLineNode()->PyFuncName() , - &aListOfInParameters[1] , ServiceInParameter().length() , - &aListOfOutParameters[0] , ServiceOutParameter().length() ) ; + &InParametersList[0] , ServiceInParameter().length() , + &OutParametersList[0] , ServiceOutParameter().length() ) ; } else if ( (*InLineNode()->PythonFunction()).length() == 0 || strlen( InLineNode()->PyFuncName() ) == 0 ) { @@ -1116,47 +1174,47 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() { << " Copy of " << ServiceInParameter().length() << " OutParameters" << endl ; int i ; - int argind0 = 0 ; - if ( IsEndSwitchNode() ) { - argind0 = 0 ; + int argout0 = 0 ; + int argin0 = 0 ; + if ( IsEndLoopNode() ) { + argout0 = 1 ; + argin0 = 1 ; // after DoLoop } - else if ( IsEndLoopNode() || IsGOTONode() ) { - argind0 = 1 ; - } - for ( i = 0 ; i < ServiceInParameter().length() ; i++ ) { - aListOfOutParameters[argind0 + i].Value = aListOfInParameters[ 1 + i].Value ; -// aListOfOutParameters[argind0 + i].Name = aListOfInParameters[argind0 + i].Name ; - switch ( aListOfInParameters[ 1 + i].Value.type()->kind() ) { + for ( i = 0 ; i < (int ) ServiceInParameter().length() ; i++ ) { + OutParametersList[argout0 + i].Value = InParametersList[argin0 + i].Value ; +//#if 0 + switch ( InParametersList[argin0 + i].Value.type()->kind() ) { case CORBA::tk_string : - cdebug << "Arg" << i << " : " - << aListOfInParameters[ 1 + i].Name.c_str() + cdebug << "ArgOut->In" << argin0 + i << " : " + << InParametersList[argin0 + i].Name.c_str() << " Value(string) " - << aListOfOutParameters[argind0 + i].Name.c_str() << endl ; + << OutParametersList[argin0 + i].Name.c_str() << endl ; break ; case CORBA::tk_double : - cdebug << "Arg" << i << " : " - << aListOfInParameters[ 1 + i].Name.c_str() + cdebug << "ArgOut->In" << argin0 + i << " : " + << InParametersList[argin0 + i].Name.c_str() << " Value(double) " - << aListOfOutParameters[argind0 + i].Name.c_str() << endl ; + << OutParametersList[argin0 + i].Name.c_str() << endl ; break ; case CORBA::tk_long : - cdebug << "Arg" << i << " : " - << aListOfInParameters[ 1 + i].Name.c_str() + cdebug << "ArgOut->In" << argin0 + i << " : " + << InParametersList[argin0 + i].Name.c_str() << " Value(long) " - << aListOfOutParameters[argind0 + i].Name.c_str() << endl ; + << OutParametersList[ i ].Name.c_str() << endl ; break ; case CORBA::tk_objref : - cdebug << "Arg" << i << " : " - << aListOfInParameters[ 1 + i].Name.c_str() + cdebug << "ArgOut->In" << argin0 + i << " : " + << InParametersList[argin0 + i].Name.c_str() << " Value(object reference) " - << aListOfOutParameters[argind0 + i].Name.c_str() << endl ; + << OutParametersList[argin0 + i].Name.c_str() << endl ; break ; default : - cdebug << "Arg" << i << " : " - << aListOfInParameters[ 1 + i].Name.c_str() + cdebug << "ArgOut->In" << argin0 + i << " : " + << InParametersList[argin0 + i].Name.c_str() << " Value(other) ERROR " - << aListOfOutParameters[argind0 + i].Name.c_str() << endl ; + << OutParametersList[argin0 + i].Name.c_str() << endl ; } +//#endif } } if ( !StsPyDynInvoke ) { @@ -1172,10 +1230,10 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() { << " Python Dynamic Call Exception catched ERROR" << endl ; } - _OutNode->PThreadUnLock() ; + CpuUsed( true ) ; + _OutNode->PyThreadUnLock() ; } -// else if ( !ObjInterface() ) { - else if ( IsFactoryNode() ) { + else { try { try { DynInvoke( myObjComponent, "Names" , @@ -1191,16 +1249,16 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() { << " IsComputingNode DynInvoke" << endl ; DynInvoke( myObjComponent, ServiceName() , - &aListOfInParameters[1] , ServiceInParameter().length() , - &aListOfOutParameters[1] , ServiceOutParameter().length() ) ; + &InParametersList[1] , ServiceInParameter().length()-1 , + &OutParametersList[0] , ServiceOutParameter().length() ) ; } else if ( IsFactoryNode() ) { cdebug << ThreadNo() << " !ObjInterface " << Name() << " IsFactoryNode DynInvoke" << endl ; DynInvoke( myObjComponent, ServiceName() , - &aListOfInParameters[1] , ServiceInParameter().length() , - &aListOfOutParameters[1] , ServiceOutParameter().length() ) ; + &InParametersList[0] , ServiceInParameter().length() , + &OutParametersList[0] , ServiceOutParameter().length() ) ; } } catch( ... ) { @@ -1210,28 +1268,6 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() { << endl ; } } - else { - try { - try { - DynInvoke( myObjComponent, "Names" , - _OutNode->Name() , Name() ) ; - } - catch( ... ) { - } - cdebug << ThreadNo() << " ObjInterface " << Name() << " DynInvoke" - << endl ; - DynInvoke( myObjComponent , - ServiceName() , - &aListOfInParameters[2] , ServiceInParameter().length()-1 , - &aListOfOutParameters[1] , ServiceOutParameter().length() ) ; - } - catch( ... ) { - Err = true ; - cdebug << ThreadNo() << " ObjInterface " << Name() - << " Node(Interface) Dynamic Call Exception catched ERROR" - << endl ; - } - } } } // } @@ -1259,12 +1295,12 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() { NewEvent = GraphExecutor::SuccessEvent ; } - bool ErrOut = OutParameters( Err , PortState , nOutParams , aListOfOutParameters ) ; + bool ErrOut = OutParametersSet( Err , PortState , nOutParams , OutParametersList ) ; if ( !ErrOut ) { NewEvent = GraphExecutor::ErrorEvent ; } - delete [] aListOfInParameters ; - delete [] aListOfOutParameters ; + delete [] InParametersList ; + delete [] OutParametersList ; SendEvent( NewEvent ); @@ -1436,17 +1472,19 @@ void GraphExecutor::InNode::SetWaitingStates(GraphExecutor::InNode * EndNode ) { else if ( anInPort->State() != SUPERV::WaitingState ) { if ( !docdebug ) { cdebug << ThreadNo() - << " --> GraphExecutor::InNodeThreads::SetWaitingStates " - << Name() << endl; + << " --> GraphExecutor::InNodeThreads::SetWaitingStates " << Name() << endl; docdebug = true ; } anInPort->State( SUPERV::WaitingState ) ; } } for ( i = 0 ; i < GetNodeOutPortsSize() ; i++ ) { - if ( !( IsGOTONode() && i == 0 ) && !( IsEndLoopNode() && i <= 1 ) ) { - for ( j = 0 ; j < GetChangeNodeOutPort( i )->InPortsSize() ; j++ ) { - GraphExecutor::InNode * aNode = (GraphExecutor::InNode * ) _OutNode->GetChangeGraphNode( GetChangeNodeOutPort( i )->ChangeInPorts( j )->NodeName() )->GetInNode() ; + for ( j = 0 ; j < GetChangeNodeOutPort( i )->InPortsSize() ; j++ ) { + GraphBase::OutPort * anOutPort = GetChangeNodeOutPort( i ) ; +// if ( !( IsGOTONode() && i == 0 ) && !( IsEndLoopNode() && i <= 1 ) ) { + if ( !( IsGOTONode() && anOutPort->IsGate() ) && + !( IsEndLoopNode() && ( anOutPort->IsGate() || anOutPort->IsLoop() ) ) ) { + GraphExecutor::InNode * aNode = (GraphExecutor::InNode * ) _OutNode->GetChangeGraphNode( anOutPort->ChangeInPorts( j )->NodeName() )->GetInNode() ; if ( aNode != EndNode ) { aNode->SetWaitingStates( EndNode ) ; } @@ -1469,73 +1507,89 @@ int GraphExecutor::InNode::Successed_SuccessAction() { DoneAction() ; if ( IsGOTONode() || - ( IsEndLoopNode() && GetNodeInPort(0)->GetOutPort()->BoolValue() ) ) { -// int index ; -// if ( IsGOTONode() ) { -// index = 0 ; -// } -// else { -// index = 1 ; -// CORBA::Any * anAny = new CORBA::Any() ; -// *anAny <<= (long ) 0 ; -// GetChangeNodeOutPort(1)->Value( anAny ) ; // Loop(InLoop) = false -// } -// const GraphBase::OutPort * GateOutPort = GetNodeOutPort(index) ; - const GraphBase::OutPort * GateOutPort = GetNodeOutPort(0) ; - for ( i = 0 ; i < GateOutPort->InPortsSize() ; i++ ) { - const GraphBase::InPort * anInPort = GateOutPort->InPorts( i ) ; + ( IsEndLoopNode() && GetNodeInLoop()->GetOutPort()->BoolValue() ) ) { + const GraphBase::OutPort * aGateOutPort ; + if ( IsGOTONode() ) { + aGateOutPort = GetNodeOutGate() ; + } + else { + aGateOutPort = GetNodeOutLoop() ; + } + for ( i = 0 ; i < aGateOutPort->InPortsSize() ; i++ ) { + const GraphBase::InPort * anInPort = aGateOutPort->InPorts( i ) ; GraphExecutor::InNode * aLabelNode = (GraphExecutor::InNode *) _OutNode->GetChangeGraphNode( anInPort->NodeName() )->GetInNode() ; + cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " will Loop to HeadNode " + << aLabelNode->Name() << " from port " << anInPort->PortName() << endl ; aLabelNode->SetWaitingStates( this ) ; - for ( j = 1 ; j < GetNodeOutPortsSize() ; j++ ) { + 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 ; + } + } + for ( j = 0 ; j < GetNodeOutPortsSize() ; j++ ) { GraphBase::OutPort * aBusParamOutPort = GetChangeNodeOutPort( j ) ; - GraphBase::InPort * aBusParamChangeInPort = NULL ; -// if ( aBusParamOutPort->IsLoop() ) { -// aBusParamChangeInPort = aLabelNode->GetChangeInPort( "InitLoop" ) ; -// } -// else { - aBusParamChangeInPort = aLabelNode->GetChangeInPort( aBusParamOutPort->PortName() ) ; -// } - if ( aBusParamChangeInPort ) { - aBusParamChangeInPort->ChangeOutPort( aBusParamOutPort ) ; - 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 ; - } - else if ( firstzeroNode == NULL && - aLabelNode->ThreadNo() == 0 ) { - firstzeroNode = aLabelNode ; - } - else { - SomeDataNodes.push_back( aLabelNode ) ; - cdebug << ThreadNo() << " Successed_SuccessAction push " - << SomeDataNodes.size() << " " << aLabelNode->Name() - << endl ; + if ( !aBusParamOutPort->IsGate() ) { + GraphBase::InPort * aBusParamChangeInPort = NULL ; + if ( aBusParamOutPort->IsLoop() ) { + aBusParamChangeInPort = aLabelNode->GetChangeNodeInLoop() ; + } + else { + aBusParamChangeInPort = aLabelNode->GetChangeInPort( aBusParamOutPort->PortName() ) ; + } + if ( aBusParamChangeInPort ) { + aBusParamChangeInPort->ChangeOutPort( aBusParamOutPort ) ; + 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 ; + } + else if ( firstzeroNode == NULL && + aLabelNode->ThreadNo() == 0 ) { + firstzeroNode = aLabelNode ; + } + else { + SomeDataNodes.push_back( aLabelNode ) ; + cdebug << ThreadNo() << " Successed_SuccessAction push " + << SomeDataNodes.size() << " " << aLabelNode->Name() + << endl ; + } } } - } + else { + cdebug << ThreadNo() + << " Successed_SuccessAction Loop to HeadNode " + << aLabelNode->Name() << " with datas from " << Name() << "(" + << aBusParamOutPort->PortName() << ") to port " + << aBusParamChangeInPort->PortName() << endl; + } + } else { - cdebug << ThreadNo() - << " Successed_SuccessAction Loop to HeadNode " - << aLabelNode->Name() << " with datas from " - << aBusParamOutPort->PortName() << " to port " - << aBusParamChangeInPort->PortName() << endl; + cdebug << ThreadNo() << " ERROR in Successed_SuccessAction of " << Name() + << " NO port " << aBusParamOutPort->PortName() << " in " + << aLabelNode->Name() << endl; } - } - else { - cdebug << ThreadNo() << " ERROR in Successed_SuccessAction of " << Name() - << " NO port " << aBusParamOutPort->PortName() << " in " - << aLabelNode->Name() << endl; } } -// const GraphBase::OutPort * aGateOutPort = GetNodeOutPort( index ) ; -// const GraphBase::InPort * aGateInPort = aLabelNode->GetNodeInPort( index ) ; - const GraphBase::OutPort * aGateOutPort = GetNodeOutPort( 0 ) ; // DoLoop or OutGate - const GraphBase::InPort * aGateInPort = aLabelNode->GetNodeInPort( 0 ) ; + 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 ; + } + } +// const GraphBase::OutPort * aGateOutPort = GetNodeOutPort( 0 ) ; // DoLoop or OutGate + const GraphBase::InPort * aGateInPort = aLabelNode->GetNodeInGate() ; if ( aGateInPort ) { if ( aGateInPort->GetOutPort() ) { aGateInPort->GetOutPort()->Value( aGateOutPort->Value() ) ; @@ -1580,15 +1634,15 @@ int GraphExecutor::InNode::Successed_SuccessAction() { cdebug << " " << LinkedNodes( i )->Name() ; } cdebug << endl; - SUPERV::ControlState aControl = ControlState() ; +// SUPERV::ControlState aControl = ControlState() ; for ( i = 0 ; i < LinkedNodesSize() ; i++ ) { bool IgnoreForEndLoop = false ; toNode = (GraphExecutor::InNode *) LinkedNodes( i )->GetInNode() ; cdebug << ThreadNo() << " Successed_SuccessAction of " << Name() << " [" << i << "] " << LinkedNodes( i )->Name() << endl ; if ( toNode && !toNode->IsDataFlowNode() ) { - GraphBase::InPort * toGateInPort = toNode->GetChangeNodeInPort(0) ; if ( IsComputingNode() && toNode->IsInLineNode() ) { + GraphBase::InPort * toGateInPort = toNode->GetChangeNodeInGate() ; toGateInPort->State( SUPERV::ReadyState ) ; GraphBase::OutPort * GateOutPort = toGateInPort->GetOutPort() ; if ( GateOutPort ) { @@ -1599,14 +1653,15 @@ int GraphExecutor::InNode::Successed_SuccessAction() { } } if ( toNode && IsLoopNode() ) { - GraphBase::OutPort * fromLoopOutPort = GetChangeNodeOutPort(0) ; - if ( !fromLoopOutPort->BoolValue() ) { + GraphBase::OutPort * fromLoopOutPort = GetChangeNodeOutLoop() ; + if ( !fromLoopOutPort->BoolValue() ) { // Ne pas faire la boucle if ( strcmp( toNode->Name() , CoupledNode()->Name() ) ) { - IgnoreForEndLoop = true ; // toNode is the EndLoopNode + IgnoreForEndLoop = true ; } - else { + else { // toNode is the EndLoopNode GraphBase::InPort * toLoopInPort ; - toLoopInPort = toNode->GetChangeNodeInPort(1) ; +// toLoopInPort = toNode->GetChangeNodeInPort(1) ; + toLoopInPort = toNode->GetChangeNodeInLoop() ; if ( toLoopInPort->State() != SUPERV::ReadyState ) { toLoopInPort->State( SUPERV::ReadyState ) ; } @@ -1623,7 +1678,8 @@ int GraphExecutor::InNode::Successed_SuccessAction() { } if ( toNode && !IgnoreForEndLoop ) { if ( toNode && toNode->IsLoopNode() ) { - GraphBase::InPort * toLoopInPort = toNode->GetChangeNodeInPort(1) ; +// GraphBase::InPort * toLoopInPort = toNode->GetChangeNodeInPort(1) ; + GraphBase::InPort * toLoopInPort = toNode->GetChangeNodeInLoop() ; toLoopInPort->State( SUPERV::ReadyState ) ; GraphBase::OutPort * LoopOutPort = toLoopInPort->GetOutPort() ; LoopOutPort->PortStatus( DataConnected ); @@ -1696,6 +1752,7 @@ int GraphExecutor::InNode::Successed_SuccessAction() { << " Successed_SuccessAction pop firsttoNode " << SomeDataNodes.size() << " " << firsttoNode->Name() << endl ; firsttoNode->CreateNewThreadIf( false ) ; + firsttoNode->RewindStack( RewindStack() ) ; if ( firsttoNode->State() == SUPERV::SuccessedState ) { cdebug << pthread_self() << "/" << ThreadNo() << " " << Name() << " : " << firsttoNode->Name() << " " @@ -1946,10 +2003,10 @@ int GraphExecutor::InNode::SuspendedErrored_ReStartAndSuspendAction() { void GraphExecutor::InNode::InParametersSet( bool & Err , int nInParams , - ServicesAnyData * aListOfInParameters ) { + ServicesAnyData * InParametersList ) { int i ; for ( i = 0 ; i < nInParams ; i++ ) { - ServicesAnyData D = aListOfInParameters[i]; + ServicesAnyData D = InParametersList[i]; GraphBase::InPort * anInPort = GetChangeNodeInPort(i) ; GraphBase::OutPort * theOutPort = anInPort->GetOutPort() ; if ( anInPort->IsGate() && theOutPort == NULL ) { @@ -1957,7 +2014,6 @@ void GraphExecutor::InNode::InParametersSet( << anInPort->GetServicesParameter().Parametertype << " is inactive. " << anInPort->Kind() << endl ; } -// else if ( theOutPort->State() == SUPERV::ReadyState ) { else if ( anInPort->State() == SUPERV::ReadyState ) { if ( anInPort->IsGate() ) { CORBA::Any * anAny = new CORBA::Any() ; @@ -1965,42 +2021,136 @@ void GraphExecutor::InNode::InParametersSet( theOutPort->Value( anAny ) ; } anInPort->State( SUPERV::WaitingState ) ; -// const CORBA::Any * theValue = theOutPort->Value() ; D.Name = CORBA::string_dup( anInPort->GetServicesParameter().Parametername ) ; -// D.Value = *theValue ; // CORBA::Any - D.Value = *theOutPort->Value() ; // CORBA::Any cdebug << ThreadNo() << " ArgIn" << i << " " << anInPort->Kind() ; - cdebug << D.Name << " " << anInPort->GetServicesParameter().Parametertype - << " : " ; + cdebug << " " << D.Name << " " << anInPort->GetServicesParameter().Parametertype << " : " ; + D.Value = *theOutPort->Value() ; // CORBA::Any string _Type = CORBA::string_dup( anInPort->GetServicesParameter().Parametertype ) ; const char * Type = _Type.c_str() ; - switch (D.Value.type()->kind()) { + switch ( D.Value.type()->kind() ) { // { string , long , double , objref } case CORBA::tk_string: char * t; D.Value >>= t; - cdebug << t << " (string)" << endl ; + cdebug << t << " (string)" ; if ( !strcmp( Type , "string" ) ) { } - else if ( !strcmp( Type , "double" ) ) { - double d ; - sscanf( t , "%lf" , &d ) ; - D.Value <<= d ; - theOutPort->Value( D.Value ) ; + else if ( !strcmp( Type , "boolean" ) ) { + bool b ; + long d ; + sscanf( t , "%ld" , &d ) ; + b = (bool ) d ; + D.Value <<= (CORBA::Any::from_boolean ) b ; +// theOutPort->Value( D.Value ) ; + } + else if ( !strcmp( Type , "char" ) ) { + unsigned char c ; + long d ; + sscanf( t , "%ld" , &d ) ; + c = (short ) d ; + D.Value <<= (CORBA::Any::from_char ) c ; + cdebug << "string '" << t << "' --> " << d << " --> char " << c ; +// theOutPort->Value( D.Value ) ; } - else if ( !strcmp( Type , "long" ) || !strcmp( Type , "bool" ) ) { + else if ( !strcmp( Type , "short" ) ) { + short s ; + long d ; + sscanf( t , "%ld" , &d ) ; + s = (short ) d ; + D.Value <<= s ; + cdebug << "string '" << t << "' --> " << d << " --> short " << s ; +// theOutPort->Value( D.Value ) ; + } + else if ( !strcmp( Type , "int" ) || !strcmp( Type , "long" ) ) { long l ; sscanf( t , "%ld" , &l ) ; D.Value <<= l ; - theOutPort->Value( D.Value ) ; + cdebug << "string '" << t << " --> long " << l ; +// theOutPort->Value( D.Value ) ; + } + else if ( !strcmp( Type , "float" ) ) { + double d ; + sscanf( t , "%lf" , &d ) ; + float f = d ; + D.Value <<= f ; + cdebug << "string '" << t << "' --> " << setw(25) << setprecision(18) << d << " --> float " << " = " + << setw(25) << setprecision(18) << f ; +// theOutPort->Value( D.Value ) ; } - else if ( !strcmp( Type , "objref" ) ) { + else if ( !strcmp( Type , "double" ) ) { + double d ; + sscanf( t , "%lf" , &d ) ; + D.Value <<= d ; + cdebug << "string '" << t << " --> double " << setw(25) << setprecision(18) << d ; +// theOutPort->Value( D.Value ) ; + } +// else if ( !strcmp( Type , "objref" ) ) { + else { // Default CORBA::Object_ptr ObjRef ; - ObjRef = StringToObject( t ) ; - D.Value <<= ObjRef ; - theOutPort->Value( D.Value ) ; + try { + ObjRef = StringToObject( t ) ; + D.Value <<= ObjRef ; + } + catch( ... ) { + D.Value <<= CORBA::Object::_nil() ; + } +// theOutPort->Value( D.Value ) ; } - else { +// else { +// cdebug << " (other ERROR)" << endl ; +// } + cdebug << " --> call_kind " << D.Value.type()->kind() << endl ; + break; + case CORBA::tk_long: + long l; + D.Value >>= l; + cdebug << l << " (long)" << endl ; + if ( !strcmp( Type , "string" ) ) { + char t[40] ; + sprintf( t , "%ld" , l ) ; + D.Value <<= t ; +// theOutPort->Value( D.Value ) ; + } + else if ( !strcmp( Type , "boolean" ) ) { + bool b ; + b = (bool ) l ; + D.Value <<= (CORBA::Any::from_boolean ) b ; +// theOutPort->Value( D.Value ) ; + } + else if ( !strcmp( Type , "char" ) ) { + unsigned char c ; + c = (unsigned char ) l ; + D.Value <<= (CORBA::Any::from_char ) c ; +// theOutPort->Value( D.Value ) ; } + else if ( !strcmp( Type , "short" ) ) { + short s ; + s = (short ) l ; + D.Value <<= s ; +// theOutPort->Value( D.Value ) ; + } + else if ( !strcmp( Type , "int" ) || !strcmp( Type , "long" ) ) { + } + else if ( !strcmp( Type , "float" ) ) { + float f ; + f = (float ) l ; + D.Value <<= f ; +// theOutPort->Value( D.Value ) ; + } + else if ( !strcmp( Type , "double" ) ) { + double d ; + d = (double ) l ; + D.Value <<= d ; +// theOutPort->Value( D.Value ) ; + } +// else if ( !strcmp( Type , "objref" ) ) { + else { // Default + D.Value <<= CORBA::Object::_nil() ; +// theOutPort->Value( D.Value ) ; + } +// else { +// cdebug << " (other ERROR)" << endl ; +// } + cdebug << " --> call_kind " << D.Value.type()->kind() << endl ; break; case CORBA::tk_double: double d; @@ -2008,64 +2158,122 @@ void GraphExecutor::InNode::InParametersSet( cdebug << d << " (double)" << endl ; if ( !strcmp( Type , "string" ) ) { char t[40] ; - sprintf( t , "lf" , d ) ; + sprintf( t , "%lf" , d ) ; D.Value <<= t ; - theOutPort->Value( D.Value ) ; +// theOutPort->Value( D.Value ) ; } - else if ( !strcmp( Type , "double" ) ) { + else if ( !strcmp( Type , "boolean" ) ) { + bool b ; + b = (bool ) d ; + D.Value <<= (CORBA::Any::from_boolean ) b ; +// theOutPort->Value( D.Value ) ; + } + else if ( !strcmp( Type , "char" ) ) { + unsigned char c ; + c = (unsigned char ) d ; + D.Value <<= (CORBA::Any::from_char ) c ; +// theOutPort->Value( D.Value ) ; } - else if ( !strcmp( Type , "long" ) || !strcmp( Type , "bool" ) ) { + else if ( !strcmp( Type , "short" ) ) { + short s ; + s = (short ) d ; + D.Value <<= s ; +// theOutPort->Value( D.Value ) ; + } + else if ( !strcmp( Type , "int" ) || !strcmp( Type , "long" ) ) { long l ; l = (long ) d ; D.Value <<= l ; - theOutPort->Value( D.Value ) ; +// theOutPort->Value( D.Value ) ; } - else if ( !strcmp( Type , "objref" ) ) { + else if ( !strcmp( Type , "float" ) ) { + float f ; + f = (float ) d ; + D.Value <<= f ; +// theOutPort->Value( D.Value ) ; } - else { + else if ( !strcmp( Type , "double" ) ) { } +// else if ( !strcmp( Type , "objref" ) ) { + else { // Default + D.Value <<= CORBA::Object::_nil() ; +// theOutPort->Value( D.Value ) ; + } +// else { +// cdebug << " (other ERROR)" << endl ; +// } + cdebug << " --> call_kind " << D.Value.type()->kind() << endl ; break; - case CORBA::tk_long: - long l; - D.Value >>= l; - cdebug << l << " (long)" << endl ; + case CORBA::tk_objref: if ( !strcmp( Type , "string" ) ) { - char t[40] ; - sprintf( t , "lf" , l ) ; - D.Value <<= t ; - theOutPort->Value( D.Value ) ; + CORBA::Object_ptr ObjRef ; + char * retstr ; + try { + D.Value >>= ObjRef ; + retstr = ObjectToString( ObjRef ) ; + D.Value <<= retstr ; +// theOutPort->Value( D.Value ) ; + } + catch( ... ) { + if ( i != 0 ) { + Err = true ; + } + cdebug << "ToString( object ) Catched ERROR" << endl ; + } } - else if ( !strcmp( Type , "double" ) ) { - double d ; - d = l ; - D.Value <<= d ; - theOutPort->Value( D.Value ) ; + else if ( !strcmp( Type , "boolean" ) ) { + bool b = 0 ; + D.Value <<= (CORBA::Any::from_boolean ) b ; +// theOutPort->Value( D.Value ) ; } - else if ( !strcmp( Type , "long" ) || !strcmp( Type , "bool" ) ) { + else if ( !strcmp( Type , "char" ) ) { + unsigned char c = 0 ; + D.Value <<= (CORBA::Any::from_char ) c ; +// theOutPort->Value( D.Value ) ; } - else if ( !strcmp( Type , "objref" ) ) { + else if ( !strcmp( Type , "short" ) ) { + short s = 0 ; + D.Value <<= s ; +// theOutPort->Value( D.Value ) ; } - else { + else if ( !strcmp( Type , "int" ) || !strcmp( Type , "long" ) ) { + long l = 0 ; + D.Value <<= l ; +// theOutPort->Value( D.Value ) ; } - break; - case CORBA::tk_objref: - CORBA::Object_ptr obj ; - char * retstr ; - try { - D.Value >>= obj ; -// retstr = _Orb->object_to_string(obj ); - retstr = ObjectToString( obj ) ; - cdebug << retstr << endl ; + else if ( !strcmp( Type , "float" ) ) { + float f = 0 ; + D.Value <<= f ; +// theOutPort->Value( D.Value ) ; } - catch( ... ) { - if ( i != 0 ) { - Err = true ; - } - cdebug << "ToString( object ) Catched ERROR" << endl ; + else if ( !strcmp( Type , "double" ) ) { + double d = 0 ; + D.Value <<= d ; +// theOutPort->Value( D.Value ) ; } +// else if ( !strcmp( Type , "objref" ) ) { + else { // Default + CORBA::Object_ptr obj ; + char * retstr ; + try { + D.Value >>= obj ; + retstr = ObjectToString( obj ) ; + cdebug << retstr << endl ; + } + catch( ... ) { + if ( i != 0 ) { + Err = true ; + } + cdebug << "ToString( object ) Catched ERROR" << endl ; + } + } +// else { +// cdebug << " (other ERROR)" << endl ; +// } + cdebug << " --> call_kind " << D.Value.type()->kind() << endl ; break; default: - cdebug << " (other ERROR)" << endl ; + cdebug << " (other ERROR) " << D.Value.type()->kind() << endl ; } } else { @@ -2076,16 +2284,16 @@ void GraphExecutor::InNode::InParametersSet( << anInPort->GetServicesParameter().Parametername << endl ; Err = true ; } - aListOfInParameters[i] = D ; + InParametersList[i] = D ; } } -void GraphExecutor::InNode::InOutParameters( +void GraphExecutor::InNode::InOutParametersSet( int nOutParams , - ServicesAnyData * aListOfOutParameters ) { + ServicesAnyData * OutParametersList ) { int i ; for ( i = 0 ; i < nOutParams ; i++ ) { - ServicesAnyData D = aListOfOutParameters[i] ; + ServicesAnyData D = OutParametersList[i] ; D.Name = GetChangeNodeOutPort(i)->GetServicesParameter().Parametername; string _Type = CORBA::string_dup(GetChangeNodeOutPort(i)->GetServicesParameter().Parametertype) ; @@ -2096,190 +2304,321 @@ void GraphExecutor::InNode::InOutParameters( if ( !strcmp( Type , "string" ) ) { D.Value <<= (char *) NULL ; } - else if ( !strcmp( Type , "double" ) ) { - D.Value <<= 0. ; + else if ( !strcmp( Type , "boolean" ) ) { + bool b = 0 ; + D.Value <<= (CORBA::Any::from_boolean ) b ; + } + else if ( !strcmp( Type , "char" ) ) { + unsigned char c = 0 ; + D.Value <<= (CORBA::Any::from_char ) c ; + } + else if ( !strcmp( Type , "short" ) ) { + short s = 0 ; + D.Value <<= s ; } - else if ( !strcmp( Type , "long" ) || !strcmp( Type , "bool" ) ) { + else if ( !strcmp( Type , "int" ) || !strcmp( Type , "long" ) ) { D.Value <<= (long ) 0 ; } + else if ( !strcmp( Type , "float" ) ) { + float f = 0 ; + D.Value <<= f ; + } + else if ( !strcmp( Type , "double" ) ) { + double d = 0 ; + D.Value <<= d ; + } else { -// D.Value.replace(CORBA::_tc_Object, NULL); D.Value <<= CORBA::Object::_nil() ; } -// GetChangeNodeOutPort(i)->Value( D.Value ) ; //#if 0 - switch (D.Value.type()->kind()) { + switch (D.Value.type()->kind()) { // { string , long , double , objref } case CORBA::tk_string: char * t; D.Value >>= t; cdebug << ThreadNo() << " " << t << "(string)" << endl ; break; - case CORBA::tk_double: - double d; - D.Value >>= d; - cdebug << ThreadNo() << " " << d << "(double)" << endl ; + case CORBA::tk_boolean: + bool b ; + D.Value >>= (CORBA::Any::to_boolean ) b; + cdebug << ThreadNo() << " " << b << "(boolean)" << endl ; + break; + case CORBA::tk_char: + unsigned char c ; + D.Value >>= (CORBA::Any::to_char ) c; + cdebug << ThreadNo() << " " << c << "(char)" << endl ; + break; + case CORBA::tk_short: + short s; + D.Value >>= s; + cdebug << ThreadNo() << " " << s << "(short)" << endl ; break; case CORBA::tk_long: long l; D.Value >>= l; cdebug << ThreadNo() << " " << l << "(long)" << endl ; break; + case CORBA::tk_float: + float f; + D.Value >>= f; + cdebug << ThreadNo() << " " << f << "(float)" << endl ; + break; + case CORBA::tk_double: + double d; + D.Value >>= d; + cdebug << ThreadNo() << " " << d << "(double)" << endl ; + break; case CORBA::tk_objref: - cdebug << ThreadNo() << " " << "(object)" << endl ; + try { + CORBA::Object_ptr obj ; + char * retstr ; + D.Value >>= obj ; + retstr = ObjectToString( obj ) ; + cdebug << ThreadNo() << retstr << endl ; + } + catch( ... ) { + cdebug << "ToString( object ) Catched ERROR" << endl ; + } break; default: cdebug << ThreadNo() << " " << "(other ERROR)" << endl ; } //#endif - aListOfOutParameters[i] = D ; + OutParametersList[i] = D ; } } -bool GraphExecutor::InNode::OutParameters( +bool GraphExecutor::InNode::OutParametersSet( bool Err , SUPERV::GraphState NewState , int nOutParams , - ServicesAnyData * aListOfOutParameters ) { + ServicesAnyData * OutParametersList ) { bool RetVal = true ; int i ; GraphBase::OutPort * aGateOutPort = NULL ; bool OrSwitch = false ; - GraphBase::OutPort * anOutPort = GetChangeNodeOutPort(0) ; - for ( i = 0 ; i < nOutParams ; i++ ) { - anOutPort = GetChangeNodeOutPort(i) ; - if ( Err ) { - anOutPort->State( NewState ) ; - anOutPort->Done( true ) ; - } - else { - cdebug << ThreadNo() << " " << "Out" << i << " " << Name() << " " - << anOutPort->PortName() << " " << anOutPort->Kind() ; - if ( anOutPort->IsGate() ) { - aGateOutPort = anOutPort ; - cdebug << " Gate " ; - long l = 1; - aListOfOutParameters[i].Value <<= l; - anOutPort->Value( aListOfOutParameters[i].Value ); - } - else if ( anOutPort->IsLoop() ) { - cdebug << " Loop " ; - anOutPort->Value( aListOfOutParameters[i].Value ); -// InLoop Port of EndLoopNode is ready : - anOutPort->ChangeInPorts(0)->State( SUPERV::ReadyState ) ; - } - else if ( anOutPort->IsSwitch() ) { - cdebug << " Switch " ; - anOutPort->Value( aListOfOutParameters[i].Value ); - if ( anOutPort->InPortsSize() && anOutPort->ChangeInPorts( 0 )->IsGate() ) { - if ( OrSwitch && anOutPort->BoolValue() ) { - cdebug << "GraphExecutor::InNodeThreads::OutParameters more than one switch is true WARNING" - << endl ; -// RetVal = false ; - } - else { - OrSwitch = OrSwitch | anOutPort->BoolValue() ; - } - } - cdebug << "OrSwitch " << OrSwitch ; + if ( nOutParams ) { + GraphBase::OutPort * anOutPort ; + for ( i = 0 ; i < nOutParams ; i++ ) { + anOutPort = GetChangeNodeOutPort(i) ; + if ( Err ) { + anOutPort->State( NewState ) ; + anOutPort->Done( true ) ; } else { - cdebug << " Param " ; - anOutPort->Value( aListOfOutParameters[i].Value ); - } -// else if ( anOutPort->IsBus() ) { -// cdebug << " Bus " ; -// anOutPort->Value( GetNodeInPort( anOutPort->PortIndex() )->GetOutPort()->Value() ); -// } - anOutPort->State( NewState ) ; - anOutPort->Done( true ) ; - int j ; - for ( j = 0 ; j < anOutPort->InPortsSize() ; j++ ) { - bool fromGOTO = false ; - GraphBase::OutPort * aGOTOPort = _OutNode->GetChangeGraphNode( anOutPort->ChangeInPorts( j )->NodeName() )->GetChangeNodeInPort( 0 )->GetOutPort() ; - if ( aGOTOPort ) { - fromGOTO = aGOTOPort->IsGOTO() ; + cdebug << ThreadNo() << " " << "Out" << i << " " << Name() << " " + << anOutPort->PortName() << " " << anOutPort->Kind() ; + ServicesAnyData D = OutParametersList[i] ; + switch (D.Value.type()->kind()) { // { string , long , double , objref } + case CORBA::tk_string: { + char * t; + D.Value >>= t; + cdebug << ThreadNo() << " " << t << "(string)" << endl ; + break; } - 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 ) ; + case CORBA::tk_boolean: { + bool b ; + D.Value >>= (CORBA::Any::to_boolean ) b; + long l = (long ) b ; + D.Value <<= l ; + cdebug << ThreadNo() << " " << b << "(boolean)" << endl ; + break; } - 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 ; + case CORBA::tk_char: { + unsigned char c ; + D.Value >>= (CORBA::Any::to_char ) c; + long l = (long ) c ; + D.Value <<= l ; + cdebug << ThreadNo() << " " << c << "(char)" << endl ; + break; } - } -#if 0 - switch (anOutPort->Value()->type()->kind()) { - case CORBA::tk_string: - char * t; - (*anOutPort->Value()) >>= t; - cdebug << ThreadNo() << " Out" << i << " : " << t << "(string)" << endl ; - break; - case CORBA::tk_double: - double d; - (*anOutPort->Value()) >>= d; - cdebug << ThreadNo() << " Out" << i << " : " << d << "(double)" << endl ; - break; - case CORBA::tk_long: - long l; - (*anOutPort->Value()) >>= l; - cdebug << ThreadNo() << " Out" << i << " : " << l << "(long)" << endl ; - break; - case CORBA::tk_objref: - CORBA::Object_ptr obj ; - char * retstr ; - try { - (*anOutPort->Value()) >>= obj ; - retstr = _Orb->object_to_string(obj ); - cdebug << ThreadNo() << " Out" << i << " : " << "ToString( object ) " - << retstr << endl ; + case CORBA::tk_short: { + short s; + D.Value >>= s; + long l = (long ) s ; + D.Value <<= l ; + cdebug << ThreadNo() << " " << s << "(short)" << endl ; + break; } - catch ( ... ) { - cdebug << ThreadNo() << " Out" << i << " : " << "ToString( object ) " - << "Catched ERROR" << endl ; + case CORBA::tk_long: { + long l; + D.Value >>= l; + cdebug << ThreadNo() << " " << l << "(long)" << endl ; + break; } - break; - default: - cdebug << ThreadNo() << " Out" << i << " : " << "(other ERROR)" << endl ; - RetVal = false ; + case CORBA::tk_float: { + float f; + D.Value >>= f; + double d = (double ) f ; + D.Value <<= d ; + cdebug << ThreadNo() << " " << f << "(float)" << endl ; + break; + } + case CORBA::tk_double: { + double d; + D.Value >>= d; + cdebug << ThreadNo() << " " << d << "(double)" << endl ; + break; + } + case CORBA::tk_objref: { + try { + CORBA::Object_ptr obj ; + char * retstr ; + D.Value >>= obj ; + retstr = ObjectToString( obj ) ; + cdebug << ThreadNo() << retstr << endl ; + } + catch( ... ) { + cdebug << "ToString( object ) Catched ERROR" << endl ; + } + break; + } + default: { + cdebug << ThreadNo() << " " << "(other ERROR)" << endl ; + } + } + OutParametersList[i] = D ; + if ( anOutPort->IsGate() ) { + aGateOutPort = anOutPort ; + cdebug << " Gate " ; + long l = 1; + OutParametersList[i].Value <<= l; + anOutPort->Value( OutParametersList[i].Value ); + } + else if ( anOutPort->IsLoop() ) { + cdebug << " Loop " ; + anOutPort->Value( OutParametersList[i].Value ); +// InLoop Port of EndLoopNode is ready : + anOutPort->ChangeInPorts(0)->State( SUPERV::ReadyState ) ; + } + else if ( anOutPort->IsSwitch() ) { + cdebug << " Switch " ; + anOutPort->Value( OutParametersList[i].Value ); + if ( anOutPort->InPortsSize() && anOutPort->ChangeInPorts( 0 )->IsGate() ) { + if ( OrSwitch && anOutPort->BoolValue() ) { + cdebug << "GraphExecutor::InNodeThreads::OutParameters more than one switch is true WARNING" + << endl ; + } + else { + OrSwitch = OrSwitch | anOutPort->BoolValue() ; + } + } + cdebug << "OrSwitch " << OrSwitch ; + } + else { + cdebug << " Param " ; + anOutPort->Value( OutParametersList[i].Value ); + } + anOutPort->State( NewState ) ; + anOutPort->Done( true ) ; + int j ; + for ( j = 0 ; j < anOutPort->InPortsSize() ; j++ ) { + bool fromGOTO = false ; + GraphBase::OutPort * aGOTOPort = _OutNode->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 ) ; + } + 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 + switch (anOutPort->Value()->type()->kind()) { + case CORBA::tk_string: + char * t; + (*anOutPort->Value()) >>= t; + cdebug << ThreadNo() << " Out" << i << " : " << t << "(string)" << endl ; + break; + case CORBA::tk_boolean: + bool b ; + (*anOutPort->Value()) >>= (CORBA::Any::to_boolean ) b; + cdebug << ThreadNo() << " Out" << i << " : " << b << "(boolean)" << endl ; + break; + case CORBA::tk_char: + unsigned char c ; + (*anOutPort->Value()) >>= (CORBA::Any::to_char ) c; + cdebug << ThreadNo() << " Out" << i << " : " << c << "(char)" << endl ; + break; + case CORBA::tk_short: + short s; + (*anOutPort->Value()) >>= s; + cdebug << ThreadNo() << " Out" << i << " : " << s << "(short)" << endl ; + break; + case CORBA::tk_long: + long l; + (*anOutPort->Value()) >>= l; + cdebug << ThreadNo() << " Out" << i << " : " << l << "(long)" << endl ; + break; + case CORBA::tk_float: + float f; + (*anOutPort->Value()) >>= f; + cdebug << ThreadNo() << " Out" << i << " : " << f << "(float)" << endl ; + break; + case CORBA::tk_double: + double d; + (*anOutPort->Value()) >>= d; + cdebug << ThreadNo() << " Out" << i << " : " << d << "(double)" << endl ; + break; + case CORBA::tk_objref: + CORBA::Object_ptr obj ; + char * retstr ; + try { + (*anOutPort->Value()) >>= obj ; + retstr = ObjectToString( obj ); + cdebug << ThreadNo() << " Out" << i << " : " << "ToString( object ) " + << retstr << endl ; + } + catch ( ... ) { + cdebug << ThreadNo() << " Out" << i << " : " << "ToString( object ) " + << "Catched ERROR" << endl ; + } + break; + default: + cdebug << ThreadNo() << " Out" << i << " : " << "(other ERROR)" << endl ; + RetVal = false ; + } +//#endif } -#endif - } - } - if ( aGateOutPort && IsSwitchNode() ) { - if ( OrSwitch ) { - cdebug << ThreadNo() << " " << "Out0 " << Name() << " Close of " - << aGateOutPort->PortName() << " " << aGateOutPort->Kind() ; - long l = 0; - aListOfOutParameters[0].Value <<= l ; - aGateOutPort->Value( aListOfOutParameters[0].Value ) ; } - else { - cdebug << ThreadNo() << " " << "Out0 " << Name() << " Open of " - << aGateOutPort->PortName() << " " << aGateOutPort->Kind() ; - long l = 1; - aListOfOutParameters[0].Value <<= l ; - aGateOutPort->Value( aListOfOutParameters[0].Value ) ; - int i ; - for ( i = 0 ; i < GetNodeOutPortsSize() ; i++ ) { - GraphBase::InPort * anInPort ; - anInPort = CoupledNode()->GetChangeInPort( GetNodeOutPort( i )->PortName() ) ; - if ( anInPort ) { - anInPort->ChangeOutPort( GetChangeNodeOutPort( i ) ) ; - } + if ( aGateOutPort && IsSwitchNode() ) { + if ( OrSwitch ) { +// cdebug << ThreadNo() << " " << "Out0 " << Name() << " Close of " +// << aGateOutPort->PortName() << " " << aGateOutPort->Kind() ; + long l = 0; + OutParametersList[0].Value <<= l ; + aGateOutPort->Value( OutParametersList[0].Value ) ; + } + else { +// cdebug << ThreadNo() << " " << "Out0 " << Name() << " Open of " +// << aGateOutPort->PortName() << " " << aGateOutPort->Kind() ; + long l = 1; + OutParametersList[0].Value <<= l ; + aGateOutPort->Value( OutParametersList[0].Value ) ; + int i ; + for ( i = 0 ; i < GetNodeOutPortsSize() ; i++ ) { + GraphBase::InPort * anInPort ; + anInPort = CoupledNode()->GetChangeInPort( GetNodeOutPort( i )->PortName() ) ; + if ( anInPort ) { + anInPort->ChangeOutPort( GetChangeNodeOutPort( i ) ) ; + } + } } } } diff --git a/src/GraphExecutor/DataFlowExecutor_OutNode.cxx b/src/GraphExecutor/DataFlowExecutor_OutNode.cxx index 5f30b89..1d8705d 100644 --- a/src/GraphExecutor/DataFlowExecutor_OutNode.cxx +++ b/src/GraphExecutor/DataFlowExecutor_OutNode.cxx @@ -1,11 +1,32 @@ +// SUPERV GraphExecutor : contains classes that permit execution of graphs and particularly the execution automaton +// +// 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 : DataFlowBase_OutNode.cxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: + using namespace std; -//============================================================================= -// File : DataFlowBase_OutNode.cxx -// Created : 2002 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= #include "DataFlowExecutor_OutNode.hxx" @@ -13,7 +34,7 @@ using namespace std; extern GraphExecutor::FiniteStateMachine * theAutomaton ; -static const char *ComponentName = "SalomeSuperVisionComponent" ; +// static const char *ComponentName = "SalomeSuperVisionComponent" ; extern int _ArgC ; extern char ** _ArgV ; @@ -28,6 +49,7 @@ GraphExecutor::OutNode::OutNode() : _State = SUPERV::UnKnownState ; _PyInitialized = false ; pthread_mutex_init( &_MutexWait , NULL ) ; + pthread_mutex_init( &_PyMutexWait , NULL ) ; if ( pthread_cond_init( &_EventWait , NULL ) ) { perror("pthread_cond_init( &_EventWait , NULL )") ; exit( 0 ) ; @@ -53,6 +75,7 @@ GraphExecutor::OutNode::OutNode( CORBA::ORB_ptr ORB, _PyInitialized = false ; _Orb = CORBA::ORB::_duplicate( ORB ) ; pthread_mutex_init( &_MutexWait , NULL ) ; + pthread_mutex_init( &_PyMutexWait , NULL ) ; if ( pthread_cond_init( &_EventWait , NULL ) ) { perror("pthread_cond_init( &_EventWait , NULL )") ; exit( 0 ) ; @@ -93,6 +116,7 @@ GraphExecutor::OutNode::OutNode( _PyInitialized = false ; _Orb = CORBA::ORB::_duplicate( ORB ) ; pthread_mutex_init( &_MutexWait , NULL ) ; + pthread_mutex_init( &_PyMutexWait , NULL ) ; if ( pthread_cond_init( &_EventWait , NULL ) ) { perror("pthread_cond_init( &_EventWait , NULL )") ; exit( 0 ) ; @@ -178,7 +202,7 @@ bool GraphExecutor::OutNode::LoadNodes(const GraphBase::ListOfNodes &aListOfNode GraphExecutor::InNode * anInNode ; cdebug << "GraphExecutor::OutNode::LoadNodes" << endl ; int i ; - for ( i = 0 ; i < aListOfNodes.size() ; i++ ) { + for ( i = 0 ; i < (int ) aListOfNodes.size() ; i++ ) { GraphBase::SNode aNode = aListOfNodes[ i ] ; anInNode = AddNode( aNode.theService , aNode.theListOfFuncName , @@ -234,7 +258,7 @@ bool GraphExecutor::OutNode::LoadNodes(const GraphBase::ListOfNodes &aListOfNode } #endif } - for ( i = 0 ; i < aListOfNodes.size() ; i++ ) { + for ( i = 0 ; i < (int ) aListOfNodes.size() ; i++ ) { GraphBase::SNode aNode = aListOfNodes[ i ] ; anInNode = (GraphExecutor::InNode * ) GetChangeGraphNode( aNode.theName.c_str() )->GetInNode() ; cdebug << "GraphExecutor::OutNode::LoadNodes " << anInNode->Name() << "IsOneOfGOTONodes " @@ -253,7 +277,7 @@ bool GraphExecutor::OutNode::LoadLinks(const GraphBase::ListOfLinks &aListOfLink cdebug << "GraphExecutor::OutNode::LoadLinks " << aListOfLinks.size() << endl ; int i ; - for ( i = 0 ; i < aListOfLinks.size() ; i++ ) { + for ( i = 0 ; i < (int ) aListOfLinks.size() ; i++ ) { GraphBase::SLink aLink = aListOfLinks[ i ] ; RetVal = AddLink( aLink.FromNodeName.c_str() , aLink.FromServiceParameterName.c_str() , @@ -272,7 +296,7 @@ bool GraphExecutor::OutNode::LoadDatas(const GraphBase::ListOfLinks &aListOfData cdebug << "GraphExecutor::OutNode::LoadDatas " << aListOfDatas.size() << endl ; int i ; - for ( i = 0 ; i < aListOfDatas.size() ; i++ ) { + for ( i = 0 ; i < (int ) aListOfDatas.size() ; i++ ) { GraphBase::SLink aLink = aListOfDatas[ i ] ; if ( !strcmp( aLink.FromNodeName.c_str() , Name() ) ) RetVal = GraphBase::Graph::AddInputData( aLink.ToNodeName.c_str() , @@ -354,7 +378,10 @@ bool GraphExecutor::OutNode::Valid() { _Executable = false ; - CreateService() ; + if ( !CreateService() ) { + cdebug << "This DataFlow has invalid type(s)." << endl ; + return false ; + } if ( !Sort() ) { cdebug << "This DataFlow is not valid." << endl ; @@ -437,14 +464,14 @@ bool GraphExecutor::OutNode::Run( const bool AndSuspend ) { anInNode->State( SUPERV::DataWaitingState ) ; anInNode->ControlState( SUPERV::ToSuspendStartState ) ; if ( !anInNode->SendEvent( GraphExecutor::SomeDataReadyEvent ) ) { - cdebug << "InNode::SendEvent( SomeDataReadyEvent ) Node " + cdebug << "InNode::SendEvent( SomeDataReadyEvent ) ERROR Node " << anInNode->Name() << endl ; return false ; } anInNode->SuspendedWait() ; } else if ( !anInNode->SendEvent( GraphExecutor::ExecuteEvent ) ) { - cdebug << "InNode::SendEvent( RunningEvent ) Node " + cdebug << "InNode::SendEvent( ExecuteEvent ) ERROR Node " << anInNode->Name() << endl ; return false ; } @@ -551,6 +578,11 @@ void GraphExecutor::OutNode::CheckAllDone() { << " GraphAutomatonState " << theAutomaton->StateName( AutomatonState() ) << " State " << State() << " Threads " << _Threads << " SuspendedThreads " << _SuspendedThreads << endl ; + if ( _Done ) { + MESSAGE("================================================================================") ; + MESSAGE( Name() << " IS DONE" ) ; + MESSAGE("================================================================================") ; + } } void GraphExecutor::OutNode::PThreadLock( pthread_mutex_t * aMutex , char * errmsg ) { @@ -579,22 +611,22 @@ void GraphExecutor::OutNode::PThreadUnLock( pthread_mutex_t * aMutex , char * er } } -void GraphExecutor::OutNode::PThreadLock() { - cout << " GraphExecutor::OutNode::PThreadLock " << pthread_self() << endl ; - if ( pthread_mutex_lock( &_MutexWait ) ) { - perror( "GraphExecutor::OutNode::PThreadLock" ) ; +void GraphExecutor::OutNode::PyThreadLock() { +// cout << " GraphExecutor::OutNode::PyThreadLock " << pthread_self() << endl ; + if ( pthread_mutex_lock( &_PyMutexWait ) ) { + perror( "GraphExecutor::OutNode::PyThreadLock" ) ; exit( 0 ) ; } - cout << " GraphExecutor::OutNode::PThreadLocked " << pthread_self() << endl ; +// cout << " GraphExecutor::OutNode::PyThreadLocked " << pthread_self() << endl ; } -void GraphExecutor::OutNode::PThreadUnLock() { - cout << " GraphExecutor::OutNode::PThreadUnLock " << pthread_self() << endl ; - if ( pthread_mutex_unlock( &_MutexWait ) ) { - perror( "GraphExecutor::OutNode::PThreadUnLock" ) ; +void GraphExecutor::OutNode::PyThreadUnLock() { +// cout << " GraphExecutor::OutNode::PyThreadUnLock " << pthread_self() << endl ; + if ( pthread_mutex_unlock( &_PyMutexWait ) ) { + perror( "GraphExecutor::OutNode::PyThreadUnLock" ) ; exit( 0 ) ; } - cout << " GraphExecutor::OutNode::PThreadUnLocked " << pthread_self() << endl ; +// cout << " GraphExecutor::OutNode::PyThreadUnLocked " << pthread_self() << endl ; } void GraphExecutor::OutNode::NewThread() { @@ -1008,13 +1040,22 @@ bool GraphExecutor::OutNode::PushEvent( GraphExecutor::InNode * aNode , } // cdebug_out << "PushEvent Threads " << Threads() << " SuspendedThreads " // << SuspendedThreads() << endl ; + if ( _EventNodes.size() > 101 ) { + while ( _EventNodes.size() > 31 ) { + _EventNodes.pop_front() ; + _Events.pop_front() ; + _States.pop_front() ; + } + } if ( pthread_mutex_unlock( &_MutexWait ) ) { perror("PushEvent pthread_mutex_unlock ") ; exit( 0 ) ; } + return true ; } bool GraphExecutor::OutNode::StateWait( SUPERV::GraphState aState ) { + return false ; } bool GraphExecutor::OutNode::Event( char ** aNodeName , @@ -1038,7 +1079,7 @@ bool GraphExecutor::OutNode::Event( char ** aNodeName , anEvent = SUPERV::UndefinedEvent ; aState = SUPERV::UndefinedState ; if ( ( IsDone() || IsKilled() || IsStopped() ) && _EventNodes.size() == 0 ) { - cdebug << "EventLoop IsDone()/IsKilled()/IsStopped() && _EventNodes.size() == 0" << endl ; +// cdebug << "EventLoop IsDone()/IsKilled()/IsStopped() && _EventNodes.size() == 0" << endl ; RetVal = false ; } else if ( !WithWait && _EventNodes.size() == 0 ) { @@ -1048,10 +1089,10 @@ bool GraphExecutor::OutNode::Event( char ** aNodeName , } else if ( RetVal ) { while ( !IsSuspended() && _EventNodes.size() == 0 ) { - cdebug << "EventLoop pthread_cond_wait _EventWait" << endl ; +// cdebug << "EventLoop pthread_cond_wait _EventWait" << endl ; pthread_cond_wait( &_EventWait , &_MutexWait ); - cdebug << "EventLoop pthread_cond_waited _EventWait" - << " _EventNodes.size() " << _EventNodes.size() << endl ; +// cdebug << "EventLoop pthread_cond_waited _EventWait" +// << " _EventNodes.size() " << _EventNodes.size() << endl ; } if ( _EventNodes.size() ) { ThreadsNumber = Threads() ; @@ -1070,11 +1111,11 @@ bool GraphExecutor::OutNode::Event( char ** aNodeName , RetVal = false ; } if ( anEvent != SUPERV::NoEvent ) { - cdebug << pthread_self() << "EventLoop " - << NodeName << " " << theAutomaton->StateName( theState ) - << " _EventNodes.size() " << _EventNodes.size() - << " Threads " << Threads() << " SuspendedThreads " - << SuspendedThreads() << " RetVal " << RetVal << endl ; +// cdebug << pthread_self() << "EventLoop " +// << NodeName << " " << theAutomaton->StateName( theState ) +// << " _EventNodes.size() " << _EventNodes.size() +// << " Threads " << Threads() << " SuspendedThreads " +// << SuspendedThreads() << " RetVal " << RetVal << endl ; } if ( pthread_mutex_unlock( &_MutexWait ) ) { perror("EventLoop pthread_mutex_lock ") ; @@ -1250,8 +1291,8 @@ SUPERV::GraphState GraphExecutor::OutNode::State( const char * NodeName ) { GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *)aCNode->GetInNode() ; if ( anInNode ) { aret = anInNode->State() ; - cdebug << "GraphExecutor::OutNode::State( " << NodeName << " ) " - << theAutomaton->StateName( AutomatonGraphState( aret ) ) << endl ; +// cdebug << "GraphExecutor::OutNode::State( " << NodeName << " ) " +// << theAutomaton->StateName( AutomatonGraphState( aret ) ) << endl ; } } // cdebug_out << "GraphExecutor::OutNode::State" << endl ; @@ -1491,12 +1532,22 @@ bool GraphExecutor::OutNode::Suspend() { } State( SUPERV::SuspendedState ) ; cdebug_out << "GraphExecutor::OutNode::Suspend" << endl ; + if ( RetVal ) { + MESSAGE("================================================================================") ; + MESSAGE( Name() << " IS SUSPENDED" ) ; + MESSAGE("================================================================================") ; + } return RetVal ; } bool GraphExecutor::OutNode::Resume() { bool RetVal = false ; cdebug_in << "GraphExecutor::OutNode::Resume" << endl; cdebug_out << "GraphExecutor::OutNode::Resume" << endl ; + if ( RetVal ) { + MESSAGE("================================================================================") ; + MESSAGE( Name() << " IS RESUMED" ) ; + MESSAGE("================================================================================") ; + } return RetVal ; } @@ -1532,6 +1583,11 @@ bool GraphExecutor::OutNode::Kill() { } State( SUPERV::KilledState ) ; cdebug_out << "GraphExecutor::OutNode::Kill" << endl ; + if ( RetVal ) { + MESSAGE("================================================================================") ; + MESSAGE( Name() << " IS KILLED" ) ; + MESSAGE("================================================================================") ; + } return RetVal ; } @@ -1540,6 +1596,11 @@ bool GraphExecutor::OutNode::Stop() { cdebug_in << "GraphExecutor::OutNode::Stop" << endl; Kill() ; cdebug_out << "GraphExecutor::OutNode::Stop" << endl ; + if ( RetVal ) { + MESSAGE("================================================================================") ; + MESSAGE( Name() << " IS STOPPED" ) ; + MESSAGE("================================================================================") ; + } return RetVal ; } bool GraphExecutor::OutNode::ReRun() { @@ -1610,7 +1671,7 @@ bool GraphExecutor::OutNode::DoneWait() { exit( 0 ) ; } aret = IsDone() ; - while ( !aret && !IsSuspended() ) { + while ( !aret && !IsSuspended() && IsRunning() ) { cdebug << "DoneWait pthread_cond_wait _EventWait" << endl; pthread_cond_wait( &_EventWait , &_MutexWait ); aret = IsDone() ; @@ -1706,9 +1767,8 @@ long GraphExecutor::OutNode::LastLevelDone() { } -const CORBA::Any *GraphExecutor::OutNode::GetInData( - const char * NodeName , - const char * ServiceParameterName ) { +const CORBA::Any *GraphExecutor::OutNode::GetInData( const char * NodeName , + const char * ServiceParameterName ) { // cdebug_in << "GraphExecutor::OutNode::GetInData " << NodeName << " " // << ServiceParameterName << endl ; const CORBA::Any * retdata = PortInData( NodeName , ServiceParameterName ) ; @@ -1716,9 +1776,8 @@ const CORBA::Any *GraphExecutor::OutNode::GetInData( return retdata ; } -const CORBA::Any *GraphExecutor::OutNode::GetOutData( - const char * NodeName , - const char * ServiceParameterName ) { +const CORBA::Any *GraphExecutor::OutNode::GetOutData( const char * NodeName , + const char * ServiceParameterName ) { // cdebug_in << "GraphExecutor::OutNode::GetOutData " << NodeName << " " // << ServiceParameterName << endl ; const CORBA::Any * retdata = PortOutData( NodeName , ServiceParameterName ) ; @@ -1726,3 +1785,19 @@ const CORBA::Any *GraphExecutor::OutNode::GetOutData( return retdata ; } +const long GraphExecutor::OutNode::CpuUsed() { + return GraphBase::Graph::CpuUsed() ; +} + +const long GraphExecutor::OutNode::CpuUsed( const char * aNodeName ) { + GraphBase::ComputingNode * aNode = GetChangeGraphNode( aNodeName ) ; + if ( aNode ) { + GraphExecutor::InNode * anInNode = (GraphExecutor::InNode * ) aNode->GetInNode() ; + if ( anInNode ) { + return anInNode->CpuUsed() ; + } + } + return 0 ; +} + + diff --git a/src/GraphExecutor/DataFlowExecutor_OutNode.hxx b/src/GraphExecutor/DataFlowExecutor_OutNode.hxx index fb54a37..e16f0ef 100644 --- a/src/GraphExecutor/DataFlowExecutor_OutNode.hxx +++ b/src/GraphExecutor/DataFlowExecutor_OutNode.hxx @@ -1,10 +1,30 @@ -//============================================================================= -// File : DataFlowBase_OutNode.hxx -// Created : 2002 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphExecutor : contains classes that permit execution of graphs and particularly the execution automaton +// +// 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 : DataFlowBase_OutNode.hxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: #ifndef _DATAFLOWEXECUTOR_OUTNODE_HXX #define _DATAFLOWEXECUTOR_OUTNODE_HXX @@ -28,6 +48,7 @@ namespace GraphExecutor { SUPERV::ControlState _ControlState ; bool _Done ; + pthread_mutex_t _PyMutexWait ; pthread_mutex_t _MutexWait ; pthread_cond_t _EventWait ; pthread_cond_t _JoinWait ; @@ -83,10 +104,10 @@ namespace GraphExecutor { const SUPERV::KindOfNode NodeKindOfNode = SUPERV::ComputingNode , const SUPERV::SDate NodeFirstCreation = SUPERV::SDate() , const SUPERV::SDate NodeLastModification = SUPERV::SDate() , - const char * NodeEditorRelease = NULL , - const char * NodeAuthor = NULL , - const char * NodeComputer = NULL , - const char * NodeComment = NULL , + const char * NodeEditorRelease = NULLSTRING , + const char * NodeAuthor = NULLSTRING , + const char * NodeComputer = NULLSTRING , + const char * NodeComment = NULLSTRING , const int NodeX = 0 , const int NodeY = 0 ) ; @@ -115,8 +136,8 @@ namespace GraphExecutor { void PThreadLock( pthread_mutex_t * aMutex , char * errmsg ) ; void PThreadUnLock( pthread_mutex_t * aMutex , char * errmsg ) ; - void PThreadLock() ; - void PThreadUnLock() ; + void PyThreadLock() ; + void PyThreadUnLock() ; void NewThread() ; void ExitThread() ; @@ -203,6 +224,8 @@ namespace GraphExecutor { const char *ToParameterName ) ; const CORBA::Any *GetOutData( const char *FromNodeName , const char *FromParameterName ) ; + const long CpuUsed() ; + const long CpuUsed( const char *aNodeName ) ; }; }; diff --git a/src/GraphExecutor/DataFlowExecutor_PyDynInvoke.cxx b/src/GraphExecutor/DataFlowExecutor_PyDynInvoke.cxx index 38adfb7..9df177b 100644 --- a/src/GraphExecutor/DataFlowExecutor_PyDynInvoke.cxx +++ b/src/GraphExecutor/DataFlowExecutor_PyDynInvoke.cxx @@ -1,11 +1,15 @@ +// SUPERV GraphExecutor : contains classes that permit execution of graphs and particularly the execution automaton +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : DataFlowExecutor_PyDynInvoke.cxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: + using namespace std; -//============================================================================= -// File : DataFlowExecutor_PyDynInvoke.cxx -// Created : 2003 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= #include #include @@ -26,28 +30,29 @@ static PyMethodDef MethodPyRunMethod[] = { bool GraphExecutor::InNode::InitPython() { cdebug_in << "InitPython" << endl ; - PyObject * Module = Py_InitModule( "InitPyRunMethod" , MethodPyRunMethod ) ; - PyObject * Dictionnary = PyModule_GetDict( Module ) ; +// PyObject * Module = Py_InitModule( "InitPyRunMethod" , MethodPyRunMethod ) ; + Py_InitModule( "InitPyRunMethod" , MethodPyRunMethod ) ; +// PyObject * Dictionnary = PyModule_GetDict( Module ) ; // InitPyDynInvokeError = PyErr_NewException( "InitPyDynInvokeError" , NULL , NULL ) ; // PyDict_SetItemString( Dictionnary , InitPyDynInvokeError ) ; cdebug << ThreadNo() << "Py_Initialized() " << endl ; string aPyFunc ; - aPyFunc = "print 'InitPyRunMethod'\n" ; - aPyFunc += "import InitPyRunMethod\n" ; - aPyFunc += "print 'sys'\n" ; +// aPyFunc = "print 'InitPyRunMethod'\n" ; + aPyFunc = "import InitPyRunMethod\n" ; +// aPyFunc += "print 'sys'\n" ; aPyFunc += "import sys\n" ; - aPyFunc += "print 'CORBA'\n" ; +// aPyFunc += "print 'CORBA'\n" ; aPyFunc += "import CORBA\n" ; - aPyFunc += "print 'omniORB'\n" ; +// aPyFunc += "print 'omniORB'\n" ; aPyFunc += "import omniORB\n" ; - aPyFunc += "print 'PyObjRef'\n" ; +// aPyFunc += "print 'PyObjRef'\n" ; aPyFunc += "def PyObjRef( IORObjStr ) :\n" ; - aPyFunc += " print 'PyObjRef',IORObjStr\n" ; +// aPyFunc += " print 'PyObjRef',IORObjStr\n" ; aPyFunc += " orb = CORBA.ORB_init( sys.argv , CORBA.ORB_ID )\n" ; - aPyFunc += " print 'PyObjRef orb',orb\n" ; +// aPyFunc += " print 'PyObjRef orb',orb\n" ; aPyFunc += " objref = orb.string_to_object( IORObjStr )\n" ; - aPyFunc += " print 'PyObjRef IORObjStr objref',IORObjStr,objref\n" ; +// aPyFunc += " print 'PyObjRef IORObjStr objref',IORObjStr,objref\n" ; aPyFunc += " return objref\n" ; aPyFunc += "InitPyRunMethod.RunMethod( PyObjRef )\n" ; if ( PyRun_SimpleString( (char *) aPyFunc.c_str() ) ) { @@ -61,11 +66,11 @@ bool GraphExecutor::InNode::InitPython() { aPyFunc += "import CORBA\n" ; aPyFunc += "import omniORB\n" ; aPyFunc += "def PyObjIor( ObjRef ) :\n" ; - aPyFunc += " print 'PyObjIor',ObjRef\n" ; +// aPyFunc += " print 'PyObjIor',ObjRef\n" ; aPyFunc += " orb = CORBA.ORB_init( sys.argv , CORBA.ORB_ID )\n" ; - aPyFunc += " print 'PyObjIor orb',orb\n" ; +// aPyFunc += " print 'PyObjIor orb',orb\n" ; aPyFunc += " objIor = orb.object_to_string( ObjRef )\n" ; - aPyFunc += " print 'PyObjIor ObjRef objIor',ObjRef,objIor\n" ; +// aPyFunc += " print 'PyObjIor ObjRef objIor',ObjRef,objIor\n" ; aPyFunc += " return objIor\n" ; aPyFunc += "InitPyRunMethod.RunMethod( PyObjIor )\n" ; if ( PyRun_SimpleString( (char *) aPyFunc.c_str() ) ) { @@ -88,7 +93,7 @@ PyObject * GraphExecutor::InNode::InitPyDynInvoke( << (*aPythonFunction).length() << endl ; if ( (*aPythonFunction).length() ) { - int i ; + unsigned int i ; aPyFunc += "import InitPyRunMethod\n" ; for ( i = 0 ; i < (*aPythonFunction).length() ; i++ ) { aPyFunc += (*aPythonFunction)[ i ] ; @@ -157,17 +162,17 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod , PyObject * ArgsList = NULL ; PyObject * ArgValue = NULL ; - PyObject * ArgResult = NULL ; PyObject * Result = NULL ; PyObject * MyPyObjRefList = NULL ; PyObject * ResultObj = NULL ; PyObject * MyPyObjIorList = NULL ; PyObject * ResultIor = NULL ; - ArgsList = PyTuple_New( n_in ) ; CORBA::Object_ptr ObjRef ; char * IORObjRef ; + ArgsList = PyTuple_New( n_in ) ; + for ( i = 0 ; i < n_in ; i++ ) { data = inParams[i].Value ; sname = inParams[i].Name.c_str() ; @@ -178,16 +183,38 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod , ArgValue = Py_BuildValue( "s" , t ) ; PyTuple_SetItem( ArgsList , i , ArgValue ) ; cdebug << "ArgIn" << i << " : " << sname << " " << method << " Value " << t << " (string) " - << ArgsList->ob_refcnt << endl ; + << " ArgsList->ob_refcnt" << ArgsList->ob_refcnt << " ArgValue->ob_refcnt" + << ArgValue->ob_refcnt << endl ; break ; } - case CORBA::tk_double : { - double d ; - data >>= d ; - ArgValue = Py_BuildValue( "d" , d ) ; + case CORBA::tk_boolean : { + bool b ; + data >>= (CORBA::Any::to_boolean ) b ; + ArgValue = Py_BuildValue( "b" , b ) ; + PyTuple_SetItem( ArgsList , i , ArgValue ) ; + cdebug << "ArgIn" << i << " : " << sname << " " << method << " Value " << b + << " (boolean) ArgsList->ob_refcnt" << ArgsList->ob_refcnt << " ArgValue->ob_refcnt" + << ArgValue->ob_refcnt << endl ; + break ; + } + case CORBA::tk_char : { + unsigned char c ; + data >>= (CORBA::Any::to_char ) c ; + ArgValue = Py_BuildValue( "c" , c ) ; + PyTuple_SetItem( ArgsList , i , ArgValue ) ; + cdebug << "ArgIn" << i << " : " << sname << " " << method << " Value " << c + << " (char) ArgsList->ob_refcnt" << ArgsList->ob_refcnt << " ArgValue->ob_refcnt" + << ArgValue->ob_refcnt << endl ; + break ; + } + case CORBA::tk_short : { + short s ; + data >>= s ; + ArgValue = Py_BuildValue( "h" , s ) ; PyTuple_SetItem( ArgsList , i , ArgValue ) ; - cdebug << "ArgIn" << i << " : " << sname << " " << method << " Value " << d << " (double) " - << ArgsList->ob_refcnt << endl ; + cdebug << "ArgIn" << i << " : " << sname << " " << method << " Value " << s + << " (short) ArgsList->ob_refcnt" << ArgsList->ob_refcnt << " ArgValue->ob_refcnt" + << ArgValue->ob_refcnt << endl ; break ; } case CORBA::tk_long : { @@ -196,7 +223,28 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod , ArgValue = Py_BuildValue( "l" , l ) ; PyTuple_SetItem( ArgsList , i , ArgValue ) ; cdebug << "ArgIn" << i << " : " << sname << " " << method << " Value " << l - << " (long) ArgsList->ob_refcnt" << ArgsList->ob_refcnt << endl ; + << " (long) ArgsList->ob_refcnt" << ArgsList->ob_refcnt << " ArgValue->ob_refcnt" + << ArgValue->ob_refcnt << endl ; + break ; + } + case CORBA::tk_float : { + float f ; + data >>= f ; + ArgValue = Py_BuildValue( "f" , f ) ; + PyTuple_SetItem( ArgsList , i , ArgValue ) ; + cdebug << "ArgIn" << i << " : " << sname << " " << method << " Value " << f + << " (float) ArgsList->ob_refcnt" << ArgsList->ob_refcnt << " ArgValue->ob_refcnt" + << ArgValue->ob_refcnt << endl ; + break ; + } + case CORBA::tk_double : { + double d ; + data >>= d ; + ArgValue = Py_BuildValue( "d" , d ) ; + PyTuple_SetItem( ArgsList , i , ArgValue ) ; + cdebug << "ArgIn" << i << " : " << sname << " " << method << " Value " << d + << " (double) ArgsList->ob_refcnt" << ArgsList->ob_refcnt << " ArgValue->ob_refcnt" + << ArgValue->ob_refcnt << endl ; break ; } case CORBA::tk_objref : { @@ -206,16 +254,23 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod , IORObjRef = ObjectToString( ObjRef ) ; ObjValue = Py_BuildValue( "s" , IORObjRef ) ; PyTuple_SetItem( MyPyObjRefList , 0 , ObjValue ) ; - cdebug << "ArgIn" << i << " : " << sname << method << " " << " Value " << IORObjRef << " (objref) " - << MyPyObjRefList->ob_refcnt << endl ; + cdebug << "ArgIn" << i << " : " << sname << " " << method << " " << " Value " << IORObjRef << " (objref) " + << MyPyObjRef->ob_refcnt << "/" << MyPyObjRefList->ob_refcnt << endl ; ResultObj = PyEval_CallObject( MyPyObjRef , MyPyObjRefList ) ; - cdebug << "MyPyObjRefList->ob_refcnt" << MyPyObjRefList->ob_refcnt << " " - << "ResultObj->ob_refcnt" << ResultObj->ob_refcnt << endl ; - PyObject_Print( ResultObj , stdout , 0 ) ; - PyTuple_SetItem( ArgsList , i , ResultObj ) ; + cdebug << "ObjValue->ob_refcnt" << ObjValue->ob_refcnt << endl ; + ArgValue = Py_BuildValue( "O" , ResultObj ) ; + PyTuple_SetItem( ArgsList , i , ArgValue ) ; cdebug << "ArgIn" << i << " : " << sname << " " << method << " Value (objref) ArgsList->ob_refcnt" - << ArgsList->ob_refcnt << " ResultObj->ob_refcnt" << ResultObj->ob_refcnt - << endl ; + << ArgsList->ob_refcnt << " ArgValue->ob_refcnt" << ArgValue->ob_refcnt << endl ; + cdebug << "MyPyObjRefList->ob_refcnt " << MyPyObjRefList->ob_refcnt-1 << endl ; + Py_DECREF( MyPyObjRefList ) ; + if ( CORBA::is_nil( ObjRef ) ) { + ResultObj = NULL ; + } + else { + cdebug << "ResultObj->ob_refcnt " << ResultObj->ob_refcnt-1 << endl ; + Py_DECREF( ResultObj ) ; + } break ; } default : { @@ -224,140 +279,228 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod , } } - Result = PyEval_CallObject( MyPyRunMethod , ArgsList ) ; - cdebug << "ArgsList->ob_refcnt" << ArgsList->ob_refcnt << endl ; - - if ( Result == NULL ) { - cdebug_out << "GraphExecutor::InNode::PyDynInvoke Error Result == NULL" << endl ; - RetVal = false ; + if (!PyCallable_Check( MyPyRunMethod )) { + RetVal = false; + return RetVal; } else { - for ( i = 0 ; i < n_out ; i++ ) { - data = outParams[i].Value ; - sname = outParams[i].Name.c_str() ; - switch ( data.type()->kind() ) { - case CORBA::tk_string : { - char * t ; - ArgValue = PyTuple_GetItem( Result , i ) ; - if ( ArgValue == NULL ) { - ArgValue = Result ; + Result = PyEval_CallObject( MyPyRunMethod , ArgsList ) ; + cdebug << "ArgsList->ob_refcnt" << ArgsList->ob_refcnt << endl ; + + if ( Result == NULL ) { + cdebug_out << "GraphExecutor::InNode::PyDynInvoke " << method << " Error Result == NULL" << endl ; + RetVal = false ; + } + else { + for ( i = 0 ; i < n_out ; i++ ) { + data = outParams[i].Value ; + sname = outParams[i].Name.c_str() ; + switch ( data.type()->kind() ) { + case CORBA::tk_string : { + char * t = "" ; + if ( PyTuple_Check( Result ) ) { + ArgValue = PyTuple_GetItem( Result , i ) ; + } + else { + ArgValue = Result ; + } + if ( !PyString_Check( ArgValue ) ) { + cdebug << "ArgOut" << i << " : " << sname << " " << method << " ERROR (string)" << endl ; + } + else { + t = PyString_AsString( ArgValue ) ; + } + data <<= t ; + cdebug << "ArgOut" << i << " : " << sname << " " << method << " Value " << t << " (string)" + << " ArgsList->ob_refcnt" << ArgsList->ob_refcnt << " ArgValue->ob_refcnt" + << ArgValue->ob_refcnt << endl ; + break ; } - if ( !PyString_Check( ArgValue ) ) { - cdebug << "ArgOut" << i << " : " << sname << " " << method << " ERROR (string)" << endl ; + case CORBA::tk_boolean : { + bool b = false ; + if ( PyTuple_Check( Result ) ) { + ArgValue = PyTuple_GetItem( Result , i ) ; + } + else { + ArgValue = Result ; + } + if ( !PyInt_Check( ArgValue ) ) { + cdebug << "ArgOut" << i << " : " << sname << " " << method << " ERROR (boolean)" << endl ; + } + else { + b = PyInt_AsLong( ArgValue ) ; + } + data <<= (CORBA::Any::from_boolean ) b ; + cdebug << "ArgOut" << i << " : " << sname << " " << method << " Value " << b << " (boolean)" + << " ArgsList->ob_refcnt" << ArgsList->ob_refcnt << " ArgValue->ob_refcnt" + << ArgValue->ob_refcnt << endl ; + break ; } - t = PyString_AsString( ArgValue ) ; - data <<= t ; - cdebug << "ArgOut" << i << " : " << sname << " " << method << " Value " << t << " (string)" - << endl ; - break ; - } - case CORBA::tk_double : { - double d ; - ArgValue = PyTuple_GetItem( Result , i ) ; - if ( !PyFloat_Check( ArgValue ) ) { - cdebug << "ArgOut" << i << " : " << sname << " " << method << " ERROR (double)" << endl ; + case CORBA::tk_char : { + unsigned char c = 0 ; + if ( PyTuple_Check( Result ) ) { + ArgValue = PyTuple_GetItem( Result , i ) ; + } + else { + ArgValue = Result ; + } + if ( !PyInt_Check( ArgValue ) ) { + cdebug << "ArgOut" << i << " : " << sname << " " << method << " ERROR (char)" << endl ; + } + else { + c = PyInt_AsLong( ArgValue ) ; + } + data <<= (CORBA::Any::from_char ) c ; + cdebug << "ArgOut" << i << " : " << sname << " " << method << " Value " << c << " (char)" + << " ArgsList->ob_refcnt" << ArgsList->ob_refcnt << " ArgValue->ob_refcnt" + << ArgValue->ob_refcnt << endl ; + break ; } - if ( ArgValue == NULL ) { - ArgValue = Result ; + case CORBA::tk_short : { + short s = 0 ; + if ( PyTuple_Check( Result ) ) { + ArgValue = PyTuple_GetItem( Result , i ) ; + } + else { + ArgValue = Result ; + } + if ( !PyInt_Check( ArgValue ) ) { + cdebug << "ArgOut" << i << " : " << sname << " " << method << " ERROR (short)" << endl ; + } + else { + s = PyInt_AsLong( ArgValue ) ; + } + data <<= s ; + cdebug << "ArgOut" << i << " : " << sname << " " << method << " Value " << s << " (short)" + << " ArgsList->ob_refcnt" << ArgsList->ob_refcnt << " ArgValue->ob_refcnt" + << ArgValue->ob_refcnt << endl ; + break ; } - d = PyFloat_AsDouble( ArgValue ) ; - data <<= d ; - cdebug << "ArgOut" << i << " : " << sname << " " << method << " Value " << d << " (double)" - << endl ; - break ; - } - case CORBA::tk_long : { - long l ; - ArgValue = PyTuple_GetItem( Result , i ) ; - if ( ArgValue == NULL ) { - ArgValue = Result ; + case CORBA::tk_long : { + long l = 0 ; + if ( PyTuple_Check( Result ) ) { + ArgValue = PyTuple_GetItem( Result , i ) ; + } + else { + ArgValue = Result ; + } + if ( PyLong_Check( ArgValue ) ) { + l = PyLong_AsLong( ArgValue ) ; + } + else if ( PyInt_Check( ArgValue ) ) { + l = PyInt_AsLong( ArgValue ) ; + } + else { + cdebug << "ArgOut" << i << " : " << sname << " " << method << " ERROR (CORBA::tk_long)" << endl ; + } + data <<= l ; + cdebug << "ArgOut" << i << " : " << sname << " " << method << " Value " << l << " (long)" + << " ArgsList->ob_refcnt" << ArgsList->ob_refcnt << " ArgValue->ob_refcnt" + << ArgValue->ob_refcnt << endl ; + break ; } - if ( !PyInt_Check( ArgValue ) ) { - cdebug << "ArgOut" << i << " : " << sname << " " << method << " ERROR (long)" << endl ; + case CORBA::tk_float : { + float f = 0 ; + if ( PyTuple_Check( Result ) ) { + ArgValue = PyTuple_GetItem( Result , i ) ; + } + else { + ArgValue = Result ; + } + if ( !PyFloat_Check( ArgValue ) ) { + cdebug << "ArgOut" << i << " : " << sname << " " << method << " ERROR (float)" << endl ; + } + else { + f = PyFloat_AsDouble( ArgValue ) ; + } + data <<= f ; + cdebug << "ArgOut" << i << " : " << sname << " " << method << " Value " << f << " (float)" + << " ArgsList->ob_refcnt" << ArgsList->ob_refcnt << " ArgValue->ob_refcnt" + << ArgValue->ob_refcnt << endl ; + break ; } - l = PyInt_AsLong( ArgValue ) ; - data <<= l ; - cdebug << "ArgOut" << i << " : " << sname << " " << method << " Value " << l << " (long)" << endl ; - break ; - } - case CORBA::tk_objref : { - MyPyObjIorList = PyTuple_New( 1 ) ; - PyObject * ObjIor = PyTuple_GetItem( Result , i ) ; - if ( ObjIor == NULL ) { - ObjIor = Result ; + case CORBA::tk_double : { + double d = 0 ; + if ( PyTuple_Check( Result ) ) { + ArgValue = PyTuple_GetItem( Result , i ) ; + } + else { + ArgValue = Result ; + } + if ( !PyFloat_Check( ArgValue ) ) { + cdebug << "ArgOut" << i << " : " << sname << " " << method << " ERROR (double)" << endl ; + } + else { + d = PyFloat_AsDouble( ArgValue ) ; + } + data <<= d ; + cdebug << "ArgOut" << i << " : " << sname << " " << method << " Value " << d << " (double)" + << " ArgsList->ob_refcnt" << ArgsList->ob_refcnt << " ArgValue->ob_refcnt" + << ArgValue->ob_refcnt << endl ; + break ; } - cdebug << "ArgOut" << i << " : " << sname << " " << method << " Value " << "(object reference) "<< endl ; - cout << "ArgOut" << i << " : " << sname << " " << method << " Value " << "(object reference) : " ; - Py_INCREF( ObjIor ) ; - PyObject_Print( ObjIor , stdout , 0 ) ; - PyTuple_SetItem( MyPyObjIorList , 0 , ObjIor ) ; - Py_DECREF( ObjIor ) ; - ResultIor = PyEval_CallObject( MyPyObjIor , MyPyObjIorList ) ; -// ObjRef = PyCObject_AsVoidPtr( ArgValue ) ; -// ObjRef = (CORBA::Object_ptr ) PyLong_AsVoidPtr( ArgValue ) ; - char * IOR = NULL ; -// ArgValue = PyTuple_GetItem( Result , i ) ; - if ( ResultIor ) { - IOR = PyString_AsString( ResultIor ) ; - ObjRef = StringToObject( IOR ) ; - data <<= ObjRef ; - IORObjRef = ObjectToString( ObjRef ) ; - cdebug << "ArgOut" << i << " : " << sname << " " << method << " Value " << "(object reference) " - << IORObjRef << endl ; + case CORBA::tk_objref : { + PyObject * ObjIor ; + MyPyObjIorList = PyTuple_New( 1 ) ; + if ( PyTuple_Check( Result ) ) { + ObjIor = PyTuple_GetItem( Result , i ) ; + } + else { + ObjIor = Result ; + } + cdebug << "ArgOut" << i << " : " << sname << " " << method << " Value " << "(object reference) " + << " ArgsList->ob_refcnt" << ArgsList->ob_refcnt << " ObjIor->ob_refcnt" + << ObjIor->ob_refcnt << endl ; + Py_INCREF( ObjIor ) ; +// PyObject_Print( ObjIor , stdout , 0 ) ; + PyTuple_SetItem( MyPyObjIorList , 0 , ObjIor ) ; + ResultIor = PyEval_CallObject( MyPyObjIor , MyPyObjIorList ) ; + cdebug << "ObjIor->ob_refcnt " << ObjIor->ob_refcnt-1 << endl ; + Py_DECREF( ObjIor ) ; + cdebug << "MyPyObjIorList->ob_refcnt " << MyPyObjIorList->ob_refcnt-1 << endl ; + Py_DECREF( MyPyObjIorList ) ; + cdebug << "MyPyObjIor->ob_refcnt " << MyPyObjIor->ob_refcnt << endl ; + if ( ResultIor ) { + char * IOR = NULL ; + IOR = PyString_AsString( ResultIor ) ; + ObjRef = StringToObject( IOR ) ; + data <<= ObjRef ; + IORObjRef = ObjectToString( ObjRef ) ; + cdebug << "ArgOut" << i << " : " << sname << " " << method << " Value " << IORObjRef << " (objref) " + << endl ; + if ( CORBA::is_nil( ObjRef ) ) { + ResultIor = NULL ; + } + else { + cdebug << "ResultIor->ob_refcnt " << ResultIor->ob_refcnt-1 << endl ; + Py_DECREF( ResultIor ) ; + } + } + else { + cdebug_out << "GraphExecutor::InNode::PyDynInvoke Error ResultIor == NULL" + << method << " " << endl ; + RetVal = false ; + } + break ; } - else { - cdebug_out << "GraphExecutor::InNode::PyDynInvoke Error ResultIor == NULL" - << method << " " << endl ; - RetVal = false ; + default : { + cdebug << "ArgOut" << i << " : " << sname << " " << method << " Value " << "(other ERROR)" << endl ; + } } - break ; + outParams[i].Value = data ; } - default : { - cdebug << "ArgOut" << i << " : " << sname << " " << method << " Value " << "(other ERROR)" << endl ; - } - } - outParams[i].Value = data ; - } - - if ( MyPyObjIorList ) { - int cnt = MyPyObjIorList->ob_refcnt ; - while ( cnt > 0 ) { - cnt = MyPyObjIorList->ob_refcnt - 1 ; - Py_DECREF( MyPyObjIorList ) ; - cdebug << "MyPyObjIorList->ob_refcnt" << MyPyObjIorList->ob_refcnt << endl ; - } - } - if ( ResultIor ) { - int cnt = ResultIor->ob_refcnt ; - while ( cnt > 0 ) { - cnt = ResultIor->ob_refcnt - 1 ; - Py_DECREF( ResultIor ) ; - cdebug << "ResultIor->ob_refcnt" << ResultIor->ob_refcnt << endl ; - } - } - Py_DECREF( Result ) ; - } - - Py_DECREF( ArgsList ) ; - if ( MyPyObjRefList ) { - int cnt = MyPyObjRefList->ob_refcnt ; - while ( cnt > 0 ) { - cnt = MyPyObjRefList->ob_refcnt - 1 ; - Py_DECREF( MyPyObjRefList ) ; - cdebug << "MyPyObjRefList->ob_refcnt" << MyPyObjRefList->ob_refcnt << endl ; - } - } - if ( ResultObj ) { - int cnt = ResultObj->ob_refcnt ; - while ( cnt > 0 ) { - cnt = ResultObj->ob_refcnt - 1 ; - Py_DECREF( ResultObj ) ; - cdebug << "ResultObj->ob_refcnt" << ResultObj->ob_refcnt << endl ; + + cdebug << "Result->ob_refcnt" << Result->ob_refcnt-1 << endl ; + Py_DECREF( Result ) ; } + + cdebug << "GraphExecutor::InNode::PyDynInvoke ArgsList->ob_refcnt" + << ArgsList->ob_refcnt-1 << endl ; + Py_DECREF( ArgsList ) ; + + cdebug_out << "GraphExecutor::InNode::PyDynInvoke " << method << endl ; + + return RetVal ; } - cdebug_out << "GraphExecutor::InNode::PyDynInvoke " << method << endl ; - - return RetVal ; - } diff --git a/src/SUPERVGUI/SUPERVGUI.cxx b/src/SUPERVGUI/SUPERVGUI.cxx index 5158492..142ee04 100644 --- a/src/SUPERVGUI/SUPERVGUI.cxx +++ b/src/SUPERVGUI/SUPERVGUI.cxx @@ -53,11 +53,10 @@ SUPERVGUI Supervision; SUPERVGUI::SUPERVGUI(): QObject(), - desktop(0), - study(0), - engine(0), - browser(0) - //info(0) + desktop(0), + study(0), + browser(0) + //info(0) { Trace("SUPERVGUI::SUPERVGUI") if (factory==0) { @@ -72,8 +71,9 @@ SUPERVGUI::~SUPERVGUI() { Trace("SUPERVGUI::~SUPERVGUI") if (factory==1) { factory = 0; + //if (!engine->_is_nil()) CORBA::release(engine); //info->close(); - browser->close(); + if (browser) browser->close(); MESSAGE("SUPERVGUI Info : factory destroy"); } else { MESSAGE("SUPERVGUI Error : another call to factory destructor"); @@ -125,8 +125,8 @@ void SUPERVGUI::loadEngine(SALOME_NamingService* namingService) { return; }; - engine = new SUPERV::SuperG_var; - *engine = aSuperVisionComponent; + // engine = new SUPERV::SuperG_var; + engine = aSuperVisionComponent; } /* bool SUPERVGUI::information(SUPERV_CNode node, bool isReadOnly) { @@ -236,7 +236,7 @@ void SUPERVGUI::importDataflow() { return; } - SUPERV_Graph aGraph = (*Supervision.getEngine())->GraphE(f); + SUPERV_Graph aGraph = engine->GraphE(f); //QFileInfo aFile(f); //aGraph->SetName(aFile.baseName()); if (SUPERV_isNull(aGraph)) { @@ -274,7 +274,7 @@ void SUPERVGUI::displayDataflow() { QMessageBox::Yes, QMessageBox::No) == QMessageBox::No) return; } - aDataFlow = (*Supervision.getEngine())->getGraph(ior); + aDataFlow = engine->getGraph(ior); if (SUPERV_isNull(aDataFlow)) { QMessageBox::warning(0, tr("ERROR"), tr("MSG_ACCESS_BAD_IOR")); return; @@ -365,7 +365,7 @@ void SUPERVGUI::modifyDataflow() { return; } - SUPERV_Graph aGraph = (*Supervision.getEngine())->Graph(f); + SUPERV_Graph aGraph = engine->Graph(f); //QFile aFile(f); //aGraph->SetName(aFile.name()); if (SUPERV_isNull(aGraph)) { @@ -455,20 +455,35 @@ void SUPERVGUI::customPopup(QPopupMenu* popup) { SALOME_Selection* Sel = SALOME_Selection::Selection(study->getSelection() ); if ((Sel==NULL) || (Sel->IObjectCount() == 0)) return; - Handle(SALOME_InteractiveObject) anIObj = Sel->firstIObject(); + if (Sel->IObjectCount() == 1) { + Handle(SALOME_InteractiveObject) anIObj = Sel->firstIObject(); - // insert SUPERV-specific popup items here + // insert SUPERV-specific popup items here - bool isDataflow, ownObj; - whatIsSelected(anIObj, ownObj, isDataflow); - - if (isDataflow) { - popup->insertItem(tr( "MSG_RENAME" ), this, SLOT(renameDataflow())); - popup->insertItem("Display", this, SLOT(displayDataflow())); - popup->insertSeparator(); + bool isDataflow, ownObj; + whatIsSelected(anIObj, ownObj, isDataflow); + + if (isDataflow) { + popup->insertItem(tr( "MSG_RENAME" ), this, SLOT(renameDataflow())); + popup->insertItem("Display", this, SLOT(displayDataflow())); + popup->insertSeparator(); + } + if (ownObj) + popup->insertItem(tr("MSG_DELETE"), this, SLOT(deleteObject())); + } + if (Sel->IObjectCount() > 1) { + int aIObjCount = 0; + SALOME_ListIteratorOfListIO It_forCheckOwner(Sel->StoredIObjects()); + for(;It_forCheckOwner.More();It_forCheckOwner.Next()) { + Handle(SALOME_InteractiveObject) anIObj = It_forCheckOwner.Value(); + bool aIsOwner, aIsDataflow; + whatIsSelected(anIObj, aIsOwner, aIsDataflow); + + if (aIsOwner) aIObjCount++; + } + if (aIObjCount == Sel->IObjectCount()) //all selected objects belong to Supervision + popup->insertItem(tr("MSG_DELETE"), this, SLOT(deleteObject())); } - if (ownObj) - popup->insertItem(tr("MSG_DELETE"), this, SLOT(deleteObject())); } @@ -499,7 +514,7 @@ void SUPERVGUI::whatIsSelected(const Handle(SALOME_InteractiveObject)& theObj, b SALOMEDS::GenericAttribute_var anAttr; if (obj->FindAttribute(anAttr, "AttributeIOR")) { SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - SUPERV_Graph aDataFlow = (*Supervision.getEngine())->getGraph(anIOR->Value()); + SUPERV_Graph aDataFlow = engine->getGraph(anIOR->Value()); if (!SUPERV_isNull(aDataFlow)) theIsDataflow = true; } @@ -516,43 +531,44 @@ void SUPERVGUI::whatIsSelected(const Handle(SALOME_InteractiveObject)& theObj, b void SUPERVGUI::deleteObject() { SALOME_Selection* Sel = SALOME_Selection::Selection(study->getSelection() ); if ((Sel==NULL) || (Sel->IObjectCount() == 0)) return; - - Handle(SALOME_InteractiveObject) anIObj = Sel->firstIObject(); - bool aIsOwner, aIsDataflow; - whatIsSelected(anIObj, aIsOwner, aIsDataflow); - - if (!aIsOwner) return; - + if (QMessageBox::warning(QAD_Application::getDesktop(), tr("WARNING"), tr("MSG_ASK_DELETE"), QMessageBox::No, QMessageBox::Yes) == QMessageBox::No) return; - - SALOMEDS::Study_var aStudy = study->getStudyDocument(); - SALOMEDS::SObject_var aObj = aStudy->FindObjectID( anIObj->getEntry() ); - if (!aObj->_is_nil()) { - if (aIsDataflow) { - SALOMEDS::GenericAttribute_var anAttr; - if (aObj->FindAttribute(anAttr, "AttributeIOR")) { - SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - QString ior = anIOR->Value(); - - SUPERVGUI_Main* aMain; - for (aMain = myGraphList.first(); aMain; aMain = myGraphList.next()) { - if ((aMain->getStudy() == study) && (aMain->getHashCode() == ior)) { - aMain->setAsFromStudy(false); - break; + + SALOME_ListIteratorOfListIO It(Sel->StoredIObjects()); + for(;It.More();It.Next()) { + Handle(SALOME_InteractiveObject) anIObj = It.Value(); + bool aIsOwner, aIsDataflow; + whatIsSelected(anIObj, aIsOwner, aIsDataflow); + + SALOMEDS::Study_var aStudy = study->getStudyDocument(); + SALOMEDS::SObject_var aObj = aStudy->FindObjectID( anIObj->getEntry() ); + if (!aObj->_is_nil()) { + if (aIsDataflow) { + SALOMEDS::GenericAttribute_var anAttr; + if (aObj->FindAttribute(anAttr, "AttributeIOR")) { + SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); + QString ior = anIOR->Value(); + + SUPERVGUI_Main* aMain; + for (aMain = myGraphList.first(); aMain; aMain = myGraphList.next()) { + if ((aMain->getStudy() == study) && (aMain->getHashCode() == ior)) { + aMain->setAsFromStudy(false); + break; + } } - } + } } + QAD_Operation* op = new SALOMEGUI_ImportOperation( study ); + SALOMEDS::StudyBuilder_var aBuilder = aStudy->NewBuilder(); + op->start(); + aBuilder->RemoveObjectWithChildren(aObj); + op->finish(); } - QAD_Operation* op = new SALOMEGUI_ImportOperation( study ); - SALOMEDS::StudyBuilder_var aBuilder = aStudy->NewBuilder(); - op->start(); - aBuilder->RemoveObjectWithChildren(aObj); - op->finish(); } Sel->ClearIObjects() ; } diff --git a/src/SUPERVGUI/SUPERVGUI_Array.cxx b/src/SUPERVGUI/SUPERVGUI_Array.cxx index a2b9b48..9c89bd7 100644 --- a/src/SUPERVGUI/SUPERVGUI_Array.cxx +++ b/src/SUPERVGUI/SUPERVGUI_Array.cxx @@ -214,7 +214,16 @@ SUPERVGUI_Cell::SUPERVGUI_Cell(QWidget* parent, SUPERVGUI_Main* m, SUPERV_CNode QHBoxLayout* aBox = new QHBoxLayout(this); aBox->setMargin(3); aBox->setSpacing(3); - component = new SUPERVGUI_Label(this, CELL_WIDTH_PART, LABEL_HEIGHT, myNode->Comment(), QLabel::AlignLeft); + + QString aCommentVis; + if (getNodeType() == SUPERV::FactoryNode) + aCommentVis = QString(myNode->Service()->ServiceName) + QString(tr("COMMENT_FROM")) + + QString(getFactoryNode()->GetComponentName()); + else + //aCommentVis = tr("COMMENT_PYTHON"); + aCommentVis = tr("COMMENT_CNODE"); + + component = new SUPERVGUI_Label(this, CELL_WIDTH_PART, LABEL_HEIGHT, aCommentVis, QLabel::AlignLeft); connect(component, SIGNAL(MousePress(QMouseEvent*)), this, SLOT(showPopup(QMouseEvent*))); myTitle = new SUPERVGUI_Label(this, CELL_WIDTH_PART, LABEL_HEIGHT, name(), QLabel::AlignLeft); @@ -262,7 +271,7 @@ void SUPERVGUI_Cell::sync() { Trace("SUPERVGUI_Cell::sync"); if (myMain == NULL) return; myTitle->setText(myNode->Name()); - component->setText(myNode->Comment()); + //component->setText(myNode->Comment()); if (guiNode != NULL) { guiNode->sync(); diff --git a/src/SUPERVGUI/SUPERVGUI_BrowseNodeDlg.cxx b/src/SUPERVGUI/SUPERVGUI_BrowseNodeDlg.cxx index a3e187a..97580c5 100644 --- a/src/SUPERVGUI/SUPERVGUI_BrowseNodeDlg.cxx +++ b/src/SUPERVGUI/SUPERVGUI_BrowseNodeDlg.cxx @@ -65,7 +65,7 @@ bool SUPERVGUI_PortField::setNewValue() { if ( aTxt.isNull() || aTxt.isEmpty() ) return false; if ( aTxt.find( "Unknown" ) < 0 ) { - return myPort->Input( ( *Supervision.getEngine() )->StringValue( aTxt ) ); + return myPort->Input( Supervision.getEngine()->StringValue( aTxt ) ); } return false; } diff --git a/src/SUPERVGUI/SUPERVGUI_ComputeNode.cxx b/src/SUPERVGUI/SUPERVGUI_ComputeNode.cxx index 5fba779..38fa828 100644 --- a/src/SUPERVGUI/SUPERVGUI_ComputeNode.cxx +++ b/src/SUPERVGUI/SUPERVGUI_ComputeNode.cxx @@ -28,18 +28,21 @@ SUPERVGUI_ComputeNode::SUPERVGUI_ComputeNode(QWidget* theParent, SUPERVGUI_Main* aGridLayout->addMultiCellWidget(myTitle, 0, 0, 0, 1); QString aComment(theNode->Comment()); + + QString aCommentVis = aComment; + if (getNodeType() == SUPERV::FactoryNode) + aCommentVis = QString(myNode->Service()->ServiceName) + QString(tr("COMMENT_FROM")) + + QString(getFactoryNode()->GetComponentName()); + else + //aCommentVis = tr("COMMENT_PYTHON"); + aCommentVis = tr("COMMENT_CNODE"); + if (aComment.isNull() || aComment.isEmpty()) { - if (getNodeType() == SUPERV::FactoryNode) - aComment = QString(myNode->Service()->ServiceName) + QString(tr("COMMENT_FROM")) - + QString(getFactoryNode()->GetComponentName()); - else - //aComment = tr("COMMENT_PYTHON"); - aComment = tr("COMMENT_CNODE"); - theNode->SetComment(aComment.latin1()); + theNode->SetComment(aCommentVis.latin1()); } - + myServiceBox = new QVBox(this, "service"); - myComment = new SUPERVGUI_Label(myServiceBox, LABEL_WIDTH, LABEL_HEIGHT, aComment, QLabel::AlignLeft); + myComment = new SUPERVGUI_Label(myServiceBox, LABEL_WIDTH, LABEL_HEIGHT, aCommentVis, QLabel::AlignLeft); connect(myComment, SIGNAL(MousePress(QMouseEvent*)), this, SLOT(showPopup(QMouseEvent*))); QToolTip::add(myTitle, myTitle->text()); QToolTip::add(myComment, myComment->text()); @@ -80,8 +83,8 @@ void SUPERVGUI_ComputeNode::sync() setName(myNode->Name()); myTitle->setText(name()); - myComment->setText(myNode->Comment()); - + //myComment->setText(myNode->Comment()); + bool editing = myMain->getDataflow()->IsEditing(); myPopup->setItemEnabled(myKillItem, !editing); if (myMain->isEditable()) { diff --git a/src/SUPERVGUI/SUPERVGUI_ControlNode.cxx b/src/SUPERVGUI/SUPERVGUI_ControlNode.cxx index 2636dbc..fd5ab5e 100644 --- a/src/SUPERVGUI/SUPERVGUI_ControlNode.cxx +++ b/src/SUPERVGUI/SUPERVGUI_ControlNode.cxx @@ -38,6 +38,7 @@ SUPERVGUI_StartControlNode::SUPERVGUI_StartControlNode(QWidget* theParent, SUPER myPortsBox->reparent(this, pos()); aGridLayout->addMultiCellWidget(myPortsBox, 1, 1, 0, 1); + // myGatesBox->setPaletteBackgroundColor(backgroundColor().dark(105)); myStatus->reparent(this, pos()); myTime->reparent(this, pos()); @@ -212,8 +213,7 @@ SUPERVGUI_EndControlNode::SUPERVGUI_EndControlNode(QWidget* theParent, SUPERVGUI myTitle->setPaletteBackgroundColor(TITLECOLOR); aGridLayout->addMultiCellWidget(myTitle, 0, 0, 0, 2); - myPortsBox = new QFrame(this); - myPortLayout = new QGridLayout(myPortsBox, 0, 2, 0, 1); + myPortsBox->reparent(this, pos()); myPIcount = 0; myPOcount = 0; @@ -222,13 +222,34 @@ SUPERVGUI_EndControlNode::SUPERVGUI_EndControlNode(QWidget* theParent, SUPERVGUI for (int i=0; iIsInput()) { - myPortLayout->addWidget(new SUPERVGUI_PortIn(myPortsBox, myMain, ports[i]), - myPIcount, 0); - myPIcount++; + if (getComputingNode()->IsEndSwitch()) { + if (ports[i]->IsGate()) + myGatesLayout->addWidget(new SUPERVGUI_PortInESNode(myGatesBox, myMain, ports[i]), + 0, 0); + else { + myPortLayout->addWidget(new SUPERVGUI_PortInESNode(myValuesBox, myMain, ports[i]), + myPIcount, 0); + myPIcount++; + } + } else { + if (ports[i]->IsGate()) + myGatesLayout->addWidget(new SUPERVGUI_PortIn(myGatesBox, myMain, ports[i]), + 0, 0); + else { + myPortLayout->addWidget(new SUPERVGUI_PortIn(myValuesBox, myMain, ports[i]), + myPIcount, 0); + myPIcount++; + } + } } else { - myPortLayout->addWidget(new SUPERVGUI_PortOut(myPortsBox, myMain, ports[i]), - myPOcount, 1, Qt::AlignRight); - myPOcount++; + if (ports[i]->IsGate()) + myGatesLayout->addWidget(new SUPERVGUI_PortOut(myGatesBox, myMain, ports[i]), + 0, 1, Qt::AlignRight); + else { + myPortLayout->addWidget(new SUPERVGUI_PortOut(myValuesBox, myMain, ports[i]), + myPOcount, 1, Qt::AlignRight); + myPOcount++; + } } } aGridLayout->addMultiCellWidget(myPortsBox, 1, 1, 1, 2); diff --git a/src/SUPERVGUI/SUPERVGUI_Def.h b/src/SUPERVGUI/SUPERVGUI_Def.h index da2e981..1239c14 100644 --- a/src/SUPERVGUI/SUPERVGUI_Def.h +++ b/src/SUPERVGUI/SUPERVGUI_Def.h @@ -172,7 +172,7 @@ NODE_Editing "", NODE_RED, NODE_GREEN, NODE_BLUE, true, false, true #include CORBA_SERVER_HEADER(SALOMEDS) #include CORBA_SERVER_HEADER(SALOMEDS_Attributes) -#define SUPERV_Engine SUPERV::SuperG_var* +#define SUPERV_Engine SUPERV::SuperG_var #define SUPERV_Graph SUPERV::Graph_var diff --git a/src/SUPERVGUI/SUPERVGUI_GraphNode.cxx b/src/SUPERVGUI/SUPERVGUI_GraphNode.cxx index c3c6c6c..3a1676f 100644 --- a/src/SUPERVGUI/SUPERVGUI_GraphNode.cxx +++ b/src/SUPERVGUI/SUPERVGUI_GraphNode.cxx @@ -26,8 +26,18 @@ SUPERVGUI_GraphNode::SUPERVGUI_GraphNode(QWidget* theParent, SUPERVGUI_Main* the connect(myTitle, SIGNAL(MouseMove (QMouseEvent*)), this, SLOT(mouseTitleMove(QMouseEvent*))); connect(myTitle, SIGNAL(MouseRelease(QMouseEvent*)), this, SLOT(mouseTitleRelease(QMouseEvent*))); - myPortsBox = new QFrame(0); - myPortLayout = new QGridLayout(myPortsBox, 0, 2, 0, 1); + myPortsBox = new QVBox(0); + myPortsBox->setSpacing(3); + myValuesBox = new QWidget(myPortsBox); + myPortLayout = new QGridLayout(myValuesBox, 0, 2, 0, 1); + + myGatesBox = new QFrame(myPortsBox); + myGatesBox->setFrameStyle( QFrame::Panel | QFrame::Raised ); + myGatesBox->setLineWidth(2); + // myGatesBox->setPaletteBackgroundColor(backgroundColor().dark(105)); + myGatesBox->setPaletteBackgroundColor(green.light(170)); + myGatesLayout = new QGridLayout(myGatesBox, 0, 2); + myGatesLayout->setMargin(3); myTimer = new QTimer(this); connect(myTimer, SIGNAL(timeout()), this, SLOT(movingNode(/*QMouseEvent* e*/))); @@ -47,13 +57,23 @@ SUPERVGUI_GraphNode::SUPERVGUI_GraphNode(QWidget* theParent, SUPERVGUI_Main* the for (int i=0; iIsInput()) { - myPortLayout->addWidget(new SUPERVGUI_PortIn(myPortsBox, myMain, ports[i]), - myPIcount, 0); - myPIcount++; + if (ports[i]->IsGate()) + myGatesLayout->addWidget(new SUPERVGUI_PortIn(myGatesBox, myMain, ports[i]), + 0, 0); + else { + myPortLayout->addWidget(new SUPERVGUI_PortIn(myValuesBox, myMain, ports[i]), + myPIcount, 0); + myPIcount++; + } } else { - myPortLayout->addWidget(new SUPERVGUI_PortOut(myPortsBox, myMain, ports[i]), - myPOcount, 1, Qt::AlignRight); - myPOcount++; + if (ports[i]->IsGate()) + myGatesLayout->addWidget(new SUPERVGUI_PortOut(myGatesBox, myMain, ports[i]), + 0, 1, Qt::AlignRight); + else { + myPortLayout->addWidget(new SUPERVGUI_PortOut(myValuesBox, myMain, ports[i]), + myPOcount, 1, Qt::AlignRight); + myPOcount++; + } } } } @@ -254,7 +274,6 @@ void SUPERVGUI_GraphNode::sync() { //check: is creation of link is complete if (myMain->getGraph()->isAnyLinkCreating()) { //not creation complete - //cout<<" --- $$$ 1"<setItemEnabled(myDeleteItem, false); } else { @@ -336,7 +355,7 @@ void SUPERVGUI_GraphNode::addInputPort() { if (aPort == NULL) return; if (getNodeType() == SUPERV::EndSwitchNode) { - SUPERVGUI_PortInESNode* aPortPrs = new SUPERVGUI_PortInESNode(myPortsBox, myMain, aPort); + SUPERVGUI_PortInESNode* aPortPrs = new SUPERVGUI_PortInESNode(myValuesBox, myMain, aPort); myPortLayout->addWidget(aPortPrs, myPIcount, 0); if (myPortsBox->isVisible()) { @@ -344,7 +363,7 @@ void SUPERVGUI_GraphNode::addInputPort() { } } else { - SUPERVGUI_PortIn* aPortPrs = new SUPERVGUI_PortIn(myPortsBox, myMain, aPort); + SUPERVGUI_PortIn* aPortPrs = new SUPERVGUI_PortIn(myValuesBox, myMain, aPort); myPortLayout->addWidget(aPortPrs, myPIcount, 0); if (myPortsBox->isVisible()) { @@ -362,7 +381,7 @@ void SUPERVGUI_GraphNode::addOutputPort() { SUPERV_Port aPort = createOutPort(); if (aPort == NULL) return; - SUPERVGUI_PortOut* aPortPrs = new SUPERVGUI_PortOut(myPortsBox, myMain, aPort); + SUPERVGUI_PortOut* aPortPrs = new SUPERVGUI_PortOut(myValuesBox, myMain, aPort); myPortLayout->addWidget(aPortPrs, myPOcount, 1, Qt::AlignRight); myPOcount++; if (myPortsBox->isVisible()) { @@ -385,16 +404,28 @@ void SUPERVGUI_GraphNode::updatePorts() { aPortPrs = (SUPERVGUI_Port*) child(aName, "SUPERVGUI_Port"); if (aPortPrs == NULL) { if (aPorts[i]->IsInput()) { - SUPERVGUI_PortIn* aPortIn = new SUPERVGUI_PortIn(myPortsBox, myMain, aPorts[i]); - myPortLayout->addWidget(aPortIn, myPIcount, 0); + SUPERVGUI_PortIn* aPortIn; + if (aPorts[i]->IsGate()) { + aPortIn = new SUPERVGUI_PortIn(myGatesBox, myMain, aPorts[i]); + myGatesLayout->addWidget(aPortIn, myPIcount, 0); + } else { + aPortIn = new SUPERVGUI_PortIn(myValuesBox, myMain, aPorts[i]); + myPortLayout->addWidget(aPortIn, myPIcount, 0); + myPIcount++; + } if (aIsVisible) aPortIn->show(); - myPIcount++; isAdded = true; } else { - SUPERVGUI_PortOut* aPortOut = new SUPERVGUI_PortOut(myPortsBox, myMain, aPorts[i]); - myPortLayout->addWidget(aPortOut, myPOcount, 1, Qt::AlignRight); + SUPERVGUI_PortOut* aPortOut; + if (aPorts[i]->IsGate()) { + aPortOut = new SUPERVGUI_PortOut(myGatesBox, myMain, aPorts[i]); + myGatesLayout->addWidget(aPortOut, myPOcount, 1, Qt::AlignRight); + } else { + aPortOut = new SUPERVGUI_PortOut(myValuesBox, myMain, aPorts[i]); + myPortLayout->addWidget(aPortOut, myPOcount, 1, Qt::AlignRight); + myPOcount++; + } if (aIsVisible) aPortOut->show(); - myPOcount++; isAdded = true; } } diff --git a/src/SUPERVGUI/SUPERVGUI_GraphNode.h b/src/SUPERVGUI/SUPERVGUI_GraphNode.h index ce756bc..fde17f9 100644 --- a/src/SUPERVGUI/SUPERVGUI_GraphNode.h +++ b/src/SUPERVGUI/SUPERVGUI_GraphNode.h @@ -58,8 +58,13 @@ class SUPERVGUI_GraphNode: public SUPERVGUI_Node { protected: SUPERVGUI_Label* myTitle; - QFrame* myPortsBox; + QVBox* myPortsBox; + QWidget* myValuesBox; QGridLayout* myPortLayout; + + QFrame* myGatesBox; + QGridLayout* myGatesLayout; + QTimer* myTimer; int myPIcount; int myPOcount; diff --git a/src/SUPERVGUI/SUPERVGUI_Information.cxx b/src/SUPERVGUI/SUPERVGUI_Information.cxx index 765c6bf..1151a77 100644 --- a/src/SUPERVGUI/SUPERVGUI_Information.cxx +++ b/src/SUPERVGUI/SUPERVGUI_Information.cxx @@ -80,7 +80,7 @@ SUPERVGUI_Information::SUPERVGUI_Information(SUPERV_CNode node, bool isReadOnly) contV = new QLineEdit( TopGroup ); contV->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); contV->setMinimumSize( 200, 0 ); - contV->setReadOnly( true/*isReadOnly*/ ); + contV->setReadOnly( false/*isReadOnly*/ ); contV->setText( SUPERV::FNode::_narrow(node)->GetContainer() ); compnameL = new QLabel( tr( "COMPONENT_NAME_LBL" ), TopGroup ); @@ -264,10 +264,10 @@ void SUPERVGUI_Information::okButton() { Trace("SUPERVGUI_Information::okButton"); myNode->SetName( nameV->text().latin1()); myNode->SetAuthor( authV->text().latin1() ); - /*if (myNode->IsFactory()) { + if (myNode->IsFactory()) { SUPERV_FNode aFNode = SUPERV::FNode::_narrow(myNode); aFNode->SetContainer( contV->text().latin1() ); - }*/ + } myNode->SetComment( commV->text().latin1() ); accept(); } diff --git a/src/SUPERVGUI/SUPERVGUI_Main.cxx b/src/SUPERVGUI/SUPERVGUI_Main.cxx index 5184f7c..8f83224 100644 --- a/src/SUPERVGUI/SUPERVGUI_Main.cxx +++ b/src/SUPERVGUI/SUPERVGUI_Main.cxx @@ -76,7 +76,7 @@ SUPERVGUI_Main::SUPERVGUI_Main(SUPERVGraph_ViewFrame* theParent, QAD_Desktop* th if (obj->FindAttribute(anAttr, "AttributeIOR")) { SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); Standard_CString ior = anIOR->Value(); - dataflow = (*Supervision.getEngine())->getGraph(ior); + dataflow = Supervision.getEngine()->getGraph(ior); if (SUPERV_isNull(dataflow)) { QMessageBox::warning(QAD_Application::getDesktop(), tr("ERROR"), tr("MSG_ACCESS_BAD_IOR")); close(); @@ -88,7 +88,7 @@ SUPERVGUI_Main::SUPERVGUI_Main(SUPERVGraph_ViewFrame* theParent, QAD_Desktop* th close(); } } else { - dataflow = (*Supervision.getEngine())->Graph(MAIN_NEW); + dataflow = Supervision.getEngine()->Graph(MAIN_NEW); if (SUPERV_isNull(dataflow)) { QMessageBox::warning(QAD_Application::getDesktop(), tr("ERROR"), tr("MSG_CANT_CREATE_DF")); close(); @@ -112,9 +112,9 @@ SUPERVGUI_Main::SUPERVGUI_Main(SUPERVGraph_ViewFrame* theParent, QAD_Desktop* th Trace("SUPERVGUI_Main::SUPERVGUI_Main (file)") theParent->setViewWidget(this); if (isModify) { - dataflow = (*Supervision.getEngine())->Graph(f); + dataflow = Supervision.getEngine()->Graph(f); } else { - dataflow = (*Supervision.getEngine())->GraphE(f); + dataflow = Supervision.getEngine()->GraphE(f); } if (SUPERV_isNull(dataflow)) { QMessageBox::warning(QAD_Application::getDesktop(), tr("ERROR"), tr("MSG_BAD_FILE").arg(f)); @@ -184,7 +184,7 @@ void SUPERVGUI_Main::init(QAD_Desktop* theDesktop) { aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr); aPixmap->SetPixMap( "ICON_OBJBROWSER_Supervision" ); - builder->DefineComponentInstance(father, *Supervision.getEngine()); + builder->DefineComponentInstance(father, Supervision.getEngine()); op->finish(); }; @@ -797,7 +797,7 @@ bool SUPERVGUI_Main::addStudy() { anAttr = aBuilder->FindOrCreateAttribute(aComponent, "AttributePixMap"); aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr); aPixmap->SetPixMap( "ICON_OBJBROWSER_Supervision" ); - aBuilder->DefineComponentInstance(aComponent, *Supervision.getEngine()); + aBuilder->DefineComponentInstance(aComponent, Supervision.getEngine()); if (aLocked) aStudy->GetProperties()->SetLocked(true); anOperation->finish(); } @@ -920,7 +920,7 @@ bool SUPERVGUI_Main::putDataStudy(SUPERV_Port p, const char* inout) { anAttr = aBuilder->FindOrCreateAttribute(aComponent, "AttributePixMap"); aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr); aPixmap->SetPixMap( "ICON_OBJBROWSER_Supervision" ); - aBuilder->DefineComponentInstance(aComponent, *Supervision.getEngine()); + aBuilder->DefineComponentInstance(aComponent, Supervision.getEngine()); if (aLocked) aStudy->GetProperties()->SetLocked(true); anOperation->finish(); } diff --git a/src/SUPERVGUI/SUPERVGUI_Node.cxx b/src/SUPERVGUI/SUPERVGUI_Node.cxx index 3c4515a..99b1d9b 100644 --- a/src/SUPERVGUI/SUPERVGUI_Node.cxx +++ b/src/SUPERVGUI/SUPERVGUI_Node.cxx @@ -174,7 +174,7 @@ void SUPERVGUI_Node::setState(SUPERV::GraphState theState) break; } myTime->setPaletteBackgroundColor(myStatus->paletteBackgroundColor()); - long sec = 0; //myNode->CpuUsed(); + long sec = myNode->CpuUsed(); // sec++; char hms[9]; long s = sec/3600; @@ -412,6 +412,10 @@ void SUPERVGUI_Node::setNodeName(QString aName) { SUPERV_Port SUPERVGUI_Node::createInPort() { SUPERVGUI_PortParamsDlg* aDlg = new SUPERVGUI_PortParamsDlg(); if (aDlg->exec()) { + if (aDlg->getName().isEmpty() || aDlg->getType().isEmpty()) { + QMessageBox::warning( QAD_Application::getDesktop(), tr( "ERROR" ), tr( "MSG_CANT_CREATE_PORT" ) ); + return NULL; + } SUPERV_INode aNode = getInlineNode(); if (SUPERV_isNull(aNode)) { MESSAGE("SUPERVGUI_Node::createInPort: Node is wrong type"); @@ -503,6 +507,9 @@ void SUPERVGUI_Node::editFunction() { * Port parameters dialog definition */ +static const char* MyTypeStrings[] = + {"string", "boolean", "char", "short", "int", "long", "float", "double", "objref"}; + SUPERVGUI_PortParamsDlg::SUPERVGUI_PortParamsDlg() : QDialog(QAD_Application::getDesktop(), 0, true, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ) { @@ -522,8 +529,9 @@ SUPERVGUI_PortParamsDlg::SUPERVGUI_PortParamsDlg() QLabel* aTypeLbl = new QLabel("Value Type", this ); aBaseLayout->addWidget(aTypeLbl, 1, 0); - myTypeTxt = new QLineEdit( this ); + myTypeTxt = new QComboBox( this ); aTypeLbl->setBuddy( myTypeTxt ); + myTypeTxt->insertStrList( MyTypeStrings ); aBaseLayout->addWidget(myTypeTxt, 1, 1); QGroupBox* aBtnBox = new QGroupBox( this ); diff --git a/src/SUPERVGUI/SUPERVGUI_Node.h b/src/SUPERVGUI/SUPERVGUI_Node.h index 08a9587..97923f7 100644 --- a/src/SUPERVGUI/SUPERVGUI_Node.h +++ b/src/SUPERVGUI/SUPERVGUI_Node.h @@ -33,6 +33,8 @@ using namespace std; #include "SUPERVGUI_Label.h" #include #include "SUPERVGUI_BrowseNodeDlg.h" +#include + class SUPERVGUI_Main; @@ -160,11 +162,11 @@ class SUPERVGUI_PortParamsDlg: public QDialog { ~SUPERVGUI_PortParamsDlg() {}; QString getName() { return myNameTxt->text(); } - QString getType() { return myTypeTxt->text(); } + QString getType() { return myTypeTxt->currentText(); } private: QLineEdit* myNameTxt; - QLineEdit* myTypeTxt; + QComboBox* myTypeTxt; }; diff --git a/src/SUPERVGUI/SUPERVGUI_Port.cxx b/src/SUPERVGUI/SUPERVGUI_Port.cxx index 842687e..335d050 100644 --- a/src/SUPERVGUI/SUPERVGUI_Port.cxx +++ b/src/SUPERVGUI/SUPERVGUI_Port.cxx @@ -200,7 +200,7 @@ void SUPERVGUI_PortIn::sync() { void SUPERVGUI_PortIn::setValue(const char* d) { Trace("SUPERVGUI_PortIn::setValue") - if (port->Input((*Supervision.getEngine())->StringValue(d))) { + if (port->Input(Supervision.getEngine()->StringValue(d))) { sync(); } else { QMessageBox::warning(QAD_Application::getDesktop(), tr("ERROR"), tr("MSG_CANT_SETVAL")); @@ -237,10 +237,11 @@ void SUPERVGUI_PortIn::browse() { QPoint SUPERVGUI_PortIn::getConnectPnt() { // Parent widget is internal node frame // parent of parent is node it self - QWidget* aNode = parentWidget()->parentWidget(); + QWidget* aNode = parentWidget()->parentWidget()->parentWidget(); QPoint aPnt(aNode->pos()); // position of the node if (parentWidget()->isVisible()) { + aPnt += parentWidget()->parentWidget()->pos(); aPnt += parentWidget()->pos(); return QPoint(aPnt.x() + pos().x(), aPnt.y() + (pos().y() + height()/2)); @@ -355,9 +356,10 @@ void SUPERVGUI_PortOut::browse() { QPoint SUPERVGUI_PortOut::getConnectPnt() { // Parent widget is internal node frame // parent of parent is node it self - QWidget* aNode = parentWidget()->parentWidget(); + QWidget* aNode = parentWidget()->parentWidget()->parentWidget(); QPoint aPnt(aNode->pos()); // position of the node if (parentWidget()->isVisible()) { + aPnt += parentWidget()->parentWidget()->pos(); aPnt += parentWidget()->pos(); return QPoint(aPnt.x() + pos().x() + width(), aPnt.y() + (pos().y() + height()/2)); @@ -436,7 +438,7 @@ void SUPERVGUI_PortInESNode::sync() { void SUPERVGUI_PortInESNode::setValue(const char* d) { Trace("SUPERVGUI_PortIn::setValue") - if (port->Input((*Supervision.getEngine())->StringValue(d))) { + if (port->Input(Supervision.getEngine()->StringValue(d))) { sync(); } else { QMessageBox::warning(QAD_Application::getDesktop(), tr("ERROR"), tr("MSG_CANT_SETVAL")); @@ -447,10 +449,11 @@ void SUPERVGUI_PortInESNode::setValue(const char* d) { * Returns coordinates of connection point in content coordinates */ QPoint SUPERVGUI_PortInESNode::getConnectPnt() { - QWidget* aNode = parentWidget()->parentWidget(); + QWidget* aNode = parentWidget()->parentWidget()->parentWidget(); QPoint aPnt(aNode->pos()); if (parentWidget()->isVisible()) { + aPnt += parentWidget()->parentWidget()->pos(); aPnt += parentWidget()->pos(); return QPoint(aPnt.x() + pos().x(), aPnt.y() + (pos().y() + height()/2)); diff --git a/src/SUPERVGUI/SUPERV_msg_en.po b/src/SUPERVGUI/SUPERV_msg_en.po index 00b51c3..1b0a8d8 100644 --- a/src/SUPERVGUI/SUPERV_msg_en.po +++ b/src/SUPERVGUI/SUPERV_msg_en.po @@ -478,7 +478,7 @@ msgid "POP_SHOW" msgstr "Show" msgid "POP_SHOWTITLES" -msgstr "Comment" +msgstr "Label" msgid "POP_SHOWPORTS" msgstr "Ports" @@ -609,3 +609,5 @@ msgstr "Can't create node" msgid "MSG_PORT_EXIST" msgstr "Port with such name already exists" +msgid "MSG_CANT_CREATE_PORT" +msgstr "Port with empty Name and empty Type can not be created" diff --git a/src/Supervision/CNode_Impl.cxx b/src/Supervision/CNode_Impl.cxx index ebcc16b..860dd16 100644 --- a/src/Supervision/CNode_Impl.cxx +++ b/src/Supervision/CNode_Impl.cxx @@ -12,10 +12,10 @@ using namespace std; #include #include -#include +//#include #include -#include "utilities.h" +//#include "utilities.h" #include "Graph_Impl.hxx" @@ -35,7 +35,7 @@ CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb , // << hex << (void *) this << dec ) // _thisObj = this ; // _id = _poa->activate_object(_thisObj); - MESSAGE( "CNode_Impl::CNode_Impl " << aDataFlowName << " " ); +// MESSAGE( "CNode_Impl::CNode_Impl " << aDataFlowName << " " ); beginService( "CNode_Impl::CNode_Impl" ); _Orb = CORBA::ORB::_duplicate(orb); _Poa = poa ; @@ -60,12 +60,13 @@ CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb , const char * FuncName , const SUPERV::ListOfStrings & PythonFunction ) : Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) { -// beginService( "CNode_Impl::CNode_Impl" ); - if ( FuncName && NodeName ) { - cout << "CNode_Impl::CNode_Impl " << (void *) NodeName << " " << NodeName - << " " << strlen(NodeName) << " " << (void *) FuncName << " " << FuncName - << " " << strlen( FuncName ) << endl ; - } + beginService( "CNode_Impl::CNode_Impl" ); +// cout << "CNode_Impl::CNode_Impl -->" << endl ; +// if ( FuncName && NodeName ) { +// cout << "CNode_Impl::CNode_Impl " << (void *) NodeName << " " << NodeName +// << " " << strlen(NodeName) << " " << (void *) FuncName << " " << FuncName +// << " " << strlen( FuncName ) << endl ; +// } if ( NodeKindOfNode == SUPERV::ComputingNode ) { MESSAGE( "CNode_Impl::CNode_Impl " << FuncName << " _poa->activate_object" ); _thisObj = this ; @@ -88,7 +89,8 @@ CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb , aFuncName , aPythonFunction ) ; _IsNode = true ; -// endService( "CNode_Impl::CNode_Impl" ); + endService( "CNode_Impl::CNode_Impl" ); +// cout << "<-- CNode_Impl::CNode_Impl" << endl ; } CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb , @@ -653,7 +655,7 @@ SUPERV::Port_ptr CNode_Impl::Input( const char * ToServiceParameterName , bool sts = false ; GraphBase::InPort * anInPort ; if ( _IsNode ) { - sts = _DataFlowExecutor->ChangeInputData( _DataFlowEditor->Name() , + sts = _DataFlowExecutor->ChangeInputData( _DataFlowNode->Name() , ToServiceParameterName , *aValue->ToAny() ) ; anInPort = _DataFlowNode->GetChangeInPort( ToServiceParameterName ) ; @@ -698,18 +700,25 @@ SUPERV::Port_ptr CNode_Impl::Input( const char * ToServiceParameterName , SUPERV::ListOfPorts * CNode_Impl::Ports() { bool begin = true ; SUPERV::ListOfPorts_var RetVal = new SUPERV::ListOfPorts ; -// if ( !_DataFlowNode->IsDataFlowNode() ) { if ( _IsNode ) { int i , j ; RetVal->length( _DataFlowNode->GetNodeInPortsSize() + _DataFlowNode->GetNodeOutPortsSize() ) ; for ( i = 0 ; i < _DataFlowNode->GetNodeInPortsSize() ; i++ ) { GraphBase::InPort * anInPort = _DataFlowNode->GetChangeNodeInPort( i ) ; - if ( CORBA::is_nil( anInPort->ObjRef() ) ) { - if ( begin ) { - beginService( "CNode_Impl::Ports" ); - begin = false ; - } + if ( begin ) { + beginService( "CNode_Impl::Ports" ); + begin = false ; + } + if ( anInPort->IsLoop() || ( anInPort->IsGate() && !anInPort->IsConnected() && + ( _DataFlowEditor->IsExecuting() || _DataFlowEditor->IsReadOnly() ) ) ) { + MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " ignored" ) ; + RetVal[ i ] = SUPERV::Port::_duplicate( SUPERV::Port::_narrow( CORBA::Object::_nil() ) ) ; + } + else if ( CORBA::is_nil( anInPort->ObjRef() ) ) { + MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " IsExecuting " + << _DataFlowEditor->IsExecuting() << " IsGate/IsConnected " << anInPort->IsGate() + << "/" << anInPort->IsConnected() ) ; Port_Impl * myPort ; if ( _DataFlowNode->HasInput( anInPort->PortName() ) ) { const CORBA::Any * anAny = anInPort->GetOutPort()->Value() ; @@ -739,16 +748,23 @@ SUPERV::ListOfPorts * CNode_Impl::Ports() { anInPort->ObjRef( SUPERV::Port::_duplicate( iobject ) ) ; } else { + MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() ) ; RetVal[ i ] = SUPERV::Port::_duplicate( anInPort->ObjRef() ) ; } } for ( i = 0 ; i < _DataFlowNode->GetNodeOutPortsSize() ; i++ ) { GraphBase::OutPort * anOutPort = _DataFlowNode->GetChangeNodeOutPort( i ) ; - if ( CORBA::is_nil( anOutPort->ObjRef() ) ) { - if ( begin ) { - beginService( "CNode_Impl::Ports" ); - begin = false ; - } + if ( begin ) { + beginService( "CNode_Impl::Ports" ); + begin = false ; + } + if ( anOutPort->IsLoop() || ( anOutPort->IsGate() && !anOutPort->IsConnected() && + ( _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() ) ) ; + } + else if ( CORBA::is_nil( anOutPort->ObjRef() ) ) { + 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() , @@ -766,9 +782,19 @@ SUPERV::ListOfPorts * CNode_Impl::Ports() { anOutPort->ObjRef( SUPERV::Port::_duplicate( iobject ) ) ; } else { + MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() ) ; RetVal[ _DataFlowNode->GetNodeInPortsSize() + i ] = SUPERV::Port::_duplicate( anOutPort->ObjRef() ) ; } } + for ( i = 0 ; i < (int ) RetVal->length() ; i++ ) { + if ( CORBA::is_nil( RetVal[ i ] ) ) { + for ( j = i ; j < (int ) RetVal->length() - 1 ; j++ ) { + RetVal[ j ] = RetVal[ j + 1 ] ; + } + RetVal->length( RetVal->length() - 1 ) ; + i-- ; + } + } } else { if ( _DataFlowEditor->IsValid() ) { @@ -915,9 +941,10 @@ long CNode_Impl::SubGraph() { } bool CNode_Impl::IsLinked(const char * ServiceParameterName ) { -// beginService( "CNode_Impl::IsLinked" ); + beginService( "CNode_Impl::IsLinked" ); bool RetVal = _DataFlowNode->IsLinked( ServiceParameterName ) ; -// endService( "CNode_Impl::IsLinked" ); + MESSAGE( Name() << "->IsLinked( '" << ServiceParameterName << "' )" ) ; + endService( "CNode_Impl::IsLinked" ); return RetVal ; } @@ -991,7 +1018,7 @@ SUPERV::ControlState CNode_Impl::Control() { } void CNode_Impl::ControlClear() { // beginService( "CNode_Impl::ControlClear" ); - SUPERV::ControlState RetVal = SUPERV::VoidState ; +// SUPERV::ControlState RetVal = SUPERV::VoidState ; GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ; if ( _DataFlowExecutor ) { if ( _IsNode ) { @@ -1342,15 +1369,12 @@ long CNode_Impl::CpuUsed() { GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ; if ( _DataFlowExecutor ) { if ( _IsNode ) { -// RetVal = _DataFlowExecutor->CpuUsed( Name() ) ; + RetVal = _DataFlowExecutor->CpuUsed( Name() ) ; } else { -// RetVal = _DataFlowExecutor->CpuUsed() ; + RetVal = _DataFlowExecutor->CpuUsed() ; } } - else { - return 0 ; - } return RetVal ; } diff --git a/src/Supervision/CNode_Impl.hxx b/src/Supervision/CNode_Impl.hxx index 21ae26f..a642a9f 100644 --- a/src/Supervision/CNode_Impl.hxx +++ b/src/Supervision/CNode_Impl.hxx @@ -12,7 +12,7 @@ #ifndef _CNODE_IMPL_HXX_ #define _CNODE_IMPL_HXX_ -#include +#include #include "CORBA.h" @@ -50,9 +50,9 @@ class CNode_Impl : public POA_SUPERV::CNode , const char *interfaceName , GraphEditor::DataFlow * DataFlowEditor , const SALOME_ModuleCatalog::Service &NodeService , - const char * NodeName = NULL , + const char * NodeName = NULLSTRING , const SUPERV::KindOfNode NodeKindOfNode = SUPERV::ComputingNode , - const char * aFuncName = NULL , + const char * aFuncName = NULLSTRING , const SUPERV::ListOfStrings & aPythonFunction = SUPERV::ListOfStrings() ) ; CNode_Impl( CORBA::ORB_ptr orb , PortableServer::POA_ptr poa , @@ -61,7 +61,7 @@ class CNode_Impl : public POA_SUPERV::CNode , const char *interfaceName , GraphEditor::DataFlow * DataFlowEditor , const SALOME_ModuleCatalog::Service &NodeService , - const char * NodeName = NULL , + const char * NodeName = NULLSTRING , const SUPERV::KindOfNode NodeKindOfNode = SUPERV::InLineNode , const GraphBase::ListOfFuncName & aFuncName = GraphBase::ListOfFuncName() , const GraphBase::ListOfPythonFunctions & aPythonFunction = GraphBase::ListOfPythonFunctions() ) ; diff --git a/src/Supervision/ELNode_Impl.cxx b/src/Supervision/ELNode_Impl.cxx index 39be6fe..d58c3ab 100644 --- a/src/Supervision/ELNode_Impl.cxx +++ b/src/Supervision/ELNode_Impl.cxx @@ -12,10 +12,10 @@ using namespace std; #include #include -#include +//#include #include -#include "utilities.h" +//#include "utilities.h" #include "ELNode_Impl.hxx" diff --git a/src/Supervision/ELNode_Impl.hxx b/src/Supervision/ELNode_Impl.hxx index 30b1d8a..db339c6 100644 --- a/src/Supervision/ELNode_Impl.hxx +++ b/src/Supervision/ELNode_Impl.hxx @@ -12,7 +12,7 @@ #ifndef _ELNODE_IMPL_HXX_ #define _ELNODE_IMPL_HXX_ -#include +//#include #include "CORBA.h" diff --git a/src/Supervision/ESNode_Impl.cxx b/src/Supervision/ESNode_Impl.cxx index 5b20b25..8e096aa 100644 --- a/src/Supervision/ESNode_Impl.cxx +++ b/src/Supervision/ESNode_Impl.cxx @@ -12,10 +12,10 @@ using namespace std; #include #include -#include +//#include #include -#include "utilities.h" +//#include "utilities.h" #include "ESNode_Impl.hxx" @@ -34,10 +34,10 @@ ESNode_Impl::ESNode_Impl( CORBA::ORB_ptr orb , GNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , FuncName , SUPERV::ListOfStrings() , NodeKindOfNode ) { // MESSAGE( NodeName << " " ); beginService( "ESNode_Impl::ESNode_Impl" ); - if ( FuncName ) { - cout << "ESNode_Impl::GNode_Impl " << (void *) FuncName << " " << FuncName - << " " << strlen( FuncName ) << endl ; - } +// if ( FuncName ) { +// cout << "ESNode_Impl::GNode_Impl " << (void *) FuncName << " " << FuncName +// << " " << strlen( FuncName ) << endl ; +// } _thisObj = this ; _id = _poa->activate_object(_thisObj); _Orb = CORBA::ORB::_duplicate(orb); diff --git a/src/Supervision/ESNode_Impl.hxx b/src/Supervision/ESNode_Impl.hxx index 48d6886..944e3f4 100644 --- a/src/Supervision/ESNode_Impl.hxx +++ b/src/Supervision/ESNode_Impl.hxx @@ -12,7 +12,7 @@ #ifndef _ESNODE_IMPL_HXX_ #define _ESNODE_IMPL_HXX_ -#include +//#include #include "CORBA.h" diff --git a/src/Supervision/FNode_Impl.cxx b/src/Supervision/FNode_Impl.cxx index 130ecad..49e6e5c 100644 --- a/src/Supervision/FNode_Impl.cxx +++ b/src/Supervision/FNode_Impl.cxx @@ -12,10 +12,10 @@ using namespace std; #include #include -#include +//#include #include -#include "utilities.h" +//#include "utilities.h" #include "FNode_Impl.hxx" @@ -23,20 +23,21 @@ FNode_Impl::FNode_Impl() { } FNode_Impl::FNode_Impl( CORBA::ORB_ptr orb , - PortableServer::POA_ptr poa , - PortableServer::ObjectId * contId , - const char *instanceName , - const char *interfaceName , - GraphEditor::DataFlow * aDataFlowEditor , - const SALOME_ModuleCatalog::Service &NodeService , - const char * NodeComponentName , - const char * NodeInterfaceName , - const char * NodeName , - const SUPERV::KindOfNode NodeKindOfNode ) : + PortableServer::POA_ptr poa , + PortableServer::ObjectId * contId , + const char * instanceName , + const char * interfaceName , + GraphEditor::DataFlow * aDataFlowEditor , + const SALOME_ModuleCatalog::Service &NodeService , + const char * NodeComponentName , + const char * NodeInterfaceName , + const char * NodeName , + const SUPERV::KindOfNode NodeKindOfNode ) : // Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) { - CNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , NodeService , NodeName , NodeKindOfNode , (char * ) NULL ) { - MESSAGE( NodeName << " " ); -// beginService( "FNode_Impl::FNode_Impl" ); + CNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , NodeService , NodeName , NodeKindOfNode , NULLSTRING ) { +// MESSAGE( NodeName << " " ); + beginService( "FNode_Impl::FNode_Impl" ); +// cout << "FNode_Impl::FNode_Impl -->" << endl ; _thisObj = this ; _id = _poa->activate_object(_thisObj); _Orb = CORBA::ORB::_duplicate(orb); @@ -47,16 +48,17 @@ FNode_Impl::FNode_Impl( CORBA::ORB_ptr orb , // NodeKindOfNode ) ) ; DataFlowNode()->ComponentName( NodeComponentName ) ; DataFlowNode()->InterfaceName( NodeInterfaceName ) ; -// endService( "FNode_Impl::FNode_Impl" ); + endService( "FNode_Impl::FNode_Impl" ); +// cout << "<-- FNode_Impl::FNode_Impl" << endl ; } FNode_Impl::FNode_Impl( CORBA::ORB_ptr orb , - PortableServer::POA_ptr poa , - PortableServer::ObjectId * contId , - const char *instanceName , - const char *interfaceName , - GraphEditor::DataFlow * aDataFlowEditor , - GraphEditor::InNode * aDataFlowNode ) : + PortableServer::POA_ptr poa , + PortableServer::ObjectId * contId , + const char * instanceName , + const char * interfaceName , + GraphEditor::DataFlow * aDataFlowEditor , + 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() << " " ); diff --git a/src/Supervision/FNode_Impl.hxx b/src/Supervision/FNode_Impl.hxx index 295113a..0b9105e 100644 --- a/src/Supervision/FNode_Impl.hxx +++ b/src/Supervision/FNode_Impl.hxx @@ -12,7 +12,7 @@ #ifndef _FNODE_IMPL_HXX_ #define _FNODE_IMPL_HXX_ -#include +//#include #include "CORBA.h" @@ -40,25 +40,25 @@ class FNode_Impl : public CNode_Impl , FNode_Impl( CORBA::ORB_ptr orb , PortableServer::POA_ptr poa , PortableServer::ObjectId * contId , - const char *instanceName , - const char *interfaceName , - const char *aDataFlowName ) ; + const char * instanceName , + const char * interfaceName , + const char * aDataFlowName ) ; FNode_Impl( CORBA::ORB_ptr orb , PortableServer::POA_ptr poa , PortableServer::ObjectId * contId , - const char *instanceName , - const char *interfaceName , + const char * instanceName , + const char * interfaceName , GraphEditor::DataFlow * DataFlowEditor , const SALOME_ModuleCatalog::Service &NodeService , const char * NodeComponentName , const char * NodeInterfaceName , - const char * NodeName = NULL , + const char * NodeName = NULLSTRING , const SUPERV::KindOfNode NodeKindOfNode = SUPERV::FactoryNode ) ; FNode_Impl( CORBA::ORB_ptr orb , PortableServer::POA_ptr poa , PortableServer::ObjectId * contId , - const char *instanceName , - const char *interfaceName , + const char * instanceName , + const char * interfaceName , GraphEditor::DataFlow * DataFlowEditor , GraphEditor::InNode * DataFlowNode ) ; virtual ~FNode_Impl() ; diff --git a/src/Supervision/GNode_Impl.cxx b/src/Supervision/GNode_Impl.cxx index 5d0951c..bee2651 100644 --- a/src/Supervision/GNode_Impl.cxx +++ b/src/Supervision/GNode_Impl.cxx @@ -12,10 +12,10 @@ using namespace std; #include #include -#include +//#include #include -#include "utilities.h" +//#include "utilities.h" #include "GNode_Impl.hxx" @@ -36,8 +36,8 @@ GNode_Impl::GNode_Impl( CORBA::ORB_ptr orb , // MESSAGE( NodeName << " " ); beginService( "GNode_Impl::GNode_Impl" ); if ( FuncName ) { - cout << "GNode_Impl::GNode_Impl " << (void *) FuncName << " " << FuncName - << " " << strlen( FuncName ) << endl ; +// cout << "GNode_Impl::GNode_Impl " << (void *) FuncName << " " << FuncName +// << " " << strlen( FuncName ) << endl ; } if ( NodeKindOfNode == SUPERV::GOTONode ) { _thisObj = this ; diff --git a/src/Supervision/GNode_Impl.hxx b/src/Supervision/GNode_Impl.hxx index 840ea23..ca6cff4 100644 --- a/src/Supervision/GNode_Impl.hxx +++ b/src/Supervision/GNode_Impl.hxx @@ -12,7 +12,7 @@ #ifndef _GNODE_IMPL_HXX_ #define _GNODE_IMPL_HXX_ -#include +//#include #include "CORBA.h" @@ -67,7 +67,7 @@ class GNode_Impl : public INode_Impl , virtual bool SetCoupled( const char * anInLineNode ) { GraphBase::InLineNode * CoupledINode = (GraphBase::InLineNode * ) DataFlowEditor()->GetGraphNode( anInLineNode ) ; - cout << Name() << ".SetCoupled " << anInLineNode << endl ; +// cout << Name() << ".SetCoupled " << anInLineNode << endl ; if ( CoupledINode && ( IsGOTO() && ( CoupledINode->IsInLineNode() || CoupledINode->IsLoopNode() || CoupledINode->IsSwitchNode() ) ) || @@ -86,15 +86,15 @@ class GNode_Impl : public INode_Impl , DataFlowEditor()->AddLink( Name() , "OutGate" , CoupledINode->Name() , "InGate" ) ; } - cout << "SetCoupled " << CoupledINode->Name() << endl ; +// cout << "SetCoupled " << CoupledINode->Name() << endl ; return true ; } - cout << Name() << ".SetCoupled ERROR " << anInLineNode << " " << CoupledINode - << " of " << Kind() ; - if ( CoupledINode ) { - cout << " kinfOkCoupled " << CoupledINode->Kind() ; - } - cout << endl ; +// cout << Name() << ".SetCoupled ERROR " << anInLineNode << " " << CoupledINode +// << " of " << Kind() ; +// if ( CoupledINode ) { +// cout << " kinfOkCoupled " << CoupledINode->Kind() ; +// } +// cout << endl ; return false ; } ; virtual SUPERV::INode_ptr Coupled() ; diff --git a/src/Supervision/Graph_Impl.cxx b/src/Supervision/Graph_Impl.cxx index bfb13ce..531b19f 100644 --- a/src/Supervision/Graph_Impl.cxx +++ b/src/Supervision/Graph_Impl.cxx @@ -29,10 +29,10 @@ using namespace std; #include #include -#include +//#include #include -#include "utilities.h" +//#include "utilities.h" #include "Graph_Impl.hxx" @@ -84,16 +84,13 @@ Graph_Impl::Graph_Impl( CORBA::ORB_ptr orb , _DebugFileName = new char[ strlen( dbgfile.c_str() )+1 ] ; strcpy( _DebugFileName , dbgfile.c_str() ) ; - _NamingService = new SALOME_NamingService(orb); -// _DataFlowEditor = new SALOME_DataFlowEditor_impl( NS ) ; - GraphEditor::DataFlow * aDataFlowEditor = new GraphEditor::DataFlow( - _Orb , _NamingService , - theDataFlowName , - _DebugFileName ) ; + _NamingService = new SALOME_NamingService( orb ) ; + GraphEditor::DataFlow * aDataFlowEditor = new GraphEditor::DataFlow( _Orb , _NamingService , + theDataFlowName , + _DebugFileName ) ; DataFlowEditor( aDataFlowEditor ) ; DataFlowEditor()->SetObjImpl( this ) ; _DataFlowExecutor = NULL ; -// _DataFlowDataNode = DataFlowEditor() ; delete [] theDataFlowName ; endService( "Graph_Impl::Graph_Impl" ); } @@ -257,8 +254,8 @@ SUPERV::CNode_ptr Graph_Impl::CNode( CNode_Impl * myNode = new CNode_Impl( _Orb , _Poa , _ContId , instanceName() , interfaceName() , DataFlowEditor() , - NodeService , (char * ) NULL , - SUPERV::ComputingNode , (char * ) NULL ) ; + NodeService , NULLSTRING , + SUPERV::ComputingNode , NULLSTRING ) ; if ( myNode->DataFlowNode() ) { PortableServer::ObjectId * id = myNode->getId() ; CORBA::Object_var obj = _poa->id_to_reference(*id); @@ -274,7 +271,7 @@ SUPERV::FNode_ptr Graph_Impl::FNode( const char * NodeComponentName , const char * NodeInterfaceName , const SALOME_ModuleCatalog::Service &NodeService ) { - beginService( "Graph_Impl::Node" ); + beginService( "Graph_Impl::FNode" ); SUPERV::FNode_var iobject = SUPERV::FNode::_nil() ; if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() ) { FNode_Impl * myNode = new FNode_Impl( _Orb , _Poa , _ContId , @@ -290,7 +287,7 @@ SUPERV::FNode_ptr Graph_Impl::FNode( myNode->SetObjRef( SUPERV::FNode::_duplicate( iobject ) ) ; } } - endService( "Graph_Impl::Node" ); + endService( "Graph_Impl::FNode" ); return SUPERV::FNode::_duplicate( iobject ) ; } @@ -438,17 +435,17 @@ SUPERV::SNode_ptr Graph_Impl::SNode( else { anEndName += "Switch" ; } - cout << "Graph_Impl::SNode anEndName " << (void *) FuncName << " " << FuncName - << " " << strlen(FuncName) << " " << (void *) anEndName.c_str() << " " - << anEndName.c_str() << endl ; +// cout << "Graph_Impl::SNode anEndName " << (void *) FuncName << " " << FuncName +// << " " << strlen(FuncName) << " " << (void *) anEndName.c_str() << " " +// << anEndName.c_str() << endl ; ESNode_Impl * myEndNode = new ESNode_Impl( _Orb , _Poa , _ContId , instanceName() , interfaceName() , DataFlowEditor() , anEndName.c_str() , SUPERV::EndSwitchNode ) ; - cout << "Graph_Impl::SNode returned anEndName " << (void *) FuncName << " " - << FuncName << " " << strlen(FuncName) << " " << (void *) anEndName.c_str() - << " " << anEndName.c_str() << endl ; +// cout << "Graph_Impl::SNode returned anEndName " << (void *) FuncName << " " +// << FuncName << " " << strlen(FuncName) << " " << (void *) anEndName.c_str() +// << " " << anEndName.c_str() << endl ; PortableServer::ObjectId * endid = myEndNode->getId() ; CORBA::Object_var endobj = _poa->id_to_reference(*endid); iendobject = SUPERV::ESNode::_narrow(endobj) ; @@ -778,9 +775,16 @@ SUPERV::ListOfLinks * Graph_Impl::Links( GraphBase::ComputingNode * theNode , if ( theNode == NULL || ( theNode != NULL && theNode->IsEndSwitchNode() && !strcmp( theNode->Name() , aNode->Name() ) ) ) { - if ( CORBA::is_nil( anOutPort->InPortObjRef( anInPort ) ) ) { + 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::ListOfLinks" ); + beginService( "Graph_Impl::Links" ); begin = false ; } GraphEditor::InNode * anOutNode = NULL ; @@ -825,9 +829,16 @@ SUPERV::ListOfLinks * Graph_Impl::Links( GraphBase::ComputingNode * theNode , if ( theNode || ( toNode->IsEndSwitchNode() && !aNode->IsSwitchNode() ) ) { if ( anInputParam == NULL || !strcmp( anInPort->PortName() , anInputParam ) ) { - if ( CORBA::is_nil( anOutPort->InPortObjRef( anInPort ) ) ) { + if ( anInPort->IsLoop() || anOutPort->IsLoop() || + ( toNode->IsEndLoopNode() && !strcmp( toNode->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::ListOfLinks" ); + beginService( "Graph_Impl::Links" ); begin = false ; } Link_Impl * myLink = new Link_Impl( _Orb , _Poa , _ContId , @@ -857,7 +868,7 @@ SUPERV::ListOfLinks * Graph_Impl::Links( GraphBase::ComputingNode * theNode , } } if ( !begin ) { - endService( "Graph_Impl::ListOfLinks" ); + endService( "Graph_Impl::Links" ); } return ( RetVal._retn() ) ; } @@ -930,7 +941,7 @@ SUPERV::ListOfNodes * Graph_Impl::LevelNodes(long aLevel ) { int i ; SUPERV::ListOfStrings_var Nodes = DataFlowEditor()->LevelNodes( aLevel ) ; // RetVal->length( Nodes->length() ); - for ( i = 0 ; i < Nodes->length() ; i++ ) { + for ( i = 0 ; i < (int ) Nodes->length() ; i++ ) { // char * aNode = Nodes[ i ] ; GraphBase::ComputingNode * aNode = DataFlowEditor()->GetChangeGraphNode( Nodes[ i ] ) ; RetVal = SetNode( RetVal , aNode ) ; @@ -1136,7 +1147,7 @@ bool Graph_Impl::Merge(const SUPERV::Graph_ptr aGraph ) { int i ; map< string , int > aMapOfNodes ; - for ( i = 0 ; i < aGraphNodes->CNodes.length() ; i++ ) { + for ( i = 0 ; i < (int ) aGraphNodes->CNodes.length() ; i++ ) { SUPERV::CNode_var aNode = (aGraphNodes->CNodes)[ i ] ; GraphEditor::InNode * myNode ; GraphBase::ListOfFuncName aFuncName = GraphBase::ListOfFuncName() ; @@ -1144,7 +1155,7 @@ bool Graph_Impl::Merge(const SUPERV::Graph_ptr aGraph ) { myNode = DataFlowEditor()->AddNode( *(aNode->Service()) , "" , "" , - NULL , + NULLSTRING , SUPERV::ComputingNode , aFuncName , aPythonFunction , @@ -1167,7 +1178,7 @@ bool Graph_Impl::Merge(const SUPERV::Graph_ptr aGraph ) { break ; } } - for ( i = 0 ; i < aGraphNodes->FNodes.length() ; i++ ) { + for ( i = 0 ; i < (int ) aGraphNodes->FNodes.length() ; i++ ) { SUPERV::FNode_var aNode = (aGraphNodes->FNodes)[ i ] ; GraphEditor::InNode * myNode ; GraphBase::ListOfFuncName aFuncName = GraphBase::ListOfFuncName() ; @@ -1175,7 +1186,7 @@ bool Graph_Impl::Merge(const SUPERV::Graph_ptr aGraph ) { myNode = DataFlowEditor()->AddNode( *(aNode->Service()) , aNode->GetComponentName() , aNode->GetInterfaceName() , - NULL , + NULLSTRING , SUPERV::ComputingNode , aFuncName , aPythonFunction , @@ -1199,7 +1210,7 @@ bool Graph_Impl::Merge(const SUPERV::Graph_ptr aGraph ) { } } if ( RetVal ) { - for ( i = 0 ; i < aGraphLinks->length() ; i++ ) { + for ( i = 0 ; i < (int ) aGraphLinks->length() ; i++ ) { SUPERV::Link_var aLink = (*aGraphLinks)[ i ] ; SUPERV::Port_var OutPort = aLink->OutPort() ; SUPERV::Port_var InPort = aLink->InPort() ; @@ -1229,7 +1240,7 @@ bool Graph_Impl::Merge(const SUPERV::Graph_ptr aGraph ) { } } if ( RetVal ) { - for ( i = 0 ; i < aGraphPorts->length() ; i++ ) { + for ( i = 0 ; i < (int ) aGraphPorts->length() ; i++ ) { SUPERV::Port_var aPort = (*aGraphPorts)[ i ] ; if ( aPort->HasInput() ) { char * aNode = new char[ strlen( aPort->Name() + 1 ) ] ; diff --git a/src/Supervision/Graph_Impl.hxx b/src/Supervision/Graph_Impl.hxx index 090df65..2560596 100644 --- a/src/Supervision/Graph_Impl.hxx +++ b/src/Supervision/Graph_Impl.hxx @@ -29,7 +29,7 @@ #ifndef _GRAPH_IMPL_HXX_ #define _GRAPH_IMPL_HXX_ -#include +//#include #include "CORBA.h" diff --git a/src/Supervision/INode_Impl.cxx b/src/Supervision/INode_Impl.cxx index 29689d1..dce4335 100644 --- a/src/Supervision/INode_Impl.cxx +++ b/src/Supervision/INode_Impl.cxx @@ -12,10 +12,10 @@ using namespace std; #include #include -#include +//#include #include -#include "utilities.h" +//#include "utilities.h" #include "LNode_Impl.hxx" @@ -56,8 +56,8 @@ INode_Impl::INode_Impl( CORBA::ORB_ptr orb , CNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , SALOME_ModuleCatalog::Service() , FuncName , NodeKindOfNode , FuncName , aPythonFunction ) { beginService( "INode_Impl::INode_Impl" ); if ( FuncName ) { - cout << "INode_Impl::CNode_Impl " << (void *) FuncName << " " << FuncName - << " " << strlen( FuncName ) << endl ; +// cout << "INode_Impl::CNode_Impl " << (void *) FuncName << " " << FuncName +// << " " << strlen( FuncName ) << endl ; } if ( NodeKindOfNode == SUPERV::InLineNode ) { MESSAGE( "INode_Impl::INode_Impl " << FuncName << " _poa->activate_object" ); @@ -184,6 +184,8 @@ SUPERV::Port_ptr INode_Impl::InPort( const char *aParameterName , SUPERV::Port_ptr InEndobject = SUPERV::Port::_nil() ; Port_Impl * myInPort = NULL ; bool InPortCreated = false ; + MESSAGE( "INode_Impl::InPort " << DataFlowNode()->Name() << "->AddInPort( " << aParameterName << " , " + << aParameterType ) ; GraphBase::InPort * anInPort = DataFlowNode()->GetChangeInPort( aParameterName ) ; if ( anInPort == NULL && DataFlowNode()->IsOneOfInLineNodes() ) { anInPort = DataFlowNode()->AddInPort( aParameterName , aParameterType ) ; @@ -225,6 +227,8 @@ SUPERV::Port_ptr INode_Impl::OutPort( const char *aParameterName , const char *aParameterType ) { Port_Impl * myOutPort = NULL ; SUPERV::Port_ptr Outobject = SUPERV::Port::_nil() ; + MESSAGE( "INode_Impl::OutPort " << DataFlowNode()->Name() << "->AddOutPort( " << aParameterName << " , " + << aParameterType ) ; GraphBase::OutPort * anOutPort = DataFlowNode()->GetChangeOutPort( aParameterName ) ; if ( anOutPort == NULL && DataFlowNode()->IsOneOfInLineNodes() ) { anOutPort = DataFlowNode()->AddOutPort( aParameterName , aParameterType ) ; diff --git a/src/Supervision/INode_Impl.hxx b/src/Supervision/INode_Impl.hxx index 4a1fc23..166d686 100644 --- a/src/Supervision/INode_Impl.hxx +++ b/src/Supervision/INode_Impl.hxx @@ -12,7 +12,7 @@ #ifndef _INODE_IMPL_HXX_ #define _INODE_IMPL_HXX_ -#include +//#include #include "CORBA.h" diff --git a/src/Supervision/LNode_Impl.cxx b/src/Supervision/LNode_Impl.cxx index 9389664..2bef195 100644 --- a/src/Supervision/LNode_Impl.cxx +++ b/src/Supervision/LNode_Impl.cxx @@ -12,10 +12,10 @@ using namespace std; #include #include -#include +//#include #include -#include "utilities.h" +//#include "utilities.h" #include "LNode_Impl.hxx" diff --git a/src/Supervision/LNode_Impl.hxx b/src/Supervision/LNode_Impl.hxx index fca0906..2f6805c 100644 --- a/src/Supervision/LNode_Impl.hxx +++ b/src/Supervision/LNode_Impl.hxx @@ -12,7 +12,7 @@ #ifndef _LNODE_IMPL_HXX_ #define _LNODE_IMPL_HXX_ -#include +//#include #include "CORBA.h" diff --git a/src/Supervision/Link_Impl.cxx b/src/Supervision/Link_Impl.cxx index fe2d344..f20bd13 100644 --- a/src/Supervision/Link_Impl.cxx +++ b/src/Supervision/Link_Impl.cxx @@ -29,10 +29,10 @@ using namespace std; #include #include -#include +//#include #include -#include "utilities.h" +//#include "utilities.h" #include "Link_Impl.hxx" @@ -151,8 +151,8 @@ SUPERV::Port_ptr Link_Impl::OutPort() { GraphBase::SLink * Link_Impl::Info() { // beginService( "Link_Impl::Info" ); - char* FromNodeName ; - char* FromServiceParameterName ; +// char* FromNodeName ; +// char* FromServiceParameterName ; GraphBase::SLink * RetVal = _DataFlowEditor->GetLink( _DataFlowNode->ComputingNode() , _InputParameterName ) ; // endService( "Link_Impl::Info" ); diff --git a/src/Supervision/Link_Impl.hxx b/src/Supervision/Link_Impl.hxx index 9413b10..b51245c 100644 --- a/src/Supervision/Link_Impl.hxx +++ b/src/Supervision/Link_Impl.hxx @@ -29,7 +29,7 @@ #ifndef _LINK_IMPL_HXX_ #define _LINK_IMPL_HXX_ -#include +//#include #include "CORBA.h" diff --git a/src/Supervision/Port_Impl.cxx b/src/Supervision/Port_Impl.cxx index 96d13d6..3883bd4 100644 --- a/src/Supervision/Port_Impl.cxx +++ b/src/Supervision/Port_Impl.cxx @@ -29,10 +29,10 @@ using namespace std; #include #include -#include +//#include #include -#include "utilities.h" +//#include "utilities.h" #include "Graph_Impl.hxx" #include "Port_Impl.hxx" @@ -236,8 +236,8 @@ SUPERV::Link_ptr Port_Impl::Link() { beginService( "Port_Impl::Link" ) ; begin = false ; SUPERV::ListOfLinks_var Links = new SUPERV::ListOfLinks ; - cout << "Port_Impl::Link " << _DataFlowNode->Name() << " " - << _DataFlowPort->PortName() << endl ; +// cout << "Port_Impl::Link " << _DataFlowNode->Name() << " " +// << _DataFlowPort->PortName() << endl ; Links = _DataFlowEditor->ObjImpl()->Links( _DataFlowNode->ComputingNode() , _DataFlowPort->PortName() ) ; @@ -261,7 +261,13 @@ SUPERV::Link_ptr Port_Impl::Link() { GraphBase::InPort * anInPort = _DataFlowNode->GetChangeInPort( _DataFlowPort->PortName() ) ; if ( anInPort->GetOutPort() ) { GraphBase::OutPort * anOutPort = anInPort->GetOutPort() ; - if ( CORBA::is_nil( anOutPort->InPortObjRef( anInPort ) ) ) { + if ( _DataFlowNode->IsEndLoopNode() && !strcmp( _DataFlowNode->CoupledNode()->Name() , + anOutPort->NodeName() ) ) { +// MESSAGE( "Link " << anOutPort->NodeName() << "(" +// << anOutPort->PortName() << ") --> " << _DataFlowNode->Name() << "(" +// << anInPort->PortName() << ")" << " ignored" ) ; + } + else if ( CORBA::is_nil( anOutPort->InPortObjRef( anInPort ) ) ) { if ( begin ) { beginService( "Port_Impl::Link" ) ; begin = false ; @@ -294,22 +300,28 @@ SUPERV::Link_ptr Port_Impl::Link() { bool Port_Impl::IsInput() { // beginService( "Port_Impl::IsInput" ) ; bool RetVal = _InputPort ; +// MESSAGE( Name() << "IsInput() " << _InputPort ) ; // endService( "Port_Impl::IsInput" ) ; return RetVal ; } bool Port_Impl::IsLinked() { // beginService( "Port_Impl::IsLinked" ) ; - bool RetVal = true ; -#if 0 - if ( _DataFlowNode->IsEndSwitchNode() && _DataFlowPort->IsBus() ) { + bool RetVal = false ; + GraphBase::InPort * anInPort = _DataFlowNode->GetChangeInPort( _DataFlowPort->PortName() ) ; + GraphBase::OutPort * anOutPort = NULL ; + if ( anInPort) { + anOutPort = anInPort->GetOutPort() ; + } + if ( _DataFlowNode->IsEndLoopNode() && anOutPort && + !strcmp( _DataFlowNode->CoupledNode()->Name() , anOutPort->NodeName() ) ) { +// MESSAGE( "Link " << anOutPort->NodeName() << "(" +// << anOutPort->PortName() << ") --> " << _DataFlowNode->Name() << "(" +// << anInPort->PortName() << ")" << " ignored" ) ; } else { -#endif RetVal = _DataFlowNode->IsLinked( _DataFlowPort->PortName() ) ; -#if 0 } -#endif // endService( "Port_Impl::IsLinked" ) ; return RetVal ; } diff --git a/src/Supervision/Port_Impl.hxx b/src/Supervision/Port_Impl.hxx index 1177c14..51724b0 100644 --- a/src/Supervision/Port_Impl.hxx +++ b/src/Supervision/Port_Impl.hxx @@ -29,7 +29,8 @@ #ifndef _PORT_IMPL_HXX_ #define _PORT_IMPL_HXX_ -#include +#include +#include #include "CORBA.h" diff --git a/src/Supervision/SNode_Impl.cxx b/src/Supervision/SNode_Impl.cxx index b6d2dcd..e716e60 100644 --- a/src/Supervision/SNode_Impl.cxx +++ b/src/Supervision/SNode_Impl.cxx @@ -12,10 +12,10 @@ using namespace std; #include #include -#include +//#include #include -#include "utilities.h" +//#include "utilities.h" #include "SNode_Impl.hxx" diff --git a/src/Supervision/SNode_Impl.hxx b/src/Supervision/SNode_Impl.hxx index 00d59d2..f62169a 100644 --- a/src/Supervision/SNode_Impl.hxx +++ b/src/Supervision/SNode_Impl.hxx @@ -12,7 +12,7 @@ #ifndef _SNODE_IMPL_HXX_ #define _SNODE_IMPL_HXX_ -#include +//#include #include "CORBA.h" diff --git a/src/Supervision/SuperV.py b/src/Supervision/SuperV.py index 09c7cf2..9e3062d 100644 --- a/src/Supervision/SuperV.py +++ b/src/Supervision/SuperV.py @@ -436,7 +436,10 @@ class INode(CNode): self.N = aNode self.N.Verbose = Verbose def Edit( self , FuncName , PyFunc ) : - file = '/tmp/' + FuncName + '.py' + import os + import random + suf = str(random.randrange(1,10000)) + file = '/tmp/' + FuncName + '_' + suf + '.py' i = 0 try : fd = os.open( file , os.O_CREAT | os.O_WRONLY | os.O_TRUNC ) diff --git a/src/Supervision/SuperV_Impl.cxx b/src/Supervision/SuperV_Impl.cxx index 2c13d2e..9f42895 100644 --- a/src/Supervision/SuperV_Impl.cxx +++ b/src/Supervision/SuperV_Impl.cxx @@ -32,12 +32,12 @@ using namespace std; #include #include -#include +//#include #include #include "Python.h" -#include "utilities.h" +//#include "utilities.h" #include "SALOME_Container_i.hxx" @@ -455,6 +455,9 @@ SUPERV::Value_ptr SuperV_Impl::StringValue( const char * aStrIOR ) { } catch ( CORBA::BAD_PARAM ) { +// JR : objref or string only ==> the eventual convertion to long or double is done in +// the SuperVisionEngine with the real type of the argument +#if 0 long l; double d; if ( strchr( aStrIOR , '.' ) != NULL && @@ -469,9 +472,12 @@ SUPERV::Value_ptr SuperV_Impl::StringValue( const char * aStrIOR ) { // return(anAny); } else { +#endif *anAny <<= aStrIOR ; // MESSAGE( "Value( " << aStrIOR << " ) --> string " << aStrIOR ); +#if 0 } +#endif } // endService( "SuperV_Impl::StringValue" ); diff --git a/src/Supervision/SuperV_Impl.hxx b/src/Supervision/SuperV_Impl.hxx index e67a30d..bce58f1 100644 --- a/src/Supervision/SuperV_Impl.hxx +++ b/src/Supervision/SuperV_Impl.hxx @@ -29,7 +29,7 @@ #ifndef _SUPERV_IMPL_HXX_ #define _SUPERV_IMPL_HXX_ -#include +#include #include "CORBA.h" diff --git a/src/Supervision/Value_Impl.cxx b/src/Supervision/Value_Impl.cxx index bd87bcb..1a226c1 100644 --- a/src/Supervision/Value_Impl.cxx +++ b/src/Supervision/Value_Impl.cxx @@ -29,10 +29,11 @@ using namespace std; #include #include -#include +//#include +//#include #include -#include "utilities.h" +//#include "utilities.h" #include "Value_Impl.hxx" @@ -190,7 +191,7 @@ CORBA::Any * Value_Impl::ToAny() { } char * Value_Impl::ToString() { -// beginService( "Value_Impl::ToString" ); + beginService( "Value_Impl::ToString" ); CORBA::Any anAny = *ToAny() ; // cout << "Value_Impl::ToString " << _DataFlowNode->Name() << " " // << _ParameterName << " " ; @@ -235,49 +236,59 @@ char * Value_Impl::ToString() { } } } - char* retstr ; + ostringstream astr ; + const char * retstr ; + int startstr = 0 ; switch (anAny.type()->kind()) { case CORBA::tk_string: { anAny >>= retstr; // MESSAGE( "ToString( string ) " << retstr ); break ; } - case CORBA::tk_double: { - double d; - anAny >>= d; - retstr = new char[13]; - snprintf(retstr, 13, "%lf", d); -// MESSAGE( "ToString( double ) " << retstr ); - break ; - } case CORBA::tk_long: { long l; anAny >>= l; - retstr = new char[13]; - snprintf(retstr, 13, "%ld", l); -// MESSAGE( "ToString( long ) " << retstr ); + astr << l << ends ; + retstr = astr.str().c_str() ; +// retstr = new char[13]; +// snprintf(retstr, 13, "%ld", l); +// MESSAGE( "ToString( long ) " << l << " " << retstr ); + break ; + } + case CORBA::tk_double: { + double d; + anAny >>= d; + astr << setw(25) << setprecision(18) << d << ends ; + retstr = astr.str().c_str() ; +// retstr = new char[13]; +// snprintf(retstr, 13, "%lf", d); + int i = 0 ; + while ( i < (int ) strlen( retstr ) && retstr[ i++ ] == ' ' ) { + startstr = i - 1 ; + } + MESSAGE( "ToString( double ) '" << d << "' '" << retstr << "' '" << &retstr[ startstr ] << "'"); break ; } case CORBA::tk_objref: { CORBA::Object_ptr obj ; try { anAny >>= obj ; - retstr = _Orb->object_to_string(obj ); + retstr = _Orb->object_to_string( obj ); // MESSAGE( "ToString( object ) " << retstr ); } catch ( ... ) { - retstr = "Unknown CORBA::Any Type" ; + retstr = "object_to_string catched " ; } break ; } default: { retstr = "Unknown CORBA::Any Type" ; -// MESSAGE( retstr ); + MESSAGE( retstr ); break ; } } -// endService( "Value_Impl::ToString" ); - return CORBA::string_dup( retstr ) ; + endService( "Value_Impl::ToString" ); + return CORBA::string_dup( &retstr[ startstr ] ) ; } bool Value_Impl::IsIOR() { diff --git a/src/Supervision/Value_Impl.hxx b/src/Supervision/Value_Impl.hxx index dbe0c65..da02747 100644 --- a/src/Supervision/Value_Impl.hxx +++ b/src/Supervision/Value_Impl.hxx @@ -29,7 +29,7 @@ #ifndef _VALUE_IMPL_HXX_ #define _VALUE_IMPL_HXX_ -#include +//#include #include "CORBA.h" @@ -37,6 +37,7 @@ #include "SALOME_Component_i.hxx" #include "SALOME_LifeCycleCORBA.hxx" +#include "DataFlowBase_Base.hxx" #include "DataFlowEditor_DataFlow.hxx" class Value_Impl : public POA_SUPERV::Value , diff --git a/src/Supervision/batchmode_SuperV.py b/src/Supervision/batchmode_SuperV.py index 34f0d8e..5d79f84 100644 --- a/src/Supervision/batchmode_SuperV.py +++ b/src/Supervision/batchmode_SuperV.py @@ -466,6 +466,7 @@ class INode(CNode): self.N = aNode self.N.Verbose = Verbose def Edit( self , FuncName , PyFunc ) : + import os file = '/tmp/' + FuncName + '.py' i = 0 fd = os.open( file , os.O_CREAT | os.O_WRONLY | os.O_TRUNC ) -- 2.30.2