1 # Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 # Generated python file of Graph GraphConvertObjRefCheck
26 # Graph creation of GraphConvertObjRefCheck
27 def DefGraphConvertObjRefCheck() :
28 GraphConvertObjRefCheck = Graph( 'GraphConvertObjRefCheck' )
29 GraphConvertObjRefCheck.SetName( 'GraphConvertObjRefCheck' )
30 GraphConvertObjRefCheck.SetAuthor( 'JR' )
31 GraphConvertObjRefCheck.SetComment( 'Check conversions of ObjRef' )
32 GraphConvertObjRefCheck.Coords( 0 , 0 )
34 # Creation of Factory Nodes
36 MiscTypes = GraphConvertObjRefCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'MiscTypes' )
37 MiscTypes.SetName( 'MiscTypes' )
38 MiscTypes.SetAuthor( '' )
39 MiscTypes.SetContainer( 'localhost/FactoryServer' )
40 MiscTypes.SetComment( 'MiscTypes from TypesCheck' )
41 MiscTypes.Coords( 284 , 28 )
42 IMiscTypesInString = MiscTypes.GetInPort( 'InString' )
43 IMiscTypesInBool = MiscTypes.GetInPort( 'InBool' )
44 IMiscTypesInChar = MiscTypes.GetInPort( 'InChar' )
45 IMiscTypesInShort = MiscTypes.GetInPort( 'InShort' )
46 IMiscTypesInLong = MiscTypes.GetInPort( 'InLong' )
47 IMiscTypesInFloat = MiscTypes.GetInPort( 'InFloat' )
48 IMiscTypesInDouble = MiscTypes.GetInPort( 'InDouble' )
49 IMiscTypesInObjRef = MiscTypes.GetInPort( 'InObjRef' )
50 IMiscTypesGate = MiscTypes.GetInPort( 'Gate' )
51 OMiscTypesOutString = MiscTypes.GetOutPort( 'OutString' )
52 OMiscTypesOutBool = MiscTypes.GetOutPort( 'OutBool' )
53 OMiscTypesOutChar = MiscTypes.GetOutPort( 'OutChar' )
54 OMiscTypesOutShort = MiscTypes.GetOutPort( 'OutShort' )
55 OMiscTypesOutLong = MiscTypes.GetOutPort( 'OutLong' )
56 OMiscTypesOutFloat = MiscTypes.GetOutPort( 'OutFloat' )
57 OMiscTypesOutDouble = MiscTypes.GetOutPort( 'OutDouble' )
58 OMiscTypesOutObjRef = MiscTypes.GetOutPort( 'OutObjRef' )
59 OMiscTypesGate = MiscTypes.GetOutPort( 'Gate' )
61 # Creation of InLine Nodes
63 PySyrComponent.append( 'from LifeCycleCORBA import * ' )
64 PySyrComponent.append( 'def SyrComponent( aContainer , aComponent ) : ' )
65 PySyrComponent.append( ' print "SyrComponent(",aContainer,",",aComponent,")" ' )
66 PySyrComponent.append( ' orb = CORBA.ORB_init([], CORBA.ORB_ID) ' )
67 PySyrComponent.append( ' print "SyrComponent orb",orb ' )
68 PySyrComponent.append( ' lcc = LifeCycleCORBA(orb) ' )
69 PySyrComponent.append( ' print "SyrComponent lcc",lcc ' )
70 PySyrComponent.append( ' print "SyrComponent(",aContainer,",",aComponent,")" ' )
71 PySyrComponent.append( ' ComponentRef = lcc.FindOrLoadComponent( aContainer , aComponent ) ' )
72 PySyrComponent.append( ' print "SyrComponent(",aContainer,",",aComponent,") --> ",ComponentRef ' )
73 PySyrComponent.append( ' return ComponentRef ' )
74 PySyrComponent.append( '' )
75 SyrComponent = GraphConvertObjRefCheck.INode( 'SyrComponent' , PySyrComponent )
76 SyrComponent.SetName( 'SyrComponent' )
77 SyrComponent.SetAuthor( 'JR' )
78 SyrComponent.SetComment( 'InLine Node' )
79 SyrComponent.Coords( 14 , 114 )
80 ISyrComponentaContainer = SyrComponent.InPort( 'aContainer' , 'string' )
81 ISyrComponentaComponent = SyrComponent.InPort( 'aComponent' , 'string' )
82 ISyrComponentGate = SyrComponent.GetInPort( 'Gate' )
83 OSyrComponentanObjRef = SyrComponent.OutPort( 'anObjRef' , 'objref' )
84 OSyrComponentGate = SyrComponent.GetOutPort( 'Gate' )
87 PyObjRefToInline.append( 'def ObjRefToInline(objRef): ' )
88 PyObjRefToInline.append( ' return objRef ' )
89 ObjRefToInline = GraphConvertObjRefCheck.INode( 'ObjRefToInline' , PyObjRefToInline )
90 ObjRefToInline.SetName( 'ObjRefToInline' )
91 ObjRefToInline.SetAuthor( '' )
92 ObjRefToInline.SetComment( 'Compute Node' )
93 ObjRefToInline.Coords( 496 , 168 )
94 IObjRefToInlinetoInLine = ObjRefToInline.InPort( 'toInLine' , 'int' )
95 IObjRefToInlineGate = ObjRefToInline.GetInPort( 'Gate' )
96 OObjRefToInlineGate = ObjRefToInline.GetOutPort( 'Gate' )
99 LSyrComponentanObjRefMiscTypesInObjRef = GraphConvertObjRefCheck.Link( OSyrComponentanObjRef , IMiscTypesInObjRef )
101 LSyrComponentanObjRefMiscTypesInString = GraphConvertObjRefCheck.Link( OSyrComponentanObjRef , IMiscTypesInString )
103 LMiscTypesOutObjRefObjRefToInlinetoInLine = GraphConvertObjRefCheck.Link( OMiscTypesOutObjRef , IObjRefToInlinetoInLine )
106 ISyrComponentaContainer.Input( 'FactoryServerPy' )
107 ISyrComponentaComponent.Input( 'SyrControlComponent' )
108 IMiscTypesInBool.Input( 138492744 )
109 IMiscTypesInChar.Input( 135402800 )
110 IMiscTypesInShort.Input( 135448464 )
111 IMiscTypesInLong.Input( 135469224 )
112 IMiscTypesInFloat.Input( 65.6954 )
113 IMiscTypesInDouble.Input( 65.6954 )
115 # Output Ports of the graph
116 #OMiscTypesOutString = MiscTypes.GetOutPort( 'OutString' )
117 #OMiscTypesOutBool = MiscTypes.GetOutPort( 'OutBool' )
118 #OMiscTypesOutChar = MiscTypes.GetOutPort( 'OutChar' )
119 #OMiscTypesOutShort = MiscTypes.GetOutPort( 'OutShort' )
120 #OMiscTypesOutLong = MiscTypes.GetOutPort( 'OutLong' )
121 #OMiscTypesOutFloat = MiscTypes.GetOutPort( 'OutFloat' )
122 #OMiscTypesOutDouble = MiscTypes.GetOutPort( 'OutDouble' )
123 return GraphConvertObjRefCheck
126 GraphConvertObjRefCheck = DefGraphConvertObjRefCheck()
128 GraphConvertObjRefCheck.Run()
129 GraphConvertObjRefCheck.DoneW()
130 GraphConvertObjRefCheck.PrintPorts()