Salome HOME
ab38afed2d42d34201f35dda6834496b0ec50411
[samples/datafiles.git] / Superv / Python / GraphConvertObjRefCheckNotCompatible.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 GraphConvertObjRefCheckNotCompatible
23 #
24 from SuperV import *
25
26 # Graph creation of GraphConvertObjRefCheckNotCompatible
27 def DefGraphConvertObjRefCheckNotCompatible() :
28     GraphConvertObjRefCheckNotCompatible = Graph( 'GraphConvertObjRefCheckNotCompatible' )
29     GraphConvertObjRefCheckNotCompatible.SetName( 'GraphConvertObjRefCheckNotCompatible' )
30     GraphConvertObjRefCheckNotCompatible.SetAuthor( 'JR' )
31     GraphConvertObjRefCheckNotCompatible.SetComment( 'Check conversions of ObjRef' )
32     GraphConvertObjRefCheckNotCompatible.Coords( 0 , 0 )
33     
34     # Creation of Factory Nodes
35     
36     MiscTypes = GraphConvertObjRefCheckNotCompatible.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' )
60     
61     # Creation of InLine Nodes
62     PySyrComponent = []
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 = GraphConvertObjRefCheckNotCompatible.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' )
85     
86     PyObjRefToInline = []
87     PyObjRefToInline.append( 'def ObjRefToInline(objRef): ' )
88     PyObjRefToInline.append( '    return objRef ' )
89     ObjRefToInline = GraphConvertObjRefCheckNotCompatible.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' )
97     
98     # Creation of Links
99     LSyrComponentanObjRefMiscTypesInObjRef = GraphConvertObjRefCheckNotCompatible.Link( OSyrComponentanObjRef , IMiscTypesInObjRef )
100     
101     LSyrComponentanObjRefMiscTypesInString = GraphConvertObjRefCheckNotCompatible.Link( OSyrComponentanObjRef , IMiscTypesInString )
102     
103     LSyrComponentanObjRefMiscTypesInBool = GraphConvertObjRefCheckNotCompatible.Link( OSyrComponentanObjRef , IMiscTypesInBool )
104     
105     LSyrComponentanObjRefMiscTypesInChar = GraphConvertObjRefCheckNotCompatible.Link( OSyrComponentanObjRef , IMiscTypesInChar )
106     
107     LSyrComponentanObjRefMiscTypesInShort = GraphConvertObjRefCheckNotCompatible.Link( OSyrComponentanObjRef , IMiscTypesInShort )
108     
109     LSyrComponentanObjRefMiscTypesInLong = GraphConvertObjRefCheckNotCompatible.Link( OSyrComponentanObjRef , IMiscTypesInLong )
110     
111     LSyrComponentanObjRefMiscTypesInFloat = GraphConvertObjRefCheckNotCompatible.Link( OSyrComponentanObjRef , IMiscTypesInFloat )
112     
113     LSyrComponentanObjRefMiscTypesInDouble = GraphConvertObjRefCheckNotCompatible.Link( OSyrComponentanObjRef , IMiscTypesInDouble )
114     
115     LMiscTypesOutObjRefObjRefToInlinetoInLine = GraphConvertObjRefCheckNotCompatible.Link( OMiscTypesOutObjRef , IObjRefToInlinetoInLine )
116     
117     # Input datas
118     ISyrComponentaContainer.Input( 'FactoryServerPy' )
119     ISyrComponentaComponent.Input( 'SyrControlComponent' )
120     
121     # Output Ports of the graph
122     #OMiscTypesOutString = MiscTypes.GetOutPort( 'OutString' )
123     #OMiscTypesOutBool = MiscTypes.GetOutPort( 'OutBool' )
124     #OMiscTypesOutChar = MiscTypes.GetOutPort( 'OutChar' )
125     #OMiscTypesOutShort = MiscTypes.GetOutPort( 'OutShort' )
126     #OMiscTypesOutLong = MiscTypes.GetOutPort( 'OutLong' )
127     #OMiscTypesOutFloat = MiscTypes.GetOutPort( 'OutFloat' )
128     #OMiscTypesOutDouble = MiscTypes.GetOutPort( 'OutDouble' )
129     return GraphConvertObjRefCheckNotCompatible
130
131
132 GraphConvertObjRefCheckNotCompatible = DefGraphConvertObjRefCheckNotCompatible()