Salome HOME
0f5e47fd12204d2850393c1fd5341fdc61fda842
[samples/datafiles.git] / Superv / Python / GraphConvertIORCheck.py
1 #  Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
2 #
3 #  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 #  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 #
6 #  This library is free software; you can redistribute it and/or
7 #  modify it under the terms of the GNU Lesser General Public
8 #  License as published by the Free Software Foundation; either
9 #  version 2.1 of the License.
10 #
11 #  This library is distributed in the hope that it will be useful,
12 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 #  Lesser General Public License for more details.
15 #
16 #  You should have received a copy of the GNU Lesser General Public
17 #  License along with this library; if not, write to the Free Software
18 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 #
20 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 #
22 # Generated python file of Graph GraphConvertIORCheck
23 #
24 from SuperV import *
25 # Graph creation 
26 GraphConvertIORCheck = Graph( 'GraphConvertIORCheck' )
27 GraphConvertIORCheck.SetName( 'GraphConvertIORCheck' )
28 GraphConvertIORCheck.SetAuthor( 'JR' )
29 GraphConvertIORCheck.SetComment( 'Check conversions of IOR' )
30 GraphConvertIORCheck.Coords( 0 , 0 )
31
32 # Creation of Factory Nodes
33
34 MiscTypes = GraphConvertIORCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'MiscTypes' )
35 MiscTypes.SetName( 'MiscTypes' )
36 MiscTypes.SetAuthor( '' )
37 MiscTypes.SetContainer( 'localhost/FactoryServer' )
38 MiscTypes.SetComment( 'MiscTypes from TypesCheck' )
39 MiscTypes.Coords( 284 , 28 )
40
41 # Creation of InLine Nodes
42 PySyrComponent = []
43 PySyrComponent.append( 'from LifeCycleCORBA import *       ' )
44 PySyrComponent.append( 'def SyrComponent( aContainer , aComponent ) :       ' )
45 PySyrComponent.append( '    print "SyrComponent(",aContainer,",",aComponent,")"       ' )
46 PySyrComponent.append( '    orb = CORBA.ORB_init([], CORBA.ORB_ID)       ' )
47 PySyrComponent.append( '    print "SyrComponent orb",orb     ' )
48 PySyrComponent.append( '    lcc = LifeCycleCORBA(orb)       ' )
49 PySyrComponent.append( '    print "SyrComponent lcc",lcc     ' )
50 PySyrComponent.append( '    print "SyrComponent(",aContainer,",",aComponent,")"       ' )
51 PySyrComponent.append( '    ComponentRef = lcc.FindOrLoadComponent( aContainer , aComponent )       ' )
52 PySyrComponent.append( '    print "SyrComponent(",aContainer,",",aComponent,") --> ",ComponentRef       ' )
53 PySyrComponent.append( '    IOR = orb.object_to_string( ComponentRef )  ' )
54 PySyrComponent.append( '    return IOR  ' )
55 PySyrComponent.append( ' ' )
56 SyrComponent = GraphConvertIORCheck.INode( 'SyrComponent' , PySyrComponent )
57 SyrComponent.InPort( 'aContainer' , 'string' )
58 SyrComponent.InPort( 'aComponent' , 'string' )
59 SyrComponent.OutPort( 'anIOR' , 'string' )
60 SyrComponent.SetName( 'SyrComponent' )
61 SyrComponent.SetAuthor( 'JR' )
62 SyrComponent.SetComment( 'InLine Node' )
63 SyrComponent.Coords( 14 , 114 )
64
65 # Creation of Links
66 SyrComponentanIOR = SyrComponent.Port( 'anIOR' )
67 MiscTypesInShort = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InShort' ) )
68
69 MiscTypesInString = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InString' ) )
70
71 MiscTypesInBool = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InBool' ) )
72
73 MiscTypesInChar = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InChar' ) )
74
75 MiscTypesInLong = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InLong' ) )
76
77 MiscTypesInFloat = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InFloat' ) )
78
79 MiscTypesInDouble = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InDouble' ) )
80
81 MiscTypesInObjRef = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InObjRef' ) )
82
83 # Creation of Input datas
84 SyrComponentaContainer = SyrComponent.Input( 'aContainer' , 'FactoryServerPy')
85 SyrComponentaComponent = SyrComponent.Input( 'aComponent' , 'SyrControlComponent')
86
87 # Creation of Output variables
88 MiscTypesOutString = MiscTypes.Port( 'OutString' )
89 MiscTypesOutBool = MiscTypes.Port( 'OutBool' )
90 MiscTypesOutChar = MiscTypes.Port( 'OutChar' )
91 MiscTypesOutShort = MiscTypes.Port( 'OutShort' )
92 MiscTypesOutLong = MiscTypes.Port( 'OutLong' )
93 MiscTypesOutFloat = MiscTypes.Port( 'OutFloat' )
94 MiscTypesOutDouble = MiscTypes.Port( 'OutDouble' )
95 MiscTypesOutObjRef = MiscTypes.Port( 'OutObjRef' )
96
97 GraphConvertIORCheck.Run()
98 GraphConvertIORCheck.DoneW()
99 GraphConvertIORCheck.PrintPorts()