Salome HOME
Copyrights update 2015.
[samples/datafiles.git] / Superv / Python / GraphConvertIORCheck.py
1 # Copyright (C) 2007-2015  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, or (at your option) any later version.
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
23 # Generated python file of Graph GraphConvertIORCheck
24 #
25 from SuperV import *
26 # Graph creation 
27 GraphConvertIORCheck = Graph( 'GraphConvertIORCheck' )
28 GraphConvertIORCheck.SetName( 'GraphConvertIORCheck' )
29 GraphConvertIORCheck.SetAuthor( 'JR' )
30 GraphConvertIORCheck.SetComment( 'Check conversions of IOR' )
31 GraphConvertIORCheck.Coords( 0 , 0 )
32
33 # Creation of Factory Nodes
34
35 MiscTypes = GraphConvertIORCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'MiscTypes' )
36 MiscTypes.SetName( 'MiscTypes' )
37 MiscTypes.SetAuthor( '' )
38 MiscTypes.SetContainer( 'localhost/FactoryServer' )
39 MiscTypes.SetComment( 'MiscTypes from TypesCheck' )
40 MiscTypes.Coords( 284 , 28 )
41
42 # Creation of InLine Nodes
43 PySyrComponent = []
44 PySyrComponent.append( 'from LifeCycleCORBA import *       ' )
45 PySyrComponent.append( 'def SyrComponent( aContainer , aComponent ) :       ' )
46 PySyrComponent.append( '    print "SyrComponent(",aContainer,",",aComponent,")"       ' )
47 PySyrComponent.append( '    orb = CORBA.ORB_init([], CORBA.ORB_ID)       ' )
48 PySyrComponent.append( '    print "SyrComponent orb",orb     ' )
49 PySyrComponent.append( '    lcc = LifeCycleCORBA(orb)       ' )
50 PySyrComponent.append( '    print "SyrComponent lcc",lcc     ' )
51 PySyrComponent.append( '    print "SyrComponent(",aContainer,",",aComponent,")"       ' )
52 PySyrComponent.append( '    ComponentRef = lcc.FindOrLoadComponent( aContainer , aComponent )       ' )
53 PySyrComponent.append( '    print "SyrComponent(",aContainer,",",aComponent,") --> ",ComponentRef       ' )
54 PySyrComponent.append( '    IOR = orb.object_to_string( ComponentRef )  ' )
55 PySyrComponent.append( '    return IOR  ' )
56 PySyrComponent.append( ' ' )
57 SyrComponent = GraphConvertIORCheck.INode( 'SyrComponent' , PySyrComponent )
58 SyrComponent.InPort( 'aContainer' , 'string' )
59 SyrComponent.InPort( 'aComponent' , 'string' )
60 SyrComponent.OutPort( 'anIOR' , 'string' )
61 SyrComponent.SetName( 'SyrComponent' )
62 SyrComponent.SetAuthor( 'JR' )
63 SyrComponent.SetComment( 'InLine Node' )
64 SyrComponent.Coords( 14 , 114 )
65
66 # Creation of Links
67 SyrComponentanIOR = SyrComponent.Port( 'anIOR' )
68 MiscTypesInShort = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InShort' ) )
69
70 MiscTypesInString = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InString' ) )
71
72 MiscTypesInBool = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InBool' ) )
73
74 MiscTypesInChar = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InChar' ) )
75
76 MiscTypesInLong = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InLong' ) )
77
78 MiscTypesInFloat = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InFloat' ) )
79
80 MiscTypesInDouble = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InDouble' ) )
81
82 MiscTypesInObjRef = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InObjRef' ) )
83
84 # Creation of Input datas
85 SyrComponentaContainer = SyrComponent.Input( 'aContainer' , 'FactoryServerPy')
86 SyrComponentaComponent = SyrComponent.Input( 'aComponent' , 'SyrControlComponent')
87
88 # Creation of Output variables
89 MiscTypesOutString = MiscTypes.Port( 'OutString' )
90 MiscTypesOutBool = MiscTypes.Port( 'OutBool' )
91 MiscTypesOutChar = MiscTypes.Port( 'OutChar' )
92 MiscTypesOutShort = MiscTypes.Port( 'OutShort' )
93 MiscTypesOutLong = MiscTypes.Port( 'OutLong' )
94 MiscTypesOutFloat = MiscTypes.Port( 'OutFloat' )
95 MiscTypesOutDouble = MiscTypes.Port( 'OutDouble' )
96 MiscTypesOutObjRef = MiscTypes.Port( 'OutObjRef' )
97
98 GraphConvertIORCheck.Run()
99 GraphConvertIORCheck.DoneW()
100 GraphConvertIORCheck.PrintPorts()