Salome HOME
Imported using TkCVS
[samples/datafiles.git] / Superv / Python / GraphConvertObjRefCheck.py
diff --git a/Superv/Python/GraphConvertObjRefCheck.py b/Superv/Python/GraphConvertObjRefCheck.py
new file mode 100755 (executable)
index 0000000..f85ca54
--- /dev/null
@@ -0,0 +1,110 @@
+
+# Generated python file of Graph GraphConvertObjRefCheck
+
+from SuperV import *
+
+# Graph creation of GraphConvertObjRefCheck
+def DefGraphConvertObjRefCheck() :
+    GraphConvertObjRefCheck = Graph( 'GraphConvertObjRefCheck' )
+    GraphConvertObjRefCheck.SetName( 'GraphConvertObjRefCheck' )
+    GraphConvertObjRefCheck.SetAuthor( 'JR' )
+    GraphConvertObjRefCheck.SetComment( 'Check conversions of ObjRef' )
+    GraphConvertObjRefCheck.Coords( 0 , 0 )
+    
+    # Creation of Factory Nodes
+    
+    MiscTypes = GraphConvertObjRefCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'MiscTypes' )
+    MiscTypes.SetName( 'MiscTypes' )
+    MiscTypes.SetAuthor( '' )
+    MiscTypes.SetContainer( 'localhost/FactoryServer' )
+    MiscTypes.SetComment( 'MiscTypes from TypesCheck' )
+    MiscTypes.Coords( 284 , 28 )
+    IMiscTypesInString = MiscTypes.GetInPort( 'InString' )
+    IMiscTypesInBool = MiscTypes.GetInPort( 'InBool' )
+    IMiscTypesInChar = MiscTypes.GetInPort( 'InChar' )
+    IMiscTypesInShort = MiscTypes.GetInPort( 'InShort' )
+    IMiscTypesInLong = MiscTypes.GetInPort( 'InLong' )
+    IMiscTypesInFloat = MiscTypes.GetInPort( 'InFloat' )
+    IMiscTypesInDouble = MiscTypes.GetInPort( 'InDouble' )
+    IMiscTypesInObjRef = MiscTypes.GetInPort( 'InObjRef' )
+    IMiscTypesGate = MiscTypes.GetInPort( 'Gate' )
+    OMiscTypesOutString = MiscTypes.GetOutPort( 'OutString' )
+    OMiscTypesOutBool = MiscTypes.GetOutPort( 'OutBool' )
+    OMiscTypesOutChar = MiscTypes.GetOutPort( 'OutChar' )
+    OMiscTypesOutShort = MiscTypes.GetOutPort( 'OutShort' )
+    OMiscTypesOutLong = MiscTypes.GetOutPort( 'OutLong' )
+    OMiscTypesOutFloat = MiscTypes.GetOutPort( 'OutFloat' )
+    OMiscTypesOutDouble = MiscTypes.GetOutPort( 'OutDouble' )
+    OMiscTypesOutObjRef = MiscTypes.GetOutPort( 'OutObjRef' )
+    OMiscTypesGate = MiscTypes.GetOutPort( 'Gate' )
+    
+    # Creation of InLine Nodes
+    PySyrComponent = []
+    PySyrComponent.append( 'from LifeCycleCORBA import *     ' )
+    PySyrComponent.append( 'def SyrComponent( aContainer , aComponent ) :     ' )
+    PySyrComponent.append( '    print "SyrComponent(",aContainer,",",aComponent,")"     ' )
+    PySyrComponent.append( '    orb = CORBA.ORB_init([], CORBA.ORB_ID)     ' )
+    PySyrComponent.append( '    print "SyrComponent orb",orb   ' )
+    PySyrComponent.append( '    lcc = LifeCycleCORBA(orb)     ' )
+    PySyrComponent.append( '    print "SyrComponent lcc",lcc   ' )
+    PySyrComponent.append( '    print "SyrComponent(",aContainer,",",aComponent,")"     ' )
+    PySyrComponent.append( '    ComponentRef = lcc.FindOrLoadComponent( aContainer , aComponent )     ' )
+    PySyrComponent.append( '    print "SyrComponent(",aContainer,",",aComponent,") --> ",ComponentRef     ' )
+    PySyrComponent.append( '    return ComponentRef    ' )
+    PySyrComponent.append( '' )
+    SyrComponent = GraphConvertObjRefCheck.INode( 'SyrComponent' , PySyrComponent )
+    SyrComponent.SetName( 'SyrComponent' )
+    SyrComponent.SetAuthor( 'JR' )
+    SyrComponent.SetComment( 'InLine Node' )
+    SyrComponent.Coords( 14 , 114 )
+    ISyrComponentaContainer = SyrComponent.InPort( 'aContainer' , 'string' )
+    ISyrComponentaComponent = SyrComponent.InPort( 'aComponent' , 'string' )
+    ISyrComponentGate = SyrComponent.GetInPort( 'Gate' )
+    OSyrComponentanObjRef = SyrComponent.OutPort( 'anObjRef' , 'objref' )
+    OSyrComponentGate = SyrComponent.GetOutPort( 'Gate' )
+    
+    PyObjRefToInline = []
+    PyObjRefToInline.append( 'def ObjRefToInline(objRef): ' )
+    PyObjRefToInline.append( '    return objRef ' )
+    ObjRefToInline = GraphConvertObjRefCheck.INode( 'ObjRefToInline' , PyObjRefToInline )
+    ObjRefToInline.SetName( 'ObjRefToInline' )
+    ObjRefToInline.SetAuthor( '' )
+    ObjRefToInline.SetComment( 'Compute Node' )
+    ObjRefToInline.Coords( 496 , 168 )
+    IObjRefToInlinetoInLine = ObjRefToInline.InPort( 'toInLine' , 'int' )
+    IObjRefToInlineGate = ObjRefToInline.GetInPort( 'Gate' )
+    OObjRefToInlineGate = ObjRefToInline.GetOutPort( 'Gate' )
+    
+    # Creation of Links
+    LSyrComponentanObjRefMiscTypesInObjRef = GraphConvertObjRefCheck.Link( OSyrComponentanObjRef , IMiscTypesInObjRef )
+    
+    LSyrComponentanObjRefMiscTypesInString = GraphConvertObjRefCheck.Link( OSyrComponentanObjRef , IMiscTypesInString )
+    
+    LMiscTypesOutObjRefObjRefToInlinetoInLine = GraphConvertObjRefCheck.Link( OMiscTypesOutObjRef , IObjRefToInlinetoInLine )
+    
+    # Input datas
+    ISyrComponentaContainer.Input( 'FactoryServerPy' )
+    ISyrComponentaComponent.Input( 'SyrControlComponent' )
+    IMiscTypesInBool.Input( 138492744 )
+    IMiscTypesInChar.Input( 135402800 )
+    IMiscTypesInShort.Input( 135448464 )
+    IMiscTypesInLong.Input( 135469224 )
+    IMiscTypesInFloat.Input( 65.6954 )
+    IMiscTypesInDouble.Input( 65.6954 )
+    
+    # Output Ports of the graph
+    #OMiscTypesOutString = MiscTypes.GetOutPort( 'OutString' )
+    #OMiscTypesOutBool = MiscTypes.GetOutPort( 'OutBool' )
+    #OMiscTypesOutChar = MiscTypes.GetOutPort( 'OutChar' )
+    #OMiscTypesOutShort = MiscTypes.GetOutPort( 'OutShort' )
+    #OMiscTypesOutLong = MiscTypes.GetOutPort( 'OutLong' )
+    #OMiscTypesOutFloat = MiscTypes.GetOutPort( 'OutFloat' )
+    #OMiscTypesOutDouble = MiscTypes.GetOutPort( 'OutDouble' )
+    return GraphConvertObjRefCheck
+
+
+GraphConvertObjRefCheck = DefGraphConvertObjRefCheck()
+
+GraphConvertObjRefCheck.Run()
+GraphConvertObjRefCheck.DoneW()
+GraphConvertObjRefCheck.PrintPorts()