Salome HOME
PAL8521
[modules/superv.git] / examples / GraphInLinesTypesCheck.py
1
2 # Generated python file of Graph GraphInLinesConvertCheck
3
4 from SuperV import *
5 # Graph creation 
6 GraphInLinesConvertCheck = Graph( 'GraphInLinesConvertCheck' )
7 GraphInLinesConvertCheck.SetName( 'GraphInLinesConvertCheck' )
8 GraphInLinesConvertCheck.SetAuthor( 'JR' )
9 GraphInLinesConvertCheck.SetComment( '' )
10 GraphInLinesConvertCheck.Coords( 0 , 0 )
11
12 # Creation of Factory Nodes
13
14 Addition = GraphInLinesConvertCheck.FNode( 'AddComponent' , 'AddComponent' , 'Addition' )
15 Addition.SetName( 'Addition' )
16 Addition.SetAuthor( '' )
17 Addition.SetContainer( 'localhost/FactoryServer' )
18 Addition.SetComment( 'Addition from AddComponent' )
19 Addition.Coords( 232 , 514 )
20
21 # Creation of InLine Nodes
22 PyBoolCheck = []
23 PyBoolCheck.append( 'def BoolCheck( InBool ) : ' )
24 PyBoolCheck.append( '   return InBool ' )
25 PyBoolCheck.append( '' )
26 BoolCheck = GraphInLinesConvertCheck.INode( 'BoolCheck' , PyBoolCheck )
27 BoolCheck.InPort( 'InBool' , 'boolean' )
28 BoolCheck.OutPort( 'OutBool' , 'boolean' )
29 BoolCheck.SetName( 'BoolCheck' )
30 BoolCheck.SetAuthor( '' )
31 BoolCheck.SetComment( 'InLine Node' )
32 BoolCheck.Coords( 234 , 92 )
33
34 PyCharCheck = []
35 PyCharCheck.append( 'def CharCheck( InChar ) : ' )
36 PyCharCheck.append( '   return InChar ' )
37 PyCharCheck.append( '' )
38 CharCheck = GraphInLinesConvertCheck.INode( 'CharCheck' , PyCharCheck )
39 CharCheck.InPort( 'InChar' , 'char' )
40 CharCheck.OutPort( 'OutChar' , 'char' )
41 CharCheck.SetName( 'CharCheck' )
42 CharCheck.SetAuthor( '' )
43 CharCheck.SetComment( 'InLine Node' )
44 CharCheck.Coords( 30 , 142 )
45
46 PyShortCheck = []
47 PyShortCheck.append( 'def ShortCheck( InShort ) : ' )
48 PyShortCheck.append( '  return InShort ' )
49 PyShortCheck.append( '' )
50 ShortCheck = GraphInLinesConvertCheck.INode( 'ShortCheck' , PyShortCheck )
51 ShortCheck.InPort( 'InShort' , 'short' )
52 ShortCheck.OutPort( 'OutShort' , 'short' )
53 ShortCheck.SetName( 'ShortCheck' )
54 ShortCheck.SetAuthor( '' )
55 ShortCheck.SetComment( 'InLine Node' )
56 ShortCheck.Coords( 234 , 230 )
57
58 PyFloatCheck = []
59 PyFloatCheck.append( 'def FloatCheck( InFloat ) : ' )
60 PyFloatCheck.append( '  return InFloat ' )
61 PyFloatCheck.append( '' )
62 FloatCheck = GraphInLinesConvertCheck.INode( 'FloatCheck' , PyFloatCheck )
63 FloatCheck.InPort( 'InFloat' , 'float' )
64 FloatCheck.OutPort( 'OutFloat' , 'float' )
65 FloatCheck.SetName( 'FloatCheck' )
66 FloatCheck.SetAuthor( '' )
67 FloatCheck.SetComment( 'InLine Node' )
68 FloatCheck.Coords( 230 , 375 )
69
70 PyLongCheck = []
71 PyLongCheck.append( 'def LongCheck( InLong ) : ' )
72 PyLongCheck.append( '   return InLong  ' )
73 PyLongCheck.append( '' )
74 LongCheck = GraphInLinesConvertCheck.INode( 'LongCheck' , PyLongCheck )
75 LongCheck.InPort( 'InLong' , 'long' )
76 LongCheck.OutPort( 'OutLong' , 'long' )
77 LongCheck.SetName( 'LongCheck' )
78 LongCheck.SetAuthor( '' )
79 LongCheck.SetComment( 'InLine Node' )
80 LongCheck.Coords( 30 , 282 )
81
82 PyStringCheck = []
83 PyStringCheck.append( 'def StringCheck( aString ) : ' )
84 PyStringCheck.append( ' return aString ' )
85 PyStringCheck.append( '' )
86 StringCheck = GraphInLinesConvertCheck.INode( 'StringCheck' , PyStringCheck )
87 StringCheck.InPort( 'InString' , 'string' )
88 StringCheck.OutPort( 'OutString' , 'string' )
89 StringCheck.SetName( 'StringCheck' )
90 StringCheck.SetAuthor( '' )
91 StringCheck.SetComment( 'InLine Node' )
92 StringCheck.Coords( 30 , 6 )
93
94 PyDoubleCheck = []
95 PyDoubleCheck.append( 'def DoubleCheck( InDouble ) : ' )
96 PyDoubleCheck.append( ' return InDouble ' )
97 PyDoubleCheck.append( '' )
98 DoubleCheck = GraphInLinesConvertCheck.INode( 'DoubleCheck' , PyDoubleCheck )
99 DoubleCheck.InPort( 'InDouble' , 'double' )
100 DoubleCheck.OutPort( 'OutDouble' , 'double' )
101 DoubleCheck.SetName( 'DoubleCheck' )
102 DoubleCheck.SetAuthor( '' )
103 DoubleCheck.SetComment( 'Compute Node' )
104 DoubleCheck.Coords( 23 , 427 )
105
106 PyMiscTypes = []
107 PyMiscTypes.append( 'def MiscTypes( InString , InBool , InChar , InShort , InLong , InFloat , InDouble , InObjRef ) : ' )
108 PyMiscTypes.append( '   return InString,InBool,InChar,InShort,InLong,InFloat,InDouble,InObjRef ' )
109 MiscTypes = GraphInLinesConvertCheck.INode( 'MiscTypes' , PyMiscTypes )
110 MiscTypes.InPort( 'InString' , 'string' )
111 MiscTypes.InPort( 'InBool' , 'boolean' )
112 MiscTypes.InPort( 'InChar' , 'char' )
113 MiscTypes.InPort( 'InShort' , 'short' )
114 MiscTypes.InPort( 'InLong' , 'long' )
115 MiscTypes.InPort( 'InFloat' , 'float' )
116 MiscTypes.InPort( 'InDouble' , 'double' )
117 MiscTypes.InPort( 'InObjRef' , 'SuperVision::Adder' )
118 MiscTypes.OutPort( 'OutString' , 'string' )
119 MiscTypes.OutPort( 'OutBool' , 'boolean' )
120 MiscTypes.OutPort( 'OutChar' , 'char' )
121 MiscTypes.OutPort( 'OutShort' , 'short' )
122 MiscTypes.OutPort( 'OutLong' , 'long' )
123 MiscTypes.OutPort( 'OutFloat' , 'float' )
124 MiscTypes.OutPort( 'OutDouble' , 'double' )
125 MiscTypes.OutPort( 'OutObjRef' , 'SuperVisionTest::Addre' )
126 MiscTypes.SetName( 'MiscTypes' )
127 MiscTypes.SetAuthor( '' )
128 MiscTypes.SetComment( 'InLine Node' )
129 MiscTypes.Coords( 477 , 231 )
130
131 # Creation of Links
132 BoolCheckOutBool = BoolCheck.Port( 'OutBool' )
133 MiscTypesInBool = GraphInLinesConvertCheck.Link( BoolCheckOutBool , MiscTypes.Port( 'InBool' ) )
134 MiscTypesInBool.AddCoord( 1 , 446 , 341 )
135 MiscTypesInBool.AddCoord( 2 , 446 , 172 )
136
137 CharCheckOutChar = CharCheck.Port( 'OutChar' )
138 MiscTypesInChar = GraphInLinesConvertCheck.Link( CharCheckOutChar , MiscTypes.Port( 'InChar' ) )
139 MiscTypesInChar.AddCoord( 1 , 431 , 368 )
140 MiscTypesInChar.AddCoord( 2 , 431 , 223 )
141
142 ShortCheckOutShort = ShortCheck.Port( 'OutShort' )
143 MiscTypesInShort = GraphInLinesConvertCheck.Link( ShortCheckOutShort , MiscTypes.Port( 'InShort' ) )
144 MiscTypesInShort.AddCoord( 1 , 415 , 397 )
145 MiscTypesInShort.AddCoord( 2 , 414 , 310 )
146
147 FloatCheckOutFloat = FloatCheck.Port( 'OutFloat' )
148 MiscTypesInFloat = GraphInLinesConvertCheck.Link( FloatCheckOutFloat , MiscTypes.Port( 'InFloat' ) )
149
150 AdditionAdder = Addition.Port( 'Adder' )
151 MiscTypesInObjRef = GraphInLinesConvertCheck.Link( AdditionAdder , MiscTypes.Port( 'InObjRef' ) )
152 MiscTypesInObjRef.AddCoord( 1 , 462 , 514 )
153 MiscTypesInObjRef.AddCoord( 2 , 461 , 593 )
154
155 LongCheckOutLong = LongCheck.Port( 'OutLong' )
156 MiscTypesInLong = GraphInLinesConvertCheck.Link( LongCheckOutLong , MiscTypes.Port( 'InLong' ) )
157 MiscTypesInLong.AddCoord( 1 , 406 , 426 )
158 MiscTypesInLong.AddCoord( 2 , 405 , 363 )
159
160 StringCheckOutString = StringCheck.Port( 'OutString' )
161 MiscTypesInString = GraphInLinesConvertCheck.Link( StringCheckOutString , MiscTypes.Port( 'InString' ) )
162 MiscTypesInString.AddCoord( 1 , 462 , 312 )
163 MiscTypesInString.AddCoord( 2 , 461 , 87 )
164
165 DoubleCheckOutDouble = DoubleCheck.Port( 'OutDouble' )
166 MiscTypesInDouble = GraphInLinesConvertCheck.Link( DoubleCheckOutDouble , MiscTypes.Port( 'InDouble' ) )
167 MiscTypesInDouble.AddCoord( 1 , 445 , 485 )
168 MiscTypesInDouble.AddCoord( 2 , 445 , 508 )
169
170 # Creation of Input datas
171 BoolCheckInBool = BoolCheck.Input( 'InBool' , 1)
172 CharCheckInChar = CharCheck.Input( 'InChar' , 255)
173 ShortCheckInShort = ShortCheck.Input( 'InShort' , 16383)
174 FloatCheckInFloat = FloatCheck.Input( 'InFloat' , 3.14159)
175 LongCheckInLong = LongCheck.Input( 'InLong' , 1234567890)
176 StringCheckInString = StringCheck.Input( 'InString' , 'aString')
177 DoubleCheckInDouble = DoubleCheck.Input( 'InDouble' , 1.23457)
178
179 # Creation of Output variables
180 MiscTypesOutString = MiscTypes.Port( 'OutString' )
181 MiscTypesOutBool = MiscTypes.Port( 'OutBool' )
182 MiscTypesOutChar = MiscTypes.Port( 'OutChar' )
183 MiscTypesOutShort = MiscTypes.Port( 'OutShort' )
184 MiscTypesOutLong = MiscTypes.Port( 'OutLong' )
185 MiscTypesOutFloat = MiscTypes.Port( 'OutFloat' )
186 MiscTypesOutDouble = MiscTypes.Port( 'OutDouble' )
187 MiscTypesOutObjRef = MiscTypes.Port( 'OutObjRef' )
188
189 GraphInLinesConvertCheck.Run()
190 GraphInLinesConvertCheck.DoneW()
191 GraphInLinesConvertCheck.PrintPorts()