X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=examples%2FGraphConvertIORCheck.py;fp=examples%2FGraphConvertIORCheck.py;h=9830a9754805c9f32aa6dbe0a4d05bd2e548d8d2;hb=1d2f06baebfd54f8f3be9e2179b1401236824df8;hp=0000000000000000000000000000000000000000;hpb=139607da5103e5f3d4a20caa0ac769b82e31cbd8;p=modules%2Fsuperv.git diff --git a/examples/GraphConvertIORCheck.py b/examples/GraphConvertIORCheck.py new file mode 100755 index 0000000..9830a97 --- /dev/null +++ b/examples/GraphConvertIORCheck.py @@ -0,0 +1,79 @@ + +# Generated python file of Graph GraphConvertIORCheck + +from SuperV import * +# Graph creation +GraphConvertIORCheck = Graph( 'GraphConvertIORCheck' ) +GraphConvertIORCheck.SetName( 'GraphConvertIORCheck' ) +GraphConvertIORCheck.SetAuthor( 'JR' ) +GraphConvertIORCheck.SetComment( 'Check conversions of IOR' ) +GraphConvertIORCheck.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +MiscTypes = GraphConvertIORCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'MiscTypes' ) +MiscTypes.SetName( 'MiscTypes' ) +MiscTypes.SetAuthor( '' ) +MiscTypes.SetContainer( 'localhost/FactoryServer' ) +MiscTypes.SetComment( 'MiscTypes from TypesCheck' ) +MiscTypes.Coords( 284 , 28 ) + +# Creation of InLine Nodes +PySyrComponent = [] +PySyrComponent.append( 'from LifeCycleCORBA import * ' ) +PySyrComponent.append( 'def SyrComponent( aContainer , aComponent ) : ' ) +PySyrComponent.append( ' print "SyrComponent(",aContainer,",",aComponent,")" ' ) +PySyrComponent.append( ' orb = CORBA.ORB_init([], CORBA.ORB_ID) ' ) +PySyrComponent.append( ' print "SyrComponent orb",orb ' ) +PySyrComponent.append( ' lcc = LifeCycleCORBA(orb) ' ) +PySyrComponent.append( ' print "SyrComponent lcc",lcc ' ) +PySyrComponent.append( ' print "SyrComponent(",aContainer,",",aComponent,")" ' ) +PySyrComponent.append( ' ComponentRef = lcc.FindOrLoadComponent( aContainer , aComponent ) ' ) +PySyrComponent.append( ' print "SyrComponent(",aContainer,",",aComponent,") --> ",ComponentRef ' ) +PySyrComponent.append( ' IOR = orb.object_to_string( ComponentRef ) ' ) +PySyrComponent.append( ' return IOR ' ) +PySyrComponent.append( ' ' ) +SyrComponent = GraphConvertIORCheck.INode( 'SyrComponent' , PySyrComponent ) +SyrComponent.InPort( 'aContainer' , 'string' ) +SyrComponent.InPort( 'aComponent' , 'string' ) +SyrComponent.OutPort( 'anIOR' , 'string' ) +SyrComponent.SetName( 'SyrComponent' ) +SyrComponent.SetAuthor( 'JR' ) +SyrComponent.SetComment( 'InLine Node' ) +SyrComponent.Coords( 14 , 114 ) + +# Creation of Links +SyrComponentanIOR = SyrComponent.Port( 'anIOR' ) +MiscTypesInShort = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InShort' ) ) + +MiscTypesInString = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InString' ) ) + +MiscTypesInBool = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InBool' ) ) + +MiscTypesInChar = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InChar' ) ) + +MiscTypesInLong = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InLong' ) ) + +MiscTypesInFloat = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InFloat' ) ) + +MiscTypesInDouble = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InDouble' ) ) + +MiscTypesInObjRef = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InObjRef' ) ) + +# Creation of Input datas +SyrComponentaContainer = SyrComponent.Input( 'aContainer' , 'FactoryServerPy') +SyrComponentaComponent = SyrComponent.Input( 'aComponent' , 'SyrControlComponent') + +# Creation of Output variables +MiscTypesOutString = MiscTypes.Port( 'OutString' ) +MiscTypesOutBool = MiscTypes.Port( 'OutBool' ) +MiscTypesOutChar = MiscTypes.Port( 'OutChar' ) +MiscTypesOutShort = MiscTypes.Port( 'OutShort' ) +MiscTypesOutLong = MiscTypes.Port( 'OutLong' ) +MiscTypesOutFloat = MiscTypes.Port( 'OutFloat' ) +MiscTypesOutDouble = MiscTypes.Port( 'OutDouble' ) +MiscTypesOutObjRef = MiscTypes.Port( 'OutObjRef' ) + +GraphConvertIORCheck.Run() +GraphConvertIORCheck.DoneW() +GraphConvertIORCheck.PrintPorts()