Salome HOME
Many new examples specially for test of Switches
[modules/superv.git] / examples / GraphWrongContainerOrComponent.py
1
2 # Generated python file of Graph GraphWrongContainerOrComponent
3
4 from SuperV import *
5
6 # Graph creation of GraphWrongContainerOrComponent
7 def DefGraphWrongContainerOrComponent() :
8     GraphWrongContainerOrComponent = Graph( 'GraphWrongContainerOrComponent' )
9     GraphWrongContainerOrComponent.SetName( 'GraphWrongContainerOrComponent' )
10     GraphWrongContainerOrComponent.SetAuthor( 'JR' )
11     GraphWrongContainerOrComponent.SetComment( '' )
12     GraphWrongContainerOrComponent.Coords( 0 , 0 )
13     
14     # Creation of Factory Nodes
15     
16     Add = GraphWrongContainerOrComponent.FNode( 'AddComponent' , 'AddComponent' , 'Add' )
17     Add.SetName( 'Add' )
18     Add.SetAuthor( '' )
19     Add.SetContainer( 'FactoryServer' )
20     Add.SetComment( 'Add from AddComponent' )
21     Add.Coords( 99 , 304 )
22     IAddx = Add.GetInPort( 'x' )
23     IAddy = Add.GetInPort( 'y' )
24     IAddGate = Add.GetInPort( 'Gate' )
25     OAddFuncValue = Add.GetOutPort( 'FuncValue' )
26     OAddz = Add.GetOutPort( 'z' )
27     OAddGate = Add.GetOutPort( 'Gate' )
28     
29     Sub = GraphWrongContainerOrComponent.FNode( 'SubComponent' , 'SubComponent' , 'Sub' )
30     Sub.SetName( 'Sub' )
31     Sub.SetAuthor( '' )
32     Sub.SetContainer( 'FactoryServer' )
33     Sub.SetComment( 'Sub from SubComponent' )
34     Sub.Coords( 98 , 59 )
35     ISubx = Sub.GetInPort( 'x' )
36     ISuby = Sub.GetInPort( 'y' )
37     ISubGate = Sub.GetInPort( 'Gate' )
38     OSubz = Sub.GetOutPort( 'z' )
39     OSubGate = Sub.GetOutPort( 'Gate' )
40     
41     # Input datas
42     IAddx.Input( 3 )
43     IAddy.Input( 4.5 )
44     ISubx.Input( 1.5 )
45     ISuby.Input( 0 )
46     
47     # Output Ports of the graph
48     #OAddFuncValue = Add.GetOutPort( 'FuncValue' )
49     #OAddz = Add.GetOutPort( 'z' )
50     #OSubz = Sub.GetOutPort( 'z' )
51     return GraphWrongContainerOrComponent
52
53
54 GraphWrongContainerOrComponent = DefGraphWrongContainerOrComponent()