Salome HOME
Merge from V6_main_20120808 08Aug12
[samples/datafiles.git] / Superv / Python / GraphConvertDoubleCheck.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 GraphConvertDoubleCheck
23 #
24 from SuperV import *
25 # Graph creation 
26 GraphConvertDoubleCheck = Graph( 'GraphConvertDoubleCheck' )
27 GraphConvertDoubleCheck.SetName( 'GraphConvertDoubleCheck' )
28 GraphConvertDoubleCheck.SetAuthor( 'JR' )
29 GraphConvertDoubleCheck.SetComment( 'Check conversions of Double' )
30 GraphConvertDoubleCheck.Coords( 0 , 0 )
31
32 # Creation of Factory Nodes
33
34 MiscTypes = GraphConvertDoubleCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'MiscTypes' )
35 MiscTypes.SetName( 'MiscTypes' )
36 MiscTypes.SetAuthor( '' )
37 MiscTypes.SetContainer( 'localhost/FactoryServer' )
38 MiscTypes.SetComment( 'MiscTypes from TypesCheck' )
39 MiscTypes.Coords( 217 , 0 )
40
41 MiscTypes_1 = GraphConvertDoubleCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'MiscTypes' )
42 MiscTypes_1.SetName( 'MiscTypes_1' )
43 MiscTypes_1.SetAuthor( '' )
44 MiscTypes_1.SetContainer( 'localhost/FactoryServer' )
45 MiscTypes_1.SetComment( 'MiscTypes from TypesCheck' )
46 MiscTypes_1.Coords( 433 , 131 )
47
48 # Creation of InLine Nodes
49 PyDouble = []
50 PyDouble.append( 'def Double() :     ' )
51 PyDouble.append( '    aDouble = 3.1415926535  ' )
52 PyDouble.append( '    print type(aDouble),"aDouble",aDouble,"NO double in python !!! Use Strings ?"  ' )
53 PyDouble.append( '    return aDouble     ' )
54 PyDouble.append( '' )
55 Double = GraphConvertDoubleCheck.INode( 'Double' , PyDouble )
56 Double.OutPort( 'OutDouble' , 'double' )
57 Double.SetName( 'Double' )
58 Double.SetAuthor( 'JR' )
59 Double.SetComment( 'InLine Node' )
60 Double.Coords( 9 , 87 )
61
62 PyDoubleString = []
63 PyDoubleString.append( 'def DoubleString() :       ' )
64 PyDoubleString.append( '    aDouble = 3.1415926535    ' )
65 PyDoubleString.append( '    print type(aDouble),"aDouble",aDouble,"NO double in python !!! Use Strings ?"    ' )
66 PyDoubleString.append( '    aDoubleString = str( aDouble )  ' )
67 PyDoubleString.append( '    print type(aDoubleString),"aDoubleString",aDoubleString  ' )
68 PyDoubleString.append( '    return aDoubleString  ' )
69 PyDoubleString.append( ' ' )
70 DoubleString = GraphConvertDoubleCheck.INode( 'DoubleString' , PyDoubleString )
71 DoubleString.OutPort( 'OutDoubleString' , 'string' )
72 DoubleString.SetName( 'DoubleString' )
73 DoubleString.SetAuthor( 'JR' )
74 DoubleString.SetComment( 'InLine Node' )
75 DoubleString.Coords( 217 , 334 )
76
77 # Creation of Links
78 DoubleOutDouble = Double.Port( 'OutDouble' )
79 MiscTypesInString = GraphConvertDoubleCheck.Link( DoubleOutDouble , MiscTypes.Port( 'InString' ) )
80
81 MiscTypesInBool = GraphConvertDoubleCheck.Link( DoubleOutDouble , MiscTypes.Port( 'InBool' ) )
82
83 MiscTypesInChar = GraphConvertDoubleCheck.Link( DoubleOutDouble , MiscTypes.Port( 'InChar' ) )
84
85 MiscTypesInShort = GraphConvertDoubleCheck.Link( DoubleOutDouble , MiscTypes.Port( 'InShort' ) )
86
87 MiscTypesInLong = GraphConvertDoubleCheck.Link( DoubleOutDouble , MiscTypes.Port( 'InLong' ) )
88
89 MiscTypesInFloat = GraphConvertDoubleCheck.Link( DoubleOutDouble , MiscTypes.Port( 'InFloat' ) )
90
91 MiscTypesInDouble = GraphConvertDoubleCheck.Link( DoubleOutDouble , MiscTypes.Port( 'InDouble' ) )
92
93 MiscTypesInObjRef = GraphConvertDoubleCheck.Link( DoubleOutDouble , MiscTypes.Port( 'InObjRef' ) )
94
95 DoubleStringOutDoubleString = DoubleString.Port( 'OutDoubleString' )
96 MiscTypes_1InString = GraphConvertDoubleCheck.Link( DoubleStringOutDoubleString , MiscTypes_1.Port( 'InString' ) )
97
98 MiscTypes_1InBool = GraphConvertDoubleCheck.Link( DoubleStringOutDoubleString , MiscTypes_1.Port( 'InBool' ) )
99
100 MiscTypes_1InChar = GraphConvertDoubleCheck.Link( DoubleStringOutDoubleString , MiscTypes_1.Port( 'InChar' ) )
101
102 MiscTypes_1InShort = GraphConvertDoubleCheck.Link( DoubleStringOutDoubleString , MiscTypes_1.Port( 'InShort' ) )
103
104 MiscTypes_1InLong = GraphConvertDoubleCheck.Link( DoubleStringOutDoubleString , MiscTypes_1.Port( 'InLong' ) )
105
106 MiscTypes_1InFloat = GraphConvertDoubleCheck.Link( DoubleStringOutDoubleString , MiscTypes_1.Port( 'InFloat' ) )
107
108 MiscTypes_1InDouble = GraphConvertDoubleCheck.Link( DoubleStringOutDoubleString , MiscTypes_1.Port( 'InDouble' ) )
109
110 MiscTypes_1InObjRef = GraphConvertDoubleCheck.Link( DoubleStringOutDoubleString , MiscTypes_1.Port( 'InObjRef' ) )
111
112 # Creation of Output variables
113 MiscTypesOutString = MiscTypes.Port( 'OutString' )
114 MiscTypesOutBool = MiscTypes.Port( 'OutBool' )
115 MiscTypesOutChar = MiscTypes.Port( 'OutChar' )
116 MiscTypesOutShort = MiscTypes.Port( 'OutShort' )
117 MiscTypesOutLong = MiscTypes.Port( 'OutLong' )
118 MiscTypesOutFloat = MiscTypes.Port( 'OutFloat' )
119 MiscTypesOutDouble = MiscTypes.Port( 'OutDouble' )
120 MiscTypesOutObjRef = MiscTypes.Port( 'OutObjRef' )
121 MiscTypes_1OutString = MiscTypes_1.Port( 'OutString' )
122 MiscTypes_1OutBool = MiscTypes_1.Port( 'OutBool' )
123 MiscTypes_1OutChar = MiscTypes_1.Port( 'OutChar' )
124 MiscTypes_1OutShort = MiscTypes_1.Port( 'OutShort' )
125 MiscTypes_1OutLong = MiscTypes_1.Port( 'OutLong' )
126 MiscTypes_1OutFloat = MiscTypes_1.Port( 'OutFloat' )
127 MiscTypes_1OutDouble = MiscTypes_1.Port( 'OutDouble' )
128 MiscTypes_1OutObjRef = MiscTypes_1.Port( 'OutObjRef' )
129
130 GraphConvertDoubleCheck.Run()
131 GraphConvertDoubleCheck.DoneW()
132 GraphConvertDoubleCheck.PrintPorts()