]> SALOME platform Git repositories - modules/superv.git/blob - examples/GraphConvertDoubleCheck.py
Salome HOME
DCQ : Merge with Ecole_Ete_a6.
[modules/superv.git] / examples / GraphConvertDoubleCheck.py
1
2 # Generated python file of Graph GraphConvertDoubleCheck
3
4 from SuperV import *
5 # Graph creation 
6 GraphConvertDoubleCheck = Graph( 'GraphConvertDoubleCheck' )
7 GraphConvertDoubleCheck.SetName( 'GraphConvertDoubleCheck' )
8 GraphConvertDoubleCheck.SetAuthor( 'JR' )
9 GraphConvertDoubleCheck.SetComment( 'Check conversions of Double' )
10 GraphConvertDoubleCheck.Coords( 0 , 0 )
11
12 # Creation of Factory Nodes
13
14 MiscTypes = GraphConvertDoubleCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'MiscTypes' )
15 MiscTypes.SetName( 'MiscTypes' )
16 MiscTypes.SetAuthor( '' )
17 MiscTypes.SetContainer( 'localhost/FactoryServer' )
18 MiscTypes.SetComment( 'MiscTypes from TypesCheck' )
19 MiscTypes.Coords( 217 , 0 )
20
21 MiscTypes_1 = GraphConvertDoubleCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'MiscTypes' )
22 MiscTypes_1.SetName( 'MiscTypes_1' )
23 MiscTypes_1.SetAuthor( '' )
24 MiscTypes_1.SetContainer( 'localhost/FactoryServer' )
25 MiscTypes_1.SetComment( 'MiscTypes from TypesCheck' )
26 MiscTypes_1.Coords( 433 , 131 )
27
28 # Creation of InLine Nodes
29 PyDouble = []
30 PyDouble.append( 'def Double() :     ' )
31 PyDouble.append( '    aDouble = 3.1415926535  ' )
32 PyDouble.append( '    print type(aDouble),"aDouble",aDouble,"NO double in python !!! Use Strings ?"  ' )
33 PyDouble.append( '    return aDouble     ' )
34 PyDouble.append( '' )
35 Double = GraphConvertDoubleCheck.INode( 'Double' , PyDouble )
36 Double.OutPort( 'OutDouble' , 'double' )
37 Double.SetName( 'Double' )
38 Double.SetAuthor( 'JR' )
39 Double.SetComment( 'InLine Node' )
40 Double.Coords( 9 , 87 )
41
42 PyDoubleString = []
43 PyDoubleString.append( 'def DoubleString() :       ' )
44 PyDoubleString.append( '    aDouble = 3.1415926535    ' )
45 PyDoubleString.append( '    print type(aDouble),"aDouble",aDouble,"NO double in python !!! Use Strings ?"    ' )
46 PyDoubleString.append( '    aDoubleString = str( aDouble )  ' )
47 PyDoubleString.append( '    print type(aDoubleString),"aDoubleString",aDoubleString  ' )
48 PyDoubleString.append( '    return aDoubleString  ' )
49 PyDoubleString.append( ' ' )
50 DoubleString = GraphConvertDoubleCheck.INode( 'DoubleString' , PyDoubleString )
51 DoubleString.OutPort( 'OutDoubleString' , 'string' )
52 DoubleString.SetName( 'DoubleString' )
53 DoubleString.SetAuthor( 'JR' )
54 DoubleString.SetComment( 'InLine Node' )
55 DoubleString.Coords( 217 , 334 )
56
57 # Creation of Links
58 DoubleOutDouble = Double.Port( 'OutDouble' )
59 MiscTypesInString = GraphConvertDoubleCheck.Link( DoubleOutDouble , MiscTypes.Port( 'InString' ) )
60
61 MiscTypesInBool = GraphConvertDoubleCheck.Link( DoubleOutDouble , MiscTypes.Port( 'InBool' ) )
62
63 MiscTypesInChar = GraphConvertDoubleCheck.Link( DoubleOutDouble , MiscTypes.Port( 'InChar' ) )
64
65 MiscTypesInShort = GraphConvertDoubleCheck.Link( DoubleOutDouble , MiscTypes.Port( 'InShort' ) )
66
67 MiscTypesInLong = GraphConvertDoubleCheck.Link( DoubleOutDouble , MiscTypes.Port( 'InLong' ) )
68
69 MiscTypesInFloat = GraphConvertDoubleCheck.Link( DoubleOutDouble , MiscTypes.Port( 'InFloat' ) )
70
71 MiscTypesInDouble = GraphConvertDoubleCheck.Link( DoubleOutDouble , MiscTypes.Port( 'InDouble' ) )
72
73 MiscTypesInObjRef = GraphConvertDoubleCheck.Link( DoubleOutDouble , MiscTypes.Port( 'InObjRef' ) )
74
75 DoubleStringOutDoubleString = DoubleString.Port( 'OutDoubleString' )
76 MiscTypes_1InString = GraphConvertDoubleCheck.Link( DoubleStringOutDoubleString , MiscTypes_1.Port( 'InString' ) )
77
78 MiscTypes_1InBool = GraphConvertDoubleCheck.Link( DoubleStringOutDoubleString , MiscTypes_1.Port( 'InBool' ) )
79
80 MiscTypes_1InChar = GraphConvertDoubleCheck.Link( DoubleStringOutDoubleString , MiscTypes_1.Port( 'InChar' ) )
81
82 MiscTypes_1InShort = GraphConvertDoubleCheck.Link( DoubleStringOutDoubleString , MiscTypes_1.Port( 'InShort' ) )
83
84 MiscTypes_1InLong = GraphConvertDoubleCheck.Link( DoubleStringOutDoubleString , MiscTypes_1.Port( 'InLong' ) )
85
86 MiscTypes_1InFloat = GraphConvertDoubleCheck.Link( DoubleStringOutDoubleString , MiscTypes_1.Port( 'InFloat' ) )
87
88 MiscTypes_1InDouble = GraphConvertDoubleCheck.Link( DoubleStringOutDoubleString , MiscTypes_1.Port( 'InDouble' ) )
89
90 MiscTypes_1InObjRef = GraphConvertDoubleCheck.Link( DoubleStringOutDoubleString , MiscTypes_1.Port( 'InObjRef' ) )
91
92 # Creation of Output variables
93 MiscTypesOutString = MiscTypes.Port( 'OutString' )
94 MiscTypesOutBool = MiscTypes.Port( 'OutBool' )
95 MiscTypesOutChar = MiscTypes.Port( 'OutChar' )
96 MiscTypesOutShort = MiscTypes.Port( 'OutShort' )
97 MiscTypesOutLong = MiscTypes.Port( 'OutLong' )
98 MiscTypesOutFloat = MiscTypes.Port( 'OutFloat' )
99 MiscTypesOutDouble = MiscTypes.Port( 'OutDouble' )
100 MiscTypesOutObjRef = MiscTypes.Port( 'OutObjRef' )
101 MiscTypes_1OutString = MiscTypes_1.Port( 'OutString' )
102 MiscTypes_1OutBool = MiscTypes_1.Port( 'OutBool' )
103 MiscTypes_1OutChar = MiscTypes_1.Port( 'OutChar' )
104 MiscTypes_1OutShort = MiscTypes_1.Port( 'OutShort' )
105 MiscTypes_1OutLong = MiscTypes_1.Port( 'OutLong' )
106 MiscTypes_1OutFloat = MiscTypes_1.Port( 'OutFloat' )
107 MiscTypes_1OutDouble = MiscTypes_1.Port( 'OutDouble' )
108 MiscTypes_1OutObjRef = MiscTypes_1.Port( 'OutObjRef' )
109
110 GraphConvertDoubleCheck.Run()
111 GraphConvertDoubleCheck.DoneW()
112 GraphConvertDoubleCheck.PrintPorts()