2 # Generated python file of Graph GraphStream
6 GraphStream = Graph( 'GraphStream' )
7 GraphStream.SetName( 'GraphStream' )
8 GraphStream.SetAuthor( '' )
9 GraphStream.SetComment( '' )
10 GraphStream.Coords( 0 , 0 )
12 # Creation of Factory Nodes
14 Add = GraphStream.FNode( 'AddComponent' , 'AddComponent' , 'Add' )
17 Add.SetContainer( 'FactoryServer' )
18 Add.SetComment( 'Add from AddComponent' )
19 Add.Coords( 15 , 241 )
20 Add.InDataStreamPort( 'istream' , 'long' )
21 Add.OutDataStreamPort( 'ostream' , 'long' )
22 Add.OutDataStreamPort( 'Ostream' , 'long' )
24 Sub = GraphStream.FNode( 'SubComponent' , 'SubComponent' , 'Sub' )
27 Sub.SetContainer( 'FactoryServer' )
28 Sub.SetComment( 'Sub from SubComponent' )
29 Sub.Coords( 227 , 99 )
30 Sub.InDataStreamPort( 'istream' , 'long' )
31 Sub.InDataStreamPort( 'Istream' , 'long' )
33 Mul = GraphStream.FNode( 'MulComponent' , 'MulComponent' , 'Mul' )
36 Mul.SetContainer( 'FactoryServer' )
37 Mul.SetComment( 'Mul from MulComponent' )
38 Mul.Coords( 444 , 241 )
40 Div = GraphStream.FNode( 'DivComponent' , 'DivComponent' , 'Div' )
43 Div.SetContainer( 'FactoryServer' )
44 Div.SetComment( 'Div from DivComponent' )
45 Div.Coords( 634 , 98 )
46 Div.OutDataStreamPort( 'ostream' , 'long' )
49 Addz = Add.Port( 'z' )
50 Suby = GraphStream.Link( Addz , Sub.Port( 'y' ) )
51 Suby.AddCoord( 1 , 189 , 207 )
52 Suby.AddCoord( 2 , 189 , 350 )
54 Muly = GraphStream.Link( Addz , Mul.Port( 'y' ) )
56 Addostream = Add.Port( 'ostream' )
57 Subistream = GraphStream.Link( Addostream , Sub.Port( 'istream' ) )
58 Subistream.AddCoord( 1 , 201 , 237 )
59 Subistream.AddCoord( 2 , 200 , 378 )
61 AddOstream = Add.Port( 'Ostream' )
62 SubIstream = GraphStream.Link( AddOstream , Sub.Port( 'Istream' ) )
63 SubIstream.AddCoord( 1 , 212 , 267 )
64 SubIstream.AddCoord( 2 , 211 , 409 )
66 Subz = Sub.Port( 'z' )
67 Mulx = GraphStream.Link( Subz , Mul.Port( 'x' ) )
68 Mulx.AddCoord( 1 , 420 , 322 )
69 Mulx.AddCoord( 2 , 419 , 180 )
71 Divx = GraphStream.Link( Subz , Div.Port( 'x' ) )
73 Mulz = Mul.Port( 'z' )
74 Divy = GraphStream.Link( Mulz , Div.Port( 'y' ) )
75 Divy.AddCoord( 1 , 622 , 207 )
76 Divy.AddCoord( 2 , 623 , 320 )
78 # Creation of Input datas
79 Addx = Add.Input( 'x' , 3)
80 Addy = Add.Input( 'y' , 4.5)
81 Subx = Sub.Input( 'x' , 1.5)
82 Addistream = Add.Input( 'istream' , 1)
84 # Creation of Output variables
85 AddFuncValue = Add.Port( 'FuncValue' )
86 Divz = Div.Port( 'z' )
87 Divostream = Div.Port( 'ostream' )
91 GraphStream.PrintPorts()