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