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