From 85ae3dae850fa8bcb323369bdbf037e711c37aa2 Mon Sep 17 00:00:00 2001 From: rahuel Date: Wed, 14 Jun 2006 16:01:39 +0000 Subject: [PATCH] New name because of clash with a module name --- src/ModuleCatalog/TestModuleCatalog.py | 64 ++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100755 src/ModuleCatalog/TestModuleCatalog.py diff --git a/src/ModuleCatalog/TestModuleCatalog.py b/src/ModuleCatalog/TestModuleCatalog.py new file mode 100755 index 000000000..036fe5d2e --- /dev/null +++ b/src/ModuleCatalog/TestModuleCatalog.py @@ -0,0 +1,64 @@ +import batchmode_salome +import SALOME_ModuleCatalog + +print +print "======================================================================" +print " XML Catalog file generation from idl file" +print "======================================================================" + +import os +os.system('runIDLparser -Wbcatalog=x \ + ${KERNEL_ROOT_DIR}/idl/salome/SALOME_TestModuleCatalog.idl') + +print "======================================================================" +print " Get Catalog " +print "======================================================================" +obj = batchmode_salome.naming_service.Resolve('Kernel/ModulCatalog') +catalog = obj._narrow(SALOME_ModuleCatalog.ModuleCatalog) +catalog.GetComponentList() + +print +print "======================================================================" +print " Import xml file " +print "======================================================================" +catalog.ImportXmlCatalogFile("x.xml") + +name = "AddComponent" +print +print "======================================================================" +print " Dump component <", name, "> " +print "======================================================================" +C = catalog.GetComponent(name) + +print "name : ", C._get_componentname() +print "username : ", C._get_componentusername() +print "type : ", C._get_component_type() +print "constraint : ", C._get_constraint() +print "icon : ", C._get_component_icone() + +for iL in C.GetInterfaceList(): + I = C.GetInterface(iL) + print "interface : ", I.interfacename + for S in I.interfaceservicelist: + print " service : ", S.ServiceName + print " ", len(S.ServiceinParameter), "in params : " + for iP in S.ServiceinParameter: + print ' ' + iP.Parametername + '(' + iP.Parametertype + ')' + pass + print " ", len(S.ServiceoutParameter), "out params : " + for iP in S.ServiceoutParameter: + print ' ' + iP.Parametername + '(' + iP.Parametertype + ')' + pass + print " ", len(S.ServiceinDataStreamParameter), "in datastream params : " + for iP in S.ServiceinDataStreamParameter: + print ' ' + iP.Parametername + '(' + str(iP.Parametertype) + ', ' + \ + str(iP.Parameterdependency) + ')' + pass + print " ", len(S.ServiceoutDataStreamParameter), "out datastream params : " + for iP in S.ServiceoutDataStreamParameter: + print ' ' + iP.Parametername + '(' + str(iP.Parametertype) + ', ' + \ + str(iP.Parameterdependency) + ')' + pass + pass + pass + -- 2.39.2