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