From: jfa Date: Wed, 30 Aug 2006 12:20:58 +0000 (+0000) Subject: Join modifications from branch BR_JR_from_V3_2_0b1: rename a .py file because of... X-Git-Tag: V3_2_2pre~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c2486b002e8a8575680e338df3c473f39adae2e9;p=modules%2Fkernel.git Join modifications from branch BR_JR_from_V3_2_0b1: rename a .py file because of clash with a module name. --- diff --git a/src/ModuleCatalog/Makefile.am b/src/ModuleCatalog/Makefile.am index f4d06ac04..b524f58ac 100644 --- a/src/ModuleCatalog/Makefile.am +++ b/src/ModuleCatalog/Makefile.am @@ -43,7 +43,7 @@ salomeinclude_HEADERS = \ SALOME_ModuleCatalog_Handler.hxx # Scripts to be installed -dist_salomescript_DATA = SALOME_TestModuleCatalog.py +dist_salomescript_DATA = TestModuleCatalog.py # diff --git a/src/ModuleCatalog/SALOME_TestModuleCatalog.py b/src/ModuleCatalog/SALOME_TestModuleCatalog.py deleted file mode 100644 index 9f9245b0b..000000000 --- a/src/ModuleCatalog/SALOME_TestModuleCatalog.py +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright (C) 2005 OPEN CASCADE, CEA, EDF R&D, LEG -# PRINCIPIA R&D, EADS CCR, Lip6, BV, CEDRAT -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -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 - diff --git a/src/ModuleCatalog/TestModuleCatalog.py b/src/ModuleCatalog/TestModuleCatalog.py new file mode 100755 index 000000000..9f9245b0b --- /dev/null +++ b/src/ModuleCatalog/TestModuleCatalog.py @@ -0,0 +1,82 @@ +# Copyright (C) 2005 OPEN CASCADE, CEA, EDF R&D, LEG +# PRINCIPIA R&D, EADS CCR, Lip6, BV, CEDRAT +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +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 +