Salome HOME
Fix for improvement IPAL9815 : Remove "Add Port" functionality as duplicate of "Edit...
[modules/superv.git] / examples / GraphConvertObjRefCheckNotCompatible.py
1
2 # Generated python file of Graph GraphConvertObjRefCheckNotCompatible
3
4 from SuperV import *
5
6 # Graph creation of GraphConvertObjRefCheckNotCompatible
7 def DefGraphConvertObjRefCheckNotCompatible() :
8     GraphConvertObjRefCheckNotCompatible = Graph( 'GraphConvertObjRefCheckNotCompatible' )
9     GraphConvertObjRefCheckNotCompatible.SetName( 'GraphConvertObjRefCheckNotCompatible' )
10     GraphConvertObjRefCheckNotCompatible.SetAuthor( 'JR' )
11     GraphConvertObjRefCheckNotCompatible.SetComment( 'Check conversions of ObjRef' )
12     GraphConvertObjRefCheckNotCompatible.Coords( 0 , 0 )
13     
14     # Creation of Factory Nodes
15     
16     MiscTypes = GraphConvertObjRefCheckNotCompatible.FNode( 'TypesCheck' , 'TypesCheck' , 'MiscTypes' )
17     MiscTypes.SetName( 'MiscTypes' )
18     MiscTypes.SetAuthor( '' )
19     MiscTypes.SetContainer( 'localhost/FactoryServer' )
20     MiscTypes.SetComment( 'MiscTypes from TypesCheck' )
21     MiscTypes.Coords( 284 , 28 )
22     IMiscTypesInString = MiscTypes.GetInPort( 'InString' )
23     IMiscTypesInBool = MiscTypes.GetInPort( 'InBool' )
24     IMiscTypesInChar = MiscTypes.GetInPort( 'InChar' )
25     IMiscTypesInShort = MiscTypes.GetInPort( 'InShort' )
26     IMiscTypesInLong = MiscTypes.GetInPort( 'InLong' )
27     IMiscTypesInFloat = MiscTypes.GetInPort( 'InFloat' )
28     IMiscTypesInDouble = MiscTypes.GetInPort( 'InDouble' )
29     IMiscTypesInObjRef = MiscTypes.GetInPort( 'InObjRef' )
30     IMiscTypesGate = MiscTypes.GetInPort( 'Gate' )
31     OMiscTypesOutString = MiscTypes.GetOutPort( 'OutString' )
32     OMiscTypesOutBool = MiscTypes.GetOutPort( 'OutBool' )
33     OMiscTypesOutChar = MiscTypes.GetOutPort( 'OutChar' )
34     OMiscTypesOutShort = MiscTypes.GetOutPort( 'OutShort' )
35     OMiscTypesOutLong = MiscTypes.GetOutPort( 'OutLong' )
36     OMiscTypesOutFloat = MiscTypes.GetOutPort( 'OutFloat' )
37     OMiscTypesOutDouble = MiscTypes.GetOutPort( 'OutDouble' )
38     OMiscTypesOutObjRef = MiscTypes.GetOutPort( 'OutObjRef' )
39     OMiscTypesGate = MiscTypes.GetOutPort( 'Gate' )
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( '    return ComponentRef    ' )
54     PySyrComponent.append( '' )
55     SyrComponent = GraphConvertObjRefCheckNotCompatible.INode( 'SyrComponent' , PySyrComponent )
56     SyrComponent.SetName( 'SyrComponent' )
57     SyrComponent.SetAuthor( 'JR' )
58     SyrComponent.SetComment( 'InLine Node' )
59     SyrComponent.Coords( 14 , 114 )
60     ISyrComponentaContainer = SyrComponent.InPort( 'aContainer' , 'string' )
61     ISyrComponentaComponent = SyrComponent.InPort( 'aComponent' , 'string' )
62     ISyrComponentGate = SyrComponent.GetInPort( 'Gate' )
63     OSyrComponentanObjRef = SyrComponent.OutPort( 'anObjRef' , 'objref' )
64     OSyrComponentGate = SyrComponent.GetOutPort( 'Gate' )
65     
66     PyObjRefToInline = []
67     PyObjRefToInline.append( 'def ObjRefToInline(objRef): ' )
68     PyObjRefToInline.append( '    return objRef ' )
69     ObjRefToInline = GraphConvertObjRefCheckNotCompatible.INode( 'ObjRefToInline' , PyObjRefToInline )
70     ObjRefToInline.SetName( 'ObjRefToInline' )
71     ObjRefToInline.SetAuthor( '' )
72     ObjRefToInline.SetComment( 'Compute Node' )
73     ObjRefToInline.Coords( 496 , 168 )
74     IObjRefToInlinetoInLine = ObjRefToInline.InPort( 'toInLine' , 'int' )
75     IObjRefToInlineGate = ObjRefToInline.GetInPort( 'Gate' )
76     OObjRefToInlineGate = ObjRefToInline.GetOutPort( 'Gate' )
77     
78     # Creation of Links
79     LSyrComponentanObjRefMiscTypesInObjRef = GraphConvertObjRefCheckNotCompatible.Link( OSyrComponentanObjRef , IMiscTypesInObjRef )
80     
81     LSyrComponentanObjRefMiscTypesInString = GraphConvertObjRefCheckNotCompatible.Link( OSyrComponentanObjRef , IMiscTypesInString )
82     
83     LSyrComponentanObjRefMiscTypesInBool = GraphConvertObjRefCheckNotCompatible.Link( OSyrComponentanObjRef , IMiscTypesInBool )
84     
85     LSyrComponentanObjRefMiscTypesInChar = GraphConvertObjRefCheckNotCompatible.Link( OSyrComponentanObjRef , IMiscTypesInChar )
86     
87     LSyrComponentanObjRefMiscTypesInShort = GraphConvertObjRefCheckNotCompatible.Link( OSyrComponentanObjRef , IMiscTypesInShort )
88     
89     LSyrComponentanObjRefMiscTypesInLong = GraphConvertObjRefCheckNotCompatible.Link( OSyrComponentanObjRef , IMiscTypesInLong )
90     
91     LSyrComponentanObjRefMiscTypesInFloat = GraphConvertObjRefCheckNotCompatible.Link( OSyrComponentanObjRef , IMiscTypesInFloat )
92     
93     LSyrComponentanObjRefMiscTypesInDouble = GraphConvertObjRefCheckNotCompatible.Link( OSyrComponentanObjRef , IMiscTypesInDouble )
94     
95     LMiscTypesOutObjRefObjRefToInlinetoInLine = GraphConvertObjRefCheckNotCompatible.Link( OMiscTypesOutObjRef , IObjRefToInlinetoInLine )
96     
97     # Input datas
98     ISyrComponentaContainer.Input( 'FactoryServerPy' )
99     ISyrComponentaComponent.Input( 'SyrControlComponent' )
100     
101     # Output Ports of the graph
102     #OMiscTypesOutString = MiscTypes.GetOutPort( 'OutString' )
103     #OMiscTypesOutBool = MiscTypes.GetOutPort( 'OutBool' )
104     #OMiscTypesOutChar = MiscTypes.GetOutPort( 'OutChar' )
105     #OMiscTypesOutShort = MiscTypes.GetOutPort( 'OutShort' )
106     #OMiscTypesOutLong = MiscTypes.GetOutPort( 'OutLong' )
107     #OMiscTypesOutFloat = MiscTypes.GetOutPort( 'OutFloat' )
108     #OMiscTypesOutDouble = MiscTypes.GetOutPort( 'OutDouble' )
109     return GraphConvertObjRefCheckNotCompatible
110
111
112 GraphConvertObjRefCheckNotCompatible = DefGraphConvertObjRefCheckNotCompatible()