From 288dc1c84630e521220d796b7c88c518f34856d5 Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 8 Aug 2012 13:57:09 +0000 Subject: [PATCH] Merge from V6_main_20120808 08Aug12 --- DEPRECATED/Makefile.in | 31 +- DEPRECATED/configure.in.base | 31 +- DEPRECATED/make_config.in | 31 +- KERNEL_version.h.in | 32 +- Makefile.am | 39 +- README.FIRST.txt | 2 +- adm_local/unix/config_files/README | 3 - bin/Makefile.am | 80 +- bin/NSparam.py | 34 +- bin/VERSION.in | 3 +- bin/addToKillList.py | 34 +- bin/appli_clean.sh | 64 +- bin/appli_gen.py | 101 +- bin/appli_install.sh | 33 +- bin/appliskel/.bashrc | 34 +- bin/appliskel/CatalogResources.xml | 4 - bin/appliskel/Makefile.am | 58 + bin/appliskel/README | 54 +- bin/appliskel/SalomeApp.xml | 100 - bin/appliskel/env.d/atFirst.sh | 82 - bin/appliskel/env.d/envProducts.sh | 140 - bin/appliskel/env.d/envSalome.sh | 45 - bin/appliskel/envd | 30 +- bin/appliskel/getAppliPath.py | 40 +- bin/appliskel/killCurrentPort | 57 - bin/appliskel/kill_remote_containers.py | 154 + bin/appliskel/runAppli | 30 +- bin/appliskel/runConsole | 30 +- bin/appliskel/runParam | 27 - bin/appliskel/runRemote.sh | 35 +- bin/appliskel/runSalomeScript | 249 + bin/appliskel/runSession | 129 +- bin/appliskel/runTests | 30 +- bin/appliskel/searchFreePort.sh | 33 +- bin/appliskel/update_catalogs.py | 273 + bin/config_appli.xml | 1 + bin/createAppli.sh | 32 +- bin/envSalome.py | 56 +- bin/killSalome.py | 49 +- bin/killSalomeWithPort.py | 179 +- bin/launchConfigureParser.py | 415 +- bin/launchSalome.py | 34 +- bin/nameserver.py | 63 +- bin/orbmodule.py | 57 +- bin/runIDLparser | 30 +- bin/runNS.py | 32 +- bin/runNS.sh | 31 +- bin/runSalome | 34 +- bin/runSalome.bat | 23 + bin/runSalome.csh | 33 +- bin/runSalome.ksh | 37 +- bin/runSalome.py | 530 +- bin/salome.launch | 2 - bin/salomeConsole.py | 32 +- bin/salome_session.py | 42 +- bin/salome_utils.py | 188 +- bin/server.py | 60 +- bin/setenv.py | 127 +- bin/showNS.py | 36 +- bin/shutdownSalome.py | 44 +- bin/virtual_salome.py | 94 +- bin/waitContainers.py | 38 +- bin/waitNS.py | 36 +- bin/waitNS.sh | 33 +- build_cmake | 29 +- build_cmake.bat | 20 +- build_configure | 31 +- clean_configure | 32 +- configure.ac | 352 +- doc/Makefile.am | 58 +- doc/README.cluster-CCRT | 20 + .../example_prerequis.sh | 31 +- doc/docutils/Makefile.am | 96 + doc/{ => docutils/archives}/INSTALL.txt | 0 .../archives}/KERNEL_Services.txt | 0 .../archives}/SALOME_Application.txt | 0 doc/{ => docutils/archives}/UnitTests.txt | 4 - doc/{ => docutils/archives}/index.txt | 0 .../archives}/kernel_resources.txt | 0 doc/{ => docutils/archives}/rst.css | 0 doc/{ => docutils/archives}/txt2html.sh | 33 +- doc/{ => docutils/archives}/userguide.txt | 0 doc/docutils/conf.py.in | 200 + doc/docutils/docapi.rst | 14 + doc/docutils/index.rst | 22 + doc/docutils/kernel.rst | 81 + doc/docutils/overview.rst | 47 + doc/docutils/parametric.rst | 22 + doc/docutils/salomepypkg.rst | 270 + doc/salome/Batch.texi | 4962 ----------------- doc/salome/Makefile.am | 73 +- doc/salome/batch.dox | 10 - doc/salome/examples/example1 | 45 + doc/salome/examples/example10 | 50 + doc/salome/examples/example11 | 49 + doc/salome/examples/example12 | 57 + doc/salome/examples/example13 | 60 + doc/salome/examples/example14 | 47 + doc/salome/examples/example15 | 43 + doc/salome/examples/example16 | 151 + doc/salome/examples/example17 | 154 + doc/salome/examples/example18 | 163 + doc/salome/examples/example19 | 540 ++ doc/salome/examples/example20 | 152 + doc/salome/examples/example21 | 127 + doc/salome/examples/example22 | 128 + doc/salome/examples/example23 | 30 + doc/salome/examples/example3 | 60 + doc/salome/examples/example4 | 58 + doc/salome/examples/example5 | 50 + doc/salome/examples/example6 | 47 + doc/salome/examples/example7 | 45 + doc/salome/examples/example8 | 54 + doc/salome/examples/example9 | 50 + doc/salome/gui/Makefile.am | 58 + .../KERNEL/doxyuser.in => gui/doxyfile.in} | 54 +- doc/salome/gui/images/head.png | Bin 0 -> 78545 bytes doc/salome/gui/images/icon_about.png | Bin 0 -> 465999 bytes doc/salome/gui/static/doxygen.css | 836 +++ doc/salome/gui/static/footer.html | 12 + doc/salome/gui/static/header.html.in | 20 + doc/salome/install.dox | 95 +- doc/salome/kernel_resources.dox | 194 +- doc/salome/kernel_salome.dox | 296 + doc/salome/kernel_services.dox | 233 +- doc/salome/kernel_services_cpphelpers.dox | 55 + doc/salome/main.dox | 78 +- doc/salome/salome_application.dox | 155 +- doc/salome/salome_file.dox | 7 +- doc/salome/tui/KERNEL/HTML/Logger.html | 18 - doc/salome/tui/KERNEL/HTML/SALOMEDS.html | 674 --- .../tui/KERNEL/HTML/SALOMEDS_Attributes.html | 894 --- .../tui/KERNEL/HTML/SALOME_Component.html | 94 - .../KERNEL/HTML/SALOME_DataTypeCatalog.html | 30 - .../tui/KERNEL/HTML/SALOME_Exception.html | 2 - .../tui/KERNEL/HTML/SALOME_ModuleCatalog.html | 82 - .../tui/KERNEL/HTML/SALOME_Registry.html | 42 - .../KERNEL/HTML/SALOME_RessourcesCatalog.html | 22 - .../tui/KERNEL/HTML/SALOME_Session.html | 34 - .../tui/KERNEL/HTML/SALOME_TestComponent.html | 18 - doc/salome/tui/KERNEL/HTML/TestNotif.html | 22 - doc/salome/tui/KERNEL/HTML/TypeData.html | 2 - doc/salome/tui/KERNEL/doxyfile.in | 214 - doc/salome/tui/KERNEL/exemple/Example1.html | 54 - doc/salome/tui/KERNEL/exemple/Example10.html | 59 - doc/salome/tui/KERNEL/exemple/Example11.html | 59 - doc/salome/tui/KERNEL/exemple/Example12.html | 67 - doc/salome/tui/KERNEL/exemple/Example13.html | 68 - doc/salome/tui/KERNEL/exemple/Example14.html | 57 - doc/salome/tui/KERNEL/exemple/Example15.html | 51 - doc/salome/tui/KERNEL/exemple/Example16.html | 158 - doc/salome/tui/KERNEL/exemple/Example17.html | 162 - doc/salome/tui/KERNEL/exemple/Example18.html | 171 - doc/salome/tui/KERNEL/exemple/Example19.html | 547 -- doc/salome/tui/KERNEL/exemple/Example2.html | 46 - doc/salome/tui/KERNEL/exemple/Example20.html | 160 - doc/salome/tui/KERNEL/exemple/Example21.html | 136 - doc/salome/tui/KERNEL/exemple/Example22.html | 137 - doc/salome/tui/KERNEL/exemple/Example23.html | 35 - doc/salome/tui/KERNEL/exemple/Example3.html | 68 - doc/salome/tui/KERNEL/exemple/Example4.html | 66 - doc/salome/tui/KERNEL/exemple/Example5.html | 58 - doc/salome/tui/KERNEL/exemple/Example6.html | 56 - doc/salome/tui/KERNEL/exemple/Example7.html | 55 - doc/salome/tui/KERNEL/exemple/Example8.html | 64 - doc/salome/tui/KERNEL/exemple/Example9.html | 59 - .../tui/KERNEL/sources/Application-About1.jpg | Bin 14327 -> 0 bytes doc/salome/tui/KERNEL/sources/application.gif | Bin 2602 -> 0 bytes doc/salome/tui/KERNEL/sources/application.jpg | Bin 792 -> 0 bytes doc/salome/tui/KERNEL/sources/doxygen.css | 170 - doc/salome/tui/KERNEL/sources/footer.html | 10 - .../tui/KERNEL/sources/html_comments.gif | Bin 156 -> 0 bytes .../tui/KERNEL/sources/kernel_about_4.png | Bin 134730 -> 0 bytes doc/salome/tui/KERNEL/sources/logocorp.gif | Bin 1792 -> 0 bytes doc/salome/tui/KERNEL/sources/myheader.html | 13 - doc/salome/tui/KERNEL/sources/occ.gif | Bin 14790 -> 0 bytes doc/salome/tui/KERNEL/sources/static/Link.gif | Bin 13959 -> 0 bytes .../tui/KERNEL/sources/static/SObject.gif | Bin 4966 -> 0 bytes .../KERNEL/sources/static/Study_Struct.gif | Bin 5833 -> 0 bytes .../tui/KERNEL/sources/static/doxygen.css | 170 - .../sources/static/examples_Kernel.html | 134 - .../sources/static/examples_Life_cycle.html | 116 - .../sources/static/examples_Naming.html | 66 - .../KERNEL/sources/static/examples_Study.html | 790 --- .../tui/KERNEL/sources/static/mapping.html | 329 -- .../tui/KERNEL/sources/static/ns_f3-1.jpg | Bin 8650 -> 0 bytes .../sources/static/overview_Kernel.html | 191 - .../sources/static/overview_Life_Cycle.html | 90 - .../sources/static/overview_Naming.html | 197 - .../KERNEL/sources/static/overview_Study.html | 261 - .../tui/KERNEL/sources/static/page2.html | 34 - .../tui/KERNEL/sources/static/tree.js.in | 200 - .../tui/KERNEL/sources/static/treeview.js | 505 -- doc/salome/tui/Makefile.am | 138 +- .../tui/{KERNEL/doxydev.in => doxyfile.in} | 29 +- doc/salome/tui/images/head.png | Bin 0 -> 78545 bytes doc/salome/tui/input/index.dox | 10 + doc/salome/tui/pythfilter.py | 35 +- doc/salome/tui/static/doxygen.css | 836 +++ doc/salome/tui/static/footer.html | 14 + doc/salome/tui/static/header.html.in | 20 + doc/salome/unittests.dox | 64 +- idl/Calcium_Ports.idl | 83 - idl/Calcium_Ports.idl.in | 96 + idl/DSC_Engines.idl | 162 +- idl/DSC_Engines.xml | 53 +- idl/Logger.idl | 45 +- idl/Makefile.am | 280 +- idl/Palm_Ports.idl | 43 +- idl/SALOMEDS.idl | 431 +- idl/SALOMEDS_Attributes.idl | 2720 +++++---- idl/SALOME_Comm.idl | 36 +- idl/SALOME_Component.idl | 403 +- idl/SALOME_Component.xml | 65 +- idl/SALOME_ContainerManager.idl | 390 +- idl/SALOME_Exception.idl | 60 +- idl/SALOME_Exception.xml | 38 +- idl/SALOME_GenericObj.idl | 62 +- idl/SALOME_GenericObj.xml | 35 + idl/SALOME_MPIContainer.idl | 45 +- idl/SALOME_MPIObject.idl | 38 +- idl/SALOME_ModuleCatalog.idl | 304 +- idl/SALOME_PACOExtension.idl | 116 + idl/SALOME_PACOExtension.xml | 56 + idl/SALOME_ParamPorts.idl | 41 + idl/SALOME_ParamPorts.xml | 55 + idl/SALOME_Parametric.idl | 92 + idl/SALOME_Ports.idl | 59 +- idl/SALOME_Ports.xml | 49 +- idl/SALOME_PyNode.idl | 69 + idl/SALOME_Registry.idl | 54 +- idl/SALOME_RessourcesCatalog.idl | 72 +- idl/SALOME_Session.idl | 127 +- idl/SALOME_TestComponent.idl | 42 +- idl/SALOME_TestMPIComponent.idl | 36 +- idl/SALOME_TestModuleCatalog.idl | 42 +- idl/SALOME_Types.idl | 31 + idl/TestNotif.idl | 36 +- idl/TypeData.idl | 34 +- idl/nstest.idl | 46 +- resources/CatalogResources.xml.in | 2 +- resources/KERNELCatalog.xml.in | 32 + resources/Makefile.am | 45 +- salome_adm/Makefile.am | 31 +- salome_adm/cmake_files/FindBOOST.cmake | 189 +- salome_adm/cmake_files/FindCPPUNIT.cmake | 162 +- salome_adm/cmake_files/FindDOXYGEN.cmake | 94 + salome_adm/cmake_files/FindHDF5.cmake | 214 +- salome_adm/cmake_files/FindKERNEL.cmake | 50 +- salome_adm/cmake_files/FindLIBBATCH.cmake | 137 + salome_adm/cmake_files/FindLIBXML2.cmake | 189 +- salome_adm/cmake_files/FindMPI.cmake | 153 + salome_adm/cmake_files/FindOMNIORB.cmake | 325 +- salome_adm/cmake_files/FindPLATFORM.cmake | 130 +- salome_adm/cmake_files/FindPTHREADS.cmake | 151 +- salome_adm/cmake_files/FindPYTHON.cmake | 275 +- salome_adm/cmake_files/FindSPHINX.cmake | 98 + salome_adm/cmake_files/FindSWIG.cmake | 110 +- .../InstallAndCompilePythonFile.cmake | 33 + salome_adm/cmake_files/Makefile.am | 42 +- salome_adm/cmake_files/UseOMNIORB.cmake | 80 + salome_adm/cmake_files/am2cmake.py | 1723 ++++-- .../install_and_compile_python_file.cmake | 28 + .../cmake_files/install_python_from_idl.cmake | 33 +- .../cmake_files/prepare_generating_doc.py | 43 + salome_adm/unix/DEPRECATED/Doxyfile | 31 +- salome_adm/unix/DEPRECATED/F77config.h.in | 30 +- salome_adm/unix/DEPRECATED/config.h.in | 31 +- salome_adm/unix/DEPRECATED/depend.in | 27 +- salome_adm/unix/DEPRECATED/envScript.in | 31 +- salome_adm/unix/DEPRECATED/make_commence.in | 31 +- salome_adm/unix/DEPRECATED/make_conclude.in | 31 +- salome_adm/unix/DEPRECATED/make_module.in | 31 +- salome_adm/unix/DEPRECATED/make_omniorb.in | 31 +- salome_adm/unix/Makefile.am | 31 +- salome_adm/unix/SALOMEconfig.ref.in | 78 +- .../config_files/DEPRECATED/ac_cc_warnings.m4 | 21 - .../config_files/DEPRECATED/ac_cxx_bool.m4 | 31 +- .../config_files/DEPRECATED/ac_cxx_mutable.m4 | 31 +- .../ac_cxx_partial_specialization.m4 | 31 +- .../DEPRECATED/ac_cxx_typename.m4 | 33 +- .../config_files/DEPRECATED/check_Salome.m4 | 34 +- .../config_files/DEPRECATED/check_java.m4 | 31 +- .../config_files/DEPRECATED/check_mico.m4 | 31 +- .../config_files/DEPRECATED/check_pthreads.m4 | 21 - .../unix/config_files/DEPRECATED/install-sh | 30 +- .../config_files/DEPRECATED/mkinstalldirs | 21 - salome_adm/unix/config_files/Makefile.am | 44 +- .../config_files/ac_check_sizeof_fortran.m4 | 68 + .../unix/config_files/ac_cxx_depend_flag.m4 | 43 +- .../unix/config_files/ac_cxx_have_sstream.m4 | 65 +- .../unix/config_files/ac_cxx_namespaces.m4 | 31 +- salome_adm/unix/config_files/ac_cxx_option.m4 | 31 +- .../config_files/ac_cxx_template_options.m4 | 31 +- .../config_files/ac_cxx_use_std_iostream.m4 | 33 +- .../unix/config_files/ac_cxx_warnings.m4 | 33 +- .../unix/config_files/ac_linker_options.m4 | 36 +- salome_adm/unix/config_files/acx_pthread.m4 | 31 +- salome_adm/unix/config_files/check_Kernel.m4 | 31 +- salome_adm/unix/config_files/check_boost.m4 | 86 +- salome_adm/unix/config_files/check_calcium.m4 | 77 + salome_adm/unix/config_files/check_cas.m4 | 90 +- salome_adm/unix/config_files/check_corba.m4 | 33 +- salome_adm/unix/config_files/check_cppunit.m4 | 31 +- salome_adm/unix/config_files/check_f77.m4 | 32 +- salome_adm/unix/config_files/check_hdf5.m4 | 72 +- salome_adm/unix/config_files/check_htmlgen.m4 | 31 +- salome_adm/unix/config_files/check_lam.m4 | 31 +- .../unix/config_files/check_libbatch.m4 | 111 + salome_adm/unix/config_files/check_libxml.m4 | 46 +- salome_adm/unix/config_files/check_local.m4 | 90 - salome_adm/unix/config_files/check_lsf.m4 | 105 - salome_adm/unix/config_files/check_mpi.m4 | 48 +- salome_adm/unix/config_files/check_mpich.m4 | 57 +- salome_adm/unix/config_files/check_omniorb.m4 | 37 +- salome_adm/unix/config_files/check_openmpi.m4 | 53 +- salome_adm/unix/config_files/check_openpbs.m4 | 88 - salome_adm/unix/config_files/check_paco++.m4 | 39 +- salome_adm/unix/config_files/check_sockets.m4 | 31 +- salome_adm/unix/config_files/check_sphinx.m4 | 35 + salome_adm/unix/config_files/check_swig.m4 | 32 +- salome_adm/unix/config_files/check_tbb.m4 | 117 + salome_adm/unix/config_files/check_vtk.m4 | 398 ++ salome_adm/unix/config_files/check_withihm.m4 | 31 +- .../unix/config_files/enable_pthreads.m4 | 21 - salome_adm/unix/config_files/hack_libtool.m4 | 48 + salome_adm/unix/config_files/local_install.m4 | 62 + salome_adm/unix/config_files/production.m4 | 55 +- salome_adm/unix/config_files/pyembed.m4 | 31 +- salome_adm/unix/config_files/python.m4 | 43 +- salome_adm/unix/make_common_starter.am | 54 +- src/Basics/BasicsGenericDestructor.cxx | 89 +- src/Basics/BasicsGenericDestructor.hxx | 43 +- src/Basics/Basics_DirUtils.cxx | 124 +- src/Basics/Basics_DirUtils.hxx | 36 +- src/Basics/Basics_OCCTVersion.hxx | 41 + src/Basics/Basics_Utils.cxx | 85 +- src/Basics/Basics_Utils.hxx | 129 +- src/Basics/Makefile.am | 36 +- src/Basics/SALOME_Basics.hxx | 32 +- src/Basics/Test/BasicMainTest.hxx | 31 +- src/Basics/Test/Makefile.am | 31 +- .../Batch_APIInternalFailureException.cxx | 37 - .../Batch_APIInternalFailureException.hxx | 51 - src/Batch/Batch_BatchManager.cxx | 149 - src/Batch/Batch_BatchManager.hxx | 85 - src/Batch/Batch_BatchManagerCatalog.cxx | 96 - src/Batch/Batch_BatchManagerCatalog.hxx | 70 - src/Batch/Batch_BatchManager_LSF.cxx | 194 - src/Batch/Batch_BatchManager_LSF.hxx | 97 - src/Batch/Batch_BatchManager_Local.cxx | 828 --- src/Batch/Batch_BatchManager_Local.hxx | 174 - src/Batch/Batch_BatchManager_Local_RSH.cxx | 151 - src/Batch/Batch_BatchManager_Local_RSH.hxx | 82 - src/Batch/Batch_BatchManager_Local_SH.cxx | 118 - src/Batch/Batch_BatchManager_Local_SH.hxx | 82 - src/Batch/Batch_BatchManager_Local_SSH.cxx | 152 - src/Batch/Batch_BatchManager_Local_SSH.hxx | 82 - src/Batch/Batch_BatchManager_PBS.cxx | 216 - src/Batch/Batch_BatchManager_PBS.hxx | 98 - src/Batch/Batch_BatchManager_eClient.cxx | 246 - src/Batch/Batch_BatchManager_eClient.hxx | 78 - src/Batch/Batch_BatchManager_eLSF.cxx | 363 -- src/Batch/Batch_BatchManager_eLSF.hxx | 96 - src/Batch/Batch_BatchManager_ePBS.cxx | 342 -- src/Batch/Batch_BatchManager_ePBS.hxx | 95 - src/Batch/Batch_BatchManager_eSGE.cxx | 344 -- src/Batch/Batch_BatchManager_eSGE.hxx | 95 - src/Batch/Batch_BoolType.cxx | 66 - src/Batch/Batch_BoolType.hxx | 69 - src/Batch/Batch_CharType.cxx | 66 - src/Batch/Batch_CharType.hxx | 70 - src/Batch/Batch_ConnexionFailureException.cxx | 37 - src/Batch/Batch_ConnexionFailureException.hxx | 53 - src/Batch/Batch_Couple.cxx | 63 - src/Batch/Batch_Couple.hxx | 74 - src/Batch/Batch_CoupleType.cxx | 73 - src/Batch/Batch_CoupleType.hxx | 72 - src/Batch/Batch_Date.cxx | 195 - src/Batch/Batch_Date.hxx | 67 - src/Batch/Batch_DateType.cxx | 74 - src/Batch/Batch_DateType.hxx | 74 - src/Batch/Batch_Defines.hxx | 42 - src/Batch/Batch_Environnement.cxx | 38 - src/Batch/Batch_Environnement.hxx | 48 - src/Batch/Batch_FactBatchManager.cxx | 68 - src/Batch/Batch_FactBatchManager.hxx | 63 - src/Batch/Batch_FactBatchManager_LSF.cxx | 60 - src/Batch/Batch_FactBatchManager_LSF.hxx | 57 - src/Batch/Batch_FactBatchManager_Local.cxx | 60 - src/Batch/Batch_FactBatchManager_Local.hxx | 57 - .../Batch_FactBatchManager_Local_RSH.cxx | 67 - .../Batch_FactBatchManager_Local_RSH.hxx | 57 - src/Batch/Batch_FactBatchManager_Local_SH.cxx | 60 - src/Batch/Batch_FactBatchManager_Local_SH.hxx | 57 - .../Batch_FactBatchManager_Local_SSH.cxx | 60 - .../Batch_FactBatchManager_Local_SSH.hxx | 57 - src/Batch/Batch_FactBatchManager_PBS.cxx | 58 - src/Batch/Batch_FactBatchManager_PBS.hxx | 57 - src/Batch/Batch_FactBatchManager_eClient.cxx | 50 - src/Batch/Batch_FactBatchManager_eClient.hxx | 60 - src/Batch/Batch_FactBatchManager_eLSF.cxx | 73 - src/Batch/Batch_FactBatchManager_eLSF.hxx | 63 - src/Batch/Batch_FactBatchManager_ePBS.cxx | 73 - src/Batch/Batch_FactBatchManager_ePBS.hxx | 63 - src/Batch/Batch_FactBatchManager_eSGE.cxx | 66 - src/Batch/Batch_FactBatchManager_eSGE.hxx | 61 - src/Batch/Batch_GenericException.cxx | 37 - src/Batch/Batch_GenericException.hxx | 54 - src/Batch/Batch_GenericType.cxx | 65 - src/Batch/Batch_GenericType.hxx | 72 - src/Batch/Batch_IOMutex.cxx | 38 - src/Batch/Batch_IOMutex.hxx | 47 - src/Batch/Batch_IntType.cxx | 72 - src/Batch/Batch_IntType.hxx | 69 - src/Batch/Batch_InvalidArgumentException.cxx | 37 - src/Batch/Batch_InvalidArgumentException.hxx | 53 - src/Batch/Batch_InvalidKeyException.cxx | 38 - src/Batch/Batch_InvalidKeyException.hxx | 58 - src/Batch/Batch_Job.cxx | 117 - src/Batch/Batch_Job.hxx | 78 - src/Batch/Batch_JobId.cxx | 137 - src/Batch/Batch_JobId.hxx | 91 - src/Batch/Batch_JobInfo.cxx | 96 - src/Batch/Batch_JobInfo.hxx | 79 - src/Batch/Batch_JobInfo_LSF.cxx | 204 - src/Batch/Batch_JobInfo_LSF.hxx | 76 - src/Batch/Batch_JobInfo_Local.cxx | 54 - src/Batch/Batch_JobInfo_Local.hxx | 60 - src/Batch/Batch_JobInfo_PBS.cxx | 198 - src/Batch/Batch_JobInfo_PBS.hxx | 72 - src/Batch/Batch_JobInfo_eLSF.cxx | 107 - src/Batch/Batch_JobInfo_eLSF.hxx | 72 - src/Batch/Batch_JobInfo_ePBS.cxx | 118 - src/Batch/Batch_JobInfo_ePBS.hxx | 71 - src/Batch/Batch_JobInfo_eSGE.cxx | 113 - src/Batch/Batch_JobInfo_eSGE.hxx | 72 - src/Batch/Batch_Job_LSF.cxx | 264 - src/Batch/Batch_Job_LSF.hxx | 65 - src/Batch/Batch_Job_Local.cxx | 106 - src/Batch/Batch_Job_Local.hxx | 71 - src/Batch/Batch_Job_PBS.cxx | 472 -- src/Batch/Batch_Job_PBS.hxx | 96 - src/Batch/Batch_ListIsFullException.cxx | 37 - src/Batch/Batch_ListIsFullException.hxx | 50 - src/Batch/Batch_LongType.cxx | 71 - src/Batch/Batch_LongType.hxx | 69 - src/Batch/Batch_MapKey.cxx | 42 - src/Batch/Batch_MapKey.hxx | 69 - .../Batch_NotYetImplementedException.cxx | 37 - .../Batch_NotYetImplementedException.hxx | 52 - src/Batch/Batch_Parametre.cxx | 295 - src/Batch/Batch_Parametre.hxx | 159 - src/Batch/Batch_PyVersatile.cxx | 202 - src/Batch/Batch_PyVersatile.hxx | 69 - src/Batch/Batch_RunTimeException.cxx | 37 - src/Batch/Batch_RunTimeException.hxx | 51 - src/Batch/Batch_StringType.cxx | 66 - src/Batch/Batch_StringType.hxx | 67 - src/Batch/Batch_TypeMismatchException.cxx | 36 - src/Batch/Batch_TypeMismatchException.hxx | 51 - src/Batch/Batch_Versatile.cxx | 323 -- src/Batch/Batch_Versatile.hxx | 123 - src/Batch/Makefile.am | 237 - src/Batch/MpiImpl.cxx | 277 - src/Batch/MpiImpl.hxx | 170 - src/Batch_SWIG/Batch_test.py | 74 - src/Batch_SWIG/Makefile.am | 86 - src/Batch_SWIG/libBatch_Swig.i | 84 - src/Batch_SWIG/libBatch_Swig_exception.i | 45 - src/Batch_SWIG/libBatch_Swig_typemap.i | 247 - src/Communication/Makefile.am | 32 +- src/Communication/MatrixClient.cxx | 31 +- src/Communication/MatrixClient.hxx | 31 +- src/Communication/MultiCommException.cxx | 32 +- src/Communication/MultiCommException.hxx | 31 +- src/Communication/Receiver.cxx | 32 +- src/Communication/Receiver.hxx | 31 +- src/Communication/ReceiverFactory.cxx | 32 +- src/Communication/ReceiverFactory.hxx | 31 +- src/Communication/Receivers.cxx | 87 +- src/Communication/Receivers.hxx | 31 +- src/Communication/SALOMEMultiComm.cxx | 31 +- src/Communication/SALOMEMultiComm.hxx | 31 +- src/Communication/SALOME_Comm_i.cxx | 91 +- src/Communication/SALOME_Comm_i.hxx | 66 +- src/Communication/SALOME_Communication.hxx | 33 +- src/Communication/SALOME_Matrix_i.cxx | 39 +- src/Communication/SALOME_Matrix_i.hxx | 31 +- src/Communication/SenderFactory.cxx | 70 +- src/Communication/SenderFactory.hxx | 31 +- src/Communication_SWIG/Makefile.am | 32 +- src/Communication_SWIG/libSALOME_Comm.i | 34 +- src/Container/Component_i.cxx | 475 +- src/Container/Container_i.cxx | 1745 +++--- src/Container/Container_init_python.cxx | 37 +- src/Container/Container_init_python.hxx | 35 +- src/Container/Makefile.am | 60 +- src/Container/SALOME_ComponentPy.py | 80 +- src/Container/SALOME_Component_i.hxx | 109 +- src/Container/SALOME_Container.cxx | 103 +- src/Container/SALOME_Container.hxx | 33 +- src/Container/SALOME_Container.py | 94 +- src/Container/SALOME_ContainerManager.cxx | 2323 +++++--- src/Container/SALOME_ContainerManager.hxx | 163 +- src/Container/SALOME_ContainerPy.py | 83 +- .../SALOME_Container_SignalsHandler.cxx | 33 +- src/Container/SALOME_Container_i.hxx | 90 +- src/Container/SALOME_FileRef_i.cxx | 51 +- src/Container/SALOME_FileRef_i.hxx | 35 +- src/Container/SALOME_FileTransfer_i.cxx | 102 +- src/Container/SALOME_FileTransfer_i.hxx | 40 +- src/Container/SALOME_PyNode.py | 109 + src/Container/Salome_file_i.cxx | 157 +- src/Container/Salome_file_i.hxx | 38 +- src/Container/TestSalome_file.cxx | 91 +- src/DF/DF_Application.cxx | 44 +- src/DF/DF_Application.hxx | 30 +- src/DF/DF_Attribute.cxx | 41 +- src/DF/DF_Attribute.hxx | 30 +- src/DF/DF_ChildIterator.cxx | 69 +- src/DF/DF_ChildIterator.hxx | 30 +- src/DF/DF_Container.cxx | 79 +- src/DF/DF_Container.hxx | 30 +- src/DF/DF_Document.cxx | 41 +- src/DF/DF_Document.hxx | 30 +- src/DF/DF_Label.cxx | 147 +- src/DF/DF_Label.hxx | 30 +- src/DF/DF_definitions.hxx | 44 +- src/DF/Makefile.am | 30 +- src/DF/testDF.cxx | 101 +- src/DSC/DSC_Basic/ConnectionManager_i.cxx | 55 +- src/DSC/DSC_Basic/ConnectionManager_i.hxx | 43 +- src/DSC/DSC_Basic/DSC_Basic.hxx | 32 +- src/DSC/DSC_Basic/DSC_Callbacks.hxx | 60 +- src/DSC/DSC_Basic/DSC_i.cxx | 55 +- src/DSC/DSC_Basic/DSC_i.hxx | 111 +- src/DSC/DSC_Basic/DSC_interface.cxx | 290 +- src/DSC/DSC_Basic/DSC_interface.hxx | 76 +- src/DSC/DSC_Basic/Makefile.am | 36 +- src/DSC/DSC_Basic/PortProperties_i.cxx | 31 +- src/DSC/DSC_Basic/PortProperties_i.hxx | 33 +- .../SALOME_ConnectionManagerServer.cxx | 33 +- src/DSC/DSC_Python/Makefile.am | 41 +- src/DSC/DSC_Python/calcium.i | 129 +- src/DSC/DSC_Python/dsccalcium.py | 44 +- src/DSC/DSC_User/Basic/Makefile.am | 33 +- src/DSC/DSC_User/Basic/basic_port_factory.cxx | 36 +- src/DSC/DSC_User/Basic/basic_port_factory.hxx | 31 +- .../Basic/data_short_port_provides.cxx | 35 +- .../Basic/data_short_port_provides.hxx | 31 +- .../DSC_User/Basic/data_short_port_uses.cxx | 38 +- .../DSC_User/Basic/data_short_port_uses.hxx | 33 +- src/DSC/DSC_User/DSC_Exception.hxx | 39 +- .../DSC_User/Datastream/AdjacentFunctor.hxx | 47 +- .../DSC_User/Datastream/AdjacentPredicate.hxx | 35 +- src/DSC/DSC_User/Datastream/Calcium/Calcium.c | 274 - .../DSC_User/Datastream/Calcium/Calcium.cxx | 78 +- .../DSC_User/Datastream/Calcium/Calcium.hxx | 39 +- .../DSC_User/Datastream/Calcium/CalciumC.c | 357 ++ .../Datastream/Calcium/CalciumCInterface.cxx | 241 + .../Datastream/Calcium/CalciumCInterface.hxx | 96 + .../Calcium/CalciumCouplingPolicy.cxx | 85 +- .../Calcium/CalciumCouplingPolicy.hxx | 203 +- .../Calcium/CalciumCxxInterface.cxx | 34 + .../Calcium/CalciumCxxInterface.hxx | 857 ++- .../Datastream/Calcium/CalciumException.hxx | 44 +- .../Datastream/Calcium/CalciumFortranInt.h.in | 42 + .../Calcium/CalciumGenericProvidesPort.hxx | 338 +- .../Calcium/CalciumGenericUsesPort.hxx | 35 +- .../Datastream/Calcium/CalciumInterface.hxx | 262 +- .../Calcium/CalciumMacroCInterface.hxx | 154 + .../Datastream/Calcium/CalciumPortTraits.hxx | 55 +- .../Calcium/CalciumProvidesPort.cxx | 37 +- ...desPort.hxx => CalciumProvidesPort.hxx.in} | 38 +- .../Datastream/Calcium/CalciumTypes.hxx | 137 +- .../Calcium/CalciumTypes2CorbaTypes.cxx | 120 +- .../Calcium/CalciumTypes2CorbaTypes.hxx | 39 +- .../Calcium/CalciumTypesManipulator.hxx | 35 +- .../Datastream/Calcium/Copy2CorbaSpace.hxx | 44 +- .../Datastream/Calcium/Copy2UserSpace.hxx | 43 +- .../Calcium/CorbaTypes2CalciumTypes.cxx | 120 +- .../Calcium/CorbaTypes2CalciumTypes.hxx | 39 +- .../DSC_User/Datastream/Calcium/Makefile.am | 60 +- src/DSC/DSC_User/Datastream/Calcium/calcium.h | 1265 +++-- .../DSC_User/Datastream/Calcium/calcium.hf | 31 +- .../DSC_User/Datastream/Calcium/calciumE.h | 568 +- .../DSC_User/Datastream/Calcium/calciumP.h | 775 +-- .../Calcium/calcium_complex_port_uses.hxx | 39 +- .../Calcium/calcium_destructors_port_uses.cxx | 35 +- .../Calcium/calcium_double_port_uses.hxx | 39 +- .../Calcium/calcium_intc_port_uses.hxx | 50 + .../Calcium/calcium_integer_port_uses.hxx | 52 - .../Calcium/calcium_integer_port_uses.hxx.in | 50 + .../Calcium/calcium_logical_port_uses.hxx | 39 +- .../Calcium/calcium_long_port_uses.hxx | 50 + .../Calcium/calcium_port_factory.cxx | 44 +- .../Calcium/calcium_port_factory.hxx | 33 +- .../Calcium/calcium_provides_port.cxx | 31 +- .../Calcium/calcium_provides_port.hxx | 32 +- .../Calcium/calcium_real_port_uses.hxx | 39 +- .../Calcium/calcium_repository_types.cxx | 35 +- .../Calcium/calcium_string_port_uses.hxx | 39 +- .../Datastream/Calcium/calcium_uses_port.cxx | 31 +- .../Datastream/Calcium/calcium_uses_port.hxx | 31 +- .../DSC_User/Datastream/Calcium/calciumf.c | 417 +- .../DSC_User/Datastream/Calcium/calciumf.h | 79 + src/DSC/DSC_User/Datastream/Calcium/fortoc.h | 30 +- .../Datastream/Calcium/testInterpolation.cxx | 47 +- .../Calcium/test_CalciumInterface.cxx | 31 +- .../Calcium/test_DataIdContainer.cxx | 51 +- src/DSC/DSC_User/Datastream/Calcium/version.h | 43 +- src/DSC/DSC_User/Datastream/ConstTraits.hxx | 31 +- .../Datastream/CorbaTypeManipulator.hxx | 48 +- .../DSC_User/Datastream/CouplingPolicy.hxx | 61 +- src/DSC/DSC_User/Datastream/DataIdFilter.hxx | 105 +- src/DSC/DSC_User/Datastream/DisplayPair.hxx | 31 +- .../DSC_User/Datastream/FindKeyPredicate.hxx | 35 +- src/DSC/DSC_User/Datastream/GenericPort.hxx | 373 +- .../Datastream/GenericProvidesPort.hxx | 33 +- .../DSC_User/Datastream/GenericUsesPort.hxx | 55 +- .../DSC_User/Datastream/IteratorTraits.hxx | 31 +- src/DSC/DSC_User/Datastream/Makefile.am | 31 +- src/DSC/DSC_User/Datastream/Palm/Makefile.am | 33 +- .../Datastream/Palm/PalmCouplingPolicy.hxx | 77 +- .../palm_data_seq_short_port_provides.hxx | 33 +- .../Palm/palm_data_short_port_provides.hxx | 31 +- .../Datastream/Palm/palm_port_factory.cxx | 37 +- .../Datastream/Palm/palm_port_factory.hxx | 31 +- .../Datastream/Palm/test_DataIdContainer.cxx | 31 +- .../Datastream/ProcessTimeIntervalTraits.hxx | 33 +- src/DSC/DSC_User/Datastream/fake.cc | 31 +- .../Datastream/testAdjacentFunctor.cxx | 43 +- .../Datastream/testAdjacentPredicate.cxx | 35 +- src/DSC/DSC_User/Makefile.am | 34 +- src/DSC/DSC_User/Superv_Component_i.cxx | 162 +- src/DSC/DSC_User/Superv_Component_i.hxx | 141 +- src/DSC/DSC_User/base_port.cxx | 38 +- src/DSC/DSC_User/base_port.hxx | 31 +- src/DSC/DSC_User/port_factory.hxx | 30 +- src/DSC/DSC_User/provides_port.cxx | 31 +- src/DSC/DSC_User/provides_port.hxx | 33 +- src/DSC/DSC_User/test_DSC_Exception.cxx | 31 +- src/DSC/DSC_User/uses_port.cxx | 31 +- src/DSC/DSC_User/uses_port.hxx | 33 +- src/DSC/Makefile.am | 43 +- src/DSC/ParallelDSC/Makefile.am | 42 +- src/DSC/ParallelDSC/ParallelDSC_i.cxx | 69 +- src/DSC/ParallelDSC/ParallelDSC_i.hxx | 114 +- .../Param_Double_Port_provides_i.cxx | 343 ++ .../Param_Double_Port_provides_i.hxx | 79 + .../ParallelDSC/Param_Double_Port_uses_i.cxx | 113 + .../ParallelDSC/Param_Double_Port_uses_i.hxx | 63 + src/GenericObj/Makefile.am | 32 +- src/GenericObj/SALOME_GenericObj_i.cc | 148 +- src/GenericObj/SALOME_GenericObj_i.hh | 60 +- src/HDFPersist/HDFOI.hxx | 36 +- src/HDFPersist/HDFarray.cc | 112 + src/HDFPersist/HDFarray.hxx | 59 + src/HDFPersist/HDFarrayClose.c | 50 + src/HDFPersist/HDFarrayCreate.c | 76 + src/HDFPersist/HDFarrayGetDim.c | 53 + src/HDFPersist/HDFarrayGetType.c | 71 + src/HDFPersist/HDFarrayGetTypeId.c | 35 + src/HDFPersist/HDFarrayGetnDim.c | 41 + src/HDFPersist/HDFascii.cc | 359 +- src/HDFPersist/HDFascii.hxx | 40 +- src/HDFPersist/HDFattrClose.c | 31 +- src/HDFPersist/HDFattrCreate.c | 31 +- src/HDFPersist/HDFattrGetSize.c | 31 +- src/HDFPersist/HDFattrGetType.c | 35 +- src/HDFPersist/HDFattrOpen.c | 31 +- src/HDFPersist/HDFattrRead.c | 31 +- src/HDFPersist/HDFattrWrite.c | 35 +- src/HDFPersist/HDFattribute.cc | 35 +- src/HDFPersist/HDFattribute.hxx | 34 +- src/HDFPersist/HDFcontainerObject.cc | 35 +- src/HDFPersist/HDFcontainerObject.hxx | 34 +- src/HDFPersist/HDFconvert.cc | 36 +- src/HDFPersist/HDFconvert.hxx | 34 +- src/HDFPersist/HDFdataset.cc | 44 +- src/HDFPersist/HDFdataset.hxx | 43 +- src/HDFPersist/HDFdatasetClose.c | 31 +- src/HDFPersist/HDFdatasetCreate.c | 49 +- src/HDFPersist/HDFdatasetGetDim.c | 33 +- src/HDFPersist/HDFdatasetGetOrder.c | 31 +- src/HDFPersist/HDFdatasetGetSize.c | 31 +- src/HDFPersist/HDFdatasetGetType.c | 39 +- src/HDFPersist/HDFdatasetGetnDim.c | 31 +- src/HDFPersist/HDFdatasetOpen.c | 31 +- src/HDFPersist/HDFdatasetRead.c | 35 +- src/HDFPersist/HDFdatasetWrite.c | 33 +- src/HDFPersist/HDFerrorModeLock.c | 31 +- src/HDFPersist/HDFexception.hxx | 31 +- src/HDFPersist/HDFexplorer.cc | 32 +- src/HDFPersist/HDFexplorer.hxx | 31 +- src/HDFPersist/HDFexport.hxx | 32 +- src/HDFPersist/HDFfile.cc | 36 +- src/HDFPersist/HDFfile.hxx | 34 +- src/HDFPersist/HDFfileClose.c | 31 +- src/HDFPersist/HDFfileCreate.c | 33 +- src/HDFPersist/HDFfileMount.c | 31 +- src/HDFPersist/HDFfileOpen.c | 31 +- src/HDFPersist/HDFfileUmount.c | 31 +- src/HDFPersist/HDFgroup.cc | 35 +- src/HDFPersist/HDFgroup.hxx | 34 +- src/HDFPersist/HDFgroupClose.c | 31 +- src/HDFPersist/HDFgroupCreate.c | 31 +- src/HDFPersist/HDFgroupOpen.c | 31 +- src/HDFPersist/HDFinternalObject.cc | 34 +- src/HDFPersist/HDFinternalObject.hxx | 34 +- src/HDFPersist/HDFnObjects.c | 31 +- src/HDFPersist/HDFobject.cc | 39 +- src/HDFPersist/HDFobject.hxx | 34 +- src/HDFPersist/HDFobjectIdentify.c | 34 +- src/HDFPersist/HDFobjectType.c | 31 +- src/HDFPersist/HDFtypes.h | 37 +- src/HDFPersist/Makefile.am | 39 +- src/HDFPersist/hdfi.h | 60 +- src/HDFPersist/test1.c | 31 +- src/HDFPersist/test2.c | 31 +- src/HDFPersist/test3.cxx | 116 +- src/HDFPersist/test4.cxx | 162 +- src/HDFPersist/test5.cxx | 32 +- src/HDFPersist/test6.cxx | 42 +- src/HDFPersist/test7.cxx | 33 +- src/HDFPersist/test8.cxx | 32 +- src/HDFPersist/test9.cxx | 32 +- src/KERNEL_PY/Help.py | 32 +- src/KERNEL_PY/Makefile.am | 70 +- src/KERNEL_PY/PyInterp.py | 32 +- src/KERNEL_PY/__init__.py | 243 + src/KERNEL_PY/batchmode_salome.py | 36 +- src/KERNEL_PY/import_hook.py | 62 +- src/KERNEL_PY/iparameters.py | 43 +- src/KERNEL_PY/kernel/Makefile.am | 52 + src/KERNEL_PY/kernel/__init__.py | 89 + src/KERNEL_PY/kernel/datamodeler.py | 336 ++ src/KERNEL_PY/kernel/deprecation.py | 129 + src/KERNEL_PY/kernel/diclookup.py | 119 + src/KERNEL_PY/kernel/enumerate.py | 212 + src/KERNEL_PY/kernel/kernelpy_autotest.sh.in | 76 + src/KERNEL_PY/kernel/logconfig.py.in | 27 + src/KERNEL_PY/kernel/logger.py | 230 + src/KERNEL_PY/kernel/parametric/Makefile.am | 28 + src/KERNEL_PY/kernel/parametric/__init__.py | 19 + .../kernel/parametric/compo_utils.py | 97 + .../kernel/parametric/pyscript_utils.py | 94 + .../kernel/parametric/study_exchange_vars.py | 217 + src/KERNEL_PY/kernel/pyunittester.py | 171 + src/KERNEL_PY/kernel/services.py | 254 + src/KERNEL_PY/kernel/studyedit.py | 501 ++ src/KERNEL_PY/kernel/syshelper.py | 114 + src/KERNEL_PY/kernel/termcolor.py | 150 + src/KERNEL_PY/kernel/testdata.py | 159 + src/KERNEL_PY/kernel/threadhelper.py | 385 ++ src/KERNEL_PY/kernel/uiexception.py | 106 + src/KERNEL_PY/kernel/unittester.py | 72 + src/KERNEL_PY/kernel_shared_modules.py | 32 +- src/KERNEL_PY/omnipatch.py | 32 +- src/KERNEL_PY/salome.py | 158 +- src/KERNEL_PY/salome_ComponentGUI.py | 42 +- src/KERNEL_PY/salome_genericobj.py | 44 + src/KERNEL_PY/salome_iapp.py | 51 +- src/KERNEL_PY/salome_kernel.py | 32 +- src/KERNEL_PY/salome_notebook.py | 165 +- src/KERNEL_PY/salome_pynode.py | 74 + src/KERNEL_PY/salome_shared_modules.py | 32 +- src/KERNEL_PY/salome_study.py | 83 +- src/KERNEL_PY/salome_test.py | 735 ++- src/KERNEL_PY/salome_version.py | 122 +- src/KernelHelpers/KernelHelpers.hxx | 39 + src/KernelHelpers/KernelHelpersUseCases.cxx | 120 + src/KernelHelpers/Makefile.am | 79 + .../SALOMEDS_DriverDefaultImpl.cxx | 265 + .../SALOMEDS_DriverDefaultImpl.hxx | 109 + src/KernelHelpers/SALOME_KernelServices.cxx | 185 + src/KernelHelpers/SALOME_KernelServices.hxx | 118 + src/KernelHelpers/SALOME_StudyEditor.cxx | 164 + src/KernelHelpers/SALOME_StudyEditor.hxx | 70 + .../Test/KernelHelpersUnitTests.cxx | 112 + .../Test/KernelHelpersUnitTests.hxx | 48 + src/KernelHelpers/Test/Makefile.am | 75 + src/KernelHelpers/Test/TestKernelHelpers.cxx | 31 + src/KernelHelpers/Test/TestKernelHelpers.py | 51 + src/Launcher/BatchTest.cxx | 200 +- src/Launcher/BatchTest.hxx | 35 +- src/Launcher/Launcher.cxx | 1276 ++--- src/Launcher/Launcher.hxx | 123 +- src/Launcher/Launcher_Job.cxx | 654 +++ src/Launcher/Launcher_Job.hxx | 161 + src/Launcher/Launcher_Job_Command.cxx | 80 + src/Launcher/Launcher_Job_Command.hxx | 50 + src/Launcher/Launcher_Job_PythonSALOME.cxx | 39 + src/Launcher/Launcher_Job_PythonSALOME.hxx | 42 + src/Launcher/Launcher_Job_SALOME.cxx | 144 + src/Launcher/Launcher_Job_SALOME.hxx | 53 + src/Launcher/Launcher_Job_YACSFile.cxx | 62 + src/Launcher/Launcher_Job_YACSFile.hxx | 45 + src/Launcher/Launcher_Utils.hxx | 58 + src/Launcher/Makefile.am | 91 +- src/Launcher/SALOME_Launcher.cxx | 1112 +++- src/Launcher/SALOME_Launcher.hxx | 84 +- src/Launcher/SALOME_LauncherServer.cxx | 39 +- src/Launcher/SALOME_Launcher_Handler.cxx | 89 +- src/Launcher/SALOME_Launcher_Handler.hxx | 31 +- src/Launcher/SALOME_Launcher_Parser.cxx | 61 +- src/Launcher/SALOME_Launcher_Parser.hxx | 31 +- src/Launcher/SALOME_Launcher_defs.hxx | 32 +- src/Launcher/TestLauncher.cxx | 42 + src/LifeCycleCORBA/LifeCycleCORBA.py | 274 - src/LifeCycleCORBA/Makefile.am | 34 +- .../SALOME_FileTransferCORBA.cxx | 174 +- .../SALOME_FileTransferCORBA.hxx | 38 +- src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx | 842 ++- src/LifeCycleCORBA/SALOME_LifeCycleCORBA.hxx | 107 +- .../Test/LifeCycleCORBATest.cxx | 199 +- .../Test/LifeCycleCORBATest.hxx | 31 +- src/LifeCycleCORBA/Test/Makefile.am | 34 +- .../Test/TestLifeCycleCORBA.cxx | 31 +- src/LifeCycleCORBA/Test/TestLifeCycleCORBA.py | 32 +- src/LifeCycleCORBA/TestContainerManager.cxx | 72 +- src/LifeCycleCORBA/Test_LifeCycleCORBA.cxx | 70 +- src/LifeCycleCORBA_SWIG/LifeCycleCORBA.py | 69 +- src/LifeCycleCORBA_SWIG/Makefile.am | 34 +- .../Test/LifeCycleCORBA_SWIGTest.py | 34 +- src/LifeCycleCORBA_SWIG/Test/Makefile.am | 40 +- .../Test/TestLifeCycleCORBA_SWIG.py | 32 +- .../Test/testcontainermanager.py | 74 + .../Test/testresourcemanager.py | 146 + src/LifeCycleCORBA_SWIG/TestLifeCycleCORBA.py | 32 +- .../libSALOME_LifeCycleCORBA.i | 202 +- src/Logger/Makefile.am | 40 +- src/Logger/SALOME_Logger_Server.cxx | 33 +- src/Logger/SALOME_Logger_Server.hxx | 62 +- src/Logger/SALOME_Logger_Server_main.cxx | 105 +- src/Logger/SALOME_Trace.cxx | 72 +- src/Logger/SALOME_Trace.hxx | 51 +- src/Logger/SALOME_Trace.py | 39 +- src/Logger/Test/Makefile.am | 33 +- src/Logger/Test/TestKiller.py | 32 +- src/MPIContainer/MPIContainer_i.cxx | 559 +- src/MPIContainer/MPIContainer_i.hxx | 108 +- src/MPIContainer/MPIObject_i.cxx | 281 +- src/MPIContainer/MPIObject_i.hxx | 52 +- src/MPIContainer/Makefile.am | 46 +- src/MPIContainer/SALOME_MPIContainer.cxx | 70 +- src/MPIContainer/launch_testMPI2.csh | 40 + src/MPIContainer/testMPI2.cxx | 205 + src/Makefile.am | 50 +- src/ModuleCatalog/Makefile.am | 38 +- src/ModuleCatalog/PathPrefix.hxx | 33 +- src/ModuleCatalog/SALOME_ModuleCatalog.hxx | 33 +- .../SALOME_ModuleCatalog_Acomponent_impl.cxx | 181 +- .../SALOME_ModuleCatalog_Acomponent_impl.hxx | 46 +- .../SALOME_ModuleCatalog_Client.cxx | 72 +- .../SALOME_ModuleCatalog_Handler.cxx | 38 +- .../SALOME_ModuleCatalog_Handler.hxx | 35 +- .../SALOME_ModuleCatalog_Parser.hxx | 31 +- .../SALOME_ModuleCatalog_Parser_IO.cxx | 43 +- .../SALOME_ModuleCatalog_Parser_IO.hxx | 43 +- .../SALOME_ModuleCatalog_Server.cxx | 154 +- .../SALOME_ModuleCatalog_impl.cxx | 307 +- .../SALOME_ModuleCatalog_impl.hxx | 52 +- src/ModuleCatalog/TestModuleCatalog.py | 32 +- src/ModuleGenerator/IDLparser.py | 230 +- src/ModuleGenerator/Makefile.am | 38 +- src/ModuleGenerator/README | 4 +- src/ModuleGenerator/testIDLparser.in | 30 +- src/ModuleGenerator/tests/AddComponent.idl | 40 +- src/ModuleGenerator/tests/SubComponent.idl | 34 +- src/ModuleGenerator/tests/Truc2Component.idl | 31 +- src/ModuleGenerator/tests/TrucComponent.idl | 31 +- src/ModuleGenerator/tests/test1.sh | 31 +- src/ModuleGenerator/tests/test1b.sh | 31 +- src/ModuleGenerator/tests/test2.sh | 31 +- src/ModuleGenerator/tests/test3.sh | 31 +- src/ModuleGenerator/tests/test4.sh | 31 +- src/ModuleGenerator/tests/test5.sh | 31 +- src/NOTIFICATION_SWIG/Makefile.am | 32 +- src/NOTIFICATION_SWIG/NOTIFICATION.i | 31 +- src/NOTIFICATION_SWIG/NOTIFICATION_Swig.cxx | 32 +- src/NOTIFICATION_SWIG/NOTIFICATION_Swig.hxx | 31 +- .../SALOME_NOTIFICATION_SWIG.hxx | 33 +- src/NamingService/Makefile.am | 34 +- .../NamingService_WaitForServerReadiness.cxx | 75 +- .../NamingService_WaitForServerReadiness.hxx | 33 +- src/NamingService/SALOME_NamingService.cxx | 791 +-- src/NamingService/SALOME_NamingService.hxx | 76 +- src/NamingService/SALOME_NamingService.i | 31 +- src/NamingService/SALOME_NamingServicePy.py | 80 +- .../SALOME_NamingService_defs.hxx | 32 +- src/NamingService/ServiceUnreachable.cxx | 36 +- src/NamingService/ServiceUnreachable.hxx | 37 +- src/NamingService/Test/Makefile.am | 43 +- src/NamingService/Test/NamingServiceTest.cxx | 200 +- src/NamingService/Test/NamingServiceTest.hxx | 35 +- src/NamingService/Test/TestNamingService.cxx | 31 +- src/NamingService/Test/TestNamingService.py | 32 +- src/Notification/CosNotifyShorthands.h | 441 +- src/Notification/Makefile.am | 32 +- src/Notification/NOTIFICATION.cxx | 40 +- src/Notification/NOTIFICATION.hxx | 31 +- src/Notification/NOTIFICATION_Consumer.cxx | 40 +- src/Notification/NOTIFICATION_Consumer.hxx | 31 +- src/Notification/NOTIFICATION_Supplier.cxx | 36 +- src/Notification/NOTIFICATION_Supplier.hxx | 35 +- src/Notification/SALOME_NOTIFICATION.hxx | 33 +- src/ParallelContainer/Makefile.am | 48 +- .../Parallel_Salome_file_i.cxx | 82 +- .../Parallel_Salome_file_i.hxx | 41 +- .../SALOME_ParallelComponent_i.cxx | 466 +- .../SALOME_ParallelComponent_i.hxx | 75 +- .../SALOME_ParallelContainerNodeDummy.cxx | 90 +- .../SALOME_ParallelContainerNodeMpi.cxx | 146 +- .../SALOME_ParallelContainerProxyDummy.cxx | 83 +- .../SALOME_ParallelContainerProxyMpi.cxx | 147 +- .../SALOME_ParallelContainerProxy_i.cxx | 415 +- .../SALOME_ParallelContainerProxy_i.hxx | 95 +- .../SALOME_ParallelContainer_i.cxx | 1285 +++-- .../SALOME_ParallelContainer_i.hxx | 157 +- .../SALOME_ParallelGlobalProcessVar_i.cxx | 38 + .../SALOME_ParallelGlobalProcessVar_i.hxx | 60 + src/Registry/Makefile.am | 37 +- src/Registry/RegistryConnexion.cxx | 205 +- src/Registry/RegistryConnexion.hxx | 55 +- src/Registry/RegistryService.cxx | 313 +- src/Registry/RegistryService.hxx | 118 +- src/Registry/SALOME_Registry.hxx | 33 +- src/Registry/SALOME_Registry_Server.cxx | 210 +- src/ResourcesManager/Makefile.am | 34 +- src/ResourcesManager/ResourcesManager.cxx | 633 ++- src/ResourcesManager/ResourcesManager.hxx | 105 +- .../ResourcesManager_Defs.hxx | 45 +- .../SALOME_LoadRateManager.cxx | 86 +- .../SALOME_LoadRateManager.hxx | 65 +- .../SALOME_ResourcesCatalog_Handler.cxx | 1110 ++-- .../SALOME_ResourcesCatalog_Handler.hxx | 55 +- .../SALOME_ResourcesCatalog_Parser.cxx | 242 +- .../SALOME_ResourcesCatalog_Parser.hxx | 108 +- .../SALOME_ResourcesManager.cxx | 427 +- .../SALOME_ResourcesManager.hxx | 66 +- src/SALOMEDS/Makefile.am | 36 +- src/SALOMEDS/README_attributes | 2 +- src/SALOMEDS/SALOMEDS.cxx | 41 +- src/SALOMEDS/SALOMEDS.hxx | 31 +- src/SALOMEDS/SALOMEDS_AttLong_i.cxx | 33 +- src/SALOMEDS/SALOMEDS_AttLong_i.hxx | 33 +- src/SALOMEDS/SALOMEDS_AttReal_i.cxx | 33 +- src/SALOMEDS/SALOMEDS_AttReal_i.hxx | 33 +- src/SALOMEDS/SALOMEDS_AttributeComment.cxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeComment.hxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeComment_i.cxx | 35 +- src/SALOMEDS/SALOMEDS_AttributeComment_i.hxx | 33 +- src/SALOMEDS/SALOMEDS_AttributeDrawable.cxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeDrawable.hxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeDrawable_i.cxx | 33 +- src/SALOMEDS/SALOMEDS_AttributeDrawable_i.hxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeExpandable.cxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeExpandable.hxx | 31 +- .../SALOMEDS_AttributeExpandable_i.cxx | 33 +- .../SALOMEDS_AttributeExpandable_i.hxx | 31 +- .../SALOMEDS_AttributeExternalFileDef.cxx | 31 +- .../SALOMEDS_AttributeExternalFileDef.hxx | 31 +- .../SALOMEDS_AttributeExternalFileDef_i.cxx | 35 +- .../SALOMEDS_AttributeExternalFileDef_i.hxx | 33 +- src/SALOMEDS/SALOMEDS_AttributeFileType.cxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeFileType.hxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeFileType_i.cxx | 35 +- src/SALOMEDS/SALOMEDS_AttributeFileType_i.hxx | 33 +- src/SALOMEDS/SALOMEDS_AttributeFlags.cxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeFlags.hxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeFlags_i.cxx | 33 +- src/SALOMEDS/SALOMEDS_AttributeFlags_i.hxx | 33 +- src/SALOMEDS/SALOMEDS_AttributeGraphic.cxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeGraphic.hxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeGraphic_i.cxx | 33 +- src/SALOMEDS/SALOMEDS_AttributeGraphic_i.hxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeIOR.cxx | 35 +- src/SALOMEDS/SALOMEDS_AttributeIOR.hxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeIOR_i.cxx | 39 +- src/SALOMEDS/SALOMEDS_AttributeIOR_i.hxx | 35 +- src/SALOMEDS/SALOMEDS_AttributeInteger.cxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeInteger.hxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeInteger_i.cxx | 33 +- src/SALOMEDS/SALOMEDS_AttributeInteger_i.hxx | 33 +- src/SALOMEDS/SALOMEDS_AttributeLocalID.cxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeLocalID.hxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeLocalID_i.cxx | 33 +- src/SALOMEDS/SALOMEDS_AttributeLocalID_i.hxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeName.cxx | 35 +- src/SALOMEDS/SALOMEDS_AttributeName.hxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeName_i.cxx | 35 +- src/SALOMEDS/SALOMEDS_AttributeName_i.hxx | 33 +- src/SALOMEDS/SALOMEDS_AttributeOpened.cxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeOpened.hxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeOpened_i.cxx | 33 +- src/SALOMEDS/SALOMEDS_AttributeOpened_i.hxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeParameter.cxx | 81 +- src/SALOMEDS/SALOMEDS_AttributeParameter.hxx | 31 +- .../SALOMEDS_AttributeParameter_i.cxx | 64 +- .../SALOMEDS_AttributeParameter_i.hxx | 56 +- .../SALOMEDS_AttributePersistentRef.cxx | 31 +- .../SALOMEDS_AttributePersistentRef.hxx | 31 +- .../SALOMEDS_AttributePersistentRef_i.cxx | 35 +- .../SALOMEDS_AttributePersistentRef_i.hxx | 33 +- src/SALOMEDS/SALOMEDS_AttributePixMap.cxx | 37 +- src/SALOMEDS/SALOMEDS_AttributePixMap.hxx | 31 +- src/SALOMEDS/SALOMEDS_AttributePixMap_i.cxx | 35 +- src/SALOMEDS/SALOMEDS_AttributePixMap_i.hxx | 33 +- .../SALOMEDS_AttributePythonObject.cxx | 31 +- .../SALOMEDS_AttributePythonObject.hxx | 31 +- .../SALOMEDS_AttributePythonObject_i.cxx | 35 +- .../SALOMEDS_AttributePythonObject_i.hxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeReal.cxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeReal.hxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeReal_i.cxx | 33 +- src/SALOMEDS/SALOMEDS_AttributeReal_i.hxx | 33 +- src/SALOMEDS/SALOMEDS_AttributeSelectable.cxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeSelectable.hxx | 31 +- .../SALOMEDS_AttributeSelectable_i.cxx | 33 +- .../SALOMEDS_AttributeSelectable_i.hxx | 31 +- .../SALOMEDS_AttributeSequenceOfInteger.cxx | 31 +- .../SALOMEDS_AttributeSequenceOfInteger.hxx | 31 +- .../SALOMEDS_AttributeSequenceOfInteger_i.cxx | 38 +- .../SALOMEDS_AttributeSequenceOfInteger_i.hxx | 31 +- .../SALOMEDS_AttributeSequenceOfReal.cxx | 31 +- .../SALOMEDS_AttributeSequenceOfReal.hxx | 31 +- .../SALOMEDS_AttributeSequenceOfReal_i.cxx | 37 +- .../SALOMEDS_AttributeSequenceOfReal_i.hxx | 33 +- src/SALOMEDS/SALOMEDS_AttributeString.cxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeString.hxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeString_i.cxx | 35 +- src/SALOMEDS/SALOMEDS_AttributeString_i.hxx | 33 +- .../SALOMEDS_AttributeStudyProperties.cxx | 175 +- .../SALOMEDS_AttributeStudyProperties.hxx | 60 +- .../SALOMEDS_AttributeStudyProperties_i.cxx | 109 +- .../SALOMEDS_AttributeStudyProperties_i.hxx | 58 +- .../SALOMEDS_AttributeTableOfInteger.cxx | 271 +- .../SALOMEDS_AttributeTableOfInteger.hxx | 42 +- .../SALOMEDS_AttributeTableOfInteger_i.cxx | 345 +- .../SALOMEDS_AttributeTableOfInteger_i.hxx | 90 +- .../SALOMEDS_AttributeTableOfReal.cxx | 269 +- .../SALOMEDS_AttributeTableOfReal.hxx | 42 +- .../SALOMEDS_AttributeTableOfReal_i.cxx | 333 +- .../SALOMEDS_AttributeTableOfReal_i.hxx | 103 +- .../SALOMEDS_AttributeTableOfString.cxx | 267 +- .../SALOMEDS_AttributeTableOfString.hxx | 42 +- .../SALOMEDS_AttributeTableOfString_i.cxx | 348 +- .../SALOMEDS_AttributeTableOfString_i.hxx | 89 +- src/SALOMEDS/SALOMEDS_AttributeTarget.cxx | 35 +- src/SALOMEDS/SALOMEDS_AttributeTarget.hxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeTarget_i.cxx | 35 +- src/SALOMEDS/SALOMEDS_AttributeTarget_i.hxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeTextColor.cxx | 39 +- src/SALOMEDS/SALOMEDS_AttributeTextColor.hxx | 31 +- .../SALOMEDS_AttributeTextColor_i.cxx | 37 +- .../SALOMEDS_AttributeTextColor_i.hxx | 33 +- .../SALOMEDS_AttributeTextHighlightColor.cxx | 39 +- .../SALOMEDS_AttributeTextHighlightColor.hxx | 31 +- ...SALOMEDS_AttributeTextHighlightColor_i.cxx | 37 +- ...SALOMEDS_AttributeTextHighlightColor_i.hxx | 33 +- src/SALOMEDS/SALOMEDS_AttributeTreeNode.cxx | 37 +- src/SALOMEDS/SALOMEDS_AttributeTreeNode.hxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeTreeNode_i.cxx | 35 +- src/SALOMEDS/SALOMEDS_AttributeTreeNode_i.hxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeUserID.cxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeUserID.hxx | 31 +- src/SALOMEDS/SALOMEDS_AttributeUserID_i.cxx | 35 +- src/SALOMEDS/SALOMEDS_AttributeUserID_i.hxx | 33 +- src/SALOMEDS/SALOMEDS_Attributes.hxx | 34 +- .../SALOMEDS_BasicAttributeFactory.cxx | 41 +- .../SALOMEDS_BasicAttributeFactory.hxx | 31 +- src/SALOMEDS/SALOMEDS_BasicAttribute_i.cxx | 32 +- src/SALOMEDS/SALOMEDS_BasicAttribute_i.hxx | 33 +- src/SALOMEDS/SALOMEDS_Callback_i.hxx | 33 +- src/SALOMEDS/SALOMEDS_ChildIterator.cxx | 40 +- src/SALOMEDS/SALOMEDS_ChildIterator.hxx | 31 +- src/SALOMEDS/SALOMEDS_ChildIterator_i.cxx | 35 +- src/SALOMEDS/SALOMEDS_ChildIterator_i.hxx | 37 +- src/SALOMEDS/SALOMEDS_Client.cxx | 37 +- src/SALOMEDS/SALOMEDS_ClientAttributes.hxx | 31 +- src/SALOMEDS/SALOMEDS_Defines.hxx | 33 +- src/SALOMEDS/SALOMEDS_Driver_i.cxx | 235 +- src/SALOMEDS/SALOMEDS_Driver_i.hxx | 119 +- src/SALOMEDS/SALOMEDS_GenericAttribute.cxx | 44 +- src/SALOMEDS/SALOMEDS_GenericAttribute.hxx | 31 +- src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx | 47 +- src/SALOMEDS/SALOMEDS_GenericAttribute_i.hxx | 39 +- src/SALOMEDS/SALOMEDS_IParameters.cxx | 143 +- src/SALOMEDS/SALOMEDS_IParameters.hxx | 41 +- src/SALOMEDS/SALOMEDS_SComponent.cxx | 46 +- src/SALOMEDS/SALOMEDS_SComponent.hxx | 31 +- src/SALOMEDS/SALOMEDS_SComponentIterator.cxx | 35 +- src/SALOMEDS/SALOMEDS_SComponentIterator.hxx | 31 +- .../SALOMEDS_SComponentIterator_i.cxx | 35 +- .../SALOMEDS_SComponentIterator_i.hxx | 37 +- src/SALOMEDS/SALOMEDS_SComponent_i.cxx | 40 +- src/SALOMEDS/SALOMEDS_SComponent_i.hxx | 33 +- src/SALOMEDS/SALOMEDS_SObject.cxx | 77 +- src/SALOMEDS/SALOMEDS_SObject.hxx | 35 +- src/SALOMEDS/SALOMEDS_SObject_i.cxx | 77 +- src/SALOMEDS/SALOMEDS_SObject_i.hxx | 39 +- src/SALOMEDS/SALOMEDS_Server.cxx | 153 +- src/SALOMEDS/SALOMEDS_Study.cxx | 161 +- src/SALOMEDS/SALOMEDS_Study.hxx | 40 +- src/SALOMEDS/SALOMEDS_StudyBuilder.cxx | 41 +- src/SALOMEDS/SALOMEDS_StudyBuilder.hxx | 35 +- src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx | 125 +- src/SALOMEDS/SALOMEDS_StudyBuilder_i.hxx | 37 +- src/SALOMEDS/SALOMEDS_StudyManager.cxx | 37 +- src/SALOMEDS/SALOMEDS_StudyManager.hxx | 31 +- src/SALOMEDS/SALOMEDS_StudyManager_i.cxx | 104 +- src/SALOMEDS/SALOMEDS_StudyManager_i.hxx | 31 +- src/SALOMEDS/SALOMEDS_Study_i.cxx | 334 +- src/SALOMEDS/SALOMEDS_Study_i.hxx | 58 +- src/SALOMEDS/SALOMEDS_TMPFile_i.cxx | 31 +- src/SALOMEDS/SALOMEDS_TMPFile_i.hxx | 31 +- src/SALOMEDS/SALOMEDS_UseCaseBuilder.cxx | 61 +- src/SALOMEDS/SALOMEDS_UseCaseBuilder.hxx | 35 +- src/SALOMEDS/SALOMEDS_UseCaseBuilder_i.cxx | 69 +- src/SALOMEDS/SALOMEDS_UseCaseBuilder_i.hxx | 45 +- src/SALOMEDS/SALOMEDS_UseCaseIterator.cxx | 35 +- src/SALOMEDS/SALOMEDS_UseCaseIterator.hxx | 31 +- src/SALOMEDS/SALOMEDS_UseCaseIterator_i.cxx | 35 +- src/SALOMEDS/SALOMEDS_UseCaseIterator_i.hxx | 39 +- src/SALOMEDS/SALOME_DriverPy.py | 40 +- src/SALOMEDS/Test/Makefile.am | 36 +- src/SALOMEDS/Test/SALOMEDSTest.cxx | 34 +- src/SALOMEDS/Test/SALOMEDSTest.hxx | 31 +- .../Test/SALOMEDSTest_AttributeComment.cxx | 33 +- .../Test/SALOMEDSTest_AttributeDrawable.cxx | 31 +- .../Test/SALOMEDSTest_AttributeExpandable.cxx | 31 +- .../SALOMEDSTest_AttributeExternalFileDef.cxx | 33 +- .../Test/SALOMEDSTest_AttributeFileType.cxx | 33 +- .../Test/SALOMEDSTest_AttributeFlags.cxx | 31 +- .../Test/SALOMEDSTest_AttributeGraphic.cxx | 31 +- .../Test/SALOMEDSTest_AttributeIOR.cxx | 35 +- .../Test/SALOMEDSTest_AttributeInteger.cxx | 31 +- .../Test/SALOMEDSTest_AttributeLocalID.cxx | 31 +- .../Test/SALOMEDSTest_AttributeName.cxx | 33 +- .../Test/SALOMEDSTest_AttributeOpened.cxx | 31 +- .../Test/SALOMEDSTest_AttributeParameter.cxx | 37 +- .../SALOMEDSTest_AttributePersistentRef.cxx | 33 +- .../Test/SALOMEDSTest_AttributePixMap.cxx | 33 +- .../SALOMEDSTest_AttributePythonObject.cxx | 33 +- .../Test/SALOMEDSTest_AttributeReal.cxx | 31 +- .../Test/SALOMEDSTest_AttributeSelectable.cxx | 31 +- ...ALOMEDSTest_AttributeSequenceOfInteger.cxx | 33 +- .../SALOMEDSTest_AttributeSequenceOfReal.cxx | 33 +- .../SALOMEDSTest_AttributeStudyProperties.cxx | 37 +- .../SALOMEDSTest_AttributeTableOfInteger.cxx | 49 +- .../SALOMEDSTest_AttributeTableOfReal.cxx | 49 +- .../SALOMEDSTest_AttributeTableOfString.cxx | 49 +- .../Test/SALOMEDSTest_AttributeTarget.cxx | 33 +- .../Test/SALOMEDSTest_AttributeTextColor.cxx | 31 +- ...LOMEDSTest_AttributeTextHighlightColor.cxx | 31 +- .../Test/SALOMEDSTest_AttributeTreeNode.cxx | 37 +- .../Test/SALOMEDSTest_AttributeUserID.cxx | 33 +- .../Test/SALOMEDSTest_ChildIterator.cxx | 31 +- src/SALOMEDS/Test/SALOMEDSTest_SComponent.cxx | 35 +- .../Test/SALOMEDSTest_SComponentIterator.cxx | 33 +- src/SALOMEDS/Test/SALOMEDSTest_SObject.cxx | 35 +- src/SALOMEDS/Test/SALOMEDSTest_Study.cxx | 55 +- .../Test/SALOMEDSTest_StudyBuilder.cxx | 41 +- .../Test/SALOMEDSTest_StudyManager.cxx | 37 +- src/SALOMEDS/Test/SALOMEDSTest_UseCase.cxx | 31 +- src/SALOMEDS/Test/TestSALOMEDS.cxx | 44 +- src/SALOMEDS/Test/TestSALOMEDS.py | 32 +- src/SALOMEDSClient/Makefile.am | 34 +- src/SALOMEDSClient/SALOMEDSClient.hxx | 31 +- .../SALOMEDSClient_AttributeComment.hxx | 31 +- .../SALOMEDSClient_AttributeDrawable.hxx | 31 +- .../SALOMEDSClient_AttributeExpandable.hxx | 31 +- ...ALOMEDSClient_AttributeExternalFileDef.hxx | 31 +- .../SALOMEDSClient_AttributeFileType.hxx | 31 +- .../SALOMEDSClient_AttributeFlags.hxx | 31 +- .../SALOMEDSClient_AttributeGraphic.hxx | 31 +- .../SALOMEDSClient_AttributeIOR.hxx | 31 +- .../SALOMEDSClient_AttributeInteger.hxx | 31 +- .../SALOMEDSClient_AttributeLocalID.hxx | 31 +- .../SALOMEDSClient_AttributeName.hxx | 31 +- .../SALOMEDSClient_AttributeOpened.hxx | 31 +- .../SALOMEDSClient_AttributeParameter.hxx | 31 +- .../SALOMEDSClient_AttributePersistentRef.hxx | 31 +- .../SALOMEDSClient_AttributePixMap.hxx | 31 +- .../SALOMEDSClient_AttributePythonObject.hxx | 31 +- .../SALOMEDSClient_AttributeReal.hxx | 31 +- .../SALOMEDSClient_AttributeSelectable.hxx | 31 +- ...OMEDSClient_AttributeSequenceOfInteger.hxx | 31 +- ...SALOMEDSClient_AttributeSequenceOfReal.hxx | 31 +- .../SALOMEDSClient_AttributeString.hxx | 31 +- ...ALOMEDSClient_AttributeStudyProperties.hxx | 60 +- .../SALOMEDSClient_AttributeTable.hxx | 79 + ...SALOMEDSClient_AttributeTableOfInteger.hxx | 59 +- .../SALOMEDSClient_AttributeTableOfReal.hxx | 58 +- .../SALOMEDSClient_AttributeTableOfString.hxx | 58 +- .../SALOMEDSClient_AttributeTarget.hxx | 31 +- .../SALOMEDSClient_AttributeTextColor.hxx | 31 +- ...MEDSClient_AttributeTextHighlightColor.hxx | 31 +- .../SALOMEDSClient_AttributeTreeNode.hxx | 31 +- .../SALOMEDSClient_AttributeUserID.hxx | 31 +- .../SALOMEDSClient_ChildIterator.hxx | 31 +- .../SALOMEDSClient_ClientFactory.cxx | 33 +- .../SALOMEDSClient_ClientFactory.hxx | 31 +- .../SALOMEDSClient_GenericAttribute.hxx | 31 +- .../SALOMEDSClient_IParameters.hxx | 41 +- .../SALOMEDSClient_Observer.hxx | 41 + .../SALOMEDSClient_SComponent.hxx | 31 +- .../SALOMEDSClient_SComponentIterator.hxx | 31 +- src/SALOMEDSClient/SALOMEDSClient_SObject.hxx | 32 +- src/SALOMEDSClient/SALOMEDSClient_Study.hxx | 51 +- .../SALOMEDSClient_StudyBuilder.hxx | 33 +- .../SALOMEDSClient_StudyManager.hxx | 31 +- .../SALOMEDSClient_UseCaseBuilder.hxx | 35 +- .../SALOMEDSClient_UseCaseIterator.hxx | 31 +- .../SALOMEDSClient_definitions.hxx | 45 +- src/SALOMEDSImpl/Makefile.am | 47 +- .../SALOMEDSImpl_AttributeComment.cxx | 43 +- .../SALOMEDSImpl_AttributeComment.hxx | 31 +- .../SALOMEDSImpl_AttributeDrawable.cxx | 37 +- .../SALOMEDSImpl_AttributeDrawable.hxx | 31 +- .../SALOMEDSImpl_AttributeExpandable.cxx | 37 +- .../SALOMEDSImpl_AttributeExpandable.hxx | 31 +- .../SALOMEDSImpl_AttributeExternalFileDef.cxx | 33 +- .../SALOMEDSImpl_AttributeExternalFileDef.hxx | 31 +- .../SALOMEDSImpl_AttributeFileType.cxx | 35 +- .../SALOMEDSImpl_AttributeFileType.hxx | 31 +- .../SALOMEDSImpl_AttributeFlags.cxx | 36 +- .../SALOMEDSImpl_AttributeFlags.hxx | 31 +- .../SALOMEDSImpl_AttributeGraphic.cxx | 39 +- .../SALOMEDSImpl_AttributeGraphic.hxx | 31 +- .../SALOMEDSImpl_AttributeIOR.cxx | 111 +- .../SALOMEDSImpl_AttributeIOR.hxx | 33 +- .../SALOMEDSImpl_AttributeInteger.cxx | 38 +- .../SALOMEDSImpl_AttributeInteger.hxx | 31 +- .../SALOMEDSImpl_AttributeLocalID.cxx | 41 +- .../SALOMEDSImpl_AttributeLocalID.hxx | 31 +- .../SALOMEDSImpl_AttributeName.cxx | 35 +- .../SALOMEDSImpl_AttributeName.hxx | 31 +- .../SALOMEDSImpl_AttributeOpened.cxx | 35 +- .../SALOMEDSImpl_AttributeOpened.hxx | 31 +- .../SALOMEDSImpl_AttributeParameter.cxx | 160 +- .../SALOMEDSImpl_AttributeParameter.hxx | 57 +- .../SALOMEDSImpl_AttributePersistentRef.cxx | 35 +- .../SALOMEDSImpl_AttributePersistentRef.hxx | 31 +- .../SALOMEDSImpl_AttributePixMap.cxx | 35 +- .../SALOMEDSImpl_AttributePixMap.hxx | 31 +- .../SALOMEDSImpl_AttributePythonObject.cxx | 49 +- .../SALOMEDSImpl_AttributePythonObject.hxx | 31 +- .../SALOMEDSImpl_AttributeReal.cxx | 39 +- .../SALOMEDSImpl_AttributeReal.hxx | 31 +- .../SALOMEDSImpl_AttributeReference.cxx | 39 +- .../SALOMEDSImpl_AttributeReference.hxx | 31 +- .../SALOMEDSImpl_AttributeSelectable.cxx | 35 +- .../SALOMEDSImpl_AttributeSelectable.hxx | 31 +- ...ALOMEDSImpl_AttributeSequenceOfInteger.cxx | 45 +- ...ALOMEDSImpl_AttributeSequenceOfInteger.hxx | 31 +- .../SALOMEDSImpl_AttributeSequenceOfReal.cxx | 49 +- .../SALOMEDSImpl_AttributeSequenceOfReal.hxx | 31 +- .../SALOMEDSImpl_AttributeString.cxx | 35 +- .../SALOMEDSImpl_AttributeString.hxx | 31 +- .../SALOMEDSImpl_AttributeStudyProperties.cxx | 159 +- .../SALOMEDSImpl_AttributeStudyProperties.hxx | 39 +- .../SALOMEDSImpl_AttributeTable.hxx | 106 + .../SALOMEDSImpl_AttributeTableOfInteger.cxx | 346 +- .../SALOMEDSImpl_AttributeTableOfInteger.hxx | 119 +- .../SALOMEDSImpl_AttributeTableOfReal.cxx | 350 +- .../SALOMEDSImpl_AttributeTableOfReal.hxx | 118 +- .../SALOMEDSImpl_AttributeTableOfString.cxx | 341 +- .../SALOMEDSImpl_AttributeTableOfString.hxx | 120 +- .../SALOMEDSImpl_AttributeTarget.cxx | 63 +- .../SALOMEDSImpl_AttributeTarget.hxx | 36 +- .../SALOMEDSImpl_AttributeTextColor.cxx | 45 +- .../SALOMEDSImpl_AttributeTextColor.hxx | 31 +- ...LOMEDSImpl_AttributeTextHighlightColor.cxx | 51 +- ...LOMEDSImpl_AttributeTextHighlightColor.hxx | 31 +- .../SALOMEDSImpl_AttributeTreeNode.cxx | 49 +- .../SALOMEDSImpl_AttributeTreeNode.hxx | 31 +- .../SALOMEDSImpl_AttributeUserID.cxx | 41 +- .../SALOMEDSImpl_AttributeUserID.hxx | 37 +- src/SALOMEDSImpl/SALOMEDSImpl_Attributes.hxx | 75 +- src/SALOMEDSImpl/SALOMEDSImpl_Callback.cxx | 31 +- src/SALOMEDSImpl/SALOMEDSImpl_Callback.hxx | 38 +- .../SALOMEDSImpl_ChildIterator.cxx | 31 +- .../SALOMEDSImpl_ChildIterator.hxx | 31 +- .../SALOMEDSImpl_ChildNodeIterator.cxx | 51 +- .../SALOMEDSImpl_ChildNodeIterator.hxx | 31 +- src/SALOMEDSImpl/SALOMEDSImpl_Defines.hxx | 32 +- src/SALOMEDSImpl/SALOMEDSImpl_Driver.hxx | 32 +- .../SALOMEDSImpl_GenericAttribute.cxx | 47 +- .../SALOMEDSImpl_GenericAttribute.hxx | 33 +- .../SALOMEDSImpl_GenericVariable.cxx | 44 +- .../SALOMEDSImpl_GenericVariable.hxx | 24 +- src/SALOMEDSImpl/SALOMEDSImpl_IParameters.cxx | 203 +- src/SALOMEDSImpl/SALOMEDSImpl_IParameters.hxx | 41 +- src/SALOMEDSImpl/SALOMEDSImpl_SComponent.cxx | 39 +- src/SALOMEDSImpl/SALOMEDSImpl_SComponent.hxx | 31 +- .../SALOMEDSImpl_SComponentIterator.cxx | 33 +- .../SALOMEDSImpl_SComponentIterator.hxx | 31 +- src/SALOMEDSImpl/SALOMEDSImpl_SObject.cxx | 69 +- src/SALOMEDSImpl/SALOMEDSImpl_SObject.hxx | 32 +- .../SALOMEDSImpl_ScalarVariable.cxx | 109 +- .../SALOMEDSImpl_ScalarVariable.hxx | 26 +- src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx | 884 +-- src/SALOMEDSImpl/SALOMEDSImpl_Study.hxx | 73 +- .../SALOMEDSImpl_StudyBuilder.cxx | 151 +- .../SALOMEDSImpl_StudyBuilder.hxx | 31 +- src/SALOMEDSImpl/SALOMEDSImpl_StudyHandle.cxx | 33 +- src/SALOMEDSImpl/SALOMEDSImpl_StudyHandle.hxx | 31 +- .../SALOMEDSImpl_StudyManager.cxx | 701 ++- .../SALOMEDSImpl_StudyManager.hxx | 33 +- src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.cxx | 31 +- src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.hxx | 31 +- src/SALOMEDSImpl/SALOMEDSImpl_Tool.cxx | 200 +- src/SALOMEDSImpl/SALOMEDSImpl_Tool.hxx | 39 +- .../SALOMEDSImpl_UseCaseBuilder.cxx | 113 +- .../SALOMEDSImpl_UseCaseBuilder.hxx | 35 +- .../SALOMEDSImpl_UseCaseIterator.cxx | 37 +- .../SALOMEDSImpl_UseCaseIterator.hxx | 31 +- src/SALOMEDSImpl/Test/Makefile.am | 34 +- src/SALOMEDSImpl/Test/SALOMEDSImplTest.cxx | 38 +- src/SALOMEDSImpl/Test/SALOMEDSImplTest.hxx | 31 +- src/SALOMEDSImpl/Test/TestSALOMEDSImpl.cxx | 31 +- src/SALOMEDSImpl/Test/TestSALOMEDSImpl.py | 32 +- src/SALOMEDSImpl/testDS.cxx | 193 +- src/SALOMELocalTrace/BaseTraceCollector.cxx | 33 +- src/SALOMELocalTrace/BaseTraceCollector.hxx | 31 +- src/SALOMELocalTrace/FileTraceCollector.cxx | 133 +- src/SALOMELocalTrace/FileTraceCollector.hxx | 31 +- src/SALOMELocalTrace/LocalTraceBufferPool.cxx | 158 +- src/SALOMELocalTrace/LocalTraceBufferPool.hxx | 31 +- src/SALOMELocalTrace/LocalTraceCollector.cxx | 107 +- src/SALOMELocalTrace/LocalTraceCollector.hxx | 31 +- src/SALOMELocalTrace/Makefile.am | 31 +- src/SALOMELocalTrace/SALOME_LocalTrace.hxx | 33 +- src/SALOMELocalTrace/Test/Makefile.am | 33 +- .../Test/SALOMELocalTraceTest.cxx | 51 +- .../Test/SALOMELocalTraceTest.hxx | 31 +- .../Test/TestSALOMELocalTrace.cxx | 31 +- .../Test/TestSALOMELocalTrace.py | 32 +- src/SALOMELocalTrace/utilities.h | 51 +- src/SALOMETraceCollector/Makefile.am | 32 +- .../SALOMETraceCollector.cxx | 141 +- .../SALOMETraceCollector.hxx | 33 +- src/SALOMETraceCollector/Test/Makefile.am | 36 +- .../Test/SALOMETraceCollectorTest.cxx | 42 +- .../Test/SALOMETraceCollectorTest.hxx | 31 +- .../Test/TestSALOMETraceCollector.cxx | 31 +- .../Test/TestSALOMETraceCollector.py | 32 +- .../TraceCollector_WaitForServerReadiness.cxx | 129 +- .../TraceCollector_WaitForServerReadiness.hxx | 33 +- src/TOOLSDS/Makefile.am | 32 +- src/TOOLSDS/SALOMEDS_Tool.cxx | 127 +- src/TOOLSDS/SALOMEDS_Tool.hxx | 47 +- src/TestContainer/Makefile.am | 38 +- src/TestContainer/SALOME_TestComponent.hxx | 32 +- src/TestContainer/SALOME_TestComponentPy.py | 32 +- src/TestContainer/SALOME_TestComponent_i.cxx | 80 +- src/TestContainer/SALOME_TestComponent_i.hxx | 39 +- src/TestContainer/TestComponentPy.py | 31 +- src/TestContainer/TestContainer.cxx | 161 +- src/TestContainer/TestLogger.cxx | 31 +- src/TestContainer/TestLogger.py | 32 +- src/TestMPIContainer/Makefile.am | 34 +- .../TestMPIComponentEngine.cxx | 65 +- .../TestMPIComponentEngine.hxx | 46 +- src/TestMPIContainer/TestMPIContainer.cxx | 57 +- src/UnitTests/Makefile.am | 36 +- src/UnitTests/UnitTests.cxx | 31 +- src/UnitTests/UnitTests.py | 32 +- src/Utils/Makefile.am | 34 +- src/Utils/OpUtil.cxx | 39 +- src/Utils/OpUtil.hxx | 31 +- src/Utils/SALOME_Utils.hxx | 33 +- src/Utils/SALOME_utilities.py | 32 +- src/Utils/Test/Makefile.am | 39 +- src/Utils/Test/TestUtils.cxx | 31 +- src/Utils/Test/TestUtils.py | 32 +- src/Utils/Test/UtilsTest.cxx | 44 +- src/Utils/Test/UtilsTest.hxx | 31 +- src/Utils/Utils_CommException.cxx | 32 +- src/Utils/Utils_CommException.hxx | 41 +- src/Utils/Utils_CorbaException.hxx | 31 +- src/Utils/Utils_DESTRUCTEUR_GENERIQUE.cxx | 155 +- src/Utils/Utils_DESTRUCTEUR_GENERIQUE.hxx | 69 +- src/Utils/Utils_ExceptHandlers.cxx | 41 +- src/Utils/Utils_ExceptHandlers.hxx | 31 +- src/Utils/Utils_Identity.cxx | 217 +- src/Utils/Utils_Identity.hxx | 91 +- src/Utils/Utils_Identity.py | 55 +- src/Utils/Utils_Mutex.cxx | 37 +- src/Utils/Utils_Mutex.hxx | 35 +- src/Utils/Utils_ORB_INIT.cxx | 49 +- src/Utils/Utils_ORB_INIT.hxx | 48 +- src/Utils/Utils_SALOME_Exception.cxx | 111 +- src/Utils/Utils_SALOME_Exception.hxx | 52 +- src/Utils/Utils_SINGLETON.hxx | 137 +- src/Utils/Utils_Timer.cxx | 39 +- src/Utils/Utils_Timer.hxx | 31 +- src/Utils/duplicate.cxx | 53 +- src/win32pm/setup.py | 31 +- src/win32pm/win32pm.c | 30 +- 1403 files changed, 65982 insertions(+), 62373 deletions(-) delete mode 100644 adm_local/unix/config_files/README delete mode 100644 bin/appliskel/CatalogResources.xml create mode 100644 bin/appliskel/Makefile.am delete mode 100644 bin/appliskel/SalomeApp.xml delete mode 100644 bin/appliskel/env.d/atFirst.sh delete mode 100644 bin/appliskel/env.d/envProducts.sh delete mode 100644 bin/appliskel/env.d/envSalome.sh delete mode 100755 bin/appliskel/killCurrentPort create mode 100755 bin/appliskel/kill_remote_containers.py delete mode 100755 bin/appliskel/runParam create mode 100755 bin/appliskel/runSalomeScript create mode 100644 bin/appliskel/update_catalogs.py create mode 100644 bin/runSalome.bat create mode 100644 doc/docutils/Makefile.am rename doc/{ => docutils/archives}/INSTALL.txt (100%) rename doc/{ => docutils/archives}/KERNEL_Services.txt (100%) rename doc/{ => docutils/archives}/SALOME_Application.txt (100%) rename doc/{ => docutils/archives}/UnitTests.txt (97%) rename doc/{ => docutils/archives}/index.txt (100%) rename doc/{ => docutils/archives}/kernel_resources.txt (100%) rename doc/{ => docutils/archives}/rst.css (100%) rename doc/{ => docutils/archives}/txt2html.sh (54%) rename doc/{ => docutils/archives}/userguide.txt (100%) create mode 100644 doc/docutils/conf.py.in create mode 100644 doc/docutils/docapi.rst create mode 100644 doc/docutils/index.rst create mode 100644 doc/docutils/kernel.rst create mode 100644 doc/docutils/overview.rst create mode 100644 doc/docutils/parametric.rst create mode 100644 doc/docutils/salomepypkg.rst delete mode 100755 doc/salome/Batch.texi delete mode 100644 doc/salome/batch.dox create mode 100644 doc/salome/examples/example1 create mode 100644 doc/salome/examples/example10 create mode 100644 doc/salome/examples/example11 create mode 100644 doc/salome/examples/example12 create mode 100644 doc/salome/examples/example13 create mode 100644 doc/salome/examples/example14 create mode 100644 doc/salome/examples/example15 create mode 100644 doc/salome/examples/example16 create mode 100644 doc/salome/examples/example17 create mode 100644 doc/salome/examples/example18 create mode 100644 doc/salome/examples/example19 create mode 100644 doc/salome/examples/example20 create mode 100644 doc/salome/examples/example21 create mode 100644 doc/salome/examples/example22 create mode 100644 doc/salome/examples/example23 create mode 100644 doc/salome/examples/example3 create mode 100644 doc/salome/examples/example4 create mode 100644 doc/salome/examples/example5 create mode 100644 doc/salome/examples/example6 create mode 100644 doc/salome/examples/example7 create mode 100644 doc/salome/examples/example8 create mode 100644 doc/salome/examples/example9 create mode 100644 doc/salome/gui/Makefile.am rename doc/salome/{tui/KERNEL/doxyuser.in => gui/doxyfile.in} (88%) create mode 100755 doc/salome/gui/images/head.png create mode 100755 doc/salome/gui/images/icon_about.png create mode 100644 doc/salome/gui/static/doxygen.css create mode 100755 doc/salome/gui/static/footer.html create mode 100755 doc/salome/gui/static/header.html.in create mode 100644 doc/salome/kernel_salome.dox create mode 100644 doc/salome/kernel_services_cpphelpers.dox delete mode 100644 doc/salome/tui/KERNEL/HTML/Logger.html delete mode 100644 doc/salome/tui/KERNEL/HTML/SALOMEDS.html delete mode 100644 doc/salome/tui/KERNEL/HTML/SALOMEDS_Attributes.html delete mode 100644 doc/salome/tui/KERNEL/HTML/SALOME_Component.html delete mode 100644 doc/salome/tui/KERNEL/HTML/SALOME_DataTypeCatalog.html delete mode 100644 doc/salome/tui/KERNEL/HTML/SALOME_Exception.html delete mode 100644 doc/salome/tui/KERNEL/HTML/SALOME_ModuleCatalog.html delete mode 100644 doc/salome/tui/KERNEL/HTML/SALOME_Registry.html delete mode 100644 doc/salome/tui/KERNEL/HTML/SALOME_RessourcesCatalog.html delete mode 100644 doc/salome/tui/KERNEL/HTML/SALOME_Session.html delete mode 100644 doc/salome/tui/KERNEL/HTML/SALOME_TestComponent.html delete mode 100644 doc/salome/tui/KERNEL/HTML/TestNotif.html delete mode 100644 doc/salome/tui/KERNEL/HTML/TypeData.html delete mode 100755 doc/salome/tui/KERNEL/doxyfile.in delete mode 100755 doc/salome/tui/KERNEL/exemple/Example1.html delete mode 100755 doc/salome/tui/KERNEL/exemple/Example10.html delete mode 100755 doc/salome/tui/KERNEL/exemple/Example11.html delete mode 100755 doc/salome/tui/KERNEL/exemple/Example12.html delete mode 100755 doc/salome/tui/KERNEL/exemple/Example13.html delete mode 100755 doc/salome/tui/KERNEL/exemple/Example14.html delete mode 100755 doc/salome/tui/KERNEL/exemple/Example15.html delete mode 100755 doc/salome/tui/KERNEL/exemple/Example16.html delete mode 100755 doc/salome/tui/KERNEL/exemple/Example17.html delete mode 100755 doc/salome/tui/KERNEL/exemple/Example18.html delete mode 100755 doc/salome/tui/KERNEL/exemple/Example19.html delete mode 100755 doc/salome/tui/KERNEL/exemple/Example2.html delete mode 100755 doc/salome/tui/KERNEL/exemple/Example20.html delete mode 100755 doc/salome/tui/KERNEL/exemple/Example21.html delete mode 100755 doc/salome/tui/KERNEL/exemple/Example22.html delete mode 100755 doc/salome/tui/KERNEL/exemple/Example23.html delete mode 100755 doc/salome/tui/KERNEL/exemple/Example3.html delete mode 100755 doc/salome/tui/KERNEL/exemple/Example4.html delete mode 100755 doc/salome/tui/KERNEL/exemple/Example5.html delete mode 100755 doc/salome/tui/KERNEL/exemple/Example6.html delete mode 100755 doc/salome/tui/KERNEL/exemple/Example7.html delete mode 100755 doc/salome/tui/KERNEL/exemple/Example8.html delete mode 100755 doc/salome/tui/KERNEL/exemple/Example9.html delete mode 100755 doc/salome/tui/KERNEL/sources/Application-About1.jpg delete mode 100644 doc/salome/tui/KERNEL/sources/application.gif delete mode 100755 doc/salome/tui/KERNEL/sources/application.jpg delete mode 100755 doc/salome/tui/KERNEL/sources/doxygen.css delete mode 100755 doc/salome/tui/KERNEL/sources/footer.html delete mode 100755 doc/salome/tui/KERNEL/sources/html_comments.gif delete mode 100644 doc/salome/tui/KERNEL/sources/kernel_about_4.png delete mode 100755 doc/salome/tui/KERNEL/sources/logocorp.gif delete mode 100755 doc/salome/tui/KERNEL/sources/myheader.html delete mode 100755 doc/salome/tui/KERNEL/sources/occ.gif delete mode 100755 doc/salome/tui/KERNEL/sources/static/Link.gif delete mode 100755 doc/salome/tui/KERNEL/sources/static/SObject.gif delete mode 100755 doc/salome/tui/KERNEL/sources/static/Study_Struct.gif delete mode 100755 doc/salome/tui/KERNEL/sources/static/doxygen.css delete mode 100755 doc/salome/tui/KERNEL/sources/static/examples_Kernel.html delete mode 100755 doc/salome/tui/KERNEL/sources/static/examples_Life_cycle.html delete mode 100755 doc/salome/tui/KERNEL/sources/static/examples_Naming.html delete mode 100755 doc/salome/tui/KERNEL/sources/static/examples_Study.html delete mode 100755 doc/salome/tui/KERNEL/sources/static/mapping.html delete mode 100755 doc/salome/tui/KERNEL/sources/static/ns_f3-1.jpg delete mode 100755 doc/salome/tui/KERNEL/sources/static/overview_Kernel.html delete mode 100755 doc/salome/tui/KERNEL/sources/static/overview_Life_Cycle.html delete mode 100755 doc/salome/tui/KERNEL/sources/static/overview_Naming.html delete mode 100755 doc/salome/tui/KERNEL/sources/static/overview_Study.html delete mode 100755 doc/salome/tui/KERNEL/sources/static/page2.html delete mode 100755 doc/salome/tui/KERNEL/sources/static/tree.js.in delete mode 100644 doc/salome/tui/KERNEL/sources/static/treeview.js rename doc/salome/tui/{KERNEL/doxydev.in => doxyfile.in} (92%) create mode 100755 doc/salome/tui/images/head.png create mode 100644 doc/salome/tui/input/index.dox create mode 100755 doc/salome/tui/static/doxygen.css create mode 100755 doc/salome/tui/static/footer.html create mode 100755 doc/salome/tui/static/header.html.in delete mode 100644 idl/Calcium_Ports.idl create mode 100644 idl/Calcium_Ports.idl.in create mode 100644 idl/SALOME_GenericObj.xml create mode 100644 idl/SALOME_PACOExtension.idl create mode 100644 idl/SALOME_PACOExtension.xml create mode 100644 idl/SALOME_ParamPorts.idl create mode 100644 idl/SALOME_ParamPorts.xml create mode 100644 idl/SALOME_Parametric.idl create mode 100644 idl/SALOME_PyNode.idl create mode 100644 idl/SALOME_Types.idl create mode 100644 salome_adm/cmake_files/FindDOXYGEN.cmake create mode 100644 salome_adm/cmake_files/FindLIBBATCH.cmake create mode 100644 salome_adm/cmake_files/FindMPI.cmake create mode 100755 salome_adm/cmake_files/FindSPHINX.cmake create mode 100644 salome_adm/cmake_files/InstallAndCompilePythonFile.cmake create mode 100644 salome_adm/cmake_files/UseOMNIORB.cmake create mode 100644 salome_adm/cmake_files/install_and_compile_python_file.cmake create mode 100755 salome_adm/cmake_files/prepare_generating_doc.py create mode 100644 salome_adm/unix/config_files/ac_check_sizeof_fortran.m4 create mode 100644 salome_adm/unix/config_files/check_calcium.m4 create mode 100644 salome_adm/unix/config_files/check_libbatch.m4 delete mode 100755 salome_adm/unix/config_files/check_local.m4 delete mode 100755 salome_adm/unix/config_files/check_lsf.m4 delete mode 100644 salome_adm/unix/config_files/check_openpbs.m4 create mode 100644 salome_adm/unix/config_files/check_sphinx.m4 create mode 100644 salome_adm/unix/config_files/check_tbb.m4 create mode 100644 salome_adm/unix/config_files/check_vtk.m4 create mode 100644 salome_adm/unix/config_files/hack_libtool.m4 create mode 100644 salome_adm/unix/config_files/local_install.m4 create mode 100644 src/Basics/Basics_OCCTVersion.hxx delete mode 100644 src/Batch/Batch_APIInternalFailureException.cxx delete mode 100644 src/Batch/Batch_APIInternalFailureException.hxx delete mode 100644 src/Batch/Batch_BatchManager.cxx delete mode 100644 src/Batch/Batch_BatchManager.hxx delete mode 100644 src/Batch/Batch_BatchManagerCatalog.cxx delete mode 100644 src/Batch/Batch_BatchManagerCatalog.hxx delete mode 100644 src/Batch/Batch_BatchManager_LSF.cxx delete mode 100644 src/Batch/Batch_BatchManager_LSF.hxx delete mode 100644 src/Batch/Batch_BatchManager_Local.cxx delete mode 100644 src/Batch/Batch_BatchManager_Local.hxx delete mode 100644 src/Batch/Batch_BatchManager_Local_RSH.cxx delete mode 100644 src/Batch/Batch_BatchManager_Local_RSH.hxx delete mode 100644 src/Batch/Batch_BatchManager_Local_SH.cxx delete mode 100644 src/Batch/Batch_BatchManager_Local_SH.hxx delete mode 100644 src/Batch/Batch_BatchManager_Local_SSH.cxx delete mode 100644 src/Batch/Batch_BatchManager_Local_SSH.hxx delete mode 100644 src/Batch/Batch_BatchManager_PBS.cxx delete mode 100644 src/Batch/Batch_BatchManager_PBS.hxx delete mode 100644 src/Batch/Batch_BatchManager_eClient.cxx delete mode 100644 src/Batch/Batch_BatchManager_eClient.hxx delete mode 100644 src/Batch/Batch_BatchManager_eLSF.cxx delete mode 100644 src/Batch/Batch_BatchManager_eLSF.hxx delete mode 100644 src/Batch/Batch_BatchManager_ePBS.cxx delete mode 100644 src/Batch/Batch_BatchManager_ePBS.hxx delete mode 100644 src/Batch/Batch_BatchManager_eSGE.cxx delete mode 100644 src/Batch/Batch_BatchManager_eSGE.hxx delete mode 100644 src/Batch/Batch_BoolType.cxx delete mode 100644 src/Batch/Batch_BoolType.hxx delete mode 100644 src/Batch/Batch_CharType.cxx delete mode 100644 src/Batch/Batch_CharType.hxx delete mode 100644 src/Batch/Batch_ConnexionFailureException.cxx delete mode 100644 src/Batch/Batch_ConnexionFailureException.hxx delete mode 100644 src/Batch/Batch_Couple.cxx delete mode 100644 src/Batch/Batch_Couple.hxx delete mode 100644 src/Batch/Batch_CoupleType.cxx delete mode 100644 src/Batch/Batch_CoupleType.hxx delete mode 100644 src/Batch/Batch_Date.cxx delete mode 100644 src/Batch/Batch_Date.hxx delete mode 100644 src/Batch/Batch_DateType.cxx delete mode 100644 src/Batch/Batch_DateType.hxx delete mode 100755 src/Batch/Batch_Defines.hxx delete mode 100644 src/Batch/Batch_Environnement.cxx delete mode 100644 src/Batch/Batch_Environnement.hxx delete mode 100644 src/Batch/Batch_FactBatchManager.cxx delete mode 100644 src/Batch/Batch_FactBatchManager.hxx delete mode 100644 src/Batch/Batch_FactBatchManager_LSF.cxx delete mode 100644 src/Batch/Batch_FactBatchManager_LSF.hxx delete mode 100644 src/Batch/Batch_FactBatchManager_Local.cxx delete mode 100644 src/Batch/Batch_FactBatchManager_Local.hxx delete mode 100644 src/Batch/Batch_FactBatchManager_Local_RSH.cxx delete mode 100644 src/Batch/Batch_FactBatchManager_Local_RSH.hxx delete mode 100644 src/Batch/Batch_FactBatchManager_Local_SH.cxx delete mode 100644 src/Batch/Batch_FactBatchManager_Local_SH.hxx delete mode 100644 src/Batch/Batch_FactBatchManager_Local_SSH.cxx delete mode 100644 src/Batch/Batch_FactBatchManager_Local_SSH.hxx delete mode 100644 src/Batch/Batch_FactBatchManager_PBS.cxx delete mode 100644 src/Batch/Batch_FactBatchManager_PBS.hxx delete mode 100644 src/Batch/Batch_FactBatchManager_eClient.cxx delete mode 100644 src/Batch/Batch_FactBatchManager_eClient.hxx delete mode 100644 src/Batch/Batch_FactBatchManager_eLSF.cxx delete mode 100644 src/Batch/Batch_FactBatchManager_eLSF.hxx delete mode 100644 src/Batch/Batch_FactBatchManager_ePBS.cxx delete mode 100644 src/Batch/Batch_FactBatchManager_ePBS.hxx delete mode 100644 src/Batch/Batch_FactBatchManager_eSGE.cxx delete mode 100644 src/Batch/Batch_FactBatchManager_eSGE.hxx delete mode 100644 src/Batch/Batch_GenericException.cxx delete mode 100644 src/Batch/Batch_GenericException.hxx delete mode 100644 src/Batch/Batch_GenericType.cxx delete mode 100644 src/Batch/Batch_GenericType.hxx delete mode 100644 src/Batch/Batch_IOMutex.cxx delete mode 100644 src/Batch/Batch_IOMutex.hxx delete mode 100644 src/Batch/Batch_IntType.cxx delete mode 100644 src/Batch/Batch_IntType.hxx delete mode 100644 src/Batch/Batch_InvalidArgumentException.cxx delete mode 100644 src/Batch/Batch_InvalidArgumentException.hxx delete mode 100644 src/Batch/Batch_InvalidKeyException.cxx delete mode 100644 src/Batch/Batch_InvalidKeyException.hxx delete mode 100644 src/Batch/Batch_Job.cxx delete mode 100644 src/Batch/Batch_Job.hxx delete mode 100644 src/Batch/Batch_JobId.cxx delete mode 100644 src/Batch/Batch_JobId.hxx delete mode 100644 src/Batch/Batch_JobInfo.cxx delete mode 100644 src/Batch/Batch_JobInfo.hxx delete mode 100644 src/Batch/Batch_JobInfo_LSF.cxx delete mode 100644 src/Batch/Batch_JobInfo_LSF.hxx delete mode 100644 src/Batch/Batch_JobInfo_Local.cxx delete mode 100644 src/Batch/Batch_JobInfo_Local.hxx delete mode 100644 src/Batch/Batch_JobInfo_PBS.cxx delete mode 100644 src/Batch/Batch_JobInfo_PBS.hxx delete mode 100644 src/Batch/Batch_JobInfo_eLSF.cxx delete mode 100644 src/Batch/Batch_JobInfo_eLSF.hxx delete mode 100644 src/Batch/Batch_JobInfo_ePBS.cxx delete mode 100644 src/Batch/Batch_JobInfo_ePBS.hxx delete mode 100644 src/Batch/Batch_JobInfo_eSGE.cxx delete mode 100644 src/Batch/Batch_JobInfo_eSGE.hxx delete mode 100644 src/Batch/Batch_Job_LSF.cxx delete mode 100644 src/Batch/Batch_Job_LSF.hxx delete mode 100644 src/Batch/Batch_Job_Local.cxx delete mode 100644 src/Batch/Batch_Job_Local.hxx delete mode 100644 src/Batch/Batch_Job_PBS.cxx delete mode 100644 src/Batch/Batch_Job_PBS.hxx delete mode 100644 src/Batch/Batch_ListIsFullException.cxx delete mode 100644 src/Batch/Batch_ListIsFullException.hxx delete mode 100644 src/Batch/Batch_LongType.cxx delete mode 100644 src/Batch/Batch_LongType.hxx delete mode 100644 src/Batch/Batch_MapKey.cxx delete mode 100644 src/Batch/Batch_MapKey.hxx delete mode 100644 src/Batch/Batch_NotYetImplementedException.cxx delete mode 100644 src/Batch/Batch_NotYetImplementedException.hxx delete mode 100644 src/Batch/Batch_Parametre.cxx delete mode 100644 src/Batch/Batch_Parametre.hxx delete mode 100644 src/Batch/Batch_PyVersatile.cxx delete mode 100644 src/Batch/Batch_PyVersatile.hxx delete mode 100644 src/Batch/Batch_RunTimeException.cxx delete mode 100644 src/Batch/Batch_RunTimeException.hxx delete mode 100644 src/Batch/Batch_StringType.cxx delete mode 100644 src/Batch/Batch_StringType.hxx delete mode 100644 src/Batch/Batch_TypeMismatchException.cxx delete mode 100644 src/Batch/Batch_TypeMismatchException.hxx delete mode 100644 src/Batch/Batch_Versatile.cxx delete mode 100644 src/Batch/Batch_Versatile.hxx delete mode 100644 src/Batch/Makefile.am delete mode 100644 src/Batch/MpiImpl.cxx delete mode 100644 src/Batch/MpiImpl.hxx delete mode 100644 src/Batch_SWIG/Batch_test.py delete mode 100644 src/Batch_SWIG/Makefile.am delete mode 100644 src/Batch_SWIG/libBatch_Swig.i delete mode 100644 src/Batch_SWIG/libBatch_Swig_exception.i delete mode 100644 src/Batch_SWIG/libBatch_Swig_typemap.i create mode 100644 src/Container/SALOME_PyNode.py delete mode 100644 src/DSC/DSC_User/Datastream/Calcium/Calcium.c create mode 100644 src/DSC/DSC_User/Datastream/Calcium/CalciumC.c create mode 100644 src/DSC/DSC_User/Datastream/Calcium/CalciumCInterface.cxx create mode 100644 src/DSC/DSC_User/Datastream/Calcium/CalciumCInterface.hxx create mode 100644 src/DSC/DSC_User/Datastream/Calcium/CalciumCxxInterface.cxx create mode 100644 src/DSC/DSC_User/Datastream/Calcium/CalciumFortranInt.h.in create mode 100644 src/DSC/DSC_User/Datastream/Calcium/CalciumMacroCInterface.hxx rename src/DSC/DSC_User/Datastream/Calcium/{CalciumProvidesPort.hxx => CalciumProvidesPort.hxx.in} (56%) create mode 100644 src/DSC/DSC_User/Datastream/Calcium/calcium_intc_port_uses.hxx delete mode 100644 src/DSC/DSC_User/Datastream/Calcium/calcium_integer_port_uses.hxx create mode 100644 src/DSC/DSC_User/Datastream/Calcium/calcium_integer_port_uses.hxx.in create mode 100644 src/DSC/DSC_User/Datastream/Calcium/calcium_long_port_uses.hxx create mode 100644 src/DSC/DSC_User/Datastream/Calcium/calciumf.h create mode 100644 src/DSC/ParallelDSC/Param_Double_Port_provides_i.cxx create mode 100644 src/DSC/ParallelDSC/Param_Double_Port_provides_i.hxx create mode 100644 src/DSC/ParallelDSC/Param_Double_Port_uses_i.cxx create mode 100644 src/DSC/ParallelDSC/Param_Double_Port_uses_i.hxx create mode 100644 src/HDFPersist/HDFarray.cc create mode 100644 src/HDFPersist/HDFarray.hxx create mode 100644 src/HDFPersist/HDFarrayClose.c create mode 100644 src/HDFPersist/HDFarrayCreate.c create mode 100644 src/HDFPersist/HDFarrayGetDim.c create mode 100644 src/HDFPersist/HDFarrayGetType.c create mode 100644 src/HDFPersist/HDFarrayGetTypeId.c create mode 100644 src/HDFPersist/HDFarrayGetnDim.c create mode 100644 src/KERNEL_PY/__init__.py create mode 100644 src/KERNEL_PY/kernel/Makefile.am create mode 100644 src/KERNEL_PY/kernel/__init__.py create mode 100644 src/KERNEL_PY/kernel/datamodeler.py create mode 100644 src/KERNEL_PY/kernel/deprecation.py create mode 100644 src/KERNEL_PY/kernel/diclookup.py create mode 100644 src/KERNEL_PY/kernel/enumerate.py create mode 100644 src/KERNEL_PY/kernel/kernelpy_autotest.sh.in create mode 100755 src/KERNEL_PY/kernel/logconfig.py.in create mode 100644 src/KERNEL_PY/kernel/logger.py create mode 100644 src/KERNEL_PY/kernel/parametric/Makefile.am create mode 100644 src/KERNEL_PY/kernel/parametric/__init__.py create mode 100644 src/KERNEL_PY/kernel/parametric/compo_utils.py create mode 100644 src/KERNEL_PY/kernel/parametric/pyscript_utils.py create mode 100644 src/KERNEL_PY/kernel/parametric/study_exchange_vars.py create mode 100644 src/KERNEL_PY/kernel/pyunittester.py create mode 100644 src/KERNEL_PY/kernel/services.py create mode 100644 src/KERNEL_PY/kernel/studyedit.py create mode 100644 src/KERNEL_PY/kernel/syshelper.py create mode 100644 src/KERNEL_PY/kernel/termcolor.py create mode 100644 src/KERNEL_PY/kernel/testdata.py create mode 100644 src/KERNEL_PY/kernel/threadhelper.py create mode 100644 src/KERNEL_PY/kernel/uiexception.py create mode 100644 src/KERNEL_PY/kernel/unittester.py create mode 100644 src/KERNEL_PY/salome_genericobj.py create mode 100644 src/KERNEL_PY/salome_pynode.py create mode 100755 src/KernelHelpers/KernelHelpers.hxx create mode 100644 src/KernelHelpers/KernelHelpersUseCases.cxx create mode 100644 src/KernelHelpers/Makefile.am create mode 100644 src/KernelHelpers/SALOMEDS_DriverDefaultImpl.cxx create mode 100644 src/KernelHelpers/SALOMEDS_DriverDefaultImpl.hxx create mode 100644 src/KernelHelpers/SALOME_KernelServices.cxx create mode 100644 src/KernelHelpers/SALOME_KernelServices.hxx create mode 100644 src/KernelHelpers/SALOME_StudyEditor.cxx create mode 100644 src/KernelHelpers/SALOME_StudyEditor.hxx create mode 100644 src/KernelHelpers/Test/KernelHelpersUnitTests.cxx create mode 100644 src/KernelHelpers/Test/KernelHelpersUnitTests.hxx create mode 100644 src/KernelHelpers/Test/Makefile.am create mode 100644 src/KernelHelpers/Test/TestKernelHelpers.cxx create mode 100644 src/KernelHelpers/Test/TestKernelHelpers.py create mode 100644 src/Launcher/Launcher_Job.cxx create mode 100644 src/Launcher/Launcher_Job.hxx create mode 100644 src/Launcher/Launcher_Job_Command.cxx create mode 100644 src/Launcher/Launcher_Job_Command.hxx create mode 100644 src/Launcher/Launcher_Job_PythonSALOME.cxx create mode 100644 src/Launcher/Launcher_Job_PythonSALOME.hxx create mode 100644 src/Launcher/Launcher_Job_SALOME.cxx create mode 100644 src/Launcher/Launcher_Job_SALOME.hxx create mode 100644 src/Launcher/Launcher_Job_YACSFile.cxx create mode 100644 src/Launcher/Launcher_Job_YACSFile.hxx create mode 100644 src/Launcher/Launcher_Utils.hxx create mode 100755 src/Launcher/TestLauncher.cxx delete mode 100644 src/LifeCycleCORBA/LifeCycleCORBA.py create mode 100644 src/LifeCycleCORBA_SWIG/Test/testcontainermanager.py create mode 100644 src/LifeCycleCORBA_SWIG/Test/testresourcemanager.py create mode 100755 src/MPIContainer/launch_testMPI2.csh create mode 100644 src/MPIContainer/testMPI2.cxx create mode 100644 src/ParallelContainer/SALOME_ParallelGlobalProcessVar_i.cxx create mode 100644 src/ParallelContainer/SALOME_ParallelGlobalProcessVar_i.hxx create mode 100644 src/SALOMEDSClient/SALOMEDSClient_AttributeTable.hxx create mode 100644 src/SALOMEDSClient/SALOMEDSClient_Observer.hxx create mode 100644 src/SALOMEDSImpl/SALOMEDSImpl_AttributeTable.hxx diff --git a/DEPRECATED/Makefile.in b/DEPRECATED/Makefile.in index 8e627aca0..cb1ac8d38 100644 --- a/DEPRECATED/Makefile.in +++ b/DEPRECATED/Makefile.in @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # -* Makefile *- # Author : Patrick GOLDBRONN (CEA) # Date : 28/06/2001 diff --git a/DEPRECATED/configure.in.base b/DEPRECATED/configure.in.base index 283fc2a64..0f69efaa8 100644 --- a/DEPRECATED/configure.in.base +++ b/DEPRECATED/configure.in.base @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # PLEASE DO NOT MODIFY configure.in FILE # ALL CHANGES WILL BE DISCARDED BY THE NEXT # build_configure COMMAND diff --git a/DEPRECATED/make_config.in b/DEPRECATED/make_config.in index df5e6bc51..dedebc923 100755 --- a/DEPRECATED/make_config.in +++ b/DEPRECATED/make_config.in @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # make_config.in: template for make_config script # make_config is used by check_cas.m4 to generate # config.h file in case it cannot be found in OCC diff --git a/KERNEL_version.h.in b/KERNEL_version.h.in index 7c6c0097d..9dd384606 100644 --- a/KERNEL_version.h.in +++ b/KERNEL_version.h.in @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : KERNEL_version.h // Author : Vadim SANDLER // Module : SALOME @@ -32,5 +33,6 @@ #define KERNEL_VERSION_STR "@VERSION@" #define KERNEL_VERSION @XVERSION@ +#define KERNEL_DEVELOPMENT @VERSION_DEV@ #endif // __KERNEL_VERSION_H__ diff --git a/Makefile.am b/Makefile.am index 6d46bb852..471d18f5d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,31 +1,32 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # -* Makefile *- # Author : Guillaume BOULANT (CSSI) # Date : 09/11/2005 # $Header$ # include $(top_srcdir)/salome_adm/unix/make_common_starter.am - +# if CORBA_GEN IDLDIR = idl endif @@ -35,16 +36,18 @@ ACLOCAL_AMFLAGS = -I salome_adm/unix/config_files if WITHONLYLAUNCHER SUBDIRS = src resources else - SUBDIRS = salome_adm $(IDLDIR) src doc bin resources + SUBDIRS = salome_adm $(IDLDIR) src bin doc resources endif DIST_SUBDIRS= salome_adm idl src doc bin resources -DISTCLEANFILES = a.out +DISTCLEANFILES = a.out local-install.sh hack_libtool aclocal.m4 configure salome_adm/unix/config_files/config.guess salome_adm/unix/config_files/config.sub salome_adm/unix/config_files/depcomp salome_adm/unix/config_files/install-sh salome_adm/unix/config_files/libtool.m4 salome_adm/unix/config_files/ltmain.sh salome_adm/unix/config_files/ltoptions.m4 salome_adm/unix/config_files/ltsugar.m4 salome_adm/unix/config_files/ltversion.m4 salome_adm/unix/config_files/lt~obsolete.m4 salome_adm/unix/config_files/missing salome_adm/unix/config_files/py-compile salomeinclude_DATA = KERNEL_version.h EXTRA_DIST = \ + build_cmake \ + build_cmake.bat \ build_configure \ clean_configure \ LICENCE \ diff --git a/README.FIRST.txt b/README.FIRST.txt index 021f43c35..de9398a51 100644 --- a/README.FIRST.txt +++ b/README.FIRST.txt @@ -1,4 +1,4 @@ -Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/adm_local/unix/config_files/README b/adm_local/unix/config_files/README deleted file mode 100644 index feb997b16..000000000 --- a/adm_local/unix/config_files/README +++ /dev/null @@ -1,3 +0,0 @@ -This file is only here for CVS: -CVS does not always create empty directory, and adm_local/unix/config_file -is needed by build_configure. diff --git a/bin/Makefile.am b/bin/Makefile.am index a62a38534..039f9b468 100644 --- a/bin/Makefile.am +++ b/bin/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # -* Makefile *- # Author : Guillaume Boulant (CSSI) # Module : KERNEL @@ -26,6 +27,8 @@ # include $(top_srcdir)/salome_adm/unix/make_common_starter.am +SUBDIRS = appliskel + # # =============================================================== # Files to be installed @@ -42,11 +45,21 @@ nodist_salomescript_DATA = \ # These files are executable scripts dist_salomescript_SCRIPTS = \ - addToKillList.py \ appli_clean.sh \ - appli_gen.py \ appli_install.sh \ createAppli.sh \ + runIDLparser \ + runNS.sh \ + runSalome \ + runSalome.csh \ + runSalome.ksh \ + runSalome.bat \ + waitNS.sh + +# These files are python files +dist_salomescript_PYTHON = \ + addToKillList.py \ + appli_gen.py \ envSalome.py \ killSalome.py \ killSalomeWithPort.py \ @@ -55,12 +68,7 @@ dist_salomescript_SCRIPTS = \ nameserver.py \ NSparam.py \ orbmodule.py \ - runIDLparser \ runNS.py \ - runNS.sh \ - runSalome \ - runSalome.csh \ - runSalome.ksh \ runSalome.py \ salomeConsole.py \ salome_session.py \ @@ -71,27 +79,9 @@ dist_salomescript_SCRIPTS = \ shutdownSalome.py \ virtual_salome.py \ waitContainers.py \ - waitNS.py \ - waitNS.sh - -EXTRA_DIST = appliskel - -dist-hook: - rm -rf `find $(distdir)/appliskel -name CVS` - -DISTCLEANFILES = $(top_builddir)/bin/salome/Makefile.am - -# This is an ugly target to avoid exploring the appliskel subdirectory. -install-exec-local: - $(INSTALL) -d $(DESTDIR)$(salomescriptdir) - $(RM) -rf $(DESTDIR)$(salomescriptdir)/appliskel 1> /dev/null 2>&1 - cp -r $(srcdir)/appliskel $(DESTDIR)$(salomescriptdir) - chmod a+x -R $(DESTDIR)$(salomescriptdir)/appliskel - find $(DESTDIR)$(salomescriptdir) -name CVS -prune -exec rm -rf {} \; - -uninstall-local: - if test -d $(DESTDIR)$(salomescriptdir)/appliskel; then \ - find $(DESTDIR)$(salomescriptdir)/appliskel -exec chmod +w {} ';' ; \ - rm -rf $(DESTDIR)$(salomescriptdir)/appliskel; \ - fi; + waitNS.py +install-data-hook: + @for f in $(dist_salomescript_PYTHON) ; do \ + chmod -f a+x $(DESTDIR)$(salomescriptdir)/$$f ; \ + done diff --git a/bin/NSparam.py b/bin/NSparam.py index 4a2d9881a..bd35a3a71 100755 --- a/bin/NSparam.py +++ b/bin/NSparam.py @@ -1,25 +1,27 @@ -#!/usr/bin/env python -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +#! /usr/bin/env python +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + import sys,os def getNSparams(info=""): diff --git a/bin/VERSION.in b/bin/VERSION.in index bd8de56f2..8cc2a5bb4 100755 --- a/bin/VERSION.in +++ b/bin/VERSION.in @@ -1 +1,2 @@ -THIS IS SALOME - KERNEL VERSION: @VERSION@ +[SALOME KERNEL] : @VERSION@ +[DEVELOPMENT] : @VERSION_DEV@ diff --git a/bin/addToKillList.py b/bin/addToKillList.py index 730ac8d35..5a482ea18 100755 --- a/bin/addToKillList.py +++ b/bin/addToKillList.py @@ -1,25 +1,27 @@ -#!/usr/bin/env python -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +#! /usr/bin/env python +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + import os, sys, pickle, string, signal from launchConfigureParser import verbose diff --git a/bin/appli_clean.sh b/bin/appli_clean.sh index a5413a737..dd049fe7e 100644 --- a/bin/appli_clean.sh +++ b/bin/appli_clean.sh @@ -1,25 +1,53 @@ -#!/bin/sh -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +#!/bin/bash +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + #clean appli -# -rm -rf bin lib share doc idl env.d envd USERS getAppliPath.py searchFreePort.sh runAppli runConsole runSession runRemote.sh runTests SalomeApp.xml *.pyc *~ .bashrc + +DELCOM="rm -rf bin lib share doc idl env.d envd USERS getAppliPath.py searchFreePort.sh runAppli runConsole runSession runRemote.sh runTests SalomeApp.xml runSalomeScript update_catalogs.py kill_remote_containers.py *.pyc *~ .bashrc" +DOIT="false" + +if [ $# -gt 0 ] +then + if [ "x$1" == "x-f" ] + then + DOIT="true" + fi +fi + +if [ $DOIT == "false" ] +then + echo "Do you want to delete a SALOME application in this directory ? " `pwd` + echo "command to execute: " $DELCOM + echo "enter yes or no" + read ANSWER + echo "ANSWER="$ANSWER + if [ "x$ANSWER" == "xyes" ] + then + DOIT="true" + fi +fi + +if [ $DOIT == "true" ] +then + $DELCOM +fi diff --git a/bin/appli_gen.py b/bin/appli_gen.py index c57f4c25d..648656c83 100644 --- a/bin/appli_gen.py +++ b/bin/appli_gen.py @@ -1,31 +1,33 @@ -#!/usr/bin/env python -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +#! /usr/bin/env python +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -"""Create a virtual Salome installation -""" +## \file appli_gen.py +# Create a %SALOME application (virtual Salome installation) +# usage="""usage: %prog [options] Typical use is: - python appli_gen.py + python appli_gen.py Typical use with options is: python appli_gen.py --verbose --prefix= --config= """ @@ -42,6 +44,7 @@ prereq_tag = "prerequisites" modules_tag = "modules" module_tag = "module" samples_tag = "samples" +resources_tag = "resources" # --- names of attributes in XML configuration file nam_att = "name" @@ -80,6 +83,10 @@ class xml_parser: if self.space == [appli_tag, prereq_tag] and path_att in attrs.getNames(): self.config["prereq_path"] = attrs.getValue( path_att ) pass + # --- if we are analyzing "resources" element then store its "path" attribute + if self.space == [appli_tag, resources_tag] and path_att in attrs.getNames(): + self.config["resources_path"] = attrs.getValue( path_att ) + pass # --- if we are analyzing "samples" element then store its "path" attribute if self.space == [appli_tag, samples_tag] and path_att in attrs.getNames(): self.config["samples_path"] = attrs.getValue( path_att ) @@ -152,7 +159,7 @@ def install(prefix,config_file,verbose=0): print "Configure parser: parse error in configuration file %s" % filename pass except xml.sax.SAXException, inst: - print inst.args + print inst.args print "Configure parser: error in configuration file %s" % filename pass except: @@ -183,7 +190,10 @@ def install(prefix,config_file,verbose=0): 'runAppli', 'runConsole', 'runSession', + 'runSalomeScript', 'runTests', + 'update_catalogs.py', + 'kill_remote_containers.py', '.bashrc', ): virtual_salome.symlink("./bin/salome/appliskel/"+fn,os.path.join(home_dir, fn)) @@ -193,7 +203,7 @@ def install(prefix,config_file,verbose=0): command = "cp -p " + filename + ' ' + os.path.join(home_dir,"config_appli.xml") os.system(command) pass - + virtual_salome.mkdir(os.path.join(home_dir,'env.d')) if os.path.isfile(_config["prereq_path"]): command='cp -p ' + _config["prereq_path"] + ' ' + os.path.join(home_dir,'env.d','envProducts.sh') @@ -203,7 +213,7 @@ def install(prefix,config_file,verbose=0): print "WARNING: prerequisite file does not exist" pass - + #environment file: configSalome.sh f =open(os.path.join(home_dir,'env.d','configSalome.sh'),'w') for module in _config["modules"]: command='export '+ module + '_ROOT_DIR=${HOME}/${APPLI}\n' @@ -213,19 +223,24 @@ def install(prefix,config_file,verbose=0): command='export DATA_DIR=' + _config["samples_path"] +'\n' f.write(command) pass + if _config.has_key("resources_path") and os.path.isfile(_config["resources_path"]): + command='export USER_CATALOG_RESOURCES_FILE=' + os.path.abspath(_config["resources_path"]) +'\n' + f.write(command) + f.close() + #environment file: configGUI.sh f =open(os.path.join(home_dir,'env.d','configGUI.sh'),'w') - command = 'export SalomeAppConfig=${HOME}/${APPLI}\n' - f.write(command) - command = 'export SUITRoot=${HOME}/${APPLI}/share/salome\n' + command = """export SalomeAppConfig=${HOME}/${APPLI} +export SUITRoot=${HOME}/${APPLI}/share/salome +export DISABLE_FPE=1 +export MMGT_REENTRANT=1 +""" f.write(command) - f.write('export DISABLE_FPE=1\n') - f.write('export MMGT_REENTRANT=1\n') f.close() - + #SalomeApp.xml file f =open(os.path.join(home_dir,'SalomeApp.xml'),'w') command="""
@@ -240,34 +255,30 @@ def install(prefix,config_file,verbose=0): - 0: - f.write(_config["guimodules"][-1]) - f.write('"/>') - command=""" + - +
""" - f.write(command) + mods=[] + #Keep all modules except KERNEL and GUI + for m in _config["modules"]: + if m in ("KERNEL","GUI"):continue + mods.append(m) + f.write(command % ",".join(mods)) f.close() #Add default CatalogResources.xml file f =open(os.path.join(home_dir,'CatalogResources.xml'),'w') command=""" - + """ - f.write(command) + f.write(command) f.close() #Add USERS directory with 777 permission to store users configuration files @@ -288,6 +299,10 @@ def main(): default=0, help="Increase verbosity") options, args = parser.parse_args() + if not os.path.exists(options.config): + print "ERROR: config file %s does not exist. It is mandatory." % options.config + sys.exit(1) + install(prefix=options.prefix,config_file=options.config,verbose=options.verbose) pass diff --git a/bin/appli_install.sh b/bin/appli_install.sh index e587c1251..4778d4ddc 100644 --- a/bin/appli_install.sh +++ b/bin/appli_install.sh @@ -1,25 +1,26 @@ #!/bin/sh -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + SALOME_ROOT=${HOME}/SALOME2 INSTALL_ROOT=${SALOME_ROOT}/Install @@ -58,7 +59,7 @@ fi VERSION=V3_2_0 -for module in KERNEL MED GUI GEOM SMESH VISU SUPERV LIGHT NETGENPLUGIN PYCALCULATOR; +for module in KERNEL MED GUI GEOM SMESH VISU LIGHT NETGENPLUGIN PYCALCULATOR; do echo " ========= " ${module}; python virtual_salome.py -v --prefix="." --module=$INSTALL_ROOT/${module}_${VERSION} diff --git a/bin/appliskel/.bashrc b/bin/appliskel/.bashrc index b5f17d1bb..5405c993f 100644 --- a/bin/appliskel/.bashrc +++ b/bin/appliskel/.bashrc @@ -1,31 +1,29 @@ #!/bin/bash -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # # If not running interactively, don't do anything: -[ -z "$PS1" ] && return -# keep original settings (debian) -. ~/.bashrc +[ -z "$PS1" ] && return # prefix prompt with naming server hostname and port export PS1='[NS='${NSHOST}':'${NSPORT}']'${PS1} diff --git a/bin/appliskel/CatalogResources.xml b/bin/appliskel/CatalogResources.xml deleted file mode 100644 index 9e09ed5fc..000000000 --- a/bin/appliskel/CatalogResources.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/bin/appliskel/Makefile.am b/bin/appliskel/Makefile.am new file mode 100644 index 000000000..06285247a --- /dev/null +++ b/bin/appliskel/Makefile.am @@ -0,0 +1,58 @@ +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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 +# + +# -* Makefile *- +# Author : Renaud Barate (EDF R&D) +# Module : KERNEL +# $Header$ + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am +appliskeldir = $(salomescriptdir)/appliskel + +# +# =============================================================== +# Files to be installed +# =============================================================== +# + +# These files are executable scripts +dist_appliskel_SCRIPTS = \ + envd \ + searchFreePort.sh \ + runRemote.sh \ + runAppli \ + runConsole \ + runSession \ + runSalomeScript \ + runTests \ + .bashrc + +# These files are python files +dist_appliskel_PYTHON = \ + getAppliPath.py \ + update_catalogs.py \ + kill_remote_containers.py + +install-data-hook: + @for f in $(dist_appliskel_PYTHON) ; do \ + chmod -f a+x $(DESTDIR)$(appliskeldir)/$$f ; \ + done diff --git a/bin/appliskel/README b/bin/appliskel/README index 829437f15..38ff5869e 100644 --- a/bin/appliskel/README +++ b/bin/appliskel/README @@ -1,4 +1,4 @@ -Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -22,24 +22,22 @@ See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com ======================================= Set of scripts for a SALOME application ======================================= -*html version of this document is produced with docutils*:: - rest2html < doc.txt > doc.html - -This document corresponds to SALOME2 3.1. (alpha version) - -+-------------------------------------------+ -| **WORK in PROGRESS, INCOMPLETE DOCUMENT** | -+-------------------------------------------+ +This document corresponds to SALOME 6.4.0 SALOME Application concept -------------------------- -See SALOME_Application_ to define your own configuration of SALOME and run it -on one or several computers. This is the recommended way of configuration. - -.. _SALOME_Application: ../../doc/SALOME_Application.html +See the documentation of KERNEL module for more information on SALOME +Application concept and to learn how to define your own configuration of +SALOME and run it on one or several computers. The recommended way to create +a new application is with the script appli_gen.py that can be found in KERNEL +installation. An application has probably already been generated for you if +you downloaded a binary version of SALOME. +To find all the files described below, please refer to a generated +application as some of them are generated automatically and thus are not +present in this appliskel directory. User run scripts ---------------- @@ -67,11 +65,6 @@ runTests with a running SALOME session. runSession tries to use an already existing naming service definition from a running session (hostname & port number). -killCurrentPort - Kills the last SALOME session corresponding to this application, and - intially launched from this computer. - Cleans associated config files. - SALOME internal run scripts --------------------------- @@ -92,7 +85,7 @@ runRemote.sh arguments define the command to execute. -The following files must be adapted to your environment and SALOME Application +The following files can be adapted to your environment and SALOME Application ------------------------------------------------------------------------------ - CatalogResources.xml @@ -101,10 +94,9 @@ The following files must be adapted to your environment and SALOME Application - env.d/envProducts.sh - env.d/envSalome.sh -CatalogRessources.xml - This files describes all the computer the application can use. The given - example is minimal and suppose ${APPLI} is the same relative path - to ${HOME}, on all the computers. A different directory can be set on a +CatalogResources.xml + This files describes all the computers the application can use. The default + file is minimal. A specific application directory can be set on a particular computer with a line:: appliPath="my/specific/path/on/this/computer" @@ -116,23 +108,21 @@ SalomeApp.xml Proposal for env.d scripts ~~~~~~~~~~~~~~~~~~~~~~~~~~ -Each user **must define** his own configuration for these scripts, following -the above rules. **The following is only an example not working as it is**. - -atFirst.sh - Sets the computer configuration not directly related to SALOME, - like useful tools, default PATH. +Each user can define his own configuration for these scripts, following +the above rules. The generated files are good examples to start with. envProducts.sh Sets the SALOME prerequisites. -envSALOME.sh +configSalome.sh Sets all the MODULE_ROOT_DIR that can be used in the SALOME application. - SalomeAppConfig is also defined by:: +configGUI.sh + Sets variables necessary for SALOME GUI. + SalomeAppConfig is defined by:: export SalomeAppConfig=${HOME}/${APPLI} where SalomeAppConfig designates the directory containing SalomeApp.xml. Note that ${APPLI} is already defined by the calling scripts when - env.d/envSalome.sh is sourced. + env.d/configGUI.sh is sourced. diff --git a/bin/appliskel/SalomeApp.xml b/bin/appliskel/SalomeApp.xml deleted file mode 100644 index 7caea4e03..000000000 --- a/bin/appliskel/SalomeApp.xml +++ /dev/null @@ -1,100 +0,0 @@ - -
- - - - - -
-
- - - - - - - - - - - - - -
-
- - -
-
- - - - - - - - - - - - - - - - - - - - - - - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - - -
-
- - -
- - -
- - -
-
- -
-
- - -
- -
- - -
-
diff --git a/bin/appliskel/env.d/atFirst.sh b/bin/appliskel/env.d/atFirst.sh deleted file mode 100644 index a868ecbb9..000000000 --- a/bin/appliskel/env.d/atFirst.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/sh -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -# -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# 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 -# -#------------------------------------------------ -# to be sourced first, used in following scripts -#------------------------------------------------ -# -export LD_LIBRARY_PATH="." -export PATH="/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/prascle/bin:." -export PYTHONPATH="" - -export RAC=${HOME} -export PAKSAL=/opt -export PUB=${RAC}/public -export TARP=${RAC}/tarpublic -export PYPACKAGES=${PUB}/site_packages - -# ------------------------------------------------ -# ---- gdb 5.3 - -export PATH=${PAKSAL}/gdb53/bin:${PATH} -export LD_LIBRARY_PATH=${PAKSAL}/gdb53/lib:${LD_LIBRARY_PATH} - -# ------------------------------------------------ -# ---- ddd 3.3.7 - -export PATH=${PAKSAL}/ddd337/bin:${PATH} -export LD_LIBRARY_PATH=${PAKSAL}/ddd337/lib:${LD_LIBRARY_PATH} - -# ------------------------------------------------ -# --- Java 1.4 - -export JDKHOME=${PUB}/j2sdk_nb/j2sdk1.4.2 -export JAVAHOME=${PUB}/j2sdk_nb/j2sdk1.4.2 -export PATH=${JAVAHOME}/bin:${PATH} -export LD_LIBRARY_PATH=${JAVAHOME}/lib:${LD_LIBRARY_PATH} -export LD_LIBRARY_PATH=${JAVAHOME}/jre/lib/i386:${LD_LIBRARY_PATH} -export LD_LIBRARY_PATH=${JAVAHOME}/jre/lib/i386/client:${LD_LIBRARY_PATH} - -# ------------------------------------------------ -# --- gsl -1.4 - -export GSLHOME=${PAKSAL}/gsl-1.4 -export PATH=${GSLHOME}/bin:${PATH} -export LD_LIBRARY_PATH=${GSLHOME}/lib:${LD_LIBRARY_PATH} - -# ------------------------------------------------ -# --- fltk 1.1.4 - -export FLTKHOME=${PAKSAL}/fltk114 -export PATH=${FLTKHOME}/bin:${PATH} -export LD_LIBRARY_PATH=${FLTKHOME}/lib:${LD_LIBRARY_PATH} - -# ------------------------------------------------ -# --- gmsh 1.48 - -export GMSHHOME=${PAKSAL}/gmsh148 -export PATH=${GMSHHOME}/bin:${PATH} - -# ------------------------------------------------ -# ---- tkcvs, tkdiffb, cvs - -export PATH=${PAKSAL}/tkcvs7.2/bin:${PAKSAL}/cvs1.11.14/bin:${PATH} diff --git a/bin/appliskel/env.d/envProducts.sh b/bin/appliskel/env.d/envProducts.sh deleted file mode 100644 index a1fdec251..000000000 --- a/bin/appliskel/env.d/envProducts.sh +++ /dev/null @@ -1,140 +0,0 @@ -#!/bin/sh -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -# -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# 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 -# -# ------------------------------------------------ -# ---- openpbs -# -export OPENPBS=/optroot/openpbs2316 -export PATH=${OPENPBS}/bin:${PATH} -export LD_LIBRARY_PATH=${OPENPBS}/lib:${LD_LIBRARY_PATH} - -#------------------------------------------------------------------------------ - -export INSTALL_ROOT=/home/prascle/PAL_SALOME141 -#------ gcc ------ -export GCC_ROOT=/usr -export CXX=${GCC_ROOT}/bin/g++ -export CC=${GCC_ROOT}/bin/gcc -## -#------ boost ------ -export BOOSTDIR=${INSTALL_ROOT}/boost-1.30.2 -## - -#------ tcltk ------ -export TCLHOME=/usr - -#------ Python ------ -export PYTHONHOME=/usr -export PYTHONPATH=${PYPACKAGES}:${PYTHONPATH} -## -#------ Qt ------ -#export QTDIR=/usr/lib/qt-3.0.5 -export QTDIR=/usr/lib/qt3-gcc3.2 -export PATH=${PATH}:${QTDIR}/bin -export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${QTDIR}/lib -## -#------ Sip ------ -export SIPDIR=/usr -export PYQTDIR=/usr -## -#------ PyQt ------ -export PYQT_SIPS=/usr/share/sip/qt -export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib/python2.2/site-packages -## -#------ Swig ------ -export SWIG_ROOT=${INSTALL_ROOT}/SWIG-1.3.17 -export PATH=${SWIG_ROOT}/bin:${PATH} -export LD_LIBRARY_PATH=${SWIG_ROOT}/lib:${LD_LIBRARY_PATH} -## -#------ OpenCascade ------ -export CASROOT=/opt/CAS52patch -export LD_LIBRARY_PATH=${CASROOT}/Linux/lib:${LD_LIBRARY_PATH} -export PATH=${CASROOT}/Linux/bin:${PATH} -# Variable for Foundation Classes : -export CSF_UnitsLexicon=${CASROOT}/src/UnitsAPI/Lexi_Expr.dat -export CSF_UnitsDefinition=${CASROOT}/src/UnitsAPI/Units.dat -# Variable for DataExchange : -export CSF_SHMessage=${CASROOT}/src/SHMessage -export CSF_XSMessage=${CASROOT}/src/XSMessage -# Variable for Font : -export CSF_MDTVFontDirectory=${CASROOT}/src/FontMFT -export CSF_MDTVTexturesDirectory=${CASROOT}/src/Textures -## -export CSF_LANGUAGE=us -export MMGT_CLEAR=1 -export CSF_EXCEPTION_PROMPT=1 -export CSF_StandardDefaults=${CASROOT}/src/StdResource -export CSF_PluginDefaults=${CASROOT}/src/StdResource -export CSF_XCAFDefaults=${CASROOT}/src/StdResource -export CSF_GraphicShr=${CASROOT}/Linux/lib/libTKOpenGl.so -export CSF_IGESDefaults=${CASROOT}/src/XSTEPResource -export CSF_STEPDefaults=${CASROOT}/src/XSTEPResource -## -#export TCLLIBPATH=$TCLHOME/lib -## -#------ Qwt ------ -export QWTHOME=${INSTALL_ROOT}/qwt-0.4.1 -export LD_LIBRARY_PATH=${QWTHOME}/lib:${LD_LIBRARY_PATH} -## -#------ Hdf ------ -export HDF5HOME=${INSTALL_ROOT}/hdf5-1.4.4 -export PATH=${HDF5HOME}/bin:$PATH -export LD_LIBRARY_PATH=${HDF5HOME}/lib:${LD_LIBRARY_PATH} -## -#------ Med ------ -export MED2HOME=/opt/med2.2.2 -export PATH=${MED2HOME}/bin:${PATH} -export LD_LIBRARY_PATH=${MED2HOME}/lib:${LD_LIBRARY_PATH} -## -#------ Vtk ------ -export VTKHOME=${INSTALL_ROOT}/VTK-4.2.2 -export PATH=${VTKHOME}/bin:${PATH} -export LD_LIBRARY_PATH=${VTKHOME}/lib/vtk:${LD_LIBRARY_PATH} -export PYTHONPATH=${VTKHOME}/lib/vtk:${VTKHOME}/lib/python2.2/site-packages/vtk_python:${PYTHONPATH} -## -#------ netgen ------ -export NETGENROOT=${INSTALL_ROOT}/netgen4.3 -export NETGEN_HOME=${INSTALL_ROOT}/netgen4.3 -## -#------ OmniORB ------ -export OMNIORBDIR=${INSTALL_ROOT}/omniORB-3.0.5 -export OMNIORB_CONFIG=${OMNIORBDIR}/.omniORB.cfg -export PYTHONPATH=${OMNIORBDIR}/lib/python:${OMNIORBDIR}/lib/i586_linux_2.0_glibc2.1:${PYTHONPATH} -export PATH=$OMNIORBDIR/bin/i586_linux_2.0_glibc2.1:$PATH -export LD_LIBRARY_PATH=$OMNIORBDIR/lib/i586_linux_2.0_glibc2.1:$LD_LIBRARY_PATH -## -#------ Numeric ------ -export PYTHONPATH=${INSTALL_ROOT}/Numeric-22.0/lib/python2.2/site-packages/Numeric:${PYTHONPATH} -## -#------ HappyDoc ------ -export PATH=${INSTALL_ROOT}/HappyDoc-r2_1/bin:${PATH} -export PYTHONPATH=${INSTALL_ROOT}/HappyDoc-r2_1/lib/python2.2/site-packages:${PYTHONPATH} -## -#------ Doxygen ------ -export PATH=${INSTALL_ROOT}/doxygen-1.3-rc2/bin:${PATH} -## -#------ Graphviz ------ -export PATH=${INSTALL_ROOT}/graphviz-1.9/bin:${PATH} -export LD_LIBRARY_PATH=${INSTALL_ROOT}/graphviz-1.9/lib/graphviz:${LD_LIBRARY_PATH} -## - -#------------------------------------------------------------------------------ diff --git a/bin/appliskel/env.d/envSalome.sh b/bin/appliskel/env.d/envSalome.sh deleted file mode 100644 index e85232ef1..000000000 --- a/bin/appliskel/env.d/envSalome.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -# -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# 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 -# -# --- example to adapt to your own configuration --- -# --- envSalome.sh gives a set of MODULE_ROOT_DIR, to source -# --- you must at least define and export KERNEL_ROOT_DIR -# -REPINST=/home/prascle/SALOME2/Install - -export KERNEL_ROOT_DIR=${REPINST}/KERNEL_V301 - -export GUI_ROOT_DIR=${REPINST}/GUI_V301 -#export SalomeAppConfig=${GUI_ROOT_DIR}/share/salome/resources/gui -export SalomeAppConfig=${HOME}/${APPLI} - -export GEOM_ROOT_DIR=${REPINST}/GEOM_V301 -export MED_ROOT_DIR=${REPINST}/MED_V301 -export SMESH_ROOT_DIR=${REPINST}/SMESH_V301 -export SUPERV_ROOT_DIR=${REPINST}/SUPERV_V301 -export VISU_ROOT_DIR=${REPINST}/VISU_V301 -export NETGENPLUGIN_ROOT_DIR=${REPINST}/NETGENPLUGIN_V301 -export COMPONENT_ROOT_DIR=${REPINST}/COMPONENT_V301 -export PYCALCULATOR_ROOT_DIR=${REPINST}/PYCALCULATOR_V301 -export PYHELLO_ROOT_DIR=${REPINST}/PYHELLO_V301 -export PYTIX_ROOT_DIR=${REPINST}/PYTIX_V301 - diff --git a/bin/appliskel/envd b/bin/appliskel/envd index c49c69cac..7d1ff6f60 100644 --- a/bin/appliskel/envd +++ b/bin/appliskel/envd @@ -1,24 +1,24 @@ #!/bin/bash -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # for i in $1/env.d/*.sh; do source ${i}; done diff --git a/bin/appliskel/getAppliPath.py b/bin/appliskel/getAppliPath.py index 488ea674b..24cd69653 100755 --- a/bin/appliskel/getAppliPath.py +++ b/bin/appliskel/getAppliPath.py @@ -1,25 +1,27 @@ #!/usr/bin/env python -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + import os def relpath(target, base): @@ -47,9 +49,7 @@ def set_var(VAR, strpath): return "setenv %s %s" % (VAR, value) else: return "export %s=%s" % (VAR, value) - - -applipath=relpath(os.path.abspath(os.path.dirname(__file__)),os.path.abspath(os.getenv('HOME'))) -#print set_var('APPLI', applipath) -print applipath +if __name__ == "__main__": + applipath=relpath(os.path.realpath(os.path.dirname(__file__)),os.path.realpath(os.getenv('HOME'))) + print applipath diff --git a/bin/appliskel/killCurrentPort b/bin/appliskel/killCurrentPort deleted file mode 100755 index 86a3f499a..000000000 --- a/bin/appliskel/killCurrentPort +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -# -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# 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 -# - -# --- retrieve APPLI path, relative to $HOME, set ${APPLI} - -APPLI_HOME=`dirname $0` -export APPLI=`${APPLI_HOME}/getAppliPath.py` - -# --- set the SALOME environment (prerequisites, MODULES_ROOT_DIR...) - -. ${HOME}/${APPLI}/envd ${HOME}/${APPLI} - -# --- find omniORB configuration relative to current session if any - -fileOmniConfig=${HOME}/${APPLI}/USERS/.omniORB_${USER}_last.cfg - -if [ -f $fileOmniConfig ]; then - OMNIORB_CONFIG=${HOME}/${APPLI}/USERS/.omniORB_${USER}_last.cfg - export OMNIORB_CONFIG -fi - -currentPort=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py port` -echo $currentPort - -# --- kill current salome session -${KERNEL_ROOT_DIR}/bin/salome/shutdownSalome.py -${KERNEL_ROOT_DIR}/bin/salome/killSalomeWithPort.py $currentPort - -# --- delete config files - -if [ -s $fileOmniConfig ]; then - refConfig=`ls -l $fileOmniConfig | awk '{print \$NF}'` - if [ -f $refConfig ]; then - rm $refConfig - fi - rm $fileOmniConfig -fi diff --git a/bin/appliskel/kill_remote_containers.py b/bin/appliskel/kill_remote_containers.py new file mode 100755 index 000000000..e6513af69 --- /dev/null +++ b/bin/appliskel/kill_remote_containers.py @@ -0,0 +1,154 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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 sys,os,shutil,glob,socket +import optparse + +import getAppliPath +appli_local=os.path.realpath(os.path.dirname(__file__)) +APPLI=getAppliPath.relpath(appli_local,os.path.realpath(os.getenv('HOME'))) + +usage="""usage: %prog [options] + +This procedure kill all containers that have been launched in a SALOME session on remote machines. +A SALOME session is identified by a machine name and a port number. + +You need to have a well installed SALOME application with a CatalogResources.xml file. +This file is used (parsed) to collect all remote resources. +Remote resources are all the resources on remote machines not including the main local SALOME application. +""" + +try: + # cElementTree from Python 2.5+ + import xml.etree.cElementTree as etree_ +except ImportError: + try: + import xml.etree.ElementTree as etree_ + except ImportError: + try: + import cElementTree as etree_ + except ImportError: + try: + # normal ElementTree install + import elementtree.ElementTree as etree_ + except ImportError: + raise + +class ParseError(Exception): + pass + +catalog_file=os.path.join(appli_local,"CatalogResources.xml") + +SEP=":" +if sys.platform == "win32":SEP=";" + +def get_hostname(): + return socket.gethostname().split('.')[0] + +class Resource: + """Define a SALOME resource + - components : the list of available components of the resource + """ + def __init__(self,node): + self.node=node + self.components=[] + self.resource_dir=None + + def get_rcp(self): + protocol= self.node.get("protocol") + if protocol and protocol[0]=='s':return "scp" + else:return "rcp" + + def get_rsh(self): + protocol= self.node.get("protocol") + if protocol and protocol[0]=='s':return "ssh" + else:return "rsh" + + def get_user(self): + userName= self.node.get("userName") + if not userName: + userName=os.getenv('USER') + return userName + + def get_host(self): + hostname= self.node.get("hostname") + return hostname + + def get_name(self): + name= self.node.get("name") + if name:return name + return self.get_host() + + def get_appliPath(self): + appliPath= self.node.get("appliPath") + if appliPath is None: + appliPath=APPLI + return appliPath + +def main(): + parser = optparse.OptionParser(usage=usage) + parser.add_option('-p','--port', dest="port", + help="The SALOME session port (default NSPORT or 2810)") + + + options, args = parser.parse_args() + + if not os.path.exists(catalog_file): + print "ERROR: the catalog file %s is mandatory" % catalog_file_base + sys.exit(1) + + #Parse CatalogResource.xml + doc = etree_.parse(catalog_file) + + rootNode = doc.getroot() + if rootNode.tag != "resources": + raise ParseError("First level tag must be resources not %s" % rootNode.tag) + + resources=[] + + #Extract resources + for child in rootNode: + if child.tag != "machine": + raise ParseError("Second level tag must be machine not %s" % child.tag) + resources.append(Resource(child)) + + local_names=("localhost",get_hostname()) + + for resource in resources: + if resource.get_host() in local_names:continue + command=resource.get_rsh() +" -l "+resource.get_user()+" "+resource.get_host() + command=command+ " " + os.path.join(resource.get_appliPath(),"runRemote.sh") + if options.port: + port=options.port + else: + port=os.getenv("NSPORT") or "2810" + command=command+ " " + get_hostname() + " " + port +" killSalomeWithPort.py " + port + print command + os.system(command) + +if __name__ == '__main__': + main() + diff --git a/bin/appliskel/runAppli b/bin/appliskel/runAppli index 558a3efcd..f0995a967 100755 --- a/bin/appliskel/runAppli +++ b/bin/appliskel/runAppli @@ -1,24 +1,24 @@ #!/bin/bash -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # APPLI_HOME=`dirname $0` diff --git a/bin/appliskel/runConsole b/bin/appliskel/runConsole index a53410c6a..301c45dcc 100755 --- a/bin/appliskel/runConsole +++ b/bin/appliskel/runConsole @@ -1,24 +1,24 @@ #!/bin/bash -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # APPLI_HOME=`dirname $0` diff --git a/bin/appliskel/runParam b/bin/appliskel/runParam deleted file mode 100755 index 25d7e446b..000000000 --- a/bin/appliskel/runParam +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -# -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# 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 -# - -./KillCurrentPort - -./runAppli --logger - diff --git a/bin/appliskel/runRemote.sh b/bin/appliskel/runRemote.sh index dd5258e4f..dead646a7 100755 --- a/bin/appliskel/runRemote.sh +++ b/bin/appliskel/runRemote.sh @@ -1,25 +1,26 @@ #!/bin/bash -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # --- run command in SALOME environment from remote call, ssh or rsh # - SALOME configuration is defined by : # - list of MODULE_ROOT_DIR @@ -40,7 +41,7 @@ # $4 : if $3 == WORKINGDIR, the path to the workingdir # $5 (or $3 if no workingdir given) and following : local command to execute, with args # --- retrieve APPLI path, relative to $HOME, set ${APPLI} -# + APPLI_HOME=`dirname $0` export APPLI=`${APPLI_HOME}/getAppliPath.py` @@ -57,7 +58,7 @@ export NSHOST NSPORT=$2 export NSPORT initref="NameService=corbaname::"$1":$2" -echo "ORBInitRef $initref" > $OMNIORB_CONFIG +echo "InitRef = $initref" > $OMNIORB_CONFIG #go to the requested working directory if any if test "x$3" == "xWORKINGDIR"; then diff --git a/bin/appliskel/runSalomeScript b/bin/appliskel/runSalomeScript new file mode 100755 index 000000000..ed049c6b4 --- /dev/null +++ b/bin/appliskel/runSalomeScript @@ -0,0 +1,249 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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 os,sys,optparse +import socket,shutil +import re + +usage=""" + Connect to a SALOME session (local or remote) and execute a Python script with data files in argument (optional) + + Usage: %prog [ options ] script + + script : The Python script to execute in the SALOME session + + SALOME SESSION + -------------- + If PORT and MACHINE are not given, try to connect to the last active session on the local machine + If PORT and MACHINE are given, try to connect to the remote session associated with PORT on MACHINE + If MACHINE is not given, try to connect to the session associated to PORT on the local machine + If PORT is not given, try to connect to the remote session associated to port 2810 on MACHINE + + If MACHINE isn't localhost or hostname, USER is needed + + If Salome isn't installed on the local machine, use APPLI_DIST to execute a distant session + + + INPUTS AND OUPUTS + ----------------- + script is needed in all case + INPUT and OUTPUT are used only when Salome isn't on local machine. It defines a list of script (full path, blank separated) + Actions done with these two lists are : + - adjustment of path in a temporary script file + - copy of the input files and script file on the distant machine + +""" + +appli_local=os.path.realpath(os.path.dirname(__file__)) + +def get_hostname(): + return socket.gethostname().split('.')[0] + +def vararg_callback(option, opt_str, value, parser): + """optparse callback for variable length arguments""" + assert value is None + + done = 0 + value = [] + rargs = parser.rargs + while rargs: + arg = rargs[0] + + # Stop if we hit an arg like "--foo", "-a", "-fx", "--file=f", + # etc. Note that this also stops on "-3" or "-3.0", so if + # your option takes numeric values, you will need to handle this. + if ((arg[:2] == "--" and len(arg) > 2) or + (arg[:1] == "-" and len(arg) > 1 and arg[1] != "-")): + break + else: + value.append(arg) + del rargs[0] + + setattr(parser.values, option.dest, value) + +def parse_args(): + """parse arguments, check validity and set defaults""" + parser = optparse.OptionParser(usage=usage) + parser.add_option('-p','--port', dest="port", default='', help="The port to connect to") + parser.add_option('-m','--machine', dest="machine", default='', help="The computer to connect to") + parser.add_option('-d','--directory', dest="directory", help="[Distant Mode] The APPLI_HOME path on the distant machine (must be used if Salome isn't on the local machine)") + parser.add_option('-u','--user', dest="user", default='', help="[Distant Mode] The user on the computer to connect to") + parser.add_option('-i','--infiles', dest="infiles", default=[], action="callback", callback=vararg_callback, + help="[Distant Mode] The list of input files (blank separated) used in the Python script") + parser.add_option('-o','--outfiles', dest="outfiles", default=[], action="callback", callback=vararg_callback, + help="[Distant Mode] The list of output files (blank separated) generated by the Python script") + + args=sys.argv[1:] + + script="" + if args: + script=args.pop() + + options, args = parser.parse_args(args) + + #check the arguments + if not os.path.exists(script): + print "ERROR: the script file is mandatory" + sys.exit(1) + + machine=options.machine + port=options.port + user=options.user + infiles = options.infiles + outfiles = options.outfiles + directory=options.directory + + mode="local" + + if machine: + here=get_hostname() + if machine != here and machine != "localhost": + #SALOME server is on a remote computer + mode="remote" + + if not user: + print "ERROR: the remote execution needs -u user argument" + sys.exit(1) + + if not os.path.exists(os.path.join(appli_local,"runSession")): + if not directory: + print "ERROR: the remote execution without SALOME installation needs -d directory argument" + sys.exit(1) + + return mode,user,machine,port,directory,infiles,outfiles,script + +def copy_files(user,machine,script,infiles,outfiles,directory): + """modify script, copy files to remote computer and return lists of copied files""" + + namescript=os.path.basename(script) + logname=os.getenv("LOGNAME",user) + tmp_script="/tmp/%s_%s_%s" % (logname,os.getpid(),namescript) + fscript=open(script) + script_text=fscript.read() + fscript.close() + + list_infiles=[] + list_outfiles=[] + + n=0 + for infile in infiles: + # generate a temporary file name + namefile=os.path.basename(infile) + tmp_file="/tmp/%s_%s_i%s_%s" % (logname,os.getpid(),n,namefile) + + #modify the salome script + script_text = re.sub(infile,tmp_file,script_text) + + # copy the infile to the remote server (into /tmp) + cmd="scp %s %s@%s:%s" % (infile,user,machine,tmp_file) + print "[ SCP ]",cmd + os.system(cmd) + + list_infiles.append(tmp_file) + n=n+1 + + n=0 + for outfile in outfiles: + # generate a temporary file name + namefile=os.path.basename(outfile) + tmp_file="/tmp/%s_%s_o%s_%s" % (logname,os.getpid(),n,namefile) + + #modify the salome script + script_text = re.sub(outfile,tmp_file,script_text) + + list_outfiles.append(tmp_file) + n=n+1 + + fscript=open(tmp_script,'w') + fscript.write(script_text) + fscript.close() + + if directory: + #copy the salome script on the remote server + cmd="scp %s %s@%s:%s" % (tmp_script,user,machine,tmp_script) + print "[ SCP ]",cmd + os.system(cmd) + + return list_infiles, list_outfiles, tmp_script + +def main(): + + mode,user,machine,port,directory,infiles,outfiles,script = parse_args() + + tmp_script=script + + print "mode:",mode + + if mode == "remote": + list_infiles, list_outfiles, tmp_script = copy_files(user,machine,script,infiles,outfiles,directory) + + ################################################# + # Execution # + ################################################# + if directory: + print "[ REMOTE ]" + + # execute runSession from the remote SALOME application + cmd="ssh %s@%s %s/runSession " % (user,machine,directory) + if port: + cmd=cmd+"-p %s "%port + cmd = cmd +"python " + tmp_script + print '[ SSH ] ' + cmd + os.system(cmd) + + else: + print "[ LOCAL ]" + + # execute runSession from the local SALOME application + cmd="%s/runSession " % appli_local + if machine: + cmd=cmd+"-m %s "%machine + if port: + cmd=cmd+"-p %s "%port + cmd = cmd +"python " + tmp_script + print '[ SH ] ' + cmd + os.system(cmd) + + ################################################# + # Get remote files and clean # + ################################################# + if mode == "remote": + temp_files=list_infiles+list_outfiles + + #get the outfiles + for outfile in outfiles: + remote_outfile=list_outfiles.pop(0) + cmd="scp %s@%s:%s %s" %(user,machine,remote_outfile,outfile) + print "[ SCP ] "+cmd + os.system(cmd) + + #clean temporary files + cmd="ssh %s@%s \\rm -f %s" % (user,machine," ".join(temp_files)) + print '[ SSH ] ' + cmd + os.system(cmd) + os.remove(tmp_script) + +if __name__ == '__main__': + main() + diff --git a/bin/appliskel/runSession b/bin/appliskel/runSession index 716fbe6d9..f12e53c21 100755 --- a/bin/appliskel/runSession +++ b/bin/appliskel/runSession @@ -1,33 +1,65 @@ #!/bin/bash -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 # + # Useful shell to run executable progs or shells under Salome env # Use it with args to run a program : runSession python -i myprog.py # Use it without args to run an interactive shell under Salome env -# APPLI_HOME=`dirname $0` +NSPORT=last +NSHOST=localhost + +usage() +{ + echo "Connect to a SALOME session (local or remote)" + echo "" + echo "Usage: $(basename $0) [ -p PORT ] [ -m MACHINE ] [ -h ] [command]" + echo "" + echo " -p PORT : The port to connect to " + echo " -m MACHINE : The machine to connect to " + echo " -h : Print this message" + echo " command : The command to execute in the SALOME session" + echo "" + echo "If the command is not given a shell is opened" + echo "If PORT and MACHINE are not given, try to connect to the last active session on the local machine" + echo "If PORT and MACHINE are given, try to connect to the remote session associated with PORT on MACHINE" + echo "If MACHINE is not given, try to connect to the session associated to PORT on the local machine" + echo "If PORT is not given, try to connect to the remote session associated to port 2810 on MACHINE" + echo "" +} + +while getopts 'm:p:h' OPTION + do + case $OPTION in + m)NSHOST="$OPTARG" ;; + p)NSPORT="$OPTARG" ;; + h|?) usage + exit 1 ;; + esac + done +shift $(($OPTIND - 1)) + # --- retrieve APPLI path, relative to $HOME, set ${APPLI} export APPLI=`${APPLI_HOME}/getAppliPath.py` @@ -36,38 +68,53 @@ export APPLI=`${APPLI_HOME}/getAppliPath.py` . ${HOME}/${APPLI}/envd ${HOME}/${APPLI} -if test "x$1" == "xNSPORT"; then - NSPORT=$2 - export NSPORT - myhost=`hostname` - OMNIORB_CONFIG=${HOME}/${APPLI}/USERS/.omniORB_${USER}_${myhost}_${NSPORT}.cfg - export OMNIORB_CONFIG - NSHOST=${myhost} - export NSHOST - shift 2 -else - - # --- set omniORB configuration to current session if any - - fileOmniConfig=${HOME}/${APPLI}/USERS/.omniORB_${USER}_last.cfg - - if [ -f $fileOmniConfig ]; then - OMNIORB_CONFIG=${HOME}/${APPLI}/USERS/.omniORB_${USER}_last.cfg +if test "x${NSPORT}" == "xlast"; then + #PORT is not given + if test "x${NSHOST}" == "xlocalhost"; then + #MACHINE and PORT are not given + # --- set omniORB configuration to current session if any + fileOmniConfig=${HOME}/${APPLI}/USERS/.omniORB_${USER}_last.cfg + if [ -f $fileOmniConfig ]; then + OMNIORB_CONFIG=${HOME}/${APPLI}/USERS/.omniORB_${USER}_last.cfg + export OMNIORB_CONFIG + # --- set environment variables for port and hostname of NamingService + NSHOST=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py host` + NSPORT=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py port` + export NSPORT + export NSHOST + fi + else + #MACHINE is given PORT is not given + NSPORT=2810 + OMNIORB_CONFIG=${HOME}/${APPLI}/USERS/.omniORB_${USER}_${NSHOST}_${NSPORT}.cfg export OMNIORB_CONFIG - - # --- set environment variables for port and hostname of NamingService - - NSHOST=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py host` - export NSHOST - NSPORT=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py port` + #if omniorb config file exists do not override (perhaps too conservative) + if [ ! -f ${OMNIORB_CONFIG} ]; then + echo "InitRef = NameService=corbaname::${NSHOST}:${NSPORT}" > ${OMNIORB_CONFIG} + fi export NSPORT + export NSHOST fi +else + #PORT is given + if test "x${NSHOST}" == "xlocalhost"; then + #MACHINE is not given PORT is given + NSHOST=`hostname` + fi + OMNIORB_CONFIG=${HOME}/${APPLI}/USERS/.omniORB_${USER}_${NSHOST}_${NSPORT}.cfg + export OMNIORB_CONFIG + #if omniorb config file exists do not override (perhaps too conservative) + if [ ! -f ${OMNIORB_CONFIG} ]; then + echo "InitRef = NameService=corbaname::${NSHOST}:${NSPORT}" > ${OMNIORB_CONFIG} + fi + export NSPORT + export NSHOST fi # --- invoke shell with or without args if [ $# -ne 0 ] ; then - ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py $* + ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py -exec $* else ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc diff --git a/bin/appliskel/runTests b/bin/appliskel/runTests index 2d9d9d42d..352daad91 100755 --- a/bin/appliskel/runTests +++ b/bin/appliskel/runTests @@ -1,24 +1,24 @@ #!/bin/bash -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # # --- retrieve APPLI path, relative to $HOME, set ${APPLI} diff --git a/bin/appliskel/searchFreePort.sh b/bin/appliskel/searchFreePort.sh index ad8af9f3d..8d0346561 100755 --- a/bin/appliskel/searchFreePort.sh +++ b/bin/appliskel/searchFreePort.sh @@ -1,27 +1,28 @@ #!/bin/bash -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # --- define port for CORBA naming service -# + searchFreePort() { echo -n "Searching for a free port for naming service: " NSPORT=2810 diff --git a/bin/appliskel/update_catalogs.py b/bin/appliskel/update_catalogs.py new file mode 100644 index 000000000..e55acc1a1 --- /dev/null +++ b/bin/appliskel/update_catalogs.py @@ -0,0 +1,273 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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 sys,os,shutil,glob,socket +import optparse + +import getAppliPath +appli_local=os.path.realpath(os.path.dirname(__file__)) +APPLI=getAppliPath.relpath(appli_local,os.path.realpath(os.getenv('HOME'))) + +usage="""usage: %prog [options] +Typical use is: + python update_catalogs.py + +You need to have a well installed SALOME application with a CatalogResources.base.xml file. +This file is used (parsed) to collect all module catalogs from distant resources and +put them in the directory "remote_catalogs" with sub-directories with same name as the distant resource. +Distant resources are all the resources except the main SALOME application. +Module catalogs from distant resources are copied by the remote protocol declared in the catalog (rcp or rsh) +except for the user resources on the local machine (local copy: cp). + +In a second time, this procedure generates a ready to use CatalogResources.xml with all available components +for each resource. +""" + +try: + # cElementTree from Python 2.5+ + import xml.etree.cElementTree as etree_ +except ImportError: + try: + import xml.etree.ElementTree as etree_ + except ImportError: + try: + import cElementTree as etree_ + except ImportError: + try: + # normal ElementTree install + import elementtree.ElementTree as etree_ + except ImportError: + raise + +class ParseError(Exception): + pass + +catalog_file_base=os.path.join(appli_local,"CatalogResources.base.xml") +catalog_file=os.path.join(appli_local,"CatalogResources.xml") + +cata_dir=os.path.join(appli_local,"remote_catalogs") +cata_dir_bak=os.path.join(appli_local,"remote_catalogs.bak") + +SEP=":" +if sys.platform == "win32":SEP=";" + +def get_hostname(): + return socket.gethostname().split('.')[0] + +class Component: + """Define a SALOME component + - name : component name + - moduleName : module name + """ + def __init__(self,name,moduleName): + self.name=name + self.moduleName=moduleName + +class Resource: + """Define a SALOME resource + - components : the list of available components of the resource + """ + def __init__(self,node): + self.node=node + self.components=[] + self.resource_dir=None + self.build() + + def build(self): + self.attrs=self.node.attrib + #remove all children (components and modules) + for child in list(self.node): + self.node.remove(child) + + def update(self): + for compo in self.components: + child=etree_.Element("component",name=compo.name,moduleName=compo.moduleName) + child.tail="\n" + self.node.append(child) + + def get_rcp(self): + protocol= self.node.get("protocol") + if protocol and protocol[0]=='s':return "scp" + else:return "rcp" + + def get_user(self): + userName= self.node.get("userName") + if not userName: + userName=os.getenv('USER') + return userName + + def get_host(self): + hostname= self.node.get("hostname") + return hostname + + def get_name(self): + name= self.node.get("name") + if name:return name + return self.get_host() + + def get_appliPath(self): + appliPath= self.node.get("appliPath") + if appliPath is None: + appliPath=APPLI + return appliPath + + def get_catalogs(self): + """Get module catalogs file from the resource and copy them locally in remote_catalogs/""" + hostname=self.get_host() + appliPath= self.get_appliPath() + userName = self.get_user() + rcopy=self.get_rcp() + + resource_dir=os.path.join(cata_dir,self.get_name()) + + if hostname == "localhost" or hostname == get_hostname() and userName == os.getenv("USER"): + #local machine, use cp + if appliPath[0]!='/': + #relative path + appliPath=os.path.join(os.getenv("HOME"),appliPath) + + if appliPath == appli_local: + return + os.mkdir(resource_dir) + cata_path=os.path.join(appliPath,"share","salome","resources","*Catalog.xml") + cmd="cp %s %s" % (cata_path,resource_dir) + print cmd + os.system(cmd) + cata_path=os.path.join(appliPath,"share","salome","resources","*","*Catalog.xml") + cmd="cp %s %s" % (cata_path,resource_dir) + print cmd + os.system(cmd) + else: + #remote machine, use rcopy + os.mkdir(resource_dir) + cata_path=os.path.join(appliPath,"share","salome","resources","*Catalog.xml") + cmd="%s %s@%s:%s %s" + cmd= cmd%(rcopy,userName,hostname,cata_path,resource_dir) + print cmd + os.system(cmd) + cata_path=os.path.join(appliPath,"share","salome","resources","*","*Catalog.xml") + cmd="%s %s@%s:%s %s" + cmd= cmd%(rcopy,userName,hostname,cata_path,resource_dir) + print cmd + os.system(cmd) + + schema_cata=os.path.join(resource_dir,"*SchemaCatalog.xml") + os.system("rm %s"% schema_cata) + + self.resource_dir=os.path.abspath(resource_dir) + + def get_components(self): + """Retrieve all components declared in module catalogs of the resource""" + appliPath= self.get_appliPath() + userName = self.get_user() + hostname=self.get_host() + resource_dir=os.path.join(cata_dir,self.get_name()) + catalogs_list=glob.glob(os.path.join(resource_dir,"*Catalog.xml")) + + if hostname == "localhost" or hostname == get_hostname() and userName == os.getenv("USER"): + #user local resource + if appliPath[0]!='/': + appliPath=os.path.join(os.getenv("HOME"),appliPath) + if appliPath == appli_local: + #main local resource: get catalogs in share/salome/resources + catalogs_list=glob.glob(os.path.join(appliPath,"share","salome","resources","*","*Catalog.xml")) + catalogs_list=catalogs_list + glob.glob(os.path.join(appliPath,"share","salome","resources","*Catalog.xml")) + + for cata in catalogs_list: + moduleName= os.path.basename(cata)[:-11] + #Parse module catalog + doc = etree_.parse(cata) + rootNode = doc.getroot() + for componentName in rootNode.findall("component-list/component/component-name"): + self.components.append(Component(componentName.text,moduleName)) + + +def main(): + parser = optparse.OptionParser(usage=usage) + + options, args = parser.parse_args() + + if not os.path.exists(catalog_file_base): + print "ERROR: the base catalog file %s is mandatory" % catalog_file_base + sys.exit(1) + + #Parse CatalogResource.xml + doc = etree_.parse(catalog_file_base) + + rootNode = doc.getroot() + if rootNode.tag != "resources": + raise ParseError("First level tag must be resources not %s" % rootNode.tag) + + resources=[] + + #Extract resources + for child in rootNode: + if child.tag != "machine": + raise ParseError("Second level tag must be machine not %s" % child.tag) + resources.append(Resource(child)) + + # Remove remote_catalogs directory and create a new empty one + if os.path.exists(cata_dir): + if os.path.exists(cata_dir_bak): + shutil.rmtree(cata_dir_bak) + os.rename(cata_dir,cata_dir_bak) + + os.mkdir(cata_dir) + + #Get catalogs from remote resources and copy them in remote_catalogs + for mach in resources: + mach.get_catalogs() + + #Get the list of SALOME components that are defined in catalogs + for mach in resources: + mach.get_components() + + #Update the resource catalog dom object for further dump + for mach in resources: + mach.update() + + #dump new CatalogResources.xml + f=open(catalog_file,'w') + f.write('\n') + doc.write(f) + f.write('\n') + f.close() + print "%s updated" % catalog_file + + #update configRemote.sh in env.d directory (environment variable SALOME_CATALOGS_PATH) + path=[] + for mach in resources: + if mach.resource_dir: + path.append(mach.resource_dir) + + f=open(os.path.join(appli_local,"env.d","configRemote.sh"),'w') + f.write("export SALOME_CATALOGS_PATH=%s\n" % SEP.join(path)) + f.close() + + +if __name__ == '__main__': + main() + diff --git a/bin/config_appli.xml b/bin/config_appli.xml index 2695ad7e5..027a166f4 100644 --- a/bin/config_appli.xml +++ b/bin/config_appli.xml @@ -1,5 +1,6 @@ + diff --git a/bin/createAppli.sh b/bin/createAppli.sh index 0fb1aece9..2103a4601 100755 --- a/bin/createAppli.sh +++ b/bin/createAppli.sh @@ -1,25 +1,26 @@ #!/bin/sh -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + comName=`which $0` rep=`dirname $comName` @@ -31,6 +32,7 @@ elif [ -d $1 ]; then echo $1 "directory already exists, nothing done" else mkdir -p $1 + mkdir -p $1/USERS cp -r $rep/appliskel/* $1 cp $rep/appliskel/.bashrc $1 chmod +x $1/*.sh $1/run* $1/envd diff --git a/bin/envSalome.py b/bin/envSalome.py index 348c0a460..592493b35 100755 --- a/bin/envSalome.py +++ b/bin/envSalome.py @@ -1,25 +1,27 @@ -#!/usr/bin/env python -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +#! /usr/bin/env python +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + import os import sys import setenv @@ -27,19 +29,21 @@ import setenv kernel_root=os.getenv("KERNEL_ROOT_DIR") sys.path[:0]=[kernel_root+"/bin/salome"] -#import runSalome - argv = sys.argv[1:] sys.argv = argv[1:] -#sys.argv = [sys.argv[0]] -#if len(argv) > 3: -# sys.argv += argv[3:] -#if len(argv) > 2: -# sys.argv = argv[2:] - -#args, modules_list, modules_root_dir = setenv.get_config() -#runSalome.set_env(args, modules_list, modules_root_dir) +if argv[0] == "-exec": + #keep options only for execution + del argv[0] + sys.argv = [] + setenv.main(True); +if sys.platform == "win32": + if len(argv) >= 2: + # Fix a problem of spaces in argv[1] + argv[1] = '"%s"'%(argv[1]) + pass + pass + os.execvp(argv[0],argv) diff --git a/bin/killSalome.py b/bin/killSalome.py index 582152ceb..020f7ed44 100755 --- a/bin/killSalome.py +++ b/bin/killSalome.py @@ -1,41 +1,52 @@ -#!/usr/bin/env python -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +#! /usr/bin/env python +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + +## \file killSalome.py +# Stop all %SALOME servers from all sessions by killing them +# + import os, sys, re, signal from killSalomeWithPort import killMyPort, getPiDict +#from salome_utils import getHostName, getShortHostName def killAllPorts(): """ Kill all SALOME sessions belonging to the user. """ user = os.getenv('USER') + #hostname = getHostName() + #shostname = getShortHostName() # new-style dot-prefixed pidict file #fpidict = getPiDict('(\d*)',hidden=True) #problem with WIN32 path slashes fpidict = getPiDict('#####',hidden=True) dirpidict = os.path.dirname(fpidict) fpidict = os.path.basename(fpidict) - fpidict = fpidict.replace('#####', '(\d*)') + #if hostname in fpidict: + # fpidict = fpidict.replace(hostname, shostname+".*") + fpidict = fpidict.replace('#####', '(\d*)') fnamere = re.compile("^%s$" % fpidict) try: for f in os.listdir(dirpidict): @@ -50,9 +61,11 @@ def killAllPorts(): pass # provide compatibility with old-style pidict file (not dot-prefixed) #fpidict = getPiDict('(\d*)',hidden=False) - fpidict = getPiDict('#####',hidden=True) + fpidict = getPiDict('#####',hidden=False) dirpidict = os.path.dirname(fpidict) fpidict = os.path.basename(fpidict) + #if hostname in fpidict: + # fpidict = fpidict.replace(hostname, shostname+".*") fpidict = fpidict.replace('#####', '(\d*)') fnamere = re.compile("^%s$" % fpidict) try: diff --git a/bin/killSalomeWithPort.py b/bin/killSalomeWithPort.py index 4403a8bc2..57729aa88 100755 --- a/bin/killSalomeWithPort.py +++ b/bin/killSalomeWithPort.py @@ -1,31 +1,42 @@ -#!/usr/bin/env python -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +#! /usr/bin/env python +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + +## \file killSalomeWithPort.py +# Stop all %SALOME servers from given sessions by killing them +# +# The sessions are indicated by their ports on the command line as in : +# \code +# killSalomeWithPort.py 2811 2815 +# \endcode +# + import os, sys, pickle, signal, commands,glob -from launchConfigureParser import verbose +from salome_utils import verbose import Utils_Identity import salome_utils -def getPiDict(port,appname='salome',full=True,hidden=True): +def getPiDict(port,appname='salome',full=True,hidden=True,hostname=None): """ Get file with list of SALOME processes. This file is located in the user's home directory @@ -44,6 +55,10 @@ def getPiDict(port,appname='salome',full=True,hidden=True): """ from salome_utils import generateFileName, getTmpDir dir = "" + if not hostname: + hostname = os.getenv("NSHOST") + if hostname: hostname = hostname.split(".")[0] + pass if full: # full path to the pidict file is requested if hidden: @@ -60,7 +75,7 @@ def getPiDict(port,appname='salome',full=True,hidden=True): suffix="pidict", hidden=hidden, with_username=True, - with_hostname=True, + with_hostname=hostname or True, with_port=port, with_app=appname.upper()) @@ -71,14 +86,14 @@ def appliCleanOmniOrbConfig(port): - ${HOME}/${APPLI}/USERS/.omniORB_${USER}_last.cfg the last is removed only if the link points to the first file. """ - from salome_utils import generateFileName + from salome_utils import generateFileName, getUserName home = os.getenv("HOME") appli = os.getenv("APPLI") if appli is None: #Run outside application context pass else: - dir = os.path.join(home, appli,"USERS") + dir = os.path.join(os.path.realpath(home), appli,"USERS") omniorb_config = generateFileName(dir, prefix="omniORB", extension="cfg", hidden=True, @@ -102,9 +117,11 @@ def appliCleanOmniOrbConfig(port): os.remove(omniorb_config) pass + if os.path.lexists(last_running_config):return + #try to relink last.cfg to an existing config file if any files = glob.glob(os.path.join(os.environ["HOME"],Utils_Identity.getapplipath(), - "USERS",".omniORB_"+salome_utils.getUserName()+"_*.cfg")) + "USERS",".omniORB_"+getUserName()+"_*.cfg")) current_config=None current=0 for f in files: @@ -120,22 +137,83 @@ def appliCleanOmniOrbConfig(port): ########## kills all salome processes with the given port ########## +def shutdownMyPort(port): + """ + Shutdown SALOME session running on the specified port. + Parameters: + - port - port number + """ + if not port: return + + from salome_utils import generateFileName + + # set OMNIORB_CONFIG variable to the proper file + home = os.getenv("HOME") + appli = os.getenv("APPLI") + kwargs = {} + if appli is not None: + home = os.path.join(os.path.realpath(home), appli,"USERS") + kwargs["with_username"]=True + pass + omniorb_config = generateFileName(home, prefix="omniORB", + extension="cfg", + hidden=True, + with_hostname=True, + with_port=port, + **kwargs) + os.environ['OMNIORB_CONFIG'] = omniorb_config + + # give the chance to the servers to shutdown properly + try: + import time + import salome_kernel + orb, lcc, naming_service, cm = salome_kernel.salome_kernel_init() + # shutdown all + lcc.shutdownServers() + # give some time to shutdown to complete + time.sleep(1) + # shutdown omniNames and notifd + salome_kernel.LifeCycleCORBA.killOmniNames() + except: + pass + pass + def killMyPort(port): """ Kill SALOME session running on the specified port. Parameters: - port - port number """ + from salome_utils import getShortHostName, getHostName + + # try to shutdown session nomally + import threading, time + threading.Thread(target=shutdownMyPort, args=(port,)).start() + time.sleep(3) # wait a little, then kill processes (should be done if shutdown procedure hangs up) + # new-style dot-prefixed pidict file filedict = getPiDict(port, hidden=True) # provide compatibility with old-style pidict file (not dot-prefixed) if not os.path.exists(filedict): filedict = getPiDict(port, hidden=False) + # provide compatibility with old-style pidict file (short hostname) + if not os.path.exists(filedict): filedict = getPiDict(port, hidden=True, hostname=getShortHostName()) + # provide compatibility with old-style pidict file (not dot-prefixed, short hostname) + if not os.path.exists(filedict): filedict = getPiDict(port, hidden=False, hostname=getShortHostName()) + # provide compatibility with old-style pidict file (long hostname) + if not os.path.exists(filedict): filedict = getPiDict(port, hidden=True, hostname=getHostName()) + # provide compatibility with old-style pidict file (not dot-prefixed, long hostname) + if not os.path.exists(filedict): filedict = getPiDict(port, hidden=False, hostname=getHostName()) # try: fpid = open(filedict, 'r') # from salome_utils import generateFileName - fpidomniNames = generateFileName(os.path.join('/tmp/logs', os.getenv('USER')), + if sys.platform == "win32": + username = os.getenv( "USERNAME" ) + else: + username = os.getenv('USER') + path = os.path.join('/tmp/logs', username) + fpidomniNames = generateFileName(path, prefix="", suffix="Pid_omniNames", extension="log", @@ -177,7 +255,7 @@ def killMyPort(port): try: if sys.platform == "win32": import win32pm - win32pm.killpid(int(pid),0) + win32pm.killpid(int(pid),0) else: os.kill(int(pid),signal.SIGKILL) pass @@ -230,8 +308,59 @@ def killNotifdAndClean(port): pass appliCleanOmniOrbConfig(port) - + +def killMyPortSpy(pid, port): + dt = 1.0 + while 1: + if sys.platform == "win32": + from win32pm import killpid + if killpid(int(pid), 0) != 0: + return + else: + from os import kill + try: + kill(int(pid), 0) + except OSError, e: + if e.errno != 3: + return + break + pass + from time import sleep + sleep(dt) + pass + filedict = getPiDict(port, hidden=True) + if not os.path.exists(filedict): + return + try: + import omniORB + orb = omniORB.CORBA.ORB_init(sys.argv, omniORB.CORBA.ORB_ID) + import SALOME_NamingServicePy + ns = SALOME_NamingServicePy.SALOME_NamingServicePy_i(orb) + import SALOME + session = ns.Resolve("/Kernel/Session") + assert session + except: + return + try: + status = session.GetStatSession() + except: + # -- session is in naming service but has crash + status = None + pass + if status: + if not status.activeGUI: + return + pass + killMyPort(port) + return + if __name__ == "__main__": + if sys.argv[1] == "--spy": + pid = sys.argv[2] + port = sys.argv[3] + killMyPortSpy(pid, port) + sys.exit(0) + pass for port in sys.argv[1:]: killMyPort(port) pass diff --git a/bin/launchConfigureParser.py b/bin/launchConfigureParser.py index 87630757e..5ffb99b98 100755 --- a/bin/launchConfigureParser.py +++ b/bin/launchConfigureParser.py @@ -1,33 +1,38 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + import os, glob, string, sys, re import xml.sax import optparse import types +from salome_utils import verbose, setVerbose, getPortNumber, getHomeDir + # names of tags in XML configuration file doc_tag = "document" sec_tag = "section" par_tag = "parameter" +import_tag = "import" # names of attributes in XML configuration file nam_att = "name" @@ -56,6 +61,11 @@ batch_nam = "batch" test_nam = "test" play_nam = "play" gdb_session_nam = "gdb_session" +ddd_session_nam = "ddd_session" +valgrind_session_nam = "valgrind_session" +shutdown_servers_nam = "shutdown_servers" +foreground_nam = "foreground" +wake_up_session_nam = "wake_up_session" # values in XML configuration file giving specific module parameters ( section) # which are stored in opts with key _ (eg SMESH_plugins) @@ -64,16 +74,17 @@ plugins_nam = "plugins" # values passed as arguments, NOT read from XML config file, but set from within this script appname_nam = "appname" port_nam = "port" +salomecfgname = "salome" salomeappname = "SalomeApp" script_nam = "pyscript" # possible choices for the "embedded" and "standalone" parameters embedded_choices = [ "registry", "study", "moduleCatalog", "cppContainer", "SalomeAppEngine" ] -standalone_choices = [ "registry", "study", "moduleCatalog", "cppContainer", "pyContainer", "supervContainer"] +standalone_choices = [ "registry", "study", "moduleCatalog", "cppContainer", "pyContainer"] # values of boolean type (must be '0' or '1'). # xml_parser.boolValue() is used for correct setting -boolKeys = ( gui_nam, splash_nam, logger_nam, file_nam, xterm_nam, portkill_nam, killall_nam, except_nam, pinter_nam ) +boolKeys = ( gui_nam, splash_nam, logger_nam, file_nam, xterm_nam, portkill_nam, killall_nam, except_nam, pinter_nam, shutdown_servers_nam ) intKeys = ( interp_nam, ) # values of list type @@ -105,20 +116,20 @@ def version(): # Calculate and return configuration file unique ID # For example: for SALOME version 3.1.0a1 the id is 300999701 ### -def version_id( fname ): +def version_id(fname): + major = minor = release = dev1 = dev2 = 0 vers = fname.split(".") - major = int(vers[0]) - minor = int(vers[1]) - mr = re.search(r'^([0-9]+)([A-Za-z]?)([0-9]*)',vers[2]) - release = dev = 0 - if mr: - release = int(mr.group(1)) - dev1 = dev2 = 0 - if len(mr.group(2)): dev1 = ord(mr.group(2)) - if len(mr.group(3)): dev2 = int(mr.group(3)) - dev = dev1 * 100 + dev2 - else: - return None + if len(vers) > 0: major = int(vers[0]) + if len(vers) > 1: minor = int(vers[1]) + if len(vers) > 2: + mr = re.search(r'^([0-9]+)([A-Za-z]?)([0-9]*)',vers[2]) + if mr: + release = int(mr.group(1)) + if mr.group(2).strip(): dev1 = ord(mr.group(2).strip()) + if mr.group(3).strip(): dev2 = int(mr.group(3).strip()) + pass + pass + dev = dev1 * 100 + dev2 ver = major ver = ver * 100 + minor ver = ver * 100 + release @@ -127,61 +138,75 @@ def version_id( fname ): return ver ### -# Get user configuration file name +# Get default user configuration file name +# For SALOME, it is: +# - on Linux: ~/.config/salome/.SalomeApprc.[version] +# - on Windows: ~/SalomeApp.xml.[version] +# where [version] is a version number ### -def userFile(appname): +def defaultUserFile(appname=salomeappname, cfgname=salomecfgname): v = version() - if not v: - return "" # not unknown version - if sys.platform == "win32": - filename = "%s\%s.xml.%s" % (os.environ['HOME'], appname, v) - else: - filename = "%s/.%src.%s" % (os.environ['HOME'], appname, v) - if os.path.exists(filename): - return filename # user preferences file for the current version exists - # initial id - id0 = version_id( v ) - # get all existing user preferences files + if v: v = ".%s" % v if sys.platform == "win32": - files = glob.glob( os.environ['HOME'] + "\." + appname + ".xml.*" ) + filename = os.path.join(getHomeDir(), "%s.xml%s" % (appname, v)) else: - files = glob.glob( os.environ['HOME'] + "/." + appname + "rc.*" ) - f2v = {} - for file in files: - match = re.search( r'\.%src\.([a-zA-Z0-9.]+)$'%appname, file ) - if match: f2v[file] = match.group(1) - last_file = "" - last_version = 0 - for file in f2v: - ver = version_id( f2v[file] ) - if ver and abs(last_version-id0) > abs(ver-id0): - last_version = ver - last_file = file - return last_file + if cfgname: + filename = os.path.join(getHomeDir(), ".config", cfgname, ".%src%s" % (appname, v)) + pass + else: + filename = os.path.join(getHomeDir(), ".%src%s" % (appname, v)) + pass + pass + return filename -# -- +### +# Get user configuration file name +### +def userFile(appname, cfgname): + # get app version + v = version() + if not v: return None # unknown version + + # get default user file name + filename = defaultUserFile(appname, cfgname) + if not filename: return None # default user file name is bad + + # check that default user file exists + if os.path.exists(filename): return filename # user file is found -_verbose = None + # otherwise try to detect any appropriate user file -def verbose(): - global _verbose - # verbose has already been called - if _verbose is not None: - return _verbose - # first time - try: - from os import getenv - _verbose = int(getenv('SALOME_VERBOSE')) - except: - _verbose = 0 + # ... calculate default version id + id0 = version_id(v) + if not id0: return None # bad version id -> can't detect appropriate file + + # ... get all existing user preferences files + if sys.platform == "win32": + files = glob.glob(os.path.join(getHomeDir(), "%s.xml.*" % appname)) + else: + files = [] + if cfgname: files += glob.glob(os.path.join(getHomeDir(), ".config", cfgname, ".%src.*" % appname)) + files += glob.glob(os.path.join(getHomeDir(), ".%src.*" % appname)) pass - # - return _verbose -def setVerbose(level): - global _verbose - _verbose = level - return + # ... loop through all files and find most appopriate file (with closest id) + appr_id = -1 + appr_file = "" + for f in files: + if sys.platform == "win32": + match = re.search( r'%s\.xml\.([a-zA-Z0-9.]+)$'%appname, f ) + else: + match = re.search( r'\.%src\.([a-zA-Z0-9.]+)$'%appname, f ) + if match: + ver = version_id(match.group(1)) + if not ver: continue # bad version id -> skip file + if appr_id < 0 or abs(appr_id-id0) > abs(ver-id0): + appr_id = ver + appr_file = f + pass + pass + pass + return appr_file # -- @@ -199,7 +224,7 @@ def process_containers_params( standalone, embedded ): # 3. return corrected parameters values return standalone, embedded - + # ----------------------------------------------------------------------------- ### @@ -209,8 +234,11 @@ def process_containers_params( standalone, embedded ): section_to_skip = "" class xml_parser: - def __init__(self, fileName, _opts ): + def __init__(self, fileName, _opts, _importHistory=[] ): if verbose(): print "Configure parser: processing %s ..." % fileName + self.fileName = os.path.abspath(fileName) + self.importHistory = _importHistory + self.importHistory.append(self.fileName) self.space = [] self.opts = _opts self.section = section_to_skip @@ -256,7 +284,11 @@ class xml_parser: def startElement(self, name, attrs): self.space.append(name) self.current = None - + + # if we are importing file + if self.space == [doc_tag, import_tag] and nam_att in attrs.getNames(): + self.importFile( attrs.getValue(nam_att) ) + # if we are analyzing "section" element and its "name" attribute is # either "launch" or module name -- set section_name if self.space == [doc_tag, sec_tag] and nam_att in attrs.getNames(): @@ -317,6 +349,45 @@ class xml_parser: def endDocument(self): self.read = None pass + + def importFile(self, fname): + # get absolute name + if os.path.isabs (fname) : + absfname = fname + else: + absfname = os.path.join(os.path.dirname(self.fileName), fname) + + # check existing and registry file + for ext in ["", ".xml", ".XML"] : + if os.path.exists(absfname + ext) : + absfname += ext + if absfname in self.importHistory : + if verbose(): print "Configure parser: Warning : file %s is already imported" % absfname + return # already imported + break + pass + else: + if verbose(): print "Configure parser: Error : file %s does not exist" % absfname + return + + # importing file + try: + # copy current options + import copy + opts = copy.deepcopy(self.opts) + # import file + imp = xml_parser(absfname, opts, self.importHistory) + # merge results + for key in imp.opts.keys(): + if not self.opts.has_key(key): + self.opts[key] = imp.opts[key] + pass + pass + pass + except: + if verbose(): print "Configure parser: Error : can not read configuration file %s" % absfname + pass + # ----------------------------------------------------------------------------- @@ -451,7 +522,9 @@ def CreateOptionParser (theAdditionalOptions=[]): help_str = "Python script(s) to be imported. Python scripts are imported " help_str += "in the order of their appearance. In GUI mode python scripts " help_str += "are imported in the embedded python interpreter of current study, " - help_str += "otherwise in an external python interpreter" + help_str += "otherwise in an external python interpreter. " + help_str += "Note: this option is obsolete. Instead you can pass Python script(s) " + help_str += "directly as positional parameter." o_u = optparse.Option("-u", "--execute", metavar="", @@ -460,9 +533,9 @@ def CreateOptionParser (theAdditionalOptions=[]): dest="py_scripts", help=help_str) - # Configuration XML file. Default: $(HOME)/.SalomeApprc.$(version). + # Configuration XML file. Default: see defaultUserFile() function help_str = "Parse application settings from the " - help_str += "instead of default $(HOME)/.SalomeApprc.$(version)" + help_str += "instead of default %s" % defaultUserFile() o_r = optparse.Option("-r", "--resources", metavar="", @@ -608,7 +681,7 @@ def CreateOptionParser (theAdditionalOptions=[]): action="store", dest="test_script_file", help=help_str) - + # Reproducing test script with help of TestRecorder. Default: False. help_str = "Reproducing test script with help of TestRecorder." o_play = optparse.Option("--play", @@ -624,7 +697,65 @@ def CreateOptionParser (theAdditionalOptions=[]): action="store_true", dest="gdb_session", default=False, help=help_str) - + + # ddd session + help_str = "Launch session with ddd" + o_ddd = optparse.Option("--ddd-session", + action="store_true", + dest="ddd_session", default=False, + help=help_str) + + + # valgrind session + help_str = "Launch session with valgrind $VALGRIND_OPTIONS" + o_valgrind = optparse.Option("--valgrind-session", + action="store_true", + dest="valgrind_session", default=False, + help=help_str) + + # shutdown-servers. Default: False. + help_str = "1 to shutdown standalone servers when leaving python interpreter, " + help_str += "0 to keep the standalone servers as daemon [default]. " + help_str += "This option is only useful in batchmode " + help_str += "(terminal mode or without showing desktop)." + o_shutdown = optparse.Option("--shutdown-servers", + metavar="<1/0>", + #type="choice", choices=boolean_choices, + type="string", + action="callback", callback=store_boolean, callback_args=('shutdown_servers',), + dest="shutdown_servers", + help=help_str) + + # foreground. Default: True. + help_str = "0 and runSalome exits after have launched the gui, " + help_str += "1 to launch runSalome in foreground mode [default]." + o_foreground = optparse.Option("--foreground", + metavar="<1/0>", + #type="choice", choices=boolean_choices, + type="string", + action="callback", callback=store_boolean, callback_args=('foreground',), + dest="foreground", + help=help_str) + + # wake up session + help_str = "Wake up a previously closed session. " + help_str += "The session object is found in the naming service pointed by the variable OMNIORB_CONFIG. " + help_str += "If this variable is not setted, the last configuration is taken. " + o_wake_up = optparse.Option("--wake-up-session", + action="store_true", + dest="wake_up_session", default=False, + help=help_str) + + # server launch mode + help_str = "Mode used to launch server processes (daemon or fork)." + o_slm = optparse.Option("--server-launch-mode", + metavar="", + type="choice", + choices=["daemon","fork"], + action="store", + dest="server_launch_mode", + help=help_str) + # All options opt_list = [o_t,o_g, # GUI/Terminal o_d,o_o, # Desktop @@ -647,7 +778,14 @@ def CreateOptionParser (theAdditionalOptions=[]): o_nspl, o_test, # Write/read test script file with help of TestRecorder o_play, # Reproducing test script with help of TestRecorder - o_gdb] + o_gdb, + o_ddd, + o_valgrind, + o_shutdown, + o_foreground, + o_wake_up, + o_slm, # Server launch mode + ] #std_options = ["gui", "desktop", "log_file", "py_scripts", "resources", # "xterm", "modules", "embedded", "standalone", @@ -656,7 +794,7 @@ def CreateOptionParser (theAdditionalOptions=[]): opt_list += theAdditionalOptions - a_usage = "%prog [options] [STUDY_FILE]" + a_usage = "%prog [options] [STUDY_FILE] [PYTHON_FILE [PYTHON_FILE ...]]" version_str = "Salome %s" % version() pars = optparse.OptionParser(usage=a_usage, version=version_str, option_list=opt_list) @@ -672,7 +810,7 @@ def CreateOptionParser (theAdditionalOptions=[]): args = {} #def get_env(): #args = [] -def get_env(theAdditionalOptions=[], appname="SalomeApp"): +def get_env(theAdditionalOptions=[], appname=salomeappname, cfgname=salomecfgname): ### # Collect launch configuration files: # - The environment variable "Config" (SalomeAppConfig) which can @@ -684,12 +822,13 @@ def get_env(theAdditionalOptions=[], appname="SalomeApp"): # - The directories which are inspected are checked for files ".xml" # (SalomeApp.xml) which define SALOME configuration # - These directories are analyzed beginning from the last one in the list, - # so the first directory listed in "Config" environment variable + # so the first directory listed in "Config" environment variable # has higher priority: it means that if some configuration options # is found in the next analyzed cofiguration file - it will be replaced # - The last configuration file which is parsed is user configuration file - # situated in the home directory: "~/.rc[.]" (~/SalomeApprc.3.2.0) - # (if it exists) + # situated in the home directory (if it exists): + # * ~/.config/salome/.rc[.]" for Linux (e.g. ~/.config/salome/.SalomeApprc.6.4.0) + # * ~/.xml[.] for Windows (e.g. ~/SalomeApp.xml.6.4.0) # - Command line options have the highest priority and replace options # specified in configuration file(s) ### @@ -726,7 +865,7 @@ def get_env(theAdditionalOptions=[], appname="SalomeApp"): sys.exit(0) pass - # set resources variable SalomeAppConfig if it is not set yet + # set resources variable SalomeAppConfig if it is not set yet dirs = [] if os.getenv(config_var): if sys.platform == 'win32': @@ -737,12 +876,12 @@ def get_env(theAdditionalOptions=[], appname="SalomeApp"): gui_available = True if os.getenv("GUI_ROOT_DIR") and os.path.isdir( os.getenv("GUI_ROOT_DIR") + "/share/salome/resources/gui" ): dirs += [os.getenv("GUI_ROOT_DIR") + "/share/salome/resources/gui"] - pass + pass else: - gui_available = False - if os.getenv("KERNEL_ROOT_DIR") and os.path.isdir( os.getenv("KERNEL_ROOT_DIR") + "/bin/salome/appliskel" ): - dirs += [os.getenv("KERNEL_ROOT_DIR") + "/bin/salome/appliskel"] - pass + gui_available = False + if os.getenv("KERNEL_ROOT_DIR") and os.path.isdir( os.getenv("KERNEL_ROOT_DIR") + "/bin/salome/appliskel" ): + dirs += [os.getenv("KERNEL_ROOT_DIR") + "/bin/salome/appliskel"] + pass os.environ[config_var] = separator.join(dirs) dirs.reverse() # reverse order, like in "path" variable - FILO-style processing @@ -751,38 +890,38 @@ def get_env(theAdditionalOptions=[], appname="SalomeApp"): dirs.remove('') # to remove empty dirs if the variable terminate by ":" or if there are "::" inside except: pass - + _opts = {} # associative array of options to be filled # parse SalomeApp.xml files in directories specified by SalomeAppConfig env variable for dir in dirs: - #filename = dir+'/'+appname+'.xml' - filename = dir+'/'+salomeappname+'.xml' + filename = os.path.join(dir, appname+'.xml') if not os.path.exists(filename): - print "Configure parser: Warning : could not find configuration file %s" % filename + if verbose(): print "Configure parser: Warning : can not find configuration file %s" % filename else: try: p = xml_parser(filename, _opts) _opts = p.opts except: - print "Configure parser: Error : can not read configuration file %s" % filename + if verbose(): print "Configure parser: Error : can not read configuration file %s" % filename pass # parse user configuration file # It can be set via --resources= command line option - # or is given by default from ${HOME}/.rc. + # or is given from default location (see defaultUserFile() function) # If user file for the current version is not found the nearest to it is used user_config = cmd_opts.resources if not user_config: - user_config = userFile(appname) + user_config = userFile(appname, cfgname) + if verbose(): print "Configure parser: user configuration file is", user_config if not user_config or not os.path.exists(user_config): - print "Configure parser: Warning : could not find user configuration file" + if verbose(): print "Configure parser: Warning : can not find user configuration file" else: try: p = xml_parser(user_config, _opts) _opts = p.opts except: - print 'Configure parser: Error : can not read user configuration file' + if verbose(): print 'Configure parser: Error : can not read user configuration file' user_config = "" args = _opts @@ -806,19 +945,7 @@ def get_env(theAdditionalOptions=[], appname="SalomeApp"): args[appname_nam] = appname # get the port number - my_port = 2809 - try: - file = open(os.environ["OMNIORB_CONFIG"], "r") - s = file.read() - while len(s): - l = string.split(s, ":") - if string.split(l[0], " ")[0] == "ORBInitRef" or string.split(l[0], " ")[0] == "InitRef" : - my_port = int(l[len(l)-1]) - pass - s = file.read() - pass - except: - pass + my_port = getPortNumber() args[port_nam] = my_port @@ -841,8 +968,8 @@ def get_env(theAdditionalOptions=[], appname="SalomeApp"): args[batch_nam] = True if not gui_available: - args[gui_nam] = False - + args[gui_nam] = False + if args[gui_nam]: args["session_gui"] = True if cmd_opts.desktop is not None: @@ -851,8 +978,6 @@ def get_env(theAdditionalOptions=[], appname="SalomeApp"): if args["session_gui"]: if cmd_opts.splash is not None: args[splash_nam] = cmd_opts.splash - if len(cmd_args) > 0: - args["study_hdf"] = cmd_args[0] else: args["session_gui"] = False args[splash_nam] = False @@ -873,7 +998,17 @@ def get_env(theAdditionalOptions=[], appname="SalomeApp"): if cmd_opts.py_scripts is not None: listlist = cmd_opts.py_scripts for listi in listlist: - args[script_nam] += re.split( "[:;,]", listi) + if os.sys.platform == 'win32': + args[script_nam] += re.split( "[;,]", listi) + else: + args[script_nam] += re.split( "[:;,]", listi) + for arg in cmd_args: + if arg[-3:] == ".py": + args[script_nam].append(arg) + elif not args["study_hdf"]: + args["study_hdf"] = arg + pass + pass # xterm if cmd_opts.xterm is not None: args[xterm_nam] = cmd_opts.xterm @@ -926,11 +1061,37 @@ def get_env(theAdditionalOptions=[], appname="SalomeApp"): # Interactive python console if cmd_opts.pinter is not None: args[pinter_nam] = cmd_opts.pinter - + # Gdb session in xterm if cmd_opts.gdb_session is not None: args[gdb_session_nam] = cmd_opts.gdb_session + # Ddd session in xterm + if cmd_opts.ddd_session is not None: + args[ddd_session_nam] = cmd_opts.ddd_session + + # valgrind session + if cmd_opts.valgrind_session is not None: + args[valgrind_session_nam] = cmd_opts.valgrind_session + + # Shutdown servers + if cmd_opts.shutdown_servers is None: + args[shutdown_servers_nam] = 0 + else: + args[shutdown_servers_nam] = cmd_opts.shutdown_servers + pass + + # Foreground + if cmd_opts.foreground is None: + args[foreground_nam] = 1 + else: + args[foreground_nam] = cmd_opts.foreground + pass + + # wake up session + if cmd_opts.wake_up_session is not None: + args[wake_up_session_nam] = cmd_opts.wake_up_session + #################################################### # Add values to args for add_opt in theAdditionalOptions: @@ -965,13 +1126,17 @@ def get_env(theAdditionalOptions=[], appname="SalomeApp"): args[test_nam] = [] filename = cmd_opts.test_script_file args[test_nam] += re.split( "[:;,]", filename ) - + # Play if cmd_opts.play_script_file is not None: args[play_nam] = [] filename = cmd_opts.play_script_file args[play_nam] += re.split( "[:;,]", filename ) + # Server launch command + if cmd_opts.server_launch_mode is not None: + args["server_launch_mode"] = cmd_opts.server_launch_mode + # return arguments os.environ[config_var] = separator.join(dirs) #print "Args: ", args diff --git a/bin/launchSalome.py b/bin/launchSalome.py index 8d8900cc1..9fe2af56b 100755 --- a/bin/launchSalome.py +++ b/bin/launchSalome.py @@ -1,25 +1,27 @@ -#!/usr/bin/env python -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +#! /usr/bin/env python +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + import socket import os import sys diff --git a/bin/nameserver.py b/bin/nameserver.py index 329310fba..94b15f654 100755 --- a/bin/nameserver.py +++ b/bin/nameserver.py @@ -1,25 +1,27 @@ #!/usr/bin/env python -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + import sys, os, re, socket #import commands from server import * @@ -63,14 +65,6 @@ class NamingServer(Server): #print "Can't create " + upath pass - #os.system("touch " + upath + "/dummy") - for fname in os.listdir(upath): - try: - if not fname.startswith("."): os.remove(upath + "/" + fname) - except: - pass - #os.system("rm -f " + upath + "/omninames* " + upath + "/dummy " + upath + "/*.log") - if verbose(): print "Name Service... ", #hname=os.environ["HOST"] #commands.getoutput("hostname") if sys.platform == "win32": @@ -89,13 +83,34 @@ class NamingServer(Server): #aPort=(ss.join().split(':'))[2]; #aPort=re.findall("\d+", ss[0])[0] + # \begin{E.A.} + # put the log files of omniNames in different directory with port reference, + # it is cleaner on linux and it is a fix for salome since it is impossible to + # remove the log files if the corresponding omniNames has not been killed. + # \end{E.A.} + + upath += "/omniNames_%s"%(aPort) + try: + os.mkdir(upath) + except: + #print "Can't create " + upath + pass + + #os.system("touch " + upath + "/dummy") + for fname in os.listdir(upath): + try: + os.remove(upath + "/" + fname) + except: + pass + #os.system("rm -f " + upath + "/omninames* " + upath + "/dummy " + upath + "/*.log") + #aSedCommand="s/.*NameService=corbaname::" + hname + ":\([[:digit:]]*\)/\1/" #print "sed command = ", aSedCommand #aPort = commands.getoutput("sed -e\"" + aSedCommand + "\"" + os.environ["OMNIORB_CONFIG"]) #print "port=", aPort if sys.platform == "win32": #print "start omniNames -start " + aPort + " -logdir " + upath - self.CMD=['omniNames -start ' , aPort , ' -logdir ' , '\"' + upath + '\"', ' -errlog', upath+'/omniNameErrors.log'] + self.CMD=['omniNames -start ' , aPort , ' -nohostname ', ' -logdir ' , '\"' + upath + '\"', ' -errlog', '\"' + upath+'/omniNameErrors.log' + '\"'] #os.system("start omniNames -start " + aPort + " -logdir " + upath) else: #self.CMD=['omniNames -start ' , aPort , ' -logdir ' , upath , ' &'] diff --git a/bin/orbmodule.py b/bin/orbmodule.py index ae4744432..0499db75b 100755 --- a/bin/orbmodule.py +++ b/bin/orbmodule.py @@ -1,24 +1,30 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + +## @package orbmodule +# \brief Module that provides a client for %SALOME +# + import sys,os,time import string from nameserver import * @@ -32,6 +38,7 @@ import CosNaming # ----------------------------------------------------------------------------- class client: + """Client for SALOME""" def __init__(self,args=None): #set GIOP message size for bug 10560: impossible to get field values in TUI mode @@ -54,11 +61,17 @@ class client: if verbose(): print "Launch Naming Service++", # On lance le Naming Server (doit etre dans le PATH) - NamingServer(args).run() + test = True + if args['wake_up_session']: + test = False + pass + if test: + NamingServer(args).run() + pass print "Searching Naming Service ", ncount=0 delta=0.1 - while(ncount < 10): + while(ncount < 100): ncount += 1 try: obj = self.orb.resolve_initial_references("NameService") @@ -93,7 +106,7 @@ class client: # -------------------------------------------------------------------------- def showNS(self): - """ Show the content of NS""" + """ Show the content of SALOME naming service """ self.showNScontext(self.rootContext) # -------------------------------------------------------------------------- @@ -121,13 +134,13 @@ class client: # -------------------------------------------------------------------------- - def waitNS(self,name,typobj=None,maxcount=60): + def waitNS(self,name,typobj=None,maxcount=240): count=0 delta=0.5 print "Searching %s in Naming Service " % name, while(1): count += 1 - if count > maxcount : raise "Impossible de trouver %s" % name + if count > maxcount : raise RuntimeError, "Impossible de trouver %s" % name obj=self.Resolve(name) if obj : print " found in %s seconds " % ((count-1)*delta) @@ -154,7 +167,7 @@ class client: try: os.kill(thePID,0) except: - raise "Process %d for %s not found" % (thePID,theName) + raise RuntimeError, "Process %d for %s not found" % (thePID,theName) aCount += 1 anObj = self.Resolve(theName) if anObj: @@ -202,7 +215,7 @@ class client: print "Searching %s in Naming Service " % name, while(1): count += 1 - if count > maxcount : raise "Impossible de trouver %s" % name + if count > maxcount : raise RuntimeError, "Impossible de trouver %s" % name obj=self.ResolveLogger(name) if obj : print " found in %s seconds " % ((count-1)*delta) diff --git a/bin/runIDLparser b/bin/runIDLparser index 158bf8f45..cc8ce51f0 100644 --- a/bin/runIDLparser +++ b/bin/runIDLparser @@ -1,24 +1,24 @@ #! /bin/sh -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # # print the help message ==================================== diff --git a/bin/runNS.py b/bin/runNS.py index 2135ec1f5..95e6c1788 100755 --- a/bin/runNS.py +++ b/bin/runNS.py @@ -1,25 +1,27 @@ #!/usr/bin/env python -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + #log files localization # import os, commands, sys, re, string, socket diff --git a/bin/runNS.sh b/bin/runNS.sh index 3e23a1458..61d4bd33d 100755 --- a/bin/runNS.sh +++ b/bin/runNS.sh @@ -1,25 +1,26 @@ #!/bin/sh -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + #log files localization # BaseDir=/tmp diff --git a/bin/runSalome b/bin/runSalome index b56fbc634..af8082153 100755 --- a/bin/runSalome +++ b/bin/runSalome @@ -1,24 +1,24 @@ #!/bin/bash -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py python ${KERNEL_ROOT_DIR}/bin/salome/runSalome.py $* @@ -32,7 +32,7 @@ ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py python ${KERNEL_ROOT_DIR}/bin/salome/ # - if the config file does not exist, it is created with default values. # # -# $: ${KERNEL_ROOT_DIR}/bin/salome/runSalome --modules=GEOM,SMESH,VISU,SUPERV,MED --embedded=registry,study,moduleCatalog,cppContainer --standalone=pyContainer,supervContainer --xterm --killall +# $: ${KERNEL_ROOT_DIR}/bin/salome/runSalome --modules=GEOM,SMESH,VISU,MED --embedded=registry,study,moduleCatalog,cppContainer --standalone=pyContainer --xterm --killall # # parameters from command line supersede those from SalomeApp.xml # @@ -40,7 +40,7 @@ ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py python ${KERNEL_ROOT_DIR}/bin/salome/ # (embedded = same process) or in a separate process (standalone): # --> registry,study,moduleCatalog,cppContainer # Other CORBA servers could only be launched in separate process (standalone): -# --> pyContainer,supervContainer +# --> pyContainer # # $: ${KERNEL_ROOT_DIR}/bin/salome/runSalome -h # help diff --git a/bin/runSalome.bat b/bin/runSalome.bat new file mode 100644 index 000000000..60e7198a5 --- /dev/null +++ b/bin/runSalome.bat @@ -0,0 +1,23 @@ +@REM Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +@REM +@REM Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +@REM CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +@REM +@REM This library is free software; you can redistribute it and/or +@REM modify it under the terms of the GNU Lesser General Public +@REM License as published by the Free Software Foundation; either +@REM version 2.1 of the License. +@REM +@REM This library is distributed in the hope that it will be useful, +@REM but WITHOUT ANY WARRANTY; without even the implied warranty of +@REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +@REM Lesser General Public License for more details. +@REM +@REM You should have received a copy of the GNU Lesser General Public +@REM License along with this library; if not, write to the Free Software +@REM Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +@REM +@REM See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +@REM + +@"%PYTHONBIN%" "%KERNEL_ROOT_DIR%\bin\salome\envSalome.py" "%PYTHONBIN%" "%KERNEL_ROOT_DIR%\bin\salome\runSalome.py" %* diff --git a/bin/runSalome.csh b/bin/runSalome.csh index e88c3fe6c..a4606fc1d 100755 --- a/bin/runSalome.csh +++ b/bin/runSalome.csh @@ -1,25 +1,24 @@ #!/bin/csh -f -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # - -runSalome --gui --modules=GEOM,SMESH,VISU,SUPERV,MED --killall +runSalome --gui --modules=GEOM,SMESH,VISU,MED --killall diff --git a/bin/runSalome.ksh b/bin/runSalome.ksh index 58d0edef6..57804f295 100644 --- a/bin/runSalome.ksh +++ b/bin/runSalome.ksh @@ -1,27 +1,26 @@ #!/bin/ksh -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # - searchFreePort() { echo -n "Searching for a free port for naming service: " NSPORT=2810 @@ -75,7 +74,7 @@ fi # - if the config file does not exist, it is created with default values. # # -# $: ${KERNEL_ROOT_DIR}/bin/salome/runSalome --modules=GEOM,SMESH,VISU,SUPERV,MED --embedded=registry,study,moduleCatalog,cppContainer --standalone=pyContainer,supervContainer --xterm --killall +# $: ${KERNEL_ROOT_DIR}/bin/salome/runSalome --modules=GEOM,SMESH,VISU,MED --embedded=registry,study,moduleCatalog,cppContainer --standalone=pyContainer --xterm --killall # # parameters from command line supersede those from SalomeApp.xml # @@ -83,7 +82,7 @@ fi # (embedded = same process) or in a separate process (standalone): # --> registry,study,moduleCatalog,cppContainer # Other CORBA servers could only be launched in separate process (standalone): -# --> pyContainer,supervContainer +# --> pyContainer # # $: ${KERNEL_ROOT_DIR}/bin/salome/runSalome -h # help @@ -96,4 +95,4 @@ fi # # ----------------------------------------------------------------------------- # Example on CCRT (without ihm) : -# ${KERNEL_ROOT_DIR}/bin/salome/runSalome.py --terminal --modules=MED,CALCULATOR,COMPONENT --standalone=registry,study,moduleCatalog,cppContainer,pyContainer,supervContainer --killall +# ${KERNEL_ROOT_DIR}/bin/salome/runSalome.py --terminal --modules=MED,CALCULATOR,COMPONENT --standalone=registry,study,moduleCatalog,cppContainer,pyContainer --killall diff --git a/bin/runSalome.py b/bin/runSalome.py index fe97b68ff..c56da55cf 100755 --- a/bin/runSalome.py +++ b/bin/runSalome.py @@ -1,31 +1,41 @@ #!/usr/bin/env python -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + +## @package runSalome +# \brief Module that provides services to launch SALOME +# + import sys, os, string, glob, time, pickle, re import orbmodule import setenv -from server import * from launchConfigureParser import verbose -#process_id = {} move to server.py +from server import process_id, Server + +if sys.platform == "win32": + SEP = ";" +else: + SEP = ":" # ----------------------------------------------------------------------------- @@ -75,15 +85,17 @@ def kill_salome(args): # ----------------------------------------------------------------------------- # -# Definition des classes d'objets pour le lancement des Server CORBA +# Class definitions to launch CORBA Servers # class InterpServer(Server): def __init__(self,args): self.args=args - env_ld_library_path=['env', 'LD_LIBRARY_PATH=' + os.getenv("LD_LIBRARY_PATH")] - self.CMD=['xterm', '-e']+ env_ld_library_path + ['python'] - #self.CMD=['xterm', '-e', 'python'] + if sys.platform != "win32": + env_ld_library_path=['env', 'LD_LIBRARY_PATH=' + os.getenv("LD_LIBRARY_PATH")] + self.CMD=['xterm', '-e']+ env_ld_library_path + ['python'] + else: + self.CMD=['cmd', '/c', 'start cmd.exe', '/K', 'python'] def run(self): global process_id @@ -99,13 +111,43 @@ class InterpServer(Server): # --- +def get_cata_path(list_modules,modules_root_dir): + """Build a list of catalog paths (cata_path) to initialize the ModuleCatalog server + """ + modules_cata={} + cata_path=[] + + for module in list_modules: + if modules_root_dir.has_key(module): + module_root_dir=modules_root_dir[module] + module_cata=module+"Catalog.xml" + cata_file=os.path.join(module_root_dir, "share",setenv.salome_subdir, "resources",module.lower(), module_cata) + + if os.path.exists(cata_file): + cata_path.append(cata_file) + modules_cata[module]=cata_file + else: + cata_file=os.path.join(module_root_dir, "share",setenv.salome_subdir, "resources", module_cata) + if os.path.exists(cata_file): + cata_path.append(cata_file) + modules_cata[module]=cata_file + + for path in os.getenv("SALOME_CATALOGS_PATH","").split(SEP): + if os.path.exists(path): + for cata_file in glob.glob(os.path.join(path,"*Catalog.xml")): + module_name= os.path.basename(cata_file)[:-11] + if not modules_cata.has_key(module_name): + cata_path.append(cata_file) + modules_cata[module_name]=cata_file + + return cata_path + + + class CatalogServer(Server): def __init__(self,args): self.args=args self.initArgs() - #if sys.platform == "win32": - # self.SCMD1=[os.environ["KERNEL_ROOT_DIR"] + "/win32/" + os.environ["BIN_ENV"] + "/" + 'SALOME_ModuleCatalog_Server' + ".exe",'-common'] - #else: self.SCMD1=['SALOME_ModuleCatalog_Server','-common'] self.SCMD2=[] home_dir=os.getenv('HOME') @@ -113,37 +155,16 @@ class CatalogServer(Server): self.SCMD2=['-personal',os.path.join(home_dir,'Salome/resources/CatalogModulePersonnel.xml')] def setpath(self,modules_list,modules_root_dir): - cata_path=[] list_modules = modules_list[:] list_modules.reverse() if self.args["gui"] : list_modules = ["KERNEL", "GUI"] + list_modules else : list_modules = ["KERNEL"] + list_modules - for module in list_modules: - if modules_root_dir.has_key(module): - module_root_dir=modules_root_dir[module] - module_cata=module+"Catalog.xml" - #print " ", module_cata - if os.path.exists(os.path.join(module_root_dir, - "share",setenv.salome_subdir, - "resources",module.lower(), - module_cata)): - cata_path.extend( - glob.glob(os.path.join(module_root_dir, - "share",setenv.salome_subdir, - "resources",module.lower(), - module_cata))) - else: - cata_path.extend( - glob.glob(os.path.join(module_root_dir, - "share",setenv.salome_subdir, - "resources", - module_cata))) - pass - pass - #self.CMD=self.SCMD1 + ['\"']+[string.join(cata_path,'\"::\"')] + ['\"'] + self.SCMD2 - self.CMD=self.SCMD1 + ['\"' + string.join(cata_path,'\"::\"') + '\"'] + self.SCMD2 + + cata_path=get_cata_path(list_modules,modules_root_dir) + + self.CMD=self.SCMD1 + ['"' + string.join(cata_path,'"::"') + '"'] + self.SCMD2 # --- @@ -190,17 +211,6 @@ class ContainerPYServer(Server): # --- -class ContainerSUPERVServer(Server): - def __init__(self,args): - self.args=args - self.initArgs() - # if sys.platform == "win32": -# self.CMD=[os.environ["KERNEL_ROOT_DIR"] + "/win32/" + os.environ["BIN_ENV"] + "/" + 'SALOME_Container' + ".exe",'SuperVisionContainer'] -# else: - self.CMD=['SALOME_Container','SuperVisionContainer'] - -# --- - class LoggerServer(Server): def __init__(self,args): self.args=args @@ -225,7 +235,7 @@ class LoggerServer(Server): # --- class SessionServer(Server): - def __init__(self,args): + def __init__(self,args,modules_list,modules_root_dir): self.args = args.copy() # Bug 11512 (Problems with runSalome --xterm on Mandrake and Debian Sarge) #self.args['xterm']=0 @@ -253,8 +263,6 @@ class SessionServer(Server): self.SCMD2+=['CPP'] if 'pyContainer' in self.args['standalone'] or 'pyContainer' in self.args['embedded']: self.SCMD2+=['PY'] - if 'supervContainer' in self.args['standalone']: - self.SCMD2+=['SUPERV'] if self.args['gui']: session_gui = True if self.args.has_key('session_gui'): @@ -274,40 +282,35 @@ class SessionServer(Server): if self.args.has_key('user_config'): self.SCMD2+=['--resources=%s'%self.args['user_config']] if self.args.has_key('modules'): - self.SCMD2+=['--modules (%s)'%":".join(self.args['modules'])] + list_modules = [] + #keep only modules with GUI + for m in modules_list: + if m not in modules_root_dir: + list_modules.insert(0,m) + else: + fr1 = os.path.join(modules_root_dir[m],"share","salome","resources",m.lower(),"SalomeApp.xml") + fr2 = os.path.join(modules_root_dir[m],"share","salome","resources","SalomeApp.xml") + if os.path.exists(fr1) or os.path.exists(fr2): + list_modules.insert(0,m) + list_modules.reverse() + self.SCMD2+=['--modules (%s)' % ":".join(list_modules)] + if self.args.has_key('pyscript') and len(self.args['pyscript']) > 0: self.SCMD2+=['--pyscript=%s'%(",".join(self.args['pyscript']))] def setpath(self,modules_list,modules_root_dir): - cata_path=[] list_modules = modules_list[:] list_modules.reverse() if self.args["gui"] : list_modules = ["KERNEL", "GUI"] + list_modules else : list_modules = ["KERNEL"] + list_modules - for module in list_modules: - module_root_dir=modules_root_dir[module] - module_cata=module+"Catalog.xml" - #print " ", module_cata - if os.path.exists(os.path.join(module_root_dir, - "share",setenv.salome_subdir, - "resources",module.lower(), - module_cata)): - cata_path.extend( - glob.glob(os.path.join(module_root_dir,"share", - setenv.salome_subdir,"resources", - module.lower(),module_cata))) - else: - cata_path.extend( - glob.glob(os.path.join(module_root_dir,"share", - setenv.salome_subdir,"resources", - module_cata))) - pass + + cata_path=get_cata_path(list_modules,modules_root_dir) + if (self.args["gui"]) & ('moduleCatalog' in self.args['embedded']): #Use '::' instead ":" because drive path with "D:\" is invalid on windows platform - #self.CMD=self.SCMD1 + ['\"']+[string.join(cata_path,'\"::\"')] + ['\"'] + self.SCMD2 - self.CMD=self.SCMD1 + ['\"' + string.join(cata_path,'\"::\"') + '\"'] + self.SCMD2 + self.CMD=self.SCMD1 + ['"' + string.join(cata_path,'"::"') + '"'] + self.SCMD2 else: self.CMD=self.SCMD1 + self.SCMD2 if self.args.has_key('test'): @@ -315,7 +318,7 @@ class SessionServer(Server): elif self.args.has_key('play'): self.CMD+=['-play'] + self.args['play'] - if self.args["gdb_session"]: + if self.args["gdb_session"] or self.args["ddd_session"]: f = open(".gdbinit4salome", "w") f.write("set args ") args = " ".join(self.CMD[1:]) @@ -324,7 +327,20 @@ class SessionServer(Server): f.write(args) f.write("\n") f.close() - self.CMD = ["xterm", "-e", "gdb", "--command=.gdbinit4salome", self.CMD[0]] + if self.args["ddd_session"]: + self.CMD = ["ddd", "--command=.gdbinit4salome", self.CMD[0]] + elif self.args["gdb_session"]: + self.CMD = ["xterm", "-e", "gdb", "--command=.gdbinit4salome", self.CMD[0]] + pass + pass + + if self.args["valgrind_session"]: + l = ["valgrind"] + val = os.getenv("VALGRIND_OPTIONS") + if val: + l += val.split() + pass + self.CMD = l + self.CMD pass # --- @@ -347,35 +363,20 @@ class LauncherServer(Server): self.SCMD2+=['--with','SALOMEDS','(',')'] if 'cppContainer' in self.args['embedded']: self.SCMD2+=['--with','Container','(','FactoryServer',')'] - + def setpath(self,modules_list,modules_root_dir): - cata_path=[] list_modules = modules_list[:] list_modules.reverse() if self.args["gui"] : - list_modules = ["GUI"] + list_modules - for module in ["KERNEL"] + list_modules: - if modules_root_dir.has_key(module): - module_root_dir=modules_root_dir[module] - module_cata=module+"Catalog.xml" - #print " ", module_cata - if os.path.exists(os.path.join(module_root_dir, - "share",setenv.salome_subdir, - "resources",module.lower(), - module_cata)): - cata_path.extend( - glob.glob(os.path.join(module_root_dir,"share", - setenv.salome_subdir,"resources", - module.lower(),module_cata))) - else: - cata_path.extend( - glob.glob(os.path.join(module_root_dir,"share", - setenv.salome_subdir,"resources", - module_cata))) - pass - pass + list_modules = ["KERNEL", "GUI"] + list_modules + else : + list_modules = ["KERNEL"] + list_modules + + cata_path=get_cata_path(list_modules,modules_root_dir) + if (self.args["gui"]) & ('moduleCatalog' in self.args['embedded']): - self.CMD=self.SCMD1 + [string.join(cata_path,':')] + self.SCMD2 + #Use '::' instead ":" because drive path with "D:\" is invalid on windows platform + self.CMD=self.SCMD1 + ['"' + string.join(cata_path,'"::"') + '"'] + self.SCMD2 else: self.CMD=self.SCMD1 + self.SCMD2 @@ -396,15 +397,12 @@ class NotifyServer(Server): # # ----------------------------------------------------------------------------- -def startGUI(): +def startGUI(clt): """Salome Session Graphic User Interface activation""" import Engines import SALOME import SALOMEDS import SALOME_ModuleCatalog - reload(Engines) - reload(SALOME) - reload(SALOMEDS) import SALOME_Session_idl session=clt.waitNS("/Kernel/Session",SALOME.Session) session.GetInterface() @@ -418,25 +416,83 @@ def startSalome(args, modules_list, modules_root_dir): if verbose(): print "startSalome ", args # - # Initialisation ORB et Naming Service + # Set server launch command + # + if args.has_key('server_launch_mode'): + Server.set_server_launch_mode(args['server_launch_mode']) + + # + # Wake up session option + # + if args['wake_up_session']: + if "OMNIORB_CONFIG" not in os.environ: + from salome_utils import generateFileName + home = os.getenv("HOME") + appli = os.getenv("APPLI") + kwargs={} + if appli is not None: + home = os.path.join(os.path.realpath(home), appli,"USERS") + kwargs["with_username"] = True + pass + last_running_config = generateFileName(home, prefix="omniORB", + suffix="last", + extension="cfg", + hidden=True, + **kwargs) + os.environ['OMNIORB_CONFIG'] = last_running_config + pass + pass + + # + # Initialisation ORB and Naming Service # clt=orbmodule.client(args) + + # + # Wake up session option + # + if args['wake_up_session']: + import Engines + import SALOME + import SALOMEDS + import SALOME_ModuleCatalog + import SALOME_Session_idl + session = clt.waitNS("/Kernel/Session",SALOME.Session) + status = session.GetStatSession() + if status.activeGUI: + from salome_utils import getPortNumber + port = getPortNumber() + msg = "Warning :" + msg += "\n" + msg += "Session GUI for port number %s is already active."%(port) + msg += "\n" + msg += "If you which to wake up another session," + msg += "\n" + msg += "please use variable OMNIORB_CONFIG" + msg += "\n" + msg += "to get the correct session object in naming service." + sys.stdout.write(msg+"\n") + sys.stdout.flush() + return clt + session.GetInterface() + args["session_object"] = session + return clt + # Save Naming service port name into # the file args["ns_port_log_file"] if args.has_key('ns_port_log_file'): home = os.environ['HOME'] appli= os.environ.get("APPLI") if appli is not None: - home='%s/%s'%(home,appli) - pass - file_name= '%s/%s'%(home, args["ns_port_log_file"]) + home = os.path.join(os.path.realpath(home), appli, "USERS") + file_name = os.path.join(home, args["ns_port_log_file"]) f = open(file_name, "w") f.write(os.environ['NSPORT']) f.close() - # (non obligatoire) Lancement Logger Server - # et attente de sa disponibilite dans le naming service + # Launch Logger Server (optional) + # and wait until it is registered in naming service # if args['logger']: @@ -453,17 +509,17 @@ def startSalome(args, modules_list, modules_root_dir): myServer=NotifyServer(args,modules_root_dir) myServer.run() - # Lancement Session Server (to show splash ASAP) + # Launch Session Server (to show splash ASAP) # if args["gui"]: - mySessionServ = SessionServer(args) + mySessionServ = SessionServer(args,args['modules'],modules_root_dir) mySessionServ.setpath(modules_list,modules_root_dir) mySessionServ.run() # - # Lancement Registry Server, - # attente de la disponibilite du Registry dans le Naming Service + # Launch Registry Server, + # and wait until it is registered in naming service # if ('registry' not in args['embedded']) | (args["gui"] == 0) : @@ -475,10 +531,9 @@ def startSalome(args, modules_list, modules_root_dir): clt.waitNSPID("/Registry",myServer.PID) # - # Lancement Catalog Server, - # attente de la disponibilite du Catalog Server dans le Naming Service + # Launch Catalog Server, + # and wait until it is registered in naming service # - if ('moduleCatalog' not in args['embedded']) | (args["gui"] == 0): cataServer=CatalogServer(args) @@ -491,8 +546,8 @@ def startSalome(args, modules_list, modules_root_dir): clt.waitNSPID("/Kernel/ModulCatalog",cataServer.PID,SALOME_ModuleCatalog.ModuleCatalog) # - # Lancement SalomeDS Server, - # attente de la disponibilite du SalomeDS dans le Naming Service + # Launch SalomeDS Server, + # and wait until it is registered in naming service # #print "ARGS = ",args @@ -506,7 +561,7 @@ def startSalome(args, modules_list, modules_root_dir): clt.waitNSPID("/myStudyManager",myServer.PID) # - # Lancement LauncherServer + # Launch LauncherServer # myCmServer = LauncherServer(args) @@ -532,8 +587,8 @@ def startSalome(args, modules_list, modules_root_dir): theComputer = getShortHostName() # - # Lancement Container C++ local, - # attente de la disponibilite du Container C++ local dans le Naming Service + # Launch local C++ Container (FactoryServer), + # and wait until it is registered in naming service # if ('cppContainer' in args['standalone']) | (args["gui"] == 0) : @@ -545,9 +600,8 @@ def startSalome(args, modules_list, modules_root_dir): clt.waitNSPID("/Containers/" + theComputer + "/FactoryServer",myServer.PID) # - # Lancement Container Python local, - # attente de la disponibilite du Container Python local - # dans le Naming Service + # Launch local Python Container (FactoryServerPy), + # and wait until it is registered in naming service # if 'pyContainer' in args['standalone']: @@ -559,21 +613,7 @@ def startSalome(args, modules_list, modules_root_dir): clt.waitNSPID("/Containers/" + theComputer + "/FactoryServerPy",myServer.PID) # - # Lancement Container Supervision local, - # attente de la disponibilite du Container Supervision local - # dans le Naming Service - # - - if 'supervContainer' in args['standalone']: - myServer=ContainerSUPERVServer(args) - myServer.run() - if sys.platform == "win32": - clt.waitNS("/Containers/" + theComputer + "/SuperVisionContainer") - else: - clt.waitNSPID("/Containers/" + theComputer + "/SuperVisionContainer",myServer.PID) - - # - # Attente de la disponibilite du Session Server dans le Naming Service + # Wait until Session Server is registered in naming service # if args["gui"]: @@ -582,14 +622,12 @@ def startSalome(args, modules_list, modules_root_dir): import SALOME import SALOMEDS import SALOME_ModuleCatalog - reload(Engines) - reload(SALOME) - reload(SALOMEDS) import SALOME_Session_idl if sys.platform == "win32": session=clt.waitNS("/Kernel/Session",SALOME.Session) else: session=clt.waitNSPID("/Kernel/Session",mySessionServ.PID,SALOME.Session) + args["session_object"] = session end_time = os.times() if verbose(): print print "Start SALOME, elapsed time : %5.1f seconds"% (end_time[4] @@ -614,17 +652,20 @@ def startSalome(args, modules_list, modules_root_dir): print "-- to get an external python interpreter:runSalome --interp=1" print "-------------------------------------------------------------" - print "additional external python interpreters: ", nbaddi + if verbose(): print "additional external python interpreters: ", nbaddi if nbaddi: for i in range(nbaddi): print "i=",i anInterp=InterpServer(args) anInterp.run() - # set PYTHONINSPECT variable + # set PYTHONINSPECT variable (python interpreter in interactive mode) if args['pinter']: os.environ["PYTHONINSPECT"]="1" - import readline + try: + import readline + except ImportError: + pass return clt @@ -673,7 +714,7 @@ def useSalome(args, modules_list, modules_root_dir): """%filedict # - # Impression arborescence Naming Service + # Print Naming Service directory list # if clt != None: @@ -683,32 +724,69 @@ def useSalome(args, modules_list, modules_root_dir): clt.showNS() pass + if not args['gui'] or not args['session_gui']: + if args['shutdown_servers']: + class __utils__(object): + def __init__(self, port): + self.port = port + import killSalomeWithPort + self.killSalomeWithPort = killSalomeWithPort + return + def __del__(self): + self.killSalomeWithPort.killMyPort(self.port) + return + pass + args['shutdown_servers'] = __utils__(args['port']) + pass + pass + # run python scripts, passed via --execute option toimport = [] if args.has_key('pyscript'): if args.has_key('gui') and args.has_key('session_gui'): if not args['gui'] or not args['session_gui']: toimport = args['pyscript'] - i = 0 - while i < len( toimport ) : - if toimport[ i ] == 'killall': + + for srcname in toimport : + if srcname == 'killall': clt.showNS() killAllPorts() - import sys sys.exit(0) else: - scrname = toimport[ i ] - if len(scrname) > 2 and (len(scrname) - string.rfind(scrname, ".py") == 3): - print 'executing',scrname - doexec = 'execfile(\"%s\")'%scrname - exec doexec + if os.path.isabs(srcname): + if os.path.exists(srcname): + execScript(srcname) + elif os.path.exists(srcname+".py"): + execScript(srcname+".py") + else: + print "Can't execute file %s" % srcname + pass else: - print 'importing',scrname - doimport = 'import ' + scrname - exec doimport - i = i + 1 - + found = False + for path in [os.getcwd()] + sys.path: + if os.path.exists(os.path.join(path,srcname)): + execScript(os.path.join(path,srcname)) + found = True + break + elif os.path.exists(os.path.join(path,srcname+".py")): + execScript(os.path.join(path,srcname+".py")) + found = True + break + pass + if not found: + print "Can't execute file %s" % srcname + pass + pass + pass + pass + pass return clt + +def execScript(script_path): + print 'executing', script_path + sys.path.insert(0, os.path.dirname(script_path)) + execfile(script_path,globals()) + del sys.path[0] # ----------------------------------------------------------------------------- @@ -748,7 +826,7 @@ def searchFreePort(args, save_config=1): os.remove( tmp_file ); # def portIsUsed(port, data): - regObj = re.compile( "tcp.*:([0-9]+).*:.*listen", re.IGNORECASE ); + regObj = re.compile( ".*tcp.*:([0-9]+).*:.*listen", re.IGNORECASE ); for item in data: try: p = int(regObj.match(item).group(1)) @@ -773,7 +851,7 @@ def searchFreePort(args, save_config=1): appli = os.getenv("APPLI") kwargs={} if appli is not None: - home = os.path.join(home, appli,"USERS") + home = os.path.join(os.path.realpath(home), appli,"USERS") kwargs["with_username"]=True # omniorb_config = generateFileName(home, prefix="omniORB", @@ -830,7 +908,7 @@ def searchFreePort(args, save_config=1): msg = "\n" msg += "Can't find a free port to launch omniNames\n" msg += "Try to kill the running servers and then launch SALOME again.\n" - raise msg + raise RuntimeError, msg NSPORT=NSPORT+1 pass return @@ -852,7 +930,6 @@ def no_main(): def main(): """Salome launch as a main application""" - import sys from salome_utils import getHostName print "runSalome running on %s" % getHostName() args, modules_list, modules_root_dir = setenv.get_config() @@ -860,7 +937,15 @@ def main(): save_config = True if args.has_key('save_config'): save_config = args['save_config'] - searchFreePort(args, save_config) + # -- + test = True + if args['wake_up_session']: + test = False + pass + if test: + searchFreePort(args, save_config) + pass + # -- #setenv.main() setenv.set_env(args, modules_list, modules_root_dir) clt = useSalome(args, modules_list, modules_root_dir) @@ -868,6 +953,93 @@ def main(): # ----------------------------------------------------------------------------- +def foreGround(clt, args): + # -- + if "session_object" not in args: + return + session = args["session_object"] + # -- + # Wait until gui is arrived + # tmax = nbtot * dt + # -- + gui_detected = False + dt = 0.1 + nbtot = 100 + nb = 0 + while 1: + try: + status = session.GetStatSession() + gui_detected = status.activeGUI + except: + pass + if gui_detected: + break + from time import sleep + sleep(dt) + nb += 1 + if nb == nbtot: + break + pass + # -- + if not gui_detected: + return + # -- + from salome_utils import getPortNumber + port = getPortNumber() + # -- + server = Server({}) + if sys.platform == "win32": + server.CMD = [os.getenv("PYTHONBIN"), "-m", "killSalomeWithPort", "--spy", "%s"%(os.getpid()), "%s"%(port)] + else: + server.CMD = ["killSalomeWithPort.py", "--spy", "%s"%(os.getpid()), "%s"%(port)] + server.run() + # os.system("killSalomeWithPort.py --spy %s %s &"%(os.getpid(), port)) + # -- + dt = 1.0 + try: + while 1: + try: + status = session.GetStatSession() + assert status.activeGUI + except: + break + from time import sleep + sleep(dt) + pass + pass + except KeyboardInterrupt: + from killSalomeWithPort import killMyPort + killMyPort(port) + pass + return + +# ----------------------------------------------------------------------------- + if __name__ == "__main__": - import user - clt,args = main() + import user + clt,args = main() + # -- + test = args['gui'] and args['session_gui'] + test = test or args['wake_up_session'] + # -- + # The next test covers the --pinter option or var PYTHONINSPECT setted + # -- + test = test and not os.environ.get('PYTHONINSPECT') + # -- + # The next test covers the python -i $KERNEL_ROOT_DIR/bin/salome/runSalome.py case + # -- + try: + from ctypes import POINTER, c_int, cast, pythonapi + iflag_ptr = cast(pythonapi.Py_InteractiveFlag, POINTER(c_int)) + test = test and not iflag_ptr.contents.value + except: + pass + # -- + test = test and os.getenv("SALOME_TEST_MODE", "0") != "1" + test = test and args['foreground'] + # -- + if test: + foreGround(clt, args) + pass + # -- + pass diff --git a/bin/salome.launch b/bin/salome.launch index 1b5bbdd1b..5c71df7ef 100644 --- a/bin/salome.launch +++ b/bin/salome.launch @@ -13,7 +13,6 @@ - @@ -26,6 +25,5 @@ pyContainer - supervContainer diff --git a/bin/salomeConsole.py b/bin/salomeConsole.py index 56c805c14..a8c4a60a4 100755 --- a/bin/salomeConsole.py +++ b/bin/salomeConsole.py @@ -1,25 +1,27 @@ #!/usr/bin/env python -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + import os import sys #------------------------------- diff --git a/bin/salome_session.py b/bin/salome_session.py index 9c648214d..d2ca5b094 100644 --- a/bin/salome_session.py +++ b/bin/salome_session.py @@ -1,24 +1,31 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + +## @package salome_session +# \brief Module that provides the SalomeSession object that helps to launch +# a SALOME script session +# + import os import sys import string @@ -62,7 +69,7 @@ def searchFreePort(): appli = os.getenv("APPLI") kwargs={} if appli is not None: - home = os.path.join(home, appli,"USERS") + home = os.path.join(os.path.realpath(home), appli,"USERS") kwargs["with_username"]=True omniorb_config = generateFileName(home, prefix="omniORB", extension="cfg", @@ -90,7 +97,7 @@ def searchFreePort(): msg = "" msg += "Can not find a free port to launch omniNames\n" msg += "Kill the running servers and try again.\n" - raise msg + raise RuntimeError, msg NSPORT = NSPORT+1 pass os.environ['NSHOST'] = hostname @@ -99,6 +106,7 @@ def searchFreePort(): class SalomeSession(object): + """Salome session launcher""" import runSalome import killSalomeWithPort import killSalome diff --git a/bin/salome_utils.py b/bin/salome_utils.py index ab9c0669c..95e87f42c 100644 --- a/bin/salome_utils.py +++ b/bin/salome_utils.py @@ -1,36 +1,35 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# 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 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. # -# 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 # -# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # --- # File : salome_utils.py # Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) # --- -# -""" -Set of utility functions used by SALOME python scripts. -""" + +## @package salome_utils +# \brief Set of utility functions used by SALOME python scripts. # # Exported functions # + __all__ = [ 'getORBcfgInfo', 'getHostFromORBcfg', @@ -41,7 +40,10 @@ __all__ = [ 'getAppName', 'getPortNumber', 'getTmpDir', + 'getHomeDir', 'generateFileName', + 'makeTmpDir', + 'uniteFiles', ] # --- @@ -180,12 +182,12 @@ def getAppName(): # --- -def getPortNumber(): +def getPortNumber(use_default=True): """ Get current naming server port number: 1. try NSPORT environment variable 1. if fails, try to parse config file defined by OMNIORB_CONFIG environment variable - 2. if fails, return 2809 as default port number + 2. if fails, return 2809 as default port number (if use_default is True) or None (id use_default is False) """ import os try: @@ -194,8 +196,33 @@ def getPortNumber(): pass port = getPortFromORBcfg() if port is not None: return port - return 2809 # '2809' is default port number + if use_default: return 2809 # '2809' is default port number + return None + +# --- +def getHomeDir(): + """ + Get home directory. + """ + import os, sys + if sys.platform == "win32": + # for Windows the home directory is detected in the following way: + # 1. try USERPROFILE env variable + # 2. try combination of HOMEDRIVE and HOMEPATH env variables + # 3. try HOME env variable + # TODO: on Windows, also GetUserProfileDirectoryW() system function might be used + dir = os.getenv("USERPROFILE") + if not dir and os.getenv("HOMEDRIVE") and os.getenv("HOMEPATH"): + dir = os.path.join(os.getenv("HOMEDRIVE"), os.getenv("HOMEPATH")) + if not dir: + dir = os.getenv("HOME") + pass + else: + # for Linux: use HOME variable + dir = os.getenv("HOME") + pass + return dir # --- def getTmpDir(): @@ -345,3 +372,118 @@ def generateFileName( dir, prefix = None, suffix = None, extension = None, pass pass return os.path.normpath(name) + +# --- + +def makeTmpDir( path, mode=0777 ): + """ + Make temporary directory with the specified path. + If the directory exists then clear its contents. + + Parameters: + - path : absolute path to the directory to be created. + - mode : access mode + """ + import os + if os.path.exists( path ): + import sys + if sys.platform == "win32": + os.system( "rmdir /S /Q " + '"' + path + '"' ) + os.system( "mkdir " + '"' + path + '"' ) + else: + os.system( "rm -rf " + path + "/*" ) + else: + dirs = path.split("/") + shift1 = shift2 = 0 + if not dirs[0]: shift1 = 1 + if dirs[-1]: shift2 = 1 + for i in range(1+shift1,len(dirs)+shift2): + p = "/".join(dirs[:i]) + try: + os.mkdir(p, mode) + os.chmod(p, mode) + except: + pass + +# --- + +def uniteFiles( src_file, dest_file ): + """ + Unite contents of the source file with contents of the destination file + and put result of the uniting to the destination file. + If the destination file does not exist then the source file is simply + copied to its path. + + Parameters: + - src_file : absolute path to the source file + - dest_file : absolute path to the destination file + """ + import os + + if not os.path.exists( src_file ): + return + pass + + if os.path.exists( dest_file ): + # add a symbol of new line to contents of the destination file (just in case) + dest = open( dest_file, 'r' ) + dest_lines = dest.readlines() + dest.close() + + dest_lines.append( "\n" ) + + dest = open( dest_file, 'w' ) + dest.writelines( dest_lines ) + dest.close() + + import sys + if sys.platform == "win32": + command = "type " + '"' + src_file + '"' + " >> " + '"' + dest_file + '"' + else: + command = "cat " + src_file + " >> " + dest_file + pass + pass + else: + import sys + if sys.platform == "win32": + command = "copy " + '"' + src_file + '"' + " " + '"' + dest_file + '"' + " > nul" + else: + command = "cp " + src_file + " " + dest_file + pass + pass + + os.system( command ) + +# -- + +_verbose = None + +def verbose(): + """ + Get verbosity level. Default verbosity level is specified via the environment variable + SALOME_VERBOSE, e.g.: + [bash %] export SALOME_VERBOSE=1 + The function setVerbose() can be used to change verbosity level explicitly. + """ + global _verbose + # verbose has already been called + if _verbose is not None: + return _verbose + # first time + try: + from os import getenv + _verbose = int(getenv('SALOME_VERBOSE')) + except: + _verbose = 0 + pass + # + return _verbose + +def setVerbose(level): + """ + Change verbosity level. The function verbose() can be used to get current verbosity level. + """ + global _verbose + _verbose = level + return + diff --git a/bin/server.py b/bin/server.py index a5588c6b6..0d804a3ba 100755 --- a/bin/server.py +++ b/bin/server.py @@ -1,26 +1,29 @@ #!/usr/bin/env python -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + import os, sys, string +from salome_utils import getHostName process_id = {} # ----------------------------------------------------------------------------- @@ -30,27 +33,39 @@ process_id = {} class Server: """Generic class for CORBA server launch""" + + server_launch_mode = "daemon" def initArgs(self): self.PID=None self.CMD=[] self.ARGS=[] if self.args.get('xterm'): + if sys.platform != "win32": self.ARGS=['xterm', '-iconic', '-sb', '-sl', '500', '-hold'] + else: + self.ARGS=['cmd', '/c', 'start cmd.exe', '/K'] def __init__(self,args): self.args=args self.initArgs() + @staticmethod + def set_server_launch_mode(mode): + if mode == "daemon" or mode == "fork": + Server.server_launch_mode = mode + else: + raise Exception("Unsupported server launch mode: %s" % mode) def run(self): global process_id myargs=self.ARGS if self.args.get('xterm'): # (Debian) send LD_LIBRARY_PATH to children shells (xterm) - env_ld_library_path=['env', 'LD_LIBRARY_PATH=' - + os.getenv("LD_LIBRARY_PATH")] - myargs = myargs +['-T']+self.CMD[:1]+['-e'] + env_ld_library_path + if sys.platform != "win32": + env_ld_library_path=['env', 'LD_LIBRARY_PATH=' + + os.getenv("LD_LIBRARY_PATH")] + myargs = myargs +['-T']+self.CMD[:1]+['-e'] + env_ld_library_path command = myargs + self.CMD #print "command = ", command if sys.platform == "win32": @@ -60,8 +75,9 @@ class Server: #pid = win32pm.spawnpid( cmd_str ) pid = win32pm.spawnpid( string.join(command, " "), '-nc' ) #pid = win32pm.spawnpid( string.join(command, " ") ) - else: - #pid = os.spawnvp(os.P_NOWAIT, command[0], command) + elif Server.server_launch_mode == "fork": + pid = os.spawnvp(os.P_NOWAIT, command[0], command) + else: # Server launch mode is daemon pid=self.daemonize(command) if pid is not None: #store process pid if it really exists @@ -121,5 +137,7 @@ class Server: try: os.execvp(args[0], args) except OSError, e: - print >>sys.stderr, "(%s) launch failed: %d (%s)" % (args[0],e.errno, e.strerror) + if args[0] != "notifd": + print >>sys.stderr, "(%s) launch failed: %d (%s)" % (args[0],e.errno, e.strerror) + pass os._exit(127) diff --git a/bin/setenv.py b/bin/setenv.py index 4eeff394b..44ac6dbe7 100755 --- a/bin/setenv.py +++ b/bin/setenv.py @@ -1,25 +1,27 @@ #!/usr/bin/env python -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + import sys, os, string, glob, time, pickle import orbmodule from launchConfigureParser import verbose @@ -142,10 +144,6 @@ def get_config(silent=False): modules_list.remove("GUI") pass - if "SUPERV" in modules_list and not 'supervContainer' in args['standalone']: - args['standalone'].append("supervContainer") - pass - return args, modules_list, modules_root_dir # ----------------------------------------------------------------------------- @@ -153,6 +151,17 @@ def get_config(silent=False): def set_env(args, modules_list, modules_root_dir, silent=False): """Add to the PATH-variables modules specific paths""" + import os + from salome_utils import getTmpDir, generateFileName, makeTmpDir, getPortNumber + + # create temporary directory for environment files needed by modules from the list + port = getPortNumber(False) + if port: + tmp_dir = getTmpDir() + env_dir = generateFileName(tmp_dir, prefix="env", with_port=True) + makeTmpDir(env_dir) + pass + python_version="python%d.%d" % sys.version_info[0:2] modules_root_dir_list = [] if os.getenv('SALOME_BATCH') == None: @@ -185,50 +194,31 @@ def set_env(args, modules_list, modules_root_dir, silent=False): python_version,"site-packages", salome_subdir), "PYTHONPATH") + import platform + if platform.machine() == "x86_64": + add_path(os.path.join(module_root_dir,"lib64", + python_version,"site-packages", + salome_subdir), + "PYTHONPATH") + pass add_path(os.path.join(module_root_dir,get_lib_dir(), python_version,"site-packages", salome_subdir, "shared_modules"), "PYTHONPATH") - - # set environment for SMESH plugins - if module == "SMESH" : - os.environ["SMESH_MeshersList"]="StdMeshers" - if not os.environ.has_key("SALOME_StdMeshersResources"): - os.environ["SALOME_StdMeshersResources"] \ - = modules_root_dir["SMESH"]+"/share/"+salome_subdir+"/resources/smesh" + + # set environment by modules from the list + if port: + try: + mod=__import__(module.lower()+"_setenv") + mod.set_env(args) pass - if args.has_key("SMESH_plugins"): - for plugin in args["SMESH_plugins"]: - plugin_root = "" - if os.environ.has_key(plugin+"_ROOT_DIR"): - plugin_root = os.environ[plugin+"_ROOT_DIR"] - else: - # workaround to avoid modifications of existing environment - if os.environ.has_key(plugin.upper()+"_ROOT_DIR"): - plugin_root = os.environ[plugin.upper()+"_ROOT_DIR"] - pass - pass - if plugin_root != "": - os.environ["SMESH_MeshersList"] \ - = os.environ["SMESH_MeshersList"]+":"+plugin - if not os.environ.has_key("SALOME_"+plugin+"Resources"): - os.environ["SALOME_"+plugin+"Resources"] \ - = plugin_root+"/share/"+salome_subdir+"/resources/"+plugin.lower() - add_path(os.path.join(plugin_root,get_lib_dir(),python_version, "site-packages",salome_subdir), "PYTHONPATH") - add_path(os.path.join(plugin_root,get_lib_dir(),salome_subdir), "PYTHONPATH") - - if sys.platform == "win32": - add_path(os.path.join(plugin_root,get_lib_dir(),salome_subdir), "PATH") - else: - add_path(os.path.join(plugin_root,get_lib_dir(),salome_subdir), "LD_LIBRARY_PATH") - add_path(os.path.join(plugin_root,"bin",salome_subdir), "PYTHONPATH") - add_path(os.path.join(plugin_root,"bin",salome_subdir), "PATH") - pass - pass - pass - pass - + except: + pass + pass + pass + pass + if sys.platform == 'win32': os.environ["SALOMEPATH"]=";".join(modules_root_dir_list) else: @@ -243,35 +233,12 @@ def set_env(args, modules_list, modules_root_dir, silent=False): if args['logger']: os.environ["SALOME_trace"]="with_logger" - # set environment for SUPERV module - os.environ["ENABLE_MACRO_NODE"]="1" # set resources variables if not yet set - # Done now by launchConfigureParser.py - #if os.getenv("GUI_ROOT_DIR"): - #if not os.getenv("SalomeAppConfig"): os.environ["SalomeAppConfig"] = os.getenv("GUI_ROOT_DIR") + "/share/salome/resources/gui" os.environ["CSF_SALOMEDS_ResourcesDefaults"] \ = os.path.join(modules_root_dir["KERNEL"],"share", salome_subdir,"resources","kernel") - if "GEOM" in modules_list: - if verbose() and not silent: print "GEOM OCAF Resources" - - # set CSF_PluginDefaults variable only if it is not customized - # by the user - - if not os.getenv("CSF_PluginDefaults"): - os.environ["CSF_PluginDefaults"] \ - = os.path.join(modules_root_dir["GEOM"],"share", - salome_subdir,"resources","geom") - os.environ["CSF_GEOMDS_ResourcesDefaults"] \ - = os.path.join(modules_root_dir["GEOM"],"share", - salome_subdir,"resources","geom") - if verbose() and not silent: print "GEOM Shape Healing Resources" - os.environ["CSF_ShHealingDefaults"] \ - = os.path.join(modules_root_dir["GEOM"],"share", - salome_subdir,"resources","geom") - # ----------------------------------------------------------------------------- def main(silent=False): diff --git a/bin/showNS.py b/bin/showNS.py index 48783acd8..fe55c053d 100755 --- a/bin/showNS.py +++ b/bin/showNS.py @@ -1,25 +1,31 @@ #!/usr/bin/env python -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + +## \file showNS.py +# \brief display the contents of %SALOME naming service +# + import orbmodule clt=orbmodule.client() diff --git a/bin/shutdownSalome.py b/bin/shutdownSalome.py index f4d54ea9c..b7d319696 100755 --- a/bin/shutdownSalome.py +++ b/bin/shutdownSalome.py @@ -1,29 +1,35 @@ #!/usr/bin/env python -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + +## \file shutdownSalome.py +# shutdown all %SALOME servers and naming service +# + import time -import salome -salome.salome_init() -salome.lcc.shutdownServers() +import salome_kernel +orb, lcc, naming_service, cm = salome_kernel.salome_kernel_init() +lcc.shutdownServers() #give some time to shutdown to complete time.sleep(1) -salome.LifeCycleCORBA.killOmniNames() +salome_kernel.LifeCycleCORBA.killOmniNames() diff --git a/bin/virtual_salome.py b/bin/virtual_salome.py index 971ab8c39..6caf19299 100644 --- a/bin/virtual_salome.py +++ b/bin/virtual_salome.py @@ -1,25 +1,27 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -"""Create a virtual Salome installation + +"""Create a virtual Salome installation Based on a script created by Ian Bicking. @@ -54,6 +56,9 @@ def mkdir(path): def symlink(src, dest): """Create a link if it does not exist""" if not os.path.exists(dest): + if os.path.lexists(dest): + print "Do not create symlink %s. It already exists but it's broken" % dest + return if verbose: print 'Creating symlink %s' % dest pass @@ -95,8 +100,8 @@ def link_module(options): if not options.module: print "Option module is mandatory" - return - + return + module_dir=os.path.abspath(options.module) if not os.path.exists(module_dir): print "Module %s does not exist" % module_dir @@ -131,7 +136,7 @@ def link_module(options): module_lib_py_dir=os.path.join(module_dir,get_lib_dir(),pyversio,'site-packages','salome') module_lib_py_shared_dir=os.path.join(module_dir,get_lib_dir(),pyversio, 'site-packages','salome','shared_modules') - module_share_dir=os.path.join(module_dir,'share','salome','resources') + module_share_dir=os.path.join(module_dir,'share','salome') module_doc_gui_dir=os.path.join(module_dir,'doc','salome','gui') module_doc_tui_dir=os.path.join(module_dir,'doc','salome','tui') module_doc_dir=os.path.join(module_dir,'doc','salome') @@ -145,7 +150,7 @@ def link_module(options): lib_py_dir=os.path.join(home_dir,'lib',pyversio,'site-packages','salome') lib_py_shared_dir=os.path.join(home_dir,'lib',pyversio, 'site-packages','salome','shared_modules') - share_dir=os.path.join(home_dir,'share','salome','resources') + share_dir=os.path.join(home_dir,'share','salome') doc_gui_dir=os.path.join(home_dir,'doc','salome','gui') doc_tui_dir=os.path.join(home_dir,'doc','salome','tui') doc_dir=os.path.join(home_dir,'doc','salome') @@ -162,7 +167,7 @@ def link_module(options): rmtree(doc_dir) rmtree(sharedoc_dir) pass - + #directory bin/salome : create it and link content if os.path.exists(module_bin_dir): mkdir(bin_dir) @@ -173,8 +178,8 @@ def link_module(options): else: if verbose: print module_bin_dir, " doesn't exist" - pass - + pass + #directory idl/salome : create it and link content if os.path.exists(module_idl_dir): mkdir(idl_dir) @@ -194,26 +199,36 @@ def link_module(options): else: if verbose: print module_lib_dir, " doesn't exist" - pass - + pass + #directory lib/pyversio/site-packages/salome : create it and link content if not os.path.exists(module_lib_py_dir): print "Python directory %s does not exist" % module_lib_py_dir else: + # Specific action for the package salome + module_lib_pypkg_dir=os.path.join(module_lib_py_dir,"salome") + lib_pypkg_dir=os.path.join(lib_py_dir,"salome") + mkdir(lib_pypkg_dir) mkdir(lib_py_shared_dir) for fn in os.listdir(module_lib_py_dir): if fn == "shared_modules": continue + if fn == "salome": continue symlink(os.path.join(module_lib_py_dir, fn), os.path.join(lib_py_dir, fn)) - pass + pass if os.path.exists(module_lib_py_shared_dir): for fn in os.listdir(module_lib_py_shared_dir): symlink(os.path.join(module_lib_py_shared_dir, fn), os.path.join(lib_py_shared_dir, fn)) pass pass + if os.path.exists(module_lib_pypkg_dir): + for fn in os.listdir(module_lib_pypkg_dir): + symlink(os.path.join(module_lib_pypkg_dir, fn), os.path.join(lib_pypkg_dir, fn)) + pass + pass else: if verbose: print module_lib_py_shared_dir, " doesn't exist" - pass + pass #directory share/doc/salome (KERNEL doc) : create it and link content if os.path.exists(module_sharedoc_dir): @@ -232,7 +247,7 @@ def link_module(options): symlink(os.path.join(module_sharedoc_gui_dir, fn), os.path.join(sharedoc_gui_dir, fn)) pass pass - + #directory share/doc/salome/tui : create it and link content if os.path.exists(module_sharedoc_tui_dir): mkdir(sharedoc_tui_dir) @@ -241,15 +256,20 @@ def link_module(options): pass pass - #directory share/salome/resources : create it and link content + #directory share/salome : create it and link content if os.path.exists(module_share_dir): mkdir(share_dir) for fn in os.listdir(module_share_dir): - symlink(os.path.join(module_share_dir, fn), os.path.join(share_dir, fn)) - pass - pass + if fn in ["resources","plugins"] : + # Create the directory and then link the content + mkdir(os.path.join(share_dir,fn)) + for ffn in os.listdir(os.path.join(module_share_dir,fn)): + symlink(os.path.join(module_share_dir, fn, ffn), os.path.join(share_dir,fn, ffn)) + else: + #other directories (not resources) + symlink(os.path.join(module_share_dir, fn), os.path.join(share_dir, fn)) else: - print "resources directory %s does not exist" % module_share_dir + print "share/salome directory %s does not exist" % module_share_dir pass #html files in doc/salome directory @@ -261,7 +281,7 @@ def link_module(options): symlink(os.path.join(module_doc_dir, fn), os.path.join(doc_dir, fn)) pass pass - + #directory doc/salome/gui : create it and link content if os.path.exists(module_doc_gui_dir): mkdir(doc_gui_dir) @@ -269,7 +289,7 @@ def link_module(options): symlink(os.path.join(module_doc_gui_dir, fn), os.path.join(doc_gui_dir, fn)) pass pass - + #directory doc/salome/tui : create it and link content if os.path.exists(module_doc_tui_dir): mkdir(doc_tui_dir) @@ -293,7 +313,7 @@ Typical use is: parser.add_option('--prefix', dest="prefix", default='.', help="The base directory to install to (default .)") - parser.add_option('--module', dest="module", + parser.add_option('--module', dest="module", help="The module directory to install in (mandatory)") parser.add_option('--clear', dest='clear', action='store_true', @@ -302,7 +322,7 @@ Typical use is: options, args = parser.parse_args() link_module(options) pass - + # ----------------------------------------------------------------------------- if __name__ == '__main__': diff --git a/bin/waitContainers.py b/bin/waitContainers.py index dd8ba9b3b..e56466f88 100755 --- a/bin/waitContainers.py +++ b/bin/waitContainers.py @@ -1,25 +1,33 @@ #!/usr/bin/env python -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + +## \file waitContainers.py +# \brief command to wait until containers are launched +# +# the container names (in naming service) are passed on the command line as in : +# waitContainers.py FactoryServer + import sys import time import orbmodule diff --git a/bin/waitNS.py b/bin/waitNS.py index 03ea33f23..53ed4d79e 100755 --- a/bin/waitNS.py +++ b/bin/waitNS.py @@ -1,25 +1,31 @@ #!/usr/bin/env python -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + +## \file waitNS.py +# \brief command to wait until module catalog server is launched +# + import orbmodule clt=orbmodule.client() clt.waitNS("/Kernel/ModulCatalog") diff --git a/bin/waitNS.sh b/bin/waitNS.sh index 249f17d18..b35ab3c28 100755 --- a/bin/waitNS.sh +++ b/bin/waitNS.sh @@ -1,28 +1,29 @@ #! /bin/sh -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + status=1 while [ $status -ne 0 ]; do - ls $HOME/$APPLI/USERS/.omniORB_${USER}_last.cfg >& /dev/null + ls $HOME/$APPLI/USERS/.omniORB_${USER}_last.cfg 2> /dev/null status=$? sleep 1 echo -n "#" diff --git a/build_cmake b/build_cmake index 5fc650ad6..dea5c393c 100755 --- a/build_cmake +++ b/build_cmake @@ -1,24 +1,21 @@ #!/bin/sh -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# 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 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. # -# 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 # -# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # CURRENT_DIR=`pwd` diff --git a/build_cmake.bat b/build_cmake.bat index 83f104802..cca1337ba 100644 --- a/build_cmake.bat +++ b/build_cmake.bat @@ -1,2 +1,20 @@ - +@REM Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +@REM +@REM This library is free software; you can redistribute it and/or +@REM modify it under the terms of the GNU Lesser General Public +@REM License as published by the Free Software Foundation; either +@REM version 2.1 of the License. +@REM +@REM This library is distributed in the hope that it will be useful, +@REM but WITHOUT ANY WARRANTY; without even the implied warranty of +@REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +@REM Lesser General Public License for more details. +@REM +@REM You should have received a copy of the GNU Lesser General Public +@REM License along with this library; if not, write to the Free Software +@REM Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +@REM +@REM See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +@REM + %PYTHONBIN% salome_adm\cmake_files\am2cmake.py --kernel diff --git a/build_configure b/build_configure index 53cfcb15a..06747b6be 100755 --- a/build_configure +++ b/build_configure @@ -1,25 +1,26 @@ #!/bin/sh -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # ==================================================================== # This script is just here to illustrate the procedure for preparing # the configure process. It creates configuration files (ex: diff --git a/clean_configure b/clean_configure index 9fe037eae..c23953522 100755 --- a/clean_configure +++ b/clean_configure @@ -1,25 +1,26 @@ #!/bin/sh -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + rm -rf autom4te.cache aclocal.m4 configure make_config find . -name "*~" -print -exec rm {} \; find . -name "*.pyc" -print -exec rm {} \; @@ -32,6 +33,7 @@ cd $libdir # Files created by libtoolize rm -f config.guess config.sub ltmain.sh rm -f mdate-sh texinfo.tex +rm -f lt~obsolete.m4 ltversion.m4 ltsugar.m4 ltoptions.m4 libtool.m4 # Files created by automake rm -rf install-sh missing compile depcomp py-compile cd $here diff --git a/configure.ac b/configure.ac index 740153160..719c66a7d 100644 --- a/configure.ac +++ b/configure.ac @@ -1,41 +1,44 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # ================================================================ # Process this file with autoconf to produce a configure script # ================================================================ #AC_PREREQ(2.59) # -AC_INIT([Salome2 Project], [5.1.0], [paul.rascle@edf.fr], [SalomeKERNEL]) +AC_INIT([Salome2 Project], [6.5.0], [paul.rascle@edf.fr], [SalomeKERNEL]) # AC_CONFIG_AUX_DIR defines an alternative directory where to find the auxiliary # scripts such as config.guess, install-sh, ... AC_CONFIG_AUX_DIR(salome_adm/unix/config_files) AC_CANONICAL_HOST AC_CANONICAL_TARGET -AM_INIT_AUTOMAKE([tar-pax]) +AM_INIT_AUTOMAKE([tar-pax -Wno-portability]) #AC_CONFIG_HEADER([config.h]) XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'` AC_SUBST(XVERSION) +VERSION_DEV=1 +AC_SUBST(VERSION_DEV) # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.) MODULE_NAME=kernel @@ -86,11 +89,15 @@ AC_ARG_ENABLE(corba_gen, esac],[corba_gen=true]) AM_CONDITIONAL(CORBA_GEN, test x$corba_gen = xtrue) -# ---- option to build only launcher, resources manager and batch classes +# ---- option to build only launcher and resources manager AC_ARG_WITH(onlylauncher, - --with-onlylauncher, - WITHONLYLAUNCHER="yes",WITHONLYLAUNCHER="no") -AM_CONDITIONAL(WITHONLYLAUNCHER, test x$WITHONLYLAUNCHER = xyes) + [AC_HELP_STRING([--with-onlylauncher],[Build only launcher and resources manager [default=no]])], + [], + [with_onlylauncher="no"]) +AM_CONDITIONAL(WITHONLYLAUNCHER, test x$with_onlylauncher = xyes) +if test "$with_onlylauncher" != "yes"; then + AC_DEFINE([HAVE_SALOME_CONFIG], [], [True if SALOMEconfig.h file is used]) +fi # ---------------------------------------------------------------------------- @@ -117,6 +124,7 @@ echo --------------------------------------------- echo AC_PROG_MAKE_SET AC_PROG_INSTALL +AC_LOCAL_INSTALL echo echo --------------------------------------------- @@ -126,6 +134,15 @@ echo # production.m4 AC_ENABLE_DEBUG(no) AC_ENABLE_PRODUCTION(no) +AC_ENABLE_MPI_SEQ_CONTAINER(no) + +# _GBO_SALOME_PYTHON_PACKAGING_ +if test "X$enable_debug" = "Xyes"; then + PYLOGLEVEL=DEBUG +else + PYLOGLEVEL=WARNING +fi +AC_SUBST(PYLOGLEVEL) echo echo --------------------------------------------- @@ -148,6 +165,7 @@ echo cc_ok=no AC_PROG_CC AC_PROG_CXX +AC_LANG(C++) AC_CXX_WARNINGS AC_CXX_TEMPLATE_OPTIONS AC_DEPEND_FLAG @@ -163,8 +181,6 @@ AC_CHECK_LIB(rt,nanosleep) dnl add library libm : AC_CHECK_LIB(m,ceil) -# _CS_gbo We should add all dependent libraries - AC_CXX_USE_STD_IOSTREAM AC_CXX_HAVE_SSTREAM @@ -172,6 +188,14 @@ AC_CXX_HAVE_SSTREAM # Testing linker AC_LINKER_OPTIONS +echo +echo --------------------------------------------- +echo testing Fortran INTEGER size for CALCIUM +echo --------------------------------------------- +echo + +CHECK_CALCIUM + echo echo --------------------------------------------- echo testing threads @@ -194,8 +218,9 @@ echo testing swig echo --------------------------------------------- echo -dnl _CS_gbo We should use here a variable given from the CHECK_PYTHON -AM_PATH_PYTHON(2.3) +# _GBO_ This definition is required. Without this definition, the pythondir +# would not be defined. The version doesn't matter. +AM_PATH_PYTHON(2.4) CHECK_SWIG echo @@ -206,7 +231,15 @@ echo CHECK_LIBXML -if test x$WITHONLYLAUNCHER = xno; then +echo +echo --------------------------------------------- +echo checking if MPI is requested by user +echo --------------------------------------------- +echo + +CHECK_MPI + +if test x$with_onlylauncher = xno; then echo echo --------------------------------------------- echo testing HDF5 @@ -285,14 +318,6 @@ echo testing parallel products echo ============================================================ echo -echo -echo --------------------------------------------- -echo checking if MPI is requested by user -echo --------------------------------------------- -echo - -CHECK_MPI - echo echo --------------------------------------------- echo checking if PaCO++ is requested by user @@ -335,53 +360,6 @@ echo testing optionnal products echo ============================================================ echo -echo -echo --------------------------------------------- -echo Testing Batch -echo --------------------------------------------- -echo - -dnl Several batch systems (OpenPBS, LSF, ...) can be operated using -dnl the Batch classes library integrated in the KERNEL module. The -dnl checking process tests here the presence of underlying batch -dnl softwares. If none is detected, the KERNEL is declared to be -dnl "without batch". - -echo testing OpenPBS -echo --------------- -openpbs_ok=no -CHECK_OPENPBS -dnl openpbs_ok is set to yes by CHECK_OPENPBS - -echo testing LSF -echo ----------- -lsf_ok=no -CHECK_LSF -dnl lsf_ok is set to yes by CHECK_LSF -echo lsf = $lsf_ok - -echo testing Local batch system -echo -------------------------- -localbatch_ok=no -CHECK_LOCAL -dnl localbatch_ok is set to yes by CHECK_LOCAL - -WITH_BATCH=no -test x$openpbs_ok = xyes || test x$lsf_ok = xyes || test x$localbatch_ok = xyes && WITH_BATCH=yes - -AC_ARG_ENABLE(batch, - [AC_HELP_STRING([--enable-batch],[Batch [default=yes]])], - [case "${enableval}" in - yes) test x$openpbs_ok = xyes || test x$lsf_ok = xyes || test x$localbatch_ok = xyes && WITH_BATCH=yes;; - no) WITH_BATCH=no ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-batch) ;; - esac],[test x$openpbs_ok = xyes || test x$lsf_ok = xyes || test x$localbatch_ok = xyes && WITH_BATCH=yes]) - -echo Batch mode = $WITH_BATCH - -AC_SUBST(WITH_BATCH) -AM_CONDITIONAL(WITH_BATCH, [test x"$WITH_BATCH" = xyes]) - echo echo ---------------------------------------------- echo testing CPPUNIT only required for unit testing @@ -389,6 +367,15 @@ echo ---------------------------------------------- echo CHECK_CPPUNIT +echo +echo -------------------------------------------------------------- +echo Testing libBatch only required for batch functions in Launcher +echo -------------------------------------------------------------- +echo + +CHECK_LIBBATCH +AM_CONDITIONAL(WITH_LIBBATCH, [test x"$libbatch_ok" = xyes]) + echo echo ============================================================ echo testing products required only for documentation generation @@ -403,6 +390,16 @@ echo CHECK_HTML_GENERATORS +# Additional conditional to avoid compilation of non-portable code +AM_CONDITIONAL(WINDOWS, [ test ]) + +echo +echo --------------------------------------------- +echo testing sphinx +echo --------------------------------------------- +echo +CHECK_SPHINX + echo echo ============================================================ echo Summary @@ -439,7 +436,7 @@ function check_fatal_error { # -------------------------------------- -if test x$WITHONLYLAUNCHER = xno; then +if test x$with_onlylauncher = xno; then if test x$corba_gen = xtrue; then basic_mandatory_products="cc_ok threads_ok python_ok swig_ok hdf5_ok libxml_ok" else @@ -454,7 +451,7 @@ summary $basic_mandatory_products check_fatal_error $basic_mandatory_products echo -if test x$WITHONLYLAUNCHER = xno; then +if test x$with_onlylauncher = xno; then corba_mandatory_products="omniORB_ok omniORBpy_ok boost_ok" if test x$corba_gen = xtrue; then echo --- CORBA mandatory products - default configuration: @@ -462,13 +459,6 @@ if test x$WITHONLYLAUNCHER = xno; then check_fatal_error $corba_mandatory_products else echo --- CORBA products not required - option --disable-corba-gen - if test x"$WITH_BATCH" = xyes; then - echo --- BATCH mode mandatory products - default configuration: - summary "python_ok" - check_fatal_error "python_ok" - else - echo --- Python not required - option --enable-batch=no - fi fi fi echo @@ -478,20 +468,25 @@ echo --- Kernel parallel extensions: summary $parallel_products echo -optional_products="cppunit_ok openpbs_ok lsf_ok numpy_ok" +optional_products="cppunit_ok numpy_ok libbatch_ok" echo --- Optional products: echo [" These products are optional because the KERNEL functions"] echo [" using them are built only if the products are detected."] summary $optional_products echo +if test x$libbatch_ok = xno; then + echo [" Warning: Batch functions will not be available in"] + echo [" Salome Launcher because they require libBatch."] + echo +fi -htmldoc_products="doxygen_ok graphviz_ok rst2html_ok" +htmldoc_products="doxygen_ok graphviz_ok rst2html_ok sphinx_ok" echo --- Html documentation products: only required for doc production summary $htmldoc_products echo -if test x$WITHONLYLAUNCHER = xno; then +if test x$with_onlylauncher = xno; then echo echo "Default ORB : $DEFAULT_ORB" echo @@ -520,83 +515,106 @@ echo generating Makefiles and configure files echo --------------------------------------------- echo +AC_HACK_LIBTOOL +AC_CONFIG_COMMANDS([hack_libtool],[ +sed -i "s%^CC=\"\(.*\)\"%hack_libtool (){ \n\ + $(pwd)/hack_libtool \1 \"\$[@]\" \n\ +}\n\ +CC=\"hack_libtool\"%g" libtool +sed -i "s%\(\s*\)for searchdir in \$newlib_search_path \$lib_search_path \$sys_lib_search_path \$shlib_search_path; do%\1searchdirs=\"\$newlib_search_path \$lib_search_path \$sys_lib_search_path \$shlib_search_path\"\n\1for searchdir in \$searchdirs; do%g" libtool +sed -i "s%\(\s*\)searchdirs=\"\$newlib_search_path \$lib_search_path \(.*\)\"%\1searchdirs=\"\$newlib_search_path \$lib_search_path\"\n\1sss_beg=\"\"\n\1sss_end=\"\2\"%g" libtool +sed -i "s%\(\s*\)\(for searchdir in \$searchdirs; do\)%\1for sss in \$searchdirs; do\n\1 if ! test -d \$sss; then continue; fi\n\1 ssss=\$(cd \$sss; pwd)\n\1 if test \"\$ssss\" != \"\" \&\& test -d \$ssss; then\n\1 case \$ssss in\n\1 /usr/lib | /usr/lib64 ) ;;\n\1 * ) sss_beg=\"\$sss_beg \$ssss\" ;;\n\1 esac\n\1 fi\n\1done\n\1searchdirs=\"\$sss_beg \$sss_end\"\n\1\2%g" libtool +],[]) + # This list is initiated using autoscan and must be updated manually # when adding a new file .in to manage. When you execute # autoscan, the Makefile list is generated in the output file configure.scan. # This could be helpfull to update de configuration. AC_OUTPUT([ \ - ./KERNEL_version.h \ - ./salome_adm/unix/SALOMEconfig.ref \ - ./salome_adm/Makefile \ - ./salome_adm/cmake_files/Makefile \ - ./salome_adm/unix/Makefile \ - ./salome_adm/unix/config_files/Makefile \ - Makefile \ - ./bin/Makefile \ - ./bin/VERSION \ - ./doc/Makefile \ - ./doc/salome/Makefile \ - ./doc/salome/tui/Makefile \ - ./doc/salome/tui/INPUT/doxyuser:./doc/salome/tui/KERNEL/doxyuser.in \ - ./doc/salome/tui/INPUT/doxydev:./doc/salome/tui/KERNEL/doxydev.in \ - ./doc/salome/tui/INPUT/sources/static/tree.js:./doc/salome/tui/KERNEL/sources/static/tree.js.in \ - ./idl/Makefile \ - ./resources/Makefile \ - ./resources/KERNELCatalog.xml \ - ./resources/CatalogResources.xml \ - ./src/Makefile \ - ./src/Basics/Makefile \ - ./src/Basics/Test/Makefile \ - ./src/Batch/Makefile \ - ./src/Batch_SWIG/Makefile \ - ./src/Communication/Makefile \ - ./src/Communication_SWIG/Makefile \ - ./src/Container/Makefile \ - ./src/ParallelContainer/Makefile \ - ./src/DF/Makefile \ - ./src/DSC/Makefile \ - ./src/DSC/DSC_Basic/Makefile \ - ./src/DSC/DSC_User/Makefile \ - ./src/DSC/DSC_User/Basic/Makefile \ - ./src/DSC/DSC_User/Datastream/Makefile \ - ./src/DSC/DSC_User/Datastream/Palm/Makefile \ - ./src/DSC/DSC_User/Datastream/Calcium/Makefile \ - ./src/DSC/ParallelDSC/Makefile \ - ./src/DSC/DSC_Python/Makefile \ - ./src/GenericObj/Makefile \ - ./src/HDFPersist/Makefile \ - ./src/KERNEL_PY/Makefile \ - ./src/Launcher/Makefile \ - ./src/LifeCycleCORBA/Makefile \ - ./src/LifeCycleCORBA/Test/Makefile \ - ./src/LifeCycleCORBA_SWIG/Makefile \ - ./src/LifeCycleCORBA_SWIG/Test/Makefile \ - ./src/Logger/Makefile \ - ./src/Logger/Test/Makefile \ - ./src/ModuleCatalog/Makefile \ - ./src/ModuleGenerator/Makefile \ - ./src/ModuleGenerator/testIDLparser \ - ./src/MPIContainer/Makefile \ - ./src/NamingService/Makefile \ - ./src/NamingService/Test/Makefile \ - ./src/Notification/Makefile \ - ./src/NOTIFICATION_SWIG/Makefile \ - ./src/Registry/Makefile \ - ./src/ResourcesManager/Makefile \ - ./src/SALOMEDS/Makefile \ - ./src/SALOMEDS/Test/Makefile \ - ./src/SALOMEDSClient/Makefile \ - ./src/SALOMEDSImpl/Makefile \ - ./src/SALOMEDSImpl/Test/Makefile \ - ./src/SALOMELocalTrace/Makefile \ - ./src/SALOMELocalTrace/Test/Makefile \ - ./src/SALOMETraceCollector/Makefile \ - ./src/SALOMETraceCollector/Test/Makefile \ - ./src/TestContainer/Makefile \ - ./src/TestMPIContainer/Makefile \ - ./src/TOOLSDS/Makefile \ - ./src/UnitTests/Makefile \ - ./src/Utils/Makefile \ - ./src/Utils/Test/Makefile \ + KERNEL_version.h \ + salome_adm/unix/SALOMEconfig.ref \ + salome_adm/Makefile \ + salome_adm/cmake_files/Makefile \ + salome_adm/unix/Makefile \ + salome_adm/unix/config_files/Makefile \ + Makefile \ + bin/Makefile \ + bin/appliskel/Makefile \ + bin/VERSION \ + doc/Makefile \ + doc/docutils/conf.py \ + doc/salome/Makefile \ + doc/salome/tui/Makefile \ + doc/salome/tui/doxyfile \ + doc/salome/tui/static/header.html \ + doc/salome/gui/Makefile \ + doc/salome/gui/doxyfile \ + doc/salome/gui/static/header.html \ + doc/docutils/Makefile \ + idl/Makefile \ + idl/Calcium_Ports.idl \ + resources/Makefile \ + resources/KERNELCatalog.xml \ + resources/CatalogResources.xml \ + src/Makefile \ + src/Basics/Makefile \ + src/Basics/Test/Makefile \ + src/Communication/Makefile \ + src/Communication_SWIG/Makefile \ + src/Container/Makefile \ + src/ParallelContainer/Makefile \ + src/DF/Makefile \ + src/DSC/Makefile \ + src/DSC/DSC_Basic/Makefile \ + src/DSC/DSC_User/Makefile \ + src/DSC/DSC_User/Basic/Makefile \ + src/DSC/DSC_User/Datastream/Makefile \ + src/DSC/DSC_User/Datastream/Palm/Makefile \ + src/DSC/DSC_User/Datastream/Calcium/Makefile \ + src/DSC/DSC_User/Datastream/Calcium/calcium_integer_port_uses.hxx \ + src/DSC/DSC_User/Datastream/Calcium/CalciumProvidesPort.hxx \ + src/DSC/DSC_User/Datastream/Calcium/CalciumFortranInt.h \ + src/DSC/ParallelDSC/Makefile \ + src/DSC/DSC_Python/Makefile \ + src/GenericObj/Makefile \ + src/HDFPersist/Makefile \ + src/KERNEL_PY/Makefile \ + src/KERNEL_PY/kernel/Makefile \ + src/KERNEL_PY/kernel/kernelpy_autotest.sh \ + src/KERNEL_PY/kernel/logconfig.py \ + src/KERNEL_PY/kernel/parametric/Makefile \ + src/Launcher/Makefile \ + src/LifeCycleCORBA/Makefile \ + src/LifeCycleCORBA/Test/Makefile \ + src/LifeCycleCORBA_SWIG/Makefile \ + src/LifeCycleCORBA_SWIG/Test/Makefile \ + src/Logger/Makefile \ + src/Logger/Test/Makefile \ + src/ModuleCatalog/Makefile \ + src/ModuleGenerator/Makefile \ + src/ModuleGenerator/testIDLparser \ + src/MPIContainer/Makefile \ + src/NamingService/Makefile \ + src/NamingService/Test/Makefile \ + src/Notification/Makefile \ + src/NOTIFICATION_SWIG/Makefile \ + src/Registry/Makefile \ + src/ResourcesManager/Makefile \ + src/SALOMEDS/Makefile \ + src/SALOMEDS/Test/Makefile \ + src/SALOMEDSClient/Makefile \ + src/SALOMEDSImpl/Makefile \ + src/SALOMEDSImpl/Test/Makefile \ + src/SALOMELocalTrace/Makefile \ + src/SALOMELocalTrace/Test/Makefile \ + src/SALOMETraceCollector/Makefile \ + src/SALOMETraceCollector/Test/Makefile \ + src/TestContainer/Makefile \ + src/TestMPIContainer/Makefile \ + src/TOOLSDS/Makefile \ + src/UnitTests/Makefile \ + src/Utils/Makefile \ + src/Utils/Test/Makefile \ + src/KernelHelpers/Makefile \ + src/KernelHelpers/Test/Makefile \ ]) - diff --git a/doc/Makefile.am b/doc/Makefile.am index d8d42009a..2cdd838a3 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,55 +1,37 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # -* Makefile *- # Author : Paul RASCLE (EDF) # Date : 06/02/2006 -# $Header$ # -include $(top_srcdir)/salome_adm/unix/make_common_starter.am - -SUBDIRS = salome -# if RST2HTML_IS_OK -# DOC_FILES = \ -# index.html \ -# UnitTests.html \ -# SALOME_Application.html \ -# INSTALL.html \ -# kernel_resources.html \ -# KERNEL_Services.html -# CSS_FILE = rst.css -# endif - -nodist_doc_DATA = $(DOC_FILES) +include $(top_srcdir)/salome_adm/unix/make_common_starter.am -EXTRA_DIST=$(DOC_FILES:%.html=%.txt) $(CSS_FILE) +SUBDIRS = salome docutils -# Building html from restructured text files -STYLESHEET=$(CSS_FILE) -RST2HTML=@RST2HTML@ -RSTOPTS=--output-encoding=latin1 --stylesheet=$(STYLESHEET) +EXTRA_DIST = configuration_examples README.cluster-CCRT -%.html: %.txt - $(RST2HTML) $(RSTOPTS) $< $@ +docs: usr_docs usr_docs: (cd salome && $(MAKE) $(AM_MAKEFLAGS) usr_docs) diff --git a/doc/README.cluster-CCRT b/doc/README.cluster-CCRT index 1c93650c5..270e9a43b 100644 --- a/doc/README.cluster-CCRT +++ b/doc/README.cluster-CCRT @@ -1,3 +1,23 @@ +Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE + +Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS + +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 OverView ======== diff --git a/doc/configuration_examples/example_prerequis.sh b/doc/configuration_examples/example_prerequis.sh index a6f258892..3d79433a5 100644 --- a/doc/configuration_examples/example_prerequis.sh +++ b/doc/configuration_examples/example_prerequis.sh @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # --- SALOME Required packages : configuration example,SALOME2 V2_2_0 # --- all path are relative to ${INSTALLROOT} # diff --git a/doc/docutils/Makefile.am b/doc/docutils/Makefile.am new file mode 100644 index 000000000..9764cb727 --- /dev/null +++ b/doc/docutils/Makefile.am @@ -0,0 +1,96 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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 +# + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +pydocdir = $(docdir)/tui/KERNEL/docutils + +RSTFILES = \ + index.rst \ + overview.rst \ + docapi.rst \ + salomepypkg.rst \ + kernel.rst \ + parametric.rst + +EXTRA_DIST = archives $(RSTFILES) + +SPHINXOPTS = +SOURCEDIR = $(srcdir) +SPHINXBUILD = sphinx-build +PAPEROPT_a4 = -D latex_paper_size=a4 +ALLSPHINXOPTS = -d doctrees $(PAPEROPT_a4) $(SPHINXOPTS) $(SOURCEDIR) + +if WITH_PACO_PARALLEL +SPHINX_PYTHONPATH = $(prefix)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(prefix)/lib64/python$(PYTHON_VERSION)/site-packages/salome:$(prefix)/bin/salome:$(OMNIORB_ROOT)/lib/python$(PYTHON_VERSION)/site-packages:$(OMNIORB_ROOT)/lib64/python$(PYTHON_VERSION)/site-packages:$(PACOPATH)/lib/python$(PYTHON_VERSION):$(PACOPATH)/lib/python +else +SPHINX_PYTHONPATH = $(prefix)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(prefix)/lib64/python$(PYTHON_VERSION)/site-packages/salome:$(prefix)/bin/salome:$(OMNIORB_ROOT)/lib/python$(PYTHON_VERSION)/site-packages:$(OMNIORB_ROOT)/lib64/python$(PYTHON_VERSION)/site-packages +endif + +SPHINX_LD_LIBRARY_PATH = $(OMNIORB_ROOT)/lib + +.PHONY: latex + +if SPHINX_IS_OK + +html/index.html:$(RSTFILES) + mkdir -p html doctrees + PYTHONPATH=$(SPHINX_PYTHONPATH):${PYTHONPATH} \ + LD_LIBRARY_PATH=$(SPHINX_LD_LIBRARY_PATH):${LD_LIBRARY_PATH} \ + OMNIORB_CONFIG= \ + $(SPHINXBUILD) -c $(top_builddir)/doc/docutils -W -b html $(ALLSPHINXOPTS) html + @echo + @echo "Build finished. The HTML pages are in html." + +else + +html/index.html: + @echo "Documentation for Python package not built. Sphinx was not present at configure time." + +endif + +latex: + mkdir -p latex doctrees + PYTHONPATH=$(SPHINX_PYTHONPATH):${PYTHONPATH} \ + LD_LIBRARY_PATH=$(SPHINX_LD_LIBRARY_PATH):${LD_LIBRARY_PATH} \ + $(SPHINXBUILD) -c $(top_builddir)/doc/docutils -W -b latex $(ALLSPHINXOPTS) latex + @echo + @echo "Build finished; the LaTeX files are in latex." + @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ + "run these through (pdf)latex." + +install-data-local: html/index.html + test -z $(pydocdir) || mkdir -p $(DESTDIR)$(pydocdir) + if test -d "html"; then b=; else b="$(srcdir)/"; fi; \ + cp -rf $$b"html"/* $(pydocdir) ; \ + if test -f $$b"latex"/kernelpy.pdf; then cp -f $$b"latex"/kernelpy.pdf $(pydocdir) ; fi; + +uninstall-local: + -test -d $(pydocdir) && chmod -R +w $(pydocdir) && rm -rf $(pydocdir)/* + +clean-local: + -rm -rf html latex doctrees + if test -d "html"; then rm -rf html ; fi + +dist-hook: + -test -d html && cp -Rp html $(distdir) diff --git a/doc/INSTALL.txt b/doc/docutils/archives/INSTALL.txt similarity index 100% rename from doc/INSTALL.txt rename to doc/docutils/archives/INSTALL.txt diff --git a/doc/KERNEL_Services.txt b/doc/docutils/archives/KERNEL_Services.txt similarity index 100% rename from doc/KERNEL_Services.txt rename to doc/docutils/archives/KERNEL_Services.txt diff --git a/doc/SALOME_Application.txt b/doc/docutils/archives/SALOME_Application.txt similarity index 100% rename from doc/SALOME_Application.txt rename to doc/docutils/archives/SALOME_Application.txt diff --git a/doc/UnitTests.txt b/doc/docutils/archives/UnitTests.txt similarity index 97% rename from doc/UnitTests.txt rename to doc/docutils/archives/UnitTests.txt index 987db0ec1..f30f38202 100644 --- a/doc/UnitTests.txt +++ b/doc/docutils/archives/UnitTests.txt @@ -30,10 +30,6 @@ General structure of KERNEL_SRC KERNEL_SRC Some README files and configuration tools for build -KERNEL_SRC/adm_local - Part of the configuration files, other modules have a directory with the - same name. Not used in KERNEL. - KERNEL_SRC/bin Python and shell scripts used at run time. Kit to install a SALOME Application. diff --git a/doc/index.txt b/doc/docutils/archives/index.txt similarity index 100% rename from doc/index.txt rename to doc/docutils/archives/index.txt diff --git a/doc/kernel_resources.txt b/doc/docutils/archives/kernel_resources.txt similarity index 100% rename from doc/kernel_resources.txt rename to doc/docutils/archives/kernel_resources.txt diff --git a/doc/rst.css b/doc/docutils/archives/rst.css similarity index 100% rename from doc/rst.css rename to doc/docutils/archives/rst.css diff --git a/doc/txt2html.sh b/doc/docutils/archives/txt2html.sh similarity index 54% rename from doc/txt2html.sh rename to doc/docutils/archives/txt2html.sh index cfaff46ad..45db3d9bf 100755 --- a/doc/txt2html.sh +++ b/doc/docutils/archives/txt2html.sh @@ -1,25 +1,26 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +#!/bin/sh +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -#/bin/sh + # =================================================================== # This shell script is provided for generating the html files # from the txt files (restructured text) in the source directory. diff --git a/doc/userguide.txt b/doc/docutils/archives/userguide.txt similarity index 100% rename from doc/userguide.txt rename to doc/docutils/archives/userguide.txt diff --git a/doc/docutils/conf.py.in b/doc/docutils/conf.py.in new file mode 100644 index 000000000..cea4f5734 --- /dev/null +++ b/doc/docutils/conf.py.in @@ -0,0 +1,200 @@ +# -*- coding: iso-8859-1 -*- +# +# yacs documentation build configuration file, created by +# sphinx-quickstart on Fri Aug 29 09:57:25 2008. +# +# This file is execfile()d with the current directory set to its containing dir. +# +# The contents of this file are pickled, so don't put values in the namespace +# that aren't pickleable (module imports are okay, they're removed automatically). +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys, os + +# If your extensions are in another directory, add it here. If the directory +# is relative to the documentation root, use os.path.abspath to make it +# absolute, like shown here. +#sys.path.append(os.path.abspath('.')) + +# General configuration +# --------------------- + +# Add any Sphinx extension module names here, as strings. They can be extensions +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = ['sphinx.ext.autodoc'] + +# Uncomment the following line to build the links with Python documentation +# (you might need to set http_proxy environment variable for this to work) +#extensions += ['sphinx.ext.intersphinx'] + +# Intersphinx mapping to add links to modules and objects in the Python +# standard library documentation +intersphinx_mapping = {'http://docs.python.org': None} + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +source_encoding = 'utf-8' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = 'KERNEL python packages' +copyright = '2010 EDF R&D' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = '@VERSION@' +# The full version, including alpha/beta/rc tags. +release = '@VERSION@' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +language = 'en' + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of documents that shouldn't be included in the build. +#unused_docs = [] + +# List of directories, relative to source directory, that shouldn't be searched +# for source files. +exclude_trees = ['.build','ref','images','CVS','.svn'] + +# The reST default role (used for this markup: `text`) to use for all documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + + +# Options for HTML output +# ----------------------- + +# The theme to use for HTML and HTML Help pages. Major themes that come with +# Sphinx are currently 'default' and 'sphinxdoc'. +html_theme = 'default' +#html_theme = 'nature' +#html_theme = 'agogo' +#html_theme = 'sphinxdoc' +#html_theme = 'omadoc' + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = ['themes'] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +#html_static_path = ['_static'] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +html_use_modindex = False + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, the reST sources are included in the HTML build as _sources/. +html_copy_source = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = '' + +# Output file base name for HTML help builder. +htmlhelp_basename = 'kernelpydoc' + + +# Options for LaTeX output +# ------------------------ + +# The paper size ('letter' or 'a4'). +latex_paper_size = 'a4' + +# The font size ('10pt', '11pt' or '12pt'). +latex_font_size = '10pt' + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, document class [howto/manual]). +latex_documents = [ + ('index', 'kernelpy.tex', 'Documentation of the KERNEL python packages', 'EDF R\&D', 'manual') +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +latex_logo = '../salome/tui/images/head.png' + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = True + +# Additional stuff for the LaTeX preamble. +#latex_preamble = '' + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +latex_use_modindex = False diff --git a/doc/docutils/docapi.rst b/doc/docutils/docapi.rst new file mode 100644 index 000000000..fd36cbc19 --- /dev/null +++ b/doc/docutils/docapi.rst @@ -0,0 +1,14 @@ + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + Documentation of the programming interface (API) +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +This section describes the python modules of the +``salome.kernel`` python package. The main part is generated from the +code documentation included in source python files. + +.. toctree:: + :maxdepth: 3 + + kernel.rst + parametric.rst diff --git a/doc/docutils/index.rst b/doc/docutils/index.rst new file mode 100644 index 000000000..a0b8c3a32 --- /dev/null +++ b/doc/docutils/index.rst @@ -0,0 +1,22 @@ + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + Documentation of the KERNEL python packages +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +Main documentation +================== + +.. toctree:: + :maxdepth: 3 + + overview.rst + docapi.rst + + +Additional documentation +======================== + +.. toctree:: + :maxdepth: 3 + + salomepypkg.rst diff --git a/doc/docutils/kernel.rst b/doc/docutils/kernel.rst new file mode 100644 index 000000000..4b7327f92 --- /dev/null +++ b/doc/docutils/kernel.rst @@ -0,0 +1,81 @@ +:mod:`salome.kernel` -- Package containing the KERNEL python utilities +====================================================================== + +:mod:`deprecation` -- Indication of deprecated modules and functions +-------------------------------------------------------------------- + +.. automodule:: salome.kernel.deprecation + :members: + + +:mod:`termcolor` -- Display colored text in terminal +---------------------------------------------------- + +.. automodule:: salome.kernel.termcolor + :members: + :exclude-members: TEST_termcolor + + +:mod:`logger` -- Logging utility +-------------------------------- + +.. automodule:: salome.kernel.logger + +.. autoclass:: Logger + :members: + :show-inheritance: + +.. autoclass:: ExtLogger + :members: + :show-inheritance: + +:mod:`enumerate` -- Emulates a C-like enum for python +----------------------------------------------------- + +.. automodule:: salome.kernel.enumerate + :members: + +:mod:`uiexception` -- Exception for user error management +--------------------------------------------------------- + +.. automodule:: salome.kernel.uiexception + :members: + +:mod:`datamodeler` -- Helper for modeling user data +--------------------------------------------------- + +.. automodule:: salome.kernel.datamodeler + :members: + +.. automodule:: salome.kernel.testdata + :members: + +:mod:`diclookup` -- Smart dictionnary with key/value lookup +----------------------------------------------------------- + +.. automodule:: salome.kernel.diclookup + :members: + +:mod:`service` -- Helper for using SALOME kernel services +--------------------------------------------------------- + +.. automodule:: salome.kernel.services + :members: + +:mod:`studyedit` -- Study editor +-------------------------------- + +.. automodule:: salome.kernel.studyedit + :members: + +:mod:`unittester` -- Run very basic unit tests +---------------------------------------------- + +.. automodule:: salome.kernel.unittester + :members: + +:mod:`pyunittester` -- Simple wrapper of the pyunit framework +------------------------------------------------------------- + +.. automodule:: salome.kernel.pyunittester + :members: diff --git a/doc/docutils/overview.rst b/doc/docutils/overview.rst new file mode 100644 index 000000000..950792907 --- /dev/null +++ b/doc/docutils/overview.rst @@ -0,0 +1,47 @@ + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +General presentation of the KERNEL python package +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +The KERNEL python package essentially contains: + +* Helper functions to manipulate KERNEL objects from python. For + example, the ``studyedit.py`` module facilitates the + manipulation of components and items in SALOME study. +* General purpose functions for logging and other recurrent + stuff in python programming. + +Note that these functions either encapsulate the python programming +interface of KERNEL core (the CORBA or SWIG interfaces for example) or +extend existing utilities as the ``salome*.py`` modules. + +The functions are distributed in the python package +``salome.kernel``. For example, the usage of the study editor to +manipulate some objects can be done with a set of instructions as: + +.. code-block:: python + + from salome.kernel.studyedit import getStudyEditor + + studyEditor = getStudyEditor() # Get an editor for the current study + + myStudyComponent = studyEditor.findOrCreateComponent( + moduleName, + componentName, + componentIcon) + + myStudyItem = studyEditor.createItem( + myStudyComponent, + itemName, + comment = itemComment, + icon = itemIcon) + +The specification of the programming interface of this package is +detailed in the part :doc:`Documentation of the programming interface +(API)` of this documentation. + +.. note:: + The main package ``salome`` contains other sub-packages that are + distributed with the other SALOME modules. For example, the GEOM + module provides the python package ``salome.geom`` and SMESH the + package ``salome.smesh``. diff --git a/doc/docutils/parametric.rst b/doc/docutils/parametric.rst new file mode 100644 index 000000000..f868080f0 --- /dev/null +++ b/doc/docutils/parametric.rst @@ -0,0 +1,22 @@ +:mod:`salome.kernel.parametric` -- Package for parametric studies +================================================================= + +:mod:`study_exchange_vars` -- Handle Exchange Variables +------------------------------------------------------- + +.. automodule:: salome.kernel.parametric.study_exchange_vars + :members: + + +:mod:`compo_utils` -- Useful functions for SALOME components used in parametric studies +--------------------------------------------------------------------------------------- + +.. automodule:: salome.kernel.parametric.compo_utils + :members: + + +:mod:`pyscript_utils` -- Useful functions for Python scripts used in parametric studies +--------------------------------------------------------------------------------------- + +.. automodule:: salome.kernel.parametric.pyscript_utils + :members: diff --git a/doc/docutils/salomepypkg.rst b/doc/docutils/salomepypkg.rst new file mode 100644 index 000000000..c46063eb2 --- /dev/null +++ b/doc/docutils/salomepypkg.rst @@ -0,0 +1,270 @@ + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Complement A: Organizing the SALOME python functions in a packaged structure +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +This chapter contains the instruction notes to organise the python +files of SALOME in a packaged python structure. This is the first step +of the development process, whose goal is to validate the principles +and show a possible way. + +:Contacts: Guillaume Boulant, Christian Caremoli, Renaud Barate + +Objectives +========== + +The main idea is to import SALOME python functions by doing: + +.. code-block:: python + + from salome.kernel. import + +instead of: + +.. code-block:: python + + from import + +as it must be done up to now because of the flat organisation of +python files in the installation folders of SALOME modules. + +To reach this target, the files ``.py`` have to be +organised in a packaged python structure where the main package is +named ``salome``, and then sub-packages could be created for each +SALOME module: + +* ``salome.kernel``: for kernel python functions, embedded in the + KERNEL module +* ``salome.gui``: for gui python functions, embedded in the GUI module +* ``salome.geom``: for geom python functions, embedded in the GEOM + module +* and so on ... + +The motivations of this objective are twice: + +* Definitively prevent the risk of naming conflict between python + modules coming from different SALOME modules. Today, the developper + of a module has to take care of the names used in other modules to + choose a name. +* Integrate in SALOME some python modules initialy developed in the + context of domain specific SALOME applications (SALOME-MECA, + SALOME-CFD, OPENTURN, PANTHERE) and whose source files are organized + in a packaged python structure. + +The starting point then is a python library named ``nepal`` that +provides SALOME helper functions classified by modules +(KERNEL,GEOM,...) and organized in a packaged python structure: + +* ``salome.kernel``: helper functions for manipulating the SALOME + study and its components (SComponents and SObject). This provides + also general purpose utilities for logging and threading. +* ``salome.gui``: helper functions to manipulate the graphical + representation of studies and the general behavior of the graphical + interface. This provides also generic templates for implementing + dialog box with the MVC pattern. +* ``salome.geom``: essentially contains a function called + "visualization of structural elements". This is used by mechanical + ingeneers to create the 3D geometrical object corresponding to the + numerical model of a given structural element. +* ``salome.smesh``: to manipulated smesh data handled from the SObject + in the SALOME study. + +The target point is to have the ``salome.kernel`` part in the KERNEL +module, the ``salome.geom`` part in the GEOM module, and so on. And +with **no impact on SALOME scripts** that already exists (import salome, +and all other stuff should be imported and work as before). + + +Problems +======== + +To reach this target, we have to face two problems: + +* A naming conflict with the instruction ``import salome``. The result + is unpredictible because of the existance in the ``sys.path`` of + both a file ``salome.py`` and a package ``salome``. +* The dispatching of ``salome.*`` sub-packages in the different SALOME + modules. + +Naming conflict between ``salome.py`` module and ``salome`` package +------------------------------------------------------------------- + +The problem is solved by installing the ``salome.py`` file under the +name ``__init__.py`` in a folder named ``${salomepythondir}/salome``. + +By this operation, the ``${salomepythondir}/salome`` directory is +transformed in a python package and the instruction ``import salome`` +do the same things as before this modification, without any +modification of the ``sys.path``. + +Dispatching of ``salome.*`` sub-packages in different SALOME modules +-------------------------------------------------------------------- + +When we use a SALOME virtual application, the problem is naturally +solved by the fact that every sub-packages are virtually installed in +the same directory, the directory ``${salomepythondir}/salome`` +containing the file ``__init__.py``. + +Nevertheless, some people doesn't use the virtual application. To get +a robust configuration in any case, one can use the python namespace +pattern. This consists in creating a virtual python package that +aggregates all the sub-packages. + +Technically speaking, this consists in implementing in the file +``${salomepythondir}/salome/__init__.py`` (new version of +``salome.py``) a function that automatically extend the ``__path__`` +variable with sub-packages that can be found in SALOME modules +installation paths. The code looks something like that: + +.. code-block:: python + + import os, sys + + MATCH_ENDING_PATTERN="site-packages/salome" + + def extend_path(pname): + for dir in sys.path: + if not isinstance(dir, basestring) or not os.path.isdir(dir) or not dir.endswith(MATCH_ENDING_PATTERN): + continue + subdir = os.path.join(dir, pname) + # WARN: This may still add duplicate entries to path on + # case-insensitive filesystems + if os.path.isdir(subdir) and subdir not in __path__: + print "INFO - The directory %s is appended to sys.path" % subdir + __path__.append(subdir) + + extend_path(ROOT_PYTHONPACKAGE_NAME) + + +Adaptation of the ``apply_gen`` utility +---------------------------------------- + +Due to the specific above choices, the ``apply_gen`` utility must be +modified so that the sub-folder ``salome`` in ``${salomepythondir}`` +is not generated as a symbolic link any longer but as a real folder +containing symbolic links towards the module specific python +sub-packages (``kernel``, ``geom``, ``smesh``, ...) and to the single +file ``__init__.py`` provided by the KERNEL module. + +This adaptation can be done in the ``virtual_salome.py`` script. + + +What to do with already existing python files? +---------------------------------------------- + +Do nothing at this step, it works fine because the files are installed +in a path included in the ``sys.path``. + +In a future version, it should be nice to reverse all the python files +of the KERNEL library in this packaged structure. But this can't be +done without impact on existing python user scripts. + +Instructions +============ + +Instructions for creating the python packages +--------------------------------------------- + +Considering the elements described above, a procedure that works to +get the packaged python structure is: + +* Rename the file ``salome.py`` in ``__init__.py`` (and adapt the + Makefile.am). This is located in the source directory + ``src/KERNEL_PY``. +* Copy the sources files of the kernel part in the source directory + ``src/KERNEL_PY`` starting with a stage named ``kernel`` including + its own packaged structure (only python files and a file + ``__init__.py`` for now) +* Copy the sources files of the geom part in the source directory + ``src/GEOM_PY`` (to be created) of the GEOM module. In this case, we + copy the python files directly in the directory (no stage named + ``geom``, it's not required for source organisation, and will be + created only for installation by makefile). +* Apply the same procedure for every other SALOME modules (it concerns + only SMESH up to now). +* Apply the "namespace pattern" by implementing and invoking the + ``extend_path`` function in the newly created file ``__init__.py`` +* Adapt the ``apply_gen`` utility to take into account the finer + folder hierarchy in ``site-packages``. + +The naming convention for source folder is here the convention in +place in the KERNEL module: the source code of the python packages of +a SALOME module is located in the source directory +``/src/_PY``. + +Note also that all python files that were existing in the KERNEL +module are leaft untouched but the file ``salome.py``. + +Instructions for the associated documentation +--------------------------------------------- + +One special point for the documentation: + +* The documentation of the python package API is writen in rst + (restructured text) and generated form the source code with sphinx. +* The rst source files are located in the directory + ``/doc/docutils``. +* The html generated files are installed in the directory + ``/share/doc/salome/docutils`` but are not connected to + the in-line documentation of the SALOME associated module (menu help + of the SALOME application). + +Any suggestion on this point would be appreciated. + +TODO (by someone): + +* Move all files ``*.txt`` from the ``/doc`` folder to the + ``/doc/docutils`` folder and analyse what is still to date + and usefull. +* Integrate in this part the reference documentation of the ``salome`` + utility and all documentation associated to the launching process + (in particular virtual application) +* Connect this part of the documentation to the main part (doxygen + part). + + +Synthesis +--------- + +Finaly, here is a synthesis of modifications in source files. + +Files modified: + +* See the CVS patch files KERNEL.patch, GEOM.patch and SMESH.patch + (the only SALOME modules modified today). + +Files to be added: + +* KERNEL: file ``src/KERNEL_PY/__init__.py`` (``salome.py`` renamed) +* KERNEL: directory ``src/KERNEL_PY/kernel`` +* KERNEL: directory ``doc/docutils`` +* KERNEL: file ``salome_adm/unix/config_files/check_sphinx.m4`` +* GEOM : directory ``src/GEOM_PY`` +* GEOM : directory ``doc/docutils`` +* SMESH : directory ``src/SMESH_PY`` +* SMESH : directory ``doc/docutils`` + +Files to be delete: + +* file ``src/KERNEL_PY/salome.py`` + + +Tests and usage +=============== + +The instructions above provides you with a SALOME application whose +modules embed there dedicated python packages. This installation can +can be tested using some test use cases. For example, the +visualisation of structural elements (provided by the package +``salome.geom`` can be tested by: + +.. code-block:: python + + from salome.geom.structelem import TEST_StructuralElement + TEST_StructuralElement() + +This can be enter in the GUI python console or in a python interpreter +executed in a SALOME session. + +For more details, read the API documentation in +``/share/doc/salome/docutils``. diff --git a/doc/salome/Batch.texi b/doc/salome/Batch.texi deleted file mode 100755 index 817e5b996..000000000 --- a/doc/salome/Batch.texi +++ /dev/null @@ -1,4962 +0,0 @@ -\input texinfo @c -*-texinfo-*- -@c %**start of header -@setfilename Batch.info -@settitle Documentation de Batch -@setchapternewpage odd -@iftex -@afourpaper -@end iftex - -@include version.texi - -@dircategory Bibliotheque de classes Batch -@direntry -* Batch: (Batch); Documentation de la bibliotheque de classes Batch. -@end direntry - -@c %**end of header - - - -@titlepage -@sp 10 -@comment The title is printed in a large font. -@title Bibliotheque de classes Batch -@subtitle Documentation - version @value{VERSION} -@subtitle @value{UPDATED} -@author Ivan DUTKA-MALEN - EDF R&D - -@c The following two commands start the copyright page. -@page -@vskip 0pt plus 1filll -Copyright @copyright{} 2003-2004 EDF R&D sous licence GPL -@end titlepage - -@contents - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Top, Description, Index , (dir) -@comment node-name, next, previous, up -@ifinfo -Copyright @copyright{} 2003-2004 EDF R&D sous licence GPL -@end ifinfo - -@unnumbered Introduction - -Ceci est la documentation de la bibliotheque de classes Batch version -@value{VERSION}. - -Ce manuel est normalement disponible sous la forme de fichiers -@file{.info}, PostScript @file{.ps}, PDF @file{.pdf} et HTML -@file{.html}. Merci a Texinfo. - - -@menu -* Description:: Le batch, c'est quoi ? Ca sert a quoi ? -* Classes:: Une description des classes internes. -* Utilisation:: Comment on s'en sert ? Quelques exemples. -* Installation de la bibliotheque:: Comment ca s'installe ? -* Divers:: D'autres petits details. -* Index:: Index generaux. -@end menu - - - - - - - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Description, Classes, Top, Top -@comment node-name, next, previous, up -@chapter Description Generale -@cindex description - -Dans le domaine du batch, nombreux sont les gestionnaires qui sont -apparus et se sont popularises en fonction des plates-formes et des -constructeurs. On peut notamment citer NQS, le premier de tous, LSF, -LoadLeveler, PBS (et ses derives OpenPBS et PBS Pro), etc. qui se -prevalent tous d'une compatibilite avec NQS. - -Si l'ensemble de ces produits offrent les fonctionnalites de base de -NQS, a savoir soumission, controle, destruction, modification, etc. de -travaux batch, ils se distinguent tous par leur incompatibilite mutuelle -et par les syntaxes de fichiers et les appels de fonction specifiques -qu'ils ont developpes. - -Or il est interessant de pouvoir acceder d'une facon homogene et -generique aux fonctionnalites de ces gestionnaires quitte a se -restreindre a un sous-ensemble minimal mais essentiel de leurs -possibilites. - -La bibliotheque de classes Batch fournit ce moyen de soumettre et -controler des travaux batch depuis une machine cliente sans s'occuper du -type de gestionnaire present sur le serveur sur lequel se deroule -l'execution du travail. Seul doit etre precise le nom du serveur sur -lequel sera soumis le travail batch et le type de gestionnaire qui s'y -trouve. Tout le reste est generique et ne depend plus de l'implementation. - - - - - - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classes, Terminologie, Description, Top -@comment node-name, next, previous, up -@chapter Classes Internes -@cindex classe - -Les classes de la bibliotheque reposent sur des concepts issus du monde -de la gestion de batch, qui meritent d'etre reprecises pour ne pas -introduire d'ambiguite semantique dans le discours. - -@menu -* Terminologie:: Description des termes employes. -* Classes generiques:: Les classes communes a tous les gestionnaires. -* Classes specifiques:: Les classes d'implementation. -@end menu - - - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Terminologie, Batch, Classes, Classes -@comment node-name, next, previous, up -@section Terminologie -@cindex terminologie - -Pour les non-inities aux mysteres de la gestion de batch, un petit -glossaire des termes employes dans cette documentation, assaisonne a la -sauce de la bibliotheque de classes Batch. - -@menu -* Batch:: Gestion par lots, execution differee. -* BatchManager:: Gestionnaire de batch. -* Job:: Travail. -* Parametre:: Configuration de l'execution. -* Environnement:: Environnement d'execution. -* JobId:: Identifiant de travail. -* JobInfo:: Informations sur le travail. -@end menu - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Batch, BatchManager, Terminologie, Terminologie -@comment node-name, next, previous, up -@subsection Batch -@cindex batch - -Le traitement batch (batch processing en anglais), ou traitement par -lot, fait reference au mode de sequencage et d'utilisation des -ressources d'un calculateur tel qu'il a ete premierement employe dans -les debuts de l'ere informatique. Mais il faut preciser que cette -anteriorite ne condamne pas le traitement batch aux oubliettes au motif -d'une quelconque obsolescence. Si le traitement par lot a vu le jour et -existe encore aujourd'hui, c'est parce qu'il repond de maniere -satisfaisante a une certaine utilisation des ressources d'un -calculateur, et que cette utilisation est encore d'actualite. Present -depuis plus de quarante ans, le batch est encore largement utilise sur -les grands serveurs, et le sera vraisemblablement pour quelques annees -encore. - -Le traitement par lot se distingue de l'execution interactive par le -fait que les travaux a effectuer sont places dans une file d'attente -avec une indication pour chaque lot des ressources dont il doit disposer -pour aboutir correctement. Une fois les travaux inscrits dans la file, -c'est au systeme de traitement batch (@xref{BatchManager}.) de veiller a -leur bonne execution en leur fournissant les ressources demandees. Tout -travail qui ne disposerait pas des ressources adequates ne peut pas etre -active. - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node BatchManager, Job, Batch, Terminologie -@comment node-name, next, previous, up -@subsection Batch Manager -@cindex batch manager -@cindex gestionnaire - -Le role du gestionnaire de batch, ou batch manager en anglais, est -d'executer et eventuellement d'ordonner les travaux places en file -d'attente en leur allouant exclusivement les ressources necessaires a -leur execution. Son objectif est d'optimiser les ressources du systeme -dont il a la charge de maniere a ecouler le maximum de travaux en un -minimum de temps et un minimum de ressources materielles. - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Job, Parametre, BatchManager, Terminologie -@comment node-name, next, previous, up -@subsection Job -@cindex Job -@cindex travail - -Le travail, ou job en anglais, est l'unite elementaire de traitement qui -peut etre soumis au gestionnaire de batch. Il peut s'agir d'une simple -commande systeme, comme d'une application ou bien meme de l'enchainement -complexe mais indivisible de plusieurs applications ou commandes. - -Pour s'executer correctement, c'est-a-dire sans erreur, le job doit -disposer de certaines ressources --- de la memoire, du temps, de -l'espace disque @dots{} --- pendant toute la duree de son -execution. C'est au gestionnaire de batch (@xref{BatchManager}.) de -garantir au job la presence et la persistence de ces ressources pendant -l'execution du job. - -Par contre c'est a l'utilisateur qui soumet le job d'informer le -gestionnaire de batch des ressources necessaires au job. Pour des -raisons evidentes de bonne gestion des ressources, le job ne peut -consommer plus de ressources que celles qu'il a demande et obtenu du -gestionnaire de batch sans etre arrete ou reclasse. - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Parametre, Environnement, Job, Terminologie -@comment node-name, next, previous, up -@subsection Parametre -@cindex parametre - -Le premier type de ressource necessaire a un job concerne les elements -materiels ou temporels, en un mot, physiques. Parmi ces ressources, on -trouve le temps de calcul, le temps de presence en machine, l'espace -disque, la quantite de memoire vive, l'architecture du calculateur, etc. - -Dans la terminologie de la bibliotheque de classes Batch, tous ces -elements ont ete regroupes sous le terme de @emph{Parametre}. - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Environnement, JobId, Parametre, Terminologie -@comment node-name, next, previous, up -@subsection Environnement -@cindex environnement - -Le second type de ressource necessaire a un job concerne les elements -logiciels. Cela se traduit le plus souvent, et particulierement, dans -les systemes Unix par la notion de variable d'environnement. Lorsque le -job s'execute, il doit pouvoir trouver l'ensemble des commandes et des -applications auquel il souhaite faire appel. Les variables -d'environnement decrivent donc les localisations des ces -programmes. Elles peuvent egalement contenir des informations influant -sur le comportement des programmes. - -Dans la terminologie de la bibliotheque de classes Batch, tous ces -elements on ete regroupes sous le terme de @emph{Environnement}. - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node JobId, JobInfo, Environnement, Terminologie -@comment node-name, next, previous, up -@subsection JobId -@cindex jobid -@cindex identifier - -Si un job (@xref{Job}.) decrit les actions qui doivent etre effectues -par le systeme sous le controle du gestionnaire de batch, il est clair -qu'il est possible de soumettre plusieurs fois de suite le meme job, et -par la-meme d'executer plusieurs fois (et parfois simultanement) ces -memes actions. On a donc plusieurs instances du meme job qui sont -presentes en machine. Chaque instance peut etre distinguee des autres -par un identifiant unique qui lui est propre : c'est le @emph{jobId}. - -Le JobId est determine par le gestionnaire de batch au moment de la -soumission. - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node JobInfo, Classes generiques, JobId, Terminologie -@comment node-name, next, previous, up -@subsection JobInfo -@cindex jobinfo - - -Des qu'un job (@xref{Job}.) est soumis donc des qu'il dispose d'un -JobId (@xref{JobId}.), il est possible d'interroger le gestionnaire de -batch pour etre informe de son comportement, de son evolution au sein du -systeme pendant son execution. - -On peut ainsi connaitre les parametres reellement consommes par rapport -aux parametres alloues, ainsi que l'environnement d'execution du job. - -Le JobInfo est une structure qui collecte ses informations sur l'etat du -job. - - - - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classes generiques, Namespace, JobInfo, Classes -@comment node-name, next, previous, up -@section Classes generiques -@cindex classes generiques - -Schematiquement, les classes composant la bibliotheque sont regroupees -en trois categories. Celles appartenant au groupe @emph{Types de base} -ne servent que de support au fonctionnement des classes de plus haut -niveau, egalement appellees @emph{Classes utilisateur}. Seules ces -dernieres sont vraiment interessantes pour l'utilisateur de la -bibliotheque. Les exceptions sont regroupees dans une categorie qui leur -est propre. - -@menu -* Namespace:: Espace de noms pour la bibliotheque. -* Types de base:: Les classes elementaires. -* Classes utilisateur:: Les classes de haut-niveau. -* Exceptions:: Les exceptions de la bibliotheque. -@end menu - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Namespace, Types de base, Classes generiques, Classes generiques -@comment node-name, next, previous, up -@subsection Namespace -@cindex namespace - -Toutes les classes de la bibliotheque sont regroupees dans un unique -namespace nomme @emph{Batch} afin de ne pas introduire de conflit avec -d'autres classes de meme nom. - -Ainsi lorsque par exemple on cite la classe @emph{BatchManager}, il -faudra declarer un objet @emph{Batch::BatchManager} ou bien faire appel -au namespace @emph{Batch} en C++. En Python, les objets sont regroupes -dans un module nomme @emph{libBatch_Swig}. - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Types de base, Classe Couple, Namespace, Classes generiques -@comment node-name, next, previous, up -@subsection Types de base -@cindex types de base - -Les classes decrites ici sont toutes utilisees ou utilisables par les -classes utilisateur de la bibliotheque, et en particulier par la classe -Versatile. @xref{Classe Versatile}. - -Ces classes implementent sous forme d'objet les types de base du langage -C++. Ainsi la classe @emph{Booltype} implemente le type de base -@emph{bool}. Certains types de base n'existant pas dans le langage ont -ete crees et encapsules dans une classe : c'est le cas notamment du type -de base @emph{Date} et de la classe @emph{DateType}, et du type de base -@emph{Couple} et de la classe @emph{CoupleType}. - -Tous les classes heritent de la classe generique @emph{GenericType}. - -@menu --- Types de base -- - -* Classe Couple:: Association de fichiers. -* Classe Date:: Type elementaire de date. - --- Classes d'implementation des types de base -- - -* Classe GenericType:: Classe-mere de tous les types. -* Classe BoolType:: Encapsulation du type bool. -* Classe CharType:: Encapsulation du type char. -* Classe CoupleType:: Encapsulation du type Couple. -* Classe DateType:: Encapsulation du type Date. -* Classe IntType:: Encapsulation du type int. -* Classe LongType:: Encapsulation du type long. -* Classe StringType:: Encapsulation du type string. - -@end menu - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classe Couple, Classe Date, Types de base, Types de base -@comment node-name, next, previous, up -@page -@subsubsection Couple -@findex Couple - -La classe @emph{Couple} implemente le comportement d'un couple de deux -chaines de type @emph{string} qui sont respectivement nommees -@emph{local} et @emph{remote}. - -Cette classe est utilisee essentiellement pour la designation des -fichiers a transferer lors des soumissions de travaux, d'ou les noms -employes. - -@cartouche -Il faut toutefois faire attention a designer correctement ce qui est -local ou distant. Ainsi dans la bibliotheque de classes Batch, on a -adopte la convention qu'un fichier dit @emph{local} est celui present -sur la machine qui execute la bibliotheque de classes Batch, alors qu'un -fichier dit @emph{remote} (ou distant) est celui present sur le serveur -du gestionnaire de batch. -L'approche est donc clairement orientee utilisateur plutot que serveur. -@end cartouche - -@itemize @bullet{} -@item Entete - -@example -class Couple -@{ - public: - // Constructeur standard - Couple(const string & local, const string & remote); - - // Constructeur par recopie - Couple(const Couple & C); - - // Operateur pour l'affichage sur un stream - friend ostream & operator << (ostream & os, const Couple & cp); - - // Operateur d'affectation - virtual Couple & operator =(const Couple &); - - // Conversion en chaine - virtual string str() const; - - // Accesseurs - virtual string getLocal() const; - virtual string getRemote() const; - - protected: - string _local; // chemin d'acces au fichier local - string _remote; // chemin d'acees au fichier distant - - private: - -@}; -@end example -@end itemize - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classe Date, Classe GenericType, Classe Couple, Types de base -@comment node-name, next, previous, up -@page -@subsubsection Date -@findex Date - -La classe @emph{Date} sert a stocker n'importe quelle information de -temps et peut la representer sous une forme plus lisible a l'utilisateur -que le traditionnel appel a la fonction @emph{ctime}. @xref{(*manpages*)ctime}. - -@itemize @bullet{} -@item Entete - -@example -class Date -@{ - public: - // Constructeur standard (a partir d'une valeur epoch) - Date(const long l=0); - - // Constructeur a partir d'une chaine hh:mm:ss - Date(const string s); - - // Operateurs portant sur les Dates - virtual Date & operator =(long l); - virtual Date & operator +(long l); - virtual Date & operator -(long l); - virtual Date & operator +=(long l); - virtual Date & operator -=(long l); - virtual Date & operator =(const string & s); - - // Conversions en types standards - virtual string str() const; - virtual long epoch() const; - - protected: - int _day, _month, _year; - int _hour, _min, _sec; - - private: - -@}; -@end example -@end itemize - - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classe GenericType, Classe BoolType, Classe Date, Types de base -@comment node-name, next, previous, up -@page -@subsubsection GenericType -@findex GenericType - -La classe @emph{GenericType} est la classe-mere de toutes les classes -utilisees par la classe @emph{Versatile}. @xref{Classe Versatile}. - -Elle definit une interface que @emph{Versatile} utilise pour controler -les objets : constructeur simple et destructeur, operateur sur -@emph{ostream}, conversion en chaine et surtout methode @emph{clone}. - -La methode @emph{clone} permet de recuperer un nouvel objet identique au -premier qui sera automatiquement alloue sur le tas par un appel a -@emph{new}. Il est important de noter ici que le nouvel objet @strong{DEVRA} -etre desalloue par un appel a @emph{delete}. Cette desallocation est a -la charge de l'utilisateur de l'objet sans quoi une fuite memoire en -resultera. - -@itemize @bullet{} -@item Entete - -@example -class GenericType -@{ - public: - // Constructeur et destructeur - GenericType(); - virtual ~GenericType(); - - // Operateur pour l'affichage sur un stream - friend ostream & operator << (ostream & os, - const GenericType & obj); - - // Conversion en chaine - virtual string affiche() const; - - // Clone duplique l'objet et en fabrique un nouveau a l'aide de new - // qu'il faudra detruire ensuite manuellement - virtual GenericType * clone() const; - - // Retourne le nombre d'objets GenericType et al. - static int getNb(); - - protected: - - private: - static int _nb; // nombre total d'objets GenericType et al. - -@}; -@end example -@end itemize - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classe BoolType, Classe CharType, Classe GenericType, Types de base -@comment node-name, next, previous, up -@page -@subsubsection BoolType -@findex BoolType - -Cette classe encapsule le type C++ @emph{bool} dans un objet herite de -@emph{GenericType} de maniere a pouvoir le stocker aisement dans un -objet de classe @emph{Versatile}. - -@itemize @bullet{} -@item Entete - -@example -class BoolType : public GenericType -@{ - public: - // Constructeur - BoolType(const bool b=false); - - // Conversion en chaine - virtual string affiche() const; - - // Operateur d'affectation - virtual BoolType & operator =(bool); - - // Conversion en bool - virtual operator bool() const; - - // Clone duplique l'objet et en fabrique un nouveau a l'aide de new - // qu'il faudra detruire ensuite manuellement - virtual GenericType * clone() const; - - protected: - bool _data; - - private: - -@}; -@end example -@end itemize - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classe CharType, Classe CoupleType, Classe BoolType, Types de base -@comment node-name, next, previous, up -@page -@subsubsection CharType -@findex CharType - -Cette classe encapsule le type C++ @emph{char} dans un objet herite de -@emph{GenericType} de maniere a pouvoir le stocker aisement dans un -objet de classe @emph{Versatile}. - - -@itemize @bullet{} -@item Entete - -@example -class CharType : public GenericType -@{ - public: - // Constructeur - CharType(const char c=0); - - // Conversion en chaine - virtual string affiche() const; - - // Operateur d'affectation - virtual CharType & operator =(char); - - // Conversion en char - virtual operator char() const; - - // Clone duplique l'objet et en fabrique un nouveau a l'aide de new - // qu'il faudra detruire ensuite manuellement - virtual GenericType * clone() const; - - protected: - char _data; - - private: - -@}; -@end example -@end itemize - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classe CoupleType, Classe DateType, Classe CharType, Types de base -@comment node-name, next, previous, up -@page -@subsubsection CoupleType -@findex CoupleType - -Cette classe encapsule le type interne @emph{Couple} dans un objet herite de -@emph{GenericType} de maniere a pouvoir le stocker aisement dans un -objet de classe @emph{Versatile}. - - -@itemize @bullet{} -@item Entete - -@example -class CoupleType : public GenericType -@{ - public: - // Constructeur - CoupleType(const Couple & C); - - // Conversion en chaine - virtual string affiche() const; - virtual operator string() const; - - // Operateur d'affectation - virtual CoupleType & operator =(const Couple & C); - - // Conversion en char - virtual operator Couple() const; - - // Clone duplique l'objet et en fabrique un nouveau a l'aide de new - // qu'il faudra detruire ensuite manuellement - virtual GenericType * clone() const; - - protected: - Couple _data; - - private: - -@}; -@end example -@end itemize - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classe DateType, Classe IntType, Classe CoupleType, Types de base -@comment node-name, next, previous, up -@page -@subsubsection DateType -@findex DateType - -Cette classe encapsule le type interne @emph{Date} dans un objet herite de -@emph{GenericType} de maniere a pouvoir le stocker aisement dans un -objet de classe @emph{Versatile}. - - -@itemize @bullet{} -@item Entete - -@example -class DateType : public GenericType -@{ - public: - // Constructeur - DateType(const Date & d); - - // Conversion en chaine - virtual string affiche() const; - - // Operateur d'affectation - virtual DateType & operator =(const Date &); - - // Conversion en Date - virtual operator Date() const; - - // Conversion en long - virtual operator long() const; - - // Clone duplique l'objet et en fabrique un nouveau a l'aide de new - // qu'il faudra detruire ensuite manuellement - virtual GenericType * clone() const; - - protected: - Date _data; - - private: -@}; -@end example -@end itemize - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classe IntType, Classe LongType, Classe DateType, Types de base -@comment node-name, next, previous, up -@page -@subsubsection IntType -@findex IntType - -Cette classe encapsule le type C++ @emph{int} dans un objet herite de -@emph{GenericType} de maniere a pouvoir le stocker aisement dans un -objet de classe @emph{Versatile}. - - -@itemize @bullet{} -@item Entete - -@example -class IntType : public GenericType -@{ - public: - // Constructeur - IntType(const int i=0); - - // Conversion en chaine - virtual string affiche() const; - - // Operateur d'affectation - virtual IntType & operator =(int); - - // Conversion en int - virtual operator int() const; - - // Clone duplique l'objet et en fabrique un nouveau a l'aide de new - // qu'il faudra detruire ensuite manuellement - virtual GenericType * clone() const; - - protected: - int _data; - - private: - -@}; -@end example -@end itemize - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classe LongType, Classe StringType, Classe IntType, Types de base -@comment node-name, next, previous, up -@page -@subsubsection LongType -@findex LongType - -Cette classe encapsule le type C++ @emph{long} dans un objet herite de -@emph{GenericType} de maniere a pouvoir le stocker aisement dans un -objet de classe @emph{Versatile}. - -@itemize @bullet{} -@item Entete - -@example -class LongType : public GenericType -@{ - public: - // Constructeur - LongType(const long l=0L); - - // Conversion en chaine - virtual string affiche() const; - - // Operateur d'affectation - virtual LongType & operator =(long); - - // Conversion en long - virtual operator long() const; - - // Clone duplique l'objet et en fabrique un nouveau a l'aide de new - // qu'il faudra detruire ensuite manuellement - virtual GenericType * clone() const; - - protected: - long _data; - - private: - -@}; -@end example -@end itemize - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classe StringType, Classes utilisateur, Classe LongType, Types de base -@comment node-name, next, previous, up -@page -@subsubsection StringType -@findex StringType - -Cette classe encapsule le type C++ @emph{string} de la STL dans un objet -herite de @emph{GenericType} de maniere a pouvoir le stocker aisement -dans un objet de classe @emph{Versatile}. - -@itemize @bullet{} -@item Entete - -@example -class StringType : public GenericType -@{ - public: - // Constructeur - StringType(const string & s=""); - - // Conversion en chaine - virtual string affiche() const; - virtual operator string() const; - - // Operateur d'affectation - virtual StringType & operator =(string); - - // Clone duplique l'objet et en fabrique un nouveau a l'aide de new - // qu'il faudra detruire ensuite manuellement - virtual GenericType * clone() const; - - protected: - string _data; - - private: - -@}; -@end example -@end itemize - - - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classes utilisateur, Exemple, Classe StringType, Classes generiques -@comment node-name, next, previous, up -@page -@subsection Classes utilisateur -@cindex classes utilisateur - -Les classes dites classes utilisateur sont en realite les classes de -plus haut niveau de la biliotheque de classes Batch. Ces classes -remplissent les unes avec les autres l'ensemble des fonctionnalites -proposees par la bibliotheque. L'utilisateur trouvera donc dans cette -section la description des possibilites de la bibliotheque et le moyen -de les mettre en oeuvre. - -La premiere section montre un exemple complet de soumission et de -controle d'un job soumis a travers les classes de la biliotheque. Les -sections suivantes reprennent les elements de l'exemple pour le -detailler et le completer. - -@menu -* Exemple:: Exemple simple mais complet d'utilisation. -* Classe BatchManagerCatalog:: Description de la classe BatchManagerCatalog. -* Classe FactBatchManager:: Description de la classe FactBatchManager. -* Classe BatchManager:: Description de la classe BatchManager. -* Classe Environnement:: Description de la classe Environnement. -* Classe Job:: Description de la classe Job. -* Classe JobId:: Description de la classe JobId. -* Classe JobInfo:: Description de la classe JobInfo. -* Classe Parametre:: Description de la classe Parametre. -* Classe Versatile:: Description de la classe Versatile. -@end menu - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Exemple, Classe BatchManagerCatalog, Classes utilisateur, Classes utilisateur -@comment node-name, next, previous, up -@page -@subsubsection Exemple -@cindex exemple - -Cet exemple decrit le processus type de creation et de soumission d'un -job a travers les classes de la bibliotheque. - -Il faut toutefois penser que les appels aux methodes peuvent lever des -exceptions qu'il faudra intercepter et gerer. @xref{Exceptions}. - -@example - @dots{} - - // On instancie le catalogue de gestionnaires de batch - Batch::BatchManagerCatalog cata; - - // On cree un BatchManager qui se connecte au veritable gestionnaire - // de batch - Batch::BatchManager & bm = (* cata("PBS"))("monserver.mondomaine.fr"); - - // Pour fabriquer un Job, on doit d'abord creer un objet Parametre et - // un objet Environnement qui contiennent respectivement la liste des - // parametres du job au sein du gestionnaire de batch et la liste des - // variables d'environnement necessaires au fonctionnement du job - Batch::Parametre param; - - param[EXECUTABLE] = "/home/user/mon_application/executable"; - param[NAME] = "MonJob"; - param[ACCOUNT] = "MonProjet"; // code d'imputation/facturation - param[MAXCPUTIME] = 360L; // 6min - param[MAXWALLTIME] = 480L; // 8min - param[INFILE] = Batch::Couple("/tmp/infich1", rempath+"/infich1"); - param[OUTFILE] = Batch::Couple("/tmp/outfich1", rempath+"/outfich1"); - param[OUTFILE] += Batch::Couple("stderr", path + "/STDERR"); - param[OUTFILE] += Batch::Couple("stdout", path + "/STDOUT"); - param[MAIL] = "user@@domaine.fr"; - param[USER] = "user"; - - Batch::Environnement env; - env["DEBUG"] = "3"; // un niveau de debug exige par l'application - env["MYAPP_FILE"] = "/home/user/mon_application/data/mydatafile"; - - // Creation du job - Batch::Job job(param, env); - - // On soumet le Job au BatchManager qui le relaie jusqu'au veritable - // gestionnaire de batch sur le serveur. En retour on obtient un - // identifiant unique de notre job (JobId). - const Batch::JobId jobid = bm.submitJob(job); - - // On interroge le BatchManager pour connaitre l'etat du Job - const Batch::JobInfo jinfo = jobid.queryJob(); - cout << jinfo << endl; - - // On detruit l'objet BatchManager - delete &bm; - - @dots{} -@end example - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classe BatchManagerCatalog, Classe FactBatchManager, Exemple, Classes utilisateur -@comment node-name, next, previous, up -@page -@subsubsection BatchManagerCatalog -@findex BatchManagerCatalog - -La classe @emph{BatchManagerCatalog} definit une interface d'acces au -catalogue de fabriques de BatchManager. @xref{Classe FactBatchManager}. - -Pourquoi utiliser une fabrique et ne pas instancier directement un objet -@emph{BatchManager} en fonction de sa classe ? C'est l'option qui avait ete -choisie dans la premiere version de la bibliotheque de classes -Batch. Cette facon de proceder est simple, aussi bien pour le -developpeur de la classe que pour l'utilisateur, mais elle se revele a -terme penalisante dans la souplesse d'utilisation des classes. Elle -permet aussi moins facilement de mettre en place une strategie de -singleton pour les objets @emph{BatchManager}, ce qui peut se reveler utile non -pas en termes de performance mais plutot en termes de genericite et -toujours de souplesse. - -En resume, l'utilisation de fabiques permet d'acceder a la genericite, -qui rappelons-le est l'objet de cette biliotheque, a la souplesse et a -la performance au prix d'une legere complication pour le developpeur -mais pas pour l'utilisateur. - -Le catalogue de fabriques est une @emph{map}, ou tableau associatif, -auquel on passe le nom d'une fabrique et qui retourne un pointeur sur -une instance de cette fabrique. - -Le catalogue est renseigne statiquement par les fabriques declarees -elles-memes statiquement dans la biliotheque. Il est donc precharge avec -les fabriques correspondant a chacune des API disponibles. Comme le -catalogue n'est pas declare constant, il est possible de rajouter ou de -supprimer des fabriques dans le catalogue dynamiquement. - -@itemize @bullet{} -@item Entete - -@example -class BatchManagerCatalog -@{ -public: - // Constructeur - BatchManagerCatalog(); - // Destructeur - virtual ~BatchManagerCatalog(); - - // Accesseurs - static FactBatchManager * getFactBatchManager(const char * type); - static void addFactBatchManager(const char * type, - FactBatchManager * pFBM); - virtual FactBatchManager * operator() (const char * type) const; - - // Wrapping Python - virtual map * dict() const; - virtual string __repr__() const; - -protected: - // Le catalogue est gere en singleton et en multi-thread - static map * _p_catalog; - static pthread_mutex_t _mutex; - -private: - -@}; -@end example - -@item Exemple - -@example -@dots{} - -// On instancie le catalogue de gestionnaires de batch -Batch::BatchManagerCatalog cata; - -@dots{} -@end example - -@item Methodes -@itemize @minus{} -@item -@b{BatchManagerCatalog()} - -Le constructeur par defaut permet d'obtenir une instance de -@emph{BatchManagerCatalog} qui permet de manipuler un objet statique -interne. Cet objet interne est le veritable catalogue et se trouve etre -un singleton. - - -@item -@b{~BatchManagerCatalog()} - -Le destructeur n'a pas d'action particuliere. - -@item -@b{static FactBatchManager * getFactBatchManager(const char * type)} - -Cet accesseur retourne un pointeur sur un objet de type -@emph{FactBatchManager} en fonction du nom (le type) sous lequel il -s'est enregistre dans le catalogue. - -Cette fonction est statique et peut donc etre utilisee pour interroger -le catalogue depuis des objets statiques. - -@item -@b{static void addFactBatchManager(const char * type, FactBatchManager * pFBM)} - -Cet accesseur enregistre dans le catalogue un pointeur sur un objet de type -@emph{FactBatchManager} sous le nom (le type) passe en argument. - -Cette fonction est statique et peut donc etre utilisee pour enregistrer -des objets statiques dans le catalogue. - -@item -@b{FactBatchManager * operator() (const char * type) const} - -Cet accesseur retourne un pointeur sur un objet de type -@emph{FactBatchManager} en fonction du nom (le type) sous lequel il -s'est enregistre dans le catalogue. - -Cette fonction non statique est utilisable sur une instance de -@emph{BatchManagerCatalog}. - -@item -@b{map * dict() const} - -Cette methode utilisable depuis Python permet de recuperer un -dictionnaire decrivant le contenu du catalogue. - -@item -@b{string __repr__() const} - -Cette methode utilisable depuis Python retourne une description de -l'objet @emph{BatchManagerCatalog}. - -@end itemize - - -@end itemize - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classe FactBatchManager, Classe BatchManager, Classe BatchManagerCatalog, Classes utilisateur -@comment node-name, next, previous, up -@page -@subsubsection FactBatchManager -@findex FactBatchManager - -La classe @emph{FactBatchManager} est abstraite. Elle definit une interface -qui doit etre implementee par des classes specialisees en fonction du -gestionnaire de batch et de son API de communication. @xref{Classes specifiques}. - -Les objets repondant a l'interface de @emph{FactBatchManager} sont -automatiquement inseres dans le catalogue des fabriques de -@emph{BatchManager} a la construction de l'objet. Il est ainsi possible -de definir statiquement des objets de ce type qui enrichiront le -catalogue des la compilation. @xref{Classe -BatchManagerCatalog}. @xref{Classe BatchManager}. - -Les objets de la classe @emph{FactBatchManager} ou de ses derivees sont -des functors et renvoient au moment de l'appel un pointeur sur un objet -gestionnaire de batch @emph{BatchManager} associe a un -serveur. L'allocation de l'objet est faite sur le tas et celui-ci doit -donc etre desalloue manuellement par l'utilisateur de la bibliotheque au -moment opportun. - -@itemize @bullet{} -@item Entete - -@example -class FactBatchManager -@{ -public: - // Constructeur - FactBatchManager(const string & type); - - // Destructeur - virtual ~FactBatchManager(); - - // Functor - virtual BatchManager * operator() (const char * hostname) const = 0; - - // Accesseur au type interne - string getType() const; - - // Wrapping Python - string __repr__() const; - -protected: - string type; // Le type interne - -private: - -@}; -@end example - -@item Exemple - -@example -@dots{} - -// On instancie le catalogue de gestionnaires de batch -Batch::BatchManagerCatalog cata; - -// On cree une fabrique de BatchManager de type PBS -Batch::FactBatchManager & fbm = * cata("PBS"); - -@dots{} -@end example - -@item Methodes -@itemize @minus{} - -@item -@b{FactBatchManager(const string & type)} - -Le constructeur de la classe prend un type qui doit identifer de maniere -unique la fabrique au sein du catalogue de fabrique. Ce type sert de cle au -catalogue. @xref{Classe BatchManagerCatalog}. - -@item -@b{~FactBatchManager()} - -Le destructeur de la classe n'a pas d'action particuliere. - -@item -@b{BatchManager * operator() (const char * hostname) const} - -Cette methode est virtuelle pure. Elle doit etre surchargee dans les -classes derivees et doit retourner un pointeur sur un objet de type -@emph{BatchManager} correpondant au type de la classe et oeuvrant sur la -machine passee en argument. Le @emph{hostname} est soit alphabetique -soit numerique et doit etre soit un nom de machine valide soit une -adresse IP valide. Aucun controle n'est a priori realise et cet argument -est passe tel quel a l'API du gestionnaire de batch. - -Cet objet agit comme @emph{parent} vis-a-vis de l'objet -@emph{BatchManager} qu'il retourne. - -@item -@b{string getType() const} - -Cette methode renvoie le type interne de l'objet, c'est-a-dire la cle -sous lequel il est enregistre dans le catalogue. - -@item -@b{string __repr__() const} - -Cette methode utilisable depuis Python retourne une description de -l'objet @emph{FactBatchManager}. - -@end itemize - - -@end itemize - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classe BatchManager, Classe Environnement, Classe FactBatchManager, Classes utilisateur -@comment node-name, next, previous, up -@page -@subsubsection BatchManager -@findex BatchManager - -La classe @emph{BatchManager} est abstraite. Elle definit une interface -qui doit etre implementee par des classes specialisees en fonction du -gestionnaire de batch et de son API de communication. @xref{Classes -specifiques}. - -Toute action a destination du gestionnaire de batch doit etre precedee -de l'instanciation d'un objet derivant de la classe @emph{BatchManager} -puisque c'est a travers cet objet que l'on aura acces a l'interface du -gestionnaire. - -Cette instanciation est realisee par une fabrique de gestionnaire de -batch, instance elle-meme derivee de la classe abstraite -FactBatchManager. @xref{Classe FactBatchManager}. - -@itemize @bullet{} -@item Entete - -@example -class BatchManager -@{ - public: - // Constructeur et destructeur - BatchManager(const FactBatchManager * parent, - const char * host="localhost") - throw(InvalidArgumentException); - virtual ~BatchManager(); - - // Recupere l'identifiant d'un job deja soumis au BatchManager - virtual const JobId getJobIdByReference(const string & ref); - - // Methodes pour le controle des jobs : virtuelles pures - // soumet un job au gestionnaire - virtual const JobId submitJob(const Job & job) = 0; - - // retire un job du gestionnaire - virtual void deleteJob(const JobId & jobid) = 0; - - // suspend un job en file d'attente - virtual void holdJob(const JobId & jobid) = 0; - - // relache un job suspendu - virtual void releaseJob(const JobId & jobid) = 0; - - // modifie un job en file d'attente - virtual void alterJob(const JobId & jobid, - const Parametre & param, - const Environnement & env) = 0; - virtual void alterJob(const JobId & jobid, - const Parametre & param) = 0; - virtual void alterJob(const JobId & jobid, - const Environnement & env) = 0; - - // renvoie l'etat du job - virtual JobInfo queryJob(const JobId & jobid) = 0; - - // wrapping Python - virtual string __repr__() const; - - protected: - string _hostname; // serveur ou tourne le BatchManager - const FactBatchManager * _parent; // fabrique qui a produit l'instance - - private: - -@}; -@end example - -@item Exemple - -@example -@dots{} - -// On instancie le catalogue de gestionnaires de batch -Batch::BatchManagerCatalog cata; - -// On cree un BatchManager qui se connecte au veritable gestionnaire -// de batch -Batch::BatchManager & bm = (* cata("PBS"))("monserver.mondomaine.fr"); - -// Maintenant, on peut utiliser toutes les fonctionnalites du -// gestionnaire de batch a travers le variable myBM - -// On detruit l'objet BatchManager -delete &bm; - -@dots{} -@end example - -@item Methodes -@itemize @minus{} -@item -@b{BatchManager(const FactBatchManager * parent,$* -const char * host="localhost") throw(InvalidArgumentException)} - -Excepte un pointeur sur la fabrique qui a produit l'objet, @xref{Classe FactBatchManager}, - le constructeur accepte zero ou un argument de type -@emph{string} decrivant soit le nom de domaine completement qualifie -(FQDN, @i{fully qualified domain name}) du serveur de batch, soit son -adresse IP dans un format decimal "aaa.bbb.ccc.ddd". - -Une resolution du nom ou de l'adresse peut etre realisee en fonction des -capacites de la plate-forme pour s'assurer que le serveur est connu et -joignable. En cas d'echec, une exception InvalidArgumentException est -levee. @xref{Classe InvalidArgumentException}. A priori, aucune -verification n'est faite par defaut. - -Ceci fait, une connexion est etablie avec le gestionnaire de batch qui -est maintenue jusqu'a destruction de l'objet, si le gestionnaire le permet. - -@item -@b{~BatchManager()} - -Le destructeur supprime la connexion precedemment etablie par le -constructeur lorsque celle-ci a reussi. - -@item -@b{const JobId submitJob(const Job & job)} - -Cette methode soumet le job passe en argument au gestionnaire de -batch. Etant donne que le job ne peut pas etre envoye tel quel puisqu'il -a un format generique au sein de la bibliotheque de classes Batch, cette -methode est chargee de le convertir dans un format adapte au -gestionnaire de batch sous-jacent. - -Ce n'est que lorsque cette conversion est realisee que le job est soumis -au gestionnaire a travers son API. L'identifiant propose par le -gestionnaire est alors renvoye a l'appelant. Si la soumission echoue -pour une raison ou une autre, une exception APIInternalFailureException est -levee. @xref{Classe APIInternalFailureException}. - -@item -@b{void deleteJob(const JobId & jobid)} - -Cette methode retire le job dont l'identifiant est passe en argument de -la file d'attente du gestionnaire, ou bien l'arrete s'il est en cours -d'execution. Cette methode est inoperante sur des travaux deja termines, -auquel cas une exception APIInternalFailureException est -levee. @xref{Classe APIInternalFailureException}. - - -@item -@b{void holdJob(const JobId & jobid)} - -Cette methode suspend le job dont l'identifiant est passe en argument au -sein de la file d'attente du gestionnaire. Cette methode est inoperante -sur des travaux en cours d'execution ou deja termines, ainsi que sur des -travaux deja suspendus. -En cas de probleme, une exception APIInternalFailureException est -levee. @xref{Classe APIInternalFailureException}. - -@item -@b{void releaseJob(const JobId & jobid)} - -Cette methode relache un job precedemment suspendu en file -d'attente dont l'identifiant est passe en argument. Elle est inoperante -sur des travaux deja relaches, en cours d'execution ou termines. -En cas de probleme, une exception APIInternalFailureException est -levee. @xref{Classe APIInternalFailureException}. - - -@item -@b{void alterJob(const JobId & jobid, const Parametre & param, const Environnement & env)@* -void alterJob(const JobId & jobid, const Parametre & param)@* -void alterJob(const JobId & jobid, const Environnement & env)} - -Ces methodes permettent de modifier les parametres d'execution et -d'environnement d'un job dont l'identifiant est passe en -argument. @xref{Classe Parametre}. @xref{Classe Environnement}. Il -est important de noter que le job doit etre encore place en file -d'attente sinon la methode est inoperante. -En cas de probleme, une exception APIInternalFailureException est -levee. @xref{Classe APIInternalFailureException}. - -@item -@b{JobInfo queryJob(const JobId & jobid)} - -Cette methode permet de recuperer les informations concernant le job -dont l'identifiant est passe en argument dans un objet de classe -@emph{JobInfo}. @xref{Classe JobInfo}. On y retrouve les parametres -d'execution et d'environnement du job tels qu'ils ont ete passes au -gestionnaire au moment de la soumission, ainsi que des informations -concernant l'execution du job comme par exemple la machine d'execution, -le temps consomme, la memoire consommee, etc. - -Il n'est pas toujours possible d'interroger un job deja termine. -En cas de probleme, une exception APIInternalFailureException est -levee. @xref{Classe APIInternalFailureException}. - - -@item -@b{const JobId getJobIdByReference(const string & ref)} - -Cette methode permet de recuperer au sein de la classe un identifiant de -job a partir d'une chaine de caracteres obtenue par un biais -externe. Cet identifiant pourra etre utilise par la suite au sein de la -biliotheque de classes pour controler le job comme s'il avait ete cree -et soumis depuis la biliotheque-meme. - -@end itemize - - -@end itemize - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classe Environnement, Classe Job, Classe BatchManager, Classes utilisateur -@comment node-name, next, previous, up -@page -@subsubsection Environnement -@findex Environnement - -La classe @emph{Environnement} permet de definir les variables -d'environnement necessaires a l'execution d'un job. Ces variables seront -creees automatiquement dans l'environnement du job lorsque celui-ci -debutera son execution sur la machine. - -Une variable d'environnement est traditionnellement composee d'un nom et -d'une valeur qui peut etre vide ou absente. L'ensemble des variables -d'environnement peut ainsi etre represente sous la forme d'une table -associative dans laquelle le nom de la variable correspond a la clef de la -table, et la valeur de la variable correspond a la valeur de la table -pour la clef donnee. - -Chaque objet de la classe @emph{Environnement} se comporte comme une -table associative telle que decrite auparavant. - -@itemize @bullet{} -@item Entete - -@example -typedef map < string, string > Environnement; -@end example - - -@item Exemple -@example -@dots{} - -Environnement env; -env["MYAPP_ROOTDIR"] = "/home/user/myapplication"; -env["MYAPP_LICENSEFILE"] = env["MYAPP_ROOTDIR"] + "/license.dat"; -env["CXX"] = "g++"; -env["CXXFLAGS"] = "-g -O2"; - -@dots{} -@end example - -@item Methodes - -Compte tenu de la definition actuelle de la classe @emph{Environnement} -en tant que map STL, elle beneficie de toutes les fonctionnalites -classiques des maps STL. - -@end itemize - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classe Job, Classe JobId, Classe Environnement, Classes utilisateur -@comment node-name, next, previous, up -@page -@subsubsection Job -@findex Job - -La classe @emph{Job} represente la notion de travail, ou job, dans la -bibliotheque de classes Batch. Elle se comporte essentiellement comme -une collection de parametres et de variables necessaires a la -description des actions qui doivent etre realisees dans des conditions -precisees. - -Elle se repose sur deux autres classes qui distinguent la notion de -parametre d'execution et celle de variable d'environnement : les classes -@emph{Parametre} et @emph{Environnement}. @xref{Classe -Parametre}. @xref{Classe Environnement}. - -Son role est de preparer la soumission qui aura lieu et qui concretisera -l'incarnation du job dans le gestionnaire de batch. Tant que le job n'a -pas ete soumis, on ne peut pas vraiment considerer son existence et de -fait les interactions qu'on peut avoir avec l'objet sont tres limitees. - -@itemize @bullet{} -@item Entete - -@example -class Job -@{ - public: - // Constructeurs et destructeur - Job(); - Job(Parametre param); - Job(Environnement env); - Job(Parametre param, Environnement env); - virtual ~Job(); - - // Operateur pour l'affichage sur un stream - friend ostream & operator <<(ostream & os, const Job & job); - - // Accesseurs - Parametre getParametre() const; - void setParametre(const Parametre &); - - // Accesseurs - Environnement getEnvironnement() const; - void setEnvironnement(const Environnement &); - - // Methodes pour l'interfacage avec Python (SWIG) - string __repr__() const; - - protected: - Parametre _param; // table des parametres batch du job - Environnement _env; // table des variables d'environnement - - private: - -@}; -@end example - - -@item Exemple -@example -@dots{} - -@dots{} (ici on cree un BatchManager bm) -Parametre param; -Environnement env; - -@dots{} (ici on cree les parametres du job) - -Job job(param, env); -JobId jobid = bm.sumbitJob(job); - -@dots{} -@end example - -@item Methodes -@itemize @minus{} - -@item -@b{Job()$* -Job(Parametre param)$* -Job(Environnement env)$* -Job(Parametre param, Environnement env)} - -Le constructeur, en plus de creer l'objet, peut faire des verifications -sur la coherence des objets passes en argument s'il y en a. - -@item -@b{~Job()} - -Le destructeur libere simplement les espaces alloues. - -@item -@b{ostream & operator <<(ostream & os, const Job & job)} - -Cette methode permet a l'utilisateur d'afficher sur un stream le contenu -d'un objet de classe @emph{Job}. - -@item -@b{Parametre getParametre() const} - -Un accesseur pour recuperer l'objet Parametre passe en argument du -constructeur. - -@item -@b{void setParametre(const Parametre &)} - -Cette methode permet de positionner @i{a posteriori} l'objet -@emph{Parametre}. Des tests complementaires peuvent etre faits pour -verifier la coherence de l'objet. - -@item -@b{Environnement getEnvironnement() const} - -Un accesseur pour recuperer l'objet Environnement passe en argument du constructeur. - -@item -@b{void setEnvironnement(const Environnement &)} - -Cette methode permet de positionner @i{a posteriori} l'objet -@emph{Environnement}. Des tests complementaires peuvent etre faits pour -verifier la coherence de l'objet. - -@item -@b{string __repr__() const} - -Cette methode sert dans l'interfacage Python de l'objet et permet d'en -realiser l'affichage a travers l'interpreteur Python. - -@end itemize -@end itemize - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classe JobId, Classe JobInfo, Classe Job, Classes utilisateur -@comment node-name, next, previous, up -@page -@subsubsection JobId -@findex JobId - -La classe @emph{JobId} represente l'incarnation d'un objet de classe -@emph{Job} une fois soumis au travers du gestionnaire de batch. A chaque -objet @emph{JobId} correspond une et une seule soumission d'un objet -@emph{Job}. Ainsi un meme objet @emph{Job} peut etre soumis plusieurs -fois de suite a un ou plusieurs gestionnaires de batch et produira -autant d'objets @emph{JobId}. - -L'objet @emph{JobId} assure le controle et la gestion du job au travers -du gestionnaire de batch. Chaque objet @emph{JobId} est associe a un -gestionnaire particulier aupres duquel il relaie les actions qu'on lui -soumet. - - -@itemize @bullet{} -@item Entete - -@example -class JobId -@{ - friend class BatchManager; - - public: - // Constructeur standard et destructeur - JobId(); - virtual ~JobId(); - - // Constructeur avec le pointeur sur le BatchManager associe - // et avec une reference - JobId(BatchManager *, string ref); - - // Operateur d'affectation entre objets - virtual JobId & operator =(const JobId &); - - // Constructeur par recopie - JobId(const JobId &); - - // Accesseur pour la reference interne - virtual string getReference() const; - - // Methodes pour le controle du job - // retire un job du gestionnaire - virtual void deleteJob() const; - - // suspend un job en file d'attente - virtual void holdJob() const; - - // relache un job suspendu - virtual void releaseJob() const; - - // modifie un job en file d'attente - virtual void alterJob(const Parametre & param, - const Environnement & env) const; - virtual void alterJob(const Parametre & param) const; - virtual void alterJob(const Environnement & env) const; - - // modifie un job en file d'attente - virtual void setParametre(const Parametre & param); - virtual void setEnvironnement(const Environnement & env); - - // renvoie l'etat du job - virtual Batch::JobInfo queryJob() const; - - // Methodes pour l'interfacage avec Python (SWIG) - string __str__() const; // SWIG : affichage en Python - string __repr__() const; // SWIG : affichage en Python - - protected: - BatchManager * _p_batchmanager; // pointeur sur le BatchManager - // qui controle le job - string _reference; // reference du job au sein du BatchManager - - private: - -@}; -@end example - - -@item Exemple -@example -@dots{} (ici on cree un BatchManager bm et un Job job) - -// On soumet le job et on recupere un identifiant -JobId jobid = bm.submitJob(job); - -// Ce qui permet d'interroger l'etat du job en cours -JobInfo jinfo = jobid.queryJob(); - -@dots{} -@end example - -@item Methodes - -@itemize @minus{} -@item -@b{JobId()@* -JobId(BatchManager *, string ref)} - -Le constructeur par defaut cree un @emph{JobId} qui devra etre complete -par la suite. Ceci n'est pas directement realisable par l'utilisateur -mais sert pour certaines classes amies de la classe @emph{JobId}. - -D'un point de vue utilisateur la construction d'un objet @emph{JobId} -necessite un pointeur sur un gestionnaire de batch existant et une -chaine de caractere representant une reference au sein de ce -gestionnaire de batch. - -Ces parametres sont en general issus de la -communication avec l'API du gestionnaire de batch et ne peuvent etre -aisement deduits. C'est pourquoi il est recommande de passer par une -classe d'implementation pour fabriquer un objet @emph{JobId}. - - -@item -@b{~JobId()} - -Le destructeur libere l'espace occupe par l'objet. - -@item -@b{JobId & operator =(const JobId &)} - -L'affectation d'un objet @emph{JobId} duplique les donnees internes de -l'objet passe en argument. Les deux objets sont totalement independants -a l'issue de l'affectation et designent chacun la meme instance du job -dans le meme gestionnaire de batch. Le controle du job peut etre realise -avec l'un ou l'autre des objets. - -@item -@b{JobId(const JobId &)} - -De meme que l'affectation le constructeur par recopie produit un objet -@emph{JobId} totalement independant de l'objet passe en argument et qui -designe le meme job dans le meme gestionnaire de batch. Le controle du -job peut etre realise avec l'un ou l'autre des objets. - -@item -@b{string getReference() const} - -Cet accesseur retourne la reference du job pour le gestionnaire de batch -qui a produit l'objet. - -@item -@b{void deleteJob() const} - -Cette methode relaie aupres au gestionnaire de batch qui a produit -l'objet la demande d'arret du job. - -@item -@b{void holdJob() const} - -Cette methode relaie aupres au gestionnaire de batch qui a produit -l'objet la demande de suspension du job. - -@item -@b{void releaseJob() const} - -Cette methode relaie aupres au gestionnaire de batch qui a produit -l'objet la demande de liberation du job. - -@item -@b{void alterJob(const Parametre & param, const Environnement & env) const@* -void alterJob(const Parametre & param) const@* -void alterJob(const Environnement & env) const} - -Ces methodes relaient aupres du gestionnaire de batch qui a produit -l'objet la demande de modification des parametres et/ou des variables -d'environnement du job. - -@item -@b{void setParametre(const Parametre & param)} - -Cette methode n'est utile que pour l'interfacage avec Python, car Python -ne sait pas gerer la surcharge de methode, et de fait leve des -exceptions lors d'appels a de telles methodes. - -Elle est equivalente a la methode @samp{void alterJob(const Parametre & param) const}. - - -@item -@b{void setEnvironnement(const Environnement & env)} - -Cette methode n'est utile que pour l'interfacage avec Python, car Python -ne sait pas gerer la surcharge de methode, et de fait leve des -exceptions lors d'appels a de telles methodes. - -Elle est equivalente a la methode @samp{void alterJob(const Environnement & env) const}. - -@item -@b{Batch::JobInfo queryJob() const} - -Cette methode relaie aupres du gestionnaire de batch qui a produit -l'objet la demande d'interrogation de l'etat du job. - -@item -@b{string __str__() const} - -Cette methode n'est utile que pour l'interfacage avec Python. Elle -permet d'afficher l'etat de l'objet @emph{JobId}. - -@item -@b{string __repr__() const} - -Cette methode n'est utile que pour l'interfacage avec Python. Elle -permet d'afficher l'etat de l'objet @emph{JobId}. - -@end itemize -@end itemize - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classe JobInfo, Classe Parametre, Classe JobId, Classes utilisateur -@comment node-name, next, previous, up -@page -@subsubsection JobInfo -@findex JobInfo - -Un objet de classe @emph{JobInfo} represente l'ensemble des informations -disponibles sur un travail actif, c'est-a-dire soumis au gestionnaire de -batch, a un instant donne. - -Cet objet reprend des informations issues du job tel qu'il a ete soumis, -@xref{Classe Job}, mais aussi des informations produites par le -gestionnaire de batch a partir de la soumission et du transit du job en -son sein : nom de la queue dans laquelle le job est inscrit, duree -d'execution, date de soumission, etc. - -Ces informations sont disponibles aupres de l'utilisateur de la classe a -travers les objets @emph{Parametre} et @emph{Environnement} que l'objet -@emph{JobInfo} peut fournir. - -@itemize @bullet{} -@item Entete - -@example -class JobInfo -@{ - public: - // Constructeur standard et destructeur - JobInfo(); - virtual ~JobInfo(); - - // Constructeur par recopie - JobInfo(const JobInfo & jinfo); - - // Operateur pour l'affichage sur un stream - friend ostream & operator <<(ostream & os, const JobInfo & ji); - - // Accesseurs - virtual Parametre getParametre() const; - virtual Environnement getEnvironnement() const; - - // Methodes pour l'interfacage avec Python (SWIG) - string __str__() const; // SWIG : affichage en Python - string __repr__() const; // SWIG : affichage en Python - - protected: - Parametre _param; // parametres du job - Environnement _env; // variables d'environnement du job - - private: -@}; -@end example - - -@item Exemple -@example -@dots{} (ici on cree un BatchManager bm et un Job job) - -// On soumet le job et on recupere un identifiant -JobId jobid = bm.submitJob(job); - -// Ce qui permet d'interroger l'etat du job en cours -JobInfo jinfo = jobid.queryJob(); - -// On recupere l'objet Parametre interne modifie -// par le gestionnaire de batch -Parametre param = jinfo.getParametre(); - -// On recupere l'objet Environnement interne modifie -// par le gestionnaire de batch -Environnement env = jinfo.getEnvironnement(); - -@dots{} -@end example - -@item Methodes -@itemize @minus{} -@item -@b{JobInfo()} - -Ce constructeur cree un objet @emph{JobInfo} vide. - -@item -@b{~JobInfo()} - -Le destructeur libere l'espace memoire alloue par l'objet. - -@item -@b{JobInfo(const JobInfo & jinfo)} - -Le constructeur par recopie produit un objet identique a celui passe en -argument. Les deux objets sont totalement independants l'un de l'autre. - -@item -@b{ostream & operator <<(ostream & os, const JobInfo & ji)} - -Cet operateur permet de voir le contenu de l'objet sur un flot de sortie. - -@item -@b{Parametre getParametre() const} - -Cet accesseur retourne l'objet interne @emph{Parametre} modifie par le -gestionnaire de batch. En particulier on y retrouve toutes les clefs et -les valeurs correspondant aux informations produites dynamiquement par -le gestionnaire (duree d'execution, machine d'execution, etc.). -Il n'est pas garanti que les valeurs passees au moment de la soumission -soient inchangees car des modifications ont pu etre apportees a ces -valeurs pendant le traitement du job par le gestionnaire. - -@item -@b{Environnement getEnvironnement() const} - -Cet accesseur retourne l'objet interne @emph{Environnement} modifie par le -gestionnaire de batch. En particulier on y retrouve toutes les clefs et -les valeurs correspondant aux informations produites dynamiquement par -le gestionnaire (chemin d'acces, variables d'environnement specifiques a -la machine d'execution, etc.). -Il n'est pas garanti que les valeurs passees au moment de la soumission -soient inchangees car des modifications ont pu etre apportees a ces -valeurs pendant le traitement du job par le gestionnaire. - -@item -@b{string __str__() const} - -Cette methode n'est utile que pour l'interfacage avec Python. Elle -permet d'afficher l'etat de l'objet @emph{JobInfo}. - -@item -@b{string __repr__() const} - -Cette methode n'est utile que pour l'interfacage avec Python. Elle -permet d'afficher l'etat de l'objet @emph{JobInfo}. - -@end itemize - -@end itemize - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classe Parametre, Classe Versatile, Classe JobInfo, Classes utilisateur -@comment node-name, next, previous, up -@page -@subsubsection Parametre -@findex Parametre - -Les objets de la classe @emph{Parametre} se comportent comme des maps -STL, dont ils ont les fonctionnalites, decrivant les parametres -d'execution du job. - -Contrairement aux variables d'environnement qui sont decrites par les -objets de la classe @emph{Environnement}, les parametres d'execution -servent a preciser les contraintes qui pesent sur le job, comme par -exemple la duree maximale d'execution autorisee, la quantite maximale de -memoire utilisable ou la queue de soumission, ou bien a renseigner le -job avec des informations specifiques a l'utilisateur, comme son -username, son adresse email, le code d'imputation du job, etc. - -En raison du caractere tres specifique et precis des informations qui -doivent etre fournies au gestionnaire de batch, une nomenclature est -proposee par la classe @emph{Parametre} qu'il est vivement conseille de -suivre. De plus tout a ete fait pour rendre cette ecriture naturelle et -facile, donc il ne devrait pas y avoir de probleme pour l'utiliser. - -Ainsi, a titre d'exemple, pour preciser le temps maximal autorise pour -un job, il faut creer une clef de nom @var{maxcputime} dans un objet de -classe @emph{Parametre} qui sera ensuite passe au job. Et pour preciser -le code d'imputation du job, il faut creer une clef de nom @var{account}. - -Mais cet exemple simple montre que la valeur associee a la clef -@var{maxcputime} est semantiquement une duree, et que la valeur associee a -la clef @var{account} est semantiquement un nom. On a donc un probleme de -type puisque dans la definition d'une map STL le type de la valeur doit -etre le meme, et ce meme si les valeurs doivent par la suite avoir des -types semantiques differents. C'est pourquoi on a definit une classe -@emph{Versatile} qui encapsule des types differents. @xref{Classe -Versatile}. - -Quoiqu'il en soit toute la mecanique est cachee et seul importe pour -l'utilisateur de savoir que les valeurs associees aux clefs sont typees -et que ces types sont definis dans l'enumeration @emph{DiscriminatorType}. -@xref{Classe Versatile}. - - -@itemize @bullet{} -@item Entete - -@example -class Parametre : public map< string, Versatile > -@{ - public: - // Constructeur standard - Parametre(); - - // Constructeur par recopie - Parametre(const Parametre & PM); - - // Operateur de recherche dans la map - Versatile & operator [] (const string &); - const Versatile & operator [] (const string &) const; - - // Operateur d'affectation - Parametre & operator =(const Parametre & PM); - - // Declarations statique des clefs de la map - static const string ACCOUNT; - static const string CHECKPOINT; - static const string CKPTINTERVAL; - static const string CREATIONTIME; - static const string EGROUP; - static const string ELIGIBLETIME; - static const string EUSER; - static const string EXECUTABLE; - static const string EXECUTIONHOST; - static const string HOLD; - static const string ID; - static const string INFILE; - static const string MAIL; - static const string MAXCPUTIME; - static const string MAXDISKSIZE; - static const string MAXRAMSIZE; - static const string MAXWALLTIME; - static const string MODIFICATIONTIME; - static const string NAME; - static const string OUTFILE; - static const string PID; - static const string QUEUE; - static const string QUEUEDTIME; - static const string SERVER; - static const string STARTDATE; - static const string STATE; - static const string TEXT; - static const string TMPDIR; - static const string USEDCPUTIME; - static const string USEDDISKSIZE; - static const string USEDRAMSIZE; - static const string USEDWALLTIME; - static const string USER; - - protected: - // map interne servant a controler le type - // de la valeur associee a chaque clef - map< string, TypeParam > TypeMap; - - private: - -@}; -@end example - - -@item Exemple -@example -@dots{} - -Parametre param; - -param[EXECUTABLE] = "/home/user/mon_application/executable"; -param[NAME] = "MonJob"; -param[ACCOUNT] = "MonProjet"; // code d'imputation/facturation -param[MAXCPUTIME] = 360L; // 6min -param[MAXWALLTIME] = 480L; // 8min -param[INFILE] = Couple("/tmp/infich1", rempath + "/infich1"); -param[OUTFILE] = Couple("/tmp/outfich1", rempath + "/outfich1"); -param[OUTFILE] += Couple("stderr", path + "/STDERR"); -param[OUTFILE] += Couple("stdout", path + "/STDOUT"); -param[MAIL] = "user@@domaine.fr"; -param[USER] = "user"; - -@dots{} -@end example - -@item Methodes -@itemize @minus{} - -@item -@b{Parametre()} - -Le constructeur par defaut initialise l'objet @emph{Parametre} et cree -la table des types internes. Par contre l'objet ne contient aucune valeur. - -@item -@b{Parametre(const Parametre & PM)} - -Le constructeur par recopie cree un objet @emph{Parametre} a l'image de -celui qui lui est passe en argument. La table des types internes est -dupliquee ainsi que tous les objets correspondant a chacune des clefs. - -@item -@b{Versatile & operator [] (const string &)} - -Cet operateur permet de recuperer la valeur designee par la clef passee -en argument. Cette valeur est de classe @emph{Versatile} qui encapsule -tous les types de base utilisables dans la bibliotheque en tant que -parametre. @xref{Classe Versatile}. - - -@item -@b{const Versatile & operator [] (const string &) const} - -A l'image de l'operateur precedent, cet operateur permet de recuperer la -valeur designee par la clef passee en argument mais uniquement pour des -objets constants. - -@item -@b{Parametre & operator =(const Parametre & PM)} - -L'operateur d'affectation remplace l'ensemble du contenu de l'objet -@emph{Parametre} par le contenu de l'objet passe en argument. Les -valeurs sont dupliquees par rapport a l'objet @var{pm}. - -@end itemize - -@item Description des clefs - -Selon les gestionnaires de batch utilises, certaines clefs sont actives -ou inactives. Une definition superflue ne pose pas de probleme et se -trouve ignoree au moment de la soumission. Par contre l'absence d'un -clef peut empecher la soumission d'aboutir et lever une exception. - -@itemize @minus{} -@item ACCOUNT : type STRING - -Le code de facturation sur lequel le job doit s'imputer. - -@item CHECKPOINT : type LONG - -Une valeur non nulle indique au gestionnaire de batch que le job est -@dfn{checkpointable}, c'est-a-dire interruptible pour une reprise -ulterieure. - -@item CKPTINTERVAL : type LONG - -En liaison avec la clef @var{CHECKPOINT}, la clef @var{CKPTINTERVAL} -indique l'intervalle en secondes entre deux interruptions du code -(@dfn{checkpoint}). - -@item CREATIONTIME : type LONG - -La date a laquelle le job a ete cree (soumis) dans le gestionnaire de batch. - -@item EGROUP : type STRING - -Le groupe effectif au sens Unix du terme dans lequel le job s'execute. - -@item ELIGIBLETIME : type LONG - -La date a laquelle le job a pu disposer des ressources necessaires a son -execution. - -@item EUSER : type STRING - -L'utilisateur effectif au sens Unix du terme pour lequel le job s'execute. - -@item EXECUTABLE : type STRING - -Le chemin d'acces absolu a l'executable sur la machine qui soumet le job. - -@item EXECUTIONHOST : type STRING - -Le nom de la machine qui execute le job. - -@item HOLD : type LONG - -Une valeur non nulle indique au gestionnaire de batch que le job doit -etre place dans l'etat suspendu. Une valeur nulle libere le job. - -@item ID : type STRING - -L'identifiant unique du job pour le gestionnaire de batch. - -@item INFILE : type liste de COUPLE - -La clef @var{infile} liste les fichiers qui seront envoyes au job avant -son execution. Chaque fichier peut avoir un nom different sur la machine -cliente --- qui soumet le job --- et sur le serveur. C'est pourquoi -chaque fichier a envoyer est represente par un couple dont le nom @var{local} -est le chemin absolu du fichier sur la machine cliente et le nom -@var{remote} est le chemin absolu du fichier sur le -serveur. @xref{Classe Couple}. - -Si le nom @var{remote} vaut @samp{stdin}, alors le contenu du fichier -designe par le nom @var{local} est envoye sur l'entree standard du job -au moment de son execution. - -@item MAIL : type STRING - -L'adresse email de l'utilisateur ou lui seront envoyes les eventuels -messages d'information et d'alerte du gestionnaire de batch. - -@item MAXCPUTIME : type LONG - -Le temps de calcul (@i{CPU time}) en secondes que ne devra pas depasser le job. - -@item MAXDISKSIZE : type LONG - -L'espace disque en octets que ne devra pas depasser le job. - -@item MAXRAMSIZE : type LONG - -La quantite de memoire vive en octets que ne devra pas depasser le job. - -@item MAXWALLTIME : type LONG - -Le temps reel (@i{elapsed time}) en secondes que ne devra pas depasser le job. - -@item MODIFICATIONTIME : type LONG - -La date a laquelle le job a ete modifie pour la derniere fois dans le -gestionnaire de batch. Cette date correspond le plus souvent a la -derniere operation realisee par le gestionnaire dans la gestion du job : -routage au sein des files, suspension ou reprise, etc. - -@item NAME : type STRING - -Le nom du job tel qu'il apparait a l'utilisateur dans son dialogue avec -le gestionnaire de batch. Ce nom n'a pas besoin d'etre unique et ne -remplace pas l'identifiant (ID). Il n'est la que pour informer -l'utilisateur de la nature de son job. - -@item OUTFILE : type liste de COUPLE - -La clef @var{outfile} liste les fichiers qui sont produits par le job et -qui seront recuperes sur la machine locale de l'utilisateur apres -son execution. Chaque fichier peut avoir un nom different sur la machine -cliente --- qui soumet le job --- et sur le serveur. C'est pourquoi -chaque fichier a recuperer est represente par un couple dont le nom @var{local} -est le chemin absolu du fichier sur la machine cliente et le nom -@var{remote} est le chemin absolu du fichier sur le -serveur. @xref{Classe Couple}. - -Si le nom @var{local} vaut @samp{stdout}, alors le contenu du fichier -designe par le nom @var{local} contient la sortie standard du job -au moment de son execution. - -Si le nom @var{local} vaut @samp{stderr}, alors le contenu du fichier -designe par le nom @var{local} contient la sortie d'erreur du job -au moment de son execution. - -@item PID : type LONG - -La valeur du PID (@i{process identifier}) du job sur la machine sur -lqsuelle il s'execute. - -@item QUEUE : type STRING - -Le nom de la queue, aussi appelee classe ou file suivant les -terminologies, qui accueille le job. - -@item QUEUEDTIME : type LONG - -La date depuis laquelle le job a ete place en queue dans le gestionnaire -de batch. - -@item SERVER : type STRING - -Le nom complet du serveur qui recoit les soumissions de job. - -@item STARTDATE : type LONG - -La date a partir de laquelle l'utilisateur desire que le job soit -execute. L'execution ne demarrera qu'au dela de cette date et a -condition que toutes les conditions de ressources soient remplies. - -@item STATE : type STRING - -L'etat actuel du job. - -ATTENTION : Ces valeurs ne sont pas encore normalisees. - -@item TEXT : type STRING - -Un texte d'information que le gestionnaire peut emettre a destination de -l'utilisateur lorsque l'ensemble des parametres n'est pas suffisant pour -traduire l'etat reel du job. Par exemple, ce message peut informer -l'utilisateur de la raison qui maintient un job dans un etat suspendu ou -qui l'empeche de s'executer. - -@item TMPDIR : type STRING - -Un chemin d'acces absolu a un repertoire qui sera cree au demarrage du -job et qui isolera le job des autres travaux en cours d'execution sur la -meme machine. - -@item USEDCPUTIME : type LONG - -Le temps de calcul (@i{CPU time}) en secondes reellement consomme par le job. - -@item USEDDISKSIZE : type LONG - -L'espace disque en octets reellement consomme par le job. - -@item USEDRAMSIZE : type LONG - -L'espace disque en octets reellement consommee par le job. - -@item USEDWALLTIME : type LONG - -Le temps reel (@i{elapsed time}) en secondes reellement consomme par le job. - -@item USER : type STRING - -Le nom de l'utilisateur (@i{username}) sous lequel le job devra tourner -sur la machine d'execution. Ce parametre est utile lorsque l'utilisateur -possede des comptes differents sur les machines sur lequel il soumet et calcule. - -@end itemize - - -@end itemize - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classe Versatile, Exceptions, Classe Parametre, Classes utilisateur -@comment node-name, next, previous, up -@page -@subsubsection Versatile -@findex Versatile - -Cette classe est normalement invisible en tant que telle a l'utilsateur -de la bibliotheque de classes Batch. Mais il est tout de meme utile de -la presenter car son action est visible, notamment dans son interaction -fine avec la classe @emph{Parametre}. @xref{Classe Parametre}. - -Comme il a ete precise dans la descrption de la classe @emph{Parametre}, -la classe @emph{Versatile} a ete concue pour encapsuler les valeurs de -la map @emph{Parametre} qui peuvent etre de types effectifs differents. - -Ces types, decrits par l'enumeration @emph{DiscriminatorType}, sont -actuellement au nombre de trois : @var{long}, @var{string} et -@var{couple}. Ces types correpondent au types de base du langage C++ ou -de la biliotheque de classes Batch. @xref{Types de base}. - -Le type special @var{undefined} ne sert que pour l'objet -@emph{Versatile} juste cree mais non encore affecte d'une valeur et donc -d'un type. La premiere affection d'une valeur a un objet -@emph{Versatile} non encore affecte lui donne automatiquement le type de -la valeur. - -Les objets de classe @emph{Versatile} peuvent se comporter soit comme -des variables scalaires, c'est-a-dire ne contenant qu'une valeur unique, -soit comme des listes, auquel cas elles utilisent l'interface des -@emph{list} de la STL. Toutefois afin de faciliter l'ecriture pour -l'utilisateur basique de la classe @emph{Versatile} --- et de la classe -@emph{Parametre} ---, des operateurs de concatenation @samp{+=} et -@samp{,} ont ete ajoutes. - - -@itemize @bullet{} -@item Entete - -@example -// Les types autorises -enum DiscriminatorType @{ UNDEFINED, LONG, STRING, COUPLE @}; - -typedef struct @{ - DiscriminatorType type; // le type de l'element interne - int maxelem; // le nombre d'elements autorises -@} TypeParam; - -class Versatile : public list< GenericType * > -@{ - public: - // Constructeur standard et destructeur - Versatile(); - virtual ~Versatile(); - - // Constructeur par recopie - Versatile(const Versatile & V); - - // Constructeur depuis le type de "base" - Versatile(long l); - Versatile(const string & s); - Versatile(const Couple & c); - - // Operateur d'affectation et de concatenation - // a partir d'un type de "base" - Versatile & operator = (const long l) - throw(TypeMismatchException); - Versatile & operator = (const string & ch) - throw(TypeMismatchException); - Versatile & operator +=(const string & ch) - throw(TypeMismatchException,ListIsFullException); - Versatile & operator , (const string & ch) - throw(TypeMismatchException,ListIsFullException); - Versatile & operator = (const Couple & cp) - throw(TypeMismatchException); - Versatile & operator +=(const Couple & cp) - throw(TypeMismatchException,ListIsFullException); - Versatile & operator , (const Couple & cp) - throw(TypeMismatchException,ListIsFullException); - - // Operateur d'affectation entre objets - Versatile & operator = (const Versatile & V) - throw(TypeMismatchException); - - // Conversion de type vers un type de "base" - operator long() const throw(TypeMismatchException); - operator string() const throw(TypeMismatchException); - operator Couple() const throw(TypeMismatchException); - string str() const throw(TypeMismatchException); - - // Operateur pour l'affichage sur un stream - friend ostream & operator << (ostream & os, const Versatile & ); - - // Positionnement et recuperation du type de l'element interne - void setType(DiscriminatorType) throw(TypeMismatchException); - DiscriminatorType getType() const; - - // Positionnement et recuperation du nombre d'elements internes - void setMaxSize(int i); - int getMaxSize() const; - - // Positionnement et recuperation du nom de l'objet - string getName() const; - void setName(const string & name); - - protected: - // Efface tous les elements internes de l'objet - virtual void eraseAll(); - - DiscriminatorType _discriminator; // type de l'element interne - int _maxsize; // nombre max d'elements internes - string _name; // nom de l'objet (sert pour les exceptions) - - private: - -@}; -@end example - - -@item Exemple -@example -@dots{} - -// On cree un objet Versatile non encore affecte (scalaire) -Versatile Vlong; - -// L'affectation d'un long lui donne le type LONG -Vlong = 1024L * 1024L * 1024L; -cout << "Versatile long (must be 1073741824) : " << Vlong << endl; - -// On cree un objet Versatile non encore affecte (scalaire) -Versatile Vstring; - -// L'affectation d'une string (const char * promu en string) -// lui donne le type STRING -Vstring = "UneChaine"; -cout << "Versatile string (must be UneChaine) : " << Vstring << endl; - -try - @{ - // L'affectation d'un autre type leve une exception. - // Il n'y a pas de retypage dynamique. - Vlong = ""; - cout << "ERR : No TypeMismatchException catched for Versatile long" - << endl; - @} -catch (TypeMismatchException & ex) - @{ - cout << "OK : TypeMismatchException catched for Versatile long" - << endl; - @} - -// Reaffectation avec le meme type -Vlong = 1024L * 1024L; -cout << "Versatile long (must be 1048576) : " << Vlong << endl; - -// On cree un objet Versatile non encore affecte (scalaire) ... -Versatile Vcat1; - -// ... que l'on transforme en liste (non limitee) -Vcat1.setMaxSize(0); - -// On affecte la premiere valeur ... -Vcat1 = "A"; - -// ... puis les suivantes par concatenation -Vcat1 += "B"; -Vcat1 += "C"; -Vcat1 += "D"; -Vcat1 += "E"; -cout << "Versatile string concatenation (must be A B C D E) : " - << Vcat1 << endl; - -// Idem que pour Vcat1, mais avec une limite a 5 elements dans la liste -Versatile Vcat2; -Vcat2.setMaxSize(5); -Vcat2 = "a", "b", "c", "d", "e"; -cout << "Versatile string concatenation (must be a b c d e) : " - << Vcat2 << endl; - -// On tronque les 2 derniers elements de la liste (il en reste 3) -Vcat2.setMaxSize(3); -cout << "Versatile string concatenation (must be a b c) : " - << Vcat2 << endl; - - -Versatile Vcopy2(Vcat2); -cout << "Versatile copy (must be a b c) : " << Vcopy2 << endl; - -Versatile Vaffect; -Vaffect = Vcat1; -cout << "Versatile affect (must be A B C D E) : " << Vaffect << endl; -Vaffect = Vcat2; -cout << "Versatile affect (must be a b c) : " << Vaffect << endl; - -try - @{ - // Retypage dynamique interdit - Vaffect = Vlong; - cout << "ERR : No TypeMismatchException catched for Versatile" - << endl; - @} -catch (TypeMismatchException & ex) - @{ - cout << "OK : TypeMismatchException catched for Versatile string" - << endl; - @} - -try - @{ - // Concatenation au dela de la limite interdit - Vcat2 += "En trop"; - cout << "ERR : No ListIsFullException catched for Versatile string" - << endl; - @} -catch (ListIsFullException & ex) - @{ - cout << "OK : ListIsFullException catched for Versatile string" - << endl; - @} - -// Les objets Versatile se comportent (presque) comme des objets -// standards du langage -long L = Vlong; -cout << "Long value of Versatile long (must be 1048576) : " - << L << endl; - -string S = Vstring; -cout << "String value of Versatile (must be EncoreUneAutreChaine):" - << S << endl; - -@dots{} -@end example - -@item Methodes -@itemize @minus{} -@item -@b{Versatile()} - -Le constructeur par defaut fabrique un objet scalaire de type -@var{undefined} et de nom @samp{undefined}. - -@item -@b{~Versatile()} - -Le destructeur efface tout le contenu de l'objet si celui-ci avait ete affecte. - -@item -@b{Versatile(const Versatile & V)} - -Le constructeur par recopie duplique l'objet passe en argument ainsi que -les valeurs qu'il contient. Le nouvel objet est totalement independant -de son geniteur. - -@item -@b{Versatile(long l)@* -Versatile(const string & s)@* -Versatile(const Couple & c)} - -Ces constructeurs fabriquent des objets scalaires @emph{Versatile} a partir des -types de base passes en argument. Chaque objet acquerera definitivement -le type correspondant au type de base : @var{long} pour @samp{long}, -@var{string} pour @samp{string} et @var{couple} pour @samp{Couple}. - -@item -@b{Versatile & operator = (const long l) throw(TypeMismatchException)@* -Versatile & operator = (const string & ch) throw(TypeMismatchException)@* -Versatile & operator = (const Couple & cp) throw(TypeMismatchException)} - -Ces operateurs affectent ou reaffectent la valeur passee en argument a -l'objet. Le type de la valeur doit correspondre au type de l'objet si -celui-ci a deja ete affecte, sinon une exception @emph{TypeMismatchException} est -levee. @xref{Classe TypeMismatchException}. - -L'ancienne valeur de l'objet est perdue. - -@item -@b{Versatile & operator += (const string & ch) - throw(TypeMismatchException, ListIsFullException)@* -Versatile & operator , (const string & ch) - throw(TypeMismatchException, ListIsFullException)@* -Versatile & operator += (const Couple & cp) - throw(TypeMismatchException, ListIsFullException)@* -Versatile & operator , (const Couple & cp) - throw(TypeMismatchException, ListIsFullException)} - -Ces operateurs concatenent la valeur passee en argument a l'objet. Le -type de la valeur doit correspondre au type interne de l'objet si -celui-ci a deja ete affecte, sinon une exception @emph{TypeMismatchException} est -levee. @xref{Classe TypeMismatchException}. - -Si la taille maximale de la liste est depasse, une exception @emph{ListIsFullException} est -levee. @xref{Classe ListIsFullException}. - -@item -@b{Versatile & operator = (const Versatile & V) throw(TypeMismatchException)} - -L'operateur d'affectation duplique l'objet passe en argument dans -l'objet. Toutes les valeurs internes sont dupliquees de maniere a avoir -une independance totale entre les deux objets a l'issue de -l'affectation. - -Il est a noter qu'il est possible d'affecter a un objet un objet -possedant un type different, auquel cas l'objet courant change de type -pour acquerir celui de l'objet passe en argument. C'est le seul cas de -changement de type autorise pour un objet. - -@item -@b{operator long() const throw(TypeMismatchException)@* -operator string() const throw(TypeMismatchException)@* -operator Couple() const throw(TypeMismatchException)@* -string str() const throw(TypeMismatchException)} - -Ces operateur de conversion dans les types de base permettent de -recuperer la valeur interne de l'objet. Lorsque le type interne est -incompatible avec la conversion une exception @emph{TypeMismatchException} est -levee. @xref{Classe TypeMismatchException}. - -@item -@b{ostream & operator << (ostream & os, const Versatile & )} - -Cet operateur permet de voir le contenu de l'objet sur un flot de sortie. - -@item -@b{void setType(DiscriminatorType) throw(TypeMismatchException)} - -Cette methode change le type interne de l'objet en celui passe en -argument. Ceci n'est possible que pour un objet non encore affecte. Si -le nouveau type est different du type actuel une exception @emph{TypeMismatchException} est -levee. @xref{Classe TypeMismatchException}. - -@item -@b{DiscriminatorType getType() const} - -Cet accesseur renvoie le type interne de l'objet. - -@item -@b{void setMaxSize(int i)} - -Cette methode permet de changer le nombre d'elements que l'objet est -capable de stocker. Par defaut ce nombre est 1 a la construction de -l'objet, signifiant qu'il ne peut contenir qu'une seule valeur a la fois -(scalaire). - -Si ce nombre est superieur a 1 alors il represente une -limite qui ne pourra etre depassee par l'objet sans lever d'exception -@emph{ListIsFullException}. @xref{Classe ListIsFullException}. - -Si ce nombre vaut 0 (zero) alors il n'y a aucune limite superieure au -nombre d'element dans l'objet. - -@item -@b{int getMaxSize() const} - -Cet accesseur renvoie la taille maximale admise par l'objet. - -@item -@b{void setName(const string & name)} - -Cette methode permet de positionner le nom de l'objet. Par defaut ce nom -vaut @samp{undefined} a la construction de l'objet. - -Il est interessant de positionner le nom a une valeur significative -comme par exemple le nom de la variable contenant l'objet car lorsqu'une -exception est levee ce nom apparait en clair et aide au debugging. - -@item -@b{string getName() const} - -Cet accesseur renvoie le nom interne de l'objet. - -@end itemize - -@end itemize - - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Exceptions, Classe APIInternalFailureException, Classe Versatile, Classes generiques -@comment node-name, next, previous, up -@page -@subsection Exceptions -@cindex exceptions - -La bibliotheque de classes Batch definit un certain nombre d'exceptions -qui sont levees par les classes lors d'evenements qui traduisent un -comportement anormal de la bibliotheque. - -@menu -* Classe APIInternalFailureException:: Erreur d'utilisation de l'API. -* Classe ConnexionFailureException:: Probleme de connexion de l'API. -* Classe GenericException:: Classe-mere de toutes les exceptions. -* Classe InvalidArgumentException:: Parametre errone d'une methode. -* Classe InvalidKeyException:: Clef erronee d'une map. -* Classe ListIsFullException:: Debordement de taille d'une liste. -* Classe NotYetImplementedException:: Methodes non encore implementee. -* Classe RunTimeException:: Erreur d'execution imprevue. -* Classe TypeMismatchException:: Probleme de conversion de type. -@end menu - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classe APIInternalFailureException, Classe ConnexionFailureException, Exceptions, Exceptions -@comment node-name, next, previous, up -@page -@subsubsection APIInternalFailureException -@findex APIInternalFailureException - -Cette exception est levee par les classes d'implementation de la -bibliotheque lorsqu'une erreur est detectee au moment de la -communication avec l'API du gestionnaire de batch. En general l'erreur -renvoyee par l'API est incluse dans le message de l'exception. - -Cette exception herite de la classe @emph{GenericException} qui definit -uniquement un constructeur et deux membres publics constants : @emph{type} et -@emph{message}. @xref{Classe GenericException}. - -@itemize @bullet{} -@item Entete - -@example -class APIInternalFailureException : public GenericException -@{ - public: - // Constructeur - APIInternalFailureException(string msg = "undefined"); -@}; -@end example - - -@item Methodes -@itemize @minus{} -@item -@b{APIInternalFailureException(string msg = "undefined")} - -Ce contructeur prend la chaine @emph{msg} comme message d'erreur a -renvoyer au gestionnaire d'exception. Cette valeur est stockee dans le -membre public constant @emph{message}. - -Le membre public constant @emph{type} est initialise avec le nom de la -classe, soit @emph{APIInternalFailureException}. - -@end itemize - -@end itemize - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classe ConnexionFailureException, Classe GenericException, Classe APIInternalFailureException, Exceptions -@comment node-name, next, previous, up -@page -@subsubsection ConnexionFailureException -@findex ConnexionFailureException - -Cette exception est levee par les classes d'implementation de la -bibliotheque lorsqu'une erreur est detectee au moment de la -connexion au gestionnaire de batch. En general l'erreur -renvoyee par l'API de connexion est incluse dans le message de l'exception. - -Cette exception herite de la classe @emph{GenericException} qui definit -uniquement un constructeur et deux membres publics constants : @emph{type} et -@emph{message}. @xref{Classe GenericException}. - -@itemize @bullet{} -@item Entete - -@example -class ConnexionFailureException : public GenericException -@{ - public: - // Constructeur - ConnexionFailureException(string msg = "undefined"); -@}; -@end example - - -@item Methodes -@itemize @minus{} -@item -@b{ConnexionFailureException(string msg = "undefined")} - -Ce contructeur prend la chaine @emph{msg} comme message d'erreur a -renvoyer au gestionnaire d'exception. Cette valeur est stockee dans le -membre public constant @emph{message}. - -Le membre public constant @emph{type} est initialise avec le nom de la -classe, soit @emph{ConnexionFailureException}. - -@end itemize - -@end itemize - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classe GenericException, Classe InvalidArgumentException, Classe ConnexionFailureException, Exceptions -@comment node-name, next, previous, up -@page -@subsubsection GenericException -@findex GenericException - -Cette classe est generique comme son nom l'indique et definit une -interface commune pour toutes les exceptions de la -bibliotheque. - -Cette exception definit uniquement un constructeur et deux membres -publics constants : @emph{type} et @emph{message}. @xref{Classe -GenericException}. - - -@itemize @bullet{} -@item Entete - -@example -class GenericException -@{ - public: - const string type; // la nature de l'exception - const string message; // la raison de l'exception - - // Constructeur - GenericException(const string tp = "GenericException", - const string msg = "undefined"); -@}; -@end example - - -@item Methodes -@itemize @minus{} -@item -@b{GenericException(const string tp = "GenericException", const string msg = "undefined")} - -Ce contructeur prend la chaine @emph{msg} comme message d'erreur a -renvoyer au gestionnaire d'exception. Cette valeur est stockee dans le -membre public constant @emph{message}. - -Le membre public constant @emph{type} est initialise avec le parametre -@emph{tp} qui contient generalement le nom de la classe. - -@end itemize - -@end itemize - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classe InvalidArgumentException, Classe InvalidKeyException, Classe GenericException, Exceptions -@comment node-name, next, previous, up -@page -@subsubsection InvalidArgumentException -@findex InvalidArgumentException - -Cette exception est levee par les classes de la bibliotheque lorsqu'un -parametre erronne est passe en argument a une methode. En general -le nom de l'arguement erronne est inclus dans le message de -l'exception. - -Cette exception herite de la classe @emph{GenericException} qui definit -uniquement un constructeur et deux membres publics constants : @emph{type} et -@emph{message}. @xref{Classe GenericException}. - -@itemize @bullet{} -@item Entete - -@example -class InvalidArgumentException : public GenericException -@{ - public: - // Constructeur - InvalidArgumentException(string msg = "undefined"); -@}; -@end example - - -@item Methodes -@itemize @minus{} -@item -@b{InvalidArgumentException(string msg = "undefined")} - -Ce contructeur prend la chaine @emph{msg} comme message d'erreur a -renvoyer au gestionnaire d'exception. Cette valeur est stockee dans le -membre public constant @emph{message}. - -Le membre public constant @emph{type} est initialise avec le nom de la -classe, soit @emph{InvalidArgumentException}. - -@end itemize - -@end itemize - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classe InvalidKeyException, Classe ListIsFullException, Classe InvalidArgumentException, Exceptions -@comment node-name, next, previous, up -@page -@subsubsection InvalidKeyException -@findex InvalidKeyException - - -Cette exception est levee par les methodes de la classe @emph{Parametre} -lorsqu'une clef erronnee est utilisee. En general le nom de la clef -erronnee est inclus dans le message de l'exception. - -Cette exception herite de la classe @emph{GenericException} qui definit -uniquement un constructeur et deux membres publics constants : @emph{type} et -@emph{message}. @xref{Classe GenericException}. - -@itemize @bullet{} -@item Entete - -@example -class InvalidKeyException : public GenericException -@{ - public: - // Constructeur - InvalidKeyException(string msg = "undefined"); -@}; -@end example - - -@item Methodes -@itemize @minus{} -@item -@b{InvalidKeyException(string msg = "undefined")} - -Ce contructeur prend la chaine @emph{msg} comme message d'erreur a -renvoyer au gestionnaire d'exception. Cette valeur est stockee dans le -membre public constant @emph{message}. - -Le membre public constant @emph{type} est initialise avec le nom de la -classe, soit @emph{InvalidKeyException}. - -@end itemize - -@end itemize - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classe ListIsFullException, Classe NotYetImplementedException, Classe InvalidKeyException, Exceptions -@comment node-name, next, previous, up -@page -@subsubsection ListIsFullException -@findex ListIsFullException - -Cette exception est levee par les methodes de la classe @emph{Versatile} -lorsque la taille maximale de la liste interne est depasse. En general -le nom de l'objet en erreur est inclus dans le message de l'exception. - -Cette exception herite de la classe @emph{GenericException} qui definit -uniquement un constructeur et deux membres publics constants : @emph{type} et -@emph{message}. @xref{Classe GenericException}. - -@itemize @bullet{} -@item Entete - -@example -class ListIsFullException : public GenericException -@{ - public: - // Constructeur - ListIsFullException(string msg = "undefined"); -@}; -@end example - - -@item Methodes -@itemize @minus{} -@item -@b{ListIsFullException(string msg = "undefined")} - -Ce contructeur prend la chaine @emph{msg} comme message d'erreur a -renvoyer au gestionnaire d'exception. Cette valeur est stockee dans le -membre public constant @emph{message}. - -Le membre public constant @emph{type} est initialise avec le nom de la -classe, soit @emph{ListIsFullException}. - -@end itemize - -@end itemize - - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classe NotYetImplementedException, Classe RunTimeException, Classe ListIsFullException, Exceptions -@comment node-name, next, previous, up -@page -@subsubsection NotYetImplementedException -@findex NotYetImplementedException - -Cette exception est levee par les classes de la bibliotheque lorsqu'une -methode declaree mais non encore implementee est utilisee. En general -le nom de l'objet en erreur est inclus dans le message de l'exception. - -Cette exception herite de la classe @emph{GenericException} qui definit -uniquement un constructeur et deux membres publics constants : @emph{type} et -@emph{message}. @xref{Classe GenericException}. - -@itemize @bullet{} -@item Entete - -@example -class NotYetImplementedException : public GenericException -@{ - public: - // Constructeur - NotYetImplementedException(string msg = "undefined"); -@}; -@end example - - -@item Methodes -@itemize @minus{} -@item -@b{NotYetImplementedException(string msg = "undefined")} - -Ce contructeur prend la chaine @emph{msg} comme message d'erreur a -renvoyer au gestionnaire d'exception. Cette valeur est stockee dans le -membre public constant @emph{message}. - -Le membre public constant @emph{type} est initialise avec le nom de la -classe, soit @emph{NotYetImplementedException}. - -@end itemize - -@end itemize - - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classe RunTimeException, Classe TypeMismatchException, Classe NotYetImplementedException, Exceptions -@comment node-name, next, previous, up -@page -@subsubsection RunTimeException -@findex RunTimeException - -Cette exception est levee par les classes de la bibliotheque lorsqu'une -erreur inconnue et imprevue apparait. Cette exception est le -comportement par defaut que doit gerer le gestionnaire d'exception en ce -qui concerne les classes de la bibliotheque. En general le nom de -l'objet en erreur est inclus dans le message de l'exception. - -Cette exception herite de la classe @emph{GenericException} qui definit -uniquement un constructeur et deux membres publics constants : @emph{type} et -@emph{message}. @xref{Classe GenericException}. - -@itemize @bullet{} -@item Entete - -@example -class RunTimeException : public GenericException -@{ - public: - // Constructeur - RunTimeException(string msg = "undefined"); -@}; -@end example - - -@item Methodes -@itemize @minus{} -@item -@b{RunTimeException(string msg = "undefined")} - -Ce contructeur prend la chaine @emph{msg} comme message d'erreur a -renvoyer au gestionnaire d'exception. Cette valeur est stockee dans le -membre public constant @emph{message}. - -Le membre public constant @emph{type} est initialise avec le nom de la -classe, soit @emph{RunTimeException}. - -@end itemize - -@end itemize - - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classe TypeMismatchException, Classes specifiques, Classe RunTimeException, Exceptions -@comment node-name, next, previous, up -@page -@subsubsection TypeMismatchException -@findex TypeMismatchException - -Cette exception est levee par les methodes de la classe @emph{Versatile} -lorsque qu'une erreur de type est rencontree dans un objet. Ce genre -d'erreur survient lorsqu'on essaie d'affecter une valeur d'un type -different du type interne de l'objet @emph{Versatile} a ce meme objet, -ou bien lorsqu'on ajoute une valeur d'un type different a une liste. En -general le nom de l'objet en erreur est inclus dans le message de -l'exception. - -Cette exception herite de la classe @emph{GenericException} qui definit -uniquement un constructeur et deux membres publics constants : @emph{type} et -@emph{message}. @xref{Classe GenericException}. - -@itemize @bullet{} -@item Entete - -@example -class TypeMismatchException : public GenericException -@{ - public: - // Constructeur - TypeMismatchException(string msg = "undefined"); -@}; -@end example - - -@item Methodes -@itemize @minus{} -@item -@b{TypeMismatchException(string msg = "undefined")} - -Ce contructeur prend la chaine @emph{msg} comme message d'erreur a -renvoyer au gestionnaire d'exception. Cette valeur est stockee dans le -membre public constant @emph{message}. - -Le membre public constant @emph{type} est initialise avec le nom de la -classe, soit @emph{TypeMismatchException}. - -@end itemize - -@end itemize - - - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classes specifiques, Classes PBS, Classe TypeMismatchException, Classes -@comment node-name, next, previous, up -@page -@section Classes specifiques -@cindex classes specifiques - -Afin de pouvoir se connecter aux gestionnaires de batch reels a travers -leurs API, les classes generiques ont ete derivees pour offrir une -implementation correspondant a l'interface qu'elles definissent. - -Pour traduire a la fois le fait que les nouvelles classes derivent d'une -classe generique et qu'elles sont une implementation d'une API -particuliere, on adopte la convention de nom suivante : la classe se -nomme comme sa classe generique mais est suffixee par le nom de l'API du -gestionnaire de batch, les deux termes etant separes par un caractere -@kbd{_} (souligne). - -Actuellement, seul le gestionnaire de batch OpenPBS, @xref{Prerequis}, est -supporte. Mais ce catalogue devrait s'enrichir par la suite. - -Les classes de la bibliotheque sont egalement accessibles a travers un -interpreteur Python, ce qui a necessite la creation de certaines classes -d'interface avec l'interpreteur. - -@menu -* Classes PBS:: Classes d'implementation pour OpenPBS -* Classes Python:: Classes d'interfacage avec Python. -@end menu - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classes PBS, Classe FactBatchManager_PBS, Classes specifiques, Classes specifiques -@comment node-name, next, previous, up -@page -@subsection Classes PBS -@cindex classes PBS - -Actuellement seules les classes @emph{BatchManager}, @emph{JobInfo} et -@emph{Job} ont besoin d'etre derivees pour implementer la communication -et l'interfacage avec l'API du gestionnaire de batch OpenPBS. - - -@menu -* Classe FactBatchManager_PBS:: Description de la classe FactBatchManager_PBS. -* Classe BatchManager_PBS:: Description de la classe BatchManager_PBS. -* Classe JobInfo_PBS:: Description de la classe JobInfo_PBS. -* Classe Job_PBS:: Description de la classe Job_PBS. -@end menu - - -@node Classe FactBatchManager_PBS, Classe BatchManager_PBS, Classes PBS, Classes PBS -@comment node-name, next, previous, up -@subsubsection FactBatchManager_PBS -@cindex FactBatchManager_PBS - -Cette classe derive de la classe generique @emph{FactBatchManager}, -@xref{Classe FactBatchManager}. - -Les objets de la classe @emph{BatchManager_PBS} realisent l'interface de -la bibliotheque avec l'API du gestionnaire de batch OpenPBS. - -@itemize @bullet{} -@item Entete - -@example -class FactBatchManager_PBS : public FactBatchManager -@{ -public: - // Constructeur et destructeur - FactBatchManager_PBS(); - virtual ~FactBatchManager_PBS(); - - virtual BatchManager_PBS * operator() (const char * hostname) const; - -protected: - -private: - -@}; -@end example - -@item Exemple - -@example -@dots{} - -// On instancie le catalogue de gestionnaires de batch -Batch::BatchManagerCatalog cata; - -// On cree une fabrique de BatchManager de type PBS -Batch::FactBatchManager & fbm = * cata("PBS"); - -@dots{} -@end example - -@item Methodes -@itemize @minus{} -@item -@b{FactBatchManager_PBS()} - -Ce constructeur instancie un objet de la classe -@emph{FactBatchManager_PBS} et l'enregistre automatiquement aupres du -catalogue de fabrique. @xref{Classe BatchManagerCatalog}. - -Le type est positionne a la valeur PBS. - -@item -@b{~FactBatchManager_PBS()} - -Le destructeur ne fait rien de particulier. - -@item -@b{BatchManager_PBS * operator() (const char * hostname) const} - -Cet operateur renvoie un objet nouvellement cree de type -@emph{BatchManager_PBS} derivant de @emph{BatchManager} et oeuvrant sur -la machine @emph{hostname}. La destruction de l'objet est a la charge de -l'appelant. - -@end itemize - -@end itemize - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classe BatchManager_PBS, Classe JobInfo_PBS, Classe FactBatchManager_PBS, Classes PBS -@comment node-name, next, previous, up -@page -@subsubsection BatchManager_PBS -@cindex BatchManager_PBS - -Cette classe derive de la classe generique @emph{BatchManager}, -@xref{Classe BatchManager}. - -Les objets de la classe @emph{BatchManager_PBS} realisent l'interface de -la bibliotheque avec l'API du gestionnaire de batch OpenPBS. - -@itemize @bullet{} -@item Entete - -@example -class BatchManager_PBS : public BatchManager -@{ - public: - // Constructeur et destructeur - BatchManager_PBS(FactBatchManager * parent, - const char * host) throw(InvalidArgumentException); - virtual ~BatchManager_PBS(); - - // Recupere le nom du serveur par defaut - static string getDefaultServer(); - - // Recupere le l'identifiant d'un job deja soumis au BatchManager - virtual const JobId getJobIdByReference(const string & ref); - - // Methodes pour le controle des jobs : virtuelles pures - // soumet un job au gestionnaire - virtual const JobId submitJob(const Job & job); - - // retire un job du gestionnaire - virtual void deleteJob(const JobId & jobid); - - // suspend un job en file d'attente - virtual void holdJob(const JobId & jobid); - - // relache un job suspendu - virtual void releaseJob(const JobId & jobid); - - // modifie un job en file d'attente - virtual void alterJob(const JobId & jobid, - const Parametre & param, - const Environnement & env); - virtual void alterJob(const JobId & jobid, - const Parametre & param); - virtual void alterJob(const JobId & jobid, - const Environnement & env); - - // renvoie l'etat du job - virtual JobInfo queryJob(const JobId & jobid); - - // modifie un job en file d'attente - virtual void setParametre(const JobId & jobid, - const Parametre & param); - virtual void setEnvironnement(const JobId & jobid, - const Environnement & env); - - protected: - string _hostname; // serveur ou tourne le BatchManager - - private: - -@}; -@end example - -@item Exemple - -@example -@dots{} - -// On instancie le catalogue de gestionnaires de batch -Batch::BatchManagerCatalog cata; - -// On cree une fabrique de BatchManager de type PBS -Batch::BatchManager & myBM = (* cata("PBS"))("serveur.domaine.fr") - -// Maintenant, on peut utiliser toutes les fonctionnalites du -// gestionnaire de batch a travers le variable myBM - -@dots{} -@end example - -@item Methodes -@itemize @minus{} -@item -@b{BatchManager_PBS(FactBatchManager * parent, -const char * host) throw(InvalidArgumentException)} - -Excepte un pointeur sur la fabrique qui a produit l'objet, le -constructeur accepte zero ou un argument de type @emph{string} decrivant -soit le nom de domaine completement qualifie (FQDN, @i{fully qualified -domain name}) du serveur de batch, soit son adresse IP dans un format -decimal "aaa.bbb.ccc.ddd". - -Si aucun parametre n'est passe au constructeur, celui-ci prend le -serveur par defaut tel que renvoye par la methode @emph{getDefaultServer}. - -Une resolution du nom ou de l'adresse peut etre realisee en fonction des -capacites de la plate-forme pour s'assurer que le serveur est connu et -joignable. En cas d'echec, une exception InvalidArgumentException est -levee. @xref{Classe InvalidArgumentException}. - -Ceci fait, une connexion est etablie avec le gestionnaire de batch qui -est maintenue jusqu'a destruction de l'objet. - -@item -@b{~BatchManager()} - -Le destructeur supprime la connexion precedemment etablie par le -constructeur lorsque celle-ci a reussi. - -@item -@b{const JobId submitJob(const Job & job)} - -Cette methode soumet le job passe en argument au gestionnaire de -batch. Etant donne que le job ne peut pas etre envoye tel quel puisqu'il -a un format generique au sein de la bibliotheque de classes Batch, cette -methode est chargee de le convertir dans un format adapte au -gestionnaire de batch sous-jacent. - -La methode opere ici une conversion du job de la classe @emph{Job} en @emph{Job_PBS}. - -Ce n'est que lorsque cette conversion est realisee que le job est soumis -au gestionnaire a travers son API. L'identifiant propose par le -gestionnaire est alors renvoye a l'appelant. Si la soumission echoue -pour une raison ou une autre, une exception APIInternalFailureException est -levee. @xref{Classe APIInternalFailureException}. - -@item -@b{void deleteJob(const JobId & jobid)} - -Cette methode retire le job dont l'identifiant est passe en argument de -la file d'attente du gestionnaire, ou bien l'arrete en cours -d'execution. Cette methode est inoperante sur des travaux deja termines, -auquel cas une exception APIInternalFailureException est -levee. @xref{Classe APIInternalFailureException}. - - -@item -@b{void holdJob(const JobId & jobid)} - -Cette methode suspend le job dont l'identifiant est passe en argument au -sein de la file d'attente du gestionnaire. Cette methode est inoperante -sur des travaux en cours d'execution ou deja termines, ainsi que sur des -travaux deja suspendus. -En cas de probleme, une exception APIInternalFailureException est -levee. @xref{Classe APIInternalFailureException}. - -@item -@b{void releaseJob(const JobId & jobid)} - -Cette methode relache un job precedemment suspendu en file -d'attente dont l'identifiant est passe en argument. Elle est inoperante -sur des travaux deja reclaches, en cours d'execution ou termines. -En cas de probleme, une exception APIInternalFailureException est -levee. @xref{Classe APIInternalFailureException}. - - -@item -@b{void alterJob(const JobId & jobid, const Parametre & param, const Environnement & env)@* -void alterJob(const JobId & jobid, const Parametre & param)@* -void alterJob(const JobId & jobid, const Environnement & env)} - -Ces methodes permettent de modifier les parametres d'execution et -d'environnement d'un job dont l'identifiant est passe en -argument. @xref{Classe Parametre}. @xref{Classe Environnement}. Il -est important de noter que le job doit etre encore place en file -d'attente sinon la methode est inoperante. -En cas de probleme, une exception APIInternalFailureException est -levee. @xref{Classe APIInternalFailureException}. - -@item -@b{JobInfo queryJob(const JobId & jobid)} - -Cette methode permet de recuperer les informations concernant le job -dont l'identifiant est passe en argument dans un objet de classe -@emph{JobInfo}. @xref{Classe JobInfo}. On y retrouve les parametres -d'execution et d'environnement du job tels qu'ils ont ete passes au -gestionnaire au moment de la soumission, ainsi que des informations -concernant l'execution du job comme par exemple la machine d'execution, -le temps consomme, la memoire consommee, etc. - -Il n'est pas toujours possible d'interroger un job deja termine. -En cas de probleme, une exception APIInternalFailureException est -levee. @xref{Classe APIInternalFailureException}. - - -@item -@b{const JobId getJobIdByReference(const string & ref)} - -Cette methode permet de recuperer au sein de la classe un identifiant de -job a partir d'une chaine de caracteres obtenue par un biais -externe. Cet identifiant pourra etre utilise par la suite au sein de la -biliotheque de classes pour controler le job comme s'il avait ete cree -et soumis depuis la biliotheque-meme. - -@item -@b{void setParametre(const JobId & jobid, const Parametre & param)} - -Cette methode n'est utile que pour l'interfacage avec Python, car Python -ne sait pas gerer la surcharge de methode, et de fait leve des -exceptions lors d'appels a de telles methodes. - -Elle est equivalente a la methode @samp{void alterJob(const JobId & jobid, const Parametre & param)}. - -@item -@b{void setEnvironnement(const JobId & jobid, const Environnement & env)} - -Cette methode n'est utile que pour l'interfacage avec Python, car Python -ne sait pas gerer la surcharge de methode, et de fait leve des -exceptions lors d'appels a de telles methodes. - -Elle est equivalente a la methode @samp{void alterJob(const JobId & jobid, const Environnement & env)}. - -@end itemize - - -@end itemize - -@c ---------------------- -@c ---------------------- -@c ---------------------- - - -@node Classe JobInfo_PBS, Classe Job_PBS, Classe BatchManager_PBS, Classes PBS -@comment node-name, next, previous, up -@page -@subsubsection JobInfo_PBS -@cindex JobInfo_PBS - -Un objet de classe @emph{JobInfo} represente l'ensemble des informations -disponibles sur un travail actif, c'est-a-dire soumis au gestionnaire de -batch, a un instant donne. - -Cet objet reprend des informations issues du job tel qu'il a ete soumis, -@xref{Classe Job}, mais aussi des informations produites par le -gestionnaire de batch a partir de la soumission et du transit du job en -son sein : nom de la queue dans laquelle le job est inscrit, duree -d'execution, date de soumission, etc. - -Ces informations sont disponibles aupres de l'utilisateur de la classe a -travers les objets @emph{Parametre} et @emph{Environnement} que l'objet -@emph{JobInfo} peut fournir. - -@itemize @bullet{} -@item Entete - -@example -class JobInfo_PBS : public JobInfo -@{ - public: - // Constructeur standard et destructeur - JobInfo_PBS(); - JobInfo_PBS(struct batch_status * stat_list, - bool tobedeleted = false); - virtual ~JobInfo_PBS(); - - // Constructeur par recopie - JobInfo_PBS(const JobInfo_PBS & jinfo); - - // Methodes pour l'interfacage avec Python (SWIG) - string __str__() const; // SWIG : affichage en Python - string __repr__() const; // SWIG : affichage en Python - - protected: - Parametre _param; // parametres du job - Environnement _env; // variables d'environnement du job - - private: -@}; -@end example - - -@item Exemple -@example -@dots{} (ici on cree un BatchManager bm et un Job job) - -// On soumet le job et on recupere un identifiant -JobId jobid = bm.submitJob(job); - -// Ce qui permet d'interroger l'etat du job en cours -// Nota : l'objet retourne est un JobInfo_PBS -JobInfo jinfo = jobid.queryJob(); - -@dots{} -@end example - -@item Methodes -@itemize @minus{} -@item -@b{JobInfo_PBS()} - -Ce constructeur cree un objet @emph{JobInfo_PBS} vide. - -@item -@b{~JobInfo_PBS()} - -Le destructeur libere l'espace memoire alloue pour l'objet si la -desollacation n'a pas eu deja lieu dans le constructeur. - -@item -@b{JobInfo_PBS(const JobInfo_PBS & jinfo)} - -Le constructeur par recopie produit un objet identique a celui passe en -argument. Les deux objets sont totalement independants l'un de l'autre. - -@item -@b{JobInfo_PBS(struct batch_status * stat_list, bool tobedeleted = false)} - -Ce constructeur recupere une liste chainee du type interne OpenPBS -@emph{struct batch_status *}, la parcoure et l'analyse pour en extraire -les informations utilisables par la bibliotheque de classes et les -stocker dans deux objets internes @emph{Parametre} et -@emph{Environnement}. - -Si le parametre @emph{tobedeleted} vaut @emph{true} alors la liste -chainee @emph{stat_list} sera desallouee a la fin du constructeur. Sinon -elle sera desalloue dans le destructeur au plus tard. - -@item -@b{string __str__() const} - -Cette methode n'est utile que pour l'interfacage avec Python. Elle -permet d'afficher l'etat de l'objet @emph{JobInfo}. - -@item -@b{string __repr__() const} - -Cette methode n'est utile que pour l'interfacage avec Python. Elle -permet d'afficher l'etat de l'objet @emph{JobInfo}. - -@end itemize - -@end itemize - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - - -@node Classe Job_PBS, Classes Python, Classe JobInfo_PBS, Classes PBS -@comment node-name, next, previous, up -@page -@subsubsection Job_PBS -@cindex Job_PBS - -Un objet de classe @emph{Job} possede une structure generique -potentiellement utilisable par tout gestionnaire de batch mais pas en -l'etat. Une conversion dans un format lisible par le gestionnaire doit -etre realisee. - -Ceci se fait en produisant a partir des donnees generiques de la classe -@emph{Job} des structures de donnees specifiques qui peuvent etre -directement passees a l'API du gestionnaire. - -La classe @emph{Job_PBS} se distingue donc de la classe @emph{Job} par son -constructeur et par des accesseurs specifiques qui produisent des -donnees lisibles par OpenPBS. - -Etant donnee la specificite de cette classe, elle ne devrait concerner -que les developpeurs de la bibliotheque de classes Batch. - -@itemize @bullet{} -@item Entete - -@example -class Job_PBS -@{ - public: - // Constructeurs et destructeur - Job_PBS(const Job & job); - virtual ~Job_PBS(); - - // Accesseurs - struct attropl * getAttributesOP(); - struct attrl * getAttributes(); - char * getScript(); - char * getDestination(); - - protected: - struct attropl * _p_attropl; // liste d'attributs + operateur - struct attrl * _p_attrl; // liste d'attributs - char * _script; // chemin d'acces au script du job - char * _destination; // queue dans laquelle le job est soumis - - private: - -@}; -@end example - - -@item Exemple -@example -@dots{} - -Parametre param; -Environnement env; - -@dots{} (ici on cree les parametres du job) - -Job job(param, env); - -// On fabrique un job specifique a OpenPBS a partir du job generique -// Ceci ne concerne en general pas l'utilisateur de la bibliotheque -Job_PBS jobpbs(job); - -@dots{} -@end example - -@item Methodes -@itemize @minus{} - -@item -@b{Job_PBS(const Job & job)} - -Le constructeur convertit les objets internes @emph{Parametre} et -@emph{Environnement} de l'objet passe en argument en un ensemble de -quatre structures C @emph{AttributesOP}, @emph{Attributes}, -@emph{Script} et @emph{Destination} directement utilisable par l'API de -OpenPBS. - -@item -@b{~Job_PBS()} - -Le destructeur libere simplement les espaces alloues pour les structures -@emph{AttributesOP}, @emph{Attributes}, @emph{Script} et -@emph{Destination}. - -@item -@b{struct attropl * getAttributesOP()} - -Cet accesseur retourne un pointeur sur la structure interne -@emph{AttributesOP} de l'objet. Cette structure n'est pas protogee -contre les modifications accidentelles de l'utilisateur. Par consequent -il est recommande d'eviter d'y apporter toute alteration sous peine de -dysfonctionnement. - -Pour la definition de la structure @emph{AttributesOP}, voir la -documentation OpenPBS. - -@item -@b{struct attrl * getAttributes()} - -Cet accesseur retourne un pointeur sur la structure interne -@emph{Attributes} de l'objet. Cette structure n'est pas protogee -contre les modifications accidentelles de l'utilisateur. Par consequent -il est recommande d'eviter d'y apporter toute alteration sous peine de -dysfonctionnement. - -Pour la definition de la structure @emph{Attributes}, voir la -documentation OpenPBS. - -@item -@b{char * getScript()} - -Cet accesseur retourne un parametre @emph{Script} qui est une chaine de -caracteres C contenant le chemin absolu (sur la machine d'execution) -du script a soumettre au gestionnaire de batch. - -Cette chaine n'est pas protegee contre les modifications accidentelles -de l'utilisateur. Il est donc recommande de ne pas y apporter de modification. - -@item -@b{char * getDestination()} - -Cet accesseur retourne un parametre @emph{Destination} qui est une chaine de -caracteres C contenant le nom de la queue, ou classe ou file selon les terminologies, -du gestionnaire de batch dans laquelle le job doit etre soumis. - -Cette chaine n'est pas protegee contre les modifications accidentelles -de l'utilisateur. Il est donc recommande de ne pas y apporter de modification. - - -@end itemize -@end itemize - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Classes Python, Classe PyVersatile, Classe Job_PBS, Classes specifiques -@comment node-name, next, previous, up -@page -@subsection Classes Python -@cindex classes Python - -L'integration de la bibliotheque de classes Batch dans l'interpreteur -Python a beaucoup progresse depuis la precedente version et se trouve -etre quasiment iso-fonctionelle avec le C++. - -Actuellement, l'interface avec Python s'appuie a la fois sur les -fonctionnalites de l'utilitaire SWIG, et sur la definition d'une classe -specifique qui permet de voir en Python la classe @emph{Versatile}. - -Certaines classes ont de plus des methodes specifiques pour le wrapping -Python qui simplifient grandement le developpement des classes -d'interface au detriment, il est vrai, d'une bonne independance entre -les langages. Ce choix n'est pas definitif et pourra etre revu si -l'occasion s'en presente. - -Quoi qu'il en soit toutes les classes de haut niveau sont interfacees en -Python sous le meme nom et proposent les memes methodes (sauf celles -surchargees en C++ qui sot parfois renommees pour lever -l'ambiguite). Pour ne pas refaire un expose detaille et fastidieux des -fonctionnalites Python de la bibliotheque de classes, il est propose de -retrouver les noms et la syntaxe de ces classe dans la partie -Utilisation de ce document. @xref{Utilisation}. - -@menu -* Classe PyVersatile:: Description de la classe PyVersatile. -@end menu - -@c ---------------------- -@c ---------------------- -@c ---------------------- - - -@node Classe PyVersatile, Utilisation, Classes Python, Classes Python -@comment node-name, next, previous, up -@page -@subsubsection PyVersatile -@cindex PyVersatile - - -La classe @emph{PyVersatile} derive de la classe @emph{Versatile} et -offre la possibilite de convertir un tel objet en objet Python et -@i{vice versa}. - - -@itemize @bullet{} -@item Entete - -@example -class PyVersatile : public Versatile -@{ - public: - // Constructeur a partir d'un objet Versatile - PyVersatile(const Versatile &); - - // Constructeur a partir d'un PyObject - PyVersatile(const PyObject *) throw(TypeMismatchException, - ListIsFullException, - InvalidArgumentException); - - // Conversion de type vers un PyObject - operator PyObject *() const; - - // Operateur d'affectation a partir d'un objet Versatile - PyVersatile & operator =(const Versatile &); - - protected: - - private: - -@}; -@end example - - -@item Exemple -@example -@dots{} - -// On cree un objet Versatile contenant -// une liste de chaine de caracteres -Versatile V; -V = "a", "b", "c"; - -// On convertit cet objet Versatile en PyVersatile -PyVersatile PyV(V); - -// De la on produit un objet Python -// qui est une liste de chaine de caracteres -PyObject * PyO = PyV; - -@dots{} -@end example - -@item Methodes -@itemize @minus{} - -@item -@b{PyVersatile(const Versatile &)} - -Ce constructeur convertit un objet @emph{Versatile} en objet @emph{PyVersatile}. - -@item -@b{PyVersatile(const PyObject *) throw(TypeMismatchException, ListIsFullException, InvalidArgumentException)} - -Ce constructeur convertit un objet Python passe en argument en un objet -@emph{PyVersatile}. - -Seuls certains objets Python peuvent etre convertis : les @emph{string} -et les @emph{long}, ainsi que les listes homogenes de ces types, ce qui -est coherent avec la nature de l'objet @emph{Versatile}. Si tel n'est -pas le cas, une exception Python est renvoyee a l'interpreteur. - - -@item -@b{operator PyObject *() const} - -Cet operateur convertit l'objet en objet Python. Selon le cas, l'objet -retourne est soit un scalaire soit une liste. L'objet retourne est -alloue dynamiquement et doit donc etre pris en charge par l'interpreteur. - -@item -@b{PyVersatile & operator =(const Versatile &)} - -L'affectation d'un objet @emph{Versatile} passe en argument est -similaire a l'affectation entre objets @emph{Versatile}. Les structures -de donnees internes initiales de l'objet sont effacees et remplacees par -une copie des donnees internes de l'objet passe en argument. Les deux -objets restent independants l'un de l'autre a l'issue de l'affectation. - -@end itemize -@end itemize - - - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Utilisation, Connexion, Classe PyVersatile, Top -@comment node-name, next, previous, up -@page -@chapter Utilisation -@cindex utilisation - -Ce chapitre presente les differentes actions qu'il est possible de -realiser avec les classes de la bilbiotheque. - -On presente un cas hypothetique ou un utilisateur voudrait soumettre et -controler un job depuis un code C++. Les sections suivantes decrivent -les operations a faire ainsi que leur action sur le travail soumis. - -@menu -* Connexion:: Creation d'un gestionnaire de batch. -* Creation:: Declaration d'un job (travail). -* Soumission:: Demande d'execution du job. -* Interrogation:: Recuperation des informations sur le job. -* Destruction:: Arret du job en cours. -* Suspension:: Suspension du job en file d'attente. -* Reprise:: Liberation du job en file d'attente. -* Modification:: Modification d'un job en file d'attente. -@end menu - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Connexion, Creation, Utilisation, Utilisation -@comment node-name, next, previous, up -@section Connexion -@cindex connexion -@cindex deconnexion - -La premiere etape avant toute utilisation pratique des classes de la -bibliotheque consiste a se connecter a un gestionnaire de batch. - -Ce concept de connexion est purement interne a la bibliotheque car il -est tout a fait possible d'imaginer le controle de jobs a travers l'API -d'un gestionnaire sans jamais etablir ni maintenir une quelconque -connexion avec celui-ci. D'autres par contre reclament l'etablissement -d'une connexion. - -Quoiqu'il en soit ceci n'est pas genant et l'etablissement et le -maintien de la connexion avec le gestionnaire de batch se fait par la -creation d'un objet de classe @emph{BatchManager} ou d'une classe -derivee. - -En pratique, la classe @emph{BatchManager} se comporte comme une -interface et seules les classes d'implementation derivee doivent etre -instanciees. - -Si l'on prend le cas d'un serveur @samp{serveur.domaine.fr} supportant -un gestionnaire de batch OpenPBS, on peut s'y connecter de la maniere -suivante : - -@itemize @bullet{} -@item Exemple C++ : - -@example -BatchManagerCatalog cata; -BatchManager_PBS & bm = * (* cata('PBS'))("serveur.domaine.fr"); -@end example - -@item Exemple Python: - -@example -cata = BatchManagerCatalog() -bm = cata('PBS')('serveur.domaine.fr') -@end example - -@end itemize - -Tant que l'objet @emph{bm} sera present --- tant que son destructeur -n'aura pas ete appele --- la connexion sera maintenue. La deconnexion -aura lieu a la destruction de l'objet. - -@xref{Classe BatchManager}. -@xref{Classe BatchManager_PBS}. - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Creation, Soumission, Connexion, Utilisation -@comment node-name, next, previous, up -@section Creation -@cindex creation - -La creation du job est l'etape qui precede toute soumission. Elle -necessite de decrire d'un maniere ou d'un autre ce que l'on va demander -a la machine d'executer. - -Pour cela on passe par deux objets intermediaires qui sont l'objet -@emph{Parametre} et l'objet @emph{Environnement}. - -Le minimum a preciser est en general le chemin absolu d'acces a -l'executable, quoique ceci depende fortement de la configuration du -gestionnaire auquel on se connecte. Celui-ci peut reclamer des -parametres supplementaires. - -Pour connaitre l'ensemble des parametres disponibles : @xref{Classe -Parametre}. - -On supposera dans cet exemple que l'application en question sait -reconnaitre une variable d'environnement @var{myapp_loglevel} qui prend -une valeur numerique correspondant au niveau d'information affiche en -sortie. - -Cette application imaginaire utilise egalement trois fichiers : - -@itemize @bullet{} -@item -un fichier d'entree nomme @file{Cas1.data} sur la machine locale qu'il -faudra renommer @file{fort.9} pour que l'application puisse le lire -(notre application imaginaire est ecrite en FORTRAN et attend un fichier -d'entree sur son descripteur 9); - -@item -un fichier de sortie standard que l'on voudra recuperer sous le nom -@file{Cas1.out}; - -@item -un fichier d'erreur standard que l'on voudra recuperer sous le nom -@file{Cas1.err}. - -@end itemize - -Le job est ensuite cree simplement a l'aide des deux objets precedents. - -@itemize @bullet{} -@item Exemple C++ : - -@example -Parametre param; -param[EXECUTABLE] = "/home/user/my_app/bin/exec_app.sh"; -param[INFILE] = Couple("/home/user/my_app/data/Cas1.data","fort.9"); -param[OUTFILE] = Couple("/home/user/my_app/data/Cas1.out", "stdout"), - Couple("/home/user/my_app/data/Cas1.err", "stderr"); - -Environnement env; -env["MYAPP_LOGLEVEL"] = "3"; - -Job job(param, env); -@end example - -@item Exemple Python: - -@example -param = @{@} -param["EXECUTABLE"] = "/home/user/my_app/bin/exec_app.sh" -param["INFILE"] = [ ("/home/user/my_app/data/Cas1.data","fort.9") ] -param["OUTFILE"] = [ ("/home/user/my_app/data/Cas1.out", "stdout"), - ("/home/user/my_app/data/Cas1.err", "stderr") ] - -env = @{@} -env["MYAPP_LOGLEVEL"] = "3" - -job = Job() -job.setParametre(param) -job.setEnvironnement(env) -@end example - -@end itemize - - -@xref{Classe Parametre}. -@xref{Classe Environnement}. -@xref{Classe Job}. - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Soumission, Interrogation, Creation, Utilisation -@comment node-name, next, previous, up -@section Soumission -@cindex soumission -@findex submitJob - -Une fois le job cree, il est alors tres simple de le soumettre au -gestionnaire de batch en passant par l'intermediaire de l'objet -@emph{BatchManager} cree precedemment. - -Cette soumission produira un objet @emph{JobId} qui servira a controler -le job par la suite. - -Cependant des exceptions peuvent etre levees au moment de la soumission -et il convient de fournir un gestionnaire d'exception pour gerer -proprement ces incidents. - -@itemize @bullet{} -@item Exemple C++ : - -@example -try @{ - const JobId jobid = bm.submitJob(job); - -@} catch (GenericException & ex) @{ - @dots{} -@} -@end example - -@item Exemple Python: - -@example -try : - jobid = bm.submitJob(job) -except : - @dots{} -@end example - -@end itemize - - -@xref{Classe Job}. -@xref{Classe JobId}. -@xref{Exceptions}. - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Interrogation, Destruction, Soumission, Utilisation -@comment node-name, next, previous, up -@section Interrogation -@cindex interrogation -@findex queryJob - -La fourniture d'un objet @emph{JobId} permet d'avoir tout controle sur -le job en cours. En particulier il est possible de l'interroger : -ceci generera un objet @emph{JobInfo} qui donnera l'ensemble des -informations disponibles sur l'etat du job aupres du gestionnaire de -batch. - -Ces informations sont disponibles a travers deux objets internes de -classes @emph{Parametre} et @emph{Environnement}, les memes que pour la -classe @emph{Job}, mais modifies et completes avec les donnees les plus -a jour du gestionnaire de batch. - -@itemize @bullet{} -@item Exemple C++ : - -@example -try @{ - const JobInfo jinfo = jobid.queryJob(); - - Parametre newparam = jinfo.getParametre(); - Environnement newenv = jinfo.getEnvironnement(); - -@} catch (GenericException & ex) @{ - @dots{} -@} -@end example - -@item Exemple Python: - -@example -try : - jobinfo = jobid.queryJob() - - newparam = jinfo.getParametre() - newenv = jinfo.getEnvironnement() -except : - @dots{} -@end example - -@end itemize - - -@xref{Classe JobId}. -@xref{Classe JobInfo}. -@xref{Exceptions}. - - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Destruction, Suspension, Interrogation, Utilisation -@comment node-name, next, previous, up -@section Destruction -@cindex destruction -@cindex suppression -@findex deleteJob - - -Il est possible de detruire un job que celui-ci soit encore en file -d'attente ou bien que son execution ait deja commence, auquel cas elle -serait immediatement interrompue. - - -@itemize @bullet{} -@item Exemple C++ : - -@example -try @{ - jobid.deleteJob(); - -@} catch (GenericException & ex) @{ - @dots{} -@} -@end example - -@item Exemple Python: - -@example -try : - jobid.deleteJob() - -except : - @dots{} -@end example - -@end itemize - - -@xref{Classe JobId}. -@xref{Exceptions}. - - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Suspension, Reprise, Destruction, Utilisation -@comment node-name, next, previous, up -@section Suspension -@cindex suspension -@findex holdJob - -La suspension consiste a figer en file d'attente un job qui n'aurait pas -encore commence son execution. Il n'est pas possible de suspendre un job -qui s'execute. - -Il y a deux manieres de suspendre un job en file d'attente : -@itemize @bullet{} -@item en utilisant la methode @samp{holdJob}; -@item en modifiant les parametres du job a l'aide de la methode @samp{alterJob}. -@end itemize - -Exemple 1 : - -@itemize @bullet{} -@item Exemple C++ : - -@example -try @{ - jobid.holdJob(); - -@} catch (GenericException & ex) @{ - @dots{} -@} -@end example - -@item Exemple Python: - -@example -try : - jobid.holdJob() - -except : - @dots{} -@end example - -@end itemize - -Exemple 2 : - -@itemize @bullet{} -@item Exemple C++ : - -@example -try @{ - Parametre altparam; - altparam[HOLD] = 1; - jobid.alterJob(altparam); - -@} catch (GenericException & ex) @{ - @dots{} -@} -@end example - -@item Exemple Python: - -@example -// Compte tenu de la surcharge d'operateur, cet exemple peut ne pas -// fonctionner encore -try : - altparam = @{@} - altparam["HOLD"] = 1 - jobid.alterJob(altparam) - -except : - @dots{} -@end example - -@end itemize - - - -@xref{Classe JobId}. -@xref{Exceptions}. -@xref{Reprise}. - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Reprise, Modification, Suspension, Utilisation -@comment node-name, next, previous, up -@section Reprise -@cindex reprise -@findex releaseJob - -La reprise est l'operation inverse de la suspension en ceci qu'elle -libere un job precedemment suspendu en file d'attente. Le job continuera -alors son cheminement normal au sein du gestionnaire de batch. - -Il y a deux manieres de suspendre un job en file d'attente : -@itemize @bullet{} -@item en utilisant la methode @samp{releaseJob}; -@item en modifiant les parametres du job a l'aide de la methode @samp{alterJob}. -@end itemize - -Exemple 1 : - -@itemize @bullet{} -@item Exemple C++ : - -@example -try @{ - jobid.releaseJob(); - -@} catch (GenericException & ex) @{ - @dots{} -@} -@end example - -@item Exemple Python: - -@example -try : - jobid.releaseJob() - -except : - @dots{} -@end example - -@end itemize - -Exemple 2 : - -@itemize @bullet{} -@item Exemple C++ : - -@example -try @{ - Parametre altparam; - altparam[HOLD] = 0; - jobid.alterJob(altparam); - -@} catch (GenericException & ex) @{ - @dots{} -@} -@end example - -@item Exemple Python: - -@example -// Compte tenu de la surcharge d'operateur, cet exemple peut ne pas -// fonctionner encore -try : - altparam = @{@} - altparam["HOLD"] = 0 - jobid.alterJob(altparam) - -except : - @dots{} -@end example - -@end itemize - - -@xref{Classe JobId}. -@xref{Exceptions}. -@xref{Suspension}. - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Modification, Installation de la bibliotheque, Reprise, Utilisation -@comment node-name, next, previous, up -@section Modification -@cindex modification -@findex alterJob - -Il est possible de modifier tout ou partie des parametres et des -variables d'un job a condition que celui-ci soit encore en file -d'attente. Un job dont l'execution a deja debute devient inalterable, -sauf a l'arreter definitvement. - -La modification se fait en declarant un objet @emph{Parametre} et/ou un -objet @emph{Environnement} contenant l'ensemble des alterations a -apporter a la description du job. Ces alterations peuvent porter sur des -parametres ou des variables deja definies ou non. - -En reprenant le cas du job imaginaire utilise jusqu'ici, on peut -souhaiter changer le script qui tient lieu d'executable car le precedent -etait incomplet, modifier le niveau d'affichage de la log et ajouter une -variable nommee @var{myapp_debug} qui indique au code de passer en mode -debug. Ceci pourrait se faire de la maniere suivante : - -@itemize @bullet{} -@item Exemple C++ : - -@example -try @{ - Parametre altparam; - altparam[EXECUTABLE] = "/home/user/my_app/bin/exec_app.sh"; - - Environnement altenv; - altenv["MYAPP_LOGLEVEL"] = "4"; - altenv["MYAPP_DEBUG"] = "1"; - jobid.alterJob(altparam, altenv); - -@} catch (GenericException & ex) @{ - @dots{} -@} -@end example - -@item Exemple Python: - -@example -// Compte tenu de la surcharge d'operateur, cet exemple peut ne pas -// fonctionner encore -try : - altparam = @{@} - altparam["EXECUTABLE"] = "/home/user/my_app/bin/exec_app.sh" - - altenv = @{@} - altenv["MYAPP_LOGLEVEL"] = "4"; - altenv["MYAPP_DEBUG"] = "1"; - - jobid.alterJob(altparam, altenv) - -except : - @dots{} -@end example - -@end itemize - - -@xref{Classe JobId}. -@xref{Exceptions}. - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Installation de la bibliotheque, Prerequis, Modification, Top -@comment node-name, next, previous, up -@chapter Installation -@cindex installation - -Cette section montre comment installer l'ensemble de la bibliotheque de -classes Batch sur une machine Unix. - -@menu -* Prerequis:: -* Installation rapide:: -* Configuration:: -* Compilation:: -* Compilation de la documentation:: -* Tests:: -* Installation:: -@end menu - - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Prerequis, Installation rapide, Installation de la bibliotheque, Installation de la bibliotheque -@comment node-name, next, previous, up -@section Prerequis -@cindex prerequis - -@unnumberedsubsec GCC/G++ - -A l'heure actuelle, la bibliotheque de classes Batch est developpee en -C++ et necessite de fait un compilateur pour ce langage. GCC/G++ -version 2.95.3 (@inforef{Top, ,gcc} pour plus de detail) ou une version -ulterieure est un choix judicieux. - -@unnumberedsubsec Gestionnaires de batch - -Comme la bibliotheque utilise les fonctionnalites de certains -gestionnaires de batch, il est indispensable de pouvoir acceder aux -bibliotheques et aux fichiers d'entete de ces produits, ou du moins des -produits dont on se servira par la suite, ceci pour pouvoir communiquer -a travers l'API qu'ils ont developpe. - -Le cas le plus simple est d'avoir le produit directement installe sur la -machine sur laquelle sera compilee la bibliotheque de classes Batch. - -@unnumberedsubsubsec OpenPBS -@cindex OpenPBS -@cindex PBS - -A ce jour, seul le gestionnaire de batch PBS (OpenPBS et PBS Pro) est -supporte (voir le site officiel @uref{http://www.openpbs.org}). Il doit -avoir une version au moins egale a 2.3.16. - -@unnumberedsubsubsec LSF -@cindex LSF - -Il est prevu d'avoir un support de LSF dans les mois qui viennent. - -@unnumberedsubsubsec LoadLeveler -@cindex LoadLeveler - -Il est prevu d'avoir un support de LoadLeveler mais dans un futur plus -lointain en fonction de la disponibilite du produit mais surtout d'une -machine sur lequel il serait installe. - -@unnumberedsubsubsec Sun Grid Engine - -Ce choix-la est beaucoup plus hypothetique, et risque bien de ne jamais -etre mene a bien. - -@unnumberedsubsubsec Rsh/Ssh - -Il est prevu de simuler le fonctionnement d'un gestionnaire de batch a -l'aide de commandes Unix Rsh et Ssh dans la mesure de leurs capacites -lorsque qu'il n'est pas possible d'avoir un gestionnaire de batch sur -certaines machines ou de s'y connecter (par exemple lorsqu'on traverse -un coupe-feu). - -@unnumberedsubsec Python -@cindex Python - -Les classes de haut-niveau de la bibliotheque de classes Batch disposent -d'une interface en Python qui leur permet d'etre utilisables dans ce -langage. L'usage de cette fonctionnalite necessite d'avoir a disposition -une version de Python (voir le site officiel -@uref{http://www.python.org}) au moins egale a 2.2. - -@unnumberedsubsec SWIG -@cindex SWIG - -De plus l'interfacage avec Python est automatise a l'aide de -l'utilitaire SWIG (voir le site officiel @uref{http://www.swig.org}) qui -transcrit les definitions des classes C++ en classes Python. Il faut -pour cela disposer de la version 1.3.17 ou ulterieure. - - - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Installation rapide, Configuration, Prerequis, Installation de la bibliotheque -@comment node-name, next, previous, up -@section Installation rapide -@cindex installation rapide - -Il faut commencer par decompresser le fichier @file{.tar.gz} ou -@file{.tgz} et descendre dans le repertoire qu'il a cree : - -@example -$ tar -xzvf Batch-@value{VERSION}.tar.gz -$ cd Batch-@value{VERSION} -@end example - -Pour ceux qui sont vraiment presses, le minimum requis est : - -@example -$ ./configure -$ make -$ make install -@end example - -Pour ceux qui ont le temps de lire la suite, les sections suivantes -decrivent plus en detail ces etapes et les differents tests que l'on -peut mener. - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Configuration, Compilation, Installation rapide, Installation de la bibliotheque -@comment node-name, next, previous, up -@section Configuration -@cindex configuration - -La phase de configuration, tres classique dans le domaine des logiciels -libres, est basee sur les produits autoconf (voir @inforef{Top, -,autoconf}), automake (voir @inforef{Top, ,automake}) et libtool (voir -@inforef{Top, ,libtool}). - -La configuration est faite a l'aide du programme @file{configure} -present dans le repertoire racine de la bibliotheque de classes -Batch. Ce programme analyse l'ensemble des elements du systeme sur -lequel se deroulera la compilation pour determiner les parametres -optimaux et la presence de tous les produits necessaires a la -compilation. - -On n'oubliera pas de se referer a la documentation de @file{configure} -notamment pour determiner l'emplacement definitif de l'installation : - -@example -$ ./configure --help -@end example - -C'est aussi au cours de cette phase de configuration qu'il est -indispensable de preciser avec quelles options la bibliotheque doit etre -generee. En particulier il est necessaire d'indiquer avec quel(s) -gestionnaire(s) de batch doit se faire la compilation de maniere a avoir -acces a l'API. - -Par exemple dans le cas de OpenPBS, il est necessaire de preciser : - -@example -$ ./configure --with-openpbs=/path/to/PBS/root/dir -@end example - -Le chemin @file{/path/to/PBS/root/dir} est optionnel si la variable -d'environnement @var{openpbs} est definie avec cette meme valeur. - -De meme pour Python que l'on indique de la maniere suivante : - -@example -$ ./configure --with-python=/path/to/Python/root/dir -@end example - -ou bien a l'aide de la variable d'environnement @var{pythonhome}. - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Compilation, Compilation de la documentation, Configuration, Installation de la bibliotheque -@comment node-name, next, previous, up -@section Compilation -@cindex compilation - -La compilation proprement dite n'appelle pas de remarque particuliere : - -@example -$ make -@end example - -On n'oubliera pas d'utiliser les focntionnalites de chaque @file{make}, -comme par exemple la compilation parallele pour reduire les temps de -compilation (voir @inforef{Top, ,make}). - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Compilation de la documentation, Tests, Compilation, Installation de la bibliotheque -@comment node-name, next, previous, up -@section Compilation de la documentation -@cindex compilation de la documentation - -Normalement la documentation est automatiquement compilee lors de la -compilation de la bibliotheque, mais uniquement sous la forme d'un -fichier @file{.info}. Il est egalement possible d'obtenir un fichier -@file{.dvi} qui permettra de generer d'autres formats comme le -PostScript (fichier @file{.ps}) ou le PDF (fichier @file{.pdf}), ou bien -une documentation sous forme HTML (fichier @file{.html}). - -Pour fabriquer le fichier @file{.dvi} il faut executer la commande -suivante : - -@example -$ make dvi -@end example - -Il est alors possible de produire une documentation sous forme -PostScript : - -@example -$ cd doc -$ dvips Batch.dvi -o Batch.ps -@end example - -ou PDF : - -@example -$ cd doc -$ dvipdf Batch.dvi Batch.pdf -@end example - -Pour la documentation HTML, on l'obtient a l'aide de le commande -suivante : - -@example -$ cd doc -$ texi2html -split_node Batch.texi -@end example - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Tests, Installation, Compilation de la documentation, Installation de la bibliotheque -@comment node-name, next, previous, up -@section Tests -@cindex tests - -@unnumberedsubsec Tests de pre-installation - -La bibliotheque de classes Batch dispose d'un ensemble de tests -unitaires pour verifier le fonctionnement de chaque classe -individuellement. Ces tests ne sont pas compiles lors de la compilation -de la bibliotheque; ils ne le sont qu'au moment du test. - -Les tests sont executes de la maniere suivante : - -@example -$ make check -@end example - -A la fin des tests, un compte rendu est fait qui avertit l'utilisateur -des tests reussis et des echecs rencontres. Chaque test peut etre rejoue -individuellement en se placant dans le repertoire @file{test} et en -executant les tests manuellement comme par exemple : - -@example -$ cd test -$ ./t_Versatile.sh -@end example - -@unnumberedsubsec Tests de post-installation - -Certains tests ne sont pas executes lorsque la commande @file{make -check} est lancee car ceux-ci necessitent l'installation prealable de -certains fichiers qui ne l'ont pas encore ete, l'installation definitive -n'ayant pas eu lieu encore. C'est pour cela que ces tests ne doivent et -ne peuvent etre lances qu'une fois l'installation terminee. @xref{Installation}. - -Il faut pour cela executer : - -@example -$ make installcheck -@end example - -De la meme maniere que pour les tests de pre-installation, une compte -rendu est fait et les tests defaillants peuvent etre rejoues -manuellement pour determiner le probleme. - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Installation, Divers, Tests, Installation de la bibliotheque -@comment node-name, next, previous, up -@section Installation -@cindex installation - -L'installation est la mise a disposition definitive dans le systeme de -la bibliotheque de classes Batch. C'est la derniere etape de la -procedure apres la configuration et la compilation. - -On l'execute de la maniere suivante : - -@example -$ make install -@end example - -Tous les fichiers compiles, la bibliotheque et les fichiers d'entete -sont installes dans le repertoire definitif. Les fichiers de test de -post-installation sont egalement copies (@xref{Tests}.) ainsi que la -documentation. - - - - - - - - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Divers, Index, Installation, Top -@comment node-name, next, previous, up -@chapter Divers -@cindex divers - - - - - -@c ---------------------- -@c ---------------------- -@c ---------------------- - -@node Index, Top , Divers, Top -@comment node-name, next, previous, up -@unnumbered Index - -@heading Index des concepts -@printindex cp - -@heading Index des fonctions et des methodes -@printindex fn - -@bye - diff --git a/doc/salome/Makefile.am b/doc/salome/Makefile.am index 81cbabb59..a4d7dd4ec 100644 --- a/doc/salome/Makefile.am +++ b/doc/salome/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # -* Makefile *- # Author : Paul RASCLE (EDF) # Date : 16/02/2006 @@ -26,40 +27,20 @@ # include $(top_srcdir)/salome_adm/unix/make_common_starter.am -SUBDIRS= tui -SUBDIRSGUI= tui -SUBDIRSTUI= tui - -index_html: - $(INSTALL) -d $(DESTDIR)$(docdir); - -usr_docs: index_html - list='$(SUBDIRSGUI)'; for subdir in $$list; do \ - echo "Making usr_docs in $$subdir"; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) usr_docs) \ - done; - -dev_docs: index_html - list='$(SUBDIRSTUI)'; for subdir in $$list; do \ - echo "Making dev_docs in $$subdir"; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) dev_docs) \ - done; - - -# VSR: nullify these make targets to avoid 'make distcheck' failure -dvi: -pdf: -ps: +SUBDIRS= tui gui -info_TEXINFOS = Batch.texi +docs:usr_docs -install-data-local: html usr_docs - cp -rp $(top_builddir)/doc/salome/Batch.html $(DESTDIR)$(docdir) +usr_docs: + echo "Making usr_docs in gui"; \ + (cd gui && $(MAKE) $(AM_MAKEFLAGS) usr_docs) -uninstall-local: - rm -rf $(DESTDIR)$(docdir)/Batch.html +dev_docs: + echo "Making dev_docs in tui"; \ + (cd tui && $(MAKE) $(AM_MAKEFLAGS) dev_docs) EXTRA_DIST= main.dox install.dox \ - kernel_resources.dox kernel_services.dox \ + kernel_resources.dox kernel_services.dox kernel_services_cpphelpers.dox \ salome_application.dox unittests.dox \ - salome_file.dox batch.dox + salome_file.dox kernel_salome.dox \ + examples diff --git a/doc/salome/batch.dox b/doc/salome/batch.dox deleted file mode 100644 index 7e0e4e29b..000000000 --- a/doc/salome/batch.dox +++ /dev/null @@ -1,10 +0,0 @@ -/*! - -\page batch_page Batch - - Batch documentation - -*/ - - - diff --git a/doc/salome/examples/example1 b/doc/salome/examples/example1 new file mode 100644 index 000000000..eae882cae --- /dev/null +++ b/doc/salome/examples/example1 @@ -0,0 +1,45 @@ + +# create AttributeReal +#================================= +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeReal") +if A == None : + raise RuntimeError, "Can't create AttributeReal attribute" +A = A._narrow(SALOMEDS.AttributeReal) +A.SetValue(0.0001) +if A.Value() != 0.0001: + raise RuntimeError, "Error : wrong value of AttributeReal" + +# save / restore study +#================================= + +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +#file = "/tmp/ggg.hdf" + +print " ------- We will save to", file, "-----------" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +openedStudy=batchmode_geompy.myStudyManager.Open(file) + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeReal +#================================= + +res,A=father.FindAttribute("AttributeReal") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeReal" + +A = A._narrow(SALOMEDS.AttributeReal) +if A.Value() != 0.0001: + raise RuntimeError, "Error : wrong value of AttributeReal" diff --git a/doc/salome/examples/example10 b/doc/salome/examples/example10 new file mode 100644 index 000000000..756e4a3f1 --- /dev/null +++ b/doc/salome/examples/example10 @@ -0,0 +1,50 @@ + +# create AttributeExpandable +#=========================================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute( batchmode_geompy.father, "AttributeExpandable") +if A == None : + raise RuntimeError, "Can't create AttributeExpandable attribute" +A = A._narrow(SALOMEDS.AttributeExpandable) + +if A == None : + raise RuntimeError, "Can't create AttributeExpandable attribute" + +A.SetExpandable(1) + +if A.IsExpandable() == 0: + "Error: wrong value of AttributeExpandable" + + +# save / restore study +#============================================================ +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +openedStudy = batchmode_geompy.myStudyManager.Open(file); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeExpandable +#============================================================ + +res,A=father.FindAttribute("AttributeExpandable") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeExpandable" + +A = A._narrow(SALOMEDS.AttributeExpandable) + +if A == None : + raise RuntimeError, "Can't create AttributeExpandable attribute" + +if A.IsExpandable() == 0: + "Error: wrong value of AttributeExpandable" + diff --git a/doc/salome/examples/example11 b/doc/salome/examples/example11 new file mode 100644 index 000000000..4cfd732fd --- /dev/null +++ b/doc/salome/examples/example11 @@ -0,0 +1,49 @@ + +# create AttributeOpened +#=========================================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeOpened") +if A == None : + raise RuntimeError, "Can't create AttributeOpened attribute" +A = A._narrow(SALOMEDS.AttributeOpened) + +if A == None : + raise RuntimeError, "Can't create AttributeOpened attribute" + +A.SetOpened(1) + +if A.IsOpened() == 0: + "Error: wrong value of AttributeOpened" + + +# save / restore study +#============================================================ +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +openedStudy=batchmode_geompy.myStudyManager.Open(file); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeOpened +#============================================================ + +res,A=father.FindAttribute("AttributeOpened") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeOpened" + +A = A._narrow(SALOMEDS.AttributeOpened) + +if A == None : + raise RuntimeError, "Can't create AttributeOpened attribute" + +if A.IsOpened() == 0: + "Error: wrong value of AttributeOpened" diff --git a/doc/salome/examples/example12 b/doc/salome/examples/example12 new file mode 100644 index 000000000..760587736 --- /dev/null +++ b/doc/salome/examples/example12 @@ -0,0 +1,57 @@ + +#-------------------------------------------------------------------------- +# create AttributeTextColor +#=========================================================== +import SALOMEDS_Attributes_idl +color = SALOMEDS_Attributes_idl._0_SALOMEDS.Color(234,345,231) + +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeTextColor") + +if A == None : + raise RuntimeError, "Can't create AttributeTextColor attribute" +A = A._narrow(SALOMEDS.AttributeTextColor) + +if A == None : + raise RuntimeError, "Can't create AttributeTextColor attribute" + +A.SetTextColor(color) + +c = A.TextColor(); + +if c.R != 234 or c.G != 345 or c.B != 231: + print "Error: wrong value of AttributeTextColor" + +# save / restore study +#============================================================ +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +openedStudy = batchmode_geompy.myStudyManager.Open(file); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeTextColor +#============================================================ + +res,A=father.FindAttribute("AttributeTextColor") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeTextColor" + +A = A._narrow(SALOMEDS.AttributeTextColor) + +if A == None : + raise RuntimeError, "Can't create AttributeTextColor attribute" + +c = A.TextColor(); +if c.R != 234 or c.G != 345 or c.B != 231: + print "Error: wrong value of AttributeTextColor" + diff --git a/doc/salome/examples/example13 b/doc/salome/examples/example13 new file mode 100644 index 000000000..c05aaff52 --- /dev/null +++ b/doc/salome/examples/example13 @@ -0,0 +1,60 @@ + +#-------------------------------------------------------------------------- +# create AttributeTextHighlightColor +#=========================================================== + +import SALOMEDS_Attributes_idl +highlightcolor=SALOMEDS_Attributes_idl._0_SALOMEDS.Color(256,256,256) + +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeTextHighlightColor") + +if A == None : + raise RuntimeError, "Can't create AttributeTextHighlightColor attribute" +A = A._narrow(SALOMEDS.AttributeTextHighlightColor) + +if A == None : + raise RuntimeError, "Can't create AttributeTextHighlightColor attribute" + +A.SetTextHighlightColor(highlightcolor) + +c = A.TextHighlightColor(); +if c.R != 256 or c.G != 256 or c.B != 256: + print "Error: wrong value of AttributeTextHighlightColor" + + +# save / restore study +#============================================================ +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +openedStudy=batchmode_geompy.myStudyManager.Open(file); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeTextHighlightColor +#============================================================ + +res, A = father.FindAttribute("AttributeTextHighlightColor") +print res, A +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeTextHighlightColor" + +A = A._narrow(SALOMEDS.AttributeTextHighlightColor) + +if A == None : + raise RuntimeError, "Can't create AttributeTextHighlightColor attribute" + +c = A.TextHighlightColor(); + +if c.R != 256 or c.G != 256 or c.B != 256: + print "Error: wrong value of AttributeTextTextHighlightColor" + diff --git a/doc/salome/examples/example14 b/doc/salome/examples/example14 new file mode 100644 index 000000000..a0acf346d --- /dev/null +++ b/doc/salome/examples/example14 @@ -0,0 +1,47 @@ + +#-------------------------------------------------------------------------- +# create AttributePixMap +#=============================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributePixMap") +if A == None : + raise RuntimeError, "Can't create AttributePixMap attribute" +aPixmap = A._narrow(SALOMEDS.AttributePixMap); +aPixmap.SetPixMap( "ICON_OBJBROWSER_Geometry" ); + +if aPixmap.GetPixMap() != "ICON_OBJBROWSER_Geometry": + print "Error: wrong value of AttributePixMap" + + +# save / restore study +#============================================================ +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +openedStudy = batchmode_geompy.myStudyManager.Open(file); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributePixMap +#============================================================ + +res,A=father.FindAttribute("AttributePixMap") +if res == 0 or A == None: + raise RuntimeError, "Error: AttributePixMap not found " + +A = A._narrow(SALOMEDS.AttributePixMap) + +if A == None : + raise RuntimeError, "Can't create AttributePixMap attribute" + +if A.GetPixMap() != "ICON_OBJBROWSER_Geometry": + print "Error: wrong value of AttributePixMap" + diff --git a/doc/salome/examples/example15 b/doc/salome/examples/example15 new file mode 100644 index 000000000..42493fe01 --- /dev/null +++ b/doc/salome/examples/example15 @@ -0,0 +1,43 @@ + +# create AttributeLocalID +#================================= +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeLocalID") +if A == None : + raise RuntimeError, "Can't create AttributeLocalID attribute" +A = A._narrow(SALOMEDS.AttributeLocalID) + +A.SetValue(763242882) + +if A.Value() != 763242882: + print "Error: wrong value of AttributeLocalID" + +# save / restore study +#================================= +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +openedStudy = batchmode_geompy.myStudyManager.Open(file); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeLocalID +#================================= + +res,A=father.FindAttribute("AttributeLocalID") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeLocalID" + +A = A._narrow(SALOMEDS.AttributeLocalID) + +if A.Value() != 763242882: + print "Error: wrong value of AttributeLocalID" + diff --git a/doc/salome/examples/example16 b/doc/salome/examples/example16 new file mode 100644 index 000000000..3be50d9b6 --- /dev/null +++ b/doc/salome/examples/example16 @@ -0,0 +1,151 @@ + +dir= os.getenv("TmpDir") +if dir == None: + dir = "/tmp" + +batchmode_geompy.myBuilder._set_UndoLimit(20) + +# 1st transaction ----------------------------------------- +batchmode_geompy.myBuilder.NewCommand() +# create AttributeSequenceOfInteger +#========================================================= +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeSequenceOfInteger") +if A == None : + raise RuntimeError, "Can't create AttributeSequenceOfInteger attribute" +A = A._narrow(SALOMEDS.AttributeSequenceOfInteger) +if A == None : + raise RuntimeError, "Can't create AttributeSequenceOfInteger attribute" + +A.Add(100) +A.Add(300) +A.Add(500) +A.Add(400) +A.Add(700) +print "First transaction goes on : HasOpenCommand() = ", batchmode_geompy.myBuilder.HasOpenCommand() +batchmode_geompy.myBuilder.CommitCommand() #-------------- + +# 2nd transaction ------------------------------------------ +batchmode_geompy.myBuilder.NewCommand() +A.Remove(3) +A.ChangeValue(4,500) +batchmode_geompy.myBuilder.CommitCommand() #-------------- + +if batchmode_geompy.myBuilder.GetAvailableUndos() == 0: + raise RuntimeError, "GetAvailableUndos() = 0 but must not !" + +if A.Length() != 4: + print "Wrong length of SequenceOfInteger" +if A.Value(1) != 100 or A.Value(2) != 300 or A.Value(3) != 400 or A.Value(4) != 500: + raise RuntimeError, "Wrong value of AttributeSequenceOfInteger" + +file1 = dir + "/test1.hdf" +batchmode_geompy.myStudyManager.SaveAs(file1, batchmode_geompy.myStudy) + +# 1st Undo --------------------------------------- +batchmode_geompy.myBuilder.Undo() +res, A = batchmode_geompy.myBuilder.FindAttribute(batchmode_geompy.father, "AttributeSequenceOfInteger") +if A is None: + raise RuntimeError, "After first 'undo' can't find AttributeSequenceOfInteger" +if A.Length() != 5: + print "Wrong length of SequenceOfInteger" +if A.Value(1) != 100 or A.Value(2) != 300 or A.Value(3) != 500 or A.Value(4) != 400 or A.Value(5) != 700: + print A.Value(1), A.Value(2), A.Value(3), A.Value(4), A.Value(5) + raise RuntimeError, "Wrong value of AttributeSequenceOfInteger after the first 'undo'!" +# save +file2 = dir + "/test2.hdf" +batchmode_geompy.myStudyManager.SaveAs(file2, batchmode_geompy.myStudy) +#------------------------------------------------- +# 2nd Undo --------------------------------------- +batchmode_geompy.myBuilder.Undo() +res, attr = batchmode_geompy.myBuilder.FindAttribute(batchmode_geompy.father, "AttributeSequenceOfInteger") +if res !=0 or attr != None : + raise RuntimeError, "After the second 'undo' AttributeSequenceOfInteger exists but must not!" +file3 = dir + "/test3.hdf" +batchmode_geompy.myStudyManager.SaveAs(file3, batchmode_geompy.myStudy) +#------------------------------------------------- + +#make redo twice --------------------------------- +if batchmode_geompy.myBuilder.GetAvailableRedos() == 0: + raise RuntimeError, "GetAvailableRedos() = 0 but must not !" +batchmode_geompy.myBuilder.Redo() +batchmode_geompy.myBuilder.Redo() +res, A = batchmode_geompy.myBuilder.FindAttribute(batchmode_geompy.father, "AttributeSequenceOfInteger") +if res ==0 or A== None : + raise RuntimeError, "AttributeSequenceOfInteger is not found but must be!" +if A.Length() != 4: + print "Wrong length of SequenceOfInteger" +if A.Value(1) != 100 or A.Value(2) != 300 or A.Value(3) != 400 or A.Value(4) != 500: + raise RuntimeError, "Wrong value of AttributeSequenceOfInteger" + + +#---------------------------------------------------------------------- +openedStudy=batchmode_geompy.myStudyManager.Open(file1); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeSequenceOfInteger +#====================================== + +res,A=father.FindAttribute("AttributeSequenceOfInteger") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeSequenceOfInteger" + +A = A._narrow(SALOMEDS.AttributeSequenceOfInteger) + +if A.Length() != 4: + print "Wrong length of SequenceOfInteger" +if A.Value(1) != 100 or A.Value(2) != 300 or A.Value(3) != 400 or A.Value(4) != 500: + print "Wrong value of AttributeSequenceOfInteger" +#---------------------------------------------------------------------- +openedStudy=batchmode_geompy.myStudyManager.Open(file2); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeSequenceOfInteger +#====================================== + +res,A=father.FindAttribute("AttributeSequenceOfInteger") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeSequenceOfInteger" + +A = A._narrow(SALOMEDS.AttributeSequenceOfInteger) + +if A.Length() != 5: + print "Wrong length of SequenceOfInteger" +if A.Value(1) != 100 or A.Value(2) != 300 or A.Value(3) != 500 or A.Value(4) != 400 or A.Value(5) != 700: + raise RuntimeError, "Wrong value of AttributeSequenceOfInteger after the first 'undo'!" + +#---------------------------------------------------------------------- +openedStudy=batchmode_geompy.myStudyManager.Open(file3); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeSequenceOfInteger +#====================================== + +res,A=father.FindAttribute("AttributeSequenceOfInteger") + +if res!=0 or A != None: + raise RuntimeError, " AttributeSequenceOfInteger is found but must not!" + diff --git a/doc/salome/examples/example17 b/doc/salome/examples/example17 new file mode 100644 index 000000000..2c3e6b819 --- /dev/null +++ b/doc/salome/examples/example17 @@ -0,0 +1,154 @@ + +batchmode_geompy.myBuilder._set_UndoLimit(20) + +batchmode_geompy.myBuilder.NewCommand() +child = batchmode_geompy.myBuilder.NewObject(batchmode_geompy.father) +batchmode_geompy.myBuilder.CommitCommand() + +batchmode_geompy.myBuilder.NewCommand() +#========================================================== +# create AttributeSequenceOfReal +#========================================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child, "AttributeSequenceOfReal") +if A == None : + raise RuntimeError, "Can't create AttributeSequenceOfReal attribute" +A = A._narrow(SALOMEDS.AttributeSequenceOfReal) +if A == None : + raise RuntimeError, "_narrow returns None instead of AttributeSequenceOfReal pointer" + +A.Add(0.0293) +A.Add(522) +A.Add(98234) +A.Add(83.287) +batchmode_geompy.myBuilder.CommitCommand() + + +batchmode_geompy.myBuilder.NewCommand() +#========================================================== +# create AttributeInteger +#========================================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child, "AttributeInteger") +if A == None : + raise RuntimeError, "Can't create AttributeInteger attribute" +A = A._narrow(SALOMEDS.AttributeInteger) +A.SetValue(1000000) + +if A.Value() != 1000000: + raise RuntimeError, "Error : wrong value of AttributeInteger" + +batchmode_geompy.myBuilder.CommitCommand() + +batchmode_geompy.myBuilder.NewCommand() #=================== +# create AttributeName +#=========================================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child, "AttributeName") +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" +A = A._narrow(SALOMEDS.AttributeName) + +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" +A.SetValue("AttributesTesting") + +if A.Value() != "AttributesTesting": + print "Wrong value of AttributeName" + +batchmode_geompy.myBuilder.CommitCommand() + +batchmode_geompy.myBuilder.NewCommand() #=================== +# create AttributeComment +#=========================================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child, "AttributeComment") +if A == None : + raise RuntimeError, "Can't create AttributeComment attribute" +A = A._narrow(SALOMEDS.AttributeComment) + +if A == None : + raise RuntimeError, "Can't create AttributeComment attribute" + +A.SetValue("GEOM") + +batchmode_geompy.myBuilder.AbortCommand() + +batchmode_geompy.myBuilder.NewCommand() #=================== +# create AttributePersistentRef +#=========================================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child, "AttributePersistentRef") +if A == None : + raise RuntimeError, "Can't create AttributePersistentRef attribute" +A = A._narrow(SALOMEDS.AttributePersistentRef) + +if A == None : + raise RuntimeError, "Can't create AttributePersistentRef attribute" + +A.SetValue("/tmp/test;1") +batchmode_geompy.myBuilder.CommitCommand() + +batchmode_geompy.myBuilder.NewCommand() #=================================== +# create AttributeDrawable +#=========================================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child, "AttributeDrawable") +if A == None : + raise RuntimeError, "Can't create AttributeDrawable attribute" +A = A._narrow(SALOMEDS.AttributeDrawable) + +if A == None : + raise RuntimeError, "Can't create AttributeDrawable attribute" + +A.SetDrawable(1) + +if A.IsDrawable() == 0: + "Error: wrong value of AttributeDrawable" +batchmode_geompy.myBuilder.CommitCommand() + + + +batchmode_geompy.myBuilder.NewCommand() #=================== +# create AttributeSelectable +#=========================================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child, "AttributeSelectable") +if A == None : + raise RuntimeError, "Can't create AttributeSelectable attribute" +A = A._narrow(SALOMEDS.AttributeSelectable) + +if A == None : + raise RuntimeError, "Can't create AttributeSelectable attribute" + +A.SetSelectable(1) + +if A.IsSelectable() == 0: + "Error: wrong value of AttributeSelectable" +batchmode_geompy.myBuilder.CommitCommand() + + +batchmode_geompy.myBuilder.NewCommand() #=================== +#=========================================================== +batchmode_geompy.myBuilder.RemoveAttribute(child,"AttributeSelectable") +batchmode_geompy.myBuilder.CommitCommand() + +# Control the attributes +#=========================================================== + +res, A = batchmode_geompy.myBuilder.FindAttribute(child, "AttributeComment") +print "res = ", res +if A != None : + print " AttributeComment was found" +else: + print " AttributeComment is not found. It's correct" + +attributes=[] + +attributes = child.GetAllAttributes() + +length = len(attributes) + +print "Attributes number = ", length +print attributes +for i in range(0, length) : + attr = attributes[i] + if attr is None : + print i,"None item of object attributes list" + +if length != 5 : + raise RuntimeError, "Wrong number of attributes" + diff --git a/doc/salome/examples/example18 b/doc/salome/examples/example18 new file mode 100644 index 000000000..477f8b2b6 --- /dev/null +++ b/doc/salome/examples/example18 @@ -0,0 +1,163 @@ + +child1 = batchmode_geompy.myBuilder.NewObject(batchmode_geompy.father) +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child1,"AttributeName") +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" +A = A._narrow(SALOMEDS.AttributeName) +A.SetValue("N1") +N1 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child1, "AttributeTreeNode") +if N1 == None : + raise RuntimeError, "Can't create AttributeTreeNode attribute" + +child2 = batchmode_geompy.myBuilder.NewObject(batchmode_geompy.father) +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child2,"AttributeName") +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" +A = A._narrow(SALOMEDS.AttributeName) +A.SetValue("N2") +N2 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child2, "AttributeTreeNode") +if N2 == None : + raise RuntimeError, "Can't create AttributeTreeNode attribute" + +child3 = batchmode_geompy.myBuilder.NewObject(batchmode_geompy.father) +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child3,"AttributeName") +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" +A = A._narrow(SALOMEDS.AttributeName) +A.SetValue("N3") +N3 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child3, "AttributeTreeNode") +if N3 == None : + raise RuntimeError, "Can't create AttributeTreeNode attribute" + + +child11 = batchmode_geompy.myBuilder.NewObject(child1) +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child11,"AttributeName") +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" +A = A._narrow(SALOMEDS.AttributeName) +A.SetValue("N11") + +N11 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child11, "AttributeTreeNode") + +if N11 == None : + raise RuntimeError, "Can't create AttributeTreeNode attribute" + +child111 = batchmode_geompy.myBuilder.NewObject(child11) +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child111, "AttributeName") +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" +A = A._narrow(SALOMEDS.AttributeName) +A.SetValue("N111") + +N111 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child111, "AttributeTreeNode") + +if N111 == None : + raise RuntimeError, "Can't create AttributeTreeNode attribute" + + +child31 = batchmode_geompy.myBuilder.NewObject(child3) +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child31,"AttributeName") +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" +A = A._narrow(SALOMEDS.AttributeName) +A.SetValue("N31") + +N31 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child31, "AttributeTreeNode") +if N31 == None : + raise RuntimeError, "Can't create AttributeTreeNode attribute" + +child32 = batchmode_geompy.myBuilder.NewObject(child3) +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child32,"AttributeName") +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" +A = A._narrow(SALOMEDS.AttributeName) +A.SetValue("N32") + +N32 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child32, "AttributeTreeNode") +if N32 == None : + raise RuntimeError, "Can't create AttributeTreeNode attribute" + +child321 = batchmode_geompy.myBuilder.NewObject(child32) +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child321,"AttributeName") +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" +A = A._narrow(SALOMEDS.AttributeName) +A.SetValue("N321") + +N321 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child321, "AttributeTreeNode") +if N321 == None : + raise RuntimeError, "Can't create AttributeTreeNode attribute" + +child33 = batchmode_geompy.myBuilder.NewObject(child3) +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child33,"AttributeName") +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" +A = A._narrow(SALOMEDS.AttributeName) +A.SetValue("N33") + +N33 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child33, "AttributeTreeNode") +if N33 == None : + raise RuntimeError, "Can't create AttributeTreeNode attribute" + +child34 = batchmode_geompy.myBuilder.NewObject(child3) +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child34,"AttributeName") +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" +A = A._narrow(SALOMEDS.AttributeName) +A.SetValue("N34") + +N34 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child34, "AttributeTreeNode") +if N34 == None : + raise RuntimeError, "Can't create AttributeTreeNode attribute" + + + +#Create links between tree nodes. +# -| root +# --N1 __ +# | N11__ +# | N111 +# --N2 +# | +# --N3__ +# N31 +# N32__ +# N321 +# N33 +# N34 + +N11.SetFather(N1) +N11.Append(N111) +N3.SetPrevious(N1) +N3.Prepend(N2) + +N32.SetFather(N3) +N32.Prepend(N31) +N33.InsertAfter(N32) +N33.Append(N34) +print "------------- ", N1, " ------------- " +print "N1.Label() = ", N1.Label() , "IsRoot() = ", N1.IsRoot(), "Depth() = ", N1.Depth() +print "N11.Label() = ", N11.Label() , "IsRoot() = ", N11.IsRoot(), "Depth() = ", N11.Depth() +print "N111.Label() = ", N111.Label() , "IsRoot() = ", N111.IsRoot(), "Depth() = ", N111.Depth() +print "N2.Label() = ", N2.Label() , "IsRoot() = ", N2.IsRoot(), "Depth() = ", N2.Depth() +print "N3.Label() = ", N3.Label() , "IsRoot() = ", N3.IsRoot(), "Depth() = ", N3.Depth() +print "N31.Label() = ", N31.Label() , "IsRoot() = ", N31.IsRoot(), "Depth() = ", N31.Depth() +print "N32.Label() = ", N32.Label() , "IsRoot() = ", N32.IsRoot(), "Depth() = ", N32.Depth() +print "N321.Label() = ", N321.Label() , "IsRoot() = ", N321.IsRoot(), "Depth() = ", N321.Depth() +print "N33.Label() = ", N33.Label() , "IsRoot() = ", N33.IsRoot(), "Depth() = ", N33.Depth() +print "N34.Label() = ", N34.Label() , "IsRoot() = ", N34.IsRoot(), "Depth() = ", N34.Depth() +print "N1.IsRoot()=", N1.IsRoot() + +print "N1.HasNext() = ",N1.HasNext() +if N1.HasNext(): + print N1.Next().Label() + +print "N32.HasPrevious() = ",N32.HasPrevious() +if N32.HasPrevious(): + print N32.GetPrevious().Label() + +print "N111.HasFirst()=",N111.HasFirst() +print "N111.HasFather()=",N111.HasFather() +if N111.HasFather() : + print "N111.GetFather().Label()=",N111.GetFather().Label() + diff --git a/doc/salome/examples/example19 b/doc/salome/examples/example19 new file mode 100644 index 000000000..4cf37eb34 --- /dev/null +++ b/doc/salome/examples/example19 @@ -0,0 +1,540 @@ + +#====================================================================== +#1. Create Study and add some components to it +#====================================================================== + +#================================= +# create AttributeReal +#================================= +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeReal") +if A == None : + raise RuntimeError, "Can't create AttributeReal attribute" +A = A._narrow(SALOMEDS.AttributeReal) +A.SetValue(0.0001) +if A.Value() != 0.0001: + raise RuntimeError, "Error : wrong value of AttributeReal" + +# === Geometry ================================================== + +import batchmode_geompy + +#=================================== +# define a box +#=================================== + +box = batchmode_geompy.MakeBox(0., 0., 0., 100., 200., 300.) +idbox = batchmode_geompy.addToStudy(box,"box") + + +geom = batchmode_geompy.geom +import SMESH +import batchmode_smesh +ShapeType = batchmode_smesh.ShapeType + +# ---- add first face of box in study + +subShapeList = batchmode_geompy.SubShapeAll(box,ShapeType["Face"]) +face=subShapeList[0] +name = "box_face" +print name +idface= batchmode_geompy.addToStudyInFather(box,face,name) + +# ---- add shell from box in study + +subShellList= batchmode_geompy.SubShapeAll(box,ShapeType["Shell"]) +shell = subShellList[0] +name = "box_shell" +print name +idshell= batchmode_geompy.addToStudyInFather(box,shell,name) + +# ---- add first edge of face in study + +edgeList = batchmode_geompy.SubShapeAll(face,ShapeType["Edge"]) +edge=edgeList[0]; +name = "face_edge" +print name +idedge= batchmode_geompy.addToStudyInFather(face,edge,name) + +# ---- launch SMESH, init a Mesh with the box + +smesh = batchmode_smesh.smesh +# -- Init -- +shape = batchmode_geompy.IDToObject(idbox) +mesh=smesh.Init(geom, batchmode_geompy.myStudyId, shape) + +orb = batchmode_geompy.orb + +idmesh = batchmode_smesh.AddNewMesh( orb.object_to_string(mesh) ) +batchmode_smesh.SetName(idmesh, "Meshbox"); +batchmode_smesh.SetShape(idbox, idmesh); + +# ---- create Hypothesis + +print "-------------------------- create Hypothesis ----------------------" +print "-------------------------- LocalLength" +hyp1 = smesh.CreateHypothesis("LocalLength", batchmode_geompy.myStudyId ) +hypLen1 = hyp1._narrow(SMESH.SMESH_LocalLength) +hypLen1.SetLength(100) +print hypLen1.GetName() +print hypLen1.GetId() +print hypLen1.GetLength() + +idlength = batchmode_smesh.AddNewHypothesis( orb.object_to_string(hypLen1) ); +batchmode_smesh.SetName(idlength, "Local_Length_100"); + +print "-------------------------- NumberOfSegments" +hyp2 = smesh.CreateHypothesis("NumberOfSegments", batchmode_geompy.myStudyId ) +hypNbSeg1=hyp2._narrow(SMESH.SMESH_NumberOfSegments) +hypNbSeg1.SetNumberOfSegments(7) +print hypNbSeg1.GetName() +print hypNbSeg1.GetId() +print hypNbSeg1.GetNumberOfSegments() + +idseg = batchmode_smesh.AddNewHypothesis( orb.object_to_string(hypNbSeg1) ); +batchmode_smesh.SetName(idseg, "NumberOfSegments_7"); + +print "-------------------------- MaxElementArea" +hyp3 = smesh.CreateHypothesis("MaxElementArea", batchmode_geompy.myStudyId) +hypArea1=hyp3._narrow(SMESH.SMESH_MaxElementArea) +hypArea1.SetMaxElementArea(2500) +print hypArea1.GetName() +print hypArea1.GetId() +print hypArea1.GetMaxElementArea() + +idarea1 = batchmode_smesh.AddNewHypothesis( orb.object_to_string(hypArea1) ); +batchmode_smesh.SetName(idarea1, "MaxElementArea_2500"); + +print "-------------------------- MaxElementArea" +hyp3 = smesh.CreateHypothesis("MaxElementArea", batchmode_geompy.myStudyId) +hypArea2 = hyp3._narrow(SMESH.SMESH_MaxElementArea) +hypArea2.SetMaxElementArea(500) +print hypArea2.GetName() +print hypArea2.GetId() +print hypArea2.GetMaxElementArea() + +idarea2 = batchmode_smesh.AddNewHypothesis( orb.object_to_string(hypArea2) ); +batchmode_smesh.SetName(idarea2, "MaxElementArea_500"); + +print "-------------------------- Regular_1D" +alg1 = smesh.CreateHypothesis("Regular_1D", batchmode_geompy.myStudyId) +algo1 = alg1._narrow(SMESH.SMESH_Algo) +listHyp = algo1.GetCompatibleHypothesis() +for hyp in listHyp: + print hyp +algoReg=alg1._narrow(SMESH.SMESH_Regular_1D) +print algoReg.GetName() +print algoReg.GetId() + +idreg = batchmode_smesh.AddNewAlgorithms( orb.object_to_string(algoReg) ); +batchmode_smesh.SetName(idreg, "Regular_1D"); + +print "-------------------------- MEFISTO_2D" +alg2 = smesh.CreateHypothesis("MEFISTO_2D", batchmode_geompy.myStudyId) +algo2 = alg2._narrow(SMESH.SMESH_Algo) +listHyp=algo2.GetCompatibleHypothesis() +for hyp in listHyp: + print hyp +algoMef=alg2._narrow(SMESH.SMESH_MEFISTO_2D) +print algoMef.GetName() +print algoMef.GetId() + +idmef = batchmode_smesh.AddNewAlgorithms( orb.object_to_string(algoMef) ); +batchmode_smesh.SetName(idmef, "MEFISTO_2D"); + + +# ---- add hypothesis to edge + +print "-------------------------- add hypothesis to edge" +edge = batchmode_geompy.IDToObject(idedge) +submesh = mesh.GetElementsOnShape(edge) +ret = mesh.AddHypothesis(edge,algoReg) +print ret +ret=mesh.AddHypothesis(edge,hypLen1) +print ret + +idsm1 = batchmode_smesh.AddSubMeshOnShape( idmesh, + idedge, + orb.object_to_string(submesh), + ShapeType["Edge"] ) +batchmode_smesh.SetName(idsm1, "SubMeshEdge") +batchmode_smesh.SetAlgorithms( idsm1, idreg ); +batchmode_smesh.SetHypothesis( idsm1, idlength ); + +print "-------------------------- add hypothesis to face" +face=batchmode_geompy.IDToObject(idface) +submesh=mesh.GetElementsOnShape(face) +ret=mesh.AddHypothesis(face,hypArea2) +print ret + +idsm2 = batchmode_smesh.AddSubMeshOnShape( idmesh, + idface, + orb.object_to_string(submesh), + ShapeType["Face"] ) +batchmode_smesh.SetName(idsm2, "SubMeshFace") +batchmode_smesh.SetHypothesis( idsm2, idarea2 ); + +# ---- add hypothesis to box + +print "-------------------------- add hypothesis to box" +box=batchmode_geompy.IDToObject(idbox) +submesh=mesh.GetElementsOnShape(box) +ret=mesh.AddHypothesis(box,algoReg) +print ret +ret=mesh.AddHypothesis(box,hypNbSeg1) +print ret +ret=mesh.AddHypothesis(box,algoMef) +print ret +ret=mesh.AddHypothesis(box,hypArea1) +print ret + +batchmode_smesh.SetAlgorithms( idmesh, idreg ); +batchmode_smesh.SetHypothesis( idmesh, idseg ); +batchmode_smesh.SetAlgorithms( idmesh, idmef ); +batchmode_smesh.SetHypothesis( idmesh, idarea1 ); + +# ---- compute box + +print "-------------------------- compute box" +ret=smesh.Compute(mesh,box) +print ret +log=mesh.GetLog(0); # no erase trace +for linelog in log: + print linelog + + +#======================================================= +# add SuperVision component +#======================================================= + +from batchmode_SuperV import * +import os +dir= os.getenv("SUPERV_ROOT_DIR") +if dir == None: + raise RuntimeError, "SUPERV_ROOT_DIR is not defined" +xmlfile = dir +"/examples/GraphEssai.xml" +print "--------------\n"+xmlfile+"\n--------------\n" + +myGraph = Graph ( xmlfile ) + +# This DataFlow is "valid" : no loop, correct links between Nodes etc... +print myGraph.IsValid() + +# Get Nodes +myGraph.PrintNodes() +Add,Sub,Mul,Div = myGraph.Nodes() + +# Load Datas +Addx = Add.Input("x",3.) +Addy = Add.Input("y",4.5) +Subx = Sub.Input("x",1.5) + +# Get Output Port +Addz = Add.Port('z') +Subz = Sub.Port('z') +Mulz = Mul.Port('z') +Divz = Div.Port('z') + +# This DataFlow is "executable" : all pending Ports are defined with Datas +print myGraph.IsExecutable() + +# Starts only execution of that DataFlow and gets control immediatly +print myGraph.Run() + +# That DataFlow is running ==> 0 (false) +print myGraph.IsDone() + +# Events of execution : +aStatus,aNode,anEvent,aState = myGraph.Event() +while aStatus : + print aNode.Thread(),aNode.SubGraph(),aNode.Name(),anEvent,aState + aStatus,aNode,anEvent,aState = myGraph.Event() +print myGraph.IsDone() + +# Wait for Completion (but it is already done after event loop ...) +print "Done : ",myGraph.DoneW() + +# Get result +print "Result : ",Divz.ToString() + +# Intermediate results : +print "Intermediate Result Add\z : ",Addz.ToString() +print "Intermediate Result Sub\z : ",Subz.ToString() +print "Intermediate Result Mul\z : ",Mulz.ToString() + +print " " +#print "Type : print myGraph.IsDone()" +#print " If execution is finished ==> 1 (true)" +res=myGraph.IsDone() +if res != 1: + raise RuntimeError, "myGraph.Run() is not done" + +print " " +print "Type : print Divz.ToString()" +print " You will get the result" +Divz.ToString() + +print " " +print "Type : myGraph.PrintPorts()" +print " to see input and output values of the graph" +myGraph.PrintPorts() + +print " " +print "Type : Add.PrintPorts()" +Add.PrintPorts() + +print "Type : Sub.PrintPorts()" +Sub.PrintPorts() + +print "Type : Mul.PrintPorts()" +Mul.PrintPorts() + +print "Type : Div.PrintPorts()" +print " to see input and output values of nodes" +Div.PrintPorts() + +# Export will create newsupervisionexample.xml and the corresponding .py file +tmpdir=os.getenv("TmpDir") +if tmpdir is None: + tmpdir="/tmp" +file = tmpdir + "/newsupervisionexample" +print "--------------\n"+file+"\n--------------\n" +myGraph.Export(file) + +ior = batchmode_geompy.orb.object_to_string(myGraph.G) +addStudy(ior) + +GraphName = myGraph.Name() +print "Befor save ", +nodes = myGraph.Nodes() +length_bs = len(nodes) +print "ListOfNodes length = ", length_bs +names=[] +for node in nodes: + names.append(node.Name()) +print names + + +#================================= +# save / restore study +#================================= +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + + +#================================================== +#1. SaveAs +#================================================== +print " ------- We will save to", file, "-----------" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +batchmode_geompy.myStudyManager.Close(batchmode_geompy.myStudy) + +#rename the file and try to reread it again + +os.mkdir(str + "/test_dir") + +#2.================================================== +print " ------- We rename the file as " + str + "/test_dir/test_new.hdf" +os.rename(file, str+"/test_dir/test_new.hdf") + +#================================================== +#3. Open +#================================================== +print " ------- We try to open " + str + "/test_dir/test_new.hdf" + +try: + openedStudy=batchmode_geompy.myStudyManager.Open(str+"/test_dir/test_new.hdf") +except Exception: + raise RuntimeError, "Can't open saved study!" + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "GEOM component is not found! Wrong study is opened." + + +#================================= +# find AttributeReal +#================================= + +res,A=father.FindAttribute("AttributeReal") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeReal" + +A = A._narrow(SALOMEDS.AttributeReal) +if A.Value() != 0.0001: + raise RuntimeError, "Error : wrong value of AttributeReal" + +#================================================== +# find box +#================================================== +box = openedStudy.FindObject("box") +if box is None : + raise RuntimeError, "box was not found! Wrong study is opened." + +edge=openedStudy.FindObject("face_edge") +if edge is None : + raise RuntimeError, "face_edge was not found! Wrong study is opened." + + +father = openedStudy.FindComponent("MESH") +if father is None: + raise RuntimeError, "MESH component is not found! Wrong study is opened." + +hp=openedStudy.FindObject("Meshbox") +if hp is None: + raise RuntimeError, "Meshbox object was not found! Wrong study is opened." + +hp = openedStudy.FindObject("Algorithms Definition") +if hp is None: + raise RuntimeError, "Algorithms Definition object was not found! Wrong study is opened." + +hp = openedStudy.FindObject("MEFISTO_2D") +if hp is None: + raise RuntimeError, "MEFISTO_2D object was not found! Wrong study is opened." + +hp = openedStudy.FindObject("Hypothesis Definition") +if hp is None: + raise RuntimeError, "Algoriths Definition was not found! Wrong study is opened." + +#================================================== +# Find Supervisor +#================================================== +father = openedStudy.FindComponent("SUPERV") +if father is None: + raise RuntimeError, "SUPERV component is not found! Wrong study is opened." + +SuperV = lcc.FindOrLoadComponent("SuperVisionContainer","Supervision") +Builder = openedStudy.NewBuilder() +Builder.LoadWith(father, SuperV) +import SALOMEDS + +aChildIterator = openedStudy.NewChildIterator(father) + +#while aChildIterator.More(): +anSObject = aChildIterator.Value() +#print "iterate: ", anSObject.GetID() +res, anAttr=anSObject.FindAttribute("AttributeIOR") +if res : + anAttr=anAttr._narrow(SALOMEDS.AttributeIOR) + ior = anAttr.Value() + Graph=SuperV.getGraph(ior) + ListOfNodes=Graph.Nodes() + length_as= len(ListOfNodes) + print "ListOfNodes length = ", length_as + if length_as != length_bs: + raise RuntimeErrror, "defferent length of nodes after study open" +#aChildIterator.Next() + +Names = [] +for node in ListOfNodes: + Names.append(node.Name()) +names.sort() +Names.sort() +if names != Names : + raise RuntimeError, "List of dataflow nodes after save differs from one befor save operation" + +#================================================== +#4. Save +#================================================== +batchmode_geompy.myStudyManager.Save(openedStudy) +batchmode_geompy.myStudyManager.Close(openedStudy) +#================================================== +#5. Open +#================================================== +try: + openedStudy = batchmode_geompy.myStudyManager.Open(str+"/test_dir/test_new.hdf") +except Exception: + raise RuntimeError, "Can't open saved study!" + + + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +#find AttributeReal +res,A=father.FindAttribute("AttributeReal") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeReal" + +A = A._narrow(SALOMEDS.AttributeReal) +if A.Value() != 0.0001: + raise RuntimeError, "Error : wrong value of AttributeReal" +#================================================== +# find box +#================================================== +box = openedStudy.FindObject("box") +if box is None : + raise RuntimeError, "box was not found! Wrong study is opened." + +edge=openedStudy.FindObject("face_edge") +if edge is None : + raise RuntimeError, "face_edge was not found! Wrong study is opened." + + +father = openedStudy.FindComponent("MESH") +if father is None: + raise RuntimeError, "MESH component is not found! Wrong study is opened." + +hp=openedStudy.FindObject("Meshbox") +if hp is None: + raise RuntimeError, "Meshbox object was not found! Wrong study is opened." + +hp = openedStudy.FindObject("Algorithms Definition") +if hp is None: + raise RuntimeError, "Algorithms Definition object was not found! Wrong study is opened." + +hp = openedStudy.FindObject("MEFISTO_2D") +if hp is None: + raise RuntimeError, "MEFISTO_2D object was not found! Wrong study is opened." + +hp = openedStudy.FindObject("Hypothesis Definition") +if hp is None: + raise RuntimeError, "Algoriths Definition was not found! Wrong study is opened." + +#================================================== +# Find Supervisor +#================================================== +father = openedStudy.FindComponent("SUPERV") +if father is None: + raise RuntimeError, "SUPERV component is not found! Wrong study is opened." + +SuperV = lcc.FindOrLoadComponent("SuperVisionContainer","Supervision") +Builder = openedStudy.NewBuilder() +Builder.LoadWith(father, SuperV) +import SALOMEDS + +aChildIterator = openedStudy.NewChildIterator(father) + +#while aChildIterator.More(): +anSObject = aChildIterator.Value() + +res, anAttr=anSObject.FindAttribute("AttributeIOR") +if res : + anAttr=anAttr._narrow(SALOMEDS.AttributeIOR) + ior = anAttr.Value() + Graph=SuperV.getGraph(ior) + ListOfNodes=Graph.Nodes() + length_as= len(ListOfNodes) + print "ListOfNodes length = ", length_as + if length_as != length_bs: + raise RuntimeErrror, "defferent length of nodes after study open" +#aChildIterator.Next() + +Names = [] +for node in ListOfNodes: + Names.append(node.Name()) +names.sort() +Names.sort() +if names != Names : + raise RuntimeError, "List of dataflow nodes after save differs from one befor save operation" + diff --git a/doc/salome/examples/example20 b/doc/salome/examples/example20 new file mode 100644 index 000000000..9326da115 --- /dev/null +++ b/doc/salome/examples/example20 @@ -0,0 +1,152 @@ + +batchmode_geompy.myBuilder._set_UndoLimit(20) + +#-------------------------------------------------------------------------- +# create AttributeReal +#=============================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeReal") +if A == None : + raise RuntimeError, "Can't create AttributeReal attribute" +A = A._narrow(SALOMEDS.AttributeReal) +A.SetValue(0.0001) +if A.Value() != 0.0001: + raise RuntimeError, "Error : wrong value of AttributeReal" + +# create AttributeStudyProperties +#================================================ +A = batchmode_geompy.myStudy.GetProperties() +if A == None : + raise RuntimeError, "Can't create AttributeStudyProperties attribute" +A = A._narrow(SALOMEDS.AttributeStudyProperties) + +batchmode_geompy.myBuilder.NewCommand(); +print "A.GetUserName()= ", A.GetUserName() +res,mm,hh,dd,mnth,yy=A.GetCreationDate() +print "A.GetCreationDate() = ", mm,hh,dd,mnth,yy +print "A.GetCreationMode() = ", A.GetCreationMode() +print "A.IsModified() = ", A.IsModified() +print "A.IsLocked() = ", A.IsLocked() +if A.IsLocked() == 0 : + A.SetUserName("tester"); print 'A.SetUserName("tester"), A.GetUserName() = ', A.GetUserName() + A.SetCreationDate(11,11,11,11,2002); print 'A.SetCreationDate(11,11,11,11,2002), A.GetCreationDate() =', A.GetCreationDate() + print "A.IsModified() = ", A.IsModified() +A.SetLocked(1) + +#check the transaction result +batchmode_geompy.myBuilder.CommitCommand() +if A.GetUserName() != "tester": + print 'Control after transaction close : A.GetUserName() = ', A.GetUserName() + raise RuntimeError, "Field 'UserName' was not modified but had to!" + +# try to make some changes wrapped by transaction +#================================================ +batchmode_geompy.myBuilder.NewCommand() +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeInteger") + +if A == None : + raise RuntimeError, "Can't create AttributeInteger attribute" +A = A._narrow(SALOMEDS.AttributeInteger) +A.SetValue(1000000) + +exception_was = None +try : batchmode_geompy.myBuilder.CommitCommand() +except Exception: exception_was = 1 + +if exception_was is None: + raise RuntimeError, "Study was locked for changes but CommitCommand did not generate an exception !" + +# save / restore study + +#================================================ +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +print " ------- We will save to", file, "-----------" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) + + +#--------------------------------------------------------------------------# +#--------------------------- Open file ------------------------------------# +#--------------------------------------------------------------------------# + +print" -------------- Open " + file + "-------------- " + +openedStudy = batchmode_geompy.myStudyManager.Open(file) +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +#1. find AttributeReal +#================================================ + +res,A=father.FindAttribute("AttributeReal") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeReal" + +A = A._narrow(SALOMEDS.AttributeReal) +if A.Value() != 0.0001: + raise RuntimeError, "Error : wrong value of AttributeReal" + + +#2. find AttributeStudyProperties +#================================================= +A=openedStudy.GetProperties() +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeStudyProperties" + +A = A._narrow(SALOMEDS.AttributeStudyProperties) +if A.IsLocked() == 0 : + raise RuntimeError, "Error : AttributeStudyProperties must have Locked flag but have no!" + +#get the builder +myBuilder = openedStudy.NewBuilder() + +#3. try to make some changes wrapped by transaction +#================================================== +exception_was = None +try : + myBuilder.NewCommand() + A = myBuilder.FindOrCreateAttribute(father, "AttributeInteger") + + if A == None : + raise RuntimeError, "Can't create AttributeInteger attribute" + A = A._narrow(SALOMEDS.AttributeInteger) + A.SetValue(1000000) + myBuilder.CommitCommand() +except Exception: exception_was = 1 + +if exception_was is None: + raise RuntimeError, "Study was locked for changes but CommitCommand did not generate an exception !" + + +myBuilder.NewCommand() +A=openedStudy.GetProperties() +A = A._narrow(SALOMEDS.AttributeStudyProperties) +A.SetLocked(0) +myBuilder.CommitCommand() + +#4. +myBuilder.NewCommand() +A.SetLocked(0); +print "A.GetUserName()= ", A.GetUserName() +print "A.GetCreationDate() = ", A.GetCreationDate() +print "A.GetCreationMode() = ", A.GetCreationMode() +print "A.IsModified() = ", A.IsModified() +myBuilder.CommitCommand() + +#5. +myBuilder.NewCommand() +A.SetUserName("tester1") +myBuilder.CommitCommand() +print "A.GetUserName()= ", A.GetUserName() + +#remove the document file +os.remove(file) + diff --git a/doc/salome/examples/example21 b/doc/salome/examples/example21 new file mode 100644 index 000000000..33526d956 --- /dev/null +++ b/doc/salome/examples/example21 @@ -0,0 +1,127 @@ + +# create AttributeReal +#======================================================================================================= +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeTableOfInteger") +if A == None : + raise RuntimeError, "Can't create AttributeTableOfInteger attribute" +A = A._narrow(SALOMEDS.AttributeTableOfInteger) +a=[1,2] + +b=[3,4] + +# 2x2 +# --- rows --- +A.AddRow(a) +A.AddRow(b) +a=[34,14] +A.SetRow(1,a) + +# 3x3 +# +b=[54,56] +A.AddRow(b) + +# --- columns --- +a=[76,25,12] + +A.AddColumn(a) +a=[836,3425,342] +A.SetColumn(3,a) + +# change attribute values +print "A.GetValue(2,2) = ", A.GetValue(2,2) +print "A.PutValue(2,2,625323)" +A.PutValue(625323,2,2) +print "A.GetValue(2,2) = ", A.GetValue(2,2) + +#set Titles + +A.SetTitle("TEST") + +A.SetRowTitle(1,"FR") +A.SetRowTitle(2,"SR") +A.SetRowTitle(3,"TR") + +A.SetColumnTitle(1,"FC") +A.SetColumnTitle(2,"SC") +A.SetColumnTitle(3,"TC") + + +#check the table +print "Common title : ",A.GetTitle() +print "Rows titles : ", A.GetRowTitles() +rnb = A.GetNbRows() +for i in range(1, rnb): + b=A.GetRow(i) + print b + +cnb = A.GetNbColumns() +print "Columns title : ", A.GetColumnTitles() +for i in range(1, cnb): + b=A.GetColumn(i) + print b + +# set titles +#titles=["11","12","13"] +#A.SetRowTitles(titles) +#titles=["21","22","23"] +#A.SetRowTitles(2,titles) +#titles=["31","32","33"] +#A.SetRowTitles(3,titles) + +#--------------------------------------------------------------------------# +# ----------------------- save the study ----------------------------------# +#--------------------------------------------------------------------------# +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +print " ------- We will save to", file, "-----------" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) + +#--------------------------------------------------------------------------# +#---------------------------- Open file -----------------------------------# +#--------------------------------------------------------------------------# + +print" -------------- Open " + file + "-------------- " + +openedStudy=batchmode_geompy.myStudyManager.Open(file) +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + +# --- check attribute --- + +res,A=father.FindAttribute("AttributeTableOfInteger") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeTableOfInteger" + +A = A._narrow(SALOMEDS.AttributeTableOfInteger) + +#check the table +print "Common title : ",A.GetTitle() +print "Rows titles : ", A.GetRowTitles() +rnb = A.GetNbRows() +for i in range(1, rnb): + b=A.GetRow(i) + print b + +cnb = A.GetNbColumns() +print "Columns title : ", A.GetColumnTitles() +for i in range(1, cnb): + b=A.GetColumn(i) + print b + +titles=["ff","ss","tt"] +A.SetRowTitles(titles) +print "Rows titles : ", A.GetRowTitles() + +titles=["ww","zz","cc"] +A.SetColumnTitles(titles) +print "Column titles : ", A.GetColumnTitles() + diff --git a/doc/salome/examples/example22 b/doc/salome/examples/example22 new file mode 100644 index 000000000..bba273be6 --- /dev/null +++ b/doc/salome/examples/example22 @@ -0,0 +1,128 @@ + +# create AttributeReal +#=============================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeTableOfReal") +if A == None : + raise RuntimeError, "Can't create AttributeTableOfReal attribute" +A = A._narrow(SALOMEDS.AttributeTableOfReal) +a=[1,2] + +b=[3,4] + +# 2x2 +# --- rows --- +A.AddRow(a) +A.AddRow(b) +a=[34,14] +A.SetRow(1,a) + +# 3x3 +# +b=[54,56] +A.AddRow(b) + +# --- columns --- +a=[76,25,12] + +A.AddColumn(a) +a=[836,3425,342] +A.SetColumn(3,a) + +# change attribute values +print "A.GetValue(2,2) = ", A.GetValue(2,2) +print "A.PutValue(2,2,625323)" +A.PutValue(625323,2,2) +print "A.GetValue(2,2) = ", A.GetValue(2,2) + +#set Titles + +A.SetTitle("TEST") + +A.SetRowTitle(1,"FR") +A.SetRowTitle(2,"SR") +A.SetRowTitle(3,"TR") + +A.SetColumnTitle(1,"FC") +A.SetColumnTitle(2,"SC") +A.SetColumnTitle(3,"TC") + + +#check the table +print "Common title : ",A.GetTitle() +print "Rows titles : ", A.GetRowTitles() +rnb = A.GetNbRows() + 1 +for i in range(1, rnb): + b=A.GetRow(i) + print b + +cnb = A.GetNbColumns() + 1 +print "Columns title : ", A.GetColumnTitles() +for i in range(1, cnb): + b=A.GetColumn(i) + print b + +# set titles +#titles=["11","12","13"] +#A.SetRowTitles(titles) +#titles=["21","22","23"] +#A.SetRowTitles(2,titles) +#titles=["31","32","33"] +#A.SetRowTitles(3,titles) + +#--------------------------------------------------------------------------# +#------------------------ save the study ----------------------------------# +#--------------------------------------------------------------------------# +import os +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +print " ------- We will save to", file, "-----------" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) + +#--------------------------------------------------------------------------# +#---------------------------- Open file -----------------------------------# +#--------------------------------------------------------------------------# + +print" -------------- Open " + file + "-------------- " + +openedStudy = batchmode_geompy.myStudyManager.Open(file) +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + +# --- check attribute --- + +res,A=father.FindAttribute("AttributeTableOfReal") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeTableOfReal" + +A = A._narrow(SALOMEDS.AttributeTableOfReal) + +#check the table +print "Common title : ",A.GetTitle() +print "Rows titles : ", A.GetRowTitles() +rnb = A.GetNbRows() + 1 +for i in range(1, rnb): + b=A.GetRow(i) + print b + +cnb = A.GetNbColumns() + 1 +print "Columns title : ", A.GetColumnTitles() +for i in range(1, cnb): + b=A.GetColumn(i) + print b + +titles=["ff","ss","tt"] +A.SetRowTitles(titles) +print "Rows titles : ", A.GetRowTitles() + +titles=["ww","zz","cc"] +A.SetColumnTitles(titles) +print "Column titles : ", A.GetColumnTitles() + diff --git a/doc/salome/examples/example23 b/doc/salome/examples/example23 new file mode 100644 index 000000000..da60ce0e9 --- /dev/null +++ b/doc/salome/examples/example23 @@ -0,0 +1,30 @@ + +import batchmode_salome +#import SALOMEDS + +aStudy = batchmode_salome.myStudy + +#Add new component 'User data' +aBuilder = aStudy.NewBuilder() +aComponent = aBuilder.NewComponent("User data") +anAttr = aBuilder.FindOrCreateAttribute(aComponent, "AttributeName") +anAttrName = anAttr._narrow(SALOMEDS.AttributeName) +anAttrName.SetValue("User data") + + +#Add a new case 'Case1' to the component 'User data' +aBuilder.AddDirectory("/User data/Case1") + +#Set a study context to '/User data/Case1' +aStudy.SetContext("/User data/Case1") + +#Print the current study context +print aStudy.GetContext() + +#Add a sub directory 'aSubCase' to 'Case1' (under the current context) +aBuilder.AddDirectory("aSubCase") + + +#Add a new case 'Case2' to component 'User data' +aBuilder.AddDirectory("/User data/Case2") + diff --git a/doc/salome/examples/example3 b/doc/salome/examples/example3 new file mode 100644 index 000000000..95e18e8e7 --- /dev/null +++ b/doc/salome/examples/example3 @@ -0,0 +1,60 @@ + +# create AttributeSequenceOfReal +#================================= +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeSequenceOfReal") +if A == None : + raise RuntimeError, "Can't create AttributeSequenceOfReal attribute" +A = A._narrow(SALOMEDS.AttributeSequenceOfReal) +if A == None : + raise RuntimeError, "_narrow returns None instead of AttributeSequenceOfReal pointer" + +A.Add(0.0293) +A.Add(625.1e+2) +A.Add(0.928e+100) +A.Add(83.287) + +print "initial values ",A.Value(1), A.Value(2), A.Value(3), A.Value(4) +A.Remove(3) +print "after remove ", A.Value(1), A.Value(2), A.Value(3) +A.ChangeValue(2,76.265) +print "after second item change", A.Value(1), A.Value(2), A.Value(3) + +if A.Length() != 3: + print "Error : wrong length of SequenceOfReal" +if A.Value(1) != 0.0293 or A.Value(2) != 76.265 or A.Value(3) != 83.287: + print "Error : wrong value of AttributeSequenceOfReal" + +# save / restore study +#================================= +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +openedStudy=batchmode_geompy.myStudyManager.Open(file); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeSequenceOfReal +#================================= + +res,A=father.FindAttribute("AttributeSequenceOfReal") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeSequenceOfReal" + +A = A._narrow(SALOMEDS.AttributeSequenceOfReal) + +if A.Length() != 3: + print "Error : wrong length of SequenceOfReal" +if A.Value(1) != 0.0293 or A.Value(2) != 76.265 or A.Value(3) != 83.287: + print "Error : wrong value of AttributeSequenceOfReal" +print "after restoring ", A.Value(1), A.Value(2), A.Value(3) + diff --git a/doc/salome/examples/example4 b/doc/salome/examples/example4 new file mode 100644 index 000000000..2dd1966db --- /dev/null +++ b/doc/salome/examples/example4 @@ -0,0 +1,58 @@ + +# create AttributeSequenceOfInteger +#========================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeSequenceOfInteger") +if A == None : + raise RuntimeError, "Can't create AttributeSequenceOfInteger attribute" +A = A._narrow(SALOMEDS.AttributeSequenceOfInteger) +if A == None : + raise RuntimeError, "Can't create AttributeSequenceOfInteger attribute" + +A.Add(100) +A.Add(300) +A.Add(500) +A.Add(400) +A.Add(700) + +A.Remove(3) +A.ChangeValue(4,500) + + +if A.Length() != 4: + print "Wrong length of SequenceOfInteger" +if A.Value(1) != 100 or A.Value(2) != 300 or A.Value(3) != 400 or A.Value(4) != 700: + print "Wrong value of AttributeSequenceOfInteger" + + +# save / restore study +#================================= +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +openedStudy=batchmode_geompy.myStudyManager.Open(file); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeSequenceOfInteger +#====================================== + +res,A=father.FindAttribute("AttributeSequenceOfInteger") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeSequenceOfInteger" + +A = A._narrow(SALOMEDS.AttributeSequenceOfInteger) + +if A.Length() != 4: + print "Wrong length of SequenceOfInteger" +if A.Value(1) != 100 or A.Value(2) != 300 or A.Value(3) != 400 or A.Value(4) != 700: + print "Wrong value of AttributeSequenceOfInteger" + diff --git a/doc/salome/examples/example5 b/doc/salome/examples/example5 new file mode 100644 index 000000000..59e3bc6a0 --- /dev/null +++ b/doc/salome/examples/example5 @@ -0,0 +1,50 @@ + +# create AttributeName +#=========================================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeName") +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" +A = A._narrow(SALOMEDS.AttributeName) + +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" +A.SetValue("AttributesTesting") + +if A.Value() != "AttributesTesting": + print "Wrong value of AttributeName" + + +# save / restore study +#================================= +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +openedStudy = batchmode_geompy.myStudyManager.Open(file); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeName +#====================================== + +res,A=father.FindAttribute("AttributeName") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeName" + +A = A._narrow(SALOMEDS.AttributeName) + +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" + +if A.Value() != "AttributesTesting": + print "Wrong value of AttributeName" + diff --git a/doc/salome/examples/example6 b/doc/salome/examples/example6 new file mode 100644 index 000000000..71a5859e7 --- /dev/null +++ b/doc/salome/examples/example6 @@ -0,0 +1,47 @@ + +# create AttributeComment +#=========================================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeComment") +if A == None : + raise RuntimeError, "Can't create AttributeComment attribute" +A = A._narrow(SALOMEDS.AttributeComment) + +if A == None : + raise RuntimeError, "Can't create AttributeComment attribute" + +A.SetValue("GEOM") + + +# save / restore study +#============================================================ +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +openedStudy = batchmode_geompy.myStudyManager.Open(file); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeComment +#============================================================ + +res,A=father.FindAttribute("AttributeComment") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeComment" + +A = A._narrow(SALOMEDS.AttributeComment) + +if A == None : + raise RuntimeError, "Can't create AttributeComment attribute" + +if A.Value() != "GEOM": + "Error: wrong value of AttributeComment" + diff --git a/doc/salome/examples/example7 b/doc/salome/examples/example7 new file mode 100644 index 000000000..8ddf8bb2b --- /dev/null +++ b/doc/salome/examples/example7 @@ -0,0 +1,45 @@ + +# create AttributePersistentRef +#=========================================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributePersistentRef") +if A == None : + raise RuntimeError, "Can't create AttributePersistentRef attribute" +A = A._narrow(SALOMEDS.AttributePersistentRef) + +if A == None : + raise RuntimeError, "Can't create AttributePersistentRef attribute" + +A.SetValue("/tmp/test;1") + +# save / restore study +#============================================================ +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +openedStudy = batchmode_geompy.myStudyManager.Open(file); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributePersistentRef +#============================================================ + +res,A=father.FindAttribute("AttributePersistentRef") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributePersistentRef" + +A = A._narrow(SALOMEDS.AttributePersistentRef) + +if A == None : + raise RuntimeError, "Can't create AttributePersistentRef attribute" + +if A.Value() != "/tmp/test;1": + "Error: wrong value of AttributePersistentRef" diff --git a/doc/salome/examples/example8 b/doc/salome/examples/example8 new file mode 100644 index 000000000..eadb13feb --- /dev/null +++ b/doc/salome/examples/example8 @@ -0,0 +1,54 @@ + +from batchmode_geompy import * +import os + +#-------------------------------------------------------------------------- +# create AttributeDrawable +#=========================================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeDrawable") +if A == None : + raise RuntimeError, "Can't create AttributeDrawable attribute" +A = A._narrow(SALOMEDS.AttributeDrawable) + +if A == None : + raise RuntimeError, "Can't create AttributeDrawable attribute" + +A.SetDrawable(1) + +if A.IsDrawable() == 0: + "Error: wrong value of AttributeDrawable" + + +# save / restore study +#============================================================ +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +openedStudy=batchmode_geompy.myStudyManager.Open(file); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeDrawable +#============================================================ + +res,A=father.FindAttribute("AttributeDrawable") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeDrawable" + +A = A._narrow(SALOMEDS.AttributeDrawable) + +if A == None : + raise RuntimeError, "Can't create AttributeDrawable attribute" + +if A.IsDrawable() == 0: + "Error: wrong value of AttributeDrawable" + diff --git a/doc/salome/examples/example9 b/doc/salome/examples/example9 new file mode 100644 index 000000000..d29c9bab7 --- /dev/null +++ b/doc/salome/examples/example9 @@ -0,0 +1,50 @@ + +# create AttributeSelectable +#=========================================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeSelectable") +if A == None : + raise RuntimeError, "Can't create AttributeSelectable attribute" +A = A._narrow(SALOMEDS.AttributeSelectable) + +if A == None : + raise RuntimeError, "Can't create AttributeSelectable attribute" + +A.SetSelectable(1) + +if A.IsSelectable() == 0: + "Error: wrong value of AttributeSelectable" + + +# save / restore study +#============================================================ +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +openedStudy = batchmode_geompy.myStudyManager.Open(file); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeSelectable +#============================================================ + +res,A=father.FindAttribute("AttributeSelectable") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeSelectable" + +A = A._narrow(SALOMEDS.AttributeSelectable) + +if A == None : + raise RuntimeError, "Can't create AttributeSelectable attribute" + +if A.IsSelectable() == 0: + "Error: wrong value of AttributeSelectable" + diff --git a/doc/salome/gui/Makefile.am b/doc/salome/gui/Makefile.am new file mode 100644 index 000000000..f5f8a47db --- /dev/null +++ b/doc/salome/gui/Makefile.am @@ -0,0 +1,58 @@ +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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 +# + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +EXTRA_DIST = images static/footer.html static/doxygen.css + +guidocdir = $(docdir)/gui/KERNEL +guidoc_DATA = images/head.png + +usr_docs: doxyfile + echo "Running doxygen in directory: "`pwd`; \ + $(DOXYGEN) $< ; + +docs: usr_docs + +install-data-local: usr_docs + if test -d KERNEL; then \ + $(INSTALL) -d $(DESTDIR)$(docdir)/gui ; \ + cp -rp KERNEL $(DESTDIR)$(docdir)/gui ; \ + fi + +uninstall-local: + rm -rf $(DESTDIR)$(docdir)/gui/KERNEL + +clean-local: + -rm -fr KERNEL log.txt + +dist-hook: + cp -Rp $(srcdir)/images $(distdir) ; \ + rm -rf $(distdir)/images/CVS ; \ + cp -Rp $(srcdir)/static $(distdir) ; \ + rm -rf $(distdir)/static/CVS + +# VSR: nullify these make targets to avoid 'make distcheck' failure +dvi: +pdf: +ps: + diff --git a/doc/salome/tui/KERNEL/doxyuser.in b/doc/salome/gui/doxyfile.in similarity index 88% rename from doc/salome/tui/KERNEL/doxyuser.in rename to doc/salome/gui/doxyfile.in index d3387500b..458c22567 100644 --- a/doc/salome/tui/KERNEL/doxyuser.in +++ b/doc/salome/gui/doxyfile.in @@ -3,20 +3,19 @@ #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- -PROJECT_NAME = "SALOME v.@VERSION@" +PROJECT_NAME = "SALOME KERNEL User's Guide" PROJECT_NUMBER = -OUTPUT_DIRECTORY = ../ +OUTPUT_DIRECTORY = KERNEL CREATE_SUBDIRS = NO OUTPUT_LANGUAGE = English USE_WINDOWS_ENCODING = NO BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = NO +REPEAT_BRIEF = YES ABBREVIATE_BRIEF = ALWAYS_DETAILED_SEC = YES INLINE_INHERITED_MEMB = YES FULL_PATH_NAMES = YES -STRIP_FROM_PATH = @top_builddir@ \ - @top_srcdir@ +STRIP_FROM_PATH = @top_builddir@ @top_srcdir@ STRIP_FROM_INC_PATH = SHORT_NAMES = NO JAVADOC_AUTOBRIEF = YES @@ -35,7 +34,7 @@ SUBGROUPING = YES #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- -EXTRACT_ALL = YES +EXTRACT_ALL = NO EXTRACT_PRIVATE = NO EXTRACT_STATIC = YES EXTRACT_LOCAL_CLASSES = YES @@ -47,7 +46,7 @@ HIDE_IN_BODY_DOCS = NO INTERNAL_DOCS = YES CASE_SENSE_NAMES = YES HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES +SHOW_INCLUDE_FILES = NO INLINE_INFO = YES SORT_MEMBER_DOCS = NO SORT_BRIEF_DOCS = NO @@ -58,8 +57,8 @@ GENERATE_BUGLIST = NO GENERATE_DEPRECATEDLIST= NO ENABLED_SECTIONS = MAX_INITIALIZER_LINES = 25 -SHOW_USED_FILES = YES -SHOW_DIRECTORIES = YES +SHOW_USED_FILES = NO +SHOW_DIRECTORIES = NO FILE_VERSION_FILTER = #--------------------------------------------------------------------------- @@ -84,17 +83,21 @@ INPUT = \ @top_srcdir@/src/LifeCycleCORBA \ @top_srcdir@/src/NamingService \ @top_srcdir@/src/Notification \ + @top_srcdir@/src/SALOMEDS/SALOME_DriverPy.py \ + @top_srcdir@/src/KERNEL_PY/salome.py \ + @top_srcdir@/src/KERNEL_PY/salome_iapp.py \ @top_srcdir@/src/Utils \ @top_srcdir@/src/DSC -FILE_PATTERNS = *.dox *.idl *.hxx *.cxx python_extension_must_be_here + +FILE_PATTERNS = *.dox *.idl *.hxx *.cxx *.py RECURSIVE = YES EXCLUDE = EXCLUDE_SYMLINKS = NO EXCLUDE_PATTERNS = -EXAMPLE_PATH = +EXAMPLE_PATH = @top_srcdir@/doc/salome/examples EXAMPLE_PATTERNS = EXAMPLE_RECURSIVE = NO -IMAGE_PATH = sources/ +IMAGE_PATH = @srcdir@/images INPUT_FILTER = FILTER_PATTERNS = FILTER_SOURCE_FILES = NO @@ -102,11 +105,11 @@ FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- -SOURCE_BROWSER = YES -INLINE_SOURCES = YES +SOURCE_BROWSER = NO +INLINE_SOURCES = NO STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = YES -REFERENCES_RELATION = YES +REFERENCED_BY_RELATION = NO +REFERENCES_RELATION = NO USE_HTAGS = NO VERBATIM_HEADERS = YES @@ -121,11 +124,11 @@ IGNORE_PREFIX = # configuration options related to the HTML output #--------------------------------------------------------------------------- GENERATE_HTML = YES -HTML_OUTPUT = KERNEL +HTML_OUTPUT = . HTML_FILE_EXTENSION = .html -HTML_HEADER = sources/myheader.html -HTML_FOOTER = sources/footer.html -HTML_STYLESHEET = +HTML_HEADER = @builddir@/static/header.html +HTML_FOOTER = @srcdir@/static/footer.html +HTML_STYLESHEET = @srcdir@/static/doxygen.css HTML_ALIGN_MEMBERS = YES GENERATE_HTMLHELP = NO CHM_FILE = @@ -219,7 +222,7 @@ PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- -CLASS_DIAGRAMS = NO +CLASS_DIAGRAMS = YES HIDE_UNDOC_RELATIONS = NO HAVE_DOT = YES CLASS_GRAPH = YES @@ -230,9 +233,10 @@ TEMPLATE_RELATIONS = YES INCLUDE_GRAPH = YES INCLUDED_BY_GRAPH = NO CALL_GRAPH = NO -GRAPHICAL_HIERARCHY = YES -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = jpg +GRAPHICAL_HIERARCHY = NO +DIRECTORY_GRAPH = NO +DOT_IMAGE_FORMAT = png +DOT_FONTNAME = Arial DOT_PATH = DOTFILE_DIRS = MAX_DOT_GRAPH_WIDTH = 1024 @@ -246,4 +250,4 @@ DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- -SEARCHENGINE = NO +SEARCHENGINE = YES diff --git a/doc/salome/gui/images/head.png b/doc/salome/gui/images/head.png new file mode 100755 index 0000000000000000000000000000000000000000..307d9ef9a4c07f8fba2c8721309a978433bcf63c GIT binary patch literal 78545 zcmV(=K-s^EP)KLZ*U+9)Gc>Uwq5=^`M4BQav zC@~mCR4i{s){CyJy!Z0*`{S%{?X&l}`|Q2XS{DG4r!SY621@~u$`kN|Je=tfkx_K) z0Du7=V1OwAOjbs^U$A=!5XsBUg`OdD0$&6H@OoIh0&vsNGk{J9|DU8;>3o6cm;e!* zvpE?o5f_L!B}hR1Px(02E1V7jRgKA~q2*i60W=BI4x$ z;7AEyaokrd;A9KLmvTu<&*5_u5(RV}mM-1Y+L}T4YB~8euXQVS(9J=A3hxi`{{&gM(L7aFFpTiSHgo&n% z%S#Zoo5$t~xM@5(m-nBV_z%PWq{X=wiPHEHP-BdM)O9LAe(eV+3K1aD`^8=Vqi??W zFd%+;;VP4hbN}x*{b#|Y;w6Kd@Hx&UD1^=u@-r9r#Lp6-0Rcz?Dv$@tKpp4+LtqB1 zfGuzYZonJ(gAfo2Rs$AD1gU@zvOpf#1PVbh*a`N4YETCnK{IFt$3Z7J13Xv3lIchAu>dPU)xk0{A5EKc;LJ1HL5<+>_t9A*$Rj+w(^vGQ1b ztR2=L%ft$>h1e?WQS4dl5OxCl21mrH;LLFDxF{SCmyfH!9l@Q!4dEtn3wSBKCf)|` zk7wg^@TK@hd^i3&egeNhkS1so>_C83pYk??@5*JW(Ig>h2k8*$9O*9UC7DdtB0G|!$O7^Xax?h?`4Rbz1VzF~!b^fJ zu|c9nqC;Xx;<+SVQd81Nay<4KR#Ayj<$@V3!ONN%r%Pp02 zl;g-1$+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TKkni43!xrm2OzW3N#yxA; z@N2QktYnUI=^+|Is0yEF=oU2DIE@Bgz^?71t2EX&D!w@M# zl`fEGM+w*0Z4Rt~vyZlsz=g;o5$?7xiT7~1Y`-40=ABiD-0&_m`yg4PKsg03^j*dAFT`F?TF5I7yD zc~fe*=9z8Ef@&;WM}mdlVfg#GRg;yNFDubo9cMc;NP6UPp z>srCK*$f3Y12b->n>UzYC4i?T~_>vU%qp5LqWP7*qg@=flR3-3znY!XiHW<0&I z0zPt6X=4TT$KQmiCatBss|IP#zP+cJJ3N5ehkvOC?wB31+CTE0Y?}9VLI3F>c{klj z3G3%yw+DQ(D2Fx5bWQB$6T_QihFtfM{ac@f=wQE8yhNIem$jZJA1Oo59!^~nHPtk) z=l5<6C>iPt6lXh4jW<(Xf&Oe*YTjJxxz%G6xN8pYPZExrqa54!s$aw&?R*P{W0(5& zIB@v@F;Gu^5@N@-C2j&PFR0iXdXkLzmP>%Gsi6%{s zs5#3;jO?Qa;Eu$^JMZH11zZO4xHrb|^tr!gxFW3}+h{W6`z~z(D*Z4>>G`shV!7*K z2<|%PU(c66FSple_Em%v7~}?zwBg8`U53ZrfBVu6o&WLuX}OJV zobXZtna>BOR%9WEzO#HomDoMr_UE<4!OT)a_|wijpzaXkb2cu^CGfwU>~Bm{4!XFL+qATYg|hH*KvHgO%G}Aa6rE-20usa(_(-DV0ail z^uy@m4P%u!TvbD(fzzpygud777wbzAkKu&|s9{}V#IL{|`WY?Ftz$S6Q5I>eaIGe- z`{glFUllNViXVZ+)e&lds(*EqsK9%Q{TS~v{{$ESbfgFNEIv=v00000NkvXXu0mjf D4zrO! literal 0 HcmV?d00001 diff --git a/doc/salome/gui/images/icon_about.png b/doc/salome/gui/images/icon_about.png new file mode 100755 index 0000000000000000000000000000000000000000..fd6640bda76027cc00ef489ac39842148ef6d642 GIT binary patch literal 465999 zcmV)qK$^daP)M00009a7bBm000XU z000XU0RWnu7ytkO1ZP1_K>z@;j(q!3lK=n!AY({UO#lFTB>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v$#U`75!*JRj+B6OOioCFBxK8L))w=tsqNsk|61%MVT1o1$EIP2Q5iy*eHpK zDk3+eRvuY-gz9L8!dDs{cW9+)i;iw+>8TXm1u6%g5*=cE8i*{kT}vATna&WRA?OYv zQmk}H*P#71vL=<9;3Ted_&CsZ&`&dbRZ+D9l?gOCQhIDxVOubBb&}vqhY<}rIGoI}Q6O>!os}ecjJASHCs5Xthz=R|kS>AliUx(M zLH7+RGL*}fC^V$TfbdjZp!FSzk8z2@TTdbYBXPCD#}%QCa88ox79B-wstP4@loCi^ z6GVr02_cU`NUGK%YzdePE!4IxTNq@kl_XfiM@vrUZ^n(1IbucxSL&-r}8L}%#1b&+x&cQkd4(2nu= zfXHgr%QH50NiUkv+a1x`66GXy>7iNT^Oz{9cEiw+cHqhaSq8`evsL@E7Tn}xk zq;ir)-4UgpkvG(#q1J&+^m+D^KSuoE2R{h>t^QVjtH0IX>TmV8`dj_2{{N=`?*QMU VSTvM50HXi^002ovPDHLkV1hG{h_nCz literal 0 HcmV?d00001 diff --git a/doc/salome/gui/static/doxygen.css b/doc/salome/gui/static/doxygen.css new file mode 100644 index 000000000..7a2dcbde8 --- /dev/null +++ b/doc/salome/gui/static/doxygen.css @@ -0,0 +1,836 @@ +/* The standard CSS for doxygen */ + +body, table, div, p, dl { + font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; + font-size: 12px; +} + +/* @group Heading Levels */ + +h1 { + font-size: 150%; +} + +h2 { + font-size: 120%; +} + +h3 { + font-size: 100%; +} + +dt { + font-weight: bold; +} + +div.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; +} + +p.startli, p.startdd, p.starttd { + margin-top: 2px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.qindex, div.navtab{ + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + padding: 2px; +} + +div.qindex, div.navpath { + width: 100%; + line-height: 140%; +} + +div.navtab { + margin-right: 15px; +} + +/* @group Link Styling */ + +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #4665A2; +} + +a:hover { + text-decoration: underline; +} + +a.qindex { + font-weight: bold; +} + +a.qindexHL { + font-weight: bold; + background-color: #9CAFD4; + color: #ffffff; + border: 1px double #869DCA; +} + +.contents a.qindexHL:visited { + color: #ffffff; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code { + color: #4665A2; +} + +a.codeRef { + color: #4665A2; +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +.fragment { + font-family: monospace, fixed; + font-size: 105%; +} + +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; +} + +div.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.version { + border:1px solid #0000FF; + color: #CCCCCC; + font-family: Arial, Helvetica, sans-serif; + font-size: 9pt; + text-align: center; + width:100px; + -moz-border-radius: 8px; + margin: 5px; +} + +div.footer1 { + background-color: #DFE5F1; + border: 1px solid #AAAAAA; + font-family: Arial, Helvetica, sans-serif; + font-size: 11px; + padding: 10px; + margin-top: 15px; +} + + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 10px; + margin-right: 10px; +} + +td.indexkey { + background-color: #EBEFF6; + font-weight: bold; + border: 1px solid #C4CFE5; + margin: 2px 0px 2px 0; + padding: 2px 10px; +} + +td.indexvalue { + background-color: #EBEFF6; + border: 1px solid #C4CFE5; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #EEF1F7; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #A3B4D7; +} + +th.dirtab { + background: #EBEFF6; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #F9FAFC; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memItemLeft, .memItemRight, .memTemplParams { + border-top: 1px solid #C4CFE5; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memTemplParams { + color: #4665A2; + white-space: nowrap; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtemplate { + font-size: 80%; + color: #4665A2; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.memitem { + padding: 0; + margin-bottom: 10px; +} + +.memname { + white-space: nowrap; + font-weight: bold; + margin-left: 6px; +} + +.memproto { + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 0px 6px 0px; + color: #253555; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 8px; + border-top-left-radius: 8px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 8px; + -moz-border-radius-topleft: 8px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 8px; + -webkit-border-top-left-radius: 8px; + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + +} + +.memdoc { + border-bottom: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 2px 5px; + background-color: #FBFCFD; + border-top-width: 0; + /* opera specific markup */ + border-bottom-left-radius: 8px; + border-bottom-right-radius: 8px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 8px; + -moz-border-radius-bottomright: 8px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7F8FB 95%, #EEF1F7); + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 8px; + -webkit-border-bottom-right-radius: 8px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7F8FB), to(#EEF1F7)); +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} + +.params, .retval, .exception, .tparams { + border-spacing: 6px 2px; +} + +.params .paramname, .retval .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + + + + +/* @end */ + +/* @group Directory (tree) */ + +/* for the tree view */ + +.ftvtree { + font-family: sans-serif; + margin: 0px; +} + +/* these are for tree view when used as main index */ + +.directory { + font-size: 9pt; + font-weight: bold; + margin: 5px; +} + +.directory h3 { + margin: 0px; + margin-top: 1em; + font-size: 11pt; +} + +/* +The following two styles can be used to replace the root node title +with an image of your choice. Simply uncomment the next two styles, +specify the name of your image and be sure to set 'height' to the +proper pixel height of your image. +*/ + +/* +.directory h3.swap { + height: 61px; + background-repeat: no-repeat; + background-image: url("yourimage.gif"); +} +.directory h3.swap span { + display: none; +} +*/ + +.directory > h3 { + margin-top: 0; +} + +.directory p { + margin: 0px; + white-space: nowrap; +} + +.directory div { + display: none; + margin: 0px; +} + +.directory img { + vertical-align: -30%; +} + +/* these are for tree view when not used as main index */ + +.directory-alt { + font-size: 100%; + font-weight: bold; +} + +.directory-alt h3 { + margin: 0px; + margin-top: 1em; + font-size: 11pt; +} + +.directory-alt > h3 { + margin-top: 0; +} + +.directory-alt p { + margin: 0px; + white-space: nowrap; +} + +.directory-alt div { + display: none; + margin: 0px; +} + +.directory-alt img { + vertical-align: -30%; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; +} + +address { + font-style: normal; + color: #2A3D61; +} + +table.doxtable { + border-collapse:collapse; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; +} + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + height:30px; + line-height:30px; + color:#8AA0CC; + border:solid 1px #C2CDE4; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#364D7C; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; +} + +.navpath li.navelem a:hover +{ + color:#6884BD; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#364D7C; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +div.ingroups +{ + font-size: 8pt; + padding-left: 5px; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +.title { + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +dl +{ + padding: 0 0 0 10px; +} + +dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug +{ + border-left:4px solid; + padding: 0 0 0 6px; +} + +dl.note +{ + border-color: #D0D000; +} + +dl.warning, dl.attention +{ + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant +{ + border-color: #00D000; +} + +dl.deprecated +{ + border-color: #505050; +} + +dl.todo +{ + border-color: #00C0E0; +} + +dl.test +{ + border-color: #3030E0; +} + +dl.bug +{ + border-color: #C08050; +} + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectname +{ + background-color: #175783; + border: 1px solid; + height: 80px; + background-repeat: no-repeat; +/* font: 300% arial,sans-serif;*/ + margin: 0px; + padding: 0px; +} + +#projectbrief +{ + font: 120% arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 50% arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + background: url("head.png"); + background-color: #175783; + border: 1px solid; + height: 80px; + background-repeat: no-repeat; + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #5373B4; +} + diff --git a/doc/salome/gui/static/footer.html b/doc/salome/gui/static/footer.html new file mode 100755 index 000000000..4c89a2ba1 --- /dev/null +++ b/doc/salome/gui/static/footer.html @@ -0,0 +1,12 @@ + + + +
+
+ Copyright © 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+ Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+
+
+ + + \ No newline at end of file diff --git a/doc/salome/gui/static/header.html.in b/doc/salome/gui/static/header.html.in new file mode 100755 index 000000000..4571b4363 --- /dev/null +++ b/doc/salome/gui/static/header.html.in @@ -0,0 +1,20 @@ + + + + + +$title + +$treeview +$search +$mathjax + + + + +
+
Version: @VERSION@
+ +
diff --git a/doc/salome/install.dox b/doc/salome/install.dox index 8090ff92f..f77b0a2e0 100644 --- a/doc/salome/install.dox +++ b/doc/salome/install.dox @@ -1,23 +1,20 @@ /*! \page INSTALL Installation instructions -NOT UP TO DATE %SALOME 4 -WORK in PROGRESS, INCOMPLETE DOCUMENT +NOT UP TO DATE AND INCOMPLETE DOCUMENT BUT CAN BE HELPFUL -You'll find here generic instructions for installing the SALOME2 platform. +You'll find here generic instructions for installing the SALOME platform. \section Summary -
    -
  1. \ref S1_install
  2. -
  3. \ref S2_install
  4. -
  5. \ref S3_install
  6. -
  7. \ref S4_install
  8. -
  9. \ref S5_install
  10. -
  11. \ref S6_install
  12. -
  13. \ref S7_install
  14. -
  15. \ref S8_install
  16. -
+-# \ref S1_install +-# \ref S2_install +-# \ref S3_install +-# \ref S4_install +-# \ref S5_install +-# \ref S6_install +-# \ref S7_install +-# \ref S8_install \section S1_install Quick Overview @@ -25,16 +22,16 @@ First of all, you have to check (or install if needed) the dependant software programs on your system. These programs are: - common development tools as gcc, automake, autoconf and libtools. -- third party softwares used in SALOME building or runtime process +- third party softwares used in %SALOME building or runtime process (python, OCC, VTK, ...) -Further details can be found in sections [2] and [3]. +Further details can be found in sections \ref S2_install and \ref S3_install. If the dependencies are installed on your system, then you have to set your shell environment to get access to the software components -(cf. [4]. "Preparing the shell environment"). +(cf. \ref S4_install). -The next step is to install the KERNEL (cf. [5] "Installing KERNEL"): +The next step is to install the KERNEL (cf. \ref S5_install): \code $ mkdir @@ -48,10 +45,10 @@ $ make install \endcode Then, the %SALOME components GEOM, MED, VISU, ... can be installed -with a similar procedure (cf. [6]). +with a similar procedure (cf. \ref S6_install). -Eventually, the platform ccodean be run by executing the shell script -runSalome (cf. [7]). Here, somme additionnal variables have to be set +Eventually, the platform can be run by executing the shell script +%runSalome (cf. \ref S7_install). Here, somme additionnal variables have to be set to describe the %SALOME runtime configuration (_ROOT_DIR, OMNIORB_CONFIG) @@ -122,7 +119,7 @@ Additionnal software may be installed for optional features: In the following, we assume that all the third-party softwares are installed in the same root directory, named /prerequis. -Then, your file system should probably look like:: +Then, your file system should probably look like: \code /prerequis/Python-2.2.2 @@ -133,7 +130,7 @@ Then, your file system should probably look like:: \section S4_install Preparing the shell environment -Some variables have to be set to get acces to third-party software +Some variables have to be set to get access to third-party software components (include files, executable, library, ...) during building process and runtime. @@ -157,7 +154,7 @@ $ source prerequis.sh We use here the notation to specify the source directory of the KERNEL component. The shell environment is supposed to have -been set (cf. 4). +been set (cf. \ref S4_install). Installing the KERNEL from a source package needs three directories: @@ -193,11 +190,11 @@ $ ./build_configure \endcode If it doesn't work, check your system automake tools as specified in - section [2]. + section \ref S2_install. STEP 3: configure the building process - go to the build directory and execute the configuration process:: + go to the build directory and execute the configuration process: \code $ cd @@ -207,7 +204,7 @@ $ /configure --prefix= Note that must be an absolute path. When the configure process is complete, check the status of - third-party softwares detection. You should have a status like:: + third-party softwares detection. You should have a status like: \code --------------------------------------------- @@ -250,7 +247,7 @@ installed (optional for most usages). STEP 4 : Building the binary files - Execute make in the directory:: + Execute make in the directory: \code $ make @@ -259,7 +256,7 @@ $ make STEP 5: Installing binary files, scripts and documentation - Execute install target in the directory:: + Execute install target in the directory: \code $ make install @@ -267,7 +264,7 @@ $ make install \section S6_install Installing the SALOME components -TInstalling a component is done by following the same +Installing a component is done by following the same instructions as given for the KERNEL, replacing KERNEL by (build_configure, configure, make, make install). @@ -277,7 +274,7 @@ You just have to be aware of the dependencies between components: - GEOM depends on KERNEL - SMESH depends on KERNEL, MED, GEOM - VISU depends on KERNEL, MED -- SUPERV depends on KERNEL +- YACS depends on KERNEL For example, installing the component SMESH needs the previous installation of the KERNEL component, and then the GEOM and MED components. @@ -294,23 +291,21 @@ building process of the SMESH component (STEP 3). \section S7_install Runtime -See SALOME_Application to define your own configuration of %SALOME and run it +See \ref SALOME_Application to define your own configuration of %SALOME and run it on one or several computers. This is the recommended way of configuration. The following explains the general principles. To run the %SALOME platform, the procedure is: -- set the shell environment to get acces to third-party softwares: - -\code +- set the shell environment to get access to third-party softwares: + \code $ source prerequis.sh -\endcode + \endcode - define the %SALOME configuration by setting the whole set of variables _ROOT_DIR. Here, you just have to set the - kernel and the components you need:: - + kernel and the components you need: \code $ export KERNEL_ROOT_DIR= $ export MED_ROOT_DIR= @@ -320,14 +315,12 @@ $ ... - define the CORBA configuration file by setting the variable OMNIORB_CONFIG. This variable must be set to a writable file path. The file may be arbitrary chosen and doesn't need to exist - before running. We suggest:: - + before running. We suggest: \code $ export OMNIORB_CONFIG=$HOME/.omniORB.cfg \endcode -- run the %SALOME platform by executing the script runSalome: - +- run the %SALOME platform by executing the script %runSalome: \code $KERNEL_ROOT_DIR/bin/salome/runSalome \endcode @@ -336,43 +329,39 @@ $KERNEL_ROOT_DIR/bin/salome/runSalome For convenience or customization, we suggest the following organisation: -- chose and create a root directory for the %SALOME platform, say +- choose and create a root directory for the %SALOME platform, say . - install the third-party softwares in a sub-directory "prerequis" - install the %SALOME components in a sub-directory "SALOME2" -- make personnal copies of the files prerequis.sh and runSalome in +- make personnal copies of the files prerequis.sh and %runSalome in : - \code $ cp /prerequis.sh /. $ cp /bin/salome/runSalome /. \endcode - Edit the file prerequis.sh and adjust it to your own configuration. -- define the SALOME2 configuration - +- define the SALOME2 configuration\n This step consists in setting the KERNEL_ROOT_DIR, the whole set of variables _ROOT_DIR you need, and the OMNIORB_CONFIG variable. - + \n We suggest to create a shell file envSalome.sh containing those settings. Then the configuration consists in loading envSalome.sh in the runtime shell: - -\code + \code $ source envSalome.sh -\endcode + \endcode - When installed with this file organisation, running %SALOME is done - with the following shell commands:: - + with the following shell commands: \code $ source /prerequis.sh $ source /envSalome.sh $ ./runSalome \endcode + */ diff --git a/doc/salome/kernel_resources.dox b/doc/salome/kernel_resources.dox index 6401e942b..1bcbead6f 100644 --- a/doc/salome/kernel_resources.dox +++ b/doc/salome/kernel_resources.dox @@ -1,12 +1,9 @@ /*! -\page kernel_resources SALOME Kernel resources for developer +\page kernel_resources Salome Kernel resources for developer -WORK in PROGRESS, INCOMPLETE DOCUMENT -\section S1_kernel_res Abstract - This document describes the development environment for C++ and Python. Makefiles generation and usage are introduced in another document: "using the %SALOME @@ -28,9 +25,7 @@ variables values and if necessary, to stop the execution at debug time, in order to validate all parts of code. -
    -
  1. -Two modes: debug and release +\subsection subsection21 Two modes: debug and release The goal of debug mode is to check as many features as possible during the early stages of the development @@ -49,9 +44,8 @@ end user is confronted to such a message, he may refer to a configuration documentation or send the message to the people in charge of %SALOME installation, or to the development team, following the kind of error. -
  2. -
  3. -C++ Macros for trace and debug + +\subsection subsection22 C++ Macros for trace and debug %SALOME provides C++ macros for trace and debug. These macros are in: @@ -62,11 +56,11 @@ KERNEL_SRC/src/SALOMELocalTrace/utilities.h This file must be included in C++ source. Some macros are activated only in debug mode, others are -always activated. To activate the debug mode, ``_DEBUG_`` +always activated. To activate the debug mode, _DEBUG_ must be defined, which is the case when %SALOME Makefiles are generated from configure, without -options. When ``_DEBUG_`` is undefined (release mode: -``configure --disable-debug --enable-production``), the +options. When _DEBUG_ is undefined (release mode: +configure --disable-debug --enable-production), the debug mode macros are defined empty (they do nothing). So, when switching from debug to release, it is possible (and recommended) to let the macro calls @@ -81,33 +75,23 @@ case of a multi machine configuration. Three informations are systematically added in front of the information displayed: - - the %thread number from which the message come from; - - the name of the source file in which the macros is set; - - the line number of the source file at which the macro is set. -
      -
    1. -Macros defined in debug and release modes -\n -INFOS_COMPILATION +\subsection subsection23 Macros defined in debug and release modes +- INFOS_COMPILATION\n The C++ macro INFOS_COMPILATION writes on the trace buffer pool informations about the compiling process: - - the name of the compiler : g++, KCC, CC, pgCC; - - the date and the time of the compiling processing process. - + . This macro INFOS_COMPILATION does not have any argument. Moreover, it is defined in both compiling - mode : _DEBUG_ and _RELEASE_. - + mode : _DEBUG_ and _RELEASE_.\n Example: - \code #include "utilities.h" int main(int argc , char **argv) @@ -115,17 +99,13 @@ int main(int argc , char **argv) INFOS_COMPILATION; ... } -INFOS(str) \endcode -\n -INFOS +- INFOS\n In both compiling mode _DEBUG_ and _RELEASE_, The C++ macro INFOS writes on the trace buffer pool %the string - which has been passed in argument by the user. - + which has been passed in argument by the user.\n Example: - \code #include "utilities.h" int main(int argc , char **argv) @@ -135,42 +115,33 @@ int main(int argc , char **argv) return 0; } \endcode - Displays: - \code main.cxx [5] : NORMAL END OF THE PROCESS \endcode -\n -INTERRUPTION(str) +- INTERRUPTION(str)\n In both compiling mode _DEBUG_ and _RELEASE_, The C++ macro INTERRUPTION writes on the trace buffer pool the %string, with a special ABORT type. When the %thread in charge of collecting messages finds this message, it terminates the application, after message treatment. -IMMEDIATE_ABORT(str) - +- IMMEDIATE_ABORT(str)\n In both compiling mode _DEBUG_ and _RELEASE_, The C++ macro IMMEDIATE_ABORT writes the message str immediately on standard error and exits the application. Remaining messages not treated by the message collector %thread are lost. -
    2. -
    3. -Macros defined only in debug mode -\n -MESSAGE(str) +\subsection subsection24 Macros defined only in debug mode +- MESSAGE(str)\n In _DEBUG_ compiling mode only, the C++ macro MESSAGE writes on the trace buffer pool the %string which has been passed in argument by the user. In _RELEASE_ - compiling mode, this macro is blank. - + compiling mode, this macro is blank.\n Example: - \code #include "utilities.h" #include @@ -189,25 +160,19 @@ int main(int argc , char **argv) } \endcode - Displays: - \code - Trace main.cxx [8] : Salome - Trace main.cxx [12] : Aster and CASTEM \endcode -\n -BEGIN_OF(func_name) - +- BEGIN_OF(func_name)\n In _DEBUG_ compiling mode, The C++ macro BEGIN_OF appends the %string "Begin of " to the one passed in argument by the user and displays the result on the trace buffer pool. In _RELEASE_ compiling mode, this - macro is blank. - + macro is blank.\n Example: - \code #include "utilities.h" int main(int argc , char **argv) @@ -216,23 +181,18 @@ int main(int argc , char **argv) return 0; } \endcode - Displays: - \code - Trace main.cxx [3] : Begin of a.out \endcode -\n -END_OF(func_name) +- END_OF(func_name)\n In _DEBUG_ compiling mode, The C++ macro END_OF appends the %string "Normal end of " to the one passed in argument by the user and displays the result on the trace buffer pool. In _RELEASE_ compiling mode, this - macro is blank. - + macro is blank.\n Example: - \code #include "utilities.h" int main(int argc , char **argv) @@ -241,22 +201,17 @@ int main(int argc , char **argv) return 0; } \endcode - Displays: - \code - Trace main.cxx [4] : Normal end of a.out \endcode -\n -SCRUTE(var) +- SCRUTE(var)\n In _DEBUG_ compiling mode, The C++ macro SCRUTE displays its argument which is an application variable followed by the value of the variable. In _RELEASE_ - compiling mode, this macro is blank. - + compiling mode, this macro is blank.\n Example: - \code #include "utilities.h" int main(int argc , char **argv) @@ -266,25 +221,20 @@ int main(int argc , char **argv) return 0; } \endcode - Displays: - \code - Trace main.cxx [5] : i=999 \endcode -\n -ASSERT(condition) +- ASSERT(condition)\n In _DEBUG_ compiling mode only, The C++ macro ASSERT checks the expression passed in argument to be not NULL. If it is NULL the condition is written with the macro INTERRUPTION (see above). The process exits after trace of this last message. In _RELEASE_ compiling mode, this macro is blank. N.B. : if ASSERT is already - defined, this macro is ignored. - + defined, this macro is ignored.\n Example: - \code #include "utilities.h" ... @@ -298,20 +248,11 @@ ASSERT(k<10); cout << table[k]; \endcode -
    4. -
    -
  4. -
- \section S3_kernel_res Exceptions -
    -
  1. -C++ exceptions: class SALOME_Exception +\subsection subsection31 C++ exceptions: class SALOME_Exception -
      -
    1. -definition +\subsubsection subsubsection311 Definition The class SALOME_Exception provides a generic method to send a message, with optional source file name and line @@ -324,9 +265,8 @@ log file. The class SALOME_Exception inherits its behavior from the STL class exception. -
    2. -
    3. -usage + +\subsubsection subsubsection312 Usage The header %SALOME/src/utils/utils_SALOME_Exception.hxx must be included in the C++ source, when raised or trapped: @@ -356,7 +296,7 @@ throw SALOME_Exception(LOCALIZED("my pertinent message")); \endcode where LOCALIZED is a macro provided with -``utils_SALOME_Exception.hxx`` which gives file name and +utils_SALOME_Exception.hxx which gives file name and line number. The exception is handled like this: @@ -374,15 +314,10 @@ catch (const SALOME_Exception &ex) The what() method overrides the one defined in the STL exception class. -
    4. -
    -
  2. -
  3. -CORBA exceptions -
      -
    1. -definition +\subsection subsection32 CORBA exceptions + +\subsubsection subsubsection321 Definition The idl SALOME_Exception provides a generic CORBA exception for %SALOME, with an attribute that gives an @@ -407,16 +342,12 @@ CORBA system and user exceptions already defined in the packages used within %SALOME, such as OmniORB exceptions, must be handled separately. -
    2. -
    3. -usage -
        -
      1. +\subsubsection subsubsection322 Usage CORBA servant, C++ The CORBA Server header for SALOME_Exception and a macro to throw the exception are provided with the - header ``KERNEL_SRC/src/Utils/Utils_CorbaException.hxx``: + header KERNEL_SRC/src/Utils/Utils_CorbaException.hxx: \code #include "Utils_CorbaException.hxx" @@ -431,17 +362,13 @@ if (myStudyName.size() == 0) SALOME::BAD_PARAM); \endcode -
      2. -
      3. -CORBA Client, GUI Qt C++ - - NO MORE AVAILABLE in %SALOME 3.x +CORBA Client, GUI Qt C++ (NO MORE AVAILABLE in %SALOME 3.x and later) The CORBA Client header for SALOME_Exception and a Qt function header that displays a message box are provided in: - ``KERNEL_SRC/src/SALOMEGUI/SALOMEGUI_QtCatchCorbaException.hxx`` + KERNEL_SRC/src/SALOMEGUI/SALOMEGUI_QtCatchCorbaException.hxx \code #include "SALOMEGUI_QtCatchCorbaException.hxx" @@ -461,8 +388,6 @@ catch (const SALOME::SALOME_Exception & S_ex) } \endcode -
      4. -
      5. CORBA Client, C++, without GUI Nothing specific has been provided to the developer @@ -470,20 +395,10 @@ catch (const SALOME::SALOME_Exception & S_ex) SALOMEGUI_QtCatchCorbaException.hxx to see how to get the information given by the exception %object. -
      6. -
      -
    4. -
    -
- \section S4_kernel_res Miscellaneous tools -
    -
  1. -Singleton -
      -
    1. -Definition +\subsection subsection41 Singleton +\subsubsection subsubsection411 Definition %A singleton is an application data which is created and deleted only once at the end of the application @@ -491,14 +406,12 @@ process. The C++ compiler allows the user to create a static singleton data before the first executable statement. They are deleted after the last statement execution. -The ``SINGLETON_`` template class deals with dynamic +The SINGLETON_ template class deals with dynamic singleton. It is useful for functor objects. For example, an %object that connects the application to a system at creation and disconnects the application at deletion. -
    2. -
    3. -Usage +\subsubsection subsubsection412 Usage To create a single instance of a POINT %object: @@ -524,36 +437,25 @@ POINT *p2=SINGLETON_::Instance() ; assert(p1==p2) \endcode -
    4. -
    5. -Design description +\subsubsection subsubsection413 Design description Here are the principles features of the singleton design: - - the user creates an %object of class TYPE by using the - class method ``SINGLETON_::Instance()`` which + class method SINGLETON_::Instance() which returns a pointer to the single %object ; - -- to create an %object, ``SINGLETON_::Instance()`` +- to create an %object, SINGLETON_::Instance() uses the default constructor of class TYPE ; - - at the same time, this class method creates a destructor %object which is added to the generic list of destructor objects to be executed at the end of the application (atexit) ; - - at the end of the application process all the - deletions are performed by the ``Nettoyage()`` C function + deletions are performed by the Nettoyage() C function which executes the destruction objects end then deletes the destructions objects themselves ; +- the Nettoyage() C function using atexit() C function + is embedded in a static single %object ATEXIT_(). -- the ``Nettoyage()`` C function using ``atexit()`` C function - is embedded in a static single %object ``ATEXIT_()``. - -
    6. -
    -
  2. -
*/ diff --git a/doc/salome/kernel_salome.dox b/doc/salome/kernel_salome.dox new file mode 100644 index 000000000..20acf889c --- /dev/null +++ b/doc/salome/kernel_salome.dox @@ -0,0 +1,296 @@ +/*! + +\page kernel_salome Using salome.py module + + +The salome.py Python module provides a set of variables and functions +allowing access to different elements of the current SALOME +session. +This page gives a short description of most useful variables and +functions. + +\li \b orb Reference to the CORBA::ORB instance + +This variable can be used to initialize different CORBA-related +elements of the SALOME session (for example, naming service, etc). +For example, to get an access to the SALOME naming service, you can +use the following commands: +\code +import SALOME_NamingServicePy +NS = SALOME_NamingServicePy.SALOME_NamingServicePy_i(salome.orb) +\endcode + +The \b orb variable is also useful when it is necessary to convert +CORBA reference object to its string representation (IOR) and vice +versa: +\code +studyIOR = salome.orb.object_to_string(salome.myStudy) +study = salome.orb.string_to_object(studyIOR) +is_same = salome.myStudy._is_equivalent(study) # is_same = True +\endcode + +\li \b naming_service SALOME naming service instance + +This variable can be used to register/find objects created in a +distributed environment. For example, to get access to the SALOME +Module Catalog server, use \c Resolve() method: +\code +import SALOME_ModuleCatalog +mc = salome.naming_service.Resolve('/Kernel/ModulCatalog') +\endcode + +Similarly, method \c Register() can be used to register objects +in the naming service: +\code +salome.naming_service.Register(myObject,'/My/Object/Path') +o = salome.naming_service.Resolve('/My/Object/Path') +is_same = myObject._is_equivalent(o) # is_same = True +\endcode + +\li \b lcc Life Cycle CORBA class instance + +This object can be used to get access to CORBA engine part of some +SALOME module, available in the current SALOME session. The following +code returns a reference to the Geometry module engine, loading it if +necessary: +\code +import GEOM +geom = salome.lcc.FindOrLoadComponent('FactoryServer', 'GEOM') +\endcode +\b Note, that in the above example, \e "FactoryServer" is a name of the +SALOME container, where Geometry module engine should be loaded. + +\li \b myStudyManager Reference to the study manager + +SALOMEDS Study manager is used to manipulate with the studies: create, +open, save, close. It also can be used to find the study by its +numerical ID or name. The code below demonstrates main +functionalities of a study manager: +\code +# create new study with the name "MyStudy" +new_study = salome.myStudyManager.NewStudy("MyStudy") + +# open study from file /home/user/MyStudy.hdf +study = salome.myStudyManager.OpenStudy("/home/user/MyStudy.hdf") + +# save study +salome.myStudyManager.Save(study, False) # not using multifile save mode + +# save study in ASCII format +salome.myStudyManager.SaveASCII(study, True) # using multifile save mode + +# save study with the new file path +salome.myStudyManager.SaveAs("/home/user/MyStudy.hdf", study, False) + +# save study with the new file path in ASCII format +salome.myStudyManager.SaveAsASCII("/home/user/MyStudy.hdf", study, False) + +# close study +salome.myStudyManager.Close(study) + +# get list of all opened studies +studies = salome.myStudyManager.GetOpenStudies() + +# find study by its numerical ID (integer value starting from 1) +study = salome.myStudyManager.GetStudyByID(studyID) + +# find study by its name +study = salome.myStudyManager.GetStudyByName("/home/user/MyStudy.hdf") + +# ... +\endcode + +\li \b myStudy Reference to the current (active) study + +This variable can be used to manipulate with the date of the study: +create data tree, assign attributes of different types to the objects +in a data tree, create references between objects, etc. + +\b Note, that the term "active" or "current" study does not make much +sense outise the GUI Python console. When working in GUI, user always +deals with one only top-level study, which desktop is currently on the +top if the windows stack. This is what is called \e "active study". +In TUI mode (without GUI or outside GUI), user has to manipulate with +studies manually; no any special control for the life cycle of the +study is done. In TUI mode, \c salome.muStudy variable is an instance +of the first study created when you call salome_init() function. + +The following code demonstrates some examples of \c salome.myStudy +variable usage. For more details please refer to the SALOMEDS.idl file +documentation. + +\code +# get study name +studyName = salome.myStudy._get_Name() + +# get study numerical ID +studyID = salome.myStudy._get_StudyId() + +# find SALOMEDS component by its type +scomponent = FindComponent("MyComponent") + +# find SALOMEDS component by its entry ID +scomponent = FindComponentID("0:1:1") # "0:1:1" is a component ID + +# find SALOMEDS object by its name (first found object is returned) +sobject = salome.myStudy.FindObject("MyObject") + +# find SALOMEDS object by its entry ID +sobject = salome.myStudy.FindObjectID() # "0:1:1:1" is an object ID + +# find SALOMEDS object by its IOR attribute +sobject = salome.myStudy.FindObjectIOR(IOR) + +# find SALOMEDS object by its path in the data tree +sobject = salome.myStudy.FindObjectByPath("/MyComponent/MyObject/MySubObject") + +# get SALOMEDS object's path in a study data tree +sobject_path = salome.myStudy.GetObjectPath(sobject) + +# get study properties +prop = salome.myStudy.GetProperties() +prop.GetCreationDate() # get creation date +prop.IsModified() # check if study has been modified (and not yet saved) +prop.SetLocked(True) # lock the study (prohibit modifications) +prop.IsLocked() # check if study is locked + +# create objects with study builder +builder = salome.myStudy.NewBuilder() # create builder +comp = builder.NewComponent("MyComponent") # create a component of the "MyComponent" type +attrName = builder.FindOrCreateAttribute(comp, "AttributeName") +attrName.SetValue("MyComponent") # set name to the component +object = builder.NewObject(comp) # create new object, a child of the component +attrName = builder.FindOrCreateAttribute(object, "AttributeName") +attrName.SetValue("MyObject") # set name to the object +attrInt = builder.FindOrCreateAttribute(object, "AttributeInteger") +attrInt.SetValue(123) # assign integer attribute to the object +attrIOR = builder.FindOrCreateAttribute(object, "AttributeIOR") +attrIOR.SetValue(IOR) # assign IOR attribute to the object (to point to some CORBA object) + +# iterate through objects of the data tree with child iterator +iter = salome.myStudy.NewChildIterator(comp) # initialize from the component +iter.InitEx(True) # init recursive mode +while iter.More(): + c = iter.Value() + print c.GetID() + iter.Next() + pass + +# ... +\endcode + +\li \b myStudyId Identifier of the current (active) study + +This variable contains the numerical identifier of the current +(active) study. It is an equivalent of \c +salome.myStudy._get_StudyId() code. + +\li \b myStudyName Name of the current (active) study + +This variable contains the name of the current (active) study. It is +an equivalent of \c salome.myStudy._get_Name() code. + +\li \b DumpStudy() Print study contents + +This function prints the study data object tree to the terminal +window. The output for each object includes its entry ID, name, IOR +(if there is one) and referenced object ID (for references). I.e. +this is the same data the user can see in the Object Browser columns. +\code +salome.DumpStudy(salome.myStudy) +\endcode + +\li \b IDToSObject() Get SALOMEDS object by its entry ID. + +This function checks if the SObject with the specified entry ID exists +in the current study and returns it. Otherwise \c None is returned. +\code +sobject = salome.IDToSObject("0:1:1:1") # "0:1:1:1" is an object ID +\endcode +Actually this function is just a shortcut to the following code: +\code +sobject = salome.myStudy.FindObjectID("0:1:1:1") +\endcode + +\li \b IDToObject() Get CORBA object by its entry ID. + +This function checks if the SObject with the specified entry ID exists +in the current study, then retrieves IOR attribute from it and, +finally, if IOR is not empty, returns CORBA object corresponding to +the found SObject: +\code +object = salome.IDToObject("0:1:1:1") # "0:1:1:1" is an object ID +\endcode +Actually this function is just a shortcut to the following code: +\code +sobject = salome.myStudy.FindObjectID("0:1:1:1") +if sobject: + object = sobject.GetObject() +else: + object = None +\endcode + +\li \b ObjectToSObject() Get SALOMEDS object corresponding to the +CORBA object. + +This function finds an object in the current study which corresponds +to the specified CORBA object (i.e. it has IOR attribute, pointing to +the CORBA object). If there is no corresponding SALOMEDS object in the +study, \c None is returned: +\code +sobject = salome.ObjectToSObject(object) +\endcode +Actually this function is just a shortcut to the following code: +\code +ior = salome.orb.object_to_string(object) +sobject = salome.myStudy.FindObjectIOR(ior) +\endcode + +\li \b ObjectToID() Get SALOMEDS object entry ID corresponding to the +CORBA object. + +This function finds an object in the current study which corresponds +to the specified CORBA object (i.e. it has IOR attribute, pointing to +the CORBA object). If the object is found, its entry ID is returned, +otherwise empty string is returned: +\code +entry = salome.ObjectToID(object) +\endcode +Actually this function is just a shortcut to the following code: +\code +ior = salome.orb.object_to_string(object) +sobject = salome.myStudy.FindObjectIOR(ior) +if sobject: + entry = sobject.GetID() +else: + entry = "" +\endcode + +\li \b createNewStudy() Create new study + +This function can be used to create new SALOME study. Returns an ID of +the created study. +\code +studyId = salome.createNewStudy() +study = salome.myStudyManager.GetStudyByID(s) +\endcode + +\li \b generateName() Generate unique name + +This function adds random numerical suffix to the passed string +parameter ("Study" by default) and returns the resulting string: +\code +name_1 = salome.generateName() # name_1 is something like "Study682" +name_1 = salome.generateName("Obj") # name_1 is something like "Obj32" +\endcode + +\li \b sg SWIG interface to the SALOME GUI + +This variable provides an access to some GUI functions. + +\b Note, that this variable is only available if you use salome.py +Python module within the GUI desktop (since SWIG library is linked directly to the GUI library). +See GUI documentation for more information. + + +*/ diff --git a/doc/salome/kernel_services.dox b/doc/salome/kernel_services.dox index d363c84cf..d68ced648 100644 --- a/doc/salome/kernel_services.dox +++ b/doc/salome/kernel_services.dox @@ -1,8 +1,6 @@ /*! \page KERNEL_Services KERNEL Services for end user (Python interface) -WORK in PROGRESS, INCOMPLETE DOCUMENT - In a %SALOME application, distributed components, servers and clients use the CORBA middleware for comunication. CORBA interfaces are defined via idl files. All the different CORBA interfaces are available for users in Python, @@ -16,14 +14,12 @@ script). \section S1_kernel_ser General purpose services -
    -
  1. -%SALOME services access from a Python shell +\subsection subsection11 SALOME services access from a Python shell -See \ref SALOME_Application for detailed instructions to launch a Python -interpreter with full acces to the %SALOME environment and services. +See \ref SALOME_Application for detailed instructions on how to launch a Python +interpreter with full access to the %SALOME environment and services. -You can use the embedded Python interpreter in Grahic User Interface, or an +You can use the embedded Python interpreter in Graphical User Interface, or an external interpreter, with: \code @@ -41,12 +37,12 @@ salome.salome_init() In the embedded interpreter, it is already done, but there is no problem to do it several times, so it is preferable to add these instructions systematically in your scripts, to allow them to work in all configurations. +See \ref kernel_salome for a short description of most useful variables and +functions. -
  2. -
  3. -Container and component instanciation +\subsection subsection12 Container and component instanciation -See LifeCycleCORBA for the C++ interface (Python interface obtained with SWIG +See SALOME_LifeCycleCORBA for the C++ interface (Python interface obtained with SWIG is very similar). In the following example, a test component provided in KERNEL is launched @@ -83,7 +79,7 @@ without the _narrow() instruction: In the next example, a component instance is created in a specific Container defined by it's computer hostname and it's name. Here we use the local -computer. Note that in Utils_Identity, getShortHostName() gives the short +computer. Note that in Utils_Identity, Utils_Identity::getShortHostName() gives the short hostname of the computer, without domain suffixes, which is used in %SALOME. The container process is created here if it does not exists, and a new component instance is created: @@ -143,9 +139,7 @@ myStudyManager.object SalomeAppEngine.object \endcode -
  4. -
  5. -File transfer service +\subsection subsection13 File transfer service See SALOME_FileTransferCORBA for the C++ interface (Python interface obtained with SWIG is very similar). @@ -166,71 +160,160 @@ aFileTransfer=LifeCycleCORBA.SALOME_FileTransferCORBA('cli76cc',remotefile) localFile=aFileTransfer.getLocalFile() \endcode -
  6. -
  7. -CORBA Naming service access +\subsection subsection14 CORBA Naming service access See SALOME_NamingService for the C++ interface. The Python interface -SALOME_NamingServicePy is not yet derived from the C++ interface and offers +SALOME_NamingServicePy::SALOME_NamingServicePy_i is not yet derived from the C++ interface and offers only the most useful functions. -
  8. -
  9. -Batch services - -See \ref batch_page documentation (in french only). +\section S2_kernel_ser All IDL Interfaces -
  10. -
+-# Containers and component life cycle, File transfer service + - Engines : engines CORBA module. + - Engines::EngineComponent : generic component interface. All %SALOME components inherit this interface. + - Engines::Container : host for C++ and Python components components instances + - Engines::fileTransfer : agent for file transfer created by a container copy a local file to a distent client + - Engines::fileRef : reference to a file, used by a container for file transfers + - Engines::ContainerManager : unique instance, in charge of container creation on remote computers + - Engines::MPIContainer : a parallel implementation for containers and components + - Engines::MPIObject + . +-# Study management + - SALOMEDS : SALOMEDS CORBA module + - SALOMEDS.idl : \copybrief SALOMEDS.idl + - SALOMEDS_Attributes.idl : \copybrief SALOMEDS_Attributes.idl + . +-# High speed transfer, object life cycle, exceptions, GUI interface... + - SALOME : \copybrief SALOME + - SALOME_Comm.idl : \copybrief SALOME_Comm.idl + - SALOME_GenericObj.idl : \copybrief SALOME_GenericObj.idl + - SALOME_Exception.idl : \copybrief SALOME_Exception.idl + - SALOME_Session.idl : \copybrief SALOME_Session.idl + . +-# Miscelleanous + - SALOME_ModuleCatalog : \copybrief SALOME_ModuleCatalog + - SALOME_RessourcesCatalog : \copybrief SALOME_RessourcesCatalog + - Registry : \copybrief Registry + - SALOME_Logger : \copybrief SALOME_Logger + . +-# Other idl for test purposes + - NSTEST : for naming service test + - SALOME_TestComponent.idl : for EngineComponent test + - SALOME_TestModuleCatalog : for SALOME_ModuleCatalog test + - SALOME_TestMPIComponent.idl : \copybrief SALOME_TestMPIComponent.idl + - TestNotif.idl : \copybrief TestNotif.idl + . +-# Some useful command scripts + - waitNS.py : \copybrief waitNS.py + - waitContainers.py : \copybrief waitContainers.py + - showNS.py : \copybrief showNS.py + - shutdownSalome.py : \copybrief shutdownSalome.py + - killSalome.py : \copybrief killSalome.py + - killSalomeWithPort.py : \copybrief killSalomeWithPort.py + - appli_gen.py : \copybrief appli_gen.py + . -\section S2_kernel_ser All IDL Interfaces +*/ -
    -
  1. -Containers and component life cycle, File transfer service - -- Engines : engines CORBA module. -- Engines::Component : generic component interface. All %SALOME components inherit this interface. -- Engines::Container : host for C++ and Python components components instances -- Engines::fileTransfer : agent for file transfer created by a container copy a local file to a distent client -- Engines::fileRef : reference to a file, used by a container for file transfers -- Engines::ContainerManager : unique instance, in charge of container creation on remote computers -- Engines::MPIContainer : an exemple of parallel implementation for containers and components -- Engines::MPIObject - -
  2. -
  3. -Study management - -- SALOMEDS : SALOMEDS CORBA module -- SALOMEDS.idl -- SALOMEDS_Attributes.idl - -
  4. -
  5. -High speed transfer, object life cycle, exceptions, GUI interface... - -- SALOME : %SALOME CORBA module -- SALOME_Comm.idl -- SALOME_GenericObj.idl -- SALOME_Exception -- SALOME_Session.idl - -
  6. -
  7. -Miscelleanous - -- SALOME_ModuleCatalog -- SALOME_RessourcesCatalog -- SALOME_Registry.idl -- Logger.idl - -Other idl for test purposes +/** \example example1 +AttributeReal interface (creations/saving/restoring) \n -- nstest.idl -- SALOME_TestComponent.idl -- SALOME_TestModuleCatalog.idl -- SALOME_TestMPIComponent.idl -- TestNotif.idl - +Methods : FindOrCreateAttribute, Value, SaveAs, SetValue, FindComponent, FindAttribute, Open + */ +/** \example example3 +AttributeSequenceOfReal interface(creations/saving/restoring)\n +AttributeSequenceOfReal : ChangeValue, Add, Value, Remove, Length\n +SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open + */ +/** \example example16 +Methods : GetAvailableUndos, ChangeValue, FindOrCreateAttribute, SaveAs, GetAvailableRedos, Undo, FindComponent, Redo, FindAttribute, Open, CommitCommand, NewCommand + */ +/** \example example17 +SALOMEDS methods : RemoveAttribute, FindOrCreateAttribute, NewStudy, GetAllAttributes, NewCommand, CommitCommand, AbortCommand, NewComponent + */ +/** \example example18 +AttributeTreeNode interface(creations/saving/restoring)\n +SALOMEDS methods : FindOrCreateAttribute, NewObject\n +Attribute methods : HasFirst, HasFather, SetPrevious, Next, InsertAfter, GetFather, HasNext, SetValue, Append, NewStudy, Label, IsRoot, Prepend, SetFather, Depth, HasPrevious + */ +/** \example example19 + SALOMEDS methods : FindOrCreateAttribute, Save, SaveAs, Close, Open, FindComponent, FindAttribute, FindObject, LoadWith +\n + Attribute methods : Value, SetValue + */ +/** \example example20 +SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, NewCommand, GetProperties, Open, CommitCommand, NewBuilder\n +Attribute methods : SetLocked, IsLocked, GetCreationMode, SetCreationDate, IsModified, GetUserName, Value, SetUserName, SetValue, GetCreationDate + */ +/** \example example23 +Methods: + */ +/** \example example8 +AttributeDrawable interface(creations/saving/restoring)\n +SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open\n +Attribute methods : SetDrawable, IsDrawable + */ +/** \example example9 +AttributeSelectable interface(creations/saving/restoring)\n +SALOMEDS methods: FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open\n +Attribute methods: SetSelectable, IsSelectable + */ +/** \example example10 +AttributeExpandable interface(creations/saving/restoring)\n +SALOMEDS methods : SaveAs FindComponent FindAttribute Open\n +Attribute methods : SetExpandable IsExpandable + */ +/** \example example11 +Test AttributeOpened (creations/saving/restoring)\n +SALOMEDS methods : FindOrCreateAttribute SaveAs, FindComponent, FindAttribute, Open\n +Attribute methods : SetOpened, IsOpened + */ +/** \example example12 +AttributeTextColor interface (creations/saving/restoring)\n +SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open\n +Attribute methods : SetTextColor TextColor + */ +/** \example example13 +Test AttributeTextHighlightColor interface(creations/saving/restoring)\n +SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open\n +Attribute methods : SetTextHighlightColor TextHighlightColor + */ +/** \example example14 +AttributePixMap interface (creations/saving/restoring)\n +SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open\n +Attribute methods : SetPixMap, GetPixMap + */ + +/** \example example21 +SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open\n +Attribute methods: GetValue, GetNbColumns, AddColumn, SetRowTitles, PutValue, GetColumn, GetColumnTitles, GetTitle, SetRow, GetRowTitles, SetColumnTitles, SetColumn, GetRow, GetNbRows, SetColumnTitle, AddRow, SetTitle, SetRowTitle + */ +/** \example example15 +AttributeLocalID interface(creations/saving/restoring)\n +SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open\n +Attribute methods : Value, SetValue +*/ +/** \example example22 +SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open\n +Attribute methods : GetValue, GetNbColumns, AddColumn, SetRowTitles, PutValue, GetColumn, GetColumnTitles, GetTitle, SetRow, GetRowTitles, SetColumnTitles, SetColumn, GetRow, GetNbRows, SetColumnTitle, AddRow, SetTitle, SetRowTitle +*/ +/** \example example4 +AttributeSequenceOfInteger interface(creations/saving/restoring)\n +SALOMEDS methods : FindOrCreateAttribute FindComponent FindAttribute Open Add SaveAs +AttributeSequenceOfInteger methods : Value, Remove, Length +*/ +/** \example example5 +AttributeName interface(creations/saving/restoring)\n +SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent FindAttribute Open\n +Attribute methods : SetValue, Value +*/ +/** \example example6 +AttributeComment interface(creations/saving/restoring)\n +SALOMEDS methods : FindOrCreateAttribute, SaveAs FindComponent FindAttribute Open\n +Attribute methods : Value, SetValue +*/ +/** \example example7 +AttributePersistentRef interface(creations/saving/restoring)\n +SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent FindAttribute Open\n +Attribute methods : SetValue, Value */ diff --git a/doc/salome/kernel_services_cpphelpers.dox b/doc/salome/kernel_services_cpphelpers.dox new file mode 100644 index 000000000..8d4db367c --- /dev/null +++ b/doc/salome/kernel_services_cpphelpers.dox @@ -0,0 +1,55 @@ +/*! + \page KERNEL_Services_CppHelpers KERNEL Services helper functions for C++ programmers + +You'l find here a documentation for using the KernelHelper package of +the KERNEL module. This package provides the programmer with helper +functions to deal with the KERNEL services and the study. + +-# \ref S1_KSH +-# \ref S2_KSH +-# \ref S3_KSH + +\section S1_KSH Quick Overview + +When developing a SALOME application, programmers often have to deal +with fundamentals objects as the %NamingService, the %LifeCycleCorba, +the %ResourcesManager and the %SalomeLauncher and have to manage the +data in a %Study object. + +This documentation illustrates how to use these objects in standard +C++ use cases and with the helper functions of the KernelHelper +package of the KERNEL module. The KernelHelper package should be used +by end user programmers, i.e. programmers that don't need the +complexity of the complete KERNEL API, typically when developing a +SALOME module for a domain specific application. + +For illustration of this short introduction, the code below creates an +executable binary program that calls the SalomeTestComponent using the +LifeCycleCorba and requests the Coucou service of this component (the +test component is included in the KERNEL module): + +\code +#include "SALOME_KernelServices.hxx" +#include "Basics_Utils.hxx" + +#include +#include CORBA_CLIENT_HEADER(SALOME_TestComponent) + +void main (int argc, char * argv[]) { + Engines::EngineComponent_var component = + KERNEL::getLifeCycleCORBA()->FindOrLoad_Component( "FactoryServer","SalomeTestComponent" ); + + Engines::TestComponent_var engine = Engines::TestComponent::_narrow(component); + STDLOG(engine->Coucou(123.)); +} +\endcode + +\section S2_KSH Usage of the SALOME_KernelServices + +TO WRITE + +\section S3_KSH Usage of the SALOME_StudyEditor + +TO WRITE + +*/ diff --git a/doc/salome/main.dox b/doc/salome/main.dox index 7515c353c..20bbff443 100644 --- a/doc/salome/main.dox +++ b/doc/salome/main.dox @@ -1,82 +1,68 @@ -/*! \mainpage SALOME KERNEL Reference Documentation - \image html kernel_about_4.png +/*! - \section S1_main Introduction +\mainpage SALOME KERNEL Reference Documentation +\image html icon_about.png - Welcome to the %SALOME KERNEL documentation ! +Welcome to the %SALOME KERNEL documentation ! +Following your kind of usage of %SALOME, you will find some specific +introductory documentation, listed below. - Following your kind of usage of %SALOME, you will find some specific - introductory documentation, listed below. +\section S2_main End user - \section S2_main End user - -
      -
    1. - How to configure a %SALOME application - \n The end user may have to configure his own %SALOME application by selection of a +-# How to configure a %SALOME application\n + The end user may have to configure his own %SALOME application by selection of a subset of availables %SALOME modules. He also may want to install his application on several computers. See \subpage SALOME_Application to define your own configuration of %SALOME and run it on one or several computers. This is the recommended way of configuration. -
    2. -
    3. - How to launch %SALOME in a %SALOME application - \n See \ref SALOME_Application. -
    4. -
    5. - How to use KERNEL services in Python scripts - \n The %SALOME KERNEL offers a list of services available in Python. See \subpage KERNEL_Services. -
    6. -
    +-# How to launch %SALOME in a %SALOME application\n + See \ref SALOME_Application. +-# How to use KERNEL services in Python scripts\n + The %SALOME KERNEL offers a list of services available in Python. See \subpage KERNEL_Services. +-# How to use KERNEL services from a C++ context\n + The %SALOME KERNEL provides you with helper functions to + manipulate the %SALOME KERNEL services from a C++ programming + context. See \subpage KERNEL_Services_CppHelpers. - \section S3_main Application Integrator +\section S3_main Application Integrator Applications integrators are in charge of configuration and installation of specific %SALOME applications over a local network. Application Integrators built %SALOME modules binaries from sources tarballs. -
      -
    1. - How to install %SALOME - \n See \subpage INSTALL for general information on required configuration and +-# How to install %SALOME\n + See \subpage INSTALL for general information on required configuration and prerequisites, compilation procedure, setting environment principles. -
    2. -
    3. - How to configure a %SALOME application - \n See \ref SALOME_Application to define your own configuration of %SALOME and run it +-# How to configure a %SALOME application\n + See \ref SALOME_Application to define your own configuration of %SALOME and run it on one or several computers. This is the recommended way of configuration. -
    4. -
    - \section S4_main Module maintainer +\section S4_main Module maintainer Module maintainers are in charge of the development and debug of the %SALOME modules. Each %SALOME module is stored in a CVS base. CVS bases are organised in separate branches for developments and debug. All official or development releases are identified by a CVS tag. -
      -
    1. - Source code structuration and Unit Tests - \n See \subpage UnitTests for general information on code directories structure, +-# Source code structuration and Unit Tests\n + See \subpage UnitTests for general information on code directories structure, unit tests associated to the different kind of classes, and how to run the unit tests. -
    2. -
    3. - Some development utilities - \n See \subpage kernel_resources for information on basic utilities for C++ and Python +-# Some development utilities \n + See \subpage kernel_resources for information on basic utilities for C++ and Python development, like trace and debug, exceptions, singleton. -
    4. -
    - \section S5_main SALOME programming model +\section S5_main SALOME programming model You will find in the next pages informations about specific points of %SALOME Kernel : + - \subpage kernel_salome - \subpage dsc_page : DSC documentation page. - \subpage salome_file_page : Salome_file documentation page. - - \subpage batch_page : BATCH documentation page. + -
    + Documentation of the KERNEL python package : The package salome.kernel provides + logging tools, high-level functions to handle items in Salome study, and other utilities. */ diff --git a/doc/salome/salome_application.dox b/doc/salome/salome_application.dox index d970338a3..e91b71e11 100644 --- a/doc/salome/salome_application.dox +++ b/doc/salome/salome_application.dox @@ -1,17 +1,17 @@ /*! - \page SALOME_Application SALOME Application Concept + \page SALOME_Application Salome Application Concept - Configuration for one or more computers - - - **WORK in PROGRESS, INCOMPLETE DOCUMENT** The following explains how to configure your own application with your list of modules, how to define and run this application on one or more computers. \section S1_sal_appl General principles -%A %SALOME application is defined by a set of modules (GEOM, SMESH, ASTER...). +%A %SALOME application is defined by a set of modules (GEOM, SMESH, ASTER...). %A %SALOME application +lives in an application directory. +%A %SALOME application is a virtual installation of %SALOME in the application directory +(bin, lib, doc, share...), with, for each file (executable, script, data, +library, resources...), symbolic links to the actual files. %A %SALOME User can define several %SALOME Applications. These applications are runnable from the same user account. These applications may share the same @@ -42,126 +42,78 @@ computer. \section S2_sal_appl Application Directory -There are two ways for creation of an application directory, the recommended way is -the second, easier to configure. - -
      -
    1. - First way - references to different module directories - -The script createAppli.sh in ${KERNEL_ROOT_DIR}/bin/salome creates an -application directory with the given path in parameter. The path given, ${APPLI}, is -relative to ${HOME}. - -The directory is only a skeleton, the user has to edit several files to -configure his own application. These files are described after, the list is: - -- env.d/atFirst.sh -- env.d/envProducts.sh -- env.d/envSALOME.sh -- CatalogResources.xml -- SALOMEApp.xml - -
    2. -
    3. - Second and easiest way - one single virtual install directory - -The user must create a %SALOME application configuration file by modifying a +First, the user must create a %SALOME application configuration file by modifying a copy of ${KERNEL_ROOT_DIR}/bin/salome/config_appli.xml. The file describes the list of %SALOME modules used in the application, with their respective installation path. The configuration file also defines the -path of an existing script which sets the %SALOME prerequisites, -and optionnaly, the path of samples directory (SAMPLES_SRC). -The following command:: +path of an existing script which sets the %SALOME prerequisites (tag "prerequisites"), +and optionally, the path of samples directory (SAMPLES_SRC) (tag "samples") +and the path of a catalog of resources (tag "resources"). + +The following command: \code python /bin/salome/appli_gen.py --prefix= --config= \endcode -creates a virtual installation of %SALOME in the application directory ${APPLI} -(bin, lib, doc, share...), with, for each file (executable, script, data, -library, resources...), symbolic links to the actual file. -Note: it is recommended to set the environment for %SALOME prerequisites -before invoking the above command, in order to use the same python as SALOME, -otherwise installation may be wrong +creates a %SALOME application in the application directory given by the prefix option (local directory +by default) with the configuration file given by the config option (config_appli.xml by default). Providing an existing script for %SALOME prerequisites (the same one used for modules compilation, or given with the modules installation), the installation works without further modification for a single computer (unless some modules needs a special environment not defined in the above script). + For a distributed application (several computers), one must copy and adapt CatalogResources.xml from ${KERNEL_ROOT_DIR}/bin/salome/appliskel (see below). -
    4. -
    \section S3_sal_appl General rules -Directory ${APPLI} must be created on each computer of the application. +The application directory must be created on each computer of the application. The easiest way is to use the same relative path (to ${HOME}) on each computer. (Sometimes it is not possible to use the same path everywhere, for instance when ${HOME} is shared with NFS, so it is possible to define different path following the computers). -The ${APPLI} directory contains scripts for environment and runs. Environment +The application directory contains scripts for environment and runs. Environment scripts must be configured (by the user) on each computer. All the environment -scripts are in the ${APPLI}/env.d directory. +scripts are in the env.d subdirectory. -The script ${APPLI}/envd sources **all** the files (\*.sh) in ${APPLI}/env.d -in alphanumeric order (after edition, think to remove backup files). the envd +The script envd sources \b all the files (*.sh) in subdirectory env.d +in alphanumeric order (after edition, think to remove backup files). The envd script is used by run scripts.
    1. env.d scripts -With the first way of installation, each user **must define** his own -configuration for these scripts, following the above rules. -With the virtual installation (second way, above), env.d -scripts are built automatically. - - **The following is only an example proposed by createAppli.sh, (first way of installation) not working as it is**. - -- atFirst.sh - Sets the computer configuration not directly related to %SALOME, - like useful tools, default PATH. - -- envProducts.sh - Sets the %SALOME prerequisites. - -- envSALOME.sh - Sets all the MODULE_ROOT_DIR that can be used in the %SALOME application. +env.d scripts are built automatically. - SALOMEAppConfig is also defined by: +You can add your own environment scripts in env.d subdirectory, they will be sourced as +the generated ones provided they have a .sh extension. -\code -export SALOMEAppConfig=${HOME}/${APPLI} -\endcode - - where SALOMEAppConfig designates the directory containing SALOMEApp.xml. - Note that ${APPLI} is already defined by the calling scripts when - env.d/envSALOME.sh is sourced.
    2. User run scripts The %SALOME user can use 4 scripts: -- runAppli +- runAppli\n Launches a %SALOME Session (similar to ${KERNEL_ROOT_DIR}/bin/salome/runSalome but with a different name to avoid confusions). See parameters below. -- runSession +- runSession\n Launches a shell script in the %SALOME application environment, with access to the current (last launched) %SALOME session (naming service), if any. Without arguments, the script is interactive. With arguments, the script executes the command in the %SALOME application environment. -- runConsole +- runConsole\n Gives a python console connected to the current %SALOME Session. It is also possible to use runSession, then python. -- runTests +- runTests\n Similar to runSession, used for unit testing, but runSession tries to use an already existing naming service definition from a running session (hostname and port number), and runTests defines a new configuration for naming service @@ -170,12 +122,12 @@ The %SALOME user can use 4 scripts:
    3. %SALOME internal run scripts -- envd +- envd\n Sets %SALOME application environment, envd is sourced by other scripts. For remote calls, %SALOME uses one script. -- runRemote.sh +- runRemote.sh\n This script is mainly used to launch containers. The first 3 arguments define the hostname and port userd for naming service, plus a working directory, the remaining arguments define the command to execute. @@ -183,20 +135,19 @@ For remote calls, %SALOME uses one script.
    4. Other configuration files -- SALOMEApp.xml +- SALOMEApp.xml\n This file is similar to the default given in ${GUI_ROOT_DIR}/share/SALOME/resources/gui -- CatalogRessources.xml - This files describes all the computers the application can use. The given - example is minimal and suppose ${APPLI} is the same relative path +- CatalogRessources.xml\n + This file describes all the computers the application can use. The given + example is minimal and suppose application directory is the same relative path to ${HOME}, on all the computers. %A different directory can be set on a particular computer with a line: - -\code + \code appliPath="my/specific/path/on/this/computer" -\endcode + \endcode
    @@ -207,7 +158,7 @@ appliPath="my/specific/path/on/this/computer"
  8. Launch a %SALOME session with a GUI interface -Launch is done with a command like:: +Launch is done with a command like: \code ./runAppli --logger @@ -216,7 +167,7 @@ Launch is done with a command like:: The --logger option means here : collect all the traces from the all the distributed process, via CORBA, in a single file : logger.log. -There are a lot of options, a complete list is given by:: +There are a lot of options, a complete list is given by: \code ./runAppli --help @@ -237,20 +188,20 @@ When the GUI is closed, the different %SALOME servers are still running. Close a %SALOME session, kill all the servers Inside the interactive python interpreter you get when you use runAppli -with arguments, you can kill all the servers of your session with:: +with arguments, you can kill all the servers of your session with: \code >>> killLocalPort() \endcode -or the servers of all the sessions with:: +or the servers of all the sessions with: \code >>> killAllPorts() \endcode If you have no active Python interpreter connected to your session, you can -kill all the %SALOME servers of **all the sessions** on a given computer:: +kill all the %SALOME servers of all the sessions on a given computer: \code ./runSession killSalome.py @@ -263,7 +214,7 @@ use the start menu to stop... When you use only one session at a time, you don't need more. To kill a given session (when several session are running), one needs -the naming service port number:: +the naming service port number: \code ./runSession killSalomeWithPort 2810 @@ -273,7 +224,7 @@ Note that the port number of the last launched session can be found on Linux, in the prompt, within a runSession shell (see below). It is also possible to get the Naming Service host and port number of -the last launched session with:: +the last launched session with: \code ./runSession NSparam.py @@ -295,7 +246,7 @@ import GEOM_usinggeom raw_input("Press a key and the servers will be killed ...") \endcode -This script is run in a non interactive way with:: +This script is run in a non interactive way with: \code ./runSession python test_session_geom.py @@ -310,23 +261,23 @@ All the process are automatically killed when Python is closed It's often easier to develop and try Python scripts outside the GUI embedded Python interpreter. Imagine, for instance, you are writing a script involving geometry and mesh modules. -first, launch a %SALOME session with gui, then, on another terminal:: +first, launch a %SALOME session with gui, then, on another terminal: \code ./runSession python \endcode -Import %SALOME module. salome_init() without arguments creates a new study -in the running session (note: SALOME_init(n) attachs to a running session whose -studyId is n):: +Import salome module. salome_init() without arguments creates a new study +in the running session (note: salome_init(n) attachs to a running session whose +studyId is n): \code import salome salome.salome_init() \endcode -An example of script given with SMESH:: +An example of script given with SMESH: \code import ex01_cube2build @@ -336,8 +287,8 @@ It is possible to connect the GUI interface to the study created in the above script with the file/connect menu, then browse study and display objects. Further modifications on study can be done either with GUI or external script (use refresh popup in GUI %object browser to see study modifications generated -by the external script). **AVOID modifications with GUI when a Python script -is running**. Not all the modules are protected against concurrent actions... +by the external script). AVOID modifications with GUI when a Python script +is running. Not all the modules are protected against concurrent actions...
  9. Different uses of the runSession shell interpreter @@ -349,13 +300,13 @@ connects to the last launched session (i.e. gets the naming service references of the session: hostname and port) On Linux, the shell prompt (bash) gives information on naming service -references, hostname and port:: +references, hostname and port: \code [NS=cli76cc:2811]prascle@cli76cc:~/SALOME2/Run/Virtual$ \endcode -If there is no running session, prompt looks like:: +If there is no running session, prompt looks like: \code [NS=:]prascle@cli76cc:~/SALOME2/Run/Virtual$ @@ -364,7 +315,7 @@ If there is no running session, prompt looks like:: runSession is useful to launch any script or program which needs the complete %SALOME environment, with or without a session already running. For instance, to launch the ddd debugger interface on the gui %server, first -launch a %SALOME session with gui, then, on another terminal:: +launch a %SALOME session with gui, then, on another terminal: \code ./runSession ddd diff --git a/doc/salome/salome_file.dox b/doc/salome/salome_file.dox index dffb378b9..2f29ea7d4 100644 --- a/doc/salome/salome_file.dox +++ b/doc/salome/salome_file.dox @@ -9,7 +9,7 @@ SALOME_FileTransfer. It extends it to enable a higher model for managing files i \section S1_Salome_file Principles Salome_file is a CORBA %object. It's role is to managed many system files. When a Salome_file -is created, no files are managed. Then, files are added using Salome_file interface. %A file is represented +is created, no files are managed. Then, files are added using Salome_file_i interface. %A file is represented by a name and a path. There is two different cases when a file is added : @@ -115,9 +115,4 @@ To avoid these cases, Salome_file API provides advanced methods : }; \endcode -\section S3_Salome_file Using Salome_file into %SALOME services - -Currently you can't use Salome_file into YACS schema. In the next version of %SALOME, -files ports will be available to connect output files to input files. - */ diff --git a/doc/salome/tui/KERNEL/HTML/Logger.html b/doc/salome/tui/KERNEL/HTML/Logger.html deleted file mode 100644 index 1a73901c0..000000000 --- a/doc/salome/tui/KERNEL/HTML/Logger.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - -
    interface Logger
    IDL file
    Python
    void putMessage ( in string message )
    putMessage ( message )
    void ping ( )
    ping ( )

    -
    diff --git a/doc/salome/tui/KERNEL/HTML/SALOMEDS.html b/doc/salome/tui/KERNEL/HTML/SALOMEDS.html deleted file mode 100644 index f9d2b559d..000000000 --- a/doc/salome/tui/KERNEL/HTML/SALOMEDS.html +++ /dev/null @@ -1,674 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface Study
    IDL file
    Python
    PersistentReference GetPersistentReference ( )
    return_value = GetPersistentReference ( )
    SalomeReference GetTransientReference ( )
    return_value = GetTransientReference ( )
    boolean IsEmpty ( )
    return_value = IsEmpty ( )
    SComponent FindComponent ( in string aComponentName )
    return_value = FindComponent ( aComponentName )
    SComponent FindComponentID ( in ID aComponentID )
    return_value = FindComponentID ( aComponentID )
    SObject FindObject ( in string anObjectName )
    return_value = FindObject ( anObjectName )
    SObject FindObjectID ( in ID aObjectID )
    return_value = FindObjectID ( aObjectID )
    SObject CreateObjectID ( in ID aObjectID )
    return_value = CreateObjectID ( aObjectID )
    SObject FindObjectIOR ( in ID aObjectIOR )
    return_value = FindObjectIOR ( aObjectIOR )
    ListOfSObject FindObjectByName ( in string anObjectName, in string aComponentName )
    return_value = FindObjectByName ( anObjectName, aComponentName )
    SObject FindObjectByPath ( in string thePath )
    return_value = FindObjectByPath ( thePath )
    string GetObjectPath ( in Object theObject )
    return_value = GetObjectPath ( theObject )
    void SetContext ( in string thePath )
    SetContext ( thePath )
    string GetContext ( )
    return_value = GetContext ( )
    ListOfStrings GetObjectNames ( in string theContext )
    return_value = GetObjectNames ( theContext )
    ListOfStrings GetDirectoryNames ( in string theContext )
    return_value = GetDirectoryNames ( theContext )
    ListOfStrings GetFileNames ( in string theContext )
    return_value = GetFileNames ( theContext )
    ListOfStrings GetComponentNames ( in string theContext )
    return_value = GetComponentNames ( theContext )
    ChildIterator NewChildIterator ( in SObject aSO )
    return_value = NewChildIterator ( aSO )
    SComponentIterator NewComponentIterator ( )
    return_value = NewComponentIterator ( )
    StudyBuilder NewBuilder ( )
    return_value = NewBuilder ( )
    void UpdateIORLabelMap ( in string anIOR, in string anEntry )
    UpdateIORLabelMap ( anIOR, anEntry )
    AttributeStudyProperties GetProperties ( )
    return_value = GetProperties ( )
    boolean IsModified ( )
    return_value = IsModified ( )
    ListOfSObject FindDependances ( in SObject anObject )
    return_value = FindDependances ( anObject )
    string GetLastModificationDate ( )
    return_value = GetLastModificationDate ( )
    ListOfDates GetModificationsDate ( )
    return_value = GetModificationsDate ( )
    string ConvertObjectToIOR ( in Object theObject )
    return_value = ConvertObjectToIOR ( theObject )
    Object ConvertIORToObject ( in string theIOR )
    return_value = ConvertIORToObject ( theIOR )
    UseCaseBuilder GetUseCaseBuilder ( )
    return_value = GetUseCaseBuilder ( )
    void Close ( )
    Close ( )
    void EnableUseCaseAutoFilling ( in boolean isEnabled )
    EnableUseCaseAutoFilling ( isEnabled )
    void AddPostponed ( in string theIOR )
    AddPostponed ( theIOR )
    void AddCreatedPostponed ( in string theIOR )
    AddCreatedPostponed ( theIOR )
    void RemovePostponed ( in long theUndoLimit )
    RemovePostponed ( theUndoLimit )
    void UndoPostponed ( in long theWay )
    UndoPostponed ( theWay )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface StudyBuilder
    IDL file
    Python
    SComponent NewComponent ( in string ComponentDataType )
    return_value = NewComponent ( ComponentDataType )
    void DefineComponentInstance ( in SComponent aComponent, in Object ComponentIOR )
    DefineComponentInstance ( aComponent, ComponentIOR )
    void RemoveComponent ( in SComponent aComponent )
    RemoveComponent ( aComponent )
    SObject NewObject ( in SObject theFatherObject )
    return_value = NewObject ( theFatherObject )
    SObject NewObjectToTag ( in SObject theFatherObject, in long atag )
    return_value = NewObjectToTag ( theFatherObject, atag )
    void RemoveObject ( in SObject anObject )
    RemoveObject ( anObject )
    void RemoveObjectWithChildren ( in SObject anObject )
    RemoveObjectWithChildren ( anObject )
    void LoadWith ( in SComponent sco, in Driver Engine )
    LoadWith ( sco, Engine )
    void Load ( in SObject sco )
    Load ( sco )
    GenericAttribute FindOrCreateAttribute ( in SObject anObject, in string aTypeOfAttribute )
    return_value = FindOrCreateAttribute ( anObject, aTypeOfAttribute )
    boolean FindAttribute ( in SObject anObject, out GenericAttribute anAttribute, in string aTypeOfAttribute )
    [ return_value, anAttribute ] = FindAttribute ( anObject, aTypeOfAttribute )
    void RemoveAttribute ( in SObject anObject, in string aTypeOfAttribute )
    RemoveAttribute ( anObject, aTypeOfAttribute )
    void Addreference ( in SObject anObject, in SObject theReferencedObject )
    Addreference ( anObject, theReferencedObject )
    void RemoveReference ( in SObject anObject )
    RemoveReference ( anObject )
    void AddDirectory ( in string theName )
    AddDirectory ( theName )
    void SetGUID ( in SObject anObject, in string theGUID )
    SetGUID ( anObject, theGUID )
    boolean IsGUID ( in SObject anObject, in string theGUID )
    return_value = IsGUID ( anObject, theGUID )
    void NewCommand ( )
    NewCommand ( )
    void CommitCommand ( )
    CommitCommand ( )
    boolean HasOpenCommand ( )
    return_value = HasOpenCommand ( )
    void AbortCommand ( )
    AbortCommand ( )
    void Undo ( )
    Undo ( )
    void Redo ( )
    Redo ( )
    boolean GetAvailableUndos ( )
    return_value = GetAvailableUndos ( )
    boolean GetAvailableRedos ( )
    return_value = GetAvailableRedos ( )
    Callback SetOnAddSObject ( in Callback theCallback )
    return_value = SetOnAddSObject ( theCallback )
    Callback SetOnRemoveSObject ( in Callback theCallback )
    return_value = SetOnRemoveSObject ( theCallback )
    void SetName ( in SObject theSO, in string theValue )
    SetName ( theSO, theValue )
    void SetComment ( in SObject theSO, in string theValue )
    SetComment ( theSO, theValue )
    void SetIOR ( in SObject theSO, in string theValue )
    SetIOR ( theSO, theValue )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface StudyManager
    IDL file
    Python
    void ping ( )
    ping ( )
    Study NewStudy ( in string study_name )
    return_value = NewStudy ( study_name )
    Study Open ( in URL aStudyUrl )
    return_value = Open ( aStudyUrl )
    void Close ( in Study aStudy )
    Close ( aStudy )
    void Save ( in Study aStudy, in boolean theMultiFile )
    Save ( aStudy, theMultiFile )
    void SaveASCII ( in Study aStudy, in boolean theMultiFile )
    SaveASCII ( aStudy, theMultiFile )
    void SaveAs ( in URL aUrl, in Study aStudy, in boolean theMultiFile )
    SaveAs ( aUrl, aStudy, theMultiFile )
    void SaveAsASCII ( in URL aUrl, in Study aStudy, in boolean theMultiFile )
    SaveAsASCII ( aUrl, aStudy, theMultiFile )
    ListOfOpenStudies GetOpenStudies ( )
    return_value = GetOpenStudies ( )
    Study GetStudyByName ( in string aStudyName )
    return_value = GetStudyByName ( aStudyName )
    Study GetStudyByID ( in short aStudyID )
    return_value = GetStudyByID ( aStudyID )
    boolean CanCopy ( in SObject theObject )
    return_value = CanCopy ( theObject )
    boolean Copy ( in SObject theObject )
    return_value = Copy ( theObject )
    boolean CanPaste ( in SObject theObject )
    return_value = CanPaste ( theObject )
    SObject Paste ( in SObject theObject )
    return_value = Paste ( theObject )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface SObject
    IDL file
    Python
    ID GetID ( )
    return_value = GetID ( )
    SComponent GetFatherComponent ( )
    return_value = GetFatherComponent ( )
    SObject GetFather ( )
    return_value = GetFather ( )
    short Tag ( )
    return_value = Tag ( )
    short Depth ( )
    return_value = Depth ( )
    boolean FindSubObject ( in long atag, out SObject obj )
    [ return_value, obj ] = FindSubObject ( atag )
    boolean FindAttribute ( out GenericAttribute anAttribute, in string aTypeOfAttribute )
    [ return_value, anAttribute ] = FindAttribute ( aTypeOfAttribute )
    boolean ReferencedObject ( out SObject obj )
    [ return_value, obj ] = ReferencedObject ( )
    ListOfAttributes GetAllAttributes ( )
    return_value = GetAllAttributes ( )
    Study GetStudy ( )
    return_value = GetStudy ( )
    Object GetObject ( )
    return_value = GetObject ( )
    string GetName ( )
    return_value = GetName ( )
    string GetComment ( )
    return_value = GetComment ( )
    string GetIOR ( )
    return_value = GetIOR ( )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface GenericAttribute
    IDL file
    Python
    void CheckLocked ( )
    CheckLocked ( )
    string Store ( )
    return_value = Store ( )
    void Restore ( in string theData )
    Restore ( theData )
    string Type ( )
    return_value = Type ( )
    SObject GetSObject ( )
    return_value = GetSObject ( )

    - - - - - - - - - - - - - - - -
    interface SComponent
    IDL file
    Python
    string ComponentDataType ( )
    return_value = ComponentDataType ( )
    boolean ComponentIOR ( out ID theID )
    [ return_value, theID ] = ComponentIOR ( )

    - - - - - - - - - - - - - - - - - - - - - - - -
    interface SComponentIterator
    IDL file
    Python
    void Init ( )
    Init ( )
    boolean More ( )
    return_value = More ( )
    void Next ( )
    Next ( )
    SComponent Value ( )
    return_value = Value ( )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface ChildIterator
    IDL file
    Python
    void Init ( )
    Init ( )
    void InitEx ( in boolean allLevels )
    InitEx ( allLevels )
    boolean More ( )
    return_value = More ( )
    void Next ( )
    Next ( )
    SObject Value ( )
    return_value = Value ( )

    - - - - - - - - - - - - - - - - - - - - - - - -
    interface UseCaseIterator
    IDL file
    Python
    void Init ( in boolean allLevels )
    Init ( allLevels )
    boolean More ( )
    return_value = More ( )
    void Next ( )
    Next ( )
    SObject Value ( )
    return_value = Value ( )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface UseCaseBuilder
    IDL file
    Python
    boolean Append ( in SObject theObject )
    return_value = Append ( theObject )
    boolean Remove ( in SObject theObject )
    return_value = Remove ( theObject )
    boolean AppendTo ( in SObject theFather, in SObject theObject )
    return_value = AppendTo ( theFather, theObject )
    boolean InsertBefore ( in SObject theFirst, in SObject theNext )
    return_value = InsertBefore ( theFirst, theNext )
    boolean SetCurrentObject ( in SObject theObject )
    return_value = SetCurrentObject ( theObject )
    boolean SetRootCurrent ( )
    return_value = SetRootCurrent ( )
    boolean HasChildren ( in SObject theObject )
    return_value = HasChildren ( theObject )
    boolean SetName ( in string theName )
    return_value = SetName ( theName )
    string GetName ( )
    return_value = GetName ( )
    boolean IsUseCase ( in SObject theObject )
    return_value = IsUseCase ( theObject )
    SObject GetCurrentObject ( )
    return_value = GetCurrentObject ( )
    SObject AddUseCase ( in string theName )
    return_value = AddUseCase ( theName )
    UseCaseIterator GetUseCaseIterator ( in SObject theObject )
    return_value = GetUseCaseIterator ( theObject )

    - - - - - - - - - - - - - - - -
    interface Callback
    IDL file
    Python
    void OnAddSObject ( in SObject theObject )
    OnAddSObject ( theObject )
    void OnRemoveSObject ( in SObject theObject )
    OnRemoveSObject ( theObject )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface Driver
    IDL file
    Python
    TMPFile Save ( in SComponent theComponent, in string theURL, in boolean isMultiFile )
    return_value = Save ( theComponent, theURL, isMultiFile )
    TMPFile SaveASCII ( in SComponent theComponent, in string theURL, in boolean isMultiFile )
    return_value = SaveASCII ( theComponent, theURL, isMultiFile )
    boolean Load ( in SComponent theComponent, in TMPFile theStream, in string theURL, in boolean isMultiFile )
    return_value = Load ( theComponent, theStream, theURL, isMultiFile )
    boolean LoadASCII ( in SComponent theComponent, in TMPFile theStream, in string theURL, in boolean isMultiFile )
    return_value = LoadASCII ( theComponent, theStream, theURL, isMultiFile )
    void Close ( in SComponent aSComponent )
    Close ( aSComponent )
    string ComponentDataType ( )
    return_value = ComponentDataType ( )
    string IORToLocalPersistentID ( in SObject theSObject, in string IORString, in boolean isMultiFile, in boolean isASCII )
    return_value = IORToLocalPersistentID ( theSObject, IORString, isMultiFile, isASCII )
    string LocalPersistentIDToIOR ( in SObject theSObject, in string aLocalPersistentID, in boolean isMultiFile, in boolean isASCII )
    return_value = LocalPersistentIDToIOR ( theSObject, aLocalPersistentID, isMultiFile, isASCII )
    boolean CanPublishInStudy ( in Object theIOR )
    return_value = CanPublishInStudy ( theIOR )
    SObject PublishInStudy ( in Study theStudy, in SObject theSObject, in Object theObject, in string theName )
    return_value = PublishInStudy ( theStudy, theSObject, theObject, theName )
    boolean CanCopy ( in SObject theObject )
    return_value = CanCopy ( theObject )
    TMPFile CopyFrom ( in SObject theObject, out long theObjectID )
    [ return_value, theObjectID ] = CopyFrom ( theObject )
    boolean CanPaste ( in string theComponentName, in long theObjectID )
    return_value = CanPaste ( theComponentName, theObjectID )
    SObject PasteInto ( in TMPFile theStream, in long theObjectID, in SObject theObject )
    return_value = PasteInto ( theStream, theObjectID, theObject )

    -
    diff --git a/doc/salome/tui/KERNEL/HTML/SALOMEDS_Attributes.html b/doc/salome/tui/KERNEL/HTML/SALOMEDS_Attributes.html deleted file mode 100644 index 49f848f73..000000000 --- a/doc/salome/tui/KERNEL/HTML/SALOMEDS_Attributes.html +++ /dev/null @@ -1,894 +0,0 @@ - - - - - - - - - - - - - - - - -
    interface AttributeReal
    IDL file
    Python
    double Value ( )
    return_value = Value ( )
    void SetValue ( in double value )
    SetValue ( value )

    - - - - - - - - - - - - - - - -
    interface AttributeInteger
    IDL file
    Python
    long Value ( )
    return_value = Value ( )
    void SetValue ( in long value )
    SetValue ( value )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface AttributeSequenceOfReal
    IDL file
    Python
    void Assign ( in DoubleSeq other )
    Assign ( other )
    DoubleSeq CorbaSequence ( )
    return_value = CorbaSequence ( )
    void Add ( in double value )
    Add ( value )
    void Remove ( in long index )
    Remove ( index )
    void ChangeValue ( in long index, in double value )
    ChangeValue ( index, value )
    double Value ( in short index )
    return_value = Value ( index )
    long Length ( )
    return_value = Length ( )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface AttributeSequenceOfInteger
    IDL file
    Python
    void Assign ( in LongSeq other )
    Assign ( other )
    LongSeq CorbaSequence ( )
    return_value = CorbaSequence ( )
    void Add ( in long value )
    Add ( value )
    void Remove ( in long index )
    Remove ( index )
    void ChangeValue ( in long index, in long value )
    ChangeValue ( index, value )
    long Value ( in short index )
    return_value = Value ( index )
    long Length ( )
    return_value = Length ( )

    - - - - - - - - - - - - - - - -
    interface AttributeName
    IDL file
    Python
    string Value ( )
    return_value = Value ( )
    void SetValue ( in string value )
    SetValue ( value )

    - - - - - - - - - - - - - - - -
    interface AttributeComment
    IDL file
    Python
    string Value ( )
    return_value = Value ( )
    void SetValue ( in string value )
    SetValue ( value )

    - - - - - - - - - - - - - - - -
    interface AttributeIOR
    IDL file
    Python
    string Value ( )
    return_value = Value ( )
    void SetValue ( in string value )
    SetValue ( value )

    - - - - - - - - - - - - - - - -
    interface AttributePersistentRef
    IDL file
    Python
    string Value ( )
    return_value = Value ( )
    void SetValue ( in string value )
    SetValue ( value )

    - - - - - - - - - - - - - - - -
    interface AttributeExternalFileDef
    IDL file
    Python
    string Value ( )
    return_value = Value ( )
    void SetValue ( in string value )
    SetValue ( value )

    - - - - - - - - - - - - - - - -
    interface AttributeFileType
    IDL file
    Python
    string Value ( )
    return_value = Value ( )
    void SetValue ( in string value )
    SetValue ( value )

    - - - - - - - - - - - - - - - -
    interface AttributeDrawable
    IDL file
    Python
    boolean IsDrawable ( )
    return_value = IsDrawable ( )
    void SetDrawable ( in boolean value )
    SetDrawable ( value )

    - - - - - - - - - - - - - - - -
    interface AttributeSelectable
    IDL file
    Python
    boolean IsSelectable ( )
    return_value = IsSelectable ( )
    void SetSelectable ( in boolean value )
    SetSelectable ( value )

    - - - - - - - - - - - - - - - -
    interface AttributeExpandable
    IDL file
    Python
    boolean IsExpandable ( )
    return_value = IsExpandable ( )
    void SetExpandable ( in boolean value )
    SetExpandable ( value )

    - - - - - - - - - - - - - - - -
    interface AttributeOpened
    IDL file
    Python
    boolean IsOpened ( )
    return_value = IsOpened ( )
    void SetOpened ( in boolean value )
    SetOpened ( value )

    - - - - - - - - - - - - - - - -
    interface AttributeTextColor
    IDL file
    Python
    Color TextColor ( )
    return_value = TextColor ( )
    void SetTextColor ( in Color value )
    SetTextColor ( value )

    - - - - - - - - - - - - - - - -
    interface AttributeTextHighlightColor
    IDL file
    Python
    Color TextHighlightColor ( )
    return_value = TextHighlightColor ( )
    void SetTextHighlightColor ( in Color value )
    SetTextHighlightColor ( value )

    - - - - - - - - - - - - - - - - - - - -
    interface AttributePixMap
    IDL file
    Python
    boolean HasPixMap ( )
    return_value = HasPixMap ( )
    string GetPixMap ( )
    return_value = GetPixMap ( )
    void SetPixMap ( in string value )
    SetPixMap ( value )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface AttributeTreeNode
    IDL file
    Python
    void SetFather ( in AttributeTreeNode value )
    SetFather ( value )
    boolean HasFather ( )
    return_value = HasFather ( )
    AttributeTreeNode GetFather ( )
    return_value = GetFather ( )
    void SetPrevious ( in AttributeTreeNode value )
    SetPrevious ( value )
    boolean HasPrevious ( )
    return_value = HasPrevious ( )
    AttributeTreeNode GetPrevious ( )
    return_value = GetPrevious ( )
    void SetNext ( in AttributeTreeNode value )
    SetNext ( value )
    boolean HasNext ( )
    return_value = HasNext ( )
    AttributeTreeNode GetNext ( )
    return_value = GetNext ( )
    void SetFirst ( in AttributeTreeNode value )
    SetFirst ( value )
    boolean HasFirst ( )
    return_value = HasFirst ( )
    AttributeTreeNode GetFirst ( )
    return_value = GetFirst ( )
    void SetTreeID ( in string value )
    SetTreeID ( value )
    string GetTreeID ( )
    return_value = GetTreeID ( )
    void Append ( in AttributeTreeNode value )
    Append ( value )
    void Prepend ( in AttributeTreeNode value )
    Prepend ( value )
    void InsertBefore ( in AttributeTreeNode value )
    InsertBefore ( value )
    void InsertAfter ( in AttributeTreeNode value )
    InsertAfter ( value )
    void Remove ( )
    Remove ( )
    long Depth ( )
    return_value = Depth ( )
    boolean IsRoot ( )
    return_value = IsRoot ( )
    boolean IsDescendant ( in AttributeTreeNode value )
    return_value = IsDescendant ( value )
    boolean IsFather ( in AttributeTreeNode value )
    return_value = IsFather ( value )
    boolean IsChild ( in AttributeTreeNode value )
    return_value = IsChild ( value )
    string Label ( )
    return_value = Label ( )

    - - - - - - - - - - - - - - - -
    interface AttributeLocalID
    IDL file
    Python
    long Value ( )
    return_value = Value ( )
    void SetValue ( in long value )
    SetValue ( value )

    - - - - - - - - - - - - - - - -
    interface AttributeUserID
    IDL file
    Python
    string Value ( )
    return_value = Value ( )
    void SetValue ( in string value )
    SetValue ( value )

    - - - - - - - - - - - - - - - - - - - -
    interface AttributeTarget
    IDL file
    Python
    void Add ( in SObject anObject )
    Add ( anObject )
    ListOfSObject Get ( )
    return_value = Get ( )
    void Remove ( in SObject anObject )
    Remove ( anObject )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface AttributeTableOfInteger
    IDL file
    Python
    void SetTitle ( in string theTitle )
    SetTitle ( theTitle )
    string GetTitle ( )
    return_value = GetTitle ( )
    void SetRowTitle ( in long theIndex, in string theTitle )
    SetRowTitle ( theIndex, theTitle )
    void SetRowTitles ( in StringSeq theTitles )
    SetRowTitles ( theTitles )
    StringSeq GetRowTitles ( )
    return_value = GetRowTitles ( )
    void SetColumnTitle ( in long theIndex, in string theTitle )
    SetColumnTitle ( theIndex, theTitle )
    void SetColumnTitles ( in StringSeq theTitles )
    SetColumnTitles ( theTitles )
    StringSeq GetColumnTitles ( )
    return_value = GetColumnTitles ( )
    void SetRowUnit ( in long theIndex, in string theUnit )
    SetRowUnit ( theIndex, theUnit )
    void SetRowUnits ( in StringSeq theUnits )
    SetRowUnits ( theUnits )
    StringSeq GetRowUnits ( )
    return_value = GetRowUnits ( )
    long GetNbRows ( )
    return_value = GetNbRows ( )
    long GetNbColumns ( )
    return_value = GetNbColumns ( )
    void AddRow ( in LongSeq theData )
    AddRow ( theData )
    void SetRow ( in long theRow, in LongSeq theData )
    SetRow ( theRow, theData )
    LongSeq GetRow ( in long theRow )
    return_value = GetRow ( theRow )
    void AddColumn ( in LongSeq theData )
    AddColumn ( theData )
    void SetColumn ( in long theColumn, in LongSeq theData )
    SetColumn ( theColumn, theData )
    LongSeq GetColumn ( in long theColumn )
    return_value = GetColumn ( theColumn )
    void PutValue ( in long theValue, in long theRow, in long theColumn )
    PutValue ( theValue, theRow, theColumn )
    boolean HasValue ( in long theRow, in long theColumn )
    return_value = HasValue ( theRow, theColumn )
    long GetValue ( in long theRow, in long theColumn )
    return_value = GetValue ( theRow, theColumn )
    void SetNbColumns ( in long theNbColumns )
    SetNbColumns ( theNbColumns )
    LongSeq GetRowSetIndices ( in long theRow )
    return_value = GetRowSetIndices ( theRow )
    boolean ReadFromFile ( in TMPFile theStream )
    return_value = ReadFromFile ( theStream )
    TMPFile SaveToFile ( )
    return_value = SaveToFile ( )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface AttributeTableOfReal
    IDL file
    Python
    void SetTitle ( in string theTitle )
    SetTitle ( theTitle )
    string GetTitle ( )
    return_value = GetTitle ( )
    void SetRowTitle ( in long theIndex, in string theTitle )
    SetRowTitle ( theIndex, theTitle )
    void SetRowTitles ( in StringSeq theTitles )
    SetRowTitles ( theTitles )
    StringSeq GetRowTitles ( )
    return_value = GetRowTitles ( )
    void SetColumnTitle ( in long theIndex, in string theTitle )
    SetColumnTitle ( theIndex, theTitle )
    void SetColumnTitles ( in StringSeq theTitles )
    SetColumnTitles ( theTitles )
    StringSeq GetColumnTitles ( )
    return_value = GetColumnTitles ( )
    void SetRowUnit ( in long theIndex, in string theUnit )
    SetRowUnit ( theIndex, theUnit )
    void SetRowUnits ( in StringSeq theUnits )
    SetRowUnits ( theUnits )
    StringSeq GetRowUnits ( )
    return_value = GetRowUnits ( )
    long GetNbRows ( )
    return_value = GetNbRows ( )
    long GetNbColumns ( )
    return_value = GetNbColumns ( )
    void AddRow ( in DoubleSeq theData )
    AddRow ( theData )
    void SetRow ( in long theRow, in DoubleSeq theData )
    SetRow ( theRow, theData )
    DoubleSeq GetRow ( in long theRow )
    return_value = GetRow ( theRow )
    void AddColumn ( in DoubleSeq theData )
    AddColumn ( theData )
    void SetColumn ( in long theColumn, in DoubleSeq theData )
    SetColumn ( theColumn, theData )
    DoubleSeq GetColumn ( in long theColumn )
    return_value = GetColumn ( theColumn )
    void PutValue ( in double theValue, in long theRow, in long theColumn )
    PutValue ( theValue, theRow, theColumn )
    boolean HasValue ( in long theRow, in long theColumn )
    return_value = HasValue ( theRow, theColumn )
    double GetValue ( in long theRow, in long theColumn )
    return_value = GetValue ( theRow, theColumn )
    void SetNbColumns ( in long theNbColumns )
    SetNbColumns ( theNbColumns )
    LongSeq GetRowSetIndices ( in long theRow )
    return_value = GetRowSetIndices ( theRow )
    boolean ReadFromFile ( in TMPFile theStream )
    return_value = ReadFromFile ( theStream )
    TMPFile SaveToFile ( )
    return_value = SaveToFile ( )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface AttributeTableOfString
    IDL file
    Python
    void SetTitle ( in string theTitle )
    SetTitle ( theTitle )
    string GetTitle ( )
    return_value = GetTitle ( )
    void SetRowTitle ( in long theIndex, in string theTitle )
    SetRowTitle ( theIndex, theTitle )
    void SetRowTitles ( in StringSeq theTitles )
    SetRowTitles ( theTitles )
    StringSeq GetRowTitles ( )
    return_value = GetRowTitles ( )
    void SetColumnTitle ( in long theIndex, in string theTitle )
    SetColumnTitle ( theIndex, theTitle )
    void SetColumnTitles ( in StringSeq theTitles )
    SetColumnTitles ( theTitles )
    StringSeq GetColumnTitles ( )
    return_value = GetColumnTitles ( )
    void SetRowUnit ( in long theIndex, in string theUnit )
    SetRowUnit ( theIndex, theUnit )
    void SetRowUnits ( in StringSeq theUnits )
    SetRowUnits ( theUnits )
    StringSeq GetRowUnits ( )
    return_value = GetRowUnits ( )
    long GetNbRows ( )
    return_value = GetNbRows ( )
    long GetNbColumns ( )
    return_value = GetNbColumns ( )
    void AddRow ( in StringSeq theData )
    AddRow ( theData )
    void SetRow ( in long theRow, in StringSeq theData )
    SetRow ( theRow, theData )
    StringSeq GetRow ( in long theRow )
    return_value = GetRow ( theRow )
    void AddColumn ( in StringSeq theData )
    AddColumn ( theData )
    void SetColumn ( in long theColumn, in StringSeq theData )
    SetColumn ( theColumn, theData )
    StringSeq GetColumn ( in long theColumn )
    return_value = GetColumn ( theColumn )
    void PutValue ( in string theValue, in long theRow, in long theColumn )
    PutValue ( theValue, theRow, theColumn )
    boolean HasValue ( in long theRow, in long theColumn )
    return_value = HasValue ( theRow, theColumn )
    string GetValue ( in long theRow, in long theColumn )
    return_value = GetValue ( theRow, theColumn )
    void SetNbColumns ( in long theNbColumns )
    SetNbColumns ( theNbColumns )
    LongSeq GetRowSetIndices ( in long theRow )
    return_value = GetRowSetIndices ( theRow )
    boolean ReadFromFile ( in TMPFile theStream )
    return_value = ReadFromFile ( theStream )
    TMPFile SaveToFile ( )
    return_value = SaveToFile ( )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface AttributeStudyProperties
    IDL file
    Python
    void SetUserName ( in string theName )
    SetUserName ( theName )
    string GetUserName ( )
    return_value = GetUserName ( )
    void SetCreationDate ( in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear )
    SetCreationDate ( theMinute, theHour, theDay, theMonth, theYear )
    boolean GetCreationDate ( out long theMinute, out long theHour, out long theDay, out long theMonth, out long theYear )
    [ return_value, theMinute, theHour, theDay, theMonth, theYear ] = GetCreationDate ( )
    void SetCreationMode ( in string theMode )
    SetCreationMode ( theMode )
    string GetCreationMode ( )
    return_value = GetCreationMode ( )
    void SetModified ( in long theModified )
    SetModified ( theModified )
    boolean IsModified ( )
    return_value = IsModified ( )
    long GetModified ( )
    return_value = GetModified ( )
    void SetLocked ( in boolean theLocked )
    SetLocked ( theLocked )
    boolean IsLocked ( )
    return_value = IsLocked ( )
    void SetModification ( in string theName, in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear )
    SetModification ( theName, theMinute, theHour, theDay, theMonth, theYear )
    void GetModificationsList ( out StringSeq theNames, out LongSeq theMinutes, out LongSeq theHours, out LongSeq theDays, out LongSeq theMonths, out LongSeq theYears, in boolean theWithCreator )
    [ theNames, theMinutes, theHours, theDays, theMonths, theYears ] = GetModificationsList ( theWithCreator )

    - - - - - - - - - - - - - - - - - - - -
    interface AttributePythonObject
    IDL file
    Python
    void SetObject ( in string theSequence, in boolean IsScript )
    SetObject ( theSequence, IsScript )
    string GetObject ( )
    return_value = GetObject ( )
    boolean IsScript ( )
    return_value = IsScript ( )

    -
    diff --git a/doc/salome/tui/KERNEL/HTML/SALOME_Component.html b/doc/salome/tui/KERNEL/HTML/SALOME_Component.html deleted file mode 100644 index 2d802860c..000000000 --- a/doc/salome/tui/KERNEL/HTML/SALOME_Component.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface Container
    IDL file
    Python
    Container start_impl ( in string ContainerName )
    return_value = start_impl ( ContainerName )
    Component load_impl ( in string nameToRegister, in string componentName )
    return_value = load_impl ( nameToRegister, componentName )
    void remove_impl ( in Component component_i )
    remove_impl ( component_i )
    void finalize_removal ( )
    finalize_removal ( )
    void ping ( )
    ping ( )
    boolean Kill_impl ( )
    return_value = Kill_impl ( )
    string getHostName ( )
    return_value = getHostName ( )
    long getPID ( )
    return_value = getPID ( )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface Component
    IDL file
    Python
    void ping ( )
    ping ( )
    void destroy ( )
    destroy ( )
    Container GetContainerRef ( )
    return_value = GetContainerRef ( )
    void setProperties ( in FieldsDict dico )
    setProperties ( dico )
    FieldsDict getProperties ( )
    return_value = getProperties ( )
    void Names ( in string aGraphName, in string aNodeName )
    Names ( aGraphName, aNodeName )
    boolean Kill_impl ( )
    return_value = Kill_impl ( )
    boolean Stop_impl ( )
    return_value = Stop_impl ( )
    boolean Suspend_impl ( )
    return_value = Suspend_impl ( )
    boolean Resume_impl ( )
    return_value = Resume_impl ( )
    long CpuUsed_impl ( )
    return_value = CpuUsed_impl ( )

    -
    diff --git a/doc/salome/tui/KERNEL/HTML/SALOME_DataTypeCatalog.html b/doc/salome/tui/KERNEL/HTML/SALOME_DataTypeCatalog.html deleted file mode 100644 index c73173ffd..000000000 --- a/doc/salome/tui/KERNEL/HTML/SALOME_DataTypeCatalog.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface DataCatalog
    IDL file
    Python
    ListOfDataTypeName GetDataTypeList ( )
    return_value = GetDataTypeList ( )
    boolean isDerivedFrom ( in string type_in, in string type_out )
    return_value = isDerivedFrom ( type_in, type_out )
    string GetDataInterfaceRead ( in string type )
    return_value = GetDataInterfaceRead ( type )
    string GetDataInterfaceWrite ( in string type )
    return_value = GetDataInterfaceWrite ( type )
    ListOfDataTypeName GetDataTypeParents ( in string type )
    return_value = GetDataTypeParents ( type )

    -
    diff --git a/doc/salome/tui/KERNEL/HTML/SALOME_Exception.html b/doc/salome/tui/KERNEL/HTML/SALOME_Exception.html deleted file mode 100644 index 37c3107c9..000000000 --- a/doc/salome/tui/KERNEL/HTML/SALOME_Exception.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/doc/salome/tui/KERNEL/HTML/SALOME_ModuleCatalog.html b/doc/salome/tui/KERNEL/HTML/SALOME_ModuleCatalog.html deleted file mode 100644 index 5f618eb1a..000000000 --- a/doc/salome/tui/KERNEL/HTML/SALOME_ModuleCatalog.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface Acomponent
    IDL file
    Python
    ListOfInterfaces GetInterfaceList ( )
    return_value = GetInterfaceList ( )
    DefinitionInterface GetInterface ( in string interfacename )
    return_value = GetInterface ( interfacename )
    ListOfServices GetServiceList ( in string interfacename )
    return_value = GetServiceList ( interfacename )
    Service GetService ( in string interfacename, in string servicename )
    return_value = GetService ( interfacename, servicename )
    Service GetDefaultService ( in string interfacename )
    return_value = GetDefaultService ( interfacename )
    string GetPathPrefix ( in string machinename )
    return_value = GetPathPrefix ( machinename )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface ModuleCatalog
    IDL file
    Python
    void ping ( )
    ping ( )
    ListOfComputers GetComputerList ( )
    return_value = GetComputerList ( )
    string GetPathPrefix ( in string machinename )
    return_value = GetPathPrefix ( machinename )
    ListOfComponents GetComponentList ( )
    return_value = GetComponentList ( )
    ListOfIAPP_Affich GetComponentIconeList ( )
    return_value = GetComponentIconeList ( )
    ListOfComponents GetTypedComponentList ( in ComponentType component_type )
    return_value = GetTypedComponentList ( component_type )
    Acomponent GetComponent ( in string componentname )
    return_value = GetComponent ( componentname )
    Component GetComponentInfo ( in string componentName )
    return_value = GetComponentInfo ( componentName )
    void ImportXmlCatalogFile ( in string filename )
    ImportXmlCatalogFile ( filename )
    void shutdown ( )
    shutdown ( )

    -
    diff --git a/doc/salome/tui/KERNEL/HTML/SALOME_Registry.html b/doc/salome/tui/KERNEL/HTML/SALOME_Registry.html deleted file mode 100644 index fd319e119..000000000 --- a/doc/salome/tui/KERNEL/HTML/SALOME_Registry.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface Components
    IDL file
    Python
    void ping ( )
    ping ( )
    unsigned long add ( in Infos lesInfos )
    return_value = add ( lesInfos )
    void remove ( in unsigned long id )
    remove ( id )
    unsigned long size ( )
    return_value = size ( )
    AllInfos getall ( )
    return_value = getall ( )
    AllInfos history ( )
    return_value = history ( )
    void end ( )
    end ( )
    void hello ( in unsigned long id )
    hello ( id )

    -
    diff --git a/doc/salome/tui/KERNEL/HTML/SALOME_RessourcesCatalog.html b/doc/salome/tui/KERNEL/HTML/SALOME_RessourcesCatalog.html deleted file mode 100644 index 787a6283e..000000000 --- a/doc/salome/tui/KERNEL/HTML/SALOME_RessourcesCatalog.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -
    interface RessourcesCatalog
    IDL file
    Python
    ListOfComputer GetComputerList ( )
    return_value = GetComputerList ( )
    ListOfContainerType GetContainerTypeList ( in string computer )
    return_value = GetContainerTypeList ( computer )
    computer_info GetComputerInfo ( in string computer )
    return_value = GetComputerInfo ( computer )

    -
    diff --git a/doc/salome/tui/KERNEL/HTML/SALOME_Session.html b/doc/salome/tui/KERNEL/HTML/SALOME_Session.html deleted file mode 100644 index 37b46747d..000000000 --- a/doc/salome/tui/KERNEL/HTML/SALOME_Session.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface Session
    IDL file
    Python
    void GetInterface ( )
    GetInterface ( )
    Component GetVisuComponent ( )
    return_value = GetVisuComponent ( )
    void StopSession ( )
    StopSession ( )
    StatSession GetStatSession ( )
    return_value = GetStatSession ( )
    void ping ( )
    ping ( )
    long GetActiveStudyId ( )
    return_value = GetActiveStudyId ( )

    -
    diff --git a/doc/salome/tui/KERNEL/HTML/SALOME_TestComponent.html b/doc/salome/tui/KERNEL/HTML/SALOME_TestComponent.html deleted file mode 100644 index 56348f8a1..000000000 --- a/doc/salome/tui/KERNEL/HTML/SALOME_TestComponent.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - -
    interface TestComponent
    IDL file
    Python
    string Coucou ( in long L )
    return_value = Coucou ( L )
    void Setenv ( )
    Setenv ( )

    -
    diff --git a/doc/salome/tui/KERNEL/HTML/TestNotif.html b/doc/salome/tui/KERNEL/HTML/TestNotif.html deleted file mode 100644 index a181974d2..000000000 --- a/doc/salome/tui/KERNEL/HTML/TestNotif.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -
    interface Solver
    IDL file
    Python
    boolean Connect ( )
    return_value = Connect ( )
    void Start ( )
    Start ( )
    void ReStart ( )
    ReStart ( )

    -
    diff --git a/doc/salome/tui/KERNEL/HTML/TypeData.html b/doc/salome/tui/KERNEL/HTML/TypeData.html deleted file mode 100644 index 37c3107c9..000000000 --- a/doc/salome/tui/KERNEL/HTML/TypeData.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/doc/salome/tui/KERNEL/doxyfile.in b/doc/salome/tui/KERNEL/doxyfile.in deleted file mode 100755 index a4f54eba4..000000000 --- a/doc/salome/tui/KERNEL/doxyfile.in +++ /dev/null @@ -1,214 +0,0 @@ -# Doxyfile 1.3-rc1 - -#--------------------------------------------------------------------------- -# General configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = "SALOME v.@VERSION@" -PROJECT_NUMBER = id#1.1 -OUTPUT_DIRECTORY = ../ -OUTPUT_LANGUAGE = English -EXTRACT_ALL = YES -EXTRACT_PRIVATE = YES -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = NO -ALWAYS_DETAILED_SEC = YES -INLINE_INHERITED_MEMB = YES -FULL_PATH_NAMES = NO -STRIP_FROM_PATH = -INTERNAL_DOCS = YES -CASE_SENSE_NAMES = YES -SHORT_NAMES = NO -HIDE_SCOPE_NAMES = NO -VERBATIM_HEADERS = YES -SHOW_INCLUDE_FILES = YES -JAVADOC_AUTOBRIEF = YES -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = NO -DISTRIBUTE_GROUP_DOC = NO -TAB_SIZE = 5 -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ALIASES = -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 25 -OPTIMIZE_OUTPUT_FOR_C = YES -OPTIMIZE_OUTPUT_JAVA = YES -SHOW_USED_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = NO -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = log.txt -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = ../../../../share/salome/idl/SALOME_ModuleCatalog.idl \ - ../../../../share/salome/idl/SALOMEDS.idl \ - ../../../../share/salome/idl/SALOME_Exception.idl \ - ../../../../share/salome/idl/SALOMEDS_Attributes.idl \ - ../../../../share/salome/idl/SALOME_Component.idl \ - ../../../../share/salome/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.hxx \ - ../../../../share/salome/src/NamingService/SALOME_NamingService.hxx \ - ../../../../share/salome/src/NamingService/SALOME_NamingService.cxx \ - ../../../../share/salome/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx \ - ../../../../build/salome/bin/salome \ - ../../../../build/salome/src/Batch_SWIG \ - ../../../../build/salome/src/Communication_SWIG \ - ../../../../build/salome/src/LifeCycleCORBA_SWIG \ - ../../../../build/salome/src/LifeCycleCORBA_SWIG \ - ../../../../build/salome/src/NOTIFICATION_SWIG -FILE_PATTERNS = *.idl *.hxx *.cxx python_extension_must_be_here -RECURSIVE = YES -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = sources/ -INPUT_FILTER = -FILTER_SOURCE_FILES = YES -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = NO -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = NO -REFERENCES_RELATION = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = KERNEL -HTML_FILE_EXTENSION = .html -HTML_HEADER = sources/myheader.html -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = YES -TOC_EXPAND = YES -DISABLE_INDEX = YES -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = YES -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = NO -USE_PDFLATEX = NO -LATEX_BATCHMODE = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_SCHEMA = -XML_DTD = -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = YES -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = NO -#--------------------------------------------------------------------------- -# Configuration::addtions related to external references -#--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = YES -HIDE_UNDOC_RELATIONS = NO -HAVE_DOT = YES -CLASS_GRAPH = YES -COLLABORATION_GRAPH = NO -TEMPLATE_RELATIONS = YES -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = NO -GRAPHICAL_HIERARCHY = YES -DOT_IMAGE_FORMAT = jpg -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH = 1024 -MAX_DOT_GRAPH_HEIGHT = 1200 -GENERATE_LEGEND = NO -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::addtions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO -CGI_NAME = search.cgi -CGI_URL = -DOC_URL = -DOC_ABSPATH = -BIN_ABSPATH = /usr/local/bin/ -EXT_DOC_PATHS = diff --git a/doc/salome/tui/KERNEL/exemple/Example1.html b/doc/salome/tui/KERNEL/exemple/Example1.html deleted file mode 100755 index 1ec12baf9..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example1.html +++ /dev/null @@ -1,54 +0,0 @@ - - - -Exemple - -
    #%AttributeReal interface (creations/saving/restoring)%
    -#%Methods : FindOrCreateAttribute, Value, SaveAs, SetValue, FindComponent, FindAttribute, Open%
    -
    -
    -#       create AttributeReal      
    -#=================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeReal")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeReal attribute"
    -A = A._narrow(SALOMEDS.AttributeReal)
    -A.SetValue(0.0001)
    -if A.Value() != 0.0001:
    -        raise  RuntimeError, "Error : wrong value of  AttributeReal"
    -
    -#      save / restore study      
    -#=================================
    -
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -#file = "/tmp/ggg.hdf"
    -
    -print " -------  We will save to", file, "-----------"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -openedStudy=batchmode_geompy.myStudyManager.Open(file)
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#     find AttributeReal
    -#=================================
    -
    -res,A=father.FindAttribute("AttributeReal")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeReal"
    -
    -A = A._narrow(SALOMEDS.AttributeReal)
    -if A.Value() != 0.0001:
    -        raise  RuntimeError, "Error : wrong value of  AttributeReal"
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example10.html b/doc/salome/tui/KERNEL/exemple/Example10.html deleted file mode 100755 index fde0125ea..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example10.html +++ /dev/null @@ -1,59 +0,0 @@ - - - -Example - -
    #%AttributeExpandable interface(creations/saving/restoring)%
    -#%SALOMEDS methods : SaveAs FindComponent  FindAttribute Open%
    -#%Attribute methods : SetExpandable IsExpandable%
    -
    -#              create    AttributeExpandable
    -#===========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute( batchmode_geompy.father, "AttributeExpandable")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeExpandable attribute"
    -A = A._narrow(SALOMEDS.AttributeExpandable)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeExpandable attribute"
    -
    -A.SetExpandable(1)
    -
    -if A.IsExpandable() == 0:
    -        "Error: wrong value of AttributeExpandable"
    -
    -
    -#      save / restore study      
    -#============================================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file,  batchmode_geompy.myStudy)
    -openedStudy = batchmode_geompy.myStudyManager.Open(file);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#     find   AttributeExpandable
    -#============================================================
    -
    -res,A=father.FindAttribute("AttributeExpandable")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeExpandable"
    -
    -A = A._narrow(SALOMEDS.AttributeExpandable)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeExpandable attribute"
    -
    -if A.IsExpandable() == 0:
    -        "Error: wrong value of AttributeExpandable"
    -
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example11.html b/doc/salome/tui/KERNEL/exemple/Example11.html deleted file mode 100755 index 38218bddc..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example11.html +++ /dev/null @@ -1,59 +0,0 @@ - - - -Example - -
    #%Test AttributeOpened (creations/saving/restoring)%
    -#%SALOMEDS methods : FindOrCreateAttribute SaveAs, FindComponent, FindAttribute, Open%
    -#%Attribute methods : SetOpened, IsOpened%
    -
    -#              create    AttributeOpened
    -#===========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeOpened")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeOpened attribute"
    -A = A._narrow(SALOMEDS.AttributeOpened)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeOpened attribute"
    -
    -A.SetOpened(1)
    -
    -if A.IsOpened() == 0:
    -        "Error: wrong value of AttributeOpened"
    -
    -
    -#      save / restore study      
    -#============================================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -openedStudy=batchmode_geompy.myStudyManager.Open(file);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#     find   AttributeOpened
    -#============================================================
    -
    -res,A=father.FindAttribute("AttributeOpened")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeOpened"
    -
    -A = A._narrow(SALOMEDS.AttributeOpened)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeOpened attribute"
    -
    -if A.IsOpened() == 0:
    -        "Error: wrong value of AttributeOpened"
    -
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example12.html b/doc/salome/tui/KERNEL/exemple/Example12.html deleted file mode 100755 index 57c5d4531..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example12.html +++ /dev/null @@ -1,67 +0,0 @@ - - - -Example - -
    #%AttributeTextColor interface (creations/saving/restoring)%
    -#%SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open%
    -#%Attribute methods : SetTextColor  TextColor%
    -
    -
    -#--------------------------------------------------------------------------
    -#              create    AttributeTextColor
    -#===========================================================
    -import SALOMEDS_Attributes_idl
    -color = SALOMEDS_Attributes_idl._0_SALOMEDS.Color(234,345,231)
    -
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeTextColor")
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeTextColor attribute"
    -A = A._narrow(SALOMEDS.AttributeTextColor)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeTextColor attribute"
    -
    -A.SetTextColor(color)
    -
    -c = A.TextColor();
    -
    -if c.R != 234 or c.G != 345 or c.B != 231:
    -        print "Error: wrong value of AttributeTextColor"
    -
    -#      save / restore study      
    -#============================================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -openedStudy = batchmode_geompy.myStudyManager.Open(file);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#       find   AttributeTextColor
    -#============================================================
    -
    -res,A=father.FindAttribute("AttributeTextColor")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeTextColor"
    -
    -A = A._narrow(SALOMEDS.AttributeTextColor)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeTextColor attribute"
    -
    -c = A.TextColor();
    -if c.R != 234 or c.G != 345 or c.B != 231:
    -        print "Error: wrong value of AttributeTextColor"
    -
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example13.html b/doc/salome/tui/KERNEL/exemple/Example13.html deleted file mode 100755 index 9ecf9964b..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example13.html +++ /dev/null @@ -1,68 +0,0 @@ - - - -Example - -
    #%Test AttributeTextHighlightColor interface(creations/saving/restoring)%
    -#%SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open%
    -#%Attribute methods :  SetTextHighlightColor TextHighlightColor%
    -
    -#--------------------------------------------------------------------------
    -#              create    AttributeTextHighlightColor
    -#===========================================================
    -
    -import SALOMEDS_Attributes_idl
    -highlightcolor=SALOMEDS_Attributes_idl._0_SALOMEDS.Color(256,256,256)
    -
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeTextHighlightColor")
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeTextHighlightColor attribute"
    -A = A._narrow(SALOMEDS.AttributeTextHighlightColor)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeTextHighlightColor attribute"
    -
    -A.SetTextHighlightColor(highlightcolor)
    -
    -c = A.TextHighlightColor();
    -if c.R != 256 or c.G != 256 or c.B != 256:
    -        print "Error: wrong value of AttributeTextHighlightColor"
    -
    -
    -#      save / restore study      
    -#============================================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -openedStudy=batchmode_geompy.myStudyManager.Open(file);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#       find   AttributeTextHighlightColor
    -#============================================================
    -
    -res, A = father.FindAttribute("AttributeTextHighlightColor")
    -print res, A
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeTextHighlightColor"
    -
    -A = A._narrow(SALOMEDS.AttributeTextHighlightColor)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeTextHighlightColor attribute"
    -
    -c = A.TextHighlightColor();
    -
    -if c.R != 256 or c.G != 256 or c.B != 256:
    -        print "Error: wrong value of AttributeTextTextHighlightColor"
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example14.html b/doc/salome/tui/KERNEL/exemple/Example14.html deleted file mode 100755 index a4e0ada09..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example14.html +++ /dev/null @@ -1,57 +0,0 @@ - - - -Example - -
    #%AttributePixMap interface (creations/saving/restoring)%
    -#%SALOMEDS methods  : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open%
    -#%Attribute methods : SetPixMap, GetPixMap%
    -
    -#--------------------------------------------------------------------------
    -
    -#--------------------------------------------------------------------------
    -#   create  AttributePixMap
    -#===============================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributePixMap")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributePixMap attribute"
    -aPixmap = A._narrow(SALOMEDS.AttributePixMap);
    -aPixmap.SetPixMap( "ICON_OBJBROWSER_Geometry" );
    -
    -if aPixmap.GetPixMap() != "ICON_OBJBROWSER_Geometry":
    -        print "Error: wrong value of AttributePixMap"
    -
    -
    -#      save / restore study      
    -#============================================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -openedStudy = batchmode_geompy.myStudyManager.Open(file);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#       find   AttributePixMap
    -#============================================================
    -
    -res,A=father.FindAttribute("AttributePixMap")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error: AttributePixMap not found "
    -
    -A = A._narrow(SALOMEDS.AttributePixMap)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributePixMap attribute"
    -
    -if A.GetPixMap() != "ICON_OBJBROWSER_Geometry":
    -        print "Error: wrong value of AttributePixMap"
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example15.html b/doc/salome/tui/KERNEL/exemple/Example15.html deleted file mode 100755 index f6cddac5a..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example15.html +++ /dev/null @@ -1,51 +0,0 @@ - - - -Example - -
    #%AttributeLocalID interface(creations/saving/restoring)%
    -#%SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open%    
    -#%Attribute methods : Value,  SetValue%
    -
    -#       create AttributeLocalID
    -#=================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeLocalID")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeLocalID attribute"
    -A = A._narrow(SALOMEDS.AttributeLocalID)
    -
    -A.SetValue(763242882)
    -
    -if A.Value() != 763242882:
    -        print "Error: wrong value of AttributeLocalID"
    -
    -#      save / restore study      
    -#=================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -openedStudy = batchmode_geompy.myStudyManager.Open(file);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#     find  AttributeLocalID
    -#=================================
    -
    -res,A=father.FindAttribute("AttributeLocalID")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeLocalID"
    -
    -A = A._narrow(SALOMEDS.AttributeLocalID)
    -
    -if A.Value() != 763242882:
    -        print "Error: wrong value of AttributeLocalID"
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example16.html b/doc/salome/tui/KERNEL/exemple/Example16.html deleted file mode 100755 index ec8bfd5e3..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example16.html +++ /dev/null @@ -1,158 +0,0 @@ - - - -Example - -
    Methods : GetAvailableUndos, ChangeValue, FindOrCreateAttribute, SaveAs, GetAvailableRedos, Undo, FindComponent, Redo, FindAttribute, Open, CommitCommand, NewCommand
    -
    -
    -dir= os.getenv("TmpDir")
    -if dir == None:
    -        dir = "/tmp"
    -
    -batchmode_geompy.myBuilder._set_UndoLimit(20)
    -
    -# 1st transaction -----------------------------------------
    -batchmode_geompy.myBuilder.NewCommand()
    -#       create AttributeSequenceOfInteger      
    -#=========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeSequenceOfInteger")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeSequenceOfInteger attribute"
    -A = A._narrow(SALOMEDS.AttributeSequenceOfInteger)
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeSequenceOfInteger attribute"
    -
    -A.Add(100)
    -A.Add(300)
    -A.Add(500)
    -A.Add(400)
    -A.Add(700)
    -print "First transaction goes on :  HasOpenCommand() = ", batchmode_geompy.myBuilder.HasOpenCommand()
    -batchmode_geompy.myBuilder.CommitCommand() #--------------
    -
    -# 2nd transaction ------------------------------------------
    -batchmode_geompy.myBuilder.NewCommand() 
    -A.Remove(3)
    -A.ChangeValue(4,500)
    -batchmode_geompy.myBuilder.CommitCommand() #--------------
    -
    -if batchmode_geompy.myBuilder.GetAvailableUndos() == 0:
    -        raise RuntimeError, "GetAvailableUndos() = 0 but must not !"
    -
    -if A.Length() != 4:
    -        print "Wrong length of SequenceOfInteger"
    -if A.Value(1) != 100 or A.Value(2) != 300 or A.Value(3) != 400 or A.Value(4) != 500:
    -        raise  RuntimeError, "Wrong  value of  AttributeSequenceOfInteger"
    -
    -file1 = dir + "/test1.hdf"
    -batchmode_geompy.myStudyManager.SaveAs(file1, batchmode_geompy.myStudy)
    -
    -# 1st Undo ---------------------------------------
    -batchmode_geompy.myBuilder.Undo()
    -res, A = batchmode_geompy.myBuilder.FindAttribute(batchmode_geompy.father, "AttributeSequenceOfInteger")
    -if A is None:
    -        raise  RuntimeError, "After first 'undo' can't find AttributeSequenceOfInteger"
    -if A.Length() != 5:
    -        print "Wrong length of SequenceOfInteger"
    -if A.Value(1) != 100 or A.Value(2) != 300 or A.Value(3) != 500 or A.Value(4) != 400 or  A.Value(5) != 700:
    -        print  A.Value(1), A.Value(2), A.Value(3), A.Value(4), A.Value(5)
    -        raise  RuntimeError, "Wrong  value of  AttributeSequenceOfInteger after the first 'undo'!"
    -# save 
    -file2 = dir + "/test2.hdf"
    -batchmode_geompy.myStudyManager.SaveAs(file2, batchmode_geompy.myStudy)
    -#-------------------------------------------------
    -# 2nd Undo ---------------------------------------
    -batchmode_geompy.myBuilder.Undo()
    -res, attr = batchmode_geompy.myBuilder.FindAttribute(batchmode_geompy.father, "AttributeSequenceOfInteger")
    -if res !=0 or attr != None :
    -        raise  RuntimeError, "After the second 'undo' AttributeSequenceOfInteger exists but must not!"
    -file3 = dir + "/test3.hdf"
    -batchmode_geompy.myStudyManager.SaveAs(file3, batchmode_geompy.myStudy)
    -#-------------------------------------------------
    -
    -#make redo twice ---------------------------------
    -if batchmode_geompy.myBuilder.GetAvailableRedos() == 0:
    -        raise RuntimeError, "GetAvailableRedos() = 0 but must not !"
    -batchmode_geompy.myBuilder.Redo()
    -batchmode_geompy.myBuilder.Redo()
    -res, A = batchmode_geompy.myBuilder.FindAttribute(batchmode_geompy.father, "AttributeSequenceOfInteger")
    -if res ==0 or A== None :
    -        raise  RuntimeError, "AttributeSequenceOfInteger is not found but must be!"
    -if A.Length() != 4:
    -        print "Wrong length of SequenceOfInteger"
    -if A.Value(1) != 100 or A.Value(2) != 300 or A.Value(3) != 400 or A.Value(4) != 500:
    -        raise  RuntimeError, "Wrong  value of  AttributeSequenceOfInteger"
    -
    -
    -#----------------------------------------------------------------------
    -openedStudy=batchmode_geompy.myStudyManager.Open(file1);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#     find AttributeSequenceOfInteger
    -#======================================
    -
    -res,A=father.FindAttribute("AttributeSequenceOfInteger")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeSequenceOfInteger"
    -
    -A = A._narrow(SALOMEDS.AttributeSequenceOfInteger)
    -
    -if A.Length() != 4:
    -        print "Wrong length of SequenceOfInteger"
    -if A.Value(1) != 100 or A.Value(2) != 300 or A.Value(3) != 400 or A.Value(4) != 500:
    -        print "Wrong  value of  AttributeSequenceOfInteger"
    -#----------------------------------------------------------------------
    -openedStudy=batchmode_geompy.myStudyManager.Open(file2);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#     find AttributeSequenceOfInteger
    -#======================================
    -
    -res,A=father.FindAttribute("AttributeSequenceOfInteger")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeSequenceOfInteger"
    -
    -A = A._narrow(SALOMEDS.AttributeSequenceOfInteger)
    -
    -if A.Length() != 5:
    -        print "Wrong length of SequenceOfInteger"
    -if A.Value(1) != 100 or A.Value(2) != 300 or A.Value(3) != 500 or A.Value(4) != 400 or  A.Value(5) != 700:
    -        raise  RuntimeError, "Wrong  value of  AttributeSequenceOfInteger after the first 'undo'!"
    -
    -#----------------------------------------------------------------------
    -openedStudy=batchmode_geompy.myStudyManager.Open(file3);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#     find AttributeSequenceOfInteger
    -#======================================
    -
    -res,A=father.FindAttribute("AttributeSequenceOfInteger")
    -
    -if res!=0 or A != None:
    -        raise RuntimeError, " AttributeSequenceOfInteger is found but must not!"
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example17.html b/doc/salome/tui/KERNEL/exemple/Example17.html deleted file mode 100755 index 458ba1e08..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example17.html +++ /dev/null @@ -1,162 +0,0 @@ - - - -Example - -
    #% Check  methods : %
    -SALOMEDS methods : RemoveAttribute, FindOrCreateAttribute, NewStudy, GetAllAttributes, NewCommand, CommitCommand, AbortCommand, NewComponent%
    -
    -batchmode_geompy.myBuilder._set_UndoLimit(20)
    -
    -batchmode_geompy.myBuilder.NewCommand() 
    -child = batchmode_geompy.myBuilder.NewObject(batchmode_geompy.father)
    -batchmode_geompy.myBuilder.CommitCommand()
    -
    -batchmode_geompy.myBuilder.NewCommand() 
    -#==========================================================
    -#       create AttributeSequenceOfReal      
    -#==========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child, "AttributeSequenceOfReal")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeSequenceOfReal attribute"
    -A = A._narrow(SALOMEDS.AttributeSequenceOfReal)
    -if A == None :
    -        raise  RuntimeError, "_narrow returns None instead of AttributeSequenceOfReal pointer"
    -
    -A.Add(0.0293)
    -A.Add(522)
    -A.Add(98234)
    -A.Add(83.287)
    -batchmode_geompy.myBuilder.CommitCommand()
    -
    -
    -batchmode_geompy.myBuilder.NewCommand() 
    -#==========================================================
    -#      create  AttributeInteger      
    -#==========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child, "AttributeInteger")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeInteger attribute"
    -A = A._narrow(SALOMEDS.AttributeInteger)
    -A.SetValue(1000000)
    -
    -if A.Value() != 1000000:
    -        raise  RuntimeError, "Error : wrong value of  AttributeInteger"
    -
    -batchmode_geompy.myBuilder.CommitCommand()
    -
    -batchmode_geompy.myBuilder.NewCommand() #===================
    -#              create AttributeName     
    -#===========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child, "AttributeName")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -A = A._narrow(SALOMEDS.AttributeName)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -A.SetValue("AttributesTesting")
    -
    -if A.Value() != "AttributesTesting":
    -        print "Wrong  value of AttributeName"        
    -
    -batchmode_geompy.myBuilder.CommitCommand()
    -
    -batchmode_geompy.myBuilder.NewCommand() #===================
    -#              create     AttributeComment 
    -#===========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child, "AttributeComment")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeComment attribute"
    -A = A._narrow(SALOMEDS.AttributeComment)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeComment attribute"
    -
    -A.SetValue("GEOM")
    -
    -batchmode_geompy.myBuilder.AbortCommand()
    -
    -batchmode_geompy.myBuilder.NewCommand() #===================
    -#             create   AttributePersistentRef   
    -#===========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child, "AttributePersistentRef")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributePersistentRef attribute"
    -A = A._narrow(SALOMEDS.AttributePersistentRef)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributePersistentRef attribute"
    -
    -A.SetValue("/tmp/test;1")
    -batchmode_geompy.myBuilder.CommitCommand()
    -
    -batchmode_geompy.myBuilder.NewCommand()  #===================================
    -#              create    AttributeDrawable  
    -#===========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child, "AttributeDrawable")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeDrawable attribute"
    -A = A._narrow(SALOMEDS.AttributeDrawable)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeDrawable attribute"
    -
    -A.SetDrawable(1)
    -
    -if A.IsDrawable() == 0:
    -        "Error: wrong value of AttributeDrawable"
    -batchmode_geompy.myBuilder.CommitCommand()
    -
    -
    -
    -batchmode_geompy.myBuilder.NewCommand() #===================
    -#              create    AttributeSelectable  
    -#===========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child, "AttributeSelectable")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeSelectable attribute"
    -A = A._narrow(SALOMEDS.AttributeSelectable)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeSelectable attribute"
    -
    -A.SetSelectable(1)
    -
    -if A.IsSelectable() == 0:
    -        "Error: wrong value of AttributeSelectable"
    -batchmode_geompy.myBuilder.CommitCommand()
    -
    -
    -batchmode_geompy.myBuilder.NewCommand() #===================
    -#===========================================================
    -batchmode_geompy.myBuilder.RemoveAttribute(child,"AttributeSelectable")
    -batchmode_geompy.myBuilder.CommitCommand()
    -
    -# Control the attributes 
    -#===========================================================
    -
    -res, A = batchmode_geompy.myBuilder.FindAttribute(child, "AttributeComment")
    -print "res = ", res
    -if A != None :
    -        print " AttributeComment was found"
    -else:
    -        print " AttributeComment is not found. It's correct"
    -
    -attributes=[]
    - 
    -attributes = child.GetAllAttributes()
    -
    -length = len(attributes)
    -
    -print "Attributes number = ", length
    -print attributes
    -for i in range(0, length) :
    -        attr = attributes[i]
    -        if attr is None :
    -                print i,"None item of object attributes list"
    -
    -if length != 5 :
    -        raise RuntimeError, "Wrong number of attributes"
    -
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example18.html b/doc/salome/tui/KERNEL/exemple/Example18.html deleted file mode 100755 index a6c00d67d..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example18.html +++ /dev/null @@ -1,171 +0,0 @@ - - - -Example - -
    #%AttributeTreeNode interface(creations/saving/restoring)%
    -#%SALOMEDS methods : FindOrCreateAttribute, NewObject%
    -#%Attribute methods : HasFirst, HasFather, SetPrevious, Next, InsertAfter, GetFather, HasNext, SetValue, Append, NewStudy, Label, IsRoot, Prepend, SetFather, Depth, HasPrevious%
    -
    -child1 = batchmode_geompy.myBuilder.NewObject(batchmode_geompy.father)
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child1,"AttributeName")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -A = A._narrow(SALOMEDS.AttributeName)
    -A.SetValue("N1")
    -N1 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child1, "AttributeTreeNode")
    -if N1 == None :
    -        raise  RuntimeError, "Can't create AttributeTreeNode attribute"
    -
    -child2 = batchmode_geompy.myBuilder.NewObject(batchmode_geompy.father)
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child2,"AttributeName")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -A = A._narrow(SALOMEDS.AttributeName)
    -A.SetValue("N2")
    -N2 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child2, "AttributeTreeNode")
    -if N2 == None :
    -        raise  RuntimeError, "Can't create AttributeTreeNode attribute"
    -
    -child3 = batchmode_geompy.myBuilder.NewObject(batchmode_geompy.father)
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child3,"AttributeName")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -A = A._narrow(SALOMEDS.AttributeName)
    -A.SetValue("N3")
    -N3 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child3, "AttributeTreeNode")
    -if N3 == None :
    -        raise  RuntimeError, "Can't create AttributeTreeNode attribute"
    -
    -
    -child11 = batchmode_geompy.myBuilder.NewObject(child1)
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child11,"AttributeName")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -A = A._narrow(SALOMEDS.AttributeName)
    -A.SetValue("N11")
    -
    -N11 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child11, "AttributeTreeNode")
    -
    -if N11 == None :
    -        raise  RuntimeError, "Can't create AttributeTreeNode attribute"
    -
    -child111 = batchmode_geompy.myBuilder.NewObject(child11)
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child111, "AttributeName")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -A = A._narrow(SALOMEDS.AttributeName)
    -A.SetValue("N111")
    -
    -N111 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child111, "AttributeTreeNode")
    -
    -if N111 == None :
    -        raise  RuntimeError, "Can't create AttributeTreeNode attribute"
    - 
    -
    -child31 = batchmode_geompy.myBuilder.NewObject(child3)
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child31,"AttributeName")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -A = A._narrow(SALOMEDS.AttributeName)
    -A.SetValue("N31")
    -
    -N31 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child31, "AttributeTreeNode")
    -if N31 == None :
    -        raise  RuntimeError, "Can't create AttributeTreeNode attribute"
    -
    -child32 = batchmode_geompy.myBuilder.NewObject(child3)
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child32,"AttributeName")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -A = A._narrow(SALOMEDS.AttributeName)
    -A.SetValue("N32")
    -
    -N32 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child32, "AttributeTreeNode")
    -if N32 == None :
    -        raise  RuntimeError, "Can't create AttributeTreeNode attribute"
    -
    -child321 = batchmode_geompy.myBuilder.NewObject(child32)
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child321,"AttributeName")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -A = A._narrow(SALOMEDS.AttributeName)
    -A.SetValue("N321")
    -
    -N321 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child321, "AttributeTreeNode")
    -if N321 == None :
    -        raise  RuntimeError, "Can't create AttributeTreeNode attribute"
    -
    -child33 = batchmode_geompy.myBuilder.NewObject(child3)
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child33,"AttributeName")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -A = A._narrow(SALOMEDS.AttributeName)
    -A.SetValue("N33")
    -
    -N33 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child33, "AttributeTreeNode")
    -if N33 == None :
    -        raise  RuntimeError, "Can't create AttributeTreeNode attribute"
    -
    -child34 = batchmode_geompy.myBuilder.NewObject(child3)
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child34,"AttributeName")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -A = A._narrow(SALOMEDS.AttributeName)
    -A.SetValue("N34")
    -
    -N34 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child34, "AttributeTreeNode")
    -if N34 == None :
    -        raise  RuntimeError, "Can't create AttributeTreeNode attribute"
    -
    -
    -
    -#Create links between tree nodes.
    -#  -| root
    -#   --N1 __
    -#   |     N11__
    -#   |           N111
    -#   --N2           
    -#   |   
    -#   --N3__
    -#         N31
    -#         N32__
    -#              N321
    -#         N33
    -#         N34
    -        
    -N11.SetFather(N1)
    -N11.Append(N111)
    -N3.SetPrevious(N1)
    -N3.Prepend(N2)
    -
    -N32.SetFather(N3)
    -N32.Prepend(N31)
    -N33.InsertAfter(N32)
    -N33.Append(N34)
    -print "-------------  ", N1, "  -------------  "
    -print "N1.Label() = ", N1.Label() , "IsRoot() = ", N1.IsRoot(), "Depth() = ", N1.Depth()
    -print "N11.Label() = ", N11.Label() , "IsRoot() = ", N11.IsRoot(), "Depth() = ", N11.Depth()
    -print "N111.Label() = ", N111.Label() , "IsRoot() = ", N111.IsRoot(), "Depth() = ", N111.Depth()
    -print "N2.Label() = ", N2.Label() , "IsRoot() = ",  N2.IsRoot(), "Depth() = ", N2.Depth()
    -print "N3.Label() = ", N3.Label() , "IsRoot() = ", N3.IsRoot(), "Depth() = ", N3.Depth()
    -print "N31.Label() = ", N31.Label() , "IsRoot() = ", N31.IsRoot(), "Depth() = ", N31.Depth()
    -print "N32.Label() = ", N32.Label() , "IsRoot() = ", N32.IsRoot(), "Depth() = ", N32.Depth()
    -print "N321.Label() = ", N321.Label() , "IsRoot() = ", N321.IsRoot(), "Depth() = ", N321.Depth()
    -print "N33.Label() = ", N33.Label() , "IsRoot() = ", N33.IsRoot(), "Depth() = ", N33.Depth()
    -print "N34.Label() = ", N34.Label() , "IsRoot() = ", N34.IsRoot(), "Depth() = ", N34.Depth()
    -print "N1.IsRoot()=", N1.IsRoot()
    -
    -print "N1.HasNext() = ",N1.HasNext()
    -if  N1.HasNext():
    -        print N1.Next().Label()
    -
    -print "N32.HasPrevious() = ",N32.HasPrevious()
    -if  N32.HasPrevious():
    -        print N32.GetPrevious().Label()
    -
    -print "N111.HasFirst()=",N111.HasFirst()
    -print "N111.HasFather()=",N111.HasFather()
    -if N111.HasFather() :
    -        print "N111.GetFather().Label()=",N111.GetFather().Label()
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example19.html b/doc/salome/tui/KERNEL/exemple/Example19.html deleted file mode 100755 index 4c5c2902b..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example19.html +++ /dev/null @@ -1,547 +0,0 @@ - - - -Exemple - -
    -#^ SALOMEDS methods :  FindOrCreateAttribute, Save, SaveAs, Close, Open, FindComponent, FindAttribute, FindObject, LoadWith^
    -#^ Attribute methods : Value, SetValue^
    -#======================================================================
    -#1. Create Study and add some components to it
    -#======================================================================
    -
    -#=================================
    -#       create AttributeReal      
    -#=================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeReal")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeReal attribute"
    -A = A._narrow(SALOMEDS.AttributeReal)
    -A.SetValue(0.0001)
    -if A.Value() != 0.0001:
    -        raise  RuntimeError, "Error : wrong value of  AttributeReal"
    -
    -# ===  Geometry  ==================================================
    -
    -import batchmode_geompy
    - 
    -#===================================
    -#     define a box
    -#===================================
    -
    -box = batchmode_geompy.MakeBox(0., 0., 0., 100., 200., 300.)
    -idbox = batchmode_geompy.addToStudy(box,"box")
    -
    -
    -geom = batchmode_geompy.geom
    -import SMESH
    -import batchmode_smesh
    -ShapeType = batchmode_smesh.ShapeType
    -
    -# ---- add first face of box in study
    -
    -subShapeList = batchmode_geompy.SubShapeAll(box,ShapeType["Face"])
    -face=subShapeList[0]
    -name = "box_face"
    -print name
    -idface= batchmode_geompy.addToStudyInFather(box,face,name)
    -
    -# ---- add shell from box  in study
    -
    -subShellList= batchmode_geompy.SubShapeAll(box,ShapeType["Shell"])
    -shell = subShellList[0]
    -name = "box_shell"
    -print name
    -idshell= batchmode_geompy.addToStudyInFather(box,shell,name)
    -
    -# ---- add first edge of face in study
    -
    -edgeList =  batchmode_geompy.SubShapeAll(face,ShapeType["Edge"])
    -edge=edgeList[0];
    -name = "face_edge"
    -print name
    -idedge= batchmode_geompy.addToStudyInFather(face,edge,name)
    -
    -# ---- launch SMESH, init a Mesh with the box
    -
    -smesh =  batchmode_smesh.smesh
    -#  --  Init  --
    -shape = batchmode_geompy.IDToObject(idbox)
    -mesh=smesh.Init(geom, batchmode_geompy.myStudyId, shape)
    -
    -orb = batchmode_geompy.orb
    -
    -idmesh = batchmode_smesh.AddNewMesh( orb.object_to_string(mesh) )
    -batchmode_smesh.SetName(idmesh, "Meshbox");
    -batchmode_smesh.SetShape(idbox, idmesh);
    -
    -# ---- create Hypothesis
    -
    -print "-------------------------- create Hypothesis ----------------------"
    -print "-------------------------- LocalLength"
    -hyp1 = smesh.CreateHypothesis("LocalLength", batchmode_geompy.myStudyId )
    -hypLen1 = hyp1._narrow(SMESH.SMESH_LocalLength)
    -hypLen1.SetLength(100)
    -print hypLen1.GetName()
    -print hypLen1.GetId()
    -print hypLen1.GetLength()
    -
    -idlength = batchmode_smesh.AddNewHypothesis( orb.object_to_string(hypLen1) );
    -batchmode_smesh.SetName(idlength, "Local_Length_100");
    -
    -print "-------------------------- NumberOfSegments"
    -hyp2 =  smesh.CreateHypothesis("NumberOfSegments", batchmode_geompy.myStudyId )
    -hypNbSeg1=hyp2._narrow(SMESH.SMESH_NumberOfSegments)
    -hypNbSeg1.SetNumberOfSegments(7)
    -print hypNbSeg1.GetName()
    -print hypNbSeg1.GetId()
    -print hypNbSeg1.GetNumberOfSegments()
    -
    -idseg =  batchmode_smesh.AddNewHypothesis( orb.object_to_string(hypNbSeg1) );
    -batchmode_smesh.SetName(idseg, "NumberOfSegments_7");
    -
    -print "-------------------------- MaxElementArea"
    -hyp3 = smesh.CreateHypothesis("MaxElementArea",  batchmode_geompy.myStudyId)
    -hypArea1=hyp3._narrow(SMESH.SMESH_MaxElementArea)
    -hypArea1.SetMaxElementArea(2500)
    -print hypArea1.GetName()
    -print hypArea1.GetId()
    -print hypArea1.GetMaxElementArea()
    -
    -idarea1 = batchmode_smesh.AddNewHypothesis( orb.object_to_string(hypArea1) );
    -batchmode_smesh.SetName(idarea1, "MaxElementArea_2500");
    -
    -print "-------------------------- MaxElementArea"
    -hyp3 = smesh.CreateHypothesis("MaxElementArea",  batchmode_geompy.myStudyId)
    -hypArea2 = hyp3._narrow(SMESH.SMESH_MaxElementArea)
    -hypArea2.SetMaxElementArea(500)
    -print hypArea2.GetName()
    -print hypArea2.GetId()
    -print hypArea2.GetMaxElementArea()
    -
    -idarea2 = batchmode_smesh.AddNewHypothesis( orb.object_to_string(hypArea2) );
    -batchmode_smesh.SetName(idarea2, "MaxElementArea_500");
    -
    -print "-------------------------- Regular_1D"
    -alg1 = smesh.CreateHypothesis("Regular_1D",  batchmode_geompy.myStudyId)
    -algo1 = alg1._narrow(SMESH.SMESH_Algo)
    -listHyp = algo1.GetCompatibleHypothesis()
    -for hyp in listHyp:
    -    print hyp
    -algoReg=alg1._narrow(SMESH.SMESH_Regular_1D)
    -print algoReg.GetName()
    -print algoReg.GetId()
    -
    -idreg = batchmode_smesh.AddNewAlgorithms( orb.object_to_string(algoReg) );
    -batchmode_smesh.SetName(idreg, "Regular_1D");
    -
    -print "-------------------------- MEFISTO_2D"
    -alg2 = smesh.CreateHypothesis("MEFISTO_2D",  batchmode_geompy.myStudyId)
    -algo2 = alg2._narrow(SMESH.SMESH_Algo)
    -listHyp=algo2.GetCompatibleHypothesis()
    -for hyp in listHyp:
    -    print hyp
    -algoMef=alg2._narrow(SMESH.SMESH_MEFISTO_2D)
    -print algoMef.GetName()
    -print algoMef.GetId()
    -
    -idmef = batchmode_smesh.AddNewAlgorithms( orb.object_to_string(algoMef) );
    -batchmode_smesh.SetName(idmef, "MEFISTO_2D");
    -
    -
    -# ---- add hypothesis to edge
    -
    -print "-------------------------- add hypothesis to edge"
    -edge = batchmode_geompy.IDToObject(idedge)
    -submesh = mesh.GetElementsOnShape(edge)
    -ret = mesh.AddHypothesis(edge,algoReg)
    -print ret
    -ret=mesh.AddHypothesis(edge,hypLen1)
    -print ret
    -
    -idsm1 = batchmode_smesh.AddSubMeshOnShape( idmesh,
    -                                           idedge,
    -                                           orb.object_to_string(submesh),
    -                                           ShapeType["Edge"] )
    -batchmode_smesh.SetName(idsm1, "SubMeshEdge")
    -batchmode_smesh.SetAlgorithms( idsm1, idreg );
    -batchmode_smesh.SetHypothesis( idsm1, idlength );
    -
    -print "-------------------------- add hypothesis to face"
    -face=batchmode_geompy.IDToObject(idface)
    -submesh=mesh.GetElementsOnShape(face)
    -ret=mesh.AddHypothesis(face,hypArea2)
    -print ret
    -
    -idsm2 = batchmode_smesh.AddSubMeshOnShape( idmesh,
    -                                    idface,
    -                                    orb.object_to_string(submesh),
    -                                    ShapeType["Face"] )
    -batchmode_smesh.SetName(idsm2, "SubMeshFace")
    -batchmode_smesh.SetHypothesis( idsm2, idarea2 );
    -
    -# ---- add hypothesis to box
    -
    -print "-------------------------- add hypothesis to box"
    -box=batchmode_geompy.IDToObject(idbox)
    -submesh=mesh.GetElementsOnShape(box)
    -ret=mesh.AddHypothesis(box,algoReg)
    -print ret
    -ret=mesh.AddHypothesis(box,hypNbSeg1)
    -print ret
    -ret=mesh.AddHypothesis(box,algoMef)
    -print ret
    -ret=mesh.AddHypothesis(box,hypArea1)
    -print ret
    -
    -batchmode_smesh.SetAlgorithms( idmesh, idreg );
    -batchmode_smesh.SetHypothesis( idmesh, idseg );
    -batchmode_smesh.SetAlgorithms( idmesh, idmef );
    -batchmode_smesh.SetHypothesis( idmesh, idarea1 );
    -
    -# ---- compute box
    -
    -print "-------------------------- compute box"
    -ret=smesh.Compute(mesh,box)
    -print ret
    -log=mesh.GetLog(0); # no erase trace
    -for linelog in log:
    -    print linelog
    -
    -
    -#=======================================================
    -#    add  SuperVision component
    -#=======================================================
    -
    -from batchmode_SuperV import *
    -import os
    -dir= os.getenv("SUPERV_ROOT_DIR")
    -if dir == None:
    -        raise RuntimeError, "SUPERV_ROOT_DIR is not defined"
    -xmlfile = dir +"/examples/GraphEssai.xml"
    -print "--------------\n"+xmlfile+"\n--------------\n"
    -
    -myGraph = Graph ( xmlfile )
    -
    -# This DataFlow is "valid" : no loop, correct links between Nodes etc...
    -print myGraph.IsValid()
    -
    -# Get Nodes
    -myGraph.PrintNodes()
    -Add,Sub,Mul,Div = myGraph.Nodes()
    -
    -# Load Datas
    -Addx = Add.Input("x",3.)
    -Addy = Add.Input("y",4.5)
    -Subx = Sub.Input("x",1.5)
    -
    -# Get Output Port
    -Addz = Add.Port('z')
    -Subz = Sub.Port('z')
    -Mulz = Mul.Port('z')
    -Divz = Div.Port('z')
    -
    -# This DataFlow is "executable" : all pending Ports are defined with Datas
    -print myGraph.IsExecutable()
    -
    -# Starts only execution of that DataFlow and gets control immediatly
    -print myGraph.Run()
    -
    -# That DataFlow is running ==> 0 (false)
    -print myGraph.IsDone()
    -
    -# Events of execution :
    -aStatus,aNode,anEvent,aState = myGraph.Event()
    -while aStatus :
    -    print aNode.Thread(),aNode.SubGraph(),aNode.Name(),anEvent,aState
    -    aStatus,aNode,anEvent,aState = myGraph.Event()
    -print myGraph.IsDone()
    -
    -# Wait for Completion (but it is already done after event loop ...)
    -print "Done : ",myGraph.DoneW()
    -
    -# Get result
    -print "Result : ",Divz.ToString()
    -
    -# Intermediate results :
    -print "Intermediate Result Add\z : ",Addz.ToString()
    -print "Intermediate Result Sub\z : ",Subz.ToString()
    -print "Intermediate Result Mul\z : ",Mulz.ToString()
    -
    -print " "
    -#print "Type : print myGraph.IsDone()"
    -#print "       If execution is finished ==> 1 (true)"
    -res=myGraph.IsDone()
    -if res != 1:
    -        raise RuntimeError, "myGraph.Run() is not done"
    -
    -print " "
    -print "Type : print Divz.ToString()"
    -print "       You will get the result"
    -Divz.ToString()
    -
    -print " "
    -print "Type : myGraph.PrintPorts()"
    -print "       to see input and output values of the graph"
    -myGraph.PrintPorts()
    -
    -print " "
    -print "Type : Add.PrintPorts()"
    -Add.PrintPorts()
    -
    -print "Type : Sub.PrintPorts()"
    -Sub.PrintPorts()
    -
    -print "Type : Mul.PrintPorts()"
    -Mul.PrintPorts()
    -
    -print "Type : Div.PrintPorts()"
    -print "       to see input and output values of nodes"
    -Div.PrintPorts()
    -
    -# Export will create newsupervisionexample.xml and the corresponding .py file
    -tmpdir=os.getenv("TmpDir")
    -if tmpdir is None:
    -        tmpdir="/tmp"
    -file = tmpdir + "/newsupervisionexample"
    -print "--------------\n"+file+"\n--------------\n"
    -myGraph.Export(file)
    -
    -ior = batchmode_geompy.orb.object_to_string(myGraph.G)
    -addStudy(ior)
    -
    -GraphName = myGraph.Name()
    -print "Befor save ",
    -nodes = myGraph.Nodes()
    -length_bs = len(nodes)
    -print "ListOfNodes length = ", length_bs
    -names=[]
    -for node in nodes:
    -        names.append(node.Name())
    -print names
    -
    -
    -#=================================
    -#      save / restore study      
    -#=================================
    -str= os.getenv("TmpDir")
    -if str == None:  
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -
    -#==================================================
    -#1. SaveAs
    -#==================================================
    -print " -------  We will save to", file, "-----------"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -batchmode_geompy.myStudyManager.Close(batchmode_geompy.myStudy)
    -
    -#rename the file and try to reread it again
    -
    -os.mkdir(str + "/test_dir")
    -
    -#2.==================================================
    -print " ------- We rename the file as " + str + "/test_dir/test_new.hdf"
    -os.rename(file, str+"/test_dir/test_new.hdf")
    -
    -#==================================================
    -#3. Open
    -#==================================================
    -print " ------- We try to open " + str + "/test_dir/test_new.hdf"
    -
    -try:
    -        openedStudy=batchmode_geompy.myStudyManager.Open(str+"/test_dir/test_new.hdf")
    -except Exception:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "GEOM component is not found!  Wrong study is opened." 
    -
    -
    -#=================================
    -#     find AttributeReal
    -#=================================
    -
    -res,A=father.FindAttribute("AttributeReal")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeReal"
    -
    -A = A._narrow(SALOMEDS.AttributeReal)
    -if A.Value() != 0.0001:
    -        raise  RuntimeError, "Error : wrong value of  AttributeReal"
    -
    -#==================================================
    -#     find  box
    -#==================================================
    -box = openedStudy.FindObject("box")
    -if box is None :
    -        raise  RuntimeError, "box was not found! Wrong study is opened."
    -
    -edge=openedStudy.FindObject("face_edge")
    -if edge is None :
    -        raise  RuntimeError, "face_edge was not found! Wrong study is opened."
    -
    -
    -father = openedStudy.FindComponent("MESH")
    -if father is None:
    -         raise  RuntimeError, "MESH component is not found!  Wrong study is opened." 
    -
    -hp=openedStudy.FindObject("Meshbox")
    -if hp is None:
    -        raise  RuntimeError, "Meshbox object was not found! Wrong study is opened."
    -
    -hp = openedStudy.FindObject("Algorithms Definition")
    -if hp is None:
    -        raise  RuntimeError, "Algorithms Definition object was not found! Wrong study is opened."
    -
    -hp = openedStudy.FindObject("MEFISTO_2D")
    -if hp is None:
    -        raise  RuntimeError, "MEFISTO_2D object was not found! Wrong study is opened."
    -
    -hp = openedStudy.FindObject("Hypothesis Definition")
    -if hp is None:
    -        raise  RuntimeError, "Algoriths Definition was not found! Wrong study is opened."
    -
    -#==================================================
    -# Find Supervisor
    -#==================================================
    -father = openedStudy.FindComponent("SUPERV")
    -if father is None: 
    -         raise  RuntimeError, "SUPERV component is not found!  Wrong study is opened." 
    -
    -SuperV = lcc.FindOrLoadComponent("SuperVisionContainer","Supervision")
    -Builder = openedStudy.NewBuilder()
    -Builder.LoadWith(father, SuperV)
    -import SALOMEDS
    -
    -aChildIterator = openedStudy.NewChildIterator(father)
    -
    -#while aChildIterator.More():
    -anSObject = aChildIterator.Value()
    -#print "iterate: ", anSObject.GetID()
    -res, anAttr=anSObject.FindAttribute("AttributeIOR")
    -if res :
    -        anAttr=anAttr._narrow(SALOMEDS.AttributeIOR)
    -        ior = anAttr.Value()
    -        Graph=SuperV.getGraph(ior)
    -        ListOfNodes=Graph.Nodes()
    -        length_as= len(ListOfNodes)
    -        print "ListOfNodes length = ", length_as
    -        if length_as != length_bs:
    -                raise RuntimeErrror, "defferent length of nodes after study open"
    -#aChildIterator.Next()
    -
    -Names = []
    -for node in ListOfNodes:
    -        Names.append(node.Name())
    -names.sort()
    -Names.sort()
    -if names != Names :
    -        raise RuntimeError, "List of dataflow nodes after save differs from one befor save operation"
    -
    -#==================================================
    -#4. Save
    -#==================================================
    -batchmode_geompy.myStudyManager.Save(openedStudy)
    -batchmode_geompy.myStudyManager.Close(openedStudy)
    -#==================================================
    -#5. Open
    -#==================================================
    -try:
    -        openedStudy = batchmode_geompy.myStudyManager.Open(str+"/test_dir/test_new.hdf")
    -except Exception:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#find AttributeReal
    -res,A=father.FindAttribute("AttributeReal")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeReal"
    -
    -A = A._narrow(SALOMEDS.AttributeReal)
    -if A.Value() != 0.0001:
    -        raise  RuntimeError, "Error : wrong value of  AttributeReal"
    -#==================================================
    -#     find  box
    -#==================================================
    -box = openedStudy.FindObject("box")
    -if box is None :
    -        raise  RuntimeError, "box was not found! Wrong study is opened."
    -
    -edge=openedStudy.FindObject("face_edge")
    -if edge is None :
    -        raise  RuntimeError, "face_edge was not found! Wrong study is opened."
    -
    -
    -father = openedStudy.FindComponent("MESH")
    -if father is None:
    -         raise  RuntimeError, "MESH component is not found!  Wrong study is opened." 
    -
    -hp=openedStudy.FindObject("Meshbox")
    -if hp is None:
    -        raise  RuntimeError, "Meshbox object was not found! Wrong study is opened."
    -
    -hp = openedStudy.FindObject("Algorithms Definition")
    -if hp is None:
    -        raise  RuntimeError, "Algorithms Definition object was not found! Wrong study is opened."
    -
    -hp = openedStudy.FindObject("MEFISTO_2D")
    -if hp is None:
    -        raise  RuntimeError, "MEFISTO_2D object was not found! Wrong study is opened."
    -
    -hp = openedStudy.FindObject("Hypothesis Definition")
    -if hp is None:
    -        raise  RuntimeError, "Algoriths Definition was not found! Wrong study is opened."
    -
    -#==================================================
    -# Find Supervisor
    -#==================================================
    -father = openedStudy.FindComponent("SUPERV")
    -if father is None:
    -         raise  RuntimeError, "SUPERV component is not found!  Wrong study is opened." 
    -
    -SuperV = lcc.FindOrLoadComponent("SuperVisionContainer","Supervision")
    -Builder = openedStudy.NewBuilder()
    -Builder.LoadWith(father, SuperV)
    -import SALOMEDS
    -
    -aChildIterator = openedStudy.NewChildIterator(father)
    -
    -#while aChildIterator.More():
    -anSObject = aChildIterator.Value()
    -
    -res, anAttr=anSObject.FindAttribute("AttributeIOR")
    -if res :
    -        anAttr=anAttr._narrow(SALOMEDS.AttributeIOR)
    -        ior = anAttr.Value()
    -        Graph=SuperV.getGraph(ior)
    -        ListOfNodes=Graph.Nodes()
    -        length_as= len(ListOfNodes)
    -        print "ListOfNodes length = ", length_as
    -        if length_as != length_bs:
    -                raise RuntimeErrror, "defferent length of nodes after study open"
    -#aChildIterator.Next()
    -
    -Names = []
    -for node in ListOfNodes:
    -        Names.append(node.Name())
    -names.sort()
    -Names.sort()
    -if names != Names :
    -        raise RuntimeError, "List of dataflow nodes after save differs from one befor save operation"
    -
    diff --git a/doc/salome/tui/KERNEL/exemple/Example2.html b/doc/salome/tui/KERNEL/exemple/Example2.html deleted file mode 100755 index 16361364f..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example2.html +++ /dev/null @@ -1,46 +0,0 @@ - - - -Example - -
    #%AttributeInteger interface(creation/saving/restoring)%
    -#%Methods : FindOrCreateAttribute , Value, SaveAs, SetValue, FindComponent, FindAttribute, Open%
    -
    -#      create  AttributeInteger      
    -#=================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeInteger")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeInteger attribute"
    -A = A._narrow(SALOMEDS.AttributeInteger)
    -A.SetValue(1000000)
    -
    -if A.Value() != 1000000:
    -        raise  RuntimeError, "Error : wrong value of  AttributeInteger"
    -
    -#   save and restore the study
    -#=================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -# ... save ...
    -batchmode_geompy.myStudyManager.SaveAs(str+"/test.hdf", batchmode_geompy.myStudy)
    -# ... open ...
    -openedStudy= batchmode_geompy.myStudyManager.Open(str+"/test.hdf");
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -#     find AttributeInteger
    -#================================
    -res,A=father.FindAttribute("AttributeInteger")
    -if res == 0  or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeInteger"
    -A = A._narrow(SALOMEDS.AttributeInteger)
    -if A.Value() != 1000000:
    -        raise  RuntimeError, "Error : wrong value of  AttributeInteger after study restoring"
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example20.html b/doc/salome/tui/KERNEL/exemple/Example20.html deleted file mode 100755 index 3019ad80e..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example20.html +++ /dev/null @@ -1,160 +0,0 @@ - - - -Exemple - -
    -#^SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, NewCommand, GetProperties, Open, CommitCommand, NewBuilder^
    -#^Attribute methods : SetLocked, IsLocked, GetCreationMode, SetCreationDate, IsModified, GetUserName, Value, SetUserName, SetValue, GetCreationDate^
    -
    -batchmode_geompy.myBuilder._set_UndoLimit(20)
    -
    -#--------------------------------------------------------------------------
    -#       create AttributeReal      
    -#===============================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeReal")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeReal attribute"
    -A = A._narrow(SALOMEDS.AttributeReal)
    -A.SetValue(0.0001)
    -if A.Value() != 0.0001:
    -        raise  RuntimeError, "Error : wrong value of  AttributeReal"
    -
    -#      create AttributeStudyProperties
    -#================================================
    -A = batchmode_geompy.myStudy.GetProperties()
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeStudyProperties attribute"
    -A = A._narrow(SALOMEDS.AttributeStudyProperties)
    -
    -batchmode_geompy.myBuilder.NewCommand();
    -print "A.GetUserName()= ", A.GetUserName()
    -res,mm,hh,dd,mnth,yy=A.GetCreationDate()
    -print "A.GetCreationDate() = ", mm,hh,dd,mnth,yy
    -print "A.GetCreationMode() = ", A.GetCreationMode()
    -print "A.IsModified() = ", A.IsModified()
    -print "A.IsLocked() = ", A.IsLocked()
    -if A.IsLocked() == 0 :
    -        A.SetUserName("tester"); print 'A.SetUserName("tester"), A.GetUserName() = ', A.GetUserName()
    -        A.SetCreationDate(11,11,11,11,2002); print 'A.SetCreationDate(11,11,11,11,2002), A.GetCreationDate() =', A.GetCreationDate()
    -        print "A.IsModified() = ", A.IsModified()
    -A.SetLocked(1)
    -
    -#check the transaction result 
    -batchmode_geompy.myBuilder.CommitCommand()
    -if A.GetUserName() != "tester":
    -        print 'Control after transaction close : A.GetUserName() = ', A.GetUserName()
    -        raise RuntimeError, "Field 'UserName' was not modified but had to!"
    -
    -# try to make some changes wrapped by transaction 
    -#================================================
    -batchmode_geompy.myBuilder.NewCommand()
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeInteger")
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeInteger attribute"
    -A = A._narrow(SALOMEDS.AttributeInteger)
    -A.SetValue(1000000)
    -
    -exception_was = None
    -try : batchmode_geompy.myBuilder.CommitCommand()
    -except Exception: exception_was = 1
    -
    -if exception_was is None:
    -        raise RuntimeError, "Study was locked for changes but CommitCommand did not generate an exception !"
    -
    -#      save / restore study      
    -
    -#================================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -print " -------  We will save to", file, "-----------"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -
    -
    -#--------------------------------------------------------------------------#
    -#--------------------------- Open file ------------------------------------# 
    -#--------------------------------------------------------------------------#
    -
    -print" -------------- Open  " + file + "-------------- " 
    -
    -openedStudy = batchmode_geompy.myStudyManager.Open(file)
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#1.     find AttributeReal
    -#================================================
    -
    -res,A=father.FindAttribute("AttributeReal")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeReal"
    -
    -A = A._narrow(SALOMEDS.AttributeReal)
    -if A.Value() != 0.0001:
    -        raise  RuntimeError, "Error : wrong value of  AttributeReal"
    - 
    -
    -#2.     find AttributeStudyProperties
    -#=================================================
    -A=openedStudy.GetProperties()
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeStudyProperties"
    -
    -A = A._narrow(SALOMEDS.AttributeStudyProperties)
    -if A.IsLocked() == 0 :
    -        raise  RuntimeError, "Error : AttributeStudyProperties must have Locked flag but have no!"
    -
    -#get the builder
    -myBuilder = openedStudy.NewBuilder()
    -
    -#3. try to make some changes wrapped by transaction 
    -#==================================================
    -exception_was = None
    -try : 
    -        myBuilder.NewCommand()
    -        A = myBuilder.FindOrCreateAttribute(father, "AttributeInteger")
    -
    -        if A == None :
    -                raise  RuntimeError, "Can't create AttributeInteger attribute"
    -        A = A._narrow(SALOMEDS.AttributeInteger)
    -        A.SetValue(1000000)
    -        myBuilder.CommitCommand()
    -except Exception: exception_was = 1
    -
    -if exception_was is None:
    -        raise RuntimeError, "Study was locked for changes but CommitCommand did not generate an exception !"
    -
    -
    -myBuilder.NewCommand()
    -A=openedStudy.GetProperties()
    -A = A._narrow(SALOMEDS.AttributeStudyProperties)
    -A.SetLocked(0)
    -myBuilder.CommitCommand()
    -
    -#4.
    -myBuilder.NewCommand()
    -A.SetLocked(0);
    -print "A.GetUserName()= ", A.GetUserName()
    -print "A.GetCreationDate() = ", A.GetCreationDate()
    -print "A.GetCreationMode() = ", A.GetCreationMode()
    -print "A.IsModified() = ", A.IsModified()
    -myBuilder.CommitCommand()
    -
    -#5.
    -myBuilder.NewCommand()
    -A.SetUserName("tester1")
    -myBuilder.CommitCommand()
    -print "A.GetUserName()= ", A.GetUserName()
    -
    -#remove the document file
    -os.remove(file)
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example21.html b/doc/salome/tui/KERNEL/exemple/Example21.html deleted file mode 100755 index 981e9d7ff..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example21.html +++ /dev/null @@ -1,136 +0,0 @@ - - - -Exemple - -
    -#^SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open^
    -#^Attribute methods: GetValue, GetNbColumns, AddColumn, SetRowTitles, PutValue, GetColumn, GetColumnTitles, GetTitle, SetRow, GetRowTitles, SetColumnTitles, SetColumn, GetRow, GetNbRows, SetColumnTitle, AddRow, SetTitle, SetRowTitle^
    -
    -#       create AttributeReal      
    -#=======================================================================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeTableOfInteger")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeTableOfInteger attribute"
    -A = A._narrow(SALOMEDS.AttributeTableOfInteger)
    -a=[1,2]
    -
    -b=[3,4]
    -
    -#    2x2
    -# --- rows ---
    -A.AddRow(a)
    -A.AddRow(b)
    -a=[34,14]
    -A.SetRow(1,a)
    -
    -#    3x3
    -#
    -b=[54,56]
    -A.AddRow(b)
    -
    -# --- columns ---
    -a=[76,25,12]
    -
    -A.AddColumn(a)
    -a=[836,3425,342]
    -A.SetColumn(3,a)
    -
    -# change attribute values
    -print "A.GetValue(2,2) = ", A.GetValue(2,2)
    -print "A.PutValue(2,2,625323)"
    -A.PutValue(625323,2,2)
    -print "A.GetValue(2,2) = ", A.GetValue(2,2)
    -
    -#set Titles
    -
    -A.SetTitle("TEST")
    -
    -A.SetRowTitle(1,"FR")
    -A.SetRowTitle(2,"SR")
    -A.SetRowTitle(3,"TR")
    -
    -A.SetColumnTitle(1,"FC")
    -A.SetColumnTitle(2,"SC")
    -A.SetColumnTitle(3,"TC")
    -
    -
    -#check the table
    -print "Common title : ",A.GetTitle()
    -print "Rows titles : ",  A.GetRowTitles()
    -rnb = A.GetNbRows()
    -for i in range(1, rnb):
    -        b=A.GetRow(i)
    -        print b
    -
    -cnb = A.GetNbColumns()
    -print "Columns title : ", A.GetColumnTitles()
    -for i in range(1, cnb):
    -        b=A.GetColumn(i)
    -        print b
    -
    -# set titles
    -#titles=["11","12","13"]
    -#A.SetRowTitles(titles)
    -#titles=["21","22","23"]
    -#A.SetRowTitles(2,titles)
    -#titles=["31","32","33"]
    -#A.SetRowTitles(3,titles)
    -
    -#--------------------------------------------------------------------------#
    -# ----------------------- save the study ----------------------------------#
    -#--------------------------------------------------------------------------#
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -print " -------  We will save to", file, "-----------"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -
    -#--------------------------------------------------------------------------#
    -#---------------------------- Open file -----------------------------------# 
    -#--------------------------------------------------------------------------#
    -
    -print" -------------- Open  " + file + "-------------- " 
    -
    -openedStudy=batchmode_geompy.myStudyManager.Open(file)
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -# --- check attribute ---
    -
    -res,A=father.FindAttribute("AttributeTableOfInteger")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeTableOfInteger"
    -
    -A = A._narrow(SALOMEDS.AttributeTableOfInteger)
    -
    -#check the table
    -print "Common title : ",A.GetTitle()
    -print "Rows titles : ",  A.GetRowTitles()
    -rnb = A.GetNbRows()
    -for i in range(1, rnb):
    -        b=A.GetRow(i)
    -        print b
    -
    -cnb = A.GetNbColumns()
    -print "Columns title : ", A.GetColumnTitles()
    -for i in range(1, cnb):
    -        b=A.GetColumn(i)
    -        print b
    -
    -titles=["ff","ss","tt"]
    -A.SetRowTitles(titles)
    -print "Rows titles : ",  A.GetRowTitles()
    -
    -titles=["ww","zz","cc"]
    -A.SetColumnTitles(titles)
    -print "Column titles : ",  A.GetColumnTitles()
    -
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example22.html b/doc/salome/tui/KERNEL/exemple/Example22.html deleted file mode 100755 index f6a3f6e3b..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example22.html +++ /dev/null @@ -1,137 +0,0 @@ - - - -Exemple - -
    -#^ SALOMEDS methods  : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open^
    -#^ Attribute methods : GetValue, GetNbColumns, AddColumn, SetRowTitles, PutValue,  GetColumn,  GetColumnTitles, GetTitle, SetRow, GetRowTitles, SetColumnTitles,  SetColumn,  GetRow,  GetNbRows, SetColumnTitle, AddRow, SetTitle, SetRowTitle^
    -
    -#       create AttributeReal      
    -#===============================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeTableOfReal")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeTableOfReal attribute"
    -A = A._narrow(SALOMEDS.AttributeTableOfReal)
    -a=[1,2]
    -
    -b=[3,4]
    -
    -#    2x2
    -# --- rows ---
    -A.AddRow(a)
    -A.AddRow(b)
    -a=[34,14]
    -A.SetRow(1,a)
    -
    -#    3x3
    -#
    -b=[54,56]
    -A.AddRow(b)
    -
    -# --- columns ---
    -a=[76,25,12]
    -
    -A.AddColumn(a)
    -a=[836,3425,342]
    -A.SetColumn(3,a)
    -
    -# change attribute values
    -print "A.GetValue(2,2) = ", A.GetValue(2,2)
    -print "A.PutValue(2,2,625323)"
    -A.PutValue(625323,2,2)
    -print "A.GetValue(2,2) = ", A.GetValue(2,2)
    -
    -#set Titles
    -
    -A.SetTitle("TEST")
    -
    -A.SetRowTitle(1,"FR")
    -A.SetRowTitle(2,"SR")
    -A.SetRowTitle(3,"TR")
    -
    -A.SetColumnTitle(1,"FC")
    -A.SetColumnTitle(2,"SC")
    -A.SetColumnTitle(3,"TC")
    -
    -
    -#check the table
    -print "Common title : ",A.GetTitle()
    -print "Rows titles : ",  A.GetRowTitles()
    -rnb = A.GetNbRows() + 1
    -for i in range(1, rnb):
    -        b=A.GetRow(i)
    -        print b
    -
    -cnb = A.GetNbColumns() + 1
    -print "Columns title : ", A.GetColumnTitles()
    -for i in range(1, cnb):
    -        b=A.GetColumn(i)
    -        print b
    -
    -# set titles
    -#titles=["11","12","13"]
    -#A.SetRowTitles(titles)
    -#titles=["21","22","23"]
    -#A.SetRowTitles(2,titles)
    -#titles=["31","32","33"]
    -#A.SetRowTitles(3,titles)
    -
    -#--------------------------------------------------------------------------#
    -#------------------------ save the study ----------------------------------#
    -#--------------------------------------------------------------------------#
    -import os
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -print " -------  We will save to", file, "-----------"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -
    -#--------------------------------------------------------------------------#
    -#---------------------------- Open file -----------------------------------# 
    -#--------------------------------------------------------------------------#
    -
    -print" -------------- Open  " + file + "-------------- " 
    -
    -openedStudy = batchmode_geompy.myStudyManager.Open(file)
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -# --- check attribute ---
    -
    -res,A=father.FindAttribute("AttributeTableOfReal")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeTableOfReal"
    -
    -A = A._narrow(SALOMEDS.AttributeTableOfReal)
    -
    -#check the table
    -print "Common title : ",A.GetTitle()
    -print "Rows titles : ",  A.GetRowTitles()
    -rnb = A.GetNbRows() + 1
    -for i in range(1, rnb):
    -        b=A.GetRow(i)
    -        print b
    -
    -cnb = A.GetNbColumns() + 1
    -print "Columns title : ", A.GetColumnTitles()
    -for i in range(1, cnb):
    -        b=A.GetColumn(i)
    -        print b
    -
    -titles=["ff","ss","tt"]
    -A.SetRowTitles(titles)
    -print "Rows titles : ",  A.GetRowTitles()
    -
    -titles=["ww","zz","cc"]
    -A.SetColumnTitles(titles)
    -print "Column titles : ",  A.GetColumnTitles()
    -
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example23.html b/doc/salome/tui/KERNEL/exemple/Example23.html deleted file mode 100755 index 623170417..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example23.html +++ /dev/null @@ -1,35 +0,0 @@ - - - -Exemple - -
    -import batchmode_salome
    -#import SALOMEDS
    -
    -aStudy = batchmode_salome.myStudy    
    -
    -#Add new component 'User data'
    -aBuilder = aStudy.NewBuilder()
    -aComponent = aBuilder.NewComponent("User data")
    -anAttr = aBuilder.FindOrCreateAttribute(aComponent, "AttributeName")
    -anAttrName = anAttr._narrow(SALOMEDS.AttributeName) 
    -anAttrName.SetValue("User data")
    -
    -
    -#Add a new case 'Case1' to the component 'User data'
    -aBuilder.AddDirectory("/User data/Case1")
    -
    -#Set a study context to '/User data/Case1'
    -aStudy.SetContext("/User data/Case1")
    -
    -#Print the current study context
    -print aStudy.GetContext()
    -
    -#Add a sub directory 'aSubCase' to 'Case1' (under the current context)
    -aBuilder.AddDirectory("aSubCase")
    -
    -
    -#Add a new case 'Case2' to component 'User data'
    -aBuilder.AddDirectory("/User data/Case2")
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example3.html b/doc/salome/tui/KERNEL/exemple/Example3.html deleted file mode 100755 index 477d80cda..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example3.html +++ /dev/null @@ -1,68 +0,0 @@ - - - -Example - -
    #%AttributeSequenceOfReal interface(creations/saving/restoring)%
    -#% AttributeSequenceOfReal  : ChangeValue, Add,  Value,  Remove,  Length%
    -#% SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open%
    -
    -#       create AttributeSequenceOfReal      
    -#=================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeSequenceOfReal")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeSequenceOfReal attribute"
    -A = A._narrow(SALOMEDS.AttributeSequenceOfReal)
    -if A == None :
    -        raise  RuntimeError, "_narrow returns None instead of AttributeSequenceOfReal pointer"
    -
    -A.Add(0.0293)
    -A.Add(625.1e+2)
    -A.Add(0.928e+100)
    -A.Add(83.287)
    -
    -print "initial values ",A.Value(1), A.Value(2), A.Value(3), A.Value(4)
    -A.Remove(3)
    -print "after remove ", A.Value(1), A.Value(2), A.Value(3)
    -A.ChangeValue(2,76.265)
    -print "after second item change", A.Value(1), A.Value(2), A.Value(3)
    -
    -if A.Length() != 3:
    -        print "Error : wrong length of SequenceOfReal"
    -if A.Value(1) != 0.0293 or A.Value(2) != 76.265 or A.Value(3) != 83.287:
    -        print "Error : wrong value of  AttributeSequenceOfReal"
    -
    -#      save / restore study      
    -#=================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -openedStudy=batchmode_geompy.myStudyManager.Open(file);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#     find AttributeSequenceOfReal
    -#=================================
    -
    -res,A=father.FindAttribute("AttributeSequenceOfReal")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeSequenceOfReal"
    -
    -A = A._narrow(SALOMEDS.AttributeSequenceOfReal)
    -
    -if A.Length() != 3:
    -        print "Error : wrong length of SequenceOfReal"
    -if A.Value(1) != 0.0293 or A.Value(2) != 76.265 or A.Value(3) != 83.287:
    -        print "Error : wrong value of  AttributeSequenceOfReal"
    -print "after restoring ", A.Value(1), A.Value(2), A.Value(3)
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example4.html b/doc/salome/tui/KERNEL/exemple/Example4.html deleted file mode 100755 index 4539170b6..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example4.html +++ /dev/null @@ -1,66 +0,0 @@ - - - -Example - -
    #%AttributeSequenceOfInteger interface(creations/saving/restoring)%
    -#%SALOMEDS methods : FindOrCreateAttribute FindComponent FindAttribute Open Add SaveAs%
    -#%AttributeSequenceOfInteger methods :  Value, Remove, Length%
    -
    -#       create AttributeSequenceOfInteger      
    -#==========================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeSequenceOfInteger")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeSequenceOfInteger attribute"
    -A = A._narrow(SALOMEDS.AttributeSequenceOfInteger)
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeSequenceOfInteger attribute"
    -
    -A.Add(100)
    -A.Add(300)
    -A.Add(500)
    -A.Add(400)
    -A.Add(700)
    -
    -A.Remove(3)
    -A.ChangeValue(4,500)
    -
    -
    -if A.Length() != 4:
    -        print "Wrong length of SequenceOfInteger"
    -if A.Value(1) != 100 or A.Value(2) != 300 or A.Value(3) != 400 or A.Value(4) != 700:
    -        print "Wrong  value of  AttributeSequenceOfInteger"
    -
    -
    -#      save / restore study      
    -#=================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -openedStudy=batchmode_geompy.myStudyManager.Open(file);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#     find AttributeSequenceOfInteger
    -#======================================
    -
    -res,A=father.FindAttribute("AttributeSequenceOfInteger")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeSequenceOfInteger"
    -
    -A = A._narrow(SALOMEDS.AttributeSequenceOfInteger)
    -
    -if A.Length() != 4:
    -        print "Wrong length of SequenceOfInteger"
    -if A.Value(1) != 100 or A.Value(2) != 300 or A.Value(3) != 400 or A.Value(4) != 700:
    -        print "Wrong  value of  AttributeSequenceOfInteger"
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example5.html b/doc/salome/tui/KERNEL/exemple/Example5.html deleted file mode 100755 index 79be2e442..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example5.html +++ /dev/null @@ -1,58 +0,0 @@ - - - -Example - -
    #%AttributeName interface(creations/saving/restoring)%
    -#%SALOMEDS methods : FindOrCreateAttribute,  SaveAs, FindComponent FindAttribute Open%
    -#%Attribute methods : SetValue, Value%
    -
    -#              create AttributeName     
    -#===========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeName")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -A = A._narrow(SALOMEDS.AttributeName)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -A.SetValue("AttributesTesting")
    -
    -if A.Value() != "AttributesTesting":
    -        print "Wrong  value of AttributeName"
    -
    -
    -#      save / restore study      
    -#=================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -openedStudy = batchmode_geompy.myStudyManager.Open(file);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#     find AttributeName
    -#======================================
    -
    -res,A=father.FindAttribute("AttributeName")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeName"
    -
    -A = A._narrow(SALOMEDS.AttributeName)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -
    -if A.Value() != "AttributesTesting":
    -        print "Wrong  value of AttributeName"
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example6.html b/doc/salome/tui/KERNEL/exemple/Example6.html deleted file mode 100755 index 197c6b3b1..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example6.html +++ /dev/null @@ -1,56 +0,0 @@ - - - -Example - -
    #%AttributeComment interface(creations/saving/restoring)%
    -#%SALOMEDS methods : FindOrCreateAttribute, SaveAs FindComponent FindAttribute  Open%
    -#%Attribute methods : Value, SetValue%
    -
    -#              create     AttributeComment 
    -#===========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeComment")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeComment attribute"
    -A = A._narrow(SALOMEDS.AttributeComment)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeComment attribute"
    -
    -A.SetValue("GEOM")
    -
    -
    -#      save / restore study      
    -#============================================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -openedStudy = batchmode_geompy.myStudyManager.Open(file);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#      find    AttributeComment
    -#============================================================
    -
    -res,A=father.FindAttribute("AttributeComment")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeComment"
    -
    -A = A._narrow(SALOMEDS.AttributeComment)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeComment attribute"
    -
    -if A.Value() != "GEOM":
    -        "Error: wrong value of AttributeComment"
    -
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example7.html b/doc/salome/tui/KERNEL/exemple/Example7.html deleted file mode 100755 index 9bf85152b..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example7.html +++ /dev/null @@ -1,55 +0,0 @@ - - - -Example - -
    #%AttributePersistentRef interface(creations/saving/restoring)%
    -#%SALOMEDS methods : FindOrCreateAttribute,  SaveAs, FindComponent FindAttribute Open%
    -#%Attribute methods : SetValue, Value%
    -
    -#              create   AttributePersistentRef   
    -#===========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributePersistentRef")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributePersistentRef attribute"
    -A = A._narrow(SALOMEDS.AttributePersistentRef)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributePersistentRef attribute"
    -
    -A.SetValue("/tmp/test;1")
    -
    -#      save / restore study      
    -#============================================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -openedStudy = batchmode_geompy.myStudyManager.Open(file);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#     find AttributePersistentRef
    -#============================================================
    -
    -res,A=father.FindAttribute("AttributePersistentRef")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributePersistentRef"
    -
    -A = A._narrow(SALOMEDS.AttributePersistentRef)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributePersistentRef attribute"
    -
    -if A.Value() != "/tmp/test;1":
    -        "Error: wrong value of AttributePersistentRef"
    -
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example8.html b/doc/salome/tui/KERNEL/exemple/Example8.html deleted file mode 100755 index db962290a..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example8.html +++ /dev/null @@ -1,64 +0,0 @@ - - - -Example - -
    #%AttributeDrawable interface(creations/saving/restoring)%
    -#%SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open%
    -#%Attribute methods : SetDrawable, IsDrawable% 
    -#--------------------------------------------------------------------------
    -
    -from batchmode_geompy import *
    -import os
    -
    -#--------------------------------------------------------------------------
    -#              create    AttributeDrawable  
    -#===========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeDrawable")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeDrawable attribute"
    -A = A._narrow(SALOMEDS.AttributeDrawable)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeDrawable attribute"
    -
    -A.SetDrawable(1)
    -
    -if A.IsDrawable() == 0:
    -        "Error: wrong value of AttributeDrawable"
    -
    -
    -#      save / restore study      
    -#============================================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -openedStudy=batchmode_geompy.myStudyManager.Open(file);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#     find   AttributeDrawable
    -#============================================================
    -
    -res,A=father.FindAttribute("AttributeDrawable")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeDrawable"
    -
    -A = A._narrow(SALOMEDS.AttributeDrawable)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeDrawable attribute"
    -
    -if A.IsDrawable() == 0:
    -        "Error: wrong value of AttributeDrawable"
    -
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example9.html b/doc/salome/tui/KERNEL/exemple/Example9.html deleted file mode 100755 index 6809dab3c..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example9.html +++ /dev/null @@ -1,59 +0,0 @@ - - - -Example - -
    #%AttributeSelectable interface(creations/saving/restoring)%
    -#%SALOMEDS methods: FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open%
    -#%Attribute methods: SetSelectable, IsSelectable%
    -
    -#              create    AttributeSelectable  
    -#===========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeSelectable")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeSelectable attribute"
    -A = A._narrow(SALOMEDS.AttributeSelectable)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeSelectable attribute"
    -
    -A.SetSelectable(1)
    -
    -if A.IsSelectable() == 0:
    -        "Error: wrong value of AttributeSelectable"
    -
    -
    -#      save / restore study      
    -#============================================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -openedStudy = batchmode_geompy.myStudyManager.Open(file);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#     find   AttributeSelectable
    -#============================================================
    -
    -res,A=father.FindAttribute("AttributeSelectable")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeSelectable"
    -
    -A = A._narrow(SALOMEDS.AttributeSelectable)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeSelectable attribute"
    -
    -if A.IsSelectable() == 0:
    -        "Error: wrong value of AttributeSelectable"
    -
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/sources/Application-About1.jpg b/doc/salome/tui/KERNEL/sources/Application-About1.jpg deleted file mode 100755 index cf7ab8ba025d6bd9212f8bd5681e77d1aaef8e4f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14327 zcmeHuWmFx(w&uY}upHbyxWmCExQF0w!QCNvaQ7g=-QAtwZU+tr3Blc6f=uqa@80+B zy7$ejnOQTxUiF{uuIjzJs&{>R*Z!(s7hl%_@8qOpr2sH6FaVi92jKMufG6&3X6$Na zO73ChYDunUX+|zBtN7`41t1PUMnptHL_kJDLVEKC`7J6o8Y&73Dgh=I1~v&H87T=N zF)=wc3oSV%6BRKr9S=Pd8#@;l7a1*|5HE)y3nv%HUxdKCdGiJp1r;9+4WEO8n1bVf zyS)AY0FeQAup)3UlmJ*D3>*;VbpSvNfC0cD{OQJj6eL)91Vm)Gztn2J1Hiz+!or~- zA-+Y1LqY)jX$=bp4@5x3q+mzF!p0L-RyR)k2Bzdta|%e9#mTFyZ|KFP5>rwA>>L=h z!3pB#F>%R17f-sN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yadte(hY)0=41tOU|6{<1sN%i>}kWjd{&j3;S2z3U4x!yQ)2(8e%%( z#Pc)w-LXc%kpH)k{~nY7wv+$Exl`^h6V;3(mXB3$`CC*vQ*s+UBBN`3^W)#dk#pia z^vKocrzgxxk$V?#5a`HKX^fM8^3-6k6@}P?s|FQm*7xZ{0~4wzPjmG3lR@rs$D5|1iGPqy+K@Y`1-m{|1HFzW=NeRx(y= z$Nrmx&Cqz`s#>k5A>H~Cf1n%_Zq~Udb+H8q+;-=LhNK&@ZK*x*|KVRRq}QeY0oL4} Ao&W#< diff --git a/doc/salome/tui/KERNEL/sources/application.gif b/doc/salome/tui/KERNEL/sources/application.gif deleted file mode 100644 index 0b05d5c18ee88779d283508781836e2b151f606f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2602 zcmWlYYgkeT1Aq?~180Wokt? zN9KjhIWkmc<;NP*DKDKA7nyU+ypY}4Dr5PykNJGt`{Vuj{(Dn4CbQzUOMtb&aR7z= zOe3y?;W~z4$R^1EZ7-aRUCqX8HO?WK`Y@Bn#B1v%_HG7GX|Rnx&>Uu{IuWDMvzmPv(GuI$msO*9u}u_HMQi>Jo4Ew$Iv-p<%TQwClr!B|6vpzvNAQ zn$uq=9KNR2HaO?rhW(SOQ`yFCu*qbfu<%N{>{E8oE zaaV@4iM8bk)^?U8UtrKGY=!nF7&{?nPnfP=EkE0bqmY_S_Vwe}u?TE=j6hS?`=@ToBS?@q@cgtW`VTLl6(RiNx}nL}L* zE~p6+l;~yoLf5oTQU^;i7=n08LXp-v=aO%wimQ#*cAhXb%qv?6dhBvr%jXu4AcMi<)pJDPj_W@J+S4nboLdOfi%=cb+= z!01%Hw{X*{B8zAwW!h88uR zzO`Z!ty}8*&J(+{U1B{t_2$XF>%;q;rL}!Ar=kbOW-hegTid&xj+&kC*>y6R(O*N0V0etv*T=~?OiN)MB92@n=4;hmO7JIxsM_om?27nbo?uu;8 zFYW*de*V_;C{5aRhHyW!50$y*HEjq#A2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c6Lrq4lW)MULJ049!Vi#ei2zIc{y1r85so?J#_^o9c39A4RcK$149!N z6M1z@TMHu_J!2CikRgnmoSZz|JQBRT5=M$Libf=Z{|6WZIT%D3%$OOK7?=bZnFSgD zA7PMUU}Rthc>@7h+1MFbn1ONz0t}4I%#5t;OzcouMkZz!23A2KHbq0nKw(j(pu~w6 z3mZjLjGdA<9t7%;U}RuoMwkR-0lADUKp6!=1|~)pMph(AMnRxyib95giG>^g-(uil z25J^$7G$tz*b}$dob931la92ii?S2$h#I_dt2w(?+0U=MwPfirm!)r|%QL=xciqQ* zvhOkDlnJl1?mV9H$SWkchmTWj{f7p#7YBO!PTF5sw@#T`LbrdbWo*ZV_O$5xlkGCE z^PPVyNw8xApK>WbnDiuj&ts=vwm~?+7XwjY*R$0pI#j4 zw{W$hO=am?)v#v=Y$tVvo>o`d(V^*ixTv>ZZDX3QFXcToO*@xTm3CIa<27tEIc#! zWx8M8?h`8_qqEtJR5Yui4EIMazr(xByvXzMzf0?$2CWRax^UXZS*s@%RlmEiXqi&U zv6PDAY{#9wTC9VfKD+s&O=r4T6dx~>x9e7&gdYvo8^51ls#!DPMamTK%`aPJ6?q?+ z%yVDxb^Z406Q4}q)Ma`pwL@9=KH2nE%g+j0$PN+6w!7WCc0S)@-fuIzZ#hkAx*44E xJV2p&e;fZ&&B#yDAuHbPYtLW(<#g|%_lh@oH9azfmdriy#cs<|Z3p)MHvxBP8gc*t diff --git a/doc/salome/tui/KERNEL/sources/doxygen.css b/doc/salome/tui/KERNEL/sources/doxygen.css deleted file mode 100755 index 88e613d23..000000000 --- a/doc/salome/tui/KERNEL/sources/doxygen.css +++ /dev/null @@ -1,170 +0,0 @@ -H1 { - text-align: center; -} - -CAPTION { - font-weight: bold -} - -/* Link in the top navbar */ -A.qindex {} - -A.qindexRef {} - -/* Link to any cross-referenced Doxygen element */ -A.el { - text-decoration: none; - font-weight: bold -} - -A.elRef { - font-weight: bold -} - -/* Link to any cross-referenced Doxygen element inside a code section - (ex: header) -*/ -A.code { - text-decoration: none; - font-weight: normal; - color: #4444ee -} - -A.codeRef { - font-weight: normal; - color: #4444ee -} - -A:hover { - text-decoration: none; - background-color: lightblue -} - -DL.el { - margin-left: -1cm -} - -/* A code fragment (ex: header) */ -DIV.fragment { - width: 100%; - border: none; - background-color: #CCCCCC -} - -/* In the alpha list (coumpound index), style of an alphabetical index letter */ -DIV.ah { - background-color: #CCCCCC; - font-weight: bold; - color: #ffffff; - margin-bottom: 3px; - margin-top: 3px -} - -/* Method name (+ type) */ -TD.md { - background-color: lightblue; - font-weight: bold; -} - -/* Method parameter (some of them) */ -TD.mdname1 { - background-color: lightblue; - font-weight: bold; color: #602020; -} - -/* Method parameter (some of them) */ -TD.mdname { - background-color: lightblue; - font-weight: bold; - color: #602020; - width: 600px; -} - -/* Separator between methods group (usually empty, seems not supported by IE) */ -DIV.groupHeader { - margin-left: 16px; - margin-top: 12px; - margin-bottom: 6px; - font-weight: bold -} - -DIV.groupText { - margin-left: 16px; - font-style: italic; - font-size: smaller -} - -BODY { - background: #FFFFFF; -} - -/*div.div-page { - background-color: #FFFFFF; - margin-left: 1em; - margin-right: 1em; - margin-top: 1em; - margin-bottom: 0.1em; - - padding-left: 1em; - padding-right: 1em; - padding-top: 0.5em; - padding-bottom: 0.5em; - - border: 2px solid #0D299A; - border-width: 2px; - border-color: #0D299A; -}*/ - -div.tabs { - text-align: justify; - margin-left : 2px; - margin-right : 2px; - margin-top : 2px; - margin-bottom : 2px - font-weight: bold; - color: #FFFFFF; -} - -DIV.div-footer { - margin-left: 1em; - margin-right: 1em; - margin-bottom: 0.2em; - text-align: right; - font-size: 9pt; -} - -/* In File List, Coumpound List, etc, 1st column of the index */ -TD.indexkey { - background-color: #CCCCCC; - font-weight: bold; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px -} - -/* In File List, Coumpound List, etc, 2nd column of the index */ -TD.indexvalue { - background-color: #CCCCCC; - font-style: italic; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px -} - -span.keyword { color: #008000 } -span.keywordtype { color: #604020 } -span.keywordflow { color: #e08000 } -span.comment { color: #800000 } -span.preprocessor { color: #806020 } -span.stringliteral { color: #002080 } -span.charliteral { color: #008080 } diff --git a/doc/salome/tui/KERNEL/sources/footer.html b/doc/salome/tui/KERNEL/sources/footer.html deleted file mode 100755 index 56d52a61a..000000000 --- a/doc/salome/tui/KERNEL/sources/footer.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - -
    -
    Copyright © 2003-2007 CEA, EDF
    -
    - - diff --git a/doc/salome/tui/KERNEL/sources/html_comments.gif b/doc/salome/tui/KERNEL/sources/html_comments.gif deleted file mode 100755 index f0c0f0b47100447f7d3a8104b0b4930c548f5437..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 156 zcmV;N0Av40Nk%w1VQT;h0Du4hv>+h=|NkNW6+?1mVRU6=Aa`kWXdqN*WgtgMO;7+K z`2+z90096j00000YXAuV00LT!kEzS;4#1l<$#<*OH8amG5(oyRc7{m0hHSLOstHBc z2p=%3&u96YxeS>bktgh7J}aBf$+6{%G-U^B!de@_Bt+>MZM~unISNh_&rFnzZP`Jm KJ9x`c0029x$~vY1 diff --git a/doc/salome/tui/KERNEL/sources/kernel_about_4.png b/doc/salome/tui/KERNEL/sources/kernel_about_4.png deleted file mode 100644 index 5c9c09a795758f733b327c4e39d9d7d80ad6943b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 134730 zcmbrmWl$wSwXx9K}G_s#cS#Qb_u zQBf;bsC6#era85Hw(5;J9!w{}{JC{&+GiNB!78TCa(nu&2zNah4W7~7Bm6Y`0xs>%I;*}z z^nytTVWy}HvX7qYMtDE`J*|9Kp`&EOjetXCr~m61@4agt-p?t z$^Qq(6XgHzUjG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git a/doc/salome/tui/KERNEL/sources/myheader.html b/doc/salome/tui/KERNEL/sources/myheader.html deleted file mode 100755 index bddc997ec..000000000 --- a/doc/salome/tui/KERNEL/sources/myheader.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - $title - - - -


    -
    -SALOME documentation central -
    -
    diff --git a/doc/salome/tui/KERNEL/sources/occ.gif b/doc/salome/tui/KERNEL/sources/occ.gif deleted file mode 100755 index ce017c8ae11236ef5c52eee1723657cb8b08989f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14790 zcmV;%IXT8hNk%v~VRQkY0QUd@1_TBOg`<>&4T;4JdIT4h$I-{foOVg3n-^whzoZv-R!6wSgo zd8iFsVia^~2;Ql+iLnuX7c0ux+OKvLsTV=p$y2eac}|U*=;-JMXL)pSb1-6Xxy6^W zCQAt`F?R%0NJmH#pRnrm^vbOXz^tt#Moh4XfIU1t26&LQ+1mzHTeSl%+1kbS_4B2q zq`telsD>Q4cwFY##Prt%$cvX6sLmvYIYxw}ad>Dt^G85xj_IEO`C@9fY~nxy30jcu;KFQ2h`1}ymOq+WU$udJH>PJW^6oiI+KETwH(|REUokENkjXNP$Yd}>4`9wO@IwTw4!M79 za5;*nTqZcCot(c%XdG^QnU|P$j}(ZgEX1lLuhT!As$^t(G`HjA%(^j{mO{jeRN3e2 znZ3cBGIWm`T2`*SdBe>7w^lDj72SvhIr(&6Fuywje?BN{m>iPFIZ>ktXfH0Yz{X zefp$HldQY4>Z(&mjT#CR=K`N|C;={lvP9#X6L&umgDN=m@$AKe&`2ggH4J%OK;Oc49TrXP|qkar|^5)Nn z0)=pD)1HAwR8;{|R-k|gCdd?m2dQOU1{r+t0UZ?5amy_dUS-*8s&uHzcHfC1;)o=Y z7)d1c)H4%=G|&)CFl@D`g%*E#Hrjv*nUZL!4_S9H@&0}Z_BgAYIaaK{}D{RIdh+J38Tih(Zi*SDI21J1YV zb|Zoa0--cxr5i;yE=oiFg)O(8b}EP<++w@$PXZMgFF2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)5Mi?1-;31mfAtqu7#{c0) zRUr>%p{una=w;m-(%}z!Ru^=E?A;;!?V&ACkc?{vtF&p$}dgHOis4ogs5H1u+oA5EkQ|!Cu^j;{;6I zbCFydUgIXtp#Y*F=e47go#ODRqdQ(60j8Wi3Zga=19LIr?9Jj1besb&o`5lw(3RFR z`du%kpx3<`JhE3IUSUTx1wZfuauF3HCg4B%V?a^?6)061vZLieWUY;&DL!OEs*^9C zoJp=^G+G&3NEAP20Y)m|WVIO^utCz89fhGGD#F@H2471?<3;2{J}8(s&i`aaCLK^w z0wtK-L5kK>2BlP*RxT=}=@nid^Z^3;qa+d-N17ZiLSK~!VgID!r*y_+ zLsn;QMkj4frS@FJD#oQyE!#43)_b@QC~_xyrl)#-6+>y3P!UzqH6`PE&L@4=r;n*( g7YNmO(t&i@r+@w@fO3RVWu=3~W`G{3R0ae9JDa2X1poj5 diff --git a/doc/salome/tui/KERNEL/sources/static/Link.gif b/doc/salome/tui/KERNEL/sources/static/Link.gif deleted file mode 100755 index 75330d0c82be86f95a77075a906d8fb6b4af6e72..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13959 zcmeI2<8vL1^Y+umXw$}N)TS{T+qP}<#C96v#AajL<~gyA6Wex9p8NZEJimRhbIrcn z&&kLJpi2Av^kv+@+PwI+w%(QKI(22cz9g0a|Gi@kP` z_d5!I)DpvJf7tC;&GFW{-67z2f*jel`u#B&GKvsPmes{;!+rZbw%}g5mt_Pv848SeXU}9ib z1fq&l7VrSuY6GzJ(*rBCV?0Sz_>SzlW_zs=vcCp~L{B zf+*HS%iR#tgav$~5=V{g*w5o0Ci?i&WP5Rv6lG+pTnO$&!Nx*b>h@p7k@J#_h|&vF z@JCwrQVm0?H4@X$ON}k~KTG{e6{+`(Pc;TpA7;_VN9+f&l|3&7Lm&|p*$dcQnE!%t ztV_k+67W=`q^M=N2mE*!HM-d$~7zPsr{$4*9bWnGi6Yxk2ffW3OH{@iWdd6U*1y5eq< z&A58`Ij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bC$@DDjtK@HaTMRJQgBL(ap!k`^dY(51%2q9&S)hjx31V?L<|fakh@(;Tos&Y;>E$ z(%X(aAlK*2t|c{Xv7+*!Ew}1K)sJTbX!Q^~mVIGu@j83U;9&>i+w+U%+Cu-l1!C#G zj`8Q+`_1?~qSAd6yUEiUV*EVetbb!f!h583&_2zRbyr+-=&f*RzR*B?{|xV|sl)gx z3);AA%H_MDcX^$@)XY-z3(&?X&bePx|xU6)?UZtMt4q_V7P6 M)V!}C!ol$TKY@nC6951J diff --git a/doc/salome/tui/KERNEL/sources/static/SObject.gif b/doc/salome/tui/KERNEL/sources/static/SObject.gif deleted file mode 100755 index 1d4e9cb24adb525809f8e97a21e96ecdafd4c11b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4966 zcmeH`=Q|q=!^Nx1tS&RO_8x7`7}cs#QL0vAQ(CcCX^_?yv67mxw~*L^2*QmbVpr`_ ztyQC1rHJ|7_uuh8=fkudwug_TML-GMrtYW8l@RE$ED7xGiZzsV(e|xgn&VqgPkd6VD~@_JvYc z+=u4ZisJ>q`eP_noLYAOdzM8~BFG!e3A}lK(i8=?=g_c%)D-Mbehq zfEzD+afMA0(1@R?upk_<+*e#Su5##(8=7rgnyPy|5TbsZT47!7QmXq}>aWavfmeTW z+uUba`?An;!O~5b>jKH`Aroq#xo+|!fL1SZBJZP3VdCU@ZcQS5sS1SOCBxtPyNu+k zJX(O8*T0y;X@-ja%#?GR1(Qqy1{?ghh`5ff#G$$SdU=;F3;)V&qZzFYq&-95z4PYD zCPRl(nZ~@B|F6N)vly6$-8u?mlpQ{pIL@2Z)i{oWcz{l~&6FL*Ik0o7}5Nar-;|C3W7w=z}4qjm&bewarKZu}@r$wRUSB|B%imL~YQxte7Q0yawMFP2J_aWmoF zkY%w5jL#WJ!YV1Z=Au}31z`eVRbB86QBh57ch2%?--&attG&Zq>D_*-wW5Cbs?_YO z4uHFKRc{sEQ)_y4bs>Kd5x?N`{SU~?qTY+=hvgT=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PH& zB%AattC<8igk~AVrnWL>S8(Sb3bQ}1%aB1?pvbJg831u6CrKq|GzcR*X<7!#9*@mI zoMq;Yk#fIe%ESqTPSI?4AbHP3WaQvx*WlU4ylEJSsmWl z!imd8CeCl!4|7GS=6thq!bdq`vqk->Mbd<#PwPbr`s(+O+W@ILLd0Chl# z!%8ugJNrp+$t9hV_YBadDv?QC$`4gAr57^`@Ot3bM77ct;HMj7=N{dneEmYF9W$!#^DD#AADN1dCwp{uB#j zBcv7S3v7%9BF(I!(O4lnIQHg2oDFweT3k~#7u=K5beS8GOpNw@Mx+PuqMidn)URbYBc9(SlJKL@1Wn`1GT1jm}MR~`h z0-ly4wHB$h=8|j`EW8Di(t^+StFrd1JZ?D@ZMEWPZ8!!t!CMnkT3g`CZF8-*yRH9h zDs-u}X`8n7N-0pX+cXGmg9Gxz$89RN$)DizpUO diff --git a/doc/salome/tui/KERNEL/sources/static/Study_Struct.gif b/doc/salome/tui/KERNEL/sources/static/Study_Struct.gif deleted file mode 100755 index bc0ce35be243b94242ac361985adf86c250a071e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5833 zcmeH}^;gpm8{aifOHJR(JduNH%NEK5Ri}# zff1kaeV)JK`^$5GxWC?eUgz9%uA;Jnh_EFKfgUIl0Nvf)`33liN{F_$wE_TuUBzah zv;2JgV&Y=z>g$g7jw(tkL`6gk3JYfEW{=K}VvsR?Lw$8Mb=!N}$*IW|H5J%7?C8*_ zwY{~mp7G_`rK7#$<>lq}#`e+CQD1kTj<$}qt+kGxj+>9$=-6m$ck5k%Uu%HhU0dtj zfAapP{}K3qCBS?|2>Ne<7yq^YZbFe14}eG+l&UbDp`_Ftru|hp-I0)|Dp^X^xxFa3 zfWvZsb>7dnhuj1ack=3Q08E$PK>w$L~d+g$`aQ0h0cWyqwVg+-o8T#sjvE>3nwP-MwJk4P@ z#A-!Y-xpTFs%=J01=k6osVka(rq zyF1GaJk|JZhM}k~DL_PY5p63+%L=k;y}!^ca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#2w$b|qr z-pS&x$7$Nd#nAQiL)ykt@xYCKrC)cmL0eOq^XHwG-|WuSoQ)`Izn-Sf9@JOq+YTg5 zS8hLJ{HA9vvxk|kh;61vY9CVTA^5D(M0ct8CfCz}*iUh}``ZsGSKHoV?@y+}o?0zU zpZ8?s!uzaSES(vCx-oPp*S>ll)qMl*Yc zH|;0(htqB_>&ie+GDjYVngC!u!u$=7O=?~5mkz+a~pUhpzbb@NXNa&ZU+Onph5 z5^H6XSeddooszC#k(He0*zLcL9uT9zw4b244?@*exc6y1K^L+Ei#bqKdH+%tN8N~w z{s@jdfPd45-*^Ui8qc!%epqd4BQl!NCwjUwIk<}xv>qf!ntGEnYf_Q*Q9Ve`uv3nC zF4IR6D`00ylj0j&CAl(3`XTpHxbV^gma0APl=vpPwTF*!X7^SDpthK?oed^Nq*lxz zTc`i{FTP@C_PMgXElv`Ve}_iUG7)673wUWVhN1&TN=9ljR+?OK4F1bM6;}EsB$mU# z5q%@*k<8`qjmyIn0`|D&MttJCcrK$^Me8 zhYjUgzbjTs)udIUIA_dkBoaopIP)LOV5ikJ%gP03N5bEQgdyhU2^c%a4zPT}Bit{m zaOA(BIWQ^E+Ief6L{4-}!YVfQ*IX>tQj$~1z|Ek*jTyftDBMLtUNl^>)-}d*n2d~qtJR-v z66rwW|851sA4TFKH%GSY0#Rq`y_}>J4D%7!*3hLlshf~o8F_7EcLs& z+-#c-LXz0M2xC;a)W(~@;6|x^nBjgOC4GPPe!P0bFlG11s?8XAMUmt?qd%R@rTEck4~kI{*IzRAVB>808U@;PXGV_ diff --git a/doc/salome/tui/KERNEL/sources/static/doxygen.css b/doc/salome/tui/KERNEL/sources/static/doxygen.css deleted file mode 100755 index 88e613d23..000000000 --- a/doc/salome/tui/KERNEL/sources/static/doxygen.css +++ /dev/null @@ -1,170 +0,0 @@ -H1 { - text-align: center; -} - -CAPTION { - font-weight: bold -} - -/* Link in the top navbar */ -A.qindex {} - -A.qindexRef {} - -/* Link to any cross-referenced Doxygen element */ -A.el { - text-decoration: none; - font-weight: bold -} - -A.elRef { - font-weight: bold -} - -/* Link to any cross-referenced Doxygen element inside a code section - (ex: header) -*/ -A.code { - text-decoration: none; - font-weight: normal; - color: #4444ee -} - -A.codeRef { - font-weight: normal; - color: #4444ee -} - -A:hover { - text-decoration: none; - background-color: lightblue -} - -DL.el { - margin-left: -1cm -} - -/* A code fragment (ex: header) */ -DIV.fragment { - width: 100%; - border: none; - background-color: #CCCCCC -} - -/* In the alpha list (coumpound index), style of an alphabetical index letter */ -DIV.ah { - background-color: #CCCCCC; - font-weight: bold; - color: #ffffff; - margin-bottom: 3px; - margin-top: 3px -} - -/* Method name (+ type) */ -TD.md { - background-color: lightblue; - font-weight: bold; -} - -/* Method parameter (some of them) */ -TD.mdname1 { - background-color: lightblue; - font-weight: bold; color: #602020; -} - -/* Method parameter (some of them) */ -TD.mdname { - background-color: lightblue; - font-weight: bold; - color: #602020; - width: 600px; -} - -/* Separator between methods group (usually empty, seems not supported by IE) */ -DIV.groupHeader { - margin-left: 16px; - margin-top: 12px; - margin-bottom: 6px; - font-weight: bold -} - -DIV.groupText { - margin-left: 16px; - font-style: italic; - font-size: smaller -} - -BODY { - background: #FFFFFF; -} - -/*div.div-page { - background-color: #FFFFFF; - margin-left: 1em; - margin-right: 1em; - margin-top: 1em; - margin-bottom: 0.1em; - - padding-left: 1em; - padding-right: 1em; - padding-top: 0.5em; - padding-bottom: 0.5em; - - border: 2px solid #0D299A; - border-width: 2px; - border-color: #0D299A; -}*/ - -div.tabs { - text-align: justify; - margin-left : 2px; - margin-right : 2px; - margin-top : 2px; - margin-bottom : 2px - font-weight: bold; - color: #FFFFFF; -} - -DIV.div-footer { - margin-left: 1em; - margin-right: 1em; - margin-bottom: 0.2em; - text-align: right; - font-size: 9pt; -} - -/* In File List, Coumpound List, etc, 1st column of the index */ -TD.indexkey { - background-color: #CCCCCC; - font-weight: bold; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px -} - -/* In File List, Coumpound List, etc, 2nd column of the index */ -TD.indexvalue { - background-color: #CCCCCC; - font-style: italic; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px -} - -span.keyword { color: #008000 } -span.keywordtype { color: #604020 } -span.keywordflow { color: #e08000 } -span.comment { color: #800000 } -span.preprocessor { color: #806020 } -span.stringliteral { color: #002080 } -span.charliteral { color: #008080 } diff --git a/doc/salome/tui/KERNEL/sources/static/examples_Kernel.html b/doc/salome/tui/KERNEL/sources/static/examples_Kernel.html deleted file mode 100755 index beb74ae4f..000000000 --- a/doc/salome/tui/KERNEL/sources/static/examples_Kernel.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - - Main Page - - - - -   -
    - - - - - - - - -
    - - -
    -
    - -

    Examples

    - Package SALOME_ModuleCatalog
    -
    -      interface SALOME_ModuleCatalog::ModuleCatalog
    -
    -Package SALOME
    -
    -   
    interface SALOME::Session
    -
    -Package Engines
    -   

    -    interface Engines::Container
    -

    -   
    -   

    -
    -
        SALOME_ModuleCatalog::ModuleCatalog interface -
    -
    -
    -

    -
    -

    -Acomponent -GetComponent (in string componentname)
    -
    -See the example below
    -
    -
    -
    -
    SALOME::Session interface

    -

    -
    -GetInterface (), StopSession () raises (GUIActive, RunningStudies)
    -
    -Stop session and restart GUI application:
    -
    -mySession.StopSession()
    -
    -mySession.GetInterface()
    -
    -
    -
    Engines::Container -interface
    -
    -
    -
    Component -load_impl (in string nameToRegister, in string componentName)
    -
    -Load component with defined component name:
    -
    -compinfo = module_catalog.GetComponent(componentName)
    -
    - try:
    -    machineName = theComputer # name of machine
    -    path = compoinfo.GetPathPrefix(machineName) + "/"
    - except SALOME_ModuleCatalog.NotFound, ex:
    -    MESSAGE( "machine " + machineName + " not found in Module -Catalog" )
    -    MESSAGE( "trying localhost" )
    -    try:
    -    path = compoinfo.GetPathPrefix("localhost") + "/"
    -    except SALOME_ModuleCatalog.NotFound, ex:
    -    path = ""
    -
    -implementation = path + "lib" + componentName + "Engine.so"
    -MESSAGE( "Trying to load " + implementation )
    -
    - try:
    -
        component = container.load_impl(componentName, -implementation) # Loads into the container a new component, registers -it and starts it's CORBA servant.
    -
    -    MESSAGE( "component " + component._get_instanceName() -+ " launched !" )
    -    return component
    -except:
    -    MESSAGE( "component " + componentName + " NOT launched -!" )
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    -
    - - diff --git a/doc/salome/tui/KERNEL/sources/static/examples_Life_cycle.html b/doc/salome/tui/KERNEL/sources/static/examples_Life_cycle.html deleted file mode 100755 index 080112eb4..000000000 --- a/doc/salome/tui/KERNEL/sources/static/examples_Life_cycle.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - Main Page - - - - -   -
    - - - - - - - - -
    - - -
    -
    - -

    Examples

    - //There is a CXX example of LifeCycleCORBA using
    -

    -#include CORBA_CLIENT_HEADER(TestComponent)
    -#include "SALOME_NamingService.hxx"
    -#include "SALOME_LifeCycleCORBA.hxx"
    -
    -int main (int argc, char * argv[]){
    -  try {
    -      // Initializing omniORB
    -
          CORBA::ORB_var orb = CORBA::ORB_init(argc, -argv);
    -   
    -      // Obtain a reference -to the root POA
    -
          CORBA::Object_var obj = orb->resolve_initial_references("RootPOA") -;
    -      PortableServer::POA_var poa = PortableServer::POA::_narrow(obj) -;
    -   
    -      SALOME_NamingService _NS(orb) ;
    -
    -      SALOME_LifeCycleCORBA _LCC(&_NS) ;
    -
    -      Engines::Component_var myComponent = _LCC.FindOrLoad_Component("FactoryServerPy","TestComponentPy");
    -       if(!CORBA::is_nil(myComponent)){
    -          Engines::TestComponent_var -myConcreateComponent = TestComponent::_narrow(myComponent);
    -          //do something -what you like with the interface
    -          ...
    -
              return 0;
    -       }
    -    }
    -  catch(CORBA::COMM_FAILURE& ex){
    -      cout<<"Caught system exception COMM_FAILURE --- unable to contact the object.\n";
    -  }catch(CORBA::SystemException&){
    -      cout<<"Caught a CORBA::SystemException.\n";
    -  }catch(CORBA::Exception&){
    -      cout<<"Caught CORBA::Exception.\n";
    -  }catch(...){
    -      cout<<"Caught unknown exception.\n";
    -  }
    -  return 1;
    -}
    -
    -#The example may be rewritten on Python like this:
    -

    -from omniORB import CORBA
    -from SALOME_TestComponent import *
    -from SALOME_NamingServicePy import *
    -from LifeCycleCORBA import *
    -
    -try:
    -    orb = CORBA.ORB_init(sys.argv,CORBA.ORB_ID)
    -    _NS = SALOME_NamingService(orb)
    -    _LCC = SALOME_LifeCycleCORBA(orb)
    -
    -     myComponent = _LCC.FindOrLoadComponent("FactoryServerPy","TestComponentPy");
    -     myConcreatComponent = myComponent._narrow(TestComponent)
    -    if myConcreatComponent is not None :
    -        //do something what you like with the -interface
    -         ...
    -
            return 0
    -    }
    -except CosNaming.NamingContext.NotFound, e :
    -    print "Caught exception: Naming Service can't found Logger"
    -except CORBA.COMM_FAILURE, e:
    -    print "Caught CORBA::SystemException CommFailure"
    -except CORBA.SystemException, e:
    -    print "Caught CORBA::SystemException."
    -except CORBA.Exception, e:
    -    print "Caught CORBA::Exception."
    -except Exception, e:
    -    print "Caught unknown exception."
    -  
    -
    -
    - - diff --git a/doc/salome/tui/KERNEL/sources/static/examples_Naming.html b/doc/salome/tui/KERNEL/sources/static/examples_Naming.html deleted file mode 100755 index ac08a6753..000000000 --- a/doc/salome/tui/KERNEL/sources/static/examples_Naming.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - Main Page - - - - -   -
    - - - - - - - - -
    - - -
    -
    - -

    Examples

    - #There is a python example of using SALOME_NamingService
    -

    -from omniORB import CORBA
    -from time import sleep
    -from LifeCycleCORBA import *
    -from SALOME_NamingServicePy import *
    -
    -# initialise the ORB
    -
    orb = CORBA.ORB_init([''], CORBA.ORB_ID)
    -
    -# create an LifeCycleCORBA instance
    -
    myLifeCycleCORBA = LifeCycleCORBA(orb)
    -
    -#create a naming service instance
    -
    naming_service = SALOME_NamingServicePy_i(orb)
    -
    -mySession = myNamingService.Resolve("/Kernel/Session")
    -mySession.GetInterface()
    -sleep(10)
    -myLocalVisu = myLifeCycleCORBA.FindOrLoadComponent("FactoryServer", "Visu")
    -
    -
    -//There is some part of a code written by C++
    -

    -SALOME_NamingService aNamingService(orb);
    -CORBA::Object_ptr anObject = aNamingService.Resolve("/Kernel/Session");
    -SALOME::Session_var aSession = SALOME::Session::_narrow(anObject);
    -Engines::Component_var aComponent = aSession->GetVisuGen();
    -myVisuGen = VISU::VISU_Gen::_narrow(aComponent);
    -
    - - diff --git a/doc/salome/tui/KERNEL/sources/static/examples_Study.html b/doc/salome/tui/KERNEL/sources/static/examples_Study.html deleted file mode 100755 index 859f6297f..000000000 --- a/doc/salome/tui/KERNEL/sources/static/examples_Study.html +++ /dev/null @@ -1,790 +0,0 @@ - - - - - - - - Main Page - - - - -   -
    - - - - - - - - -
    - - -
    -
    - -

    Examples

    -
    -
    - -
          Interfaces:
    -
    -       SALOMEDS::Study
    -       SALOMEDS::StudyBuilder
    -       SALOMEDS::StudyManager
    -       SALOMEDS::SObject
    -      SALOMEDS::SComponent
    -       SALOMEDS::SComponentIterator
    -       SALOMEDS::ChildIterator
    -
          SALOMEDS::AttributeComment
    -      
    -
    -
    -
    -
    - -
          SALOMEDS::Study interface
    -
    - -

    -
    -
    -
    -
    SComponent FindComponent( -in string aComponentName )
    -
    - Find GEOMETRY component in the opened study by its name:

    -
    -     str= os.getenv("TmpDir")
    -     if str == None:
    -         str = "/tmp"
    -     file = str+"/test.hdf"
    -
    -     openedStudy=batchmode_geompy.myStudyManager.Open(file)
    -
    -     father = openedStudy.FindComponent("GEOM")
    -     if father is None:
    -          raise  RuntimeError, "Geom - component is not found!  Wrong study is opened."
    -
    -
    -
    - -
    SObject FindObject ( in string -anObjectName )
    -
    - Find the SObject of the box by its NameAttribute "box":
    -
    - -

    -
    - -
    box = openedStudy.FindObject("box")
    - if box is None :
    -     raise  RuntimeError, "box was not found! Wrong -study is opened."
    -
    -
    - SObject FindObjectID - ( in ID aObjectID -)
    - #result: "/User data/Case1".
    -
    Find - the SObject of the box by its ID "0:1:1:2":
    -
    -
    - -
    box =openedStudy.FindObjectID("0:1:1:2")
    -
    - -
    if box is None :
    -     raise  RuntimeError, "box was not found! Wrong -ID is used."
    -
    -
    - SObject FindObjectIOR - ( in ID  aObjectIOR -)
    -
    - Find the SObject of the result on imported MED file -by it's IOR:
    -
    - theResult = myVisu.ImportFile(medFile)
    - aSObj = myStudy.FindObjectIOR(theResult.GetID())
    -
    -
    - SObject - FindObjectByPath ( in string thePath )
    -
    - Find SObject by path to it:
    -
    - # create new auxiliary componen
    t
    - aComponent = myStudyBuilder.NewComponent("Virtual Component")
    -
    - # create auxiliary subtree
    - aPath = "/Virtual Component/Case1"
    - myStudyBuilder.AddDirectory(aPath)
    -
    - aSObj = myStudy.FindObjectByPath(aPath)
    -
    -
    - void SetContext ( in string thePath) / - string GetContext ()
    -
    - Set context of the study to the created case and get it for printing:
    -
    - aComponent = myStudyBuilder.NewComponent("User data")
    - anAttr = aBuilder.FindOrCreateAttribute(aComponent, "AttributeName")
    - anAttrName = anAttr._narrow(SALOMEDS.AttributeName)
    - anAttrName.SetValue("User data")
    -
    - #Add a new case 'Case1' to the component 'User data'
    - aBuilder.AddDirectory("/User data/Case1")
    -
    - #Set a study context to '/User data/Case1'
    - aStudy.SetContext("/User data/Case1")
    -
    - #Print the current study context
    - print aStudy.GetContext()
    -
    -
    #result: "/User data/Case1".

    -
    -
    - ChildIterator - NewChildIterator ( in SObject aSO )
    -
    - Import med file and print all mesh names that this file includes -(mesh is a child of the result of imported file):
    -
    - # define file name
    - aFileName = datadir + "fra.med"
    -
    - # import file in visu module and get result
    - theVisu = batchmode_visu.myVisu
    - aResult = theVisu.ImportFile(aFileName)
    - if aResult is None : raise RuntimeError, "Error"
    - else : print "OK"
    -  
    - # get current study and its' SObject        -
    - myLocalStudy = theVisu.GetCurrentStudy()
    - aSObj = myLocalStudy.FindObjectIOR(aResult.GetID())
    - if aSObj is None : raise RuntimeError, "Error"
    - else : print "OK"
    -
    - # create iterator by SObject of the current study
    - aMeshIter = myLocalStudy.NewChildIterator(aSObj);
    -
    - # iterating in the current study (with the help of created iterator) -to find all mesh names  
    - while aMeshIter.More() :
    -         aMeshSObj = aMeshIter.Value()
    -         aMeshIter.Next()
    -         anAttr = aMeshSObj.FindAttribute("AttributeName")[1]
    -         if anAttr is None :
    -             aMeshSObj - = aMeshIter.Value()
    -             aMeshIter.Next()
    -             anAttr - = aMeshSObj.FindAttribute("AttributeName")[1]
    -         anAttr = anAttr._narrow(SALOMEDS.AttributeName);
    -         aMeshName = anAttr.Value()
    -         print "  ", aMeshName
    -
    -
    - SComponentIterator -NewComponentIterator ()
    -
    - Find the number an names of all components in the study:
    -
    - aCompItr = myStudy.NewComponentIterator()
    -
    - compNb = 0
    - while aCompItr.More():
    -     aComp = aCompItr.Value()
    -     aName = aComp.ComponentDataType()
    -     print "Component name = ", aName
    -     compNb += 1
    -     aCompItr.Next()
    -
    -
    - StudyBuilder -NewBuilder ()
    -
    -
    -
    - Create a new StudyBuilder (uses to add or modify an object in the -study ):
    -
    - myBuilder = myStudy.NewBuilder()
    -
    -
    - AttributeStudyProperties -GetProperties ()
    -
    - Get the attribute, which contains the properties of the study, and -change properties of the study by changing it:
    -
    - aProperties = myStudy.GetProperties()
    - if aProperties == None :
    -     raise  RuntimeError, "Can't create AttributeStudyProperties -attribute"
    - aProperties = aProperties._narrow(SALOMEDS.AttributeStudyProperties)
    -
    - A = aProperties
    -
    - # print stydy properties
    - print "A.GetUserName()= ", A.GetUserName()
    - res,mm,hh,dd,mnth,yy=A.GetCreationDate()
    - print "A.GetCreationDate() = ", mm,hh,dd,mnth,yy
    - print "A.GetCreationMode() = ", A.GetCreationMode()
    - print "A.IsModified() = ", A.IsModified()
    - print "A.IsLocked() = ", A.IsLocked()
    -
    - # change the properties of the study
    - if A.IsLocked() == 0 :
    -     A.SetUserName("tester"); print 'A.SetUserName("tester"), -A.GetUserName() = ', A.GetUserName()
    -     A.SetCreationDate(11,11,11,11,2002); print 'A.SetCreationDate(11,11,11,11,2002), -A.GetCreationDate() =', A.GetCreationDate()
    -     print "A.IsModified() = ", A.IsModified()
    - A.SetLocked(1)
    -
    -
    - boolean IsModified ()
    -
    - Find if study is modified:
    -
    - IsModified = myStudy.IsModified()
    -
    - if IsModified == 1:
    -     print "The study is modified and not saved"
    -
    -
    - boolean IsEmpty ()
    -
    - Find if study is empty:
    -
    - IsEmpty = myStudy.IsEmpty()
    -
    - if IsEmpty == 1:
    -     print "The study is empty"
    -
    -
    -
    -
    - -
    SALOMEDS::StudyBuilder -interface
    -
    -
    -
    -
    - SComponent -NewComponent ( in string ComponentDataType )
    -
    - Create Geometry SComponent:
    -
    - myBuilder = myStudy.NewBuilder()
    - father = myBuilder.NewComponent("GEOM")
    -
    -
    - void DefineComponentInstance ( in SComponent aComponent, -in Object ComponentIOR )

    -
    - Define the instance to the created geometry component:
    -
    - # find geom component
    - myLCC = batchmode_salome.lcc
    - geom = myLCC.FindOrLoadComponent("FactoryServer", "Geometry")
    - geom = geom._narrow(GEOM.GEOM_Gen)
    - geom.GetCurrentStudy(myStudyId)
    -
    - myBuilder = myStudy.NewBuilder()
    -
    - father = myBuilder.NewComponent("GEOM")
    - myBuilder.DefineComponentInstance(father,geom)
    -
    -
    - SObject -NewObject ( in SObject theFatherObject -)
    -
    - Create box and add it to study:
    -
    - from batchmode_geompy import *
    -
    - # create a box
    - box = geom.MakeBox(0,0,0,100,100,150)
    -
    - ior = orb.object_to_string(box)
    - box._set_Name(ior)     
    -
    - # create Geometry SComponent
    - father = myBuilder.NewComponent("GEOM")
    - A1 = myBuilder.FindOrCreateAttribute(father, "AttributeName");
    - FName = A1._narrow(SALOMEDS.AttributeName)
    - FName.SetValue("Geometry")
    - myBuilder.DefineComponentInstance(father,geom)
    -
    - # add box to Study
    - myBuilder.NewCommand()
    - newObj = myBuilder.NewObject(father)
    - A1 = myBuilder.FindOrCreateAttribute(newObj, "AttributeIOR");
    - ObjIOR = A1._narrow(SALOMEDS.AttributeIOR)
    - ObjIOR.SetValue(ior)
    - A2 = myBuilder.FindOrCreateAttribute(newObj, "AttributeName");
    - ObjName = A2._narrow(SALOMEDS.AttributeName)
    - ObjName.SetValue("Common_operation")
    - id = newObj.GetID()
    - box._set_StudyShapeId(id)
    - myBuilder.CommitCommand()
    -
    -
    - void RemoveObject ( in SObject anObject )
    -
    - # Remove CutPlanes SObject from the StudyBuilder (delete cutplanes):
    -
    - SObj=myStudy.FindObjectIOR(cutplanes.GetID())
    - myBuilder = newStudy.NewBuilder()
    - myBuilder.RemoveObject(SObj)
    -
    -
    - void LoadWith ( in SComponent sco, in -Driver Engine -) raises (SALOME::SALOME_Exception)

    -
    - # Load Visu component:
    -
    - myBuilder = openedStudy.NewBuilder()
    - SCom=openedStudy.FindComponent("VISU")
    - myBuilder.LoadWith(SCom ,myVisu)
    -
    -
    - GenericAttribute -FindOrCreateAttribute ( in SObject anObject,  -in string aTypeOfAttribute)
    -
    - Create AttributeName attribute for created component an set value -to it:
    -
    - myBuilder = myStudy.NewBuilder()
    - aComponent = myBuilder.NewComponent("User data")
    -
    - anAttr = myBuilder.FindOrCreateAttribute(aComponent, "AttributeName")
    -
    - anAttrName = anAttr._narrow(SALOMEDS.AttributeName)
    - anAttrName.SetValue("User data")
    -
    -
    - boolean FindAttribute ( in SObject anObject, out GenericAttribute -anAttribute, in string aTypeOfAttribute )
    -
    -
    Find AttributeName attribute of the field and print the -field name:
    -
    - aFieldSObj  = myStudy.FindObject("Head, -")
    -
    - myStudyBuilder.FindAttribute( aFieldSObj, anAttr, "AttributeName")
    - if res == 0:
    -     raise  RuntimeError, "Error:  Attribute not -found"
    -
    - anAttr = anAttr._narrow(SALOMEDS.AttributeName);
    - aFieldName = anAttr.Value()
    - print "      ", aFieldName
    -
    -
    - void RemoveAttribute ( in SObject anObject, in -string aTypeOfAttribute )
    -
    -
    Remove AttributeSelectable attribute of the field SObject:
    -
    -
    aFieldSObj  = myStudy.FindObject("Head, -")
    -
    - myStudyBuilder.RemoveAttribute( aFieldSObj, "AttributeSelectable")
    -
    -
    -
    void Addreference ( in  SObject -anObject, in  SObject theReferencedObject -)

    -
    - Create a reference between created SObject and the existing field:
    -
    - aFieldSObj  = myStudy.FindObject("Head, -")
    - aNewSObj = myBuilder.NewObject(myVisu)
    -
    - myBuilder.Addreference(aFieldSObj, aNewSObj)
    -
    -
    -
    void -NewCommand ()
    -
    -
    Create new command wich containes actions for changing the -properties of the study:
    -
    -
    A = myStudy.GetProperties()
    - A = aProperties._narrow(SALOMEDS.AttributeStudyProperties)
    -
    - myBuilder = myStudy.NewBuilder()
    -
    - myBuilder.NewCommand() # creates a new command
    -
    - # change the properties of the study
    - if A.IsLocked() == 0 :
    -     A.SetUserName("tester"); print 'A.SetUserName("tester"), -A.GetUserName() = ', A.GetUserName()
    -     A.SetCreationDate(11,11,11,11,2002); print 'A.SetCreationDate(11,11,11,11,2002), -A.GetCreationDate() =', A.GetCreationDate()
    -     print "A.IsModified() = ", A.IsModified()
    - A.SetLocked(1)
    -
    -
    myBuilder.CommitCommand() # commits all actions declared -within the created command
    -
    -
    - void CommitCommand()
    -

    -
    See the end of the previous example
    -
    -
    - void AbortCommand ()

    -
    - Create new command wich containes actions for changing -the properties of the study, cancel all declared actions:
    -
    - A = myStudy.GetProperties()
    - A = aProperties._narrow(SALOMEDS.AttributeStudyProperties)
    -
    - myBuilder = myStudy.NewBuilder()
    -
    - myBuilder.NewCommand() # creates a new command
    -
    - # change the properties of the study
    - if A.IsLocked() == 0 :
    -     A.SetUserName("tester"); print 'A.SetUserName("tester"), -A.GetUserName() = ', A.GetUserName()
    -     A.SetCreationDate(11,11,11,11,2002); print 'A.SetCreationDate(11,11,11,11,2002), -A.GetCreationDate() =', A.GetCreationDate()
    -     print "A.IsModified() = ", A.IsModified()
    - A.SetLocked(1)
    -
    -
    myBuilder.AbortCommand() # abort all actions declared -within the created command
    -
    -
    - void Undo () raises (LockProtection) -,
    - void Redo () raises (LockProtection)
    -
    - Create new command wich containes actions for changing -the properties of the study,
    - cancel all declared actions and then redo it with the help of undo/redo -mechanism:

    -
    - A = myStudy.GetProperties()
    - A = aProperties._narrow(SALOMEDS.AttributeStudyProperties)
    -
    - myBuilder = myStudy.NewBuilder()
    -
    - myBuilder.NewCommand() # creates a new command
    -
    - # change the properties of the study
    - if A.IsLocked() == 0 :
    -     A.SetUserName("tester"); print 'A.SetUserName("tester"), -A.GetUserName() = ', A.GetUserName()
    -     A.SetCreationDate(11,11,11,11,2002); print 'A.SetCreationDate(11,11,11,11,2002), -A.GetCreationDate() =', A.GetCreationDate()
    -     print "A.IsModified() = ", A.IsModified()
    - A.SetLocked(1)
    -
    -
    myBuilder.CommitCommand() # commits all actions declared -within the created command
    -
    -
    myBuilder.Undo() # cancels all actions of the command
    -
    -
    myBuilder.Redo() # redoes all actions of the command
    -
    -
    -
    -
    -
    SALOMEDS::StudyManager -interface
    -
    -
    -
    -
    -
    Study -NewStudy ( in string study_name )
    -
    - Create the study with the name "Test_Study":

    -
    - myNewStudy = myStudyManager.NewStudy("Test_Study")
    -
    -
    - Study Open -( in URL -aStudyUrl ) raises (SALOME::SALOME_Exception)
    -
    - Open the study saved in the HDF file:
    -
    - file = 'saved_study.hdf'
    -
    - openedStudy=myStudyManager.Open(file)
    -
    - if openedStudy == None:
    -     raise  RuntimeError, "Can't open saved study!"
    -
    -
    - void Save (in Study aStudy, in boolean -theMultifile )
    -
    -
    Open study, import med file into it and save with the old -path and filename:
    -
    -
    file = "saved_study.hdf"
    - myMedFile ="medfile.med"
    -
    - openedStudy=myStudyManager.Open(file)
    -
    - myVisu.SetCurrentStudy(openedStudy)
    - myResult = myVisu.ImportFile(myMedFile)
    -
    - myStudyManager.Save(openedStudy, 0)
    -
    -
    - void SaveAs ( in URL -aUrl, in  Study aStudy, - 
    in boolean theMultifile -)
    -
    - Open study from the file and resave it in several files (using -Multifile option while saving)
    -
    -
    file = "saved_study.hdf"
    - newfile = "resaved_study.hdf"
    -
    - openedStudy=myStudyManager.Open(file)
    - myStudyManager.SaveAs(newfile, openedStudy, 1)
    -
    -
    - void Close ( in  Study aStudy )

    -
    - Close just opened study:
    -
    - file = "saved_study.hdf"
    -
    - openedStudy=myStudyManager.Open(file)
    - myStudyManager.Close(openedStudy)
    -
    -
    -
    - -
    SALOMEDS::SObject interface
    -
    -
    -
    -
    - ID GetID ()
    -
    - Create new SObject and get its ID:
    -
    - mySObj = myBuilder.NewObject(myFather)
    -
    - myID =  mySObj.GetID()
    -
    -
    - SComponent -GetFatherComponent ()
    -
    - Get father component of the SObject:
    -
    - myFather = mySObj.GetFatherComponent();
    -
    -
    - boolean FindAttribute ( out GenericAttribute anAttribute, -in string aTypeOfAttribute )
    -
    - Find the AttributeName attribute of the field:
    -
    - aFieldSObj  = myStudy.FindObject("Head, -")
    -
    - res = aFieldSObj.FindAttribute( anAttr, "AttributeName")
    - if res == 0:
    -     raise  RuntimeError, "Error:  Attribute not -found"
    -
    -
    - ListOfAttributes -GetAllAttributes ()
    -
    - Get list of all attributes of the SObject, find the number of attributes:
    -
    - attrs = mySObj.GetAllAttributes()
    - aLen = len(attrs) # number of attributes
    -
    -
    -
    -
    - -
    SALOMEDS::SComponent interface
    -
    -
    -
    -
    - string ComponentDataType ()
    -
    - Print names of all components wich -the study contains:
    -
    - aCompItr = myStudy.NewComponentIterator()
    -
    - while aCompItr.More():
    -     aComp = aCompItr.Value()
    -     aName = aComp.ComponentDataType()
    -     print "Component name = ", aName
    -     aCompItr.Next()
    -
    -
    - Other methods are inherited.
    -
    -
    -
    -
    - -
    SALOMEDS::SComponentIterator - interface
    -
    -
    -
    -
    - boolean More (), void Next (), SComponent Value -()
    -
    - See another -example
    -
    -   
    -
    - -
    SALOMEDS::ChildIterator - interface
    -
    -
    -
    -
    - boolean More () , void Next (), SObject Value ()
    -
    - Print all mesh names of imported MED file with the help of ChildIterator:
    -
    - aResult = myVisu.ImportFile("MedFile.med")
    -        
    - myStudy = theVisu.GetCurrentStudy()
    - aSObj = myLocalStudy.FindObjectIOR(aResult.GetID())
    -
    - aMeshIter = myLocalStudy.NewChildIterator(aSObj);  # creating new -child iterator
    -
    - while aMeshIter.More() :               -                      -           # check if one more -child level exists.
    -         aMeshSObj = aMeshIter.Value() -                  -         # returns the SObject corresponding -to the current object found by the iterator.  
    -         aMeshIter.Next()     -                      -                      -   # passes the iterator to the next level.
    -         anAttr = aMeshSObj.FindAttribute("AttributeName")[1]
    -         if anAttr is None :
    -                 -aMeshSObj = aMeshIter.Value()
    -               -  aMeshIter.Next()
    -                 -anAttr = aMeshSObj.FindAttribute("AttributeName")[1]
    -         anAttr = anAttr._narrow(SALOMEDS.AttributeName);
    -         aMeshName = anAttr.Value()
    -         print "  ", aMeshName
    -
    -
    -
    - -
    SALOMEDS::AttributeComment - interface
    -
    -
    -
    - string Value (),  void SetValue ( in string value )
    -
    - Find the AttributeComment attribute of the "Head" field in the study, -print it, then change it to "My Comment" string:
    -
    - aFieldSObj  = myStudy.FindObject("Head, -")
    - anAttr = aFieldSObj.FindAttribute("AttributeComment")[1]
    -                     -anAttr = anAttr._narrow(SALOMEDS.AttributeComment);
    -                     -aFieldComment = anAttr.Value()
    -
    - print "AttributeComment", anAttr
    -
    - anAttr.SetValue ("My Comment")
    - -
    
    - 
    - - diff --git a/doc/salome/tui/KERNEL/sources/static/mapping.html b/doc/salome/tui/KERNEL/sources/static/mapping.html deleted file mode 100755 index f3f0a3f53..000000000 --- a/doc/salome/tui/KERNEL/sources/static/mapping.html +++ /dev/null @@ -1,329 +0,0 @@ - - - - - - Main Page - - - -  -
    - - - - - -
    -
    -
    - -

    -Mapping of IDL definitions to Python language.

    - -

    -Introduction

    -SALOME is a distributed client/server application using the Common -Object Request Broker Architecture (CORBA). CORBA architecture uses the -Interface Definition Language (IDL), which specifies interfaces between -CORBA objects. So with help of IDL CORBA's language independence is ensured -. Because interfaces described in IDL can be mapped to the most of currently -used programming languages, CORBA applications and components are thus -independent of the language(s) used to implement them. In other words, -a client written in C++ can communicate with a server written in Java, -which in turn can communicate with another server written in COBOL, and -so forth. -

    One important thing to remember about IDL is that it is not an implementation -language. That is, applications can't be written in IDL. The sole purpose -of IDL is to define interfaces; providing implementations for these interfaces -is performed using some other language. -

    This page contains an abridged reference manual for mapping of IDL definitions -to Python language. It will be useful for Python programmers who are not -familiar with IDL language. All examples are taken from SALOME source -files. The complete version of Python Language Mapping Specification can -be found here. -
      -

    CONTENTS: -

    -
    - -

    -Using Scoped Names

    -Python implements a module concept that is similar to the IDL scoping mechanisms, -except that it does not allow for nested modules. In addition, Python requires -each object to be implemented in a module; globally visible objects are -not supported. -

    Because of these constraints, scoped names are translated into Python -using the following rules: -

    • An IDL module mapped into a Python module. Modules containing modules -are mapped to packages (i.e., directories with an __init__ module -containing all definitions excluding the nested modules). An implementation -can chose to map toplevel definitions (including the module CORBA) to modules -in an implementationdefined package, to allow concurrent installations -of different CORBA runtime libraries. In that case, the implementation -must provide additional modules so that toplevel modules can be used without -importing them from a package. -

    • For all other scopes, a Python class is introduced that contains all -the definitions inside this scope. -

    • Other global definitions (except modules) appear in a module whose -name is implementation dependent. Implementations are encouraged to use -the name of the IDL file when defining the name of that module. -

    For instance, -

    -
    module SALOMEDS {
    - interface StudyManager {
    -  void  Close(in Study aStudy);
    - };
    -};
    -
    -would introduce a module SALOMEDS.py, which contains the following definitions: -
    -
    # module SALOMEDS.py
    -class StudyManager:
    -  def _Close(self,aStudy):
    -   pass #interfaces are discussed later
    -
    -To avoid conflicts, IDL names that are also Python identifiers are prefixed -with an underscore (‘_’). -

    Back to the contents -

    -

    -Mapping for Template and Array Types

    -Both the bounded and the unbounded string type of IDL are mapped to the -Python string type. Wide strings are represented by an implementation-defined -type with the following properties: -

    • For the wide string X and the integer n, X[n] returns the nth character, -which is a wide string of length 1. -

    • len(X) returns the number of characters of wide string X. -

    • CORBA.wstr(c) returns a wide character with the code point c in an -implementation-defined encoding. -

    • X+Y returns the concatenation of wide strings X and Y. -

    • CORBA.word(CORBA.wstr(c)) == c -

    The sequence template is mapped to sequence objects (e.g., tuples or -lists). Applications should not assume that values of a sequence type are -mutable. Sequences and arrays of octets and characters are mapped to the -string type for efficiency reasons. -

    For example, given the IDL definitions -

    -
    module SALOMEDS {
    -  typedef sequence <string> StringSeq;
    -   
    -   interface AttributeTableOfInteger : GenericAttribute {
    -
    -    void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
    - };
    -};
    -
    -a client could invoke the operation -
    -
    print My_AttributeTableOfInteger.SetRowTitles(["X","F"])
    -
    -Array types are mapped like sequence templates. The application in this -example also expects an IncorrectArgumentLength exception if it passes -sequences that violate the bounds constraint or arrays of wrong size. -

    Another example with arrays. The following IDL definition -

    -
    module SALOMEDS {
    - typedef sequence<GenericAttribute> ListOfAttributes;
    - interface SObject {
    -  ListOfAttributes     GetAllAttributes();
    - };
    -};
    -
    -is equal to -
    -
    import SALOMEDS
    -
    -attributes=[]
    - 
    -attributes = My_SObject.GetAllAttributes()
    -
    -length = len(attributes)
    -
    -print "Attributes number = ", length
    -print attributes
    -
    -Back to the contents -

    -

    -Mapping for Objects and Operations

    -A CORBA object reference is represented as a Python object at run-time. -This object provides all the operations that are available on the interface -of the object. Although this specification does not mandate the use of -classes for stub objects, the following discussion uses classes to indicate -the interface. -

    The nil object is represented by None. -

    If an operation expects parameters of the IDL Object type, any Python -object representing an object reference might be passed as actual argument. -

    If an operation expects a parameter of an abstract interface, either -an object implementing that interface, or a value supporting this interface -may be passed as actual argument. The semantics of abstract values then -define whether the argument is passed by value or by reference. -

    Operations of an interface map to methods available on the object references. -Parameters with a parameter attribute of in or inout are -passed from left to right tothe method, skipping out parameters. -The return value of a method depends on the number of out parameters -and the return type. If the operation returns a value, this value forms -the first result value. All inout or out parameters -form consecutive result values. The method result depends then on -the number of result values: -

    • If there is no result value, the method returns None. -

    • If there is exactly one result value, it is returned as a single -value. -

    • If there is more than one result value, all of them are packed -into a tuple, and this tuple is returned. -

    Assuming the IDL definition -

    -
    module SALOMEDS{
    - interface StudyBuilder{
    -  boolean FindAttribute  ( in SObject anObject, 
    -                           out GenericAttribute anAttribute, 
    -                           in string aTypeOfAttribute );
    - };
    -};
    -
    -a client could write -
    -
    from SALOMEDS import StudyBuilder;
    -my_StudyBuilder=...
    -  
    -  res,A=my_StudyBuilder.FindAttribute(Sobj, "AttributeSequenceOfReal")
    -
    -In this example A corresponds to the return value anAttribute -and res to the boolean return value. -

    If an interface defines an attribute name, for example, the attribute -is mapped into an operation _get_name. If the attribute is not readonly, -there is an additional operation _set_name. -

    The IDL definition -

    -
    module SALOMEDS{
    - interface Study{
    -  attribute string Name;
    - };
    -};
    -
    -is equal to the following -
    -
    from SALOMEDS import Study
    -My_Study=...
    -  Name=My_Study._get_name();
    -  Name=My_Study._set_name();
    -
    -Back to the contents -

    -

    -Narrowing Object References

    -Python objects returned from CORBA operations or pseudo-operations (such -as string_to_object) might have a dynamic type, which is more specific -than the static type as defined in the operation signature. -

    Since there is no efficient and reliable way of automatically creating -the most specific type, explicit narrowing is necessary. To narrow an object -reference A to an interface class AttributeSequenceOfReal, -the client can use the following operation -

    -
    A = A._narrow(SALOMEDS.AttributeSequenceOfReal)
    -
    -Back to the contents -

    -

    -Mapping for Exceptions

    -An IDL exception is translated into a Python class derived from CORBA.UserException. -System exceptions are derived from CORBA.SystemException. Both base classes -are derived from CORBA.Exception. The parameters of the exception are mapped -in the same way as the fields of a struct definition. When raising an exception, -a new instance of the class is created; the constructor expects the exception -parameters. For example, the definition -
    -
    module SALOMEDS{
    - interface StudyBuilder{
    -  exception LockProtection {};
    -  void CommitCommand() raises(LockProtection);
    - };
    -};
    -
    -could be used caught as -
    -
    from SALOMEDS import StudyBuilder;
    -my_StudyBuilder=...
    -try:
    -  my_StudyBuilder.CommitCommand();
    -except StudyBuilder.LockProtection,value:
    -  print "Error! Study is locked for modifications"
    -
    - -


    Back to the contents -

    -

    -Mapping for Enumeration Types

    -An enumeration is mapped into a number of constant objects in the name -space where the enumeration is defined. An application may only test for -equivalence of two enumeration values, and not assume that they behave -like numbers. For example, the definition -
    -
    module VISU {
    - interface PrsObject{
    - 
    -  enum PrsObjType{ TCURVE, TTABLE, TMESH, TCONTAINER,
    -                   TSCALARMAP, TISOSURFACE, TDEFORMEDSHAPE,
    -                   TCUTPLANES, TVECTORS };
    - };
    -};
    -
    -introduces the objects -
    -
    from VISU import PrsObject
    -VISU.PrsObjType.TCURVE,VISU.PrsObjType.TTABLE,VISU.PrsObjType.TMESH,VISU.PrsObjType.TCONTAINER,
    -VISU.PrsObjType.TSCALARMAP,VISU.PrsObjType.TISOSURFACE,VISU.PrsObjType.TDEFORMEDSHAPE,VISU.PrsObjType.TCUTPLANES,
    -VISU.PrsObjType.TVECTORS
    -
    -Back to the contents -

    -

    -Mapping for Structured Types

    -An IDL struct definition is mapped into a Python class or type. For each -field in the struct, there is a corresponding attribute in the class with -the same name as the field. The constructor of the class expects the field -values, from left to right. For example, the IDL definition -
    -
    struct SDate {
    -               short Second;
    -               short Minute;
    -               short Hour;
    -               short Day;
    -               short Month;
    -               short Year;
    -             };
    -
    -could be used in the Python statements -
    -
    Date=SDate(30, 12, 15, 26, 1, 79)
    -print Date.Second,Date.Minute,Date.Hour,Date.Day,Date.Month,Date.Year
    -
    - -
    -Back to the contents
    - - - - diff --git a/doc/salome/tui/KERNEL/sources/static/ns_f3-1.jpg b/doc/salome/tui/KERNEL/sources/static/ns_f3-1.jpg deleted file mode 100755 index fd4f4560240a2a12e80d2e7ab6a942c046e80114..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8650 zcmb_=2T)XNm+fhC&bdiK6C{YFCPNbiktjJUAUR7E6i|ZDga!f0L2^_wG)c)xBtz5W zBxsWb1cc$Ec?VGuq6@cQQnuZzx0s#Q%_5yAe z0A+vx4-X#?mjE9hpOBD%h=hiegqWCwk&2p}hJ}fZm4%6!nH_SEhn+)!lbM-U;;z7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K48x&E0N0|}#p#f3o+FDgxvQhoJ8-JxAIqQn69Th(L@Tk(4jBKWI8BSSv6eUS8-e8bmVlKS-UeamSf zu_M36T+gSDi!V4O;SYaI%4F>UQD|a^g2!36Y6M8f@aAFFHn>5Z_5>UF@l~d(XeaL6 z<&d)VE?Nt=3tgay1XB3O7~IvS3qpm(+C>h13B@gqOzheN-UzE=<=#Wdrt%fVo4)1r z3C-{Ex{7UVG%mW8xS~p@Z$Fsi_R>5j1n3)&%m>D^?i=fuumpaVi}UfHa6#=y?THbO zlD&9Qv0zl+GKG_vsUnbRrNU~fK0L@*q^Q8_)`plHzqM>D&spntZ)5x`&i^Hl-^~9T DlLFx% diff --git a/doc/salome/tui/KERNEL/sources/static/overview_Kernel.html b/doc/salome/tui/KERNEL/sources/static/overview_Kernel.html deleted file mode 100755 index 7f64f4369..000000000 --- a/doc/salome/tui/KERNEL/sources/static/overview_Kernel.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - Main Page - - - -  -
    - - - - - - -
    -
    -
    - - -

    General overview -

    -

    Table of contents

    - - -
    -

    1. Introduction

    -

    The kernel corresponds to the minimal set of services required for the use of SALOME components (Supervisor, IAPP). -The kernel is also used by application software components (solver) and their container. -The kernel is associated to a unique user who can launch only one kernel at once. -The kernel is launched and destroyed by voluntary actions of the user. These functions are realized via the -use of scripts.

    -

    The list of the kernel services related to communication issues is:

    -
      -
    • The Naming service
    • -
    • The Session service
    • -
    • The Life Cycle service
    • -
    • The Registry service
    • -
    • The Notification service
    • -
    -

    This list is enlarged with CORBA independent services :

    - -
      -
    • The module catalog service
    • -
    • The Data Type Catalog service
    • -
    • The resource catalog service
    • -
    -

    SALOME kernel module also encapsulates the Engine -Back to the contents -

    2. Basic principles

    -

    The SALOME user's desktop is a process on a machine. This process includes:

    -
      -
    • A graphic interface (based on Qt),
    • -
    • A text interface (Python interpreter),
    • -
    • A 3D visualization window shared by components.
    • -
    -

    SALOME Modules decompose into an interface (widgets GUI, text mode TUI, 3D visualization V3D) and -an engine.

    -

    The description of a module and its components is obtained by consulting the module catalog.

    -

    The interface is dynamically loaded in the process of the SALOME user's desktop. The engine is a CORBA -server launched either on the local machine or on the distant machine.

    -

    The engine (CORBA server) is created by a factory (or container). -This factory is also a CORBA server. Several containers can be present on a machine. -Some containers are specialized for types of components requiring a specific management. -For example, a specific container is required for components performing parallel calculations. -The engine includes at least a dynamically linked library in the container process. -This library is the implementation of the CORBA server associated to the engine. -If the engine is built from a pre-existent executable code, the library is simply a wrapper of the encapsulated code. -It launches the code in a separate process. Wherever possible, the code is included into the dynamic library. -

    The container is one of the kernel services. If one needs to create a container on a distant machine, one creates a process resuming a part of the kernel services. The kernel can create other containers on distant machines via the trader (rsh). All the containers and the kernel share the same CORBA naming service with which they register.

    -

    The user reaches the functions of various SALOME'S components, either in graphic interactive mode (GUI) or in command mode ( TUI), via a Python interpreter.

    -Back to the contents - -

    3. Services and features of the SALOME kernel module

    -

    This section gives a brief overview of the services composing the kernel module. - The Life Cycle and Naming - services are described in separate chapters of this reference manual.

    - -

    3.1 Session service

    -

    SALOME session describes the period starting from the kernel creation and - ending with its destruction. During this period the user can connect the session - and disconnect from it without ending this session. One connection log could - be written. A priori, no information resulting from another (past) session can - be used by the current session.

    -

    Implementation of this service in SALOME application is provided by the class -Session encapsulated in the package -SALOME.

    - -

    3.2 Registry service

    -

    The active component registry should contain:

    - -
      -
    • The list of the active components
    • -
    • The list of the active containers during a SALOME session.
    • -
    -

    It should allow the state of a session. It also should allow to know if session can be stopped.

    -

    The API reference for this service is not included in the current version of the reference manual.

    - -

    3.3 Notification service

    -

    The notification service is a kernel function which allows exchanging of events between CORBA objects.

    -

    In comparison with traditional CORBA event service, SALOME notification service allows to:

    -
      -
    • Filter the events,
    • -
    • Structure the events,
    • -
    • Establish quality policies of services,
    • -
    • Subscribe to various event channels.
    • -
    -

    The API reference for this service is not included in the current version of the reference - manual.

    - -

    3.4 Module catalog service

    -

    There are two module catalogs in SALOME application:

    -
      -
    • General module catalog : This first catalog is common to all SALOME users once the the platform is installed (for example for a particular company or a service). This catalog will be managed by the integrator or the administrator of the platform, -
    • Personal module catalog : A specific catalog for every user (possibly empty). This catalog should notably allow the developers to test a new component before integrating it into the general catalog. -
    -

    The objective of these two module catalogs is to:

    -
      -
    • List the available modules; -
    • Allow the addition, the modification and the deletion of a module in catalogs; -
    • Look for a module and\or a service fulfilling some given criteria (in catalogs); -
    -

    Implementation of this service in SALOME application is provided by two classes -ModuleCatalogand AComponent encapsulated in the package -SALOME_ModuleCatalog.

    - -

    3.5 Data type catalog

    - -

    The data exchanged between components services have definite types. During description of input, output, and -configuration parameters of components in the module catalog, the -definition of the parameters types is taken from data type catalog. During the editing of execution of -graphs, it is necessary to check that the connections output-input parameters are of compatible -types.

    -

    The data types correspond to CORBA object classes, including attributes and access methods (defined by their IDL). -These types can be created by specialization of generic data types.

    -

    The purpose of the data type catalog is to:

    -
      -
    • List the available data types in the catalog; -
    • Browse the type hierarchy to check the compatibility of types (specialized output toward generic input); -
    • Allow the addition, the modification and the deletion of a data type in the catalog; -
    -

    The API reference for this service is not included in the current version of the reference - manual.

    -

    3.6 Resource catalog

    - -

    This catalog describes machines, possible types of container on a machine, resources of machines... This catalog is used by the SALOME LifeCycle service.

    -

    The API reference for this service is not included in the current version of the reference - manual.

    - -

    3.7 Engine

    -

    The engine represents a shared library which can be dynamically loaded by a container. The container can load this library, -given an interface name and an implementation -name. The container dynamically resolves an extern_C function in the library, -which constructs the CORBA Engine servant object.

    -

    The SALOME engine in - the current version of the application is implemented - as Engines package of interfaces. It encapsulates two classes: Component, Container.

    -

    The API refernce for Engines package can be found here. -

    -

    3.7.1 Component class

    -

    This class is used for interaction between the container and the component and between the components inside the container. -

    -

    The API reference for this class can be found here.

    - -

    3.7.2 Container class

    -

    This class provides a set of methods which are necessary for definition of the process of loading and registration of new components in SALOME application.

    -

    The API reference for this class can be found here.

    - -Back to the contents - - diff --git a/doc/salome/tui/KERNEL/sources/static/overview_Life_Cycle.html b/doc/salome/tui/KERNEL/sources/static/overview_Life_Cycle.html deleted file mode 100755 index f1a1fb8af..000000000 --- a/doc/salome/tui/KERNEL/sources/static/overview_Life_Cycle.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Life Cycle service Description - - - - - - -  -
    - - - - - - -
    -
    -
    - - -

    Life Cycle service Description

    -

    Introduction

    -

    The objective of this document is to give the users of SALOME - application a brief overview of the Life Cycle service implemented in SALOME. - A complete version of the LifeCycle service specification edited by the Object Management Group, Inc.(OMG) can be found here. -

    -

    Table of contents

    - -
    - -

    1. Overview

    - -

    Life Cycle service defines services and conventions for creating, deleting, copying and moving objects. -Because CORBA-based environments support distributed objects, the Life Cycle service defines conventions that allow clients to perform -life cycle operations on objects in different locations. This overview describes the life cycle problem for distributed object systems.

    -
    - - -

    2. SALOME Life Cycle service description

    -

    The SALOME Life Cycle service represents a partial implementation of the CORBA LifeCycle service.

    -

    From general point of view, the SALOME Life Cycle service allows to find or load with the help of a given container a definte SALOME component with its further -initialization and registration in the Naming service.

    -

    Container - it's a certain engine realizing the mechanism of loading a SALOME module.

    -

    Component - it's a certain abstract shell wrapping SALOME modules, performing all operations concerned with their initialization and registration.

    -

    From the point of view of the service user, the Life Cycle provides a set of functions allowing to :

    -
      -
    • Locate a machine (more generally a container) by a logical set of required features (of both container and - machine);
    • -
    • Load components on the obtained containers;
    • -
    • Create a container;
    • -
    • Obtain the container containing a given component;
    • -
    • Treat the list of the active components;
    • -
    • Treat the list of the available containers.
    • -
    - - - -

    The SALOME Life Cycle is a CORBA server. This server at its initialization is registered with the naming service.

    -

    The Life Cycle service is invoked to find a container and use it to load a -component. It supplies, as parameters, the type of container and the machine features required for loading -a given component. -

    -

    The Life Cycle service then returns a CORBA reference of a launched container.

    -

    Containers are launched on demand depending on components to be loaded. The Life Cycle service manages loading of containers.

    -

    When there is no launched container matching the request the Life Cycle service invokes loading of the correct type of container on a correct machine via a rsh type command.

    -

    The Life Cycle service interrogates containers to have information about the dynamic state of the machine (load). It contains (and update) the state of the active containers.

    -

    The Life Cycle service can implement a loading strategy for new containers on new machines, depending on the state of the already launched containers.

    -

    The Life Cycle service can stop containers at the end of session on -demand.

    - -

    In SALOME platform the Life Cycle service is implemented in SALOME_Life CycleCORBA class. The API refernce for the methods of this class -can be found here.

    -Back to the contents -
    - - -
    - - - diff --git a/doc/salome/tui/KERNEL/sources/static/overview_Naming.html b/doc/salome/tui/KERNEL/sources/static/overview_Naming.html deleted file mode 100755 index 8af6b10ec..000000000 --- a/doc/salome/tui/KERNEL/sources/static/overview_Naming.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - Naming Service Description - - - -  -
    - - - - - - -
    -
    -
    - - -

    Naming Service Description

    -
    -

    Introduction

    -

    This page contains an abridged version of the Naming Service specification - edited by the Object Management Group, Inc.(OMG). The objective of this document is to give the users of SALOME - application a brief overview of the Naming Service implemented in SALOME. - A complete version of this document can be found here. -

    -
    -

    Table of contents

    - - -
    - -

    1. Overview

    -

    This chapter presents the OMG Naming Service and explains how the Naming Service can be used to decouple clients and servers by -providing an external reference exchange mechanism. The chapter also covers how to solve the bootstrapping problem for clients and -servers by controlling their configuration. -

    - -

    In practice, copying stringified references from a server to all its clients is clumsy and does not scale. The Naming Service provides a way -for servers to advertise references under a name, and for clients to retrieve them. The advantages are: -

    -
      -
    • Clients and servers can use meaningful names instead of having to deal with stringified references.
    • -
    • By changing a reference in the service without changing its name, you can transparently direct clients to a different object.
    • -
    • The Naming Service solves the bootstrapping problem because it provides a fixed point for clients and servers to rendezvous.
    • -
    -

    The Naming Service is much like a white pages phone book. Given a name, it - returns an object reference.

    - -

    The terminology used in description of NamigService is the following:

    - -
      -
    • A name-to-IOR association is called by a name binding.
    • -
    • Each binding identifies exactly one object reference, but an object reference - may be bound more than once (have more than one name).
    • -
    • A naming context is an object that contains name bindings. - The names within a context must be unique. Naming contexts can contain bindings - to other naming contexts, so naming contexts can form graphs. Binding contexts - in other contexts creates a naming graph — a directed graph with nodes - and labeled edges where the nodes are contexts. A naming graph allows more - complex names to reference an object. Given a context in a naming graph, a - sequence of names can reference an object. This sequence of names (called - a compound name) defines a path in the naming graph to navigate the - resolution process. Figure 1-1 shows an example of a naming graph.
    • -
    • Binding a name to a context means to add a name–IOR pair to a context.
    • -
    • Resolving a name means to look for a name in a context and to obtain the - IOR bound under that name.
    • -
    - - -
    -

    Figure 1-1 A Naming Graph

    - Back to the contents -
    - -

    2. SALOME Naming Service

    - -

    2.1 Introduction

    -

    The SALOME Naming Service is a kernel function which supplies a name directory - hierarchy for pointing out CORBA objects. This name directory hierarchy allows, - from symbolic names, to dynamically find the references of distributed SALOME - objects, without information about their location. SALOME objects which can - be reached via the naming service are:

    - -
      -
    • The kernel services
    • -
    • Containers -
    • SALOME components instances -
    -

    The name directory hierarchy in SALOME represents a graph of directories containing - symbolic associations name-reference on objects. (It has been described in the - previous section)

    - -

    2.2 Definitions

    -
    -
    Directory
    -
    Context of names containing symbolic associations name-reference on objects.


    -
    "/"
    -
    Character used in SALOME to separate two names of a directory


    -
    Access path
    -
    List of names (separated by "/" character representing the path to be followed - in the graph to reach an association name-reference (the last name in the sequence).
    -
    -
    Note:An object can be referenced by several symbolic names - in one or several directories.
    - -

    2.3 Partition of SALOME name directory hierarchy

    -

    The hierarchical organization of the SALOME name directory is not completely frozen . -Because the framework allows the simultaneous opening of several studies, the following levels are determined:

    -
     
    - /Kernel
    - /Container/
    -	       /Component	
    -
    - -

    2.4 SALOME name directory persistence

    -

    During a SALOME session, stopping a server in charge of the Naming Service - doesn't imply the loss of the contents of the SALOME name directory hierarchy. - A backup file is produced and can be used to restart the Naming Service. So, - one can recover the state of the SALOME name directory hierarchy at restart - time. During such breakdown, every call to any function of the Naming Service - invokes an exception of type Unreachable service.

    - -

    2.5 SALOME Naming Service features

    -

    Usage and administration of the name directory hierarchy is realized by means of the following functions:

    -
      -
    • Recording and recovering of the reference of an object
    • -
    • Searching for a symbolic name
    • -
    • Creating of a directory, reading and modifying of the current directory
    • -
    • Destructing of a symbolic name and a diredtory
    • -
    -

    The access path used in these functions can be defined, either from the root, or from any -directory of SALOME name directory hierarchy.

    - -

    In SALOME there is s standard interface of Naming Service, and any user can - use it for binding and finding objects. How to use it, it's possible to find - in any CORBA documentation. However in SALOME there is an additional layer which - hides calls to standard interface.

    -

    The precise API reference for these functions you can find here.

    -

    Here is a short list of public methods which are used for working with the SALOME Naming Service:

    -
    -

    Register

    -
    Method which register object reference in the naming service with given name. It makes assignment between IOR and stringified name. -Then it's possible to get object reference from name using "Resolve" method.
    -

    -

    Resolve

    -
    Try to obtain object reference from name. It's necessary before publishing - IOR in the Naming Service by Register method.
    -

    -

    Find

    -
    The purpose of this method is to research a name from the current directory - of the naming service. Then if there is occurrence the naming service changes - directory to go to the directory where last occurrence is found.
    -

    -

    CreateDirectory

    -
    This method allows to create one or several directories in the current directory
    -

    -

    ChangeDirectory

    -
    Moves the current directory. The current directory is moved to the root directory if the input parameter Name is "/".
    -

    -

    CurrentDirectory

    -
    Method allowing to get the current directory.
    -

    -

    list

    -
    Method allowing to list and print the whole context beginning from the current context.
    -

    -

    list_directory

    -
    Method to get all contexts contained in the current directory.
    -

    -

    DestroyName

    -
    Destroys a symbolic name-object reference association.
    -

    -

    DestroyDirectory

    -
    Destroys an empty directory.
    -
    - -Back to the contents -
    - - diff --git a/doc/salome/tui/KERNEL/sources/static/overview_Study.html b/doc/salome/tui/KERNEL/sources/static/overview_Study.html deleted file mode 100755 index 0526536e9..000000000 --- a/doc/salome/tui/KERNEL/sources/static/overview_Study.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - Main Page - - - -  -
    - - - - - - -
    -
    -
    - - -

    General overview -

    -
    -

    Table of contents

    - -

    1. Introduction

    -

    In SALOME application the Study module is used for management (creation, saving - etc.) of studies. In the framework of the platform, a study represents a working - document allowing to manage the data produced by various components which are - integarted into SALOME.
    -

    -

    2. Representation of the study

    -

    The study represents a set of objects that we will call Study Objects or SObjects. - The study can be represented as a tree, every node of that tree containing a - SObject. SObjects in the study can be values or references towards data of calculation, - graphs of calculation, trees of construction of detail(room), results. Every - SOject of the study is characterised by a unique identifier in the study.

    -

    The study allows to describe the following relations:

    -
      -
    • The link between the transient and persistent values of an SObject.
    • -
    • The relations between the SObjects produced by different components.
    • -
    • The relations between the SObjects produced by the same component.
    • -
    • The link between an object and its user name.
    • -
    • The access to the definition of the component which produce an object of - the study.
    • -
    • The access to instance of the component (if this one exists) which has produced - this SObject of the study.
    • -
    - -

    Every SObject in the study contains a set of attributes. These attributes represent - a set of definitions associated to that object, they can contain values or corba - references towards the data contained in the internal data structure of a component.

    -

    As the structure of the study is tree-like it is possible to associate sub-objects - to objects.

    -

    As particular object, the study contains Component Data which are labels associated to the component -which produce data in the study. It is to this object that we can associate attributes containing ID which -we shall allow to identify the type of the component and also its instance. Objects produced by a -component will be sub-objects of the coresponding Data Component.

    -

    For example Component Data GEOM will contain the data produced by the component - Geom.

    - - - - - -
    GEOM contains the data produced by the component GEOM. The component MESH - contains a SObject Mesh_1 wich refers to the SObject identified - by ID4 corresponding to Geometrie_1.
    -

    We distinguish two forms of the study, the study opened in a session SALOME and the study in the -persistent format. These two formats are described in the following sections

    -

    2.1 Study in transient format

    -

    The representation of the study in memory will be based on the document OCAF (supplied by OCC). -The document OCAF can be seen as a tree, every node of that tree is identified by a tag representing an integer value.

    -

    The exploration of the tree from the root to a node supplies a sequence of tags which establishes a -unique identifier ID. ID represents a character string containing the sequence of tags separated by -one ':'.

    -

    For example 0:1:12:4

    -

    To every node we can associate a set of attributes.

    -

    The attributes which the study can contain can be of the following types:

    -
      -
    • All standard attributes supplied by OCC (package TdataStd) which allow to define (integers, -real, strings, identifiers, references etc.)
    • -
    • Attributes which contain CORBA references.
    • -
    • Attributes which contain the path HDF to reach the persistent datum. (Cf. the following chapter)
    • -
    -

    Remark: it is the study which takes care to build the attributes from the values which are passed to it, so -an attribute is always in a study, and it knows the study object to which it is attached.

    -

    Example of a Study Object as a set of various attributes.

    - -

    2.2 Study in persistent format

    -

    To store a study HDF format is used, this tool allows to represent persistent data in the form of a tree.

    -

    Under the root of the persistent document, you can find a set of nodes:

    -
      -
    • The first node contains the skeleton of the study. The skeleton consists of the identifiers of the -objects, as well as the references among them.
    • -
    • There is also one node for every component which has produced data during this SALOME session. Under each of these -node there are values of the data produced by this component.
    • -
    -

    2.3 Link between transient and persistent formats

    -

    It will be possible to complete the definition of one object in the study by associating to it an attribute -HDFPath which will contain the path to the persistent data.

    - -

    Back to the contents

    -

    3. Services and features of the study

    -

    The Study in SALOME application possess a wide functionality. This functionality is provided by a set of classes which are described -below. -

    3.1 Study class

    -

    The purpose of the Study class is to manage the data produced by various components - of SALOME platform. Most of the Study operations are handled by the StudyManager - and the StudyBuilder. What - is left in the Study class are elementary inquiries. A Study is explored by - a set of tools, mainly iterators , which are described further.

    -

    Nevertheless, the Study class contains a set of methods providing:

    - -
      -
    • management of study properties -
    • search for SObjects. -
    • search for SComponents -
    • creation of a new StudyBuilder, ComponentIterator, ChildIterator etc. -
    -

    The API reference for this class can be found here.

    -

    3.2 StudyBuilder class

    -

    StudyBuilder supplies basic services to edit the study. The edition of the study is made by the -component. Every component will use the basic services of the StudyBuilder allowing to write and publish objects.

    -

    StudyBulder provides the following functionality:

    -
      -
    • creation, modification or deletetion of SObjects in the study
    • -
    • creation or removal of SComponents
    • -
    • undo/redo functionality. For that purpose it supplies the methods NewCommand, - CommitCommand, AbortCommand.
    • -
    -

    The API reference for this class can be found here.

    -

    3.3 StudyManager class

    -

    The purpose of the Manager is to manipulate Studies. Since SALOME is a multi-document - application during a working session you can operate as many stadies as you - wishes to create.

    -

    For that purpose StudyManager provides the following functionality:

    -
      -
    • creation, opening, closing and saving studies
    • -
    • navigation through a set of studies present in the current working session
    • -
    • copy/paste of the objects in the study functionality.
    • -
    -

    The API reference for this class can be found here.

    -

    3.4 SObject class

    -

    The objects in the study are built by the StudyBuilder. -The SObject class provides methods for elementary inquiries, like getting an object ID or its attribuites.

    -

    The API reference for this class can be found here.

    -

    3.5 SComponent class

    -

    The SComponent class establishes in the study a permanent assocition to the components -integrated into SALOME platform. The SComponent interface is a specialization of the SObject - class. It inherits the most of its methods from the SObject class which are used for management of the SComponents.

    -

    The API reference for this class can be found here.

    -

    3.6 ChildIterator class

    -

    It is one of the tools destined for exploration of the study. This class contains a set of methods allowing to get -the access to all identified objects which are sons of another identifiedobject.

    -

    The API reference for this class can be found here.

    -

    3.7 SComponentIterator

    -

    This is the second tool destined for exploration of the study. This interface contains the methods allowing to iterate over all SComponents in the list. - The search is started from the first SComponent in the list.

    -

    The API reference for this class can be found here.

    - -

    3.8 GenericAttribute class

    -

    GenericAttribute represents a base class for all attributes which can be assigned to the SObjects created in the study. All attribute classes - derive from this classe and inherit its methods.

    -

    The API reference for this class can be found here.

    - -

    In SALOME application a SObject can possess the following attributes:

    - - - - - -
    - -
    -

    3.9 UseCaseBuilder class

    -

    UseCase in the study represents a user-defined subtree, containing all or some of the objects which currently exist -in the study. The UseCaseBuilder class contains a set of methods used for management (creation, deletion etc) of this sub-tree in the study.

    -

    The API reference for this class can be found here.

    - -

    3.10 UseCaseIterator

    -

    This class represents an exploration tool for the UseCase. It contains a set of methods used for iteration over the objects in the UseCase.

    -

    The API reference for this class can be found here.

    - -

    3.11 Callback class

    -

    The StudyBuilder can be created with the method NewBuilder. While invocation of this method a new object of the class - Callback is created and this object is assigned to the newly created Builder as callback which should be called - when adding and removing the objects.

    -

    The API reference for this class can be found here.

    - -

    3.12 Driver class

    - -

    This class represents a common tool for all components integrated into SALOME - application, that allows them to communicate with the study. It contains a set - of methods which can be called by any component and which provide the following - functionality: -

      -
    • publishing in the study of the objects created by a definite component
    • -
    • saving/loading of the data created by a definite component. These methods - are called by the StudyManager when loading/saving a study containing the - data created by a definite component.
    • -
    • transforming of the transient references into persistant references (or - vice versa) of the SObjects when saving (or loading) a study
    • -
    • copy/paste common functionality. These methods can be called by any component - in order to copy/paste its object created in the study
    • -
    -

    The API reference for this class can be found here.

    -

    Back to the contents

    - - diff --git a/doc/salome/tui/KERNEL/sources/static/page2.html b/doc/salome/tui/KERNEL/sources/static/page2.html deleted file mode 100755 index 40eed1f98..000000000 --- a/doc/salome/tui/KERNEL/sources/static/page2.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - Main Page - - - -  -
    - - - - - - -
    -
    -
    - - - - - -

    Mapping of SALOME IDL definitions to Python language. -

    - - diff --git a/doc/salome/tui/KERNEL/sources/static/tree.js.in b/doc/salome/tui/KERNEL/sources/static/tree.js.in deleted file mode 100755 index b7422d7b8..000000000 --- a/doc/salome/tui/KERNEL/sources/static/tree.js.in +++ /dev/null @@ -1,200 +0,0 @@ -foldersTree = gFld("SALOME v.@VERSION@ ", "", "") - insDoc(foldersTree, gLnk("Main Page", "", "main.html")) - -aux1 = insFld(foldersTree, gFld("TUI Reference Guide", "")) - aux2 = insFld(aux1, gFld("Modules", "")) - aux3 = insFld(aux2, gFld("SALOME STUDY module", "")) - insDoc(aux3, gLnk("Overview", "", "overview_Study.html")) - aux4 = insFld(aux3, gFld("Packages", "")) - insDoc(aux4, gLnk("SALOMEDS", "", "namespaceSALOMEDS.html")) - insDoc(aux3, gLnk("Examples", "", "examples_Study.html")) - aux3 = insFld(aux2, gFld("SALOME KERNEL module", "")) - insDoc(aux3, gLnk("Overview", "", "overview_Kernel.html")) - aux4 = insFld(aux3, gFld("Packages", "")) - insDoc(aux4, gLnk("SALOME_ModuleCatalog", "", "namespaceSALOME__ModuleCatalog.html")) - insDoc(aux4, gLnk("SALOME", "", "namespaceSALOME.html")) - insDoc(aux4, gLnk("Engines", "", "namespaceEngines.html")) - insDoc(aux3, gLnk("Examples", "", "examples_Kernel.html")) - - -/*! Data structures -*/ - insDoc(aux1, gLnk("Data Structures", "", "annotated.html")) - -/*! insDoc(aux1, gLnk("SALOME_ModuleCatalog::Acomponent", "", "interfaceSALOME__ModuleCatalog_1_1Acomponent.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeComment", "", "interfaceSALOMEDS_1_1AttributeComment.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeDrawable", "", "interfaceSALOMEDS_1_1AttributeDrawable.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeExpandable", "", "interfaceSALOMEDS_1_1AttributeExpandable.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeInteger", "", "interfaceSALOMEDS_1_1AttributeInteger.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeIOR", "", "interfaceSALOMEDS_1_1AttributeIOR.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeLocalID", "", "interfaceSALOMEDS_1_1AttributeLocalID.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeName", "", "interfaceSALOMEDS_1_1AttributeName.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeOpened", "", "interfaceSALOMEDS_1_1AttributeOpened.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributePersistentRef", "", "interfaceSALOMEDS_1_1AttributePersistentRef.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributePixMap", "", "interfaceSALOMEDS_1_1AttributePixMap.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributePythonObject", "", "interfaceSALOMEDS_1_1AttributePythonObject.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeReal", "", "interfaceSALOMEDS_1_1AttributeReal.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeSelectable", "", "interfaceSALOMEDS_1_1AttributeSelectable.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeSequenceOfInteger", "", "interfaceSALOMEDS_1_1AttributeSequenceOfInteger.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeSequenceOfReal", "", "interfaceSALOMEDS_1_1AttributeSequenceOfReal.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeStudyProperties", "", "interfaceSALOMEDS_1_1AttributeStudyProperties.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfInteger", "", "interfaceSALOMEDS_1_1AttributeTableOfInteger.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength", "", "exceptionSALOMEDS_1_1AttributeTableOfInteger_1_1IncorrectArgumentLength.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfInteger::IncorrectIndex", "", "exceptionSALOMEDS_1_1AttributeTableOfInteger_1_1IncorrectIndex.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfReal", "", "interfaceSALOMEDS_1_1AttributeTableOfReal.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength", "", "exceptionSALOMEDS_1_1AttributeTableOfReal_1_1IncorrectArgumentLength.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfReal::IncorrectIndex", "", "exceptionSALOMEDS_1_1AttributeTableOfReal_1_1IncorrectIndex.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfString", "", "interfaceSALOMEDS_1_1AttributeTableOfString.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfString::IncorrectArgumentLength", "", "exceptionSALOMEDS_1_1AttributeTableOfString_1_1IncorrectArgumentLength.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfString::IncorrectIndex", "", "exceptionSALOMEDS_1_1AttributeTableOfString_1_1IncorrectIndex.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTarget", "", "interfaceSALOMEDS_1_1AttributeTarget.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTextColor", "", "interfaceSALOMEDS_1_1AttributeTextColor.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTextHighlightColor", "", "interfaceSALOMEDS_1_1AttributeTextHighlightColor.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTreeNode", "", "interfaceSALOMEDS_1_1AttributeTreeNode.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeUserID", "", "interfaceSALOMEDS_1_1AttributeUserID.html")) - insDoc(aux1, gLnk("SALOMEDS::Callback", "", "interfaceSALOMEDS_1_1Callback.html")) - insDoc(aux1, gLnk("SALOMEDS::ChildIterator", "", "interfaceSALOMEDS_1_1ChildIterator.html")) - insDoc(aux1, gLnk("SALOMEDS::Color", "", "structSALOMEDS_1_1Color.html")) - insDoc(aux1, gLnk("Engines::Component", "", "interfaceEngines_1_1Component.html")) - insDoc(aux1, gLnk("Engines::Container", "", "interfaceEngines_1_1Container.html")) - insDoc(aux1, gLnk("SALOME_ModuleCatalog::DefinitionInterface", "", "structSALOME__ModuleCatalog_1_1DefinitionInterface.html")) - insDoc(aux1, gLnk("SALOMEDS::Driver", "", "interfaceSALOMEDS_1_1Driver.html")) - insDoc(aux1, gLnk("SALOME::ExceptionStruct", "", "structSALOME_1_1ExceptionStruct.html")) - insDoc(aux1, gLnk("SALOMEDS::GenericAttribute", "", "interfaceSALOMEDS_1_1GenericAttribute.html")) - insDoc(aux1, gLnk("SALOMEDS::GenericAttribute::LockProtection", "", "exceptionSALOMEDS_1_1GenericAttribute_1_1LockProtection.html")) - insDoc(aux1, gLnk("SALOME_ModuleCatalog::IAPP_Affich", "", "structSALOME__ModuleCatalog_1_1IAPP__Affich.html")) - insDoc(aux1, gLnk("SALOME_ModuleCatalog::ModuleCatalog", "", "interfaceSALOME__ModuleCatalog_1_1ModuleCatalog.html")) - insDoc(aux1, gLnk("SALOME_ModuleCatalog::NotFound", "", "exceptionSALOME__ModuleCatalog_1_1NotFound.html")) - insDoc(aux1, gLnk("SALOMEDS::NotImplemented", "", "exceptionSALOMEDS_1_1NotImplemented.html")) - insDoc(aux1, gLnk("SALOME::SALOME_Exception", "", "exceptionSALOME_1_1SALOME__Exception.html")) - insDoc(aux1, gLnk("SALOMEDS::SComponent", "", "interfaceSALOMEDS_1_1SComponent.html")) - insDoc(aux1, gLnk("SALOMEDS::SComponentIterator", "", "interfaceSALOMEDS_1_1SComponentIterator.html")) - insDoc(aux1, gLnk("SALOME_ModuleCatalog::Service", "", "structSALOME__ModuleCatalog_1_1Service.html")) - insDoc(aux1, gLnk("SALOME_ModuleCatalog::ServicesParameter", "", "structSALOME__ModuleCatalog_1_1ServicesParameter.html")) - insDoc(aux1, gLnk("SALOME::Session", "", "interfaceSALOME_1_1Session.html")) - insDoc(aux1, gLnk("SALOME::Session::GUIActive", "", "exceptionSALOME_1_1Session_1_1GUIActive.html")) - insDoc(aux1, gLnk("SALOME::Session::RunningStudies", "", "exceptionSALOME_1_1Session_1_1RunningStudies.html")) - insDoc(aux1, gLnk("SALOMEDS::SObject", "", "interfaceSALOMEDS_1_1SObject.html")) - insDoc(aux1, gLnk("SALOME::StatSession", "", "structSALOME_1_1StatSession.html")) - insDoc(aux1, gLnk("SALOMEDS::Study", "", "interfaceSALOMEDS_1_1Study.html")) - insDoc(aux1, gLnk("SALOMEDS::Study::StudyCommentError", "", "exceptionSALOMEDS_1_1Study_1_1StudyCommentError.html")) - insDoc(aux1, gLnk("SALOMEDS::Study::StudyInvalidComponent", "", "exceptionSALOMEDS_1_1Study_1_1StudyInvalidComponent.html")) - insDoc(aux1, gLnk("SALOMEDS::Study::StudyInvalidContext", "", "exceptionSALOMEDS_1_1Study_1_1StudyInvalidContext.html")) - insDoc(aux1, gLnk("SALOMEDS::Study::StudyInvalidDirectory", "", "exceptionSALOMEDS_1_1Study_1_1StudyInvalidDirectory.html")) - insDoc(aux1, gLnk("SALOMEDS::Study::StudyNameAlreadyUsed", "", "exceptionSALOMEDS_1_1Study_1_1StudyNameAlreadyUsed.html")) - insDoc(aux1, gLnk("SALOMEDS::Study::StudyNameError", "", "exceptionSALOMEDS_1_1Study_1_1StudyNameError.html")) - insDoc(aux1, gLnk("SALOMEDS::Study::StudyObjectAlreadyExists", "", "exceptionSALOMEDS_1_1Study_1_1StudyObjectAlreadyExists.html")) - insDoc(aux1, gLnk("SALOMEDS::StudyBuilder", "", "interfaceSALOMEDS_1_1StudyBuilder.html")) - insDoc(aux1, gLnk("SALOMEDS::StudyBuilder::LockProtection", "", "exceptionSALOMEDS_1_1StudyBuilder_1_1LockProtection.html")) - insDoc(aux1, gLnk("SALOMEDS::StudyManager", "", "interfaceSALOMEDS_1_1StudyManager.html")) - insDoc(aux1, gLnk("SALOMEDS::UseCaseBuilder", "", "interfaceSALOMEDS_1_1UseCaseBuilder.html")) - insDoc(aux1, gLnk("SALOMEDS::UseCaseIterator", "", "interfaceSALOMEDS_1_1UseCaseIterator.html")) -*/ - insDoc(aux1, gLnk("Class Hierarchy", "", "hierarchy.html")) - -/*! insDoc(aux1, gLnk("SALOME_ModuleCatalog::Acomponent", "", "interfaceSALOME__ModuleCatalog_1_1Acomponent.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength", "", "exceptionSALOMEDS_1_1AttributeTableOfInteger_1_1IncorrectArgumentLength.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfInteger::IncorrectIndex", "", "exceptionSALOMEDS_1_1AttributeTableOfInteger_1_1IncorrectIndex.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength", "", "exceptionSALOMEDS_1_1AttributeTableOfReal_1_1IncorrectArgumentLength.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfReal::IncorrectIndex", "", "exceptionSALOMEDS_1_1AttributeTableOfReal_1_1IncorrectIndex.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfString::IncorrectArgumentLength", "", "exceptionSALOMEDS_1_1AttributeTableOfString_1_1IncorrectArgumentLength.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfString::IncorrectIndex", "", "exceptionSALOMEDS_1_1AttributeTableOfString_1_1IncorrectIndex.html")) - insDoc(aux1, gLnk("SALOMEDS::Callback", "", "interfaceSALOMEDS_1_1Callback.html")) - insDoc(aux1, gLnk("SALOMEDS::ChildIterator", "", "interfaceSALOMEDS_1_1ChildIterator.html")) - insDoc(aux1, gLnk("SALOMEDS::Color", "", "structSALOMEDS_1_1Color.html")) - aux2 = insFld(aux1, gFld("Engines::Component", "", "interfaceEngines_1_1Component.html")) - insDoc(aux1, gLnk("Engines::Container", "", "interfaceEngines_1_1Container.html")) - insDoc(aux1, gLnk("SALOME_ModuleCatalog::DefinitionInterface", "", "structSALOME__ModuleCatalog_1_1DefinitionInterface.html")) - aux2 = insFld(aux1, gFld("SALOMEDS::Driver", "", "interfaceSALOMEDS_1_1Driver.html")) - insDoc(aux1, gLnk("SALOME::ExceptionStruct", "", "structSALOME_1_1ExceptionStruct.html")) - aux2 = insFld(aux1, gFld("SALOMEDS::GenericAttribute", "", "interfaceSALOMEDS_1_1GenericAttribute.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeComment", "", "interfaceSALOMEDS_1_1AttributeComment.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeDrawable", "", "interfaceSALOMEDS_1_1AttributeDrawable.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeExpandable", "", "interfaceSALOMEDS_1_1AttributeExpandable.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeInteger", "", "interfaceSALOMEDS_1_1AttributeInteger.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeIOR", "", "interfaceSALOMEDS_1_1AttributeIOR.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeLocalID", "", "interfaceSALOMEDS_1_1AttributeLocalID.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeName", "", "interfaceSALOMEDS_1_1AttributeName.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeOpened", "", "interfaceSALOMEDS_1_1AttributeOpened.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributePersistentRef", "", "interfaceSALOMEDS_1_1AttributePersistentRef.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributePixMap", "", "interfaceSALOMEDS_1_1AttributePixMap.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributePythonObject", "", "interfaceSALOMEDS_1_1AttributePythonObject.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeReal", "", "interfaceSALOMEDS_1_1AttributeReal.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeSelectable", "", "interfaceSALOMEDS_1_1AttributeSelectable.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeSequenceOfInteger", "", "interfaceSALOMEDS_1_1AttributeSequenceOfInteger.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeSequenceOfReal", "", "interfaceSALOMEDS_1_1AttributeSequenceOfReal.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeStudyProperties", "", "interfaceSALOMEDS_1_1AttributeStudyProperties.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeTableOfInteger", "", "interfaceSALOMEDS_1_1AttributeTableOfInteger.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeTableOfReal", "", "interfaceSALOMEDS_1_1AttributeTableOfReal.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeTableOfString", "", "interfaceSALOMEDS_1_1AttributeTableOfString.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeTarget", "", "interfaceSALOMEDS_1_1AttributeTarget.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeTextColor", "", "interfaceSALOMEDS_1_1AttributeTextColor.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeTextHighlightColor", "", "interfaceSALOMEDS_1_1AttributeTextHighlightColor.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeTreeNode", "", "interfaceSALOMEDS_1_1AttributeTreeNode.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeUserID", "", "interfaceSALOMEDS_1_1AttributeUserID.html")) - insDoc(aux1, gLnk("SALOMEDS::GenericAttribute::LockProtection", "", "exceptionSALOMEDS_1_1GenericAttribute_1_1LockProtection.html")) - insDoc(aux1, gLnk("SALOME_ModuleCatalog::IAPP_Affich", "", "structSALOME__ModuleCatalog_1_1IAPP__Affich.html")) - insDoc(aux1, gLnk("SALOME_ModuleCatalog::ModuleCatalog", "", "interfaceSALOME__ModuleCatalog_1_1ModuleCatalog.html")) - insDoc(aux1, gLnk("SALOME_ModuleCatalog::NotFound", "", "exceptionSALOME__ModuleCatalog_1_1NotFound.html")) - insDoc(aux1, gLnk("SALOMEDS::NotImplemented", "", "exceptionSALOMEDS_1_1NotImplemented.html")) - insDoc(aux1, gLnk("SALOME::SALOME_Exception", "", "exceptionSALOME_1_1SALOME__Exception.html")) - insDoc(aux1, gLnk("SALOMEDS::SComponentIterator", "", "interfaceSALOMEDS_1_1SComponentIterator.html")) - insDoc(aux1, gLnk("SALOME_ModuleCatalog::Service", "", "structSALOME__ModuleCatalog_1_1Service.html")) - insDoc(aux1, gLnk("SALOME_ModuleCatalog::ServicesParameter", "", "structSALOME__ModuleCatalog_1_1ServicesParameter.html")) - insDoc(aux1, gLnk("SALOME::Session", "", "interfaceSALOME_1_1Session.html")) - insDoc(aux1, gLnk("SALOME::Session::GUIActive", "", "exceptionSALOME_1_1Session_1_1GUIActive.html")) - insDoc(aux1, gLnk("SALOME::Session::RunningStudies", "", "exceptionSALOME_1_1Session_1_1RunningStudies.html")) - aux2 = insFld(aux1, gFld("SALOMEDS::SObject", "", "interfaceSALOMEDS_1_1SObject.html")) - insDoc(aux2, gLnk("SALOMEDS::SComponent", "", "interfaceSALOMEDS_1_1SComponent.html")) - insDoc(aux1, gLnk("SALOME::StatSession", "", "structSALOME_1_1StatSession.html")) - insDoc(aux1, gLnk("SALOMEDS::Study", "", "interfaceSALOMEDS_1_1Study.html")) - insDoc(aux1, gLnk("SALOMEDS::Study::StudyCommentError", "", "exceptionSALOMEDS_1_1Study_1_1StudyCommentError.html")) - insDoc(aux1, gLnk("SALOMEDS::Study::StudyInvalidComponent", "", "exceptionSALOMEDS_1_1Study_1_1StudyInvalidComponent.html")) - insDoc(aux1, gLnk("SALOMEDS::Study::StudyInvalidContext", "", "exceptionSALOMEDS_1_1Study_1_1StudyInvalidContext.html")) - insDoc(aux1, gLnk("SALOMEDS::Study::StudyInvalidDirectory", "", "exceptionSALOMEDS_1_1Study_1_1StudyInvalidDirectory.html")) - insDoc(aux1, gLnk("SALOMEDS::Study::StudyNameAlreadyUsed", "", "exceptionSALOMEDS_1_1Study_1_1StudyNameAlreadyUsed.html")) - insDoc(aux1, gLnk("SALOMEDS::Study::StudyNameError", "", "exceptionSALOMEDS_1_1Study_1_1StudyNameError.html")) - insDoc(aux1, gLnk("SALOMEDS::Study::StudyObjectAlreadyExists", "", "exceptionSALOMEDS_1_1Study_1_1StudyObjectAlreadyExists.html")) - insDoc(aux1, gLnk("SALOMEDS::StudyBuilder", "", "interfaceSALOMEDS_1_1StudyBuilder.html")) - insDoc(aux1, gLnk("SALOMEDS::StudyBuilder::LockProtection", "", "exceptionSALOMEDS_1_1StudyBuilder_1_1LockProtection.html")) - insDoc(aux1, gLnk("SALOMEDS::StudyManager", "", "interfaceSALOMEDS_1_1StudyManager.html")) - insDoc(aux1, gLnk("SALOMEDS::UseCaseBuilder", "", "interfaceSALOMEDS_1_1UseCaseBuilder.html")) - insDoc(aux1, gLnk("SALOMEDS::UseCaseIterator", "", "interfaceSALOMEDS_1_1UseCaseIterator.html")) -*/ - insDoc(aux1, gLnk("Class methods list", "", "functions.html")) -/*! -aux1 = insFld(foldersTree, gFld("Namespace List", "", "namespaces.html")) - insDoc(aux1, gLnk("Engines", "", "namespaceEngines.html")) - insDoc(aux1, gLnk("SALOME", "", "namespaceSALOME.html")) - insDoc(aux1, gLnk("SALOME_ModuleCatalog", "", "namespaceSALOME__ModuleCatalog.html")) - insDoc(aux1, gLnk("SALOMEDS", "", "namespaceSALOMEDS.html")) -*/ - insDoc(aux1, gLnk("Namespace Members", "", "namespacemembers.html")) - - insDoc(aux1, gLnk("File List", "", "files.html")) - -/*! - insDoc(aux1, gLnk("SALOME_Component.idl", "", "SALOME__Component_8idl.html")) - insDoc(aux1, gLnk("SALOME_Exception.idl", "", "SALOME__Exception_8idl.html")) - insDoc(aux1, gLnk("SALOME_ModuleCatalog.idl", "", "SALOME__ModuleCatalog_8idl.html")) - insDoc(aux1, gLnk("SALOME_Session.idl", "", "SALOME__Session_8idl.html")) - insDoc(aux1, gLnk("SALOMEDS.idl", "", "SALOMEDS_8idl.html")) - insDoc(aux1, gLnk("SALOMEDS_Attributes.idl", "", "SALOMEDS__Attributes_8idl.html")) -*/ - -aux1 = insFld(foldersTree, gFld("IDL/Python mapping", "")) - insDoc(aux1, gLnk("Mapping of IDL definitions to Python language", "", "mapping.html")) - insDoc(aux1, gLnk("Mapping of SALOME IDL definitions to Python language", "", "page2.html")) - -/*! insDoc(foldersTree, gLnk("Graphical Class Hierarchy", "", "inherits.html")) -*/ -aux1 = insFld(foldersTree, gFld("Naming service", "")) - insDoc(aux1, gLnk("Naming Service Description ", "", "overview_Naming.html")) - insDoc(aux1, gLnk("Salome_NamingService Class Reference", "", "classSALOME__NamingService.html")) - insDoc(aux1, gLnk("Examples", "", "examples_Naming.html")) -aux1 = insFld(foldersTree, gFld("Life Cycle", "")) - insDoc(aux1, gLnk("Life Cycle Service Description ", "", "overview_Life_Cycle.html")) - insDoc(aux1, gLnk("Salome_LifeCycleCorba Class Reference", "", "classSALOME__LifeCycleCORBA.html")) - insDoc(aux1, gLnk("Examples", "", "examples_Life_cycle.html")) - - diff --git a/doc/salome/tui/KERNEL/sources/static/treeview.js b/doc/salome/tui/KERNEL/sources/static/treeview.js deleted file mode 100644 index 55eb43d07..000000000 --- a/doc/salome/tui/KERNEL/sources/static/treeview.js +++ /dev/null @@ -1,505 +0,0 @@ -//**************************************************************** -// You are free to copy the "Folder-Tree" script as long as you -// keep this copyright notice: -// Script found in: http://www.geocities.com/Paris/LeftBank/2178/ -// Author: Marcelino Alves Martins (martins@hks.com) December '97. -//**************************************************************** - -//Log of changes: -// 17 Feb 98 - Fix initialization flashing problem with Netscape -// -// 27 Jan 98 - Root folder starts open; support for USETEXTLINKS; -// make the ftien4 a js file -// -// DvH: Dec 2000 - Made some minor changes to support external -// references - -// Definition of class Folder -// ***************************************************************** - -function Folder(folderDescription, tagName, hreference) //constructor -{ - //constant data - this.desc = folderDescription - this.tagName = tagName - this.hreference = hreference - this.id = -1 - this.navObj = 0 - this.iconImg = 0 - this.nodeImg = 0 - this.isLastNode = 0 - - //dynamic data - this.isOpen = true - this.iconSrc = "ftv2folderopen.png" - this.children = new Array - this.nChildren = 0 - - //methods - this.initialize = initializeFolder - this.setState = setStateFolder - this.addChild = addChild - this.createIndex = createEntryIndex - this.hide = hideFolder - this.display = display - this.renderOb = drawFolder - this.totalHeight = totalHeight - this.subEntries = folderSubEntries - this.outputLink = outputFolderLink -} - -function setStateFolder(isOpen) -{ - var subEntries - var totalHeight - var fIt = 0 - var i=0 - - if (isOpen == this.isOpen) - return - - if (browserVersion == 2) - { - totalHeight = 0 - for (i=0; i < this.nChildren; i++) - totalHeight = totalHeight + this.children[i].navObj.clip.height - subEntries = this.subEntries() - if (this.isOpen) - totalHeight = 0 - totalHeight - for (fIt = this.id + subEntries + 1; fIt < nEntries; fIt++) - indexOfEntries[fIt].navObj.moveBy(0, totalHeight) - } - this.isOpen = isOpen - propagateChangesInState(this) -} - -function propagateChangesInState(folder) -{ - var i=0 - - if (folder.isOpen) - { - if (folder.nodeImg) - if (folder.isLastNode) - folder.nodeImg.src = "ftv2mlastnode.png" - else - folder.nodeImg.src = "ftv2mnode.png" - folder.iconImg.src = "ftv2folderopen.png" - for (i=0; i 0) - auxEv = "" - else - auxEv = "" - - if (level>0) - if (lastNode) //the last 'brother' in the children array - { - this.renderOb(leftSide + auxEv + "") -// leftSide = leftSide + "" - this.isLastNode = 1 - } - else - { - this.renderOb(leftSide + auxEv + "") - leftSide = leftSide + "" - this.isLastNode = 0 - } - else - this.renderOb("") - - if (nc > 0) - { - level = level + 1 - for (i=0 ; i < this.nChildren; i++) - { - if (i == this.nChildren-1) - this.children[i].initialize(level, 1, leftSide) - else - this.children[i].initialize(level, 0, leftSide) - } - } -} - -function drawFolder(leftSide) -{ - if (browserVersion == 2) { - if (!doc.yPos) - doc.yPos=8 - doc.write("") - } - if (browserVersion == 3) - { - doc.write("
    ") - } - - doc.write("\n") - doc.write("\n\n") - doc.write("\n
    ") - doc.write(leftSide) - this.outputLink() - doc.write("") - doc.write("") - if (USETEXTLINKS) - { - this.outputLink() - doc.write(this.desc + "") - } - else - doc.write(this.desc) - -/*! - if (this.tagName!="") - { - doc.write(" [external]") - } -*/ - doc.write("
    \n") - - if (browserVersion == 2) { - doc.write("") - } - if (browserVersion == 3) { - doc.write("
    ") - } - - if (browserVersion == 1) { - this.navObj = doc.all["folder"+this.id] - this.iconImg = doc.all["folderIcon"+this.id] - this.nodeImg = doc.all["nodeIcon"+this.id] - } else if (browserVersion == 2) { - this.navObj = doc.layers["folder"+this.id] - this.iconImg = this.navObj.document.images["folderIcon"+this.id] - this.nodeImg = this.navObj.document.images["nodeIcon"+this.id] - doc.yPos=doc.yPos+this.navObj.clip.height - } else if (browserVersion == 3) { - this.navObj = doc.getElementById("folder"+this.id) - this.iconImg = doc.images.namedItem("folderIcon"+this.id) - this.nodeImg = doc.images.namedItem("nodeIcon"+this.id) - } -} - -function outputFolderLink() -{ - if (this.hreference) - { - doc.write(" 0) - doc.write("onClick='javascript:clickOnFolder("+this.id+")'") - doc.write(">") - } - else - doc.write("") -} - -function addChild(childNode) -{ - this.children[this.nChildren] = childNode - this.nChildren++ - return childNode -} - -function folderSubEntries() -{ - var i = 0 - var se = this.nChildren - - for (i=0; i < this.nChildren; i++){ - if (this.children[i].children) //is a folder - se = se + this.children[i].subEntries() - } - - return se -} - - -// Definition of class Item (a document or link inside a Folder) -// ************************************************************* - -function Item(itemDescription, tagName, itemLink) // Constructor -{ - // constant data - this.desc = itemDescription - this.tagName = tagName - this.link = itemLink - this.id = -1 //initialized in initalize() - this.navObj = 0 //initialized in render() - this.iconImg = 0 //initialized in render() - this.iconSrc = "ftv2doc.png" - - // methods - this.initialize = initializeItem - this.createIndex = createEntryIndex - this.hide = hideItem - this.display = display - this.renderOb = drawItem - this.totalHeight = totalHeight -} - -function hideItem() -{ - if (browserVersion == 1 || browserVersion == 3) { - if (this.navObj.style.display == "none") - return - this.navObj.style.display = "none" - } else { - if (this.navObj.visibility == "hidden") - return - this.navObj.visibility = "hidden" - } -} - -function initializeItem(level, lastNode, leftSide) -{ - this.createIndex() - - if (level>0) - if (lastNode) //the last 'brother' in the children array - { - this.renderOb(leftSide + "") - leftSide = leftSide + "" - } - else - { - this.renderOb(leftSide + "") - leftSide = leftSide + "" - } - else - this.renderOb("") -} - -function drawItem(leftSide) -{ - if (browserVersion == 2) - doc.write("") - if (browserVersion == 3) - doc.write("
    ") - - doc.write("\n\n") - doc.write("\n
    ") - doc.write(leftSide) - if (this.link!="") - { - doc.write("") - } - doc.write("") - if (this.link!="") - { - doc.write("") - } - doc.write("") - if (USETEXTLINKS && this.link!="") - doc.write("" + this.desc + "") - else - doc.write(this.desc) -/*! - if (this.tagName!="") - { - doc.write(" [external]"); - } -*/ - doc.write("\n
    \n") - - if (browserVersion == 2) - doc.write("") - if (browserVersion == 3) - doc.write("
    ") - - if (browserVersion == 1) { - this.navObj = doc.all["item"+this.id] - this.iconImg = doc.all["itemIcon"+this.id] - } else if (browserVersion == 2) { - this.navObj = doc.layers["item"+this.id] - this.iconImg = this.navObj.document.images["itemIcon"+this.id] - doc.yPos=doc.yPos+this.navObj.clip.height - } else if (browserVersion == 3) { - this.navObj = doc.getElementById("item"+this.id) - this.iconImg = doc.images.namedItem("itemIcon"+this.id) - } -} - - -// Methods common to both objects (pseudo-inheritance) -// ******************************************************** - -function display() -{ - if (browserVersion == 1 || browserVersion == 3) - this.navObj.style.display = "block" - else - this.navObj.visibility = "show" -} - -function createEntryIndex() -{ - this.id = nEntries - indexOfEntries[nEntries] = this - nEntries++ -} - -// total height of subEntries open -function totalHeight() //used with browserVersion == 2 -{ - var h = this.navObj.clip.height - var i = 0 - - if (this.isOpen) //is a folder and _is_ open - for (i=0 ; i < this.nChildren; i++) - h = h + this.children[i].totalHeight() - - return h -} - - -// Events -// ********************************************************* - -function clickOnFolder(folderId) -{ - var clicked = indexOfEntries[folderId] - - if (!clicked.isOpen) - clickOnNode(folderId) - - return - - if (clicked.isSelected) - return -} - -function clickOnNode(folderId) -{ - var clickedFolder = 0 - var state = 0 - - clickedFolder = indexOfEntries[folderId] - state = clickedFolder.isOpen - - clickedFolder.setState(!state) //open<->close -} - -function initializeDocument() -{ - doc = document; - if (doc.all) - browserVersion = 1 //IE4 - else - if (doc.layers) - browserVersion = 2 //NS4 - else if(navigator.userAgent.toLowerCase().indexOf('gecko') != -1) - browserVersion = 3 //mozilla - else - browserVersion = 0 //other - - foldersTree.initialize(0, 1, "") - foldersTree.display() - - if (browserVersion > 0) - { - if(browserVersion != 3) - doc.write(" ") - - // close the whole tree - clickOnNode(0) - // open the root folder - clickOnNode(0) - } -} - -// Auxiliary Functions for Folder-Treee backward compatibility -// ********************************************************* - -function gFld(description, tagName, hreference) -{ - folder = new Folder(description, tagName, hreference) - return folder -} - -function gLnk(description, tagName, linkData) -{ - fullLink = "" - - if (linkData!="") - { - fullLink = "'"+linkData+"' target=\"basefrm\"" - } - - linkItem = new Item(description, tagName, fullLink) - return linkItem -} - -function insFld(parentFolder, childFolder) -{ - return parentFolder.addChild(childFolder) -} - -function insDoc(parentFolder, document) -{ - parentFolder.addChild(document) -} - -// Global variables -// **************** - -USETEXTLINKS = 1 -indexOfEntries = new Array -nEntries = 0 -doc = document -browserVersion = 0 -selectedFolder=0 diff --git a/doc/salome/tui/Makefile.am b/doc/salome/tui/Makefile.am index 7aa79e067..eb465301e 100644 --- a/doc/salome/tui/Makefile.am +++ b/doc/salome/tui/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # -* Makefile *- # Author : Paul RASCLE (EDF) # Date : 16/02/2006 @@ -26,94 +27,31 @@ # include $(top_srcdir)/salome_adm/unix/make_common_starter.am -EXTRA_DIST = pythfilter.py +EXTRA_DIST = images input static/footer.html static/doxygen.css -dist-hook: - cp -rf $(srcdir)/KERNEL $(distdir) - if test -d "KERNEL"; then \ - find "KERNEL" -name "*.*" -exec cp -rf {} $(distdir)/KERNEL ';' ; \ - fi - rm -rf `find $(distdir) -name CVS` +tuidocdir = $(docdir)/tui/KERNEL +tuidoc_DATA = images/head.png -clean-local: - rm -rf KERNEL - chmod -R +w INPUT - @for filen in `find INPUT -type f` ; do \ - case $${filen} in \ - INPUT/doxydev | INPUT/doxyuser | INPUT/sources/static/tree.js ) ;; \ - . | .. ) ;; \ - *) echo "Removing $${filen}" ; rm -rf $${filen} ;; \ - esac ; \ - done ; +dev_docs: + $(DOXYGEN) -u doxyfile; \ + $(DOXYGEN) doxyfile -KERNEL/main.html:../main.dox - cp -fr $(srcdir)/KERNEL/* ./INPUT; \ - cd ./INPUT; \ - pwd; ls;\ - echo "DOXYGEN SUPPORT PYTHON - $(DOXYGEN_WITH_PYTHON)"; \ - if( test "x$(DOXYGEN_WITH_PYTHON)" = "xyes"); then \ - sed 's|python_extension_must_be_here|*.py|' ./doxyuser > ./doxyuser1; \ - $(DOXYGEN) -u ./doxyuser1; \ - else \ - sed 's|python_extension_must_be_here||' ./doxyuser > ./doxyuser1; \ - fi; \ - echo "DOXYGEN SUPPORT STL - $(DOXYGEN_WITH_STL)"; \ - if( test "x$(DOXYGEN_WITH_STL)" = "xyes"); then \ - sed -e 's|BUILTIN_STL_SUPPORT = NO|BUILTIN_STL_SUPPORT = YES|' ./doxyuser1 > ./doxyuser2; \ - mv -f doxyuser2 doxyuser1; \ - fi; \ - $(DOXYGEN) ./doxyuser1; \ - cd ..; +clean-local: + -rm -fr KERNEL log.txt doxyfile.bak -usr_docs:KERNEL/main.html - if test -d "KERNEL"; then b=; else b="$(srcdir)/"; fi; \ - cp -fr $(srcdir)/KERNEL/sources/static/*.* $(DESTDIR)$(docdir); \ - cp -fr $(srcdir)/KERNEL/sources/ $(DESTDIR)$(docdir); \ - find $$b"KERNEL" -name "*.*" -exec cp -rf {} $(DESTDIR)$(docdir) ';' ; \ - cp -fr $(srcdir)/KERNEL/HTML/ $(DESTDIR)$(docdir); \ - cp -f $(srcdir)/pythfilter.py $(DESTDIR)$(docdir); \ - cp -fr $(srcdir)/KERNEL/exemple/ $(DESTDIR)$(docdir); +install-data-local: + if test -d KERNEL; then \ + $(INSTALL) -d $(DESTDIR)$(docdir)/tui ; \ + cp -rp KERNEL $(DESTDIR)$(docdir)/tui ; \ + fi; uninstall-local: -# chmod +w $(DESTDIR)$(docdir)/sources -# chmod +w $(DESTDIR)$(docdir)/sources/static -# chmod +w $(DESTDIR)$(docdir)/HTML - chmod -R +w $(DESTDIR)$(docdir) - rm -rf $(DESTDIR)$(docdir)/pythfilter.py - find $(DESTDIR)$(docdir) -name "*.html" -type f -exec rm -rf {} \; - find $(DESTDIR)$(docdir) -name "*.jpg" -type f -exec rm -rf {} \; - find $(DESTDIR)$(docdir) -name "*.map" -type f -exec rm -rf {} \; - find $(DESTDIR)$(docdir) -name "*.md5" -type f -exec rm -rf {} \; - find $(DESTDIR)$(docdir) -name "*.png" -type f -exec rm -rf {} \; - find $(DESTDIR)$(docdir) -name "*.gif" -type f -exec rm -rf {} \; - find $(DESTDIR)$(docdir) -name "*.css" -type f -exec rm -rf {} \; - find $(DESTDIR)$(docdir) -name "*.js*" -type f -exec rm -rf {} \; - rm -rf $(DESTDIR)$(docdir)/sources - rm -rf $(DESTDIR)$(docdir)/HTML - rm -rf $(DESTDIR)$(docdir)/exemple - rm -rf $(DESTDIR)$(docdir)/*.in - -dev_docs: - cp -fr $(srcdir)/KERNEL/* ./INPUT; \ - cd ./INPUT; \ - pwd; ls;\ - echo "DOXYGEN SUPPORT PYTHON - $(DOXYGEN_WITH_PYTHON)"; \ - if( test "x$(DOXYGEN_WITH_PYTHON)" = "xyes"); then \ - sed 's|python_extension_must_be_here|*.py|' ./doxydev > ./doxydev1; \ - $(DOXYGEN) -u ./doxydev1; \ - else \ - sed 's|python_extension_must_be_here||' ./doxydev > ./doxydev1; \ - fi; \ - echo "DOXYGEN SUPPORT STL - $(DOXYGEN_WITH_STL)"; \ - if( test "x$(DOXYGEN_WITH_STL)" = "xyes"); then \ - sed -e 's|BUILTIN_STL_SUPPORT = NO|BUILTIN_STL_SUPPORT = YES|' ./doxydev1 > ./doxydev2; \ - mv -f doxydev2 doxydev1; \ - fi; \ - $(DOXYGEN) ./doxydev1; \ - cd ..; - $(INSTALL) -d $(docdir)/tui/KERNEL; -# cp -fr KERNEL $(docdir)/tui -# cp -fr $(srcdir)/KERNEL/sources/static/*.* $(docdir)/tui/KERNEL; -# cp -fr $(srcdir)/KERNEL/sources/ $(docdir)/tui/KERNEL; -# cp -fr $(srcdir)/KERNEL/HTML/ $(docdir)/tui/KERNEL; -# cp -f $(srcdir)/pythfilter.py $(docdir)/tui/KERNEL; + @test -d $(DESTDIR)$(tuidocdir) && chmod -R +w $(DESTDIR)$(tuidocdir) ; \ + for filen in `find $(DESTDIR)$(tuidocdir) -mindepth 1 -maxdepth 1` dummy ; do \ + case $${filen} in \ + dummy ) ;; \ + $(DESTDIR)$(tuidocdir)/docutils ) ;; \ + $(DESTDIR)$(tuidocdir)/head.png ) ;; \ + * ) echo "removing $${filen}" && rm -rf $${filen} ;; \ + esac ; \ + done diff --git a/doc/salome/tui/KERNEL/doxydev.in b/doc/salome/tui/doxyfile.in similarity index 92% rename from doc/salome/tui/KERNEL/doxydev.in rename to doc/salome/tui/doxyfile.in index 168d1c5ee..ae335beb4 100644 --- a/doc/salome/tui/KERNEL/doxydev.in +++ b/doc/salome/tui/doxyfile.in @@ -3,9 +3,9 @@ #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- -PROJECT_NAME = "SALOME v.@VERSION@" +PROJECT_NAME = "SALOME KERNEL Developer" PROJECT_NUMBER = -OUTPUT_DIRECTORY = ../ +OUTPUT_DIRECTORY = KERNEL CREATE_SUBDIRS = NO OUTPUT_LANGUAGE = English USE_WINDOWS_ENCODING = NO @@ -15,8 +15,7 @@ ABBREVIATE_BRIEF = ALWAYS_DETAILED_SEC = YES INLINE_INHERITED_MEMB = YES FULL_PATH_NAMES = YES -STRIP_FROM_PATH = @top_builddir@ \ - @top_srcdir@ +STRIP_FROM_PATH = @top_builddir@ @top_srcdir@ STRIP_FROM_INC_PATH = SHORT_NAMES = NO JAVADOC_AUTOBRIEF = YES @@ -28,7 +27,7 @@ TAB_SIZE = 5 ALIASES = OPTIMIZE_OUTPUT_FOR_C = YES OPTIMIZE_OUTPUT_JAVA = NO -BUILTIN_STL_SUPPORT = NO +BUILTIN_STL_SUPPORT = @DOXYGEN_SUPPORT_STL@ DISTRIBUTE_GROUP_DOC = NO SUBGROUPING = YES @@ -77,8 +76,9 @@ WARN_LOGFILE = log.txt # configuration options related to the input files #--------------------------------------------------------------------------- INPUT = \ - @top_srcdir@ -FILE_PATTERNS = *.idl *.?xx *.h *.hh *.i *c *.cc python_extension_must_be_here + @top_srcdir@/src/DSC \ + @srcdir@/input +FILE_PATTERNS = *.dox *.idl *.cxx *.hxx *.h *.hh *.i *c *.cc @DOXYGEN_PYTHON_EXTENSION@ RECURSIVE = YES EXCLUDE = EXCLUDE_SYMLINKS = NO @@ -86,10 +86,10 @@ EXCLUDE_PATTERNS = EXAMPLE_PATH = EXAMPLE_PATTERNS = EXAMPLE_RECURSIVE = NO -IMAGE_PATH = sources/ +IMAGE_PATH = INPUT_FILTER = FILTER_PATTERNS = -FILTER_SOURCE_FILES = YES +FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing @@ -113,11 +113,11 @@ IGNORE_PREFIX = # configuration options related to the HTML output #--------------------------------------------------------------------------- GENERATE_HTML = YES -HTML_OUTPUT = KERNEL +HTML_OUTPUT = . HTML_FILE_EXTENSION = .html -HTML_HEADER = sources/myheader.html -HTML_FOOTER = sources/footer.html -HTML_STYLESHEET = sources/doxygen.css +HTML_HEADER = @builddir@/static/header.html +HTML_FOOTER = @srcdir@/static/footer.html +HTML_STYLESHEET = @srcdir@/static/doxygen.css HTML_ALIGN_MEMBERS = YES GENERATE_HTMLHELP = NO CHM_FILE = @@ -224,7 +224,8 @@ INCLUDED_BY_GRAPH = NO CALL_GRAPH = NO GRAPHICAL_HIERARCHY = YES DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = jpg +DOT_IMAGE_FORMAT = png +DOT_FONTNAME = Arial DOT_PATH = DOTFILE_DIRS = MAX_DOT_GRAPH_WIDTH = 1024 diff --git a/doc/salome/tui/images/head.png b/doc/salome/tui/images/head.png new file mode 100755 index 0000000000000000000000000000000000000000..307d9ef9a4c07f8fba2c8721309a978433bcf63c GIT binary patch literal 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T$KQmiCatBss|IP#zP+cJJ3N5ehkvOC?wB31+CTE0Y?}9VLI3F>c{klj z3G3%yw+DQ(D2Fx5bWQB$6T_QihFtfM{ac@f=wQE8yhNIem$jZJA1Oo59!^~nHPtk) z=l5<6C>iPt6lXh4jW<(Xf&Oe*YTjJxxz%G6xN8pYPZExrqa54!s$aw&?R*P{W0(5& zIB@v@F;Gu^5@N@-C2j&PFR0iXdXkLzmP>%Gsi6%{s zs5#3;jO?Qa;Eu$^JMZH11zZO4xHrb|^tr!gxFW3}+h{W6`z~z(D*Z4>>G`shV!7*K z2<|%PU(c66FSple_Em%v7~}?zwBg8`U53ZrfBVu6o&WLuX}OJV zobXZtna>BOR%9WEzO#HomDoMr_UE<4!OT)a_|wijpzaXkb2cu^CGfwU>~Bm{4!XFL+qATYg|hH*KvHgO%G}Aa6rE-20usa(_(-DV0ail z^uy@m4P%u!TvbD(fzzpygud777wbzAkKu&|s9{}V#IL{|`WY?Ftz$S6Q5I>eaIGe- z`{glFUllNViXVZ+)e&lds(*EqsK9%Q{TS~v{{$ESbfgFNEIv=v00000NkvXXu0mjf D4zrO! literal 0 HcmV?d00001 diff --git a/doc/salome/tui/input/index.dox b/doc/salome/tui/input/index.dox new file mode 100644 index 000000000..d35745a22 --- /dev/null +++ b/doc/salome/tui/input/index.dox @@ -0,0 +1,10 @@ +/*! \mainpage + +To browse the \b SALOME KERNEL module Developer Documentation, follow the links below or use navigation menu at the top of the page: +
      +
    • Namespaces - list of KERNEL namespaces and scripts.
    • +
    • Data Structures - list of all data structures and classes with brief descriptions.
    • +
    • Files - list of all files with brief descriptions.
    • +
    + +*/ \ No newline at end of file diff --git a/doc/salome/tui/pythfilter.py b/doc/salome/tui/pythfilter.py index 4a7f180c2..db003c10e 100644 --- a/doc/salome/tui/pythfilter.py +++ b/doc/salome/tui/pythfilter.py @@ -1,26 +1,27 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -# -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +#!/usr/bin/env python +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# 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. +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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. +# 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. # -# 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 +# 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. # -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# 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 # -#!/usr/bin/env python +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + import getopt import glob import os.path diff --git a/doc/salome/tui/static/doxygen.css b/doc/salome/tui/static/doxygen.css new file mode 100755 index 000000000..7a2dcbde8 --- /dev/null +++ b/doc/salome/tui/static/doxygen.css @@ -0,0 +1,836 @@ +/* The standard CSS for doxygen */ + +body, table, div, p, dl { + font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; + font-size: 12px; +} + +/* @group Heading Levels */ + +h1 { + font-size: 150%; +} + +h2 { + font-size: 120%; +} + +h3 { + font-size: 100%; +} + +dt { + font-weight: bold; +} + +div.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; +} + +p.startli, p.startdd, p.starttd { + margin-top: 2px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.qindex, div.navtab{ + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + padding: 2px; +} + +div.qindex, div.navpath { + width: 100%; + line-height: 140%; +} + +div.navtab { + margin-right: 15px; +} + +/* @group Link Styling */ + +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #4665A2; +} + +a:hover { + text-decoration: underline; +} + +a.qindex { + font-weight: bold; +} + +a.qindexHL { + font-weight: bold; + background-color: #9CAFD4; + color: #ffffff; + border: 1px double #869DCA; +} + +.contents a.qindexHL:visited { + color: #ffffff; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code { + color: #4665A2; +} + +a.codeRef { + color: #4665A2; +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +.fragment { + font-family: monospace, fixed; + font-size: 105%; +} + +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; +} + +div.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.version { + border:1px solid #0000FF; + color: #CCCCCC; + font-family: Arial, Helvetica, sans-serif; + font-size: 9pt; + text-align: center; + width:100px; + -moz-border-radius: 8px; + margin: 5px; +} + +div.footer1 { + background-color: #DFE5F1; + border: 1px solid #AAAAAA; + font-family: Arial, Helvetica, sans-serif; + font-size: 11px; + padding: 10px; + margin-top: 15px; +} + + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 10px; + margin-right: 10px; +} + +td.indexkey { + background-color: #EBEFF6; + font-weight: bold; + border: 1px solid #C4CFE5; + margin: 2px 0px 2px 0; + padding: 2px 10px; +} + +td.indexvalue { + background-color: #EBEFF6; + border: 1px solid #C4CFE5; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #EEF1F7; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #A3B4D7; +} + +th.dirtab { + background: #EBEFF6; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #F9FAFC; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memItemLeft, .memItemRight, .memTemplParams { + border-top: 1px solid #C4CFE5; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memTemplParams { + color: #4665A2; + white-space: nowrap; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtemplate { + font-size: 80%; + color: #4665A2; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.memitem { + padding: 0; + margin-bottom: 10px; +} + +.memname { + white-space: nowrap; + font-weight: bold; + margin-left: 6px; +} + +.memproto { + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 0px 6px 0px; + color: #253555; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 8px; + border-top-left-radius: 8px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 8px; + -moz-border-radius-topleft: 8px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 8px; + -webkit-border-top-left-radius: 8px; + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + +} + +.memdoc { + border-bottom: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 2px 5px; + background-color: #FBFCFD; + border-top-width: 0; + /* opera specific markup */ + border-bottom-left-radius: 8px; + border-bottom-right-radius: 8px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 8px; + -moz-border-radius-bottomright: 8px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7F8FB 95%, #EEF1F7); + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 8px; + -webkit-border-bottom-right-radius: 8px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7F8FB), to(#EEF1F7)); +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} + +.params, .retval, .exception, .tparams { + border-spacing: 6px 2px; +} + +.params .paramname, .retval .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + + + + +/* @end */ + +/* @group Directory (tree) */ + +/* for the tree view */ + +.ftvtree { + font-family: sans-serif; + margin: 0px; +} + +/* these are for tree view when used as main index */ + +.directory { + font-size: 9pt; + font-weight: bold; + margin: 5px; +} + +.directory h3 { + margin: 0px; + margin-top: 1em; + font-size: 11pt; +} + +/* +The following two styles can be used to replace the root node title +with an image of your choice. Simply uncomment the next two styles, +specify the name of your image and be sure to set 'height' to the +proper pixel height of your image. +*/ + +/* +.directory h3.swap { + height: 61px; + background-repeat: no-repeat; + background-image: url("yourimage.gif"); +} +.directory h3.swap span { + display: none; +} +*/ + +.directory > h3 { + margin-top: 0; +} + +.directory p { + margin: 0px; + white-space: nowrap; +} + +.directory div { + display: none; + margin: 0px; +} + +.directory img { + vertical-align: -30%; +} + +/* these are for tree view when not used as main index */ + +.directory-alt { + font-size: 100%; + font-weight: bold; +} + +.directory-alt h3 { + margin: 0px; + margin-top: 1em; + font-size: 11pt; +} + +.directory-alt > h3 { + margin-top: 0; +} + +.directory-alt p { + margin: 0px; + white-space: nowrap; +} + +.directory-alt div { + display: none; + margin: 0px; +} + +.directory-alt img { + vertical-align: -30%; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; +} + +address { + font-style: normal; + color: #2A3D61; +} + +table.doxtable { + border-collapse:collapse; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; +} + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + height:30px; + line-height:30px; + color:#8AA0CC; + border:solid 1px #C2CDE4; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#364D7C; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; +} + +.navpath li.navelem a:hover +{ + color:#6884BD; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#364D7C; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +div.ingroups +{ + font-size: 8pt; + padding-left: 5px; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +.title { + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +dl +{ + padding: 0 0 0 10px; +} + +dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug +{ + border-left:4px solid; + padding: 0 0 0 6px; +} + +dl.note +{ + border-color: #D0D000; +} + +dl.warning, dl.attention +{ + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant +{ + border-color: #00D000; +} + +dl.deprecated +{ + border-color: #505050; +} + +dl.todo +{ + border-color: #00C0E0; +} + +dl.test +{ + border-color: #3030E0; +} + +dl.bug +{ + border-color: #C08050; +} + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectname +{ + background-color: #175783; + border: 1px solid; + height: 80px; + background-repeat: no-repeat; +/* font: 300% arial,sans-serif;*/ + margin: 0px; + padding: 0px; +} + +#projectbrief +{ + font: 120% arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 50% arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + background: url("head.png"); + background-color: #175783; + border: 1px solid; + height: 80px; + background-repeat: no-repeat; + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #5373B4; +} + diff --git a/doc/salome/tui/static/footer.html b/doc/salome/tui/static/footer.html new file mode 100755 index 000000000..5b030c021 --- /dev/null +++ b/doc/salome/tui/static/footer.html @@ -0,0 +1,14 @@ + + + + + +
    + +
    +Copyright © 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
    +Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
    +
    +
    + + diff --git a/doc/salome/tui/static/header.html.in b/doc/salome/tui/static/header.html.in new file mode 100755 index 000000000..4571b4363 --- /dev/null +++ b/doc/salome/tui/static/header.html.in @@ -0,0 +1,20 @@ + + + + + +$title + +$treeview +$search +$mathjax + + + + +
    +
    Version: @VERSION@
    + +
    diff --git a/doc/salome/unittests.dox b/doc/salome/unittests.dox index fc5ebdd47..517b80cd1 100644 --- a/doc/salome/unittests.dox +++ b/doc/salome/unittests.dox @@ -10,60 +10,53 @@ the unit tests. \section S1_unit SALOME KERNEL source code structuration -
      -
    1. General structure of KERNEL_SRC +\subsection sub11 General structure of KERNEL_SRC -- KERNEL_SRC : +- KERNEL_SRC :\n Some README files and configuration tools for build -- KERNEL_SRC/adm_local : - Part of the configuration files, other modules have a directory with the - same name. Not used in KERNEL. - -- KERNEL_SRC/bin : +- KERNEL_SRC/bin :\n Python and shell scripts used at run time. Kit to install a %SALOME Application. -- KERNEL_SRC/doc : +- KERNEL_SRC/doc :\n Kit for KERNEL end user documentation production: public interfaces, Python, CORBA. Integrator and Developper documentation. -- KERNEL_SRC/idl : +- KERNEL_SRC/idl :\n All CORBA interfaces from KERNEL are regrouped here. -- KERNEL_SRC/resources : +- KERNEL_SRC/resources :\n Configuration files for servers (examples). Interfaces definitions for KERNEL test components. -- KERNEL_SRC/salome_adm : +- KERNEL_SRC/salome_adm :\n Configuration files used by autotools (M4 macros & co.) -- KERNEL_SRC/src : +- KERNEL_SRC/src :\n The source code (C++ and Python) -
    2. -
    3. -Directory src: C++ and Python source code +\subsection sub12 Directory src: C++ and Python source code
      1. Basic services non related to CORBA -- Basics +- Basics\n %A set of general purpose C++ services, not related to CORBA. Some general purpose services that are in Utils directory (CORBA related), are progressivley moved here, as they are not related to CORBA. -- SALOMELocalTrace +- SALOMELocalTrace\n %A multithread trace system that allows message tracing on standard error or a file. -- CASCatch +- CASCatch\n Exceptions and signal handler. -- HDFPersist +- HDFPersist\n %A C++ interface to HDF.
      2. @@ -71,22 +64,22 @@ the unit tests.
      3. Basic CORBA services -- Logger : +- Logger :\n %A CORBA %server that collects the trace messages from differents CORBA process. -- SALOMETraceCollector : +- SALOMETraceCollector :\n %A multithread trace system derived from SALOMELocalTrace, that sends messages to Logger %server via CORBA. -- Utils : +- Utils :\n %A set of general purpose services related to CORBA, such as basic CORBA exception system. See also Basics directory above. -- NamingService : +- NamingService :\n C++ and Python interfaces to name, store and retrieve CORBA objects -- GenericObj : +- GenericObj :\n %A generic CORBA interface for CORBA objects, to count distributed references, and to allow destruction by client. @@ -94,21 +87,21 @@ the unit tests.
      4. Miscellaneous CORBA servers -- %Registry : +- %Registry :\n Implements SALOME_registry.idl. Provides a CORBA %server library and a separate %server program. -- ModuleCatalog : +- ModuleCatalog :\n Implements SALOME_moduleCatalog.idl. Provide a CORBA %server library and separate %server and client programs. -- ModuleGenerator : +- ModuleGenerator :\n Tool to generate a module catalog from CORBA idl -- ResourcesManager : +- ResourcesManager :\n library included in container %server -- Notification : +- Notification :\n library included in differents servers (container) - NOTIFICATION_SWIG @@ -137,7 +130,7 @@ the unit tests. - SALOMEDSImpl -- SALOMEDS +- %SALOMEDS
      5. @@ -162,14 +155,7 @@ the unit tests. - TestMPIContainer
      6. -
      7. -Batch interface library -- Batch - -- Batch_SWIG - -
      8. Unit tests @@ -182,7 +168,7 @@ the unit tests. \section S2_unit Tools and principles used for Unit testing -**TO BE COMPLETED** +TO BE COMPLETED Unit Testing rely on cppunit package for C++ testing, and on unittest module for Python. See these products for general principles of unit testing. diff --git a/idl/Calcium_Ports.idl b/idl/Calcium_Ports.idl deleted file mode 100644 index cce57e90f..000000000 --- a/idl/Calcium_Ports.idl +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -// File : SALOME_Ports.idl -// Author : Eric Fayolle, EDF -// -#ifndef _CALCIUM_PORTS_IDL_ -#define _CALCIUM_PORTS_IDL_ - -#include "SALOME_Ports.idl" - -module Ports { - - module Calcium_Ports { - - const long UNLIMITED_STORAGE_LEVEL = -70; - enum DependencyType { UNDEFINED_DEPENDENCY, TIME_DEPENDENCY, ITERATION_DEPENDENCY }; - enum DateCalSchem { TI_SCHEM, TF_SCHEM , ALPHA_SCHEM}; - enum InterpolationSchem { L0_SCHEM, L1_SCHEM }; - enum ExtrapolationSchem { UNDEFINED_EXTRA_SCHEM, E0_SCHEM, E1_SCHEM}; - - // enum DisconnectDirective {UNDEFINED_DIRECTIVE,CONTINUE,STOP}; - typedef boolean DisconnectDirective; - const DisconnectDirective stop = FALSE; - const DisconnectDirective cont = TRUE; - - interface Calcium_Port : Ports::Data_Port, Ports::PortProperties { - void disconnect(in DisconnectDirective mode); - }; - - typedef sequence seq_long; - typedef sequence seq_float; - typedef sequence seq_double; - typedef sequence seq_string; - typedef sequence seq_boolean; - typedef seq_float seq_complex; - - interface Calcium_Integer_Port : Calcium_Port { - void put (in seq_long data, in double time, in long tag); - }; - - interface Calcium_Real_Port : Calcium_Port { - void put (in seq_float data, in double time, in long tag); - }; - - interface Calcium_Double_Port : Calcium_Port { - void put (in seq_double data, in double time, in long tag); - }; - - interface Calcium_String_Port : Calcium_Port { - void put (in seq_string data, in double time, in long tag); - }; - - interface Calcium_Logical_Port : Calcium_Port { - void put (in seq_boolean data, in double time, in long tag); - }; - - interface Calcium_Complex_Port : Calcium_Port { - void put (in seq_complex data, in double time, in long tag); - }; - - }; -}; - -#endif diff --git a/idl/Calcium_Ports.idl.in b/idl/Calcium_Ports.idl.in new file mode 100644 index 000000000..5b0a2d959 --- /dev/null +++ b/idl/Calcium_Ports.idl.in @@ -0,0 +1,96 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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 +// +// File : SALOME_Ports.idl +// Author : Eric Fayolle, EDF +// +#ifndef _CALCIUM_PORTS_IDL_ +#define _CALCIUM_PORTS_IDL_ + +#include "SALOME_Ports.idl" + +module Ports { + + module Calcium_Ports { + + const long UNLIMITED_STORAGE_LEVEL = -70; + enum DependencyType { UNDEFINED_DEPENDENCY, TIME_DEPENDENCY, ITERATION_DEPENDENCY }; + enum DateCalSchem { TI_SCHEM, TF_SCHEM , ALPHA_SCHEM}; + enum InterpolationSchem { L0_SCHEM, L1_SCHEM }; + enum ExtrapolationSchem { UNDEFINED_EXTRA_SCHEM, E0_SCHEM, E1_SCHEM}; + + // enum DisconnectDirective {UNDEFINED_DIRECTIVE,CONTINUE,STOP}; + typedef boolean DisconnectDirective; + const DisconnectDirective stop = FALSE; + const DisconnectDirective cont = TRUE; + + interface Calcium_Port : Ports::Data_Port, Ports::PortProperties { + void disconnect(in DisconnectDirective mode); + }; + + typedef sequence seq_long; + typedef sequence seq_long_long; + typedef sequence< @CALCIUM_IDL_INT_F77@ > seq_integer; + + typedef sequence seq_float; + typedef sequence seq_double; + typedef sequence seq_string; + typedef sequence seq_boolean; + typedef seq_float seq_complex; + + //Fortran int size conforming port + interface Calcium_Integer_Port : Calcium_Port { + void put (in seq_integer data, in double time, in long tag); + }; + + interface Calcium_Intc_Port : Calcium_Port { + void put (in seq_long data, in double time, in long tag); + }; + + interface Calcium_Long_Port : Calcium_Port { + void put (in seq_long_long data, in double time, in long tag); + }; + + + interface Calcium_Real_Port : Calcium_Port { + void put (in seq_float data, in double time, in long tag); + }; + + interface Calcium_Double_Port : Calcium_Port { + void put (in seq_double data, in double time, in long tag); + }; + + interface Calcium_String_Port : Calcium_Port { + void put (in seq_string data, in double time, in long tag); + }; + + interface Calcium_Logical_Port : Calcium_Port { + void put (in seq_boolean data, in double time, in long tag); + }; + + interface Calcium_Complex_Port : Calcium_Port { + void put (in seq_complex data, in double time, in long tag); + }; + + }; +}; + +#endif diff --git a/idl/DSC_Engines.idl b/idl/DSC_Engines.idl index 5d42e6693..3335c8d6c 100644 --- a/idl/DSC_Engines.idl +++ b/idl/DSC_Engines.idl @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : DSC_Engines.idl // Author : Andre RIBES, EDF // $Header: @@ -29,9 +30,8 @@ #include "SALOME_Component.idl" #include "SALOME_Ports.idl" -/*! \file - This is a package that contains IDL interfaces that permits to add - a dynamic port model to the SALOME object model. +/*! \file DSC_Engines.idl + \brief interfaces that permits to add a dynamic port model to the SALOME object model. */ module Engines { @@ -58,11 +58,12 @@ module Engines { - First part permits to add an get ports of a component. - Second part permits to connect/disconnect ports. */ - interface DSC : Engines::Component { + interface DSC : Engines::EngineComponent { /*--------------------------------------------------------------------------------------------*/ /*-------------------------------------- Types Part ------------------------------------------*/ + //! a uses port /*! This sequence is a uses port. It's a sequence since a uses port can be connected with x provides port. Sometimes this kind of uses port is called multiple port. @@ -71,33 +72,25 @@ module Engines { */ typedef sequence uses_port; + //! This enumeration is used when the connection of a port (uses or provides) is changed. /*! - This enumeration is used when the connection of a port (uses or provides) - is changed. This information is for the component's user code. + This information is for the component's user code. */ enum Message {AddingConnection, RemovingConnection, ApplicationError}; - /*! - This exception is raised when a port's name is gived before - it is added to the component. - */ + //! This exception is raised when a port is used before it is added to the component. exception PortNotDefined {}; - /*! - This exception is raised if you try to add a port with the same - name than a previous defined port. - */ + //! This exception is raised if you try to add a port with the same name than a previous defined port. exception PortAlreadyDefined {}; - /*! - This exception is raised when you try to use a port that is not connected. - */ + //! This exception is raised when you try to use a port that is not connected. exception PortNotConnected {}; + //! This exception is raised if the type of the provides port is bad. /*! - This exception is raised if the type of the provides port is bad. This exception contains a string that gives what type is expected and the type that the operation received. */ @@ -106,27 +99,21 @@ module Engines { string received; }; - /*! - Port's reference is Nil ! - */ + //! Port's reference is Nil ! exception NilPort {}; - /*! - Port's reference is not the right reference. - */ + //! Port's reference is not the right reference. exception BadPortReference {}; - /*! - Object porperty is not good for the port - */ + //! Object property is not good for the port exception BadProperty {}; /*--------------------------------------------------------------------------------------------*/ /*-------------------------------------- Operation Part --------------------------------------*/ + //! This operation adds a provides port to the component. /*! - This operation adds a provides port to the component. \param ref port's Corba reference. \param provides_port_name port's name. @@ -146,8 +133,8 @@ module Engines { NilPort, BadProperty); + //! This operation adds a uses port to the component. /*! - This operation adds a uses port to the component. \param repository_id port's Corba repository id. Eg : IDL:toto.tata/MODULE/INTERFACE_NAME:1.0 @@ -166,8 +153,8 @@ module Engines { in Ports::PortProperties port_prop) raises(PortAlreadyDefined, BadProperty); + //! Get a provides port of the component. /*! - This operation is used to get a provides port of the component. It can be used by the framework or the component himself. If it's the framework that wants the port, the reference has to be gived @@ -191,8 +178,8 @@ module Engines { PortNotConnected, BadPortType); + //! Get a uses port of the component. /*! - This operation is used to get a uses port of the component. It can be used by the framework or the component himself. Actually, only the user layer of the component will use this operation. A uses port could be obtained if and only if the uses port is connected. The sequence @@ -215,8 +202,8 @@ module Engines { BadPortType); + //! Connect a provides port with a uses port. /*! - This operation connects a provides port with a uses port. \param provides_port_name provides port's name. @@ -226,8 +213,8 @@ module Engines { */ void connect_provides_port(in string provides_port_name) raises(PortNotDefined); + //! Connect a uses port with a provides port. /*! - This operation connects a uses port with a provides port. \param uses_port_name uses port's name. \param provides_port_ref provides port's Corba reference. @@ -240,9 +227,10 @@ module Engines { in Ports::Port provides_port_ref) raises(PortNotDefined, BadPortType, NilPort); + + //! Check if a port is connected. /*! - This operation tests if a port is connected. You can test - a uses port or a provides port. + You can test a uses port or a provides port. \param port_name port's name. \return true if the uses port is connected. @@ -251,8 +239,8 @@ module Engines { */ boolean is_connected(in string port_name) raises(PortNotDefined); + //! Disconnect a uses port from a provides port. /*! - This operation disconnects a uses port to a provides port. \param provides_port_name provides port's name. \param message state associated with the disconnection. @@ -264,8 +252,8 @@ module Engines { in Engines::DSC::Message message) raises(PortNotDefined, PortNotConnected); + //! Disconnect a provides port from a uses port. /*! - This operation disconnects a provides port to a uses port. \param uses_port_name uses port's name. \param provides_port_ref CORBA reference of the provides port. @@ -280,8 +268,8 @@ module Engines { in Engines::DSC::Message message) raises(PortNotDefined, PortNotConnected, BadPortReference); + //! Get port's property object. /*! - This operation permits to get port's property object. \param port_name port's name. \return properties object's CORBA reference. @@ -298,18 +286,14 @@ module Engines { */ interface ConnectionManager { - /*! - The Id gived to the disconnect method is bad. - */ + //! The Id given to the disconnect method is bad. exception BadId {}; - /*! - A connection Id. It's unique. - */ + //! A connection Id. It's unique. typedef short connectionId; + //! Connect a uses port with a provides port. /*! - This operation connects a uses port with a provides port. \param uses_component The component that have the uses port. \param uses_port_name uses port's name. @@ -331,9 +315,8 @@ module Engines { Engines::DSC::BadPortType, Engines::DSC::NilPort); + //! Release a connection that has been previously created by the ConnectionManager. /*! - This operation releases a connection that has been previously created by - the ConnectionManager. \param id The id of the connection previously gived by the connect operation of the ConnectionManager. @@ -343,18 +326,14 @@ module Engines { */ void disconnect(in connectionId id, in Engines::DSC::Message message) raises(Engines::ConnectionManager::BadId, - Engines::DSC::PortNotDefined, - Engines::DSC::PortNotConnected, - Engines::DSC::BadPortReference); + Engines::DSC::PortNotDefined, + Engines::DSC::PortNotConnected, + Engines::DSC::BadPortReference); - /*! - Shutdown the ConnectionManager process. - */ + //! Shutdown the ConnectionManager process. oneway void ShutdownWithExit(); - /*! - Returns the PID of the connection manager - */ + //! Return the PID of the connection manager long getPID(); }; @@ -368,39 +347,34 @@ module Engines { */ interface Superv_Component : Engines::DSC { - /*! - The SUPERV module call this method before starting the service. Thus the service - can add is dynamics ports before it is started. + //! Operation to create the service ports before it is executed + /*! + YACS module call this method before starting the service. Thus the service + can add its dynamics ports before it is started. \param service_name service's name. \return true if the service is correctly initialised. */ boolean init_service(in string service_name); - }; -/*--------------------------------------------------------------------------------------------*/ + struct multiple_param { + string name; + long number; + }; - /*! \brief Interface of a Parallel_DSC component. - This interface defines the operations needed to add a paco++ port - into a parallel DSC component. - */ - interface Parallel_DSC : Engines::Superv_Component, Engines::Parallel_Component { + typedef sequence seq_multiple_param; /*! - This operation gives the proxy node of a paco++ port to all the nodes. - Only a node of the parallel component is going to add a proxy object - with an internal method. - - \param ref provides proxy port's reference. - \param provides_port_name provides port's name. + YACS module call this method before starting the service. Thus the service + can add its dynamics ports before it is started. + This method is also used by YACS to specify for each datastream port (name in multiple_param) + how many the service should create a datastream port. - \see Engines_ParallelDSC_i::add_parallel_provides_proxy_port - */ - void set_paco_proxy(in Object ref, - in string provides_port_name, - in Ports::PortProperties port_prop); - - }; + For a defined port named: in_data_port, the service should create ports with the names: + in_data_port_0, in_data_port_1, ... + */ + boolean init_service_with_multiple(in string service_name, in seq_multiple_param params); + }; }; #endif diff --git a/idl/DSC_Engines.xml b/idl/DSC_Engines.xml index bf519ac38..1d4dbdc42 100644 --- a/idl/DSC_Engines.xml +++ b/idl/DSC_Engines.xml @@ -1,34 +1,30 @@ - - + Engines @@ -42,13 +38,6 @@ distributed - - Parallel_DSC - - set_paco_proxy - distributed - - Superv_Component @@ -57,4 +46,4 @@ - + diff --git a/idl/Logger.idl b/idl/Logger.idl index e69d5f2dd..1aa417acc 100644 --- a/idl/Logger.idl +++ b/idl/Logger.idl @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : Logger.idl // Author : Vasily Rusyaev // @@ -26,14 +27,26 @@ #define SALOME_LOGGER_IDL #pragma prefix "opencascade.com" +/*! \file Logger.idl \brief interfaces for %SALOME logger +*/ +/*! \brief module that provides interface to %SALOME logger +*/ module SALOME_Logger { +/*! \brief interface to use the %SALOME logger +*/ interface Logger { - //put message into one special place for all servers using Logger + /*! \brief put message into one special place for all servers using %SALOME logger + + \param message the message to send + */ oneway void putMessage (in string message); + + //! check if the logger is running void ping (); + //! shutdown the logger server void shutdown(); }; }; diff --git a/idl/Makefile.am b/idl/Makefile.am index 4efc97a8d..1347ad5e0 100644 --- a/idl/Makefile.am +++ b/idl/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # This Makefile is responsible of generating the client and server # implementation of IDL interfaces for both C++ and python usage. # The building process of the C++ files is in charge of each source @@ -26,11 +27,7 @@ # include $(top_srcdir)/salome_adm/unix/make_common_starter.am -if WITH_PACO_PARALLEL -MAKEFLAGS = -j1 -endif - -AM_CXXFLAGS = -fPIC +AM_CXXFLAGS += -fPIC BASEIDL_FILES = \ SALOME_Exception.idl \ @@ -45,16 +42,20 @@ BASEIDL_FILES = \ SALOME_Registry.idl \ Logger.idl \ SALOME_GenericObj.idl \ + SALOME_Types.idl \ SALOME_Session.idl \ SALOME_TestModuleCatalog.idl \ nstest.idl \ DSC_Engines.idl \ SALOME_Ports.idl \ - Calcium_Ports.idl \ - Palm_Ports.idl + SALOME_PyNode.idl \ + Palm_Ports.idl \ + SALOME_PACOExtension.idl \ + SALOME_ParamPorts.idl \ + SALOME_Parametric.idl \ + SALOME_MPIObject.idl MPIIDL_FILES = \ - SALOME_MPIObject.idl \ SALOME_MPIContainer.idl \ SALOME_TestMPIComponent.idl @@ -69,10 +70,13 @@ OTHER_IDL_FILES = \ # all the idl files are needed for make dist EXTRA_DIST= $(BASEIDL_FILES) $(MPIIDL_FILES) $(OTHER_IDL_FILES) \ - SALOME_Exception.xml SALOME_Component.xml DSC_Engines.xml SALOME_Ports.xml + SALOME_Component.xml DSC_Engines.xml SALOME_Ports.xml \ + SALOME_PACOExtension.xml SALOME_ParamPorts.xml \ + SALOME_GenericObj.xml SALOME_Exception.xml # This variable defines the files to be installed -salomeidl_DATA = $(IDL_FILES) +salomeidl_DATA = $(IDL_FILES) +nodist_salomeidl_DATA = Calcium_Ports.idl # Sources built from idl files # BUILT_SOURCE = first thing done on make all @@ -91,24 +95,30 @@ BASEIDL_SOURCES =\ SALOME_RegistrySK.cc \ LoggerSK.cc \ SALOME_GenericObjSK.cc \ + SALOME_TypesSK.cc \ SALOME_SessionSK.cc \ SALOME_TestModuleCatalogSK.cc \ nstestSK.cc \ DSC_EnginesSK.cc \ SALOME_PortsSK.cc \ + SALOME_PyNodeSK.cc \ Calcium_PortsSK.cc \ - Palm_PortsSK.cc + Palm_PortsSK.cc \ + SALOME_PACOExtensionSK.cc \ + SALOME_ParamPortsSK.cc \ + SALOME_ParametricSK.cc \ + SALOME_MPIObjectSK.cc DYNIDL_SRCS = \ SALOME_PortsDynSK.cc Calcium_PortsDynSK.cc SALOME_ContainerManagerDynSK.cc \ SALOME_CommDynSK.cc SALOME_RegistryDynSK.cc SALOME_ModuleCatalogDynSK.cc \ SALOMEDSDynSK.cc SALOME_SessionDynSK.cc SALOME_RessourcesCatalogDynSK.cc \ - DSC_EnginesDynSK.cc SALOME_ComponentDynSK.cc SALOME_GenericObjDynSK.cc \ + DSC_EnginesDynSK.cc SALOME_ComponentDynSK.cc SALOME_GenericObjDynSK.cc SALOME_TypesDynSK.cc \ Palm_PortsDynSK.cc SALOME_ExceptionDynSK.cc SALOMEDS_AttributesDynSK.cc \ - LoggerDynSK.cc + LoggerDynSK.cc SALOME_PACOExtensionDynSK.cc SALOME_ParamPortsDynSK.cc SALOME_PyNodeDynSK.cc \ + SALOME_ParametricDynSK.cc SALOME_MPIObjectDynSK.cc MPIIDL_SOURCES = \ - SALOME_MPIObjectSK.cc \ SALOME_MPIContainerSK.cc \ SALOME_TestMPIComponentSK.cc @@ -123,140 +133,187 @@ if MPI_IS_OK STATIDL_SOURCES += $(MPIIDL_SOURCES) endif +if MPI_IS_OK + DYNIDL_SRCS += SALOME_MPIContainerDynSK.cc SALOME_TestMPIComponentDynSK.cc +endif + $(DYNIDL_SRCS) : $(IDL_SOURCES) # also install all generated headers to use result library from another modules salomeinclude_DATA= $(STATIDL_SOURCES:%SK.cc=%.hh) if WITH_PACO_PARALLEL -PAR = SALOME_ExceptionPaCO.h SALOME_ExceptionPaCO.cc \ - SALOME_ComponentPaCO.h SALOME_ComponentPaCO.cc \ - SALOME_PortsPaCO.h SALOME_PortsPaCO.cc \ - DSC_EnginesPaCO.h DSC_EnginesPaCO.cc +PAR = SALOME_ComponentPaCO.hxx SALOME_ComponentPaCO.cxx \ + SALOME_PortsPaCO.hxx SALOME_PortsPaCO.cxx \ + DSC_EnginesPaCO.hxx DSC_EnginesPaCO.cxx \ + SALOME_PACOExtensionPaCO.hxx SALOME_PACOExtensionPaCO.cxx \ + SALOME_ParamPortsPaCO.hxx SALOME_ParamPortsPaCO.cxx \ + SALOME_GenericObjPaCO.hxx SALOME_GenericObjPaCO.cxx + +PAR_INCLUDES = SALOME_Exception.hxx SALOME_GenericObj.hxx SALOMEDS.hxx SALOME_PyNode.hxx PAR_LIB = libSalomeParallelIDLKernel.la -IDL_PACO = SALOME_ExceptionPaCO.idl SALOME_ComponentPaCO.idl SALOME_PortsPaCO.idl DSC_EnginesPaCO.idl - -GEN_PACO = SALOME_ComponentPaCO_Engines_Container_server.cc \ - SALOME_ComponentPaCO_Engines_Container_client.cc \ - SALOME_ComponentPaCO_Engines_Component_server.cc \ - SALOME_ComponentPaCO_Engines_Component_client.cc \ - SALOME_ComponentPaCO_Engines_Parallel_Component_server.cc \ - SALOME_ComponentPaCO_Engines_Parallel_Component_client.cc \ - SALOME_ComponentPaCO_Engines_fileTransfer_server.cc \ - SALOME_ComponentPaCO_Engines_fileTransfer_client.cc \ - SALOME_ComponentPaCO_Engines_Salome_file_server.cc \ - SALOME_ComponentPaCO_Engines_Salome_file_client.cc \ - SALOME_ComponentPaCO_Engines_Parallel_Salome_file_server.cc \ - SALOME_ComponentPaCO_Engines_Parallel_Salome_file_client.cc \ - SALOME_PortsPaCO_Ports_Port_server.cc \ - SALOME_PortsPaCO_Ports_Port_client.cc \ - DSC_EnginesPaCO_Engines_DSC_server.cc \ - DSC_EnginesPaCO_Engines_DSC_client.cc \ - DSC_EnginesPaCO_Engines_Superv_Component_server.cc \ - DSC_EnginesPaCO_Engines_Superv_Component_client.cc \ - DSC_EnginesPaCO_Engines_Parallel_DSC_server.cc \ - DSC_EnginesPaCO_Engines_Parallel_DSC_client.cc - -INCLUDES_PACO = SALOME_ComponentPaCO_Engines_Container_server.h \ - SALOME_ComponentPaCO_Engines_Container_client.h \ - SALOME_ComponentPaCO_Engines_Component_server.h \ - SALOME_ComponentPaCO_Engines_Component_client.h \ - SALOME_ComponentPaCO_Engines_Parallel_Component_server.h \ - SALOME_ComponentPaCO_Engines_Parallel_Component_client.h \ - SALOME_ComponentPaCO_Engines_fileTransfer_server.h \ - SALOME_ComponentPaCO_Engines_fileTransfer_client.h \ - SALOME_ComponentPaCO_Engines_Salome_file_server.h \ - SALOME_ComponentPaCO_Engines_Salome_file_client.h \ - SALOME_ComponentPaCO_Engines_Parallel_Salome_file_server.h \ - SALOME_ComponentPaCO_Engines_Parallel_Salome_file_client.h \ - SALOME_ExceptionPaCO.h \ - SALOME_ComponentPaCO.h \ - SALOME_Exception.h \ - SALOME_Component.h \ - SALOME_PortsPaCO_Ports_Port_server.h \ - SALOME_PortsPaCO_Ports_Port_client.h \ - SALOME_PortsPaCO.h \ - SALOME_Ports.h \ - DSC_EnginesPaCO_Engines_DSC_server.h \ - DSC_EnginesPaCO_Engines_DSC_client.h \ - DSC_EnginesPaCO_Engines_Superv_Component_server.h \ - DSC_EnginesPaCO_Engines_Superv_Component_client.h \ - DSC_EnginesPaCO_Engines_Parallel_DSC_server.h \ - DSC_EnginesPaCO_Engines_Parallel_DSC_client.h \ - DSC_EnginesPaCO.h \ - DSC_Engines.h - -XML = SALOME_Exception.xml SALOME_Component.xml DSC_Engines.xml SALOME_Ports.xml +IDL_PACO = SALOME_ComponentPaCO.idl SALOME_PortsPaCO.idl DSC_EnginesPaCO.idl \ + SALOME_ParamPortsPaCO.idl SALOME_PACOExtensionPaCO.idl \ + SALOME_GenericObjPaCO.idl + +GEN_PACO = SALOME_ComponentPaCO_Engines_Container_server.cxx \ + SALOME_ComponentPaCO_Engines_Container_client.cxx \ + SALOME_ComponentPaCO_Engines_EngineComponent_server.cxx \ + SALOME_ComponentPaCO_Engines_EngineComponent_client.cxx \ + SALOME_ComponentPaCO_Engines_fileTransfer_server.cxx \ + SALOME_ComponentPaCO_Engines_fileTransfer_client.cxx \ + SALOME_ComponentPaCO_Engines_Salome_file_server.cxx \ + SALOME_ComponentPaCO_Engines_Salome_file_client.cxx \ + SALOME_PortsPaCO_Ports_Port_server.cxx \ + SALOME_PortsPaCO_Ports_Port_client.cxx \ + SALOME_PortsPaCO_Ports_Data_Port_server.cxx \ + SALOME_PortsPaCO_Ports_Data_Port_client.cxx \ + DSC_EnginesPaCO_Engines_DSC_server.cxx \ + DSC_EnginesPaCO_Engines_DSC_client.cxx \ + DSC_EnginesPaCO_Engines_Superv_Component_server.cxx \ + DSC_EnginesPaCO_Engines_Superv_Component_client.cxx \ + SALOME_PACOExtensionPaCO_Engines_Parallel_Component_server.cxx \ + SALOME_PACOExtensionPaCO_Engines_Parallel_Component_client.cxx \ + SALOME_PACOExtensionPaCO_Engines_PACO_Container_server.cxx \ + SALOME_PACOExtensionPaCO_Engines_PACO_Container_client.cxx \ + SALOME_PACOExtensionPaCO_Engines_Parallel_Salome_file_server.cxx \ + SALOME_PACOExtensionPaCO_Engines_Parallel_Salome_file_client.cxx \ + SALOME_PACOExtensionPaCO_Engines_Parallel_DSC_server.cxx \ + SALOME_PACOExtensionPaCO_Engines_Parallel_DSC_client.cxx \ + SALOME_ParamPortsPaCO_Ports_Param_Double_Port_server.cxx \ + SALOME_ParamPortsPaCO_Ports_Param_Double_Port_client.cxx \ + SALOME_GenericObjPaCO_SALOME_GenericObj_server.cxx \ + SALOME_GenericObjPaCO_SALOME_GenericObj_client.cxx + +INCLUDES_PACO = SALOME_ComponentPaCO_Engines_Container_server.hxx \ + SALOME_ComponentPaCO_Engines_Container_client.hxx \ + SALOME_ComponentPaCO_Engines_EngineComponent_server.hxx \ + SALOME_ComponentPaCO_Engines_EngineComponent_client.hxx \ + SALOME_ComponentPaCO_Engines_fileTransfer_server.hxx \ + SALOME_ComponentPaCO_Engines_fileTransfer_client.hxx \ + SALOME_ComponentPaCO_Engines_Salome_file_server.hxx \ + SALOME_ComponentPaCO_Engines_Salome_file_client.hxx \ + SALOME_ComponentPaCO.hxx \ + SALOME_Component.hxx \ + SALOME_PortsPaCO_Ports_Port_server.hxx \ + SALOME_PortsPaCO_Ports_Port_client.hxx \ + SALOME_PortsPaCO_Ports_Data_Port_server.hxx \ + SALOME_PortsPaCO_Ports_Data_Port_client.hxx \ + SALOME_PortsPaCO.hxx \ + SALOME_Ports.hxx \ + DSC_EnginesPaCO_Engines_DSC_server.hxx \ + DSC_EnginesPaCO_Engines_DSC_client.hxx \ + DSC_EnginesPaCO_Engines_Superv_Component_server.hxx \ + DSC_EnginesPaCO_Engines_Superv_Component_client.hxx \ + DSC_EnginesPaCO.hxx \ + DSC_Engines.hxx \ + SALOME_PACOExtensionPaCO_Engines_Parallel_Component_server.hxx \ + SALOME_PACOExtensionPaCO_Engines_Parallel_Component_client.hxx \ + SALOME_PACOExtensionPaCO_Engines_PACO_Container_server.hxx \ + SALOME_PACOExtensionPaCO_Engines_PACO_Container_client.hxx \ + SALOME_PACOExtensionPaCO_Engines_Parallel_Salome_file_server.hxx \ + SALOME_PACOExtensionPaCO_Engines_Parallel_Salome_file_client.hxx \ + SALOME_PACOExtensionPaCO_Engines_Parallel_DSC_server.hxx \ + SALOME_PACOExtensionPaCO_Engines_Parallel_DSC_client.hxx \ + SALOME_PACOExtensionPaCO.hxx \ + SALOME_PACOExtension.hxx \ + SALOME_ParamPortsPaCO_Ports_Param_Double_Port_server.hxx \ + SALOME_ParamPortsPaCO_Ports_Param_Double_Port_client.hxx \ + SALOME_ParamPortsPaCO.hxx \ + SALOME_ParamPorts.hxx \ + SALOME_GenericObjPaCO_SALOME_GenericObj_server.hxx \ + SALOME_GenericObjPaCO_SALOME_GenericObj_client.hxx \ + SALOME_GenericObjPaCO.hxx \ + SALOME_GenericObj.hxx + +XML = SALOME_Component.xml DSC_Engines.xml SALOME_Ports.xml \ + SALOME_PACOExtension.xml SALOME_ParamPorts.xml \ + SALOME_GenericObj.xml endif idldir = $(prefix)/idl/salome -nodist_idl_DATA = ${XML} ${IDL_PACO} +nodist_idl_DATA = ${XML} ${IDL_PACO} Calcium_Ports.idl nodist_salomeinclude_HEADERS = ${INCLUDES_PACO} -BUILT_SOURCES = $(IDL_SOURCES) $(PAR) +BUILT_SOURCES = $(IDL_SOURCES) $(PAR_INCLUDES) $(PAR) -SALOME_ExceptionPaCO.h SALOME_ExceptionPaCO.cc : SALOME_Exception.idl SALOME_Exception.xml -SALOME_ComponentPaCO.h SALOME_ComponentPaCO.cc : SALOME_Component.idl SALOME_Component.xml -SALOME_PortsPaCO.h SALOME_PortsPaCO.cc : SALOME_Ports.idl SALOME_Ports.xml -DSC_EnginesPaCO.h DSC_EnginesPaCO.cc : DSC_Engines.idl DSC_Engines.xml +SALOME_GenericObjPaCO.idl SALOME_GenericObjPaCO.hxx SALOME_GenericObjPaCO.cxx : SALOME_GenericObj.idl SALOME_GenericObj.xml +SALOME_ComponentPaCO.idl SALOME_ComponentPaCO.hxx SALOME_ComponentPaCO.cxx : SALOME_Component.idl SALOME_Component.xml SALOME_GenericObjPaCO.idl +SALOME_PortsPaCO.idl SALOME_PortsPaCO.hxx SALOME_PortsPaCO.cxx : SALOME_Ports.idl SALOME_Ports.xml +DSC_EnginesPaCO.idl DSC_EnginesPaCO.hxx DSC_EnginesPaCO.cxx : DSC_Engines.idl DSC_Engines.xml +SALOME_PACOExtensionPaCO.idl SALOME_PACOExtensionPaCO.hxx SALOME_PACOExtensionPaCO.cxx : SALOME_PACOExtension.idl SALOME_PACOExtension.xml +SALOME_ParamPortsPaCO.idl SALOME_ParamPortsPaCO.hxx SALOME_ParamPortsPaCO.cxx : SALOME_ParamPorts.idl SALOME_ParamPorts.xml lib_LTLIBRARIES = libSalomeIDLKernel.la $(PAR_LIB) nodist_libSalomeIDLKernel_la_SOURCES = $(IDL_SOURCES) $(DYNIDL_SRCS) -libSalomeIDLKernel_la_CPPFLAGS =-I$(top_builddir)/salome_adm/unix -include SALOMEconfig.h \ - -I$(top_builddir)/idl \ +libSalomeIDLKernel_la_CPPFLAGS =-I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ libSalomeIDLKernel_la_LDFLAGS = -no-undefined -version-info=0:0:0 libSalomeIDLKernel_la_LIBADD = @CORBA_LIBS@ nodist_libSalomeParallelIDLKernel_la_SOURCES = $(PAR) $(GEN_PACO) -libSalomeParallelIDLKernel_la_CPPFLAGS =-I$(top_builddir)/salome_adm/unix -include SALOMEconfig.h \ - -I$(top_builddir)/idl \ +libSalomeParallelIDLKernel_la_CPPFLAGS =-I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ \ @PACO_INCLUDES@ libSalomeParallelIDLKernel_la_LDFLAGS = -no-undefined -version-info=0:0:0 libSalomeParallelIDLKernel_la_LIBADD = libSalomeIDLKernel.la @PACO_LIBS@ # These variables defines the building process of CORBA files -OMNIORB_IDL = @OMNIORB_IDL@ -OMNIORB_IDLCXXFLAGS = @OMNIORB_IDLCXXFLAGS@ -OMNIORB_IDLPYFLAGS = @OMNIORB_IDLPYFLAGS@ -I$(top_builddir)/salome/idl -IDLCXXFLAGS = -bcxx @IDLCXXFLAGS@ -Wba -I$(top_builddir)/salome/idl -IDLPYFLAGS = @IDLPYFLAGS@ +IDLCXXFLAGS = -bcxx @IDLCXXFLAGS@ -I$(srcdir) -I$(top_builddir)/salome/idl +IDLPYFLAGS = @IDLPYFLAGS@ -I$(srcdir) # potential problem on parallel make on the following - multiple outputs SUFFIXES = .idl .hh SK.cc .idlSK.cc: - $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $< + $(IDL) $(IDLCXXFLAGS) $< SK.cc.hh: #Dummy rule to replace the following one (for parallel make) #.idl.hh: -# $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $< +# $(IDL) $(IDLCXXFLAGS) $< -%PaCO.h %PaCO.cc : %.idl %.xml - @PACO_IDL@ -I $(srcdir):@PACOPATH@/idl $^ omniORB4 0 +if WITH_PACO_PARALLEL -install-exec-local: $(IDL_FILES:%=$(top_srcdir)/idl/%) +%PaCO.idl %PaCO.hxx %PaCO.cxx : %.idl %.xml + $(IDL) -p@PACOPATH@/lib/python -bpaco -Wb$(top_srcdir)/idl/$*.xml,$(srcdir):@PACOPATH@/idl $(top_srcdir)/idl/$*.idl + +.idl.hxx: + $(IDL) $(PACOIDLCXXFLAGS) -bcxx -Wbh=.hxx -Wbs=.cxx $< +endif + +install-exec-local: $(IDL_FILES:%=$(top_srcdir)/idl/%) Calcium_Ports.idl $(INSTALL) -d $(DESTDIR)$(salomepythondir) ls $^ | while read file; do \ - $(OMNIORB_IDL) $(IDLPYFLAGS) -C$(DESTDIR)$(salomepythondir) $$file ; \ + $(IDL) $(IDLPYFLAGS) -C$(DESTDIR)$(salomepythondir) $$file ; \ + done +if WITH_PACO_PARALLEL + ls $(top_builddir)/idl/*.idl | while read file; do \ + $(IDL) $(IDLPYFLAGS) -I$(top_srcdir)/idl -I@PACOPATH@/idl -C$(DESTDIR)$(salomepythondir) $$file ; \ done +endif # uninstall-local removes too much, but it works in distcheck uninstall-local: - rm -rf $(DESTDIR)$(salomepythondir)/* + for filen in `find $(DESTDIR)$(salomepythondir) -maxdepth 1` ; do \ + case $${filen} in \ + $(DESTDIR)$(salomepythondir) ) ;; \ + $(DESTDIR)$(salomepypkgdir) ) ;; \ + $(DESTDIR)$(sharedpkgpythondir) ) ;; \ + * ) rm -rf $${filen} ;; \ + esac ; \ + done ; mostlyclean-local: - -rm -f *.hh *.cc .depidl + -rm -f *.hh *.cc .depidl Calcium_Ports.idl # we use cpp to generate dependencies between idl files. # option x c tells the preprocessor to consider idl as a c file. # if an idl is modified, all idl dependencies are rebuilt -.depidl: $(IDL_FILES) +.depidl: $(IDL_FILES) Calcium_Ports.idl @echo "" > $@ @for dep in $^ dummy; do \ if [ $$dep != "dummy" ]; then \ @@ -268,5 +325,6 @@ mostlyclean-local: -include .depidl -CLEANFILES = *PaCO* *.h +CLEANFILES = *PaCO* *.hxx *.cxx Calcium_Ports.idl + diff --git a/idl/Palm_Ports.idl b/idl/Palm_Ports.idl index 062d0bb5f..5226903af 100644 --- a/idl/Palm_Ports.idl +++ b/idl/Palm_Ports.idl @@ -1,25 +1,26 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File : SALOME_Ports.idl + +// File : Palm_Ports.idl // Author : André RIBES, EDF // #ifndef _PALM_PORTS_IDL_ @@ -27,8 +28,8 @@ #include "SALOME_Ports.idl" -/*! \file - This file contains IDL palm ports declations. +/*! \file Palm_Ports.idl + \brief This file contains IDL palm ports declarations. */ module Ports { @@ -39,8 +40,7 @@ module Ports { */ interface Palm_Data_Short_Port : Ports::Data_Port { - /*! - This operation permits to transmit a short. + /*! \brief This operation permits to transmit a short. \param data the short transmitted. \param time time associated to the short. @@ -57,8 +57,7 @@ module Ports { /*! \brief Interface of a sequence of short port. */ interface Palm_Data_Seq_Short_Port : Ports::Data_Port { - /*! - This operation permits to transmit a sequence of short. + /*! \brief This operation permits to transmit a sequence of short. \param data the sequence transmitted. \param time time associated to the data. diff --git a/idl/SALOMEDS.idl b/idl/SALOMEDS.idl index 9c2877937..4502aaeb6 100644 --- a/idl/SALOMEDS.idl +++ b/idl/SALOMEDS.idl @@ -1,30 +1,29 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS.idl // Author : Yves FRICAUD -// $Header$ // -/*! - \file SALOMEDS.idl This file contains a set of interfaces used for creation, managment +/*! \file SALOMEDS.idl \brief This file contains a set of interfaces used for creation, management and modification of the %Study */ @@ -34,49 +33,43 @@ #include "SALOME_Exception.idl" #include "SALOME_GenericObj.idl" -/*! - This package contains the interfaces used for creation, managment +/*! \brief + This package contains the interfaces used for creation, management and modification of the %Study */ module SALOMEDS { -/*! \typedef URL - Name of the file in which the %Study is saved. - +/*! \brief Name of the file in which the %Study is saved. */ typedef string URL; -/*! Main identifier of an object in %SALOME application +/*! \brief Main identifier of an object in %SALOME application */ typedef string ID; -/*! While saving the data, IOR is transformed into persistent reference +/*! \brief While saving the data, IOR is transformed into persistent reference */ typedef string PersistentReference; -/*! IOR of the study in %SALOME application +/*! \brief IOR of the study in %SALOME application */ typedef string SalomeReference; -/*! List of the names of studies which are currently open in this %SALOME session. +/*! \brief List of the names of studies which are currently open in this %SALOME session. + Since %SALOME is a multi-study application, it allows to open a lot of studies during each working session. */ typedef sequence ListOfOpenStudies; -/*! List of file names -*/ +//! List of file names typedef sequence ListOfFileNames; -/*! List of modification dates of a study -*/ +//! List of modification dates of a study typedef sequence ListOfDates ; -/*! An unbounded sequence of strings -*/ +//! An unbounded sequence of strings typedef sequence ListOfStrings ; -/*! An unbounded sequence of sequence of strings -*/ +//! An unbounded sequence of sequence of strings typedef sequence ListOfListOfStrings ; -/*! A byte stream which is used for binary data transfer between different components -*/ +//! A byte stream which is used for binary data transfer between different components typedef sequence TMPFile; // Reference to other objects is treated with function AddReference @@ -100,12 +93,16 @@ during each working session. interface UseCaseIterator; interface UseCaseBuilder; -/*! List of attributes of %SObjects -*/ + interface Observer + { + oneway void notifyObserverID(in string theID, in long event); + }; + + +//! List of attributes of %SObjects typedef sequence ListOfAttributes; -/*! Exception indicating that this feature hasn't been implemented in %SALOME PRO application. -*/ +//! Exception indicating that this feature hasn't been implemented in %SALOME application. exception NotImplemented {}; @@ -128,19 +125,21 @@ during each working session. interface Study { +//! Invalid study context exception StudyInvalidContext {}; +//! Invalid study component exception StudyInvalidComponent {}; -/*! Invalid directory of the %study exception -*/ +//! Invalid directory of the %study exception exception StudyInvalidDirectory {}; -/*! Exception pointing that this name of the study has already been used. -*/ +//! Exception pointing that this name of the study has already been used. exception StudyNameAlreadyUsed {}; +//! study object already exists exception StudyObjectAlreadyExists {}; -/*! Invalid name of the %study exception -*/ +//! Invalid name of the %study exception exception StudyNameError {}; +//! Invalid study comment exception StudyCommentError {}; + /*! \brief The name of the %Study This is equivalent to the methods setName() & getName() @@ -151,139 +150,123 @@ during each working session. This is equivalent to the methods setID() & getID() */ attribute short StudyId; -/*! Sequence containing %SObjects -*/ +//! Sequence containing %SObjects typedef sequence ListOfSObject; -/*! - Gets the persistent reference to the %Study. -*/ +//! Get the persistent reference to the %Study. PersistentReference GetPersistentReference(); -/*! - Gets a transient reference to the %Study. -*/ +//! Get a transient reference to the %Study. SalomeReference GetTransientReference(); -/*! - Returns True if the %Study is empty +/*! \brief indicate whether the %Study is empty + + \return True if the %Study is empty */ boolean IsEmpty(); -/*! - Allows to find a %SComponent by its name. +/*! \brief Find a %SComponent by its name. + \param aComponentName It's a string value in the Comment Attribute of the Component, which is looked for, defining the data type of this Component. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. + */ SComponent FindComponent (in string aComponentName); -/*! - Allows to find a %SComponent by ID of the according %SObject + +/*! \brief Find a %SComponent by ID of the according %SObject */ SComponent FindComponentID(in ID aComponentID); -/*! - Allows to find a %SObject by the Name Attribute of this %SObject +/*! \brief Find a %SObject by the Name Attribute of this %SObject \param anObjectName String parameter defining the name of the object \return The obtained %SObject -
        See also an example of this method usage in batchmode of %SALOME application. - +See \ref example19 for an example of this method usage in batchmode of %SALOME application. */ SObject FindObject (in string anObjectName); -/*! - Allows to find a %SObject by its ID +/*! \brief Find a %SObject by its ID + \param aObjectID This parameter defines the ID of the required object \return The obtained %SObject - */ SObject FindObjectID (in ID aObjectID); -/*! - Allows to create a %SObject by its ID +/*! \brief Create a %SObject by its ID + \param aObjectID This parameter defines the ID of the required object \return The created %SObject - */ SObject CreateObjectID (in ID aObjectID); -/*! - Allows to find a %SObject by IOR of the object belonging to this %SObject. +/*! \brief Find a %SObject by IOR of the object belonging to this %SObject. + \param anObjectName This parameter defines the IOR of the object \return The obtained %SObject - */ SObject FindObjectIOR (in ID aObjectIOR); -/*! - Finds in the study all %SObjects produced by a given %Component. +/*! \brief Find in the study all %SObjects produced by a given %Component. + \param anObjectName The Name Attribute of the searched %SObjects should correspond to anObjectName. \param aComponentName The name of the component, which objects are searched for. */ ListOfSObject FindObjectByName(in string anObjectName, in string aComponentName); -/*! - Allows to find a %SObject by the path to it. +/*! \brief Find a %SObject by the path to it. \param thePath The path to the required %SObject. \return The obtained %SObject. - */ SObject FindObjectByPath(in string thePath); -/*! - Returns the path to the %SObject. +/*! \brief Get the path to the %SObject. */ string GetObjectPath(in Object theObject); -/*! - Sets the context of the %Study. - \param thePath String parameter defining the context of the study. +/*! \brief Set the context of the %Study. -
        See also an example of this method usage in batchmode of %SALOME application. + \param thePath String parameter defining the context of the study. +See \ref example23 for an example of this method usage in batchmode of %SALOME application. */ void SetContext(in string thePath); -/*! - Gets the context of the %Study. +/*! \brief Get the context of the %Study. -
        See also an example of this method usage in batchmode of %SALOME application. - +See \ref example23 for an example of this method usage in batchmode of %SALOME application. */ string GetContext(); -/*! - Returns a list of names of objects corresponding to the context. +/*! \brief Get a list of names of objects corresponding to the context. + \note If the parameter theContext is empty, then the current context will be used. */ ListOfStrings GetObjectNames(in string theContext); -/*! - Returns a list of names of directories and subdirectories corresponding to the context. +/*! \brief Get a list of names of directories and subdirectories corresponding to the context. + \note If the parameter theContext is empty, then the current context will be used. */ ListOfStrings GetDirectoryNames(in string theContext); -/*! - Returns a list of names of Files corresponding to the context. +/*! \brief Get a list of names of Files corresponding to the context. + \note If the parameter theContext is empty, then the current context will be used. */ ListOfStrings GetFileNames(in string theContext); -/*! - Returns a list of names of Components corresponding to the context. +/*! \brief Get a list of names of Components corresponding to the context. + \note If the parameter theContext is empty, then the current context will be used. */ ListOfStrings GetComponentNames(in string theContext); -/*! - Creates a new iterator of child levels of the given %SObject. +/*! \brief Create a new iterator of child levels of the given %SObject. + \param aSO The given %SObject \return A new iterator of child levels of the given %SObject. */ ChildIterator NewChildIterator(in SObject aSO); -/*! - Creates a new iterator of the %SComponents. +/*! \brief Create a new iterator of the %SComponents. \return A new iterator of the %SComponents. */ SComponentIterator NewComponentIterator(); -/*! - Creates a new %StudyBuilder to add or modify an object in the study. - \return A new %StudyBuilder. +/*! \brief Create a new %StudyBuilder to add or modify an object in the study. -
        See also an example of this method usage in batchmode of %SALOME application. + \return A new %StudyBuilder. +See \ref example20 for an example of this method usage in batchmode of %SALOME application. */ StudyBuilder NewBuilder() ; /*! \brief Labels dependency @@ -294,28 +277,26 @@ during each working session. /*! \brief Getting properties of the study - Returns the attriubte, which contains the properties of this study. + Returns the attribute, which contains the properties of this study. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example20 for an example of this method usage in batchmode of %SALOME application. */ AttributeStudyProperties GetProperties(); -/*! - Determines whether the %study has been saved +/*! \brief Indicate whether the %study has been saved */ attribute boolean IsSaved; -/*! +/*! \brief Indicate whether the %study has been modified and not saved. + Returns True if the %study has been modified and not saved. */ boolean IsModified(); -/*! - Marks the %study as being modified and not saved. +/*! \brief Mark the %study as being modified and not saved. */ void Modified(); -/*! - Determines the file where the %study has been saved +/*! \brief Indicate the file where the %study has been saved */ attribute string URL; @@ -348,18 +329,16 @@ during each working session. \return An object */ Object ConvertIORToObject(in string theIOR); -/*! - Gets a new %UseCaseBuilder. + +/*! \brief Get a new %UseCaseBuilder. */ UseCaseBuilder GetUseCaseBuilder(); -/*! - Closes the components in the study, removes itself from the %StudyManager. +/*! \brief Close the components in the study, remove itself from the %StudyManager. */ void Close(); -/*! - Enables(if isEnabled = True)/disables automatic addition of new %SObjects to the use case. +/*! \brief Enable (if isEnabled = True)/disable automatic addition of new %SObjects to the use case. */ void EnableUseCaseAutoFilling(in boolean isEnabled); @@ -374,17 +353,20 @@ during each working session. void UndoPostponed(in long theWay); - boolean DumpStudy(in string thePath, in string theBaseName, in boolean isPublished); + boolean DumpStudy(in string thePath, + in string theBaseName, + in boolean isPublished, + in boolean isMultiFile); + +/*! \brief Get an AttributeParameter used to store common parameters for given %theSavePoint. -/*! - Returns an AttributeParameter used to store common parameters for given %theSavePoint. \param theID identifies a common parameters set (Example: "Interface Applicative") \param theSavePoint is number of a set of parameters as there can be several sets */ AttributeParameter GetCommonParameters(in string theID, in long theSavePoint); -/*! - Returns an AttributeParameter used to store parameters for given %theModuleName. +/*! \brief Get an AttributeParameter used to store parameters for given %theModuleName. + \param theID identifies a common parameters set (Example: "Interface Applicative") \param theModuleName is a name of the module (Example: "Geometry") \param theSavePoint is number of a set of parameters as there can be several sets @@ -392,8 +374,8 @@ during each working session. AttributeParameter GetModuleParameters(in string theID, in string theModuleName, in long theSavePoint); -/*! - Returns a default Python script to restore visual parameters for given %theModuleName. +/*! \brief Get a default Python script to restore visual parameters for given %theModuleName. + \param theID identifies a common parameters set (Example: "Interface Applicative") \param theModuleName is a name of the module (Example: "Geometry") */ @@ -408,101 +390,131 @@ during each working session. long long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal); -/*! - Marks this Study as being locked by the given locker. The lock status can be checked by method IsStudyLocked +/*! \brief Mark this Study as being locked by the given locker. + + The lock status can be checked by method IsStudyLocked \param theLockerID identifies a locker of the study can be for ex. IOR of the engine that locks the study. */ void SetStudyLock(in string theLockerID); -/*! - Returns True if the Study was marked locked. +/*! \brief Indicate if the Study is locked + + Returns True if the Study was marked locked. */ boolean IsStudyLocked(); -/*! - Marks this Study as being unlocked by the given locker. The lock status can be checked by method IsStudyLocked +/*! \brief Mark this Study as being unlocked by the given locker. + + The lock status can be checked by method IsStudyLocked \param theLockerID identifies a locker of the study can be for ex. IOR of the engine that unlocks the study. */ void UnLockStudy(in string theLockerID); -/*! - Returns the list iof IDs of the Study's lockers. +/*! \brief Get the list of IDs of the Study's lockers. */ ListOfStrings GetLockerID(); -/*! - Create real variable with Name theVarName value theValue - (or set if variable value in to theValue already exists) +/*! \brief Create real variable with Name theVarName and value theValue + + (or set if variable value into theValue already exists) \param theVarName is a name of the variable \param theVarName is a value of the variable. */ void SetReal( in string theVarName, in double theValue ); -/*! - Create integer variable with Name theVarName value theValue - (or set if variable value in to theValue already exists) +/*! \brief Create integer variable with Name theVarName and value theValue + + (or set if variable value into theValue already exists) \param theVarName is a name of the variable \param theVarName is a value of the variable. */ void SetInteger( in string theVarName, in long theValue ); -/*! - Create boolean variable with Name theVarName value theValue - (or set if variable value in to theValue already exists) +/*! \brief Create boolean variable with Name theVarName and value theValue + + (or set if variable value into theValue already exists) \param theVarName is a name of the variable \param theVarName is a value of the variable. */ void SetBoolean( in string theVarName, in boolean theValue ); -/*! - Return real value of the variable +/*! \brief Create string variable with Name theVarName and value theValue + + (or set if variable value into theValue already exists) + \param theVarName is a name of the variable + \param theVarName is a value of the variable. +*/ + void SetString( in string theVarName, in string theValue ); + +/*! \brief Set current value as double for string variable +*/ + void SetStringAsDouble( in string theVarName, in double theValue ); + +/*! \brief Get value of a real variable + \param theVarName is a name of the variable. */ double GetReal( in string theVarName ); -/*! - Return integer value of the variable +/*! \brief Get value of an integer variable + \param theVarName is a name of the variable. */ long GetInteger( in string theVarName ); -/*! - Return boolean value of the variable +/*! \brief Get value of a boolean variable + \param theVarName is a name of the variable. */ boolean GetBoolean( in string theVarName ); + +/*! \brief Get value of a string variable + + \param theVarName is a name of the variable. +*/ + string GetString( in string theVarName ); -/*! +/*! \brief Indicate if a variable is real + Return true if variable is real otherwise return false. \param theVarName is a name of the variable. */ boolean IsReal( in string theVarName ); -/*! +/*! \brief Indicate if a variable is integer + Return true if variable is integer otherwise return false. \param theVarName is a name of the variable. */ boolean IsInteger( in string theVarName ); -/*! +/*! \brief Indicate if a variable is boolean + Return true if variable is boolean otherwise return false. \param theVarName is a name of the variable. */ boolean IsBoolean( in string theVarName ); -/*! +/*! \brief Indicate if a variable is string + + Return true if variable is string otherwise return false. + \param theVarName is a name of the variable. +*/ + boolean IsString( in string theVarName ); + +/*! \brief Indicate if a variable exists in the study + Return true if variable exists in the study, otherwise return false. \param theVarName is a name of the variable. */ boolean IsVariable( in string theVarName ); -/*! - Return names of all variables from the study. +/*! \brief Get names of all variables from the study. */ ListOfStrings GetVariableNames(); -/*! \brief Removing variable +/*! \brief Remove a variable Remove variable with the specified name from the study with substitution of its value. @@ -511,7 +523,7 @@ during each working session. */ boolean RemoveVariable( in string theVarName ); -/*! \brief Renaming variable +/*! \brief Rename a variable Rename variable with the specified name within the study. @@ -521,7 +533,7 @@ during each working session. */ boolean RenameVariable( in string theVarName, in string theNewVarName ); -/*! \brief Checking variable usage +/*! \brief Indicate whether variable is used Check that variable is used in the study. @@ -536,7 +548,13 @@ during each working session. \return Variables list. */ ListOfListOfStrings ParseVariables( in string theVars ); - + +/*! + Attach an observer to the Study + + \param theObserver +*/ + void attach(in SALOMEDS::Observer theObserver, in boolean modify); }; //========================================================================== @@ -564,7 +582,7 @@ during each working session. Creates a new %SComponent \param ComponentDataType Data type of the %SComponent which will be created. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example17 for an example of this method usage in batchmode of %SALOME application. */ SComponent NewComponent(in string ComponentDataType) raises(LockProtection); @@ -587,7 +605,7 @@ during each working session. \param theFatherObject The father %SObject under which this one should be created. \return New %SObject -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example18 for an example of this method usage in batchmode of %SALOME application. */ @@ -620,7 +638,7 @@ during each working session. /*! Loads a %SComponent. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example19 for an example of this method usage in batchmode of %SALOME application. */ void LoadWith (in SComponent sco, in Driver Engine) raises (SALOME::SALOME_Exception); @@ -637,7 +655,7 @@ during each working session. \param anObject The %SObject corresponding to the attribute which is looked for. \param aTypeOfAttribute Type of the attribute. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ GenericAttribute FindOrCreateAttribute(in SObject anObject, @@ -661,7 +679,7 @@ during each working session. \param anObject The %SObject corresponding to the attribute. \param aTypeOfAttribute Type of the attribute. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example17 for an example of this method usage in batchmode of %SALOME application. */ void RemoveAttribute(in SObject anObject, in string aTypeOfAttribute) raises(LockProtection); @@ -685,7 +703,7 @@ during each working session. Adds a directory in the %Study. \param theName String parameter defining the name of the directory. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example23 for an example of this method usage in batchmode of %SALOME application. */ void AddDirectory(in string theName) raises(LockProtection); @@ -712,7 +730,7 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin Creates a new command which can contain several different actions. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example3 for an example of this method usage in batchmode of %SALOME application. */ void NewCommand(); // command management @@ -722,7 +740,7 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin \exception LockProtection This exception is raised, when trying to perform this command a study, which is protected for modifications. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example16 for an example of this method usage in batchmode of %SALOME application. */ void CommitCommand() raises(LockProtection); // command management @@ -734,7 +752,7 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin Cancels all actions declared within the command. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example17 for an example of this method usage in batchmode of %SALOME application. */ void AbortCommand(); // command management /*! \brief Undolimit @@ -748,7 +766,7 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin \exception LockProtection This exception is raised, when trying to perform this command a study, which is protected for modifications. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example16 for an example of this method usage in batchmode of %SALOME application. */ void Undo() raises (LockProtection); @@ -758,21 +776,21 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin \exception LockProtection This exception is raised, when trying to perform this command a study, which is protected for modifications. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example16 for an example of this method usage in batchmode of %SALOME application. */ void Redo() raises (LockProtection); /*! Returns True if at this moment there are any actions which can be canceled. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example16 for an example of this method usage in batchmode of %SALOME application. */ boolean GetAvailableUndos(); /*! Returns True if at this moment there are any actions which can be redone. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example3 for an example of this method usage in batchmode of %SALOME application. */ boolean GetAvailableRedos(); @@ -837,7 +855,7 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin \param study_name String parameter defining the name of the study -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example17 for an example of this method usage in batchmode of %SALOME application. */ Study NewStudy(in string study_name); @@ -848,7 +866,7 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin \param aStudyUrl The path to the study \warning This method doesn't activate the corba objects. Only a component can do it. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ Study Open (in URL aStudyUrl) raises (SALOME::SALOME_Exception); @@ -863,7 +881,7 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin \param theMultiFile If this parameter is True the study will be saved in several files. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example19 for an example of this method usage in batchmode of %SALOME application. */ boolean Save(in Study aStudy, in boolean theMultiFile); @@ -880,7 +898,7 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin \param aStudy The study which will be saved \param theMultiFile If this parameter is True the study will be saved in several files. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ boolean SaveAs(in URL aUrl, // if the file already exists in Study aStudy, @@ -990,6 +1008,11 @@ Gets the list of open studies /*! Name of the %SObject */ attribute string Name; // equivalent to setName() & getName() + +/*! Returns true if the %SObject does not belong to any %Study +*/ + boolean IsNull(); + /*! Gets an object %ID \return ID of the %SObject. @@ -1027,7 +1050,7 @@ Gets the list of open studies \param aTypeOfAttribute String value defining the type of the required attribute of the given %SObject. \return True if it finds an attribute of a definite type of the given %SObject as well as the discovered attribute. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ boolean FindAttribute(out GenericAttribute anAttribute, in string aTypeOfAttribute); @@ -1041,7 +1064,7 @@ Gets the list of open studies \return The list of all attributes of the given %SObject. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example17 for an example of this method usage in batchmode of %SALOME application. */ ListOfAttributes GetAllAttributes(); @@ -1076,6 +1099,13 @@ Gets the list of open studies */ string GetIOR(); +/*! + Set an attribute value (of type string) + \param name the name of the attribute + \param value the value of the attribute +*/ + void SetAttrString(in string name, in string value); + /*! Private method, returns an implementation of this SObject. \param theHostname is a hostname of the caller @@ -1107,14 +1137,17 @@ Gets the list of open studies */ void CheckLocked() raises (LockProtection); + //! Get Type string Type(); + //! Get the class type string GetClassType(); + //! Get SObject SObject GetSObject(); + //! Private method, returns an implementation of this GenericAttribute. /*! - Private method, returns an implementation of this GenericAttribute. \param theHostname is a hostname of the caller \param thePID is a process ID of the caller \param isLocal is set True if the GenericAttribute is launched locally with the caller @@ -1134,12 +1167,12 @@ Gets the list of open studies //========================================================================== interface SComponent : SObject { -/*! Gets the data type of the given %SComponent +/*! \brief Gets the data type of the given %SComponent \return The data type of this %SComponent. */ string ComponentDataType(); -/*! Gets the IOR of the given component +/*! \brief Gets the IOR of the given component \return True (if there is an instance of the given component) and its IOR. */ @@ -1158,22 +1191,22 @@ Gets the list of open studies interface SComponentIterator : SALOME::GenericObj { /*! -Activates the %SComponentIterator. +\brief Activates the %SComponentIterator. */ void Init(); -/*! Method More +/*! \brief Method More \return True if there is one more %SComponent in the list. */ boolean More(); /*! -Moves the iterator to the next %SComponent in the list. +\brief Moves the iterator to the next %SComponent in the list. */ void Next(); /*! - Returns the %SComponent corresponding to the current %SComponent found by the iterator. + \brief Returns the %SComponent corresponding to the current %SComponent found by the iterator. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ SComponent Value(); @@ -1190,27 +1223,27 @@ Moves the iterator to the next %SComponent in the list. { /*! -Activates the %ChildIterator. +\brief Activates the %ChildIterator. */ void Init(); /*! -Activates the %ChildIterator for all child levels. +\brief Activates the %ChildIterator for all child levels. \param allLevels If this boolean parameter is True, the %ChildIterator will be activated for all child levels. */ void InitEx(in boolean allLevels); -/*! Method More +/*! \brief Method More \return True if there is one more %ChildIterator in the list. */ boolean More(); /*! - Passes the iterator to the next level. + \brief Passes the iterator to the next level. */ void Next(); /*! - Returns the %SObject corresponding to the current object found by the iterator. + \brief Returns the %SObject corresponding to the current object found by the iterator. */ SObject Value(); }; @@ -1286,6 +1319,10 @@ Activates the %UseCaseIterator. Returns True if the given object theObject of the use case has child objects. */ boolean HasChildren(in SObject theObject); +/*! + Gets father object of the given object theObject in the use cases tree. +*/ + SObject GetFather(in SObject theObject); /*! Sets the name of the use case. */ @@ -1298,6 +1335,10 @@ Activates the %UseCaseIterator. Returns True if the given object theObject represents a use case. */ boolean IsUseCase(in SObject theObject); +/*! + Returns True if the given object theObject is included in the use cases tree on any level. +*/ + boolean IsUseCaseNode(in SObject theObject); /*! Gets the current object of the use case. */ @@ -1336,7 +1377,7 @@ can be called by any component and which provide the following functionality: \param isMultiFile If the value of this boolean parameter is True, the data will be saved in several files. \return A byte stream TMPFile that contains all saved data -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example19 for an example of this method usage in batchmode of %SALOME application. */ @@ -1351,7 +1392,7 @@ can be called by any component and which provide the following functionality: \param isMultiFile If the value of this boolean parameter is True, the data will be saved in several files. \return A byte stream TMPFile that will contain all saved data -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example19 for an example of this method usage in batchmode of %SALOME application. */ TMPFile SaveASCII(in SComponent theComponent, in string theURL, in boolean isMultiFile); diff --git a/idl/SALOMEDS_Attributes.idl b/idl/SALOMEDS_Attributes.idl index 787f9aadd..fbc70d655 100644 --- a/idl/SALOMEDS_Attributes.idl +++ b/idl/SALOMEDS_Attributes.idl @@ -1,30 +1,32 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File : SALOMEDS.idl + +// File : SALOMEDS_Attributes.idl // Author : Yves FRICAUD // $Header$ // -/*! \file SALOMEDS_Attributes.idl This file contains a set of interfaces - for the attributes which can be assigned to %SObject +/*! \file SALOMEDS_Attributes.idl + \brief This file contains a set of interfaces + for the attributes which can be assigned to SObject */ #ifndef _SALOMEDS_AttributesIDL_ #define _SALOMEDS_AttributesIDL_ @@ -33,1449 +35,1823 @@ module SALOMEDS { -/*! Sequence of double values -*/ + //! Sequence of double values typedef sequence DoubleSeq; -/*! Sequence of long values -*/ + //! Sequence of long values typedef sequence LongSeq; -/*! Sequence of string values -*/ + //! Sequence of string values typedef sequence StringSeq; -/*! \struct Color - This structure stores a set of elements defining the color based on RGB palette. These elements are - used as input parameters for methods necessary for color definition of different items. -*/ + + /*! + \brief Represents the color based on RGB palette. + + Used by different interfaces to specify the color attributes of different items. + */ struct Color { -/*! Red color -*/ - double R; -/*! Green color -*/ - double G; -/*! Blue color -*/ - double B; + //! Red component of the color + double R; + //! Green component of the color + double G; + //! Blue component of the color + double B; }; + //========================================================================== -/*! \brief Attribute allowing to store a real value + /*! + \brief Attribute allowing to store a real value - Attribute allowing to store a real value -*/ - //========================================================================== + See \ref example1 for an example of this attribute usage in batchmode of %SALOME application. + \sa AttributeInteger, AttributeString + */ + //========================================================================== interface AttributeReal : GenericAttribute { -/*! - Returns the value of this attribute. - -
        See also an example of this method usage in batchmode of %SALOME application. -*/ + /*! + \brief Returns the value of the attribute. + \return attribute value + */ double Value(); -/*! - Sets the value of this attribute. - -
        See also an example of this method usage in batchmode of %SALOME application. -*/ + /*! + \brief Sets the value of the attribute + \param value value being set to the attribute + */ void SetValue(in double value); }; + //========================================================================== -/*! \brief Attribute allowing to store an integer value + /*! + \brief Attribute allowing to store an %integer value - Attribute allowing to store an integer value -*/ + See \ref example17 for an example of this attribute usage in batchmode of %SALOME application. + + \sa AttributeReal, AttributeString + */ //========================================================================== interface AttributeInteger : GenericAttribute { -/*! - Returns the value of this attribute - -
        See also an example of this method usage in batchmode of %SALOME application. -*/ + /*! + \brief Returns the value of the attribute. + \return attribute value + */ long Value(); -/*! - Sets the value of this attribute -
        See also an example of this method usage in batchmode of %SALOME application. -*/ + /*! + \brief Sets the value of the attribute + \param value value being set to the attribute + */ void SetValue(in long value); }; + //========================================================================== -/*! \brief Attribute - sequence of real values + /*! + \brief Attribute allowing to store a sequence of real values. + \note The indices in the sequence start from 1. - Attribute - sequence of real values, indexing from 1 (like in CASCADE). -*/ + See \ref example3 for an example of this attribute usage in batchmode of %SALOME application. + + \sa AttributeSequenceOfInteger + */ //========================================================================== interface AttributeSequenceOfReal : GenericAttribute { -/*! - Initialization of the attribute with initial data. - \param other Initially assigned sequence of real numbers. -*/ + /*! + \brief Initialization of the attribute with initial data. + \param other sequence of values assigned to the attribute + */ void Assign (in DoubleSeq other); -/*! - Returns the sequence of real numbers stored in the attribute. -*/ + /*! + \brief Returns the sequence of values stored in the attribute. + \return sequence of values + */ DoubleSeq CorbaSequence(); -/*! - Adds to the end of the sequence a real number. - - \param value A real number added to the sequence. - -
        See also an example of this method usage in batchmode of %SALOME application. -*/ + /*! + \brief Adds new value to the end of the sequence. + \param value value being added to the sequence + */ void Add (in double value); -/*! - Removes a real number with a definite index - from the sequence of real numbers stored in the Attribute. - - \param index The index of the given real number -*/ + /*! + \brief Removes a value by the specified \a index + from the sequence stored in the attribute. + \param index index of the value in the sequence to be removed + */ void Remove(in long index); -/*! - Substitutes a given real number with a definite index for another real number. - \param index The index of the given real number. - \param value The value of another real number. - -
        See also an example of this method usage in batchmode of %SALOME application. - -*/ + /*! + \brief Sets new value to the sequence by the specified \a index. + \param index index in the sequence + \param value new value being set to the sequence by specified \a index + */ void ChangeValue(in long index, in double value); -/*! - Returns a given real number with a definite index - in the sequence of real numbers stored in the Attribute. - \param index The index of the given real number. - -
        See also an example of this method usage in batchmode of %SALOME application. -*/ + /*! + \brief Returns a value in the sequence specified by its \a index. + \param index index in the sequence + \return value specified by \a index + */ double Value(in short index); -/*! - Returns the length of the sequence of real numbers stored in the Attribute. - -
        See also an example of this method usage in batchmode of %SALOME application. - -*/ + /*! + \brief Returns the length of the sequence stored in the attribute. + \return sequence length + */ long Length(); }; + //========================================================================== -/*! \brief Attribute - sequence of integer + /*! + \brief Attribute allowing to store a sequence of %integer values. + \note The indices in the sequence start from 1. - Attribute - sequence of integer, indexing from 1 (like in CASCADE) -*/ + See \ref example4 for an example of this attribute usage in batchmode of %SALOME application. + + \sa AttributeSequenceOfReal + */ //========================================================================== interface AttributeSequenceOfInteger : GenericAttribute { -/*! - Initialisation of the attribute with initial data. - \param other Initially assigned sequence of integer numbers. -*/ + /*! + \brief Initialization of the attribute with initial data. + \param other sequence of values assigned to the attribute + */ void Assign (in LongSeq other); -/*! - Returns the sequence of integer numbers stored in the Attribute. -*/ - LongSeq CorbaSequence(); -/*! - Adds to the end of the sequence an integer number. - \param value An integer number added to the sequence. - -
        See also an example of this method usage in batchmode of %SALOME application. - -*/ + /*! + \brief Returns the sequence of values stored in the attribute. + \return sequence of values + */ + LongSeq CorbaSequence(); + /*! + \brief Adds new value to the end of the sequence. + \param value value being added to the sequence + */ void Add (in long value); -/*! - Removes an integer number with a definite index - from the sequence of integer numbers stored in the Attribute. - \param index The index of the given integer number. - -
        See also an example of this method usage in batchmode of %SALOME application. - -*/ + /*! + \brief Removes an value by the specified \a index + from the sequence stored in the attribute. + \param index index of the value in the sequence to be removed + */ void Remove(in long index); -/*! - Substitutes an integer number with a definite index for another integer number. - \param index The index of the given integer number. - \param value The value of another integer number. - -*/ + /*! + \brief Sets new value to the sequence by the specified \a index. + \param index index in the sequence + \param value new value being set to the sequence by specified \a index + */ void ChangeValue(in long index, in long value); -/*! - Returns a given integer number with a definite index - in the sequence of integer numbers stored in the Attribute. - \param index The index of the given integer number. - -
        See also an example of this method usage in batchmode of %SALOME application. -*/ + /*! + \brief Returns a value in the sequence specified by its \a index. + \param index index in the sequence + \return value specified by \a index + */ long Value(in short index); -/*! - Returns the length of the sequence of integer numbers stored in the Attribute. - -
        See also an example of this method usage in batchmode of %SALOME application. - -*/ + /*! + \brief Returns the length of the sequence stored in the attribute. + \return sequence length + */ long Length(); }; //========================================================================== -/*! \brief Name attribute + /*! + \brief Name attribute - This attribute stores a string value, which corresponds to the name of the %SObject - or to the name of corresponding object. -*/ - //========================================================================== + The attribute stores a string value, which corresponds to the name of the SObject + or to the name of corresponding %object. + See \ref example5 for an example of this attribute usage in batchmode of %SALOME application. + + \sa AttributeComment + */ + //========================================================================== interface AttributeName : GenericAttribute { -/*! - Returns the value of this attribute - -
        See also an example of this method usage in batchmode of %SALOME application. -*/ + /*! + \brief Returns the value assigned to the attribute. + \return attribute value + */ string Value(); -/*! - Sets the value of this attribute - - \param value This parameter defines the value of this attribute. - -
        See also an example of this method usage in batchmode of %SALOME application. -*/ + /*! + \brief Sets the value of the attribute (name of a SObject). + \param value value being set to the attribute + */ void SetValue(in string value); }; //========================================================================== -/*! \brief Comment attribute - - This attribute stores a string value containing supplementary information about - the %SObject. In particular it contains the data type of the %SComponent. -*/ + /*! + \brief Comment attribute + + The attribute stores arbitrary string value containing supplementary information about + the SObject. This is common-usage attribute that can be used for any purpose. + + There is only one explicit limitation: for the SComponent %object representing + the root item of the SALOME component tree, the AttributeComment is used to store + component data type value. This attribute is automatically set with NewComponent() + function of StudyBuilder. Also, the value of this attribute is returned by the + ComponentDataType() function of SComponent interface. + + See \ref example6 for an example of this attribute usage in batchmode of %SALOME application. + + \sa AttributeName + */ //========================================================================== interface AttributeComment : GenericAttribute { -/*! - Returns the value of this attribute - -
        See also an example of this method usage in batchmode of %SALOME application. -*/ + /*! + \brief Returns the value of the attribute. + \return attribute value + */ string Value(); -/*! - Sets the value of this attribute - \param value This string parameter defines the value of this attribute - a description of a %SObject. - -
        See also an example of this method usage in batchmode of %SALOME application. -*/ + /*! + \brief Sets the value of the attribute (description of a SObject). + \param value value being set to the attribute + */ void SetValue(in string value); }; - //========================================================================== -/*! \brief String attribute - This attribute stores a string value containing arbitrary information. -*/ + //========================================================================== + /*! + \brief String attribute + + The attribute stores a string value containing arbitrary information. + \sa AttributeInteger, AttributeReal + */ //========================================================================== interface AttributeString : GenericAttribute { -/*! - Returns the value of this attribute -*/ + /*! + \brief Returns the value of the attribute. + \return attribute value + */ string Value(); -/*! - Sets the value of this attribute - \param value This string parameter defines the value of this attribute. -*/ + /*! + \brief Sets the value of the attribute. + \param value value being set to the attribute + */ void SetValue(in string value); }; + //========================================================================== -/*! \brief IOR attribute + /*! + \brief IOR attribute + + The attribute stores a string value identifying a runtime %object. + In particular it contains CORBA Interoperable Object Reference. - This attribute stores a string value identifying a runtime object.In particular - it contains CORBA Interoperable Object Reference. -*/ - //========================================================================== + See \ref example19 for an example of this method usage in batchmode of %SALOME application. + + \sa AttributePersistentRef + */ + //========================================================================== interface AttributeIOR : GenericAttribute { -/*! - Returns the value of this attribute - -
        See also an example of this method usage in batchmode of %SALOME application. -*/ + /*! + \brief Returns the value of the attribute. + \return attribute value + */ string Value(); -/*! - Sets the value of this attribute - \param value This parameter defines the value of this attribute - IOR of a %SObject. - -
        See also an example of this method usage in batchmode of %SALOME application. -*/ + /*! + \brief Sets the value of the attribute (IOR of a SObject). + \param value value being set to the attribute. + */ void SetValue(in string value); }; //========================================================================== -/*! \brief Persistent reference attribute + /*! + \brief Persistent reference attribute + + The attribute stores a persistent identifier of the %object. It is a part + of SALOME persistence mechanism . - This attribute stores a persistent identifier of the object. -*/ + See \ref example7 for an example of this method usage in batchmode of %SALOME application. + + \sa AttributeIOR + */ //========================================================================== interface AttributePersistentRef : GenericAttribute { -/*! - Returns the value of this attribute - -
        See also an example of this method usage in batchmode of %SALOME application. -*/ + /*! + \brief Returns the value of the attribute. + \return attribute value + */ string Value(); -/*! - Sets the value of this attribute - \param value This parameter defines the value of this attribute. - -
        See also an example of this method usage in batchmode of %SALOME application. -*/ + /*! + \brief Sets the value of the attribute. + \param value Value being set to the attribute + */ void SetValue(in string value); }; //========================================================================== -/*! \brief External File definition - - This attribute stores a path to an External File. -*/ + /*! + \brief External file definition. + + The attribute stores a path to an external file. + + \sa AttributeFileType + */ //========================================================================== interface AttributeExternalFileDef: GenericAttribute { -/*! - Returns the value of this attribute -
        See also an example of this method usage in batchmode of %SALOME application. -*/ + /*! + \brief Returns the value of the attribute. + \return attribute value + */ string Value(); -/*! - Sets the value of this attribute -
        See also an example of this method usage in batchmode of %SALOME application. -*/ + /*! + \brief Sets the value of the attribute. + \param value value being set to the attribute + */ void SetValue(in string value); }; //========================================================================== -/*! \brief File Type definition + /*! + \brief External file type definition. - This attribute stores an external File Type (see ExternalFileDef attribute). -*/ + The attribute stores an external file type. + + \sa AttributeExternalFileDef + */ //========================================================================== interface AttributeFileType: GenericAttribute { -/*! - Returns the value of this attribute -
        See also an example of this method usage in batchmode of %SALOME application. -*/ + /*! + \brief Returns the value of the attribute. + \return attribute value + */ string Value(); -/*! - Sets the value of this attribute -
        See also an example of this method usage in batchmode of %SALOME application. -*/ + /*! + \brief Sets the value of the attribute. + \param value value being set to the attribute + */ void SetValue(in string value); }; //========================================================================== - //Below the list of presentation attributes for display study tree in browser + // Presentation attributes (parameters of the object displaying in the Object browser) //========================================================================== - //========================================================================== -/*! \brief Drawable flag Attribute. + /*! + \brief Drawable flag attribute. - This is a presentation attribute necessary for display of a study tree in the browser. - The item associated to a %SObject is created/displayed if TRUE. -*/ + This presentation attribute specifies if the parent SObject should be displayed + in the study tree in the Object browser. + + If this attribute is defined for the parent %object and set to \c false, the item + is not displayed in the Object browser. By default, the item is always displayed. + + See \ref example8 for an example of this attribute usage in batchmode of %SALOME application. + + \sa AttributeExpandable, AttributeSelectable + */ //========================================================================== interface AttributeDrawable : GenericAttribute { -/*! - Returns TRUE if the item is drawable (as it is by default) and FALSE if it isn't. - -
        See also an example of this method usage in batchmode of %SALOME application. - -*/ + /*! + \brief Returns the value of the attribute. + \return \c true if the item is drawable or \c false otherwise + */ boolean IsDrawable(); -/*! -Sets the item to be drawable. - -\param value If the value of this boolean parameter is TRUE (default) the item will be drawable. - -
        See also an example of this method usage in batchmode of %SALOME application. - -*/ - void SetDrawable(in boolean value); + /*! + \brief Sets the value of the attribute. + \param value value being set to the attribute (\c true if item should be drawable or \c false otherwise) + */ + void SetDrawable(in boolean value); }; //========================================================================== -/*! \brief Selectable flag Attribute. + /*! + \brief Selectable flag attribute. - This is a presentation attribute necessary for display of the study tree in the browser. - The item is selectable by %SALOME selection mechanism if TRUE. -*/ + This presentation attribute specifies if the parent SObject is selectable + by the user in the Object browser. + If this attribute is defined for the parent %object and set to \c false, the item + is not selectable in the Object browser. By default, the item is always selectable. + + See \ref example9 for an example of this attribute usage in batchmode of %SALOME application. + + \sa AttributeDrawable, AttributeExpandable + */ //========================================================================== interface AttributeSelectable : GenericAttribute { -/*! - Returns TRUE if the item is selectable (as it is by default) and FALSE if it isn't. - - -
        See also an example of this method usage in batchmode of %SALOME application. - -*/ + /*! + \brief Returns the value of the attribute. + \return \c true if the item is selectable or \c false otherwise + */ boolean IsSelectable(); -/*! -Sets the item to be selectable - -\param value If the value of this parameter is TRUE (the default) the item will be set as selectable. - -
        See also an example of this method usage in batchmode of %SALOME application. - -*/ - void SetSelectable(in boolean value); + /*! + \brief Sets the value of the attribute. + \param value value being set to the attribute (\c true if item should be selectable or \c false otherwise) + */ + void SetSelectable(in boolean value); }; //========================================================================== -/*! \brief Expandable flag Attribute. - - This is a presentation attribute necessary for display of the study tree in the browser. - It sets this item to be expandable even if it has no children if value is TRUE. If value is FALSE - expandable only if it has children. -*/ + /*! + \brief Expandable flag attribute. + + This presentation attribute specifies if the parent SObject can be expanded + by the user in the Object browser (to show its child objects). + If this attribute is defined for the parent %object and set to \c false, the item + is not expandable in the Object browser. By default, the item is always expandable + (if it has children). + + See \ref example10 for an example of this attribute usage in batchmode of %SALOME application. + + \sa AttributeDrawable, AttributeSelectable + */ //========================================================================== interface AttributeExpandable : GenericAttribute { -/*! - Returns TRUE if this item is expandable even when it has no children. - -
        See also an example of this method usage in batchmode of %SALOME application. - -*/ + /*! + \brief Returns the value of the attribute. + \return \c true if the item is expandable or \c false otherwise + */ boolean IsExpandable(); -/*! Sets this item to be expandable even if it has no children. - - \param value If the value of this boolean parameter is TRUE, this item will be set as expandable. - -
        See also an example of this method usage in batchmode of %SALOME application. - -*/ - void SetExpandable(in boolean value); + /*! + \brief Sets the value of the attribute. + \param value value being set to the attribute (\c true if item should be expandable or \c false otherwise) + */ + void SetExpandable(in boolean value); }; //========================================================================== -/*! \brief Flags Attribute. - - This interface is intended for storing different object attributes that - have only two states (0 and 1). -*/ + /*! + \brief Flags attribute. + + The interface is intended for storing different %object attributes that + have only two states: 0 (\c false) or 1 (\c true). + \note The interpretation of the flag values attribute is a matter of the user. + \note The total number of flags which can be stored in a single attribute + is defined by the size of CORBA::Long data type. + */ //========================================================================== interface AttributeFlags : GenericAttribute { + /*! + \brief Returns the value of the attribute. + \return set of flags currently set to the attribute + */ long GetFlags(); - void SetFlags( in long theFlags ); - - boolean Get( in long theFlag ); - void Set( in long theFlag, in boolean theValue ); + /*! + \brief Sets the value of the attribute. + \param flags new set of flags to be stored in the attribute + */ + void SetFlags(in long flags); + /*! + \brief Test the value for the specified flag or set of flags. + \param flags flag or set of flags being tested. + \return \c true if all bits correspoding to the \a flags are currently set or \c false otherwise + */ + boolean Get(in long flags); + /*! + \brief Set/clear specific flag or set of flags. + \param flags flag or set of flags being set / cleared + \param value \c true if all bits correspoding to the \a flags should be set + or \c false if flag(s) should be cleared + */ + void Set(in long flags, in boolean value); }; //========================================================================== -/*! \brief Graphic Attribute. - This class is intended for storing information about - graphic representation of objects in dirrent views -*/ - //========================================================================== + /*! + \brief Graphic attribute. + This interface is intended for storing information about graphical representation + of the %object in different views. + */ + //========================================================================== interface AttributeGraphic : GenericAttribute { - void SetVisibility( in long theViewId, in boolean theValue ); - boolean GetVisibility( in long theViewId ); + /*! + \brief Set / clear visibility flag of the parent SObject for the view + specified by \a viewId. + \param viewId view identifier + \param value visibility flag value being set to the attribute + */ + void SetVisibility(in long viewId, in boolean value); + /*! + \brief Get visibility flag of the parent SObject for the view + specified by \a viewId. + \param viewId view identifier + \return visibility flag currently set to the attribute for the specified view + */ + boolean GetVisibility(in long viewId); }; //========================================================================== -/*! \brief Opened flag Attribute. + /*! + \brief Opened flag Attribute + \warning Deprecated interface. Not used since version 3.0. - This is a presentation attribute necessary for display of the study tree in the browser. - It sets this item to be open (its children are visible) if bool is TRUE, and to be closed (its children - are not visible) if bool is FALSE. -*/ + This presentation attribute specifies if the item corresponding to the + parent SObject in the Object browser is currently opened (expanded) or no. + */ //========================================================================== interface AttributeOpened : GenericAttribute { -/*! - Returns TRUE if this item is open (its children are visible) and FALSE if it isn't. - -
        See also an example of this method usage in batchmode of %SALOME application. - -*/ + /*! + \brief Returns the value of the attribute. + \obsolete + \return \c true if the item is opened (expanded) in the Object browser or \c false otherwise + */ boolean IsOpened(); -/*! - Sets this item to be open (its children are visible) + /*! + \brief Sets the value of the attribute. + \obsolete + \param value value being set to the attribute (\c true if item should + be opened (expanded) or \c false otherwise) + */ + void SetOpened(in boolean value); + }; - \param value If the value of this boolean parameter is TRUE this item will be set as open, - and as closed if FALSE. + //========================================================================== + /*! + \brief Text color attribute. -
        See also an example of this method usage in batchmode of %SALOME application. + This attribute allows to specify the text color to be used to render the item + in the Object browser. If the attribute is not set for the SObject, default + value (GUI specific) is used. -*/ - void SetOpened(in boolean value); - }; - //========================================================================== -/*! \brief TextColorAttribute. + See \ref example12 for an example of this attribute usage in batchmode of %SALOME application. - This attribute sets the color of an item. -*/ + \sa AttributeTextHighlightColor, AttributePixMap + */ //========================================================================== interface AttributeTextColor : GenericAttribute { -/*! - Returns the color of an item. - -
        See also an example of this method usage in batchmode of %SALOME application. - -*/ - Color TextColor(); -/*! - Sets the color of an item. - - \param value This parameter defines the color of the item. - -
        See also an example of this method usage in batchmode of %SALOME application. - -*/ + /*! + \brief Returns the value of the attribute. + \return text color assigned to the attribute + */ + Color TextColor(); + /*! + \brief Sets the value of the attribute. + \param value text color value being set to the attribute + */ void SetTextColor(in Color value); }; //========================================================================== - /*! \brief TextHighlightColorAttribute. + /*! + \brief Text highlight color attribute. + + This attribute allows to specify the highlight color to be used to render + the item in the Object browser (used only when the item is selected). + If the attribute is not set for the SObject, default value (GUI specific) is used. - This attribute sets the highlight color of an item. -*/ + See \ref example13 for an example of this attribute usage in batchmode of %SALOME application. + + \sa AttributeTextColor, AttributePixMap + */ //========================================================================== interface AttributeTextHighlightColor : GenericAttribute { -/*! - Returns the highlight color of an item. - - - -
        See also an example of this method usage in batchmode of %SALOME application. - -*/ - Color TextHighlightColor(); -/*! - Sets the highlight color of an item. - \param value This parameter defines the highlight color of the item. - -
        See also an example of this method usage in batchmode of %SALOME application. - -*/ + /*! + \brief Returns the value of the attribute. + \return highlight color assigned to the attribute + */ + Color TextHighlightColor(); + /*! + \brief Sets the value of the attribute. + \param value highlight color value being set to the attribute + */ void SetTextHighlightColor(in Color value); }; + //========================================================================== -/*! \brief PixMapAttribute. + /*! + \brief Icon attribute. + + This attribute is used to specifiy the name (file name) of an icon which + should be drawn in the Object browser when rendering an item. - This attribute stores an icon which is put before the name of an item. -*/ + See \ref example14 for an example of this attribute usage in batchmode of %SALOME application. + + \sa AttributeTextColor, AttributeTextHighlightColor + */ //========================================================================== interface AttributePixMap : GenericAttribute { -/*! - Returns True if there is an icon before the name of the given item. -*/ + /*! + Checks if the pixmap is assigned to the attribute. + \return \c true if an icon file name is set to the attribute + */ boolean HasPixMap(); -/*! - Returns the name of the icon in the format of a string. - -
        See also an example of this method usage in batchmode of %SALOME application. - -*/ + /*! + \brief Returns the value of the attribute. + \return icon file name assigned to the attribute (empty string if not set) + */ string GetPixMap(); -/*! - Sets the name of the icon. - \param value This string parameter defines the name of the icon. - -
        See also an example of this method usage in batchmode of %SALOME application. - -*/ + /*! + \brief Sets the value of the attribute. + \param icom file name being set to the attribute + */ void SetPixMap(in string value); }; //========================================================================== -/*! \brief TreeNodeAttribute. - - A set of these attributes on the %SObjects of the %study forms an inner auxiliary - tree whith its own structure and identifier. The quantity of such trees with different - identifiers can be arbitrary. + /*! + \brief Tree node attribute. -
        See also an example of usage of the methods of this interface in batchmode of %SALOME application. + By specifying the tree node attributes for the SObjects it is possible to + create internal auxillary %object tree with its own structure and identifier. -*/ + Since each such tree is specfied by the unique identifier, it is possible + to create as many trees as it is required. + + See \ref example18 for an example of usage of this attribute in batchmode of %SALOME application. + */ //========================================================================== interface AttributeTreeNode : GenericAttribute { -/*! - Assigns the father tree node to this tree node. -*/ - void SetFather(in AttributeTreeNode value); -/*! - Returns True if there is a father tree node of this tree node. -*/ + /*! + \brief Assigns the father tree node to this tree node. + \param father tree node attribute being set as a parent of this tree node + */ + void SetFather(in AttributeTreeNode father); + /*! + \brief Checks if father tree node attribute is set for this tree node. + \return \c true if father tree node attribute is defined or \c false otherwise + */ boolean HasFather(); -/*! - Returns the father tree node of this tree node. -*/ + /*! + \brief Returns the father tree node of this tree node. + \return father tree node attribute + */ AttributeTreeNode GetFather(); -/*! - Assigns the previous brother tree node to the given tree node. -*/ - void SetPrevious(in AttributeTreeNode value); -/*! - Returns True if there is the previous brother tree node of this tree node. -*/ + /*! + \brief Assigns the previous sibling tree node to this tree node. + \param sibling tree node attribute being set as a previous sibling of this tree node + */ + void SetPrevious(in AttributeTreeNode sibling); + /*! + \brief Checks if previous sibling tree node attribute is set for this tree node. + \return \c true if previous sibling tree node attribute is defined or \c false otherwise + */ boolean HasPrevious(); -/*! - Returns the previous brother tree node of this tree node. -*/ + /*! + \brief Returns the previous sibling tree node of this tree node. + \return previous sibling tree node attribute + */ AttributeTreeNode GetPrevious(); -/*! - Sets the next brother tree node to this tree node. -*/ - void SetNext(in AttributeTreeNode value); -/*! - Returns True if there is the next brother tree node of this tree node. -*/ + /*! + \brief Assigns the next sibling tree node to this tree node. + \param sibling tree node attribute being set as a next sibling of this tree node + */ + void SetNext(in AttributeTreeNode sibling); + /*! + \brief Checks if next sibling tree node attribute is set for this tree node. + \return \c true if next sibling tree node attribute is defined or \c false otherwise + */ boolean HasNext(); -/*! - Returns the previous brother tree node of this tree node. -*/ + /*! + \brief Returns the next sibling tree node of this tree node. + \return next sibling tree node attribute + */ AttributeTreeNode GetNext(); -/*! - Sets the first child tree node to this tree node. -*/ - void SetFirst(in AttributeTreeNode value); -/*! - Returns True if there is the first child tree node of this tree node. -*/ + /*! + \brief Sets the specified tree node as a first child of this tree node. + \param child tree node attribute being set filrst child of this tree node + */ + void SetFirst(in AttributeTreeNode child); + /*! + \brief Checks if first child tree node attribute is set for this tree node. + \return \c true if first child tree node attribute is defined or \c false otherwise + */ boolean HasFirst(); -/*! - Returns the first child tree node of this tree node. -*/ + /*! + \brief Returns the first child tree node of this tree node. + \return first child tree node attribute + */ AttributeTreeNode GetFirst(); -/*! - Sets ID of a tree. - \param value String parameter defining the ID of a tree. - \note
        Tree nodes of one tree have the same ID. -*/ - void SetTreeID(in string value); -/*! - Gets ID of a tree. - \return An ID of a tree in the format of a string. -*/ + /*! + \brief Sets identifier of the parent tree to this tree node. + \note All tree nodes which belong to the same tree, should have the same identifier. + \param ID identifier (arbitrary non-empty string) being set for this tree node + */ + void SetTreeID(in string ID); + /*! + \brief Returns identifier of the parent tree. + \return parent tree identifier + */ string GetTreeID(); - -/*! - Adds a child tree node to the end of the list of children of this tree node. -*/ - void Append(in AttributeTreeNode value); -/*! - Adds a child tree node to the beginning of the list of children of this tree node. - -*/ - void Prepend(in AttributeTreeNode value); -/*! - Adds a brother tree node before this tree node. - In this case the both tree nodes will belong to the same father. -*/ - void InsertBefore(in AttributeTreeNode value); -/*! - Adds a brother tree node after this tree node. - In this case the both tree nodes will belong to the same father. -*/ - void InsertAfter(in AttributeTreeNode value); -/*! - Deletes a tree node. - -
        See also an example of this method usage in batchmode of %SALOME application. - -*/ + /*! + \brief Appends specified tree node to the end of the children list of this tree node. + \param child tree node being added to the list of children + */ + void Append(in AttributeTreeNode child); + /*! + \brief Puts specified tree node to the beginning of the children list of this tree node. + \param child tree node being added to the list of children + */ + void Prepend(in AttributeTreeNode child); + /*! + \brief Insert specified tree node as a previous child in the parent tree node's children list. + \param child tree node being inserted to the parent tree node + */ + void InsertBefore(in AttributeTreeNode child); + /*! + \brief Insert specified tree node as a next child in the parent tree node's children list. + \param child tree node being inserted to the parent tree node + */ + void InsertAfter(in AttributeTreeNode child); + /*! + \brief Removes this tree node. + */ void Remove(); - -/*! - Returns the depth of the tree node in the - structure, it means the number of fathers of the given tree node. - (i.e.: the depth of the root tree node is 0). -*/ + /*! + \brief Returns the depth of the tree node in the tree structure. The resulting value + it equal to the number of the fathers of this tree node. + \note The depth of the root tree node is 0. + \return tree node's depth + */ long Depth(); -/*! - Returns True if it is a root tree node. -*/ + /*! + \brief Checks if the tree node is a root of the tree. + \return \c true if it is a root tree node or \c false otherwise + */ boolean IsRoot(); -/*! - Returns True if this tree node is a descendant of the tree node. -*/ - boolean IsDescendant(in AttributeTreeNode value); -/*! - Returns True if this tree node is the father of the tree node. -*/ - boolean IsFather(in AttributeTreeNode value); -/*! - Returns True if this tree node is a child of the tree node. -*/ - boolean IsChild(in AttributeTreeNode value); -/*! - Returns ID of the according %SObject. -*/ + /*! + \brief Checks if the tree node is a descendant of the specified tree node. + \param other tree node that is tested for being ancestor of this tree node + \return \c true if this node is descendant of the \a other node or \c false otherwise + */ + boolean IsDescendant(in AttributeTreeNode other); + /*! + \brief Checks if this tree node is a parent of the specified tree node \a other. + \param other tree node that is tested for being father of this tree node + \return \c true if this node is father of the \a other node or \c false otherwise + */ + boolean IsFather(in AttributeTreeNode other); + /*! + \brief Checks if this tree node is a child of the specified tree node \a other. + \param other tree node that is tested for being child of this tree node + \return \c true if this node is child of the \a other node or \c false otherwise + */ + boolean IsChild(in AttributeTreeNode other); + /*! + \brief Returns string identifier of the owner SObject (e.g. "0:1:2"). + \return string entry of the owner SObject + */ string Label(); }; + //========================================================================== -/*! \brief LocalID attribute + /*! + \brief Local identifier attribute + + This attribute can be used for identification of the SObject (for example by type). - Attribute describing the link between a %SObject and a local object in the component. -*/ + See \ref example15 for an example of this atrtibute usage in batchmode of %SALOME application. + + \sa AttributeUserID + */ //========================================================================== interface AttributeLocalID : GenericAttribute { -/*! - Returns the value of this attribute. - -
        See also an example of this method usage in batchmode of %SALOME application. -*/ + /*! + \brief Returns the value of the attribute. + \return attribute value + */ long Value(); -/*! - Sets the value of this attribute. - - \param value This parameter defines the local ID which will be set. - -
        See also an example of this method usage in batchmode of %SALOME application. -*/ + /*! + \brief Sets the value of the attribute + \param value value being set to the attribute + */ void SetValue(in long value); }; //========================================================================== -/*! \brief Attribute storing GUID - - Attribute allowing to store GUID -*/ + /*! + \brief Attribute storing GUID. + + This attribute can be used to store arbitrary GUID. Attribute allowing to store GUID. + In contrast to any other atribute (e.g. AttributeLocalID), it is possible to + define as many GUID attributes for the same SObject as it is required provided that + they have different GUID values. + + \sa AttributeLocalID + */ //========================================================================== interface AttributeUserID : GenericAttribute { -/*! - Returns the value of this attribute - -
        See also an example of this method usage in batchmode of %SALOME application. -*/ + /*! + \brief Returns the value of the attribute. + \return attribute value + */ string Value(); -/*! - Sets the value of this attribute - -
        See also an example of this method usage in batchmode of %SALOME application. -*/ + /*! + \brief Sets the value of the attribute + \param value value being set to the attribute + */ void SetValue(in string value); }; //========================================================================== -/*! \brief %AttributeTarget iterface - - This attribute stores the list of all %SObjects that refer - to this %SObject. This attribute is used for inner purposes of the application. - It is also needed for optimization. -*/ + /*! + \brief Back references attribute. + \internal + + This attribute is used to store back references to all the SObjects that refer + to the owner SObject. + + This attribute is used for inner purposes (in particular, for performance + optimization). + */ //========================================================================== interface AttributeTarget : GenericAttribute { -/*! - Adds a %SObject to the list of %SObjects which refer to this %SObject. - -
        See also an example of this method usage in batchmode of %SALOME application. - -*/ - void Add(in SObject anObject); -/*! - Returns a list of %SObjects which refer to this %SObject. -*/ + /*! + Adds specified SObject to the list of SObjects which refer to the owner SObject. + \param refobj %SObject being added to the list + */ + void Add(in SObject refobj); + /*! + Returns a list of SObjects which refer to the owner SObject. + \return list of SObject referencing to the owher SObject + */ SALOMEDS::Study::ListOfSObject Get(); -/*! - Deletes a %SObject from the list of %SObjects which refer to this %SObject. - -
        See also an example of this method usage in batchmode of %SALOME application. - -*/ + /*! + Removes specified SObject from the list of SObjects which refer to the owner SObject. + \param refobj %SObject being removed to the list + */ void Remove(in SObject anObject); }; + //========================================================================== - /*! \brief %AttributeTableOfInteger interface - - This attribute allows to store a table of integers (indexing from 1 like in CASCADE) - and string titles of this table, of each row, of each column. + /*! + \brief Generic table attribute. -
        See also an example of usage of these methods in batchmode of %SALOME application. + Used as base interface for the AttributeTableOfInteger, AttributeTableOfReal + and AttributeTableOfString. Provides functions which are common for all table + attributes. -*/ + \note The indices of rows and columns in the table start from 1. + \sa AttributeTableOfInteger, AttributeTableOfReal, AttributeTableOfString + */ //========================================================================== - interface AttributeTableOfInteger : GenericAttribute + interface AttributeTable : GenericAttribute { -/*! - This exception is raised when an incorrect index is passed as parameter. -*/ + //! This exception is raised when an invalid (out of range) index is passed as parameter. exception IncorrectIndex {}; -/*! - This exception is raised when an incorrect length of the argument is passed as parameter. -*/ + //! This exception is raised when sequence of incorrect length is passed as parameter. exception IncorrectArgumentLength {}; - // titles: for table, for each row, for each column -/*! - Sets the title of the table. -*/ - void SetTitle(in string theTitle); -/*! - Returns the title of the table. -*/ + //! Sort order + enum SortOrder { + AscendingOrder, //!< The items are sorted ascending + DescendingOrder //!< The items are sorted descending + }; + + //! Sort policy (specifies how empty cells are taken into account when sorting) + enum SortPolicy { + EmptyLowest, //!< Empty cells are considered as lowest values + EmptyHighest, //!< Empty cells are considered as highest values + EmptyFirst, //!< Empty cells are always first + EmptyLast, //!< Empty cells are always last + EmptyIgnore //!< Empty cells are ignored (stay at initial positions) + }; + + /*! + \brief Sets the main title of the table. + \param title title being set to the table + \sa GetTitle() + */ + void SetTitle(in string title); + /*! + \brief Returns the title of the table. + \return table title (empty string if not set) + \sa SetTitle() + */ string GetTitle(); -/*! - Sets the title of a row with a definite index. -*/ - void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex); -/*! - Sets the titles for all rows of the table. -*/ - void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); -/*! - Returns the titles of all rows of the table. -*/ + /*! + \brief Sets the title of a row with specified index. + + Raises an exception if \a row is out of range. + + \param row row index + \param title title being set to the row + \sa GetRowTitle() + */ + void SetRowTitle(in long row, in string title) raises(IncorrectIndex); + /*! + \brief Returns the title of a row with specified index. + + Raises an exception if \a row is out of range. + + \param row row index + \return row title (empty string if not set) + \sa SetRowTitle() + */ + string GetRowTitle(in long row) raises(IncorrectIndex); + /*! + \brief Sets the titles for all rows in the table. + + Raises an exception if length of the \a titles parameter is not equal + to the number of rows in the table. + + \param titles titles being set to the table rows + \sa GetRowTitles() + */ + void SetRowTitles(in StringSeq titles) raises(IncorrectArgumentLength); + /*! + \brief Returns the titles of all rows of the table. + \return list of all rows titles + \sa SetRowTitles() + */ StringSeq GetRowTitles(); -/*! - Sets the title of a column with a definite index. -*/ - void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex); -/*! - Sets the titles for all columns of the table. -*/ - void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); -/*! - Returns the titles of all columns of the table. -*/ + /*! + \brief Sets the title of a column with specified index. + + Raises an exception if \a column is out of range. + + \param column column index + \param title title being set to the column + \sa GetColumnTitle() + */ + void SetColumnTitle(in long column, in string title) raises(IncorrectIndex); + /*! + \brief Returns the title of a column with specified index. + + Raises an exception if \a column is out of range. + + \param column column index + \return column title (empty string if not set) + \sa SetColumnTitle() + */ + string GetColumnTitle(in long column) raises(IncorrectIndex); + /*! + \brief Sets the titles for all columns in the table. + + Raises an exception if length of the \a titles parameter is not equal + to the number of columns in the table. + + \param titles titles being set to the table columns + \sa GetColumnTitles() + */ + void SetColumnTitles(in StringSeq titles) raises(IncorrectArgumentLength); + /*! + \brief Returns the titles of all columns of the table. + \return list of all columns titles + \sa SetColumnTitles() + */ StringSeq GetColumnTitles(); - - //Rows units -/*! - Sets the unit of a row with a definite index. -*/ - void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex); -/*! - Sets the units for all rows of the table. -*/ - void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength); -/*! - Returns the units of all rows of the table. -*/ + /*! + \brief Assigns the unit label to the row with specified index. + + Raises an exception if \a row is out of range. + + \param row row index + \param unit unit label being set to the row + \sa GetRowUnit() + */ + void SetRowUnit(in long row, in string unit) raises(IncorrectIndex); + /*! + \brief Returns the unit label of a row with specified index. + + Raises an exception if \a row is out of range. + + \param row row index + \return row unit label (empty string if not set) + \sa SetRowUnit() + */ + string GetRowUnit(in long row) raises(IncorrectIndex); + /*! + \brief Sets the unit labels for all rows in the table. + + Raises an exception if length of the \a units parameter is not equal + to the number of rows in the table. + + \param units unit labels being set to the table rows + \sa GetRowUnits() + */ + void SetRowUnits(in StringSeq units) raises(IncorrectArgumentLength); + /*! + \brief Returns the unit labels of all rows of the table. + \return list of all rows unit labels + \sa SetRowUnits() + */ StringSeq GetRowUnits(); - - // table information -/*! - Returns the number of rows of the table. -*/ + /*! + \brief Returns the number of rows of the table. + \return rows count + \sa GetNbColumns() + */ long GetNbRows(); -/*! - Returns the number of columns of the table. -*/ + /*! + \brief Returns the number of columns of the table. + \return columns count + \sa GetNbRows(), SetNbColumns() + */ long GetNbColumns(); - - // operations with rows -/*! - Adds a row to the end of the table. - \param theData A sequence of long values which will be set as elements of the added row. -*/ - void AddRow(in LongSeq theData) raises(IncorrectArgumentLength); -/*! - Sets the elements of a definite row. - \param theRow The number of the row. - \param theData A sequence of long values which will be set as elements of this row. - -*/ - void SetRow(in long theRow, in LongSeq theData) raises(IncorrectArgumentLength, IncorrectIndex); -/*! - Gets the row of the table. - - \param theRow The number of the row. - \return A sequence of long values which are set as elements of this row. -*/ - LongSeq GetRow(in long theRow) raises(IncorrectIndex); - - // operations with columns -/*! - Adds a column to the end of the table. - - \param theData A sequence of long values which will be set as elements of this column. -*/ - void AddColumn(in LongSeq theData) raises(IncorrectArgumentLength); -/*! - Sets the values of all elements of the column. - - \param theData A sequence of long values which will be set as elements of this column. -*/ - void SetColumn(in long theColumn, in LongSeq theData) raises(IncorrectArgumentLength, IncorrectIndex); -/*! - Returns the column of the table. -*/ - LongSeq GetColumn(in long theColumn) raises(IncorrectIndex); - - // operations with elements -/*! - Puts a value in the table. - \param theRow The row, where the value will be placed. - \param theColumn The column, where the value will be placed. -*/ - void PutValue(in long theValue, in long theRow, in long theColumn) raises(IncorrectIndex); -/*! - Returns True if there is a value in the table. - \param theRow The row containing the value - \param theColumn The column containing the value -*/ - boolean HasValue(in long theRow, in long theColumn); -/*! - Returns the value from the table. - \param theRow The row containing the value - \param theColumn The column containing the value -*/ - long GetValue(in long theRow, in long theColumn) raises(IncorrectIndex); - -/*! - Sets the max number of colums in the table. - \note It'd better to set it before filling the table. -*/ - void SetNbColumns(in long theNbColumns); - -/*! - Returns the indices of the row where the values are defined. -*/ - LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex); - // operations with files -/*! - Reads a table from a file. -*/ - boolean ReadFromFile(in SALOMEDS::TMPFile theStream); -/*! - Saves a table into a file. -*/ + /*! + \brief Check if the value is set for the cell with specified \a row and \a column indices. + \param row row index + \param column column index + \return \c true if value is set for the specified cell or \c false otherwise + (or if row/column index is/are out of range) + */ + boolean HasValue(in long row, in long column); + /*! + \brief Clear value in the specified table cell. + + Raises an exception if \a row or \a column is out of range. + + \param row row index + \param column column index + \sa HasValue() + */ + void RemoveValue(in long row, in long column) raises(IncorrectIndex); + /*! + \brief Sets the maximum number of colums in the table. + + If new number of columns is less than the current one, the table is truncated + (extra columns are removed). + + \note It is recommended to set number of columns before assigning data to the table. + + \param columns total number of columns being set for the table + \sa GetNbColumns() + */ + void SetNbColumns(in long columns); + /*! + \brief Returns the indices of the columns in the specified \a row for which + values are set. + + Raises an exception if \a row is out of range. + + \param row row index + \return list of column indices + */ + LongSeq GetRowSetIndices(in long row) raises(IncorrectIndex); + /*! + \brief Sort values in the specified table row. + + Sort order is specified by the \a order parameter. The \a policy + specifies how to process empty cells (put to the first place, ignore, etc). + + Raises an exception if \a row is out of range. + + \note Other table rows are not affected. + + \param row row index + \param order sort order (ascending/descending) + \param policy sort policy (specifies how to process empty cells) + \return list of mixed column indices + */ + LongSeq SortRow(in long row, in SortOrder order, in SortPolicy policy) raises(IncorrectIndex); + /*! + \brief Sort values in the specified table column. + + Sort order is specified by the \a order parameter. The \a policy + specifies how to process empty cells (put to the first place, ignore, etc). + + Raises an exception if \a column is out of range. + + \note Other table columns are not affected. + + \param column column index + \param order sort order (ascending/descending) + \param policy sort policy (specifies how to process empty cells) + \return list of mixed row indices + */ + LongSeq SortColumn(in long column, in SortOrder order, in SortPolicy policy) raises(IncorrectIndex); + /*! + \brief Sort table columns by the specified row. + + All the table columns are sorted according to the values in the specified + row. Sort order is specified by the \a order parameter. The \a policy + specifies how to process empty cells (put to the first place, ignore, etc). + + Raises an exception if \a row is out of range. + + \param row row index + \param order sort order (ascending/descending) + \param policy sort policy (specifies how to process empty cells) + \return list of mixed column indices + */ + LongSeq SortByRow(in long row, in SortOrder order, in SortPolicy policy) raises(IncorrectIndex); + /*! + \brief Sort table rows by the specified column. + + All the table rows are sorted according to the values in the specified + column. Sort order is specified by the \a order parameter. The \a policy + specifies how to process empty cells (put to the first place, ignore, etc). + + Raises an exception if \a column is out of range. + + \param column column index + \param order sort order (ascending/descending) + \param policy sort policy (specifies how to process empty cells) + \return list of mixed row indices + */ + LongSeq SortByColumn(in long column, in SortOrder order, in SortPolicy policy) raises(IncorrectIndex); + /*! + \brief Swap values in two table cells. + + Raises an exception if any specified index is out of range. + + \param row1 first cell's row index + \param column1 first cell's column index + \param row2 second cell's row index + \param column2 second cell's column index + */ + void SwapCells(in long row1, in long column1, in long row2, in long column2) raises(IncorrectIndex); + /*! + \brief Swap two table rows. + + Raises an exception if any \a row1 or \a row2 is out of range. + + \param row1 first row's index + \param row2 second row's index + */ + void SwapRows(in long row1, in long row2) raises(IncorrectIndex); + /*! + \brief Swap two table columns. + + Raises an exception if any \a column1 or \a column2 is out of range. + + \param column1 first column's index + \param column2 second column's index + */ + void SwapColumns(in long column1, in long column2) raises(IncorrectIndex); + /*! + \brief Reads a table from a byte stream. + \param fileStream byte stream + \return \c true if table is successfully read or \c false otherwise + \sa SaveToFile() + */ + boolean ReadFromFile(in SALOMEDS::TMPFile fileStream); + /*! + \brief Saves a table into a byte stream. + \return byte stream with table representation + \sa ReadFromFile() + */ SALOMEDS::TMPFile SaveToFile(); }; //========================================================================== -/*! \brief %AttributeTableOfReal interface + /*! + \brief Table of %integer values - This attribute allows to store a table of reals (indexing from 1 like in CASCADE) - and string titles of this table, of each row, of each column. -
        See also an example of usage of these methods in batchmode of %SALOME application. + This attribute allows to store a table of %integer values. It is possible + to specify titles for rows and columns. In addition, the unis labels can be + assigned to the rows. And finally, the table iself can have title. -*/ - //========================================================================== + \note The indices of rows and columns in the table start from 1. - interface AttributeTableOfReal : GenericAttribute - { -/*! - This exception is raised when an incorrect index is passed as parameter. -*/ - exception IncorrectIndex {}; -/*! - This exception is raised when an incorrect length of the argument is passed as parameter. -*/ - exception IncorrectArgumentLength {}; + See \ref example21 for an example of usage of this attribute in batchmode of %SALOME application. - // titles: for table, for each row, for each column -/*! - Sets the title of the table. -*/ - void SetTitle(in string theTitle); -/*! - Returns the title of the table. -*/ - string GetTitle(); -/*! - Sets the title of a row with a definite index. -*/ - void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex); -/*! - Sets the titles for all rows of the table. -*/ - void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); -/*! - Returns the titles of all rows of the table. -*/ - StringSeq GetRowTitles(); -/*! - Sets the title of a column with a definite index. -*/ - void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex); -/*! - Sets the titles for all columns of the table. -*/ - void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); -/*! - Returns the titles of all columns of the table. -*/ - StringSeq GetColumnTitles(); + \sa AttributeTable, AttributeTableOfReal, AttributeTableOfString + */ + //========================================================================== - //Rows units -/*! - Sets the unit of a row with a definite index. -*/ - void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex); -/*! - Sets the units for all rows of the table. -*/ - void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength); -/*! - Returns the units of all rows of the table. -*/ - StringSeq GetRowUnits(); + interface AttributeTableOfInteger : AttributeTable + { + /*! + \brief Appends new row to the table. + + If the length of the \a data parameter is greater than current number of columns + in the table, the table is automatically resized. + + \param data sequence of values which will be set as elements of the added row + \sa SetRow(), GetRow(), AddColumn() + */ + void AddRow(in LongSeq data) raises(IncorrectArgumentLength); + /*! + \brief Replaces all the elements of the specified \a row with new values. + + Raises an exception if \a row is out of range or if the length of the + \a data parameter is not equal to the number of columns in the table. + + \param row row index + \param data sequence of values being set as values of the row + \sa GetRow(), AddRow(), SetColumn() + */ + void SetRow(in long row, in LongSeq data) raises(IncorrectArgumentLength, IncorrectIndex); + /*! + \brief Returns all the values of the specified row in the table. + + Raises an exception if \a row is out of range. + + \note For empty cells 0 value is returned. + + \param row row index + \return sequence of values which are set as elements of the row. + \sa SetRow(), AddRow() + */ + LongSeq GetRow(in long row) raises(IncorrectIndex); + /*! + \brief Appends new column to the table. + + If the length of the \a data parameter is greater than current number of rows + in the table, the table is automatically resized. + + \param data sequence of values which will be set as elements of the added column + \sa SetColumn(), GetColumn(), AddRow() + */ + void AddColumn(in LongSeq data) raises(IncorrectArgumentLength); + /*! + \brief Replaces all the elements of the specified column with new values. + + Raises an exception if \a column is out of range or if the length of the + \a data parameter is not equal to the number of rows in the table. + + \param column column index + \param data sequence of values being set as values of the column + \sa GetColumn(), AddColumn(), SetRow() + */ + void SetColumn(in long column, in LongSeq data) raises(IncorrectArgumentLength, IncorrectIndex); + /*! + \brief Returns all the values of the specified column in the table. + + Raises an exception if \a column is out of range. + + \note For empty cells 0 value is returned. + + \param column column index + \return sequence of values which are set as elements of the column. + \sa SetColumn(), AddColumn() + */ + LongSeq GetColumn(in long column) raises(IncorrectIndex); + /*! + \brief Puts a value to the table cell specified by \a row and \a column indices. + + If the \a row and/or \a column parameter(s) are greater than current number of rows/columns + in the table, the table is automatically resized. + + \param value value being set to the table cell + \param row row index + \param column column index + \sa GetValue(), HasValue() + */ + void PutValue(in long value, in long row, in long column) raises(IncorrectIndex); + /*! + \brief Returns the value from the cell table. + + Raises an exception if \a row or \a column is out of range or + if value is not set for the specified table cell. + + \param row row index + \param column column index + \return value assigned to the table cell + \sa PutValue(), HasValue() + */ + long GetValue(in long row, in long column) raises(IncorrectIndex); + }; - // table information -/*! - Returns the number of rows of the table. -*/ - long GetNbRows(); -/*! - Returns the number of columns of the table. -*/ - long GetNbColumns(); + //========================================================================== + /*! + \brief Table of real values - // operations with rows -/*! - Adds a row to the end of the table. -*/ - void AddRow(in DoubleSeq theData) raises(IncorrectArgumentLength); -/*! - Sets the values of all elements of the row. -*/ - void SetRow(in long theRow, in DoubleSeq theData) raises(IncorrectArgumentLength, IncorrectIndex); -/*! - Returns the row of the table. -*/ - DoubleSeq GetRow(in long theRow) raises(IncorrectIndex); + This attribute allows to store a table of real values. It is possible + to specify titles for rows and columns. In addition, the unis labels can be + assigned to the rows. And finally, the table iself can have title. - // operations with columns -/*! - Adds a column to the end of the table. -*/ - void AddColumn(in DoubleSeq theData) raises(IncorrectArgumentLength); -/*! - Sets the values of all elements of the column. -*/ - void SetColumn(in long theColumn, in DoubleSeq theData) raises(IncorrectArgumentLength, IncorrectIndex); -/*! - Returns the column of the table. -*/ - DoubleSeq GetColumn(in long theColumn) raises(IncorrectIndex); + \note The indices of rows and columns in the table start from 1. - // operations with elements -/*! - Puts a value in the table. - \param theRow The row, where the value will be placed. - \param theColumn The column, where the value will be placed. -*/ - void PutValue(in double theValue, in long theRow, in long theColumn) raises(IncorrectIndex); -/*! - Returns True if there is a value in the table. - \param theRow The row containing the value - \param theColumn The column containing the value -*/ - boolean HasValue(in long theRow, in long theColumn); -/*! - Returns the value from the table. - \param theRow The row containing the value - \param theColumn The column containing the value -*/ - double GetValue(in long theRow, in long theColumn) raises(IncorrectIndex); + See \ref example22 for an example of usage of this attribute in batchmode of %SALOME application. -/*! - Sets the max number of colums in the table. - \note It'd better to set it before filling the table. -*/ - void SetNbColumns(in long theNbColumns); + \sa AttributeTable, AttributeTableOfInteger, AttributeTableOfString + */ + //========================================================================== -/*! - Returns the indices of the row where the values are defined. -*/ - LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex); - // operations with files -/*! - Reads a table from a file. -*/ - boolean ReadFromFile(in SALOMEDS::TMPFile theStream); -/*! - Saves a table into a file. -*/ - SALOMEDS::TMPFile SaveToFile(); + interface AttributeTableOfReal : AttributeTable + { + /*! + \brief Appends new row to the table. + + If the length of the \a data parameter is greater than current number of columns + in the table, the table is automatically resized. + + \param data sequence of values which will be set as elements of the added row + \sa SetRow(), GetRow(), AddColumn() + */ + void AddRow(in DoubleSeq data) raises(IncorrectArgumentLength); + /*! + \brief Replaces all the elements of the specified \a row with new values. + + Raises an exception if \a row is out of range or if the length of the + \a data parameter is not equal to the number of columns in the table. + + \param row row index + \param data sequence of values being set as values of the row + \sa GetRow(), AddRow(), SetColumn() + */ + void SetRow(in long row, in DoubleSeq data) raises(IncorrectArgumentLength, IncorrectIndex); + /*! + \brief Returns all the values of the specified row in the table. + + Raises an exception if \a row is out of range. + + \note For empty cells 0.0 value is returned. + + \param row row index + \return sequence of values which are set as elements of the row. + \sa SetRow(), AddRow() + */ + DoubleSeq GetRow(in long row) raises(IncorrectIndex); + /*! + \brief Appends new column to the table. + + If the length of the \a data parameter is greater than current number of rows + in the table, the table is automatically resized. + + \param data sequence of values which will be set as elements of the added column + \sa SetColumn(), GetColumn(), AddRow() + */ + void AddColumn(in DoubleSeq data) raises(IncorrectArgumentLength); + /*! + \brief Replaces all the elements of the specified column with new values. + + Raises an exception if \a column is out of range or if the length of the + \a data parameter is not equal to the number of rows in the table. + + \param column column index + \param data sequence of values being set as values of the column + \sa GetColumn(), AddColumn(), SetRow() + */ + void SetColumn(in long column, in DoubleSeq data) raises(IncorrectArgumentLength, IncorrectIndex); + /*! + \brief Returns all the values of the specified column in the table. + + Raises an exception if \a column is out of range. + + \note For empty cells 0.0 value is returned. + + \param column column index + \return sequence of values which are set as elements of the column. + \sa SetColumn(), AddColumn() + */ + DoubleSeq GetColumn(in long column) raises(IncorrectIndex); + /*! + \brief Puts a value to the table cell specified by \a row and \a column indices. + + If the \a row and/or \a column parameter(s) are greater than current number of rows/columns + in the table, the table is automatically resized. + + \param value value being set to the table cell + \param row row index + \param column column index + \sa GetValue(), HasValue() + */ + void PutValue(in double value, in long row, in long volumn) raises(IncorrectIndex); + /*! + \brief Returns the value from the cell table. + + Raises an exception if \a row or \a column is out of range or + if value is not set for the specified table cell. + + \param row row index + \param column column index + \return value assigned to the table cell + \sa PutValue(), HasValue() + */ + double GetValue(in long row, in long column) raises(IncorrectIndex); }; - - //========================================================================== -/*! \brief %AttributeTableOfString interface + /*! + \brief Table of string values - This attribute allows to store a table of strings (indexing from 1 like in CASCADE) - and string titles of this table, of each row, of each column. -
        See also an example of usage of these methods in batchmode of %SALOME application. + This attribute allows to store a table of string values. It is possible + to specify titles for rows and columns. In addition, the unis labels can be + assigned to the rows. And finally, the table iself can have title. -*/ + \note The indices of rows and columns in the table start from 1. + \sa AttributeTable, AttributeTableOfInteger, AttributeTableOfReal + */ //========================================================================== - - interface AttributeTableOfString : GenericAttribute + interface AttributeTableOfString : AttributeTable { -/*! - This exception is raised when an incorrect index is passed as parameter. -*/ - exception IncorrectIndex {}; -/*! - This exception is raised when an incorrect length of the argument is passed as parameter. -*/ - exception IncorrectArgumentLength {}; - - // titles: for table, for each row, for each column -/*! - Sets the title of the table. -*/ - void SetTitle(in string theTitle); -/*! - Returns the title of the table. -*/ - string GetTitle(); -/*! - Sets the title of a row with a definite index. -*/ - void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex); -/*! - Sets the titles for all rows of the table. -*/ - void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); -/*! - Returns the titles of all rows of the table. -*/ - StringSeq GetRowTitles(); -/*! - Sets the title of a column with a definite index. -*/ - void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex); -/*! - Sets the titles for all columns of the table. -*/ - void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); -/*! - Returns the titles of all columns of the table. -*/ - StringSeq GetColumnTitles(); - - //Rows units -/*! - Sets the unit of a row with a definite index. -*/ - void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex); -/*! - Sets the units for all rows of the table. -*/ - void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength); -/*! - Returns the units of all rows of the table. -*/ - StringSeq GetRowUnits(); - - // table information -/*! - Returns the number of rows of the table. -*/ - long GetNbRows(); -/*! - Returns the number of columns of the table. -*/ - long GetNbColumns(); - - // operations with rows -/*! - Adds a row to the end of the table. -*/ - void AddRow(in StringSeq theData) raises(IncorrectArgumentLength); -/*! - Sets the values of all elements of the row. -*/ - void SetRow(in long theRow, in StringSeq theData) raises(IncorrectArgumentLength, IncorrectIndex); -/*! - Returns the row of the table. -*/ - StringSeq GetRow(in long theRow) raises(IncorrectIndex); - - // operations with columns -/*! - Adds a column to the end of the table. -*/ - void AddColumn(in StringSeq theData) raises(IncorrectArgumentLength); -/*! - Sets the values of all elements of the column. -*/ - void SetColumn(in long theColumn, in StringSeq theData) raises(IncorrectArgumentLength, IncorrectIndex); -/*! - Returns the column of the table. -*/ - StringSeq GetColumn(in long theColumn) raises(IncorrectIndex); - - // operations with elements -/*! - Puts a value in the table. - \param theRow The row, where the value will be placed. - \param theColumn The column, where the value will be placed. -*/ - void PutValue(in string theValue, in long theRow, in long theColumn) raises(IncorrectIndex); -/*! - Returns True if there is a value in the table. - \param theRow The row containing the value - \param theColumn The column containing the value -*/ - boolean HasValue(in long theRow, in long theColumn); -/*! - Returns the value from the table. - \param theRow The row containing the value - \param theColumn The column containing the value -*/ - string GetValue(in long theRow, in long theColumn) raises(IncorrectIndex); - -/*! - Sets the max number of colums in the table. - \note It'd better to set it before filling the table. -*/ - void SetNbColumns(in long theNbColumns); - -/*! - Returns the indices of the row where the values are defined. -*/ - LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex); - // operations with files -/*! - Reads a table from a file. -*/ - boolean ReadFromFile(in SALOMEDS::TMPFile theStream); -/*! - Saves a table into a file. -*/ - SALOMEDS::TMPFile SaveToFile(); + /*! + \brief Appends new row to the table. + + If the length of the \a data parameter is greater than current number of columns + in the table, the table is automatically resized. + + \param data sequence of values which will be set as elements of the added row + \sa SetRow(), GetRow(), AddColumn() + */ + void AddRow(in StringSeq data) raises(IncorrectArgumentLength); + /*! + \brief Replaces all the elements of the specified \a row with new values. + + Raises an exception if \a row is out of range or if the length of the + \a data parameter is not equal to the number of columns in the table. + + \param row row index + \param data sequence of values being set as values of the row + \sa GetRow(), AddRow(), SetColumn() + */ + void SetRow(in long row, in StringSeq data) raises(IncorrectArgumentLength, IncorrectIndex); + /*! + \brief Returns all the values of the specified row in the table. + + Raises an exception if \a row is out of range. + + \note For empty cells empty string is returned. + + \param row row index + \return sequence of values which are set as elements of the row. + \sa SetRow(), AddRow() + */ + StringSeq GetRow(in long row) raises(IncorrectIndex); + /*! + \brief Appends new column to the table. + + If the length of the \a data parameter is greater than current number of rows + in the table, the table is automatically resized. + + \param data sequence of values which will be set as elements of the added column + \sa SetColumn(), GetColumn(), AddRow() + */ + void AddColumn(in StringSeq data) raises(IncorrectArgumentLength); + /*! + \brief Replaces all the elements of the specified column with new values. + + Raises an exception if \a column is out of range or if the length of the + \a data parameter is not equal to the number of rows in the table. + + \param column column index + \param data sequence of values being set as values of the column + \sa GetColumn(), AddColumn(), SetRow() + */ + void SetColumn(in long column, in StringSeq data) raises(IncorrectArgumentLength, IncorrectIndex); + /*! + \brief Returns all the values of the specified column in the table. + + Raises an exception if \a column is out of range. + + \note For empty cells empty string is returned. + + \param column column index + \return sequence of values which are set as elements of the column. + \sa SetColumn(), AddColumn() + */ + StringSeq GetColumn(in long column) raises(IncorrectIndex); + /*! + \brief Puts a value to the table cell specified by \a row and \a column indices. + + If the \a row and/or \a column parameter(s) are greater than current number of rows/columns + in the table, the table is automatically resized. + + \param value value being set to the table cell + \param row row index + \param column column index + \sa GetValue(), HasValue() + */ + void PutValue(in string value, in long row, in long column) raises(IncorrectIndex); + /*! + \brief Returns the value from the cell table. + + Raises an exception if \a row or \a column is out of range or + if value is not set for the specified table cell. + + \param row row index + \param column column index + \return value assigned to the table cell + \sa PutValue(), HasValue() + */ + string GetValue(in long row, in long column) raises(IncorrectIndex); }; - //========================================================================== -/*! \brief %AttributeStudyProperties interface - - This attribute allows to store study properties: user name, creation date, creation - mode, modified flag, locked flag. -
        See also an example of usage of these methods in batchmode of %SALOME application. - -*/ + /*! + \brief %Study properties attribute + + This attribute is used to store study properties: user name, creation date, + creation mode, modified flag, locked flag. + + See \ref example20 for an example of usage of this attribute in batchmode of %SALOME application. + */ //========================================================================== - interface AttributeStudyProperties : GenericAttribute { -/*! - Sets the name of the author of the %Study -*/ - void SetUserName(in string theName); -/*! - Returns the name of the user of the %Study. - \note
        It returns a null string, if user name is not set -*/ + /*! + \brief Sets the name of the study author to the attribute. + \param author study author name + */ + void SetUserName(in string author); + /*! + \brief Returns the name of the study author. + \return study author name (empty string if not set) + */ string GetUserName(); -/*! - Sets creation date of the %Study. -*/ - void SetCreationDate(in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear); -/*! - Returns creation date of the %Study and True if creation date is set. -*/ - boolean GetCreationDate(out long theMinute, out long theHour, out long theDay, out long theMonth, out long theYear); -/*! - Sets creation mode of the %Study. - \note
        Creation mode must be: "from scratch" or "copy from". -*/ - void SetCreationMode(in string theMode); -/*! - Returns creation mode: "from scratch", "copy from", or null string - if creation mode is not set -*/ + /*! + \brief Sets creation date of the study. + \param minute minutes part of the date + \param hour hour part of the date + \param day day number part of the date + \param month month part of the date + \param year year part of the date + */ + void SetCreationDate(in long minute, in long hour, in long day, in long month, in long year); + /*! + \brief Returns creation date of the study. + \param minute used to return minutes part of the date (undefined if creation date is not set) + \param hour used to return hour part of the date (undefined if creation date is not set) + \param day used to return day number part of the date (undefined if creation date is not set) + \param month used to return month part of the date (undefined if creation date is not set) + \param year used to return year part of the date (undefined if creation date is not set) + \return \c true if creation date is set or \c false otherwise + */ + boolean GetCreationDate(out long minute, out long hour, out long day, out long month, out long year); + /*! + \brief Sets creation mode of the study. + \note Creation mode must be either "from scratch" or "copy from". + \param mode creation mode description + */ + void SetCreationMode(in string mode); + /*! + \brief Returns creation mode of the study. + + \brief The following values are allowed for creation mode: "from scratch", "copy from", + empty string (if not set). + + \return creation mode description + */ string GetCreationMode(); -/*! - Sets the number of transactions executed after the last saving of the document. -*/ - void SetModified(in long theModified); -/*! - Returns True, if the document has been modified and not saved. -*/ + /*! + \brief Sets the number of transactions executed after the last saving of the study. + \param modified transaction count + */ + void SetModified(in long modified); + /*! + \brief Check if study has been modified since last saving operation. + \return \c true, if the study has been modified and not saved or \c false otherwise + */ boolean IsModified(); -/*! - Returns the number of transactions executed after the last saving of the document. -*/ + /*! + \brief Returns the number of transactions executed after the last saving of the study. + \return transaction count + */ long GetModified(); -/*! - Sets the document locked for modifications if theLocked is True. -*/ - void SetLocked(in boolean theLocked); -/*! - Returns True if the document is locked for modifications. -*/ + /*! + \brief Lock/unlock the study for modifications. + \note This parameter is not recursive. + \note If the study is locked, any attempt to modify study contents leads to the raising + of the LockProtection exception. + \param lock \c true if study should be locked or \c false if study should be unlocked + */ + void SetLocked(in boolean lock); + /*! + \brief Check if study is locked. + \return \c true if study is locked or \c false otherwise + */ boolean IsLocked(); -/*! - Appends modification parameters to the modifications list. -*/ - void SetModification(in string theName, in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear); -/*! - Returns a list of mosdifiers user names, modification dates. - /note
        If theWithCreator is True, then the output list will also contain the name of the author and the date of creation. -*/ - void GetModificationsList(out StringSeq theNames, out LongSeq theMinutes, out LongSeq theHours, out LongSeq theDays, out LongSeq theMonths, out LongSeq theYears, in boolean theWithCreator); + /*! + \brief Appends modification record to the list of study modifications. + \param author author of the modification + \param minute minutes part of the modification date + \param hour hour part of the modification date + \param day day number part of the modification date + \param month month part of the modification date + \param year year part of the modification date + */ + void SetModification(in string author, in long minute, in long hour, in long day, in long month, in long year); + /*! + \brief Returns list of all the study modification records. + \param authors used to return authors of the modification records + \param minutes used to return minutes parts of the modification records + \param hours used to return hour parts of the modification records + \param days used to return day number parts of the modification records + \param months used to return month parts of the modification records + \param years used to return year parts of the modification records + \param withCreator \c true if creation record should be also added to the resulting list or \c false otherwise + */ + void GetModificationsList(out StringSeq authors, out LongSeq minutes, out LongSeq hours, out LongSeq days, out LongSeq months, out LongSeq years, in boolean withCreator); + + /*! + \brief Sets the comment of the study. + \param comment comment of the study. + */ + void SetComment(in string comment); + + /*! + \brief Returns comment of the study. + \return comment + */ + string GetComment(); + + /*! + \brief Sets the units of the study. + \param units units of the study. + */ + void SetUnits(in string units); + + /*! + \brief Returns units of the study. + \return units + */ + string GetUnits(); }; - //========================================================================== -/*! \brief %AttributePythonObject interface - Attribute allowing to store pyton objects as a sequence of chars. -*/ //========================================================================== + /*! + \brief Python %object attribute + This attribute is used to store pyton objects as a sequence of characters. + */ + //========================================================================== interface AttributePythonObject : GenericAttribute { -/*! - Sets in the attribute a Python object converted into a sequence of chars. - \param theSequence A sequence of chars. - \param IsScript Defines (if True) whether this sequence of chars is a Python script. -*/ - void SetObject(in string theSequence, in boolean IsScript); -/*! - Returns a Python object stored in the attribute as a sequence of chars. -*/ + /*! + \brief Sets a Python %object converted into a sequence of characters to the attribute. + \param pyObject sequence of characters representing the encoded Python %object + \param isScript if \c true, the \a pyObject parameter specifies a Python script + */ + void SetObject(in string pyObject, in boolean isScript); + /*! + \brief Returns a Python %object stored in the attribute as a sequence of characters. + \return encoded Python %object stored in the attribute (empty string if not set) + */ string GetObject(); -/*! - Returns True if the sequence of bytes stored in the attribute corresponds - to a Python script. -*/ + /*! + \brief Check if the value stored in the attribute is a Python script + \return \c true if the sequence of characters stored in the attribute corresponds + to a Python script or \c false otherwise + */ boolean IsScript(); }; - //========================================================================== -/*! \brief %AttributeParameter interface - Attribute is a universal container of basic types -*/ + //========================================================================== + /*! + \brief Parameter attribute + + This attribute is a universal container of arbitrary data of basic types + (%integer, real, string, array, etc). + + Each parameter is identified by the unique name. Only one value of the + specific type can be assigned to the parameter, though it is allowed to + assign values of different types to the same name. + */ //========================================================================== interface AttributeParameter : GenericAttribute { -/*! - Associates a integer value with the ID - \param theID An ID of a parameter. - \param theValue A value of the parameter -*/ - void SetInt(in string theID, in long theValue); -/*! - Returns a int value associated with the given ID - \param theID An ID of a parameter. -*/ - long GetInt(in string theID); - -/*! - Associates a real value with the ID - \param theID An ID of a parameter. - \param theValue A value of the parameter -*/ - void SetReal(in string theID, in double theValue); -/*! - Returns a real value associated with the given ID - \param theID An ID of a parameter. -*/ - double GetReal(in string theID); - -/*! - Associates a string value with the ID - \param theID An ID of a parameter. - \param theValue A value of the parameter -*/ - void SetString(in string theID, in string theValue); -/*! - Returns a string value associated with the given ID - \param theID An ID of a parameter. -*/ - string GetString(in string theID); - -/*! - Associates a boolean value with the ID - \param theID An ID of a parameter. - \param theValue A value of the parameter -*/ - void SetBool(in string theID, in boolean theValue); -/*! - Returns a boolean value associated with the given ID - \param theID An ID of a parameter. -*/ - boolean GetBool(in string theID); - -/*! - Associates an array of real values with the ID - \param theID An ID of a parameter. - \param theArray The array of real values -*/ - void SetRealArray(in string theID, in DoubleSeq theArray); -/*! - Returns an array of real values associated with the ID - \param theID An ID of a parameter. -*/ - DoubleSeq GetRealArray(in string theID); - -/*! - Associates an array of integer values with the ID - \param theID An ID of a parameter. - \param theArray The array of integer values -*/ - void SetIntArray(in string theID, in LongSeq theArray); -/*! - Returns an array of integer values associated with the ID - \param theID An ID of a parameter. -*/ - LongSeq GetIntArray(in string theID); - -/*! - Associates an array of string values with the ID - \param theID An ID of a parameter. - \param theArray The array of string values -*/ - void SetStrArray(in string theID, in StringSeq theArray); -/*! - Returns an array of string values associated with the ID - \param theID An ID of a parameter. -*/ - StringSeq GetStrArray(in string theID); -/*! - Returns True if for the ID of given type was assigned a value in the attribute - \param theID An ID of a parameter. - \param theType A type of parameter [0(Int), 1(Real), 2(Boolean), 3(String), 4(RealArray), 5(IntArray), 6(StrArray)]. -*/ - boolean IsSet(in string theID, in long theType); -/*! - Removes a parameter with given ID and Type, returns True if succeded - \param theID An ID of a parameter. - \param theType A type of parameter [0(Int), 1(Real), 2(Boolean), 3(String), 4(RealArray), 5(IntArray), 6(StrArray)]. -*/ - boolean RemoveID(in string theID, in long theType); -/*! - Returns a father attribute of this attribute -*/ + //! This exception is raised when an invalid identifier is passed as parameter. + exception InvalidIdentifier {}; + + /*! + \brief Associates %integer value with the unique identifier. + \param ID parameter name + \param value parameter value + */ + void SetInt(in string ID, in long value); + /*! + \brief Returns %integer value associated with the specified identifier. + + Raises an exception if %integer parameter is not set for the specified + parameter. + + \param ID parameter name + \return %integer value assigned to the parameter + */ + long GetInt(in string ID) raises(InvalidIdentifier); + /*! + \brief Associates real value with the unique identifier. + \param ID parameter name + \param value parameter value + */ + void SetReal(in string ID, in double value); + /*! + \brief Returns real value associated with the specified identifier. + + Raises an exception if real parameter is not set for the specified + parameter. + + \param ID parameter name + \return real value assigned to the parameter + */ + double GetReal(in string ID) raises(InvalidIdentifier); + /*! + \brief Associates string value with the unique identifier. + \param ID parameter name + \param value parameter value + */ + void SetString(in string ID, in string value); + /*! + \brief Returns string value associated with the specified identifier. + + Raises an exception if string parameter is not set for the specified + parameter. + + \param ID parameter name + \return string value assigned to the parameter + */ + string GetString(in string ID) raises(InvalidIdentifier); + /*! + \brief Associates boolean value with the unique identifier. + \param ID parameter name + \param value parameter value + */ + void SetBool(in string ID, in boolean value); + /*! + \brief Returns boolean value associated with the specified identifier. + + Raises an exception if boolean parameter is not set for the specified + parameter. + + \param ID parameter name + \return boolean value assigned to the parameter + */ + boolean GetBool(in string ID) raises(InvalidIdentifier); + /*! + \brief Associates real array value with the unique identifier. + \param ID parameter name + \param value parameter value + */ + void SetRealArray(in string ID, in DoubleSeq value); + /*! + \brief Returns real array value associated with the specified identifier. + + Raises an exception if real array parameter is not set for the specified + parameter. + + \param ID parameter name + \return real array value assigned to the parameter + */ + DoubleSeq GetRealArray(in string ID) raises(InvalidIdentifier); + /*! + \brief Associates %integer array value with the unique identifier. + \param ID parameter name + \param value parameter value + */ + void SetIntArray(in string ID, in LongSeq value); + /*! + \brief Returns %integer array value associated with the specified identifier. + + Raises an exception if %integer array parameter is not set for the specified + parameter. + + \param ID parameter name + \return %integer array value assigned to the parameter + */ + LongSeq GetIntArray(in string ID) raises(InvalidIdentifier); + /*! + \brief Associates string array value with the unique identifier. + \param ID parameter name + \param value parameter value + */ + void SetStrArray(in string ID, in StringSeq value); + /*! + \brief Returns string array value associated with the specified identifier. + + Raises an exception if string array parameter is not set for the specified + parameter. + + \param ID parameter name + \return string array value assigned to the parameter + */ + StringSeq GetStrArray(in string ID) raises(InvalidIdentifier); + /*! + \brief Checks if the value of specified type is set for the identifier. + \param ID parameter name + \param ptype parameter type [0(%integer), 1(real), 2(boolean), 3(string), + 4(real array), 5(%integer array), 6(string array)] + \returns \c true if the value of type \a ptype is associated with the parameter \a ID + */ + boolean IsSet(in string ID, in long ptype); + /*! + \brief Removes value of specified type from the named parameter. + \param ID parameter name + \param ptype parameter type [0(%integer), 1(real), 2(boolean), 3(string), + 4(real array), 5(%integer array), 6(string array)] + \return \c true if value is successfully removed or \c false otherwise + */ + boolean RemoveID(in string ID, in long ptype); + /*! + \brief Returns a father attribute of this attribute. + \return father parameter attribute + */ AttributeParameter GetFather(); -/*! - Returns True if this attribute has a father attribute -*/ + /*! + \brief Check if this attribute has parent parameter attribute. + \return \c true if this attribute has parent parameter attribute + */ boolean HasFather(); -/*! - Returns True if this attribute is a root attribute -*/ + /*! + \brief Check if this attribute is a root (top-level) parameter attribute. + \return \c true if this attribute is a root parameter attribute + */ boolean IsRoot(); -/*! - Clears the content of the attribute -*/ + /*! + \brief Clears the content of the attribute. + */ void Clear(); -/*! - Returns a sequence of ID's of the give type - \param theType A type of parameter [0(Int), 1(Real), 2(Boolean), 3(String), 4(RealArray), 5(IntArray), 6(StrArray)]. - */ - StringSeq GetIDs(in long theType); + /*! + \brief Returns a sequence of parameters identifiers of the specified type + stored in the attribute. + \param ptype parameter type [0(%integer), 1(real), 2(boolean), 3(string), + 4(real array), 5(%integer array), 6(string array)] + \return list of parameters identifier + */ + StringSeq GetIDs(in long ptype); }; }; #endif diff --git a/idl/SALOME_Comm.idl b/idl/SALOME_Comm.idl index 3c2e3f173..a9a6d5367 100644 --- a/idl/SALOME_Comm.idl +++ b/idl/SALOME_Comm.idl @@ -1,29 +1,35 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef _SALOME_COMM_IDL_ #define _SALOME_COMM_IDL_ #include "SALOME_Exception.idl" +/*! + \file SALOME_Comm.idl \brief This file contains a set of interfaces used for communication + between components + */ + module SALOME { enum TypeOfDataTransmitted { _DOUBLE_,_INT_ }; diff --git a/idl/SALOME_Component.idl b/idl/SALOME_Component.idl index d12f1e190..9d55e154b 100644 --- a/idl/SALOME_Component.idl +++ b/idl/SALOME_Component.idl @@ -1,33 +1,37 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : SALOME_Component.idl // Author : Paul RASCLE, EDF -// $Header: -// + #ifndef _SALOME_COMPONENT_IDL_ #define _SALOME_COMPONENT_IDL_ +#include "SALOME_GenericObj.idl" #include "SALOMEDS.idl" #include "SALOME_Exception.idl" +#include "SALOME_PyNode.idl" + +/*! \file SALOME_Component.idl \brief interfaces for EngineComponent and Container +*/ /*! \brief This is a package of interfaces used for connecting new components to %SALOME @@ -42,18 +46,22 @@ module Engines */ typedef sequence TMPFile; - /*! - General Key Value Structure to set or get properties, for component - */ + //! General Key Value Structure to set or get properties, for component struct KeyValuePair { string key; any value; }; + //! Structure data type to hold reference on data + struct dataref + { + string ref; + }; + typedef sequence FieldsDict; - interface Component ; + interface EngineComponent ; interface fileRef ; interface fileTransfer ; interface Salome_file; @@ -66,17 +74,18 @@ module Engines interface Container { - /*! - Loads a new component class (dynamic library). + /*! \brief Loads a new component class (dynamic library). + \param componentName like COMPONENT, (Python or C++ implementation) try to make a Python import of COMPONENT, then a lib open of libCOMPONENTEngine.so + \param reason in case of error (return false) a string explaining the error \return true if load successfull or already done, false otherwise */ - boolean load_component_Library(in string componentName); + boolean load_component_Library(in string componentName, out string reason); + //! Create a new servant instance of a component. /*! - Creates a new servant instance of a component. Component library must be loaded. \param componentName Name of the component which will be registered in Registry and Name Service, @@ -85,22 +94,37 @@ module Engines >0 otherwise (== study id) \return a loaded component */ - Engines::Component create_component_instance(in string componentName, - in long studyId); + Engines::EngineComponent create_component_instance(in string componentName, + in long studyId); + //! Create a new servant instance of a component with environment variables specified. + /*! + Component library must be loaded. + \param componentName Name of the component which will be registered + in Registry and Name Service, + (instance number suffix added to the registered name) + \param studyId 0 if instance is not associated to a study, + >0 otherwise (== study id) + \param env a dict of env variables + \param reason in case of error (return nil) a string explaining the error + \return a loaded component + */ + Engines::EngineComponent create_component_instance_env(in string componentName, + in long studyId, in FieldsDict env, + out string reason); + //! Find a servant instance of a component /*! - Finds a servant instance of a component \param registeredName Name of the component in Registry or Name Service, without instance suffix number \param studyId 0 if instance is not associated to a study, >0 otherwise (== study id) \return the first instance found with same studyId */ - Component find_component_instance(in string registeredName, - in long studyId); + EngineComponent find_component_instance(in string registeredName, + in long studyId); + //! Find a servant instance of a component, or create a new one. /*! - Find a servant instance of a component, or create a new one. Loads the component library if needed. Only applicable to multiStudy components. \param nameToRegister Name of the component which will be registered @@ -109,55 +133,40 @@ module Engines (not used any more, give empty string) \return a loaded component */ - Component load_impl(in string nameToRegister, - in string componentName); + EngineComponent load_impl(in string nameToRegister, + in string componentName); + //! Remove the component servant, and deletes all related objects /*! - Stops the component servant, and deletes all related objects \param component_i Component to be removed */ - void remove_impl(in Component component_i); + void remove_impl(in EngineComponent component_i); - /*! - Discharges all components from the container. - */ + //! Unload component libraries from the container. void finalize_removal() ; - /*! - Determines whether the server has been loaded or not. - */ + //! Determines whether the server has been loaded or not. void ping(); - /*! - Name of the %container - */ + //! Name of the %container readonly attribute string name ; - /*! - working directory of the %container - */ + //! working directory of the %container readonly attribute string workingdir ; - /*! - name of the %container log file (this has been set by the launcher) - */ + //! name of the %container log file (this has been set by the launcher) attribute string logfilename ; - /*! - Shutdown the Container process. - */ + //! Shutdown the Container process. void Shutdown(); - /*! - Returns the hostname of the container - */ + //! Returns the hostname of the container string getHostName(); - /*! - Returns the PID of the container - */ + //! Returns the PID of the container long getPID(); + //! Kill the container /*! Returns True if the %container has been killed. Kept for Superv compilation but can't work, unless oneway... @@ -165,6 +174,7 @@ module Engines */ boolean Kill_impl() ; + //! Create a fileRef /*! returns a fileRef object if origFileName exists and is readable else returns null object. Only one fileRef is created for a given @@ -173,6 +183,7 @@ module Engines */ fileRef createFileRef(in string origFileName); + //! Create a Salome_file /*! returns a Salome_file object if origFileName exists and is readable else returns null object. @@ -183,6 +194,7 @@ module Engines */ Salome_file createSalome_file(in string origFileName); + //! Create a fileTransfer /*! returns a fileTransfer object used to copy files from the container machine to the clients machines. Only one fileTransfer instance is @@ -190,38 +202,45 @@ module Engines */ fileTransfer getFileTransfer(); + //! Copy a file from a remote host (container) to a local file + /*! + \param contai the remote container + \param remoteFile the file on the remote host to copy + \param localFile the local file to create by copy + */ + void copyFile(in Container contai, in string remoteFile, in string localFile); + + //! Create a PyNode in the container + /*! + \param nodeName the name of the PyNode + \param code python code as text to load in the node + */ + PyNode createPyNode(in string nodeName, in string code) raises(SALOME::SALOME_Exception); + + //! Create a PyScriptNode in the container + /*! + \param nodeName the name of the PyScriptNode + \param code python code as text to load in the node + */ + PyScriptNode createPyScriptNode(in string nodeName, in string code) raises(SALOME::SALOME_Exception); }; /*! \brief Interface of the %component. This interface is used for interaction between the %container and the %component and between the components inside the container. */ - interface Component + interface EngineComponent { - /*! - The name of the instance of the %Component - */ + //! The name of the instance of the %Component readonly attribute string instanceName ; - /*! - The name of the interface of the %Component - */ + //! The name of the interface of the %Component readonly attribute string interfaceName ; - /*! - Determines whether the server has already been loaded or not. - */ + //! Determines whether the server has already been loaded or not. void ping(); -// /*! -// Set study associated to component instance -// \param studyId -// (=0: multistudy component instance, -// >0: study id associated to this instance -// \return false if already set with a different value (change not possible) -// */ -// boolean setStudyId(in long studyId); - + //! Get study associated to component instance /*! get study associated to component instance \return -1: not initialised (Internal Error) @@ -230,6 +249,7 @@ module Engines */ long getStudyId(); + //! Remove component instance from container /*! Deactivates the %Component. -- TO BE USED BY CONTAINER ONLY (Container housekeeping) -- @@ -237,11 +257,10 @@ module Engines */ void destroy() ; - /*! - Returns the container that the %Component refers to. - */ + //! Returns the container that the %Component refers to. Container GetContainerRef() ; + //! Set component instance properties /*! Gives a sequence of (key=string,value=any) to the component. Base class component stores the sequence in a map. @@ -250,12 +269,26 @@ module Engines */ void setProperties(in FieldsDict dico); + //! Get component instance properties /*! returns a previously stored map (key=string,value=any) as a sequence. See setProperties(in FieldsDict dico). */ FieldsDict getProperties(); + //! Set an option value + /*! + This method is to set an option specific to a certain EngineComponent. + */ + void SetOption(in string optionName, in string value); + + //! Return an option value + /*! + This method is to get value of an option specific to a certain EngineComponent. + */ + string GetOption(in string optionName); + + //! Set name of a node in a graph (for %SUPERVISOR use) /*! This method is used by the %SUPERVISOR component. It sets the names of the graph and of the node. @@ -264,44 +297,51 @@ module Engines */ void Names( in string aGraphName , in string aNodeName ) ; + //! Kill the component (if you can) /*! Returns True if the %Component has been killed. */ boolean Kill_impl() ; + //! Stop the component (if you can) /*! Returns True if the activity of the %Component has been stopped. (It's action can't be resumed) */ boolean Stop_impl() ; + //! Suspend the component /*! Returns True if the activity of the %Component has been suspended. (It's action can be resumed) */ boolean Suspend_impl() ; + //! Resume the component /*! Returns True if the activity of the %Component has been resumed. */ boolean Resume_impl() ; + //! Get the cpu used /*! - Returns the Cpu used (long does not run with python !...) + Returns the Cpu used */ long CpuUsed_impl() ; + //! Get a python dump /*! Returns a python script, which is being played back reproduces the data model of component */ TMPFile DumpPython(in Object theStudy, - in boolean isPublished, - out boolean isValidScript); + in boolean isPublished, + in boolean isMultiFile, + out boolean isValidScript); + //! Returns a CORBA Ref of a input Salome_file managed by a service. /*! - Returns a CORBA Ref of a input Salome_file managed by a service. \param service_name service's name. \param file_name name of the requested file. @@ -312,8 +352,9 @@ module Engines sends the file's reference. */ Engines::Salome_file getInputFileToService(in string service_name, - in string Salome_file_name) raises(SALOME::SALOME_Exception); + in string Salome_file_name) raises(SALOME::SALOME_Exception); + //! Check service input files (transfer them if needed) /*! This method is used before the activation of the service. It calls recvFiles() on all the input Salome_file files of the service. @@ -329,10 +370,10 @@ module Engines \exception contains informations about files that are not in a good state. */ - void checkInputFilesToService(in string service_name) raises(SALOME::SALOME_Exception); + void checkInputFilesToService(in string service_name) raises(SALOME::SALOME_Exception); + //! This method adds a input Salome_file to a service of the component. /*! - This method adds a input Salome_file to a service of the component. \param service_name service's name. \param Salome_file_name name of the Salome_file @@ -343,10 +384,10 @@ module Engines a Salome_file with this name for the service. */ Engines::Salome_file setInputFileToService(in string service_name, - in string Salome_file_name) raises(SALOME::SALOME_Exception); + in string Salome_file_name) raises(SALOME::SALOME_Exception); + //! Returns a CORBA Ref of a output Salome_file managed by a service. /*! - Returns a CORBA Ref of a output Salome_file managed by a service. \param service_name service's name. \param file_name name of the requested file. @@ -357,8 +398,9 @@ module Engines sends the file's reference. */ Engines::Salome_file getOutputFileToService(in string service_name, - in string Salome_file_name) raises(SALOME::SALOME_Exception); + in string Salome_file_name) raises(SALOME::SALOME_Exception); + //! Check service output files (transfer them if needed) /*! This method is used at the end of the service. It calls recvFiles() on all the output Salome_file files of the service. @@ -374,10 +416,10 @@ module Engines \exception contains informations about files that are not in a good state. */ - void checkOutputFilesToService(in string service_name) raises(SALOME::SALOME_Exception); + void checkOutputFilesToService(in string service_name) raises(SALOME::SALOME_Exception); + //! This method adds an output Salome_file to a service of the component. /*! - This method adds an output Salome_file to a service of the component. \param service_name service's name. \param Salome_file_name name of the Salome_file @@ -388,7 +430,9 @@ module Engines a Salome_file with this name for the service. */ Engines::Salome_file setOutputFileToService(in string service_name, - in string Salome_file_name) raises(SALOME::SALOME_Exception); + in string Salome_file_name) raises(SALOME::SALOME_Exception); + + //! Indicate if the component instance provides custom information about its objects. /*! Returns true if the component provides custom information about its objects, false otherwise. Should be redefined in the certain component to return true in case of this @@ -396,6 +440,7 @@ module Engines */ boolean hasObjectInfo(); + //! Get custom information about the given object. /*! This method is used to get the custom information about the given object. Should be redefined in the certain component in case of this @@ -410,22 +455,26 @@ module Engines string getObjectInfo(in long studyId, in string entry); } ; - interface Parallel_Component : Engines::Component { - void send_parallel_proxy_object(in Object proxy_ref); + /*! + \brief Base interface of the %component that supports exporting data. + */ + interface ImportableComponent + { + /*! \brief Get a list of supported formats */ + SALOME::StringSeq GetImportableFormats(); + boolean ImportDataAs(in string format, in SALOME::GenericObj exporter); }; - /*! - A block of binary data used for file transfer. The maximum size of the - block is defined on server side. - */ + //! A block of binary data used for file transfer. The maximum size of the block is defined on server side. typedef sequence fileBlock; /*! \brief Interface of fileTransfer. The fileTransfer and fileRef interfaces provide a file transfer service between different computers. */ - interface fileTransfer + interface fileTransfer : SALOME::GenericObj { + //! Open the file transfer /*! open method returns a key (fileId) that identifies the structure (ex: C FILE), associated to the original file on the server. @@ -435,50 +484,65 @@ module Engines File. */ long open(in string fileName); + //! Open the file transfer in write mode for file fileName + /*! + \param fileName the file to copy into with putBlock + \return the id to use with putBlock + */ + long openW(in string fileName); + //! Close the file transfer /*! when the file transfer is finished, close method releases structures created by open method, identified by fileId. */ void close(in long fileId); + //! Get a file data block /*! Get successive blocks of octets from the original file. The last block is empty, and identifies the end of file. */ fileBlock getBlock(in long fileId); + + //! Put a file data block + /*! + \param fileId identification of the file obtained by openW + \param block a data block to copy into the file identified by fileId + */ + void putBlock(in long fileId, in fileBlock block); + }; - /*! - This is a file managed by a Salome_file. It contains file's name, path and status. - The status is : "present" or "notpresent". - */ + //! A file managed by a Salome_file. struct file { + //! file name string file_name; - string path; + //! path name + string path; string type; string source_file_name; - string status; + //! status ("present" or "notpresent") + string status; long node; Engines::Container container; }; - /*! - A sequence of Engines::file. - */ + //! A sequence of Engines::file. typedef sequence files; - /*! - It is the state of a Salome_file. It contains the Salome_file's name, the name - of the hdf5 file where it can be saved, the number of files managed and the information - if all the files are received. - */ + //! The state of a Salome_file. struct SfState { - string name; - string hdf5_file_name; - long number_of_files; - boolean files_ok; + //! file name + string name; + //! hdf5 file where the file can be saved + string hdf5_file_name; + //! number of files managed + long number_of_files; + //! information if all the files are received + boolean files_ok; + }; /*! \brief Interface of a Salome_file managed @@ -488,40 +552,40 @@ module Engines */ interface Salome_file : Engines::fileTransfer { + //! Load a Salome_file from a hdf5 file. /*! - Load a Salome_file from a hdf5 file. \param hdf5_file name (with path) of the hdf5_file. \exception contains informations of errors if the loading doesn't succeed. */ - void load(in string hdf5_file) raises (SALOME::SALOME_Exception); + void load(in string hdf5_file) raises (SALOME::SALOME_Exception); + //! Save a Salome_file into a hdf5_file. /*! - Save a Salome_file into a hdf5_file. \param hdf5_file name (with path) of the hdf5_file. \exception contains informations of errors if the save doesn't succeed. */ - void save(in string hdf5_file) raises (SALOME::SALOME_Exception); + void save(in string hdf5_file) raises (SALOME::SALOME_Exception); + //! Save a Salome_file into a hdf5_file. /*! - Save a Salome_file into a hdf5_file. All files that are managed - are saved into the hdf5_file + All files that are managed are saved into the hdf5_file \param hdf5_file name (with path) of the hdf5_file. \exception contains informations of errors if the save doesn't succeed. */ - void save_all(in string hdf5_file) raises (SALOME::SALOME_Exception); + void save_all(in string hdf5_file) raises (SALOME::SALOME_Exception); /**************/ + //! Add a Local file to the Salome_file. /*! - Add a Local file to the Salome_file. \param file_name name of the file with the path. @@ -529,8 +593,8 @@ module Engines */ void setLocalFile(in string comp_file_name) raises (SALOME::SALOME_Exception); + //! Add a Distributed file to the Salome_file. /*! - Add a Distributed file to the Salome_file. \param comp_file_name name of the file with the path. @@ -538,8 +602,8 @@ module Engines */ void setDistributedFile(in string comp_file_name) raises (SALOME::SALOME_Exception); + //! Connect a Salome_file with another Salome_file. /*! - Connect a Salome_file with another Salome_file. It works only if the Salome_file managed only one file \param source_Salome_file Salome_file that managed the distributed version of the file. @@ -548,8 +612,8 @@ module Engines */ void connect(in Engines::Salome_file source_Salome_file) raises (SALOME::SALOME_Exception); + //! Connect the managed file file_name to a Salome_file. /*! - Connect the managed file file_name to a Salome_file. \param file_name name of the file without the path. \param source_Salome_file Salome_file that managed the distributed version of the file. @@ -557,10 +621,10 @@ module Engines \exception raised if the file doesn't exist. */ void connectDistributedFile(in string file_name, - in Engines::Salome_file source_Salome_file) raises (SALOME::SALOME_Exception); + in Engines::Salome_file source_Salome_file) raises (SALOME::SALOME_Exception); + //! Connect the file_name with a Distributed file_name. /*! - Connect the file_name with a Distributed file_name. \param file_name name of the file without the path. \param source_file_name It's the name of the file managed by the distributed source Salome_file. @@ -568,44 +632,41 @@ module Engines \exception raised if the file doesn't exist. */ void setDistributedSourceFile(in string file_name, - in string source_file_name) raises (SALOME::SALOME_Exception); + in string source_file_name) raises (SALOME::SALOME_Exception); /**************/ + //! Get all the distributed files managed by the Salome_file and check all the local files. /*! - Get all the distributed files managed by the Salome_file and - check all the local files. \exception raised if some of the files are not ok. */ - void recvFiles() raises (SALOME::SALOME_Exception) ; + void recvFiles() raises (SALOME::SALOME_Exception) ; /**************/ + //! Remove a file of the Salome_file. /*! - Remove a file of the Salome_file. \param file_name name of the file. \exception raised if the file doesn't exist. */ - void removeFile(in string file_name) raises (SALOME::SALOME_Exception); + void removeFile(in string file_name) raises (SALOME::SALOME_Exception); - /*! - Remove all the files of the Salome_file. - */ + //! Remove all the files of the Salome_file. void removeFiles(); /**************/ + //! Get the list of the files managed by the Salome_file. /*! - Get the list of the files managed by the Salome_file. The list can be empty. */ Engines::files getFilesInfos(); + //! Get a file managed by the Salome_file. /*! - Get a file managed by the Salome_file. \param file_name the name of the file. @@ -613,16 +674,14 @@ module Engines \exception raised if the file doesn't exist. */ - Engines::file getFileInfos(in string file_name) raises (SALOME::SALOME_Exception); + Engines::file getFileInfos(in string file_name) raises (SALOME::SALOME_Exception); - /*! - Return the state of the Salome_file. - */ + //! Return the state of the Salome_file. Engines::SfState getSalome_fileState(); + //! Set the container where files are. /*! - Set the container where files are. \param container container CORBA's reference. */ @@ -648,60 +707,18 @@ module Engines */ interface fileRef { + //! the original file readonly attribute string origFileName; + //! the machine of the original file readonly attribute string refMachine; Container getContainer(); boolean addRef(in string machine, - in string fileName); + in string fileName); string getRef(in string machine); }; - - /*! \brief Interface of a Parallel_Salome_file - This interface is used by parallel components and containers. - It adds methods to enable to choose on which node of the parallel component the file has to - be received. - */ - interface Parallel_Salome_file : Engines::Salome_file { - - /*! - Set a number of node for the file. Default is the node 0. - - \param file_name name of the file. - \param node_nbr node number where the file is. - - \exception raised if the file doesn't exist. - */ - void setFileNode(in string file_name, in long node_nbr) raises (SALOME::SALOME_Exception); - - /*! - Get the number of the node that actually managed the file. - - \param file_name name of managed file. - - \return node number of the file - - \exception raised if the file doesn't exist. - */ - long getFileNode(in string file_name) raises (SALOME::SALOME_Exception); - - /*! - This method update the state of file for the Parallel_Salome_file. - - \param new_file the new state of file. - */ - Engines::Container updateFile(in Engines::file new_file); - - /*! - This method is used by the parallel implementation of recvFiles. - - \exception raised if the file cannot be ok. - */ - void recvFiles_node() raises (SALOME::SALOME_Exception); - - }; }; #endif diff --git a/idl/SALOME_Component.xml b/idl/SALOME_Component.xml index 7d27962ca..81ee92920 100644 --- a/idl/SALOME_Component.xml +++ b/idl/SALOME_Component.xml @@ -1,34 +1,30 @@ - - + Engines @@ -37,17 +33,17 @@ ping distributed + + + EngineComponent - create_component_instance + ping distributed - load_component_Library + destroy distributed - - - Component setInputFileToService distributed @@ -58,17 +54,10 @@ - Parallel_Component - - send_parallel_proxy_object - distributed - + fileTransfer Salome_file - - Parallel_Salome_file - - + diff --git a/idl/SALOME_ContainerManager.idl b/idl/SALOME_ContainerManager.idl index 7fe11b29b..b15f357f7 100644 --- a/idl/SALOME_ContainerManager.idl +++ b/idl/SALOME_ContainerManager.idl @@ -1,162 +1,340 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef _SALOME_CONTAINERMANAGER_IDL_ #define _SALOME_CONTAINERMANAGER_IDL_ #include "SALOME_Exception.idl" #include "SALOME_Component.idl" +/*! \file SALOME_ContainerManager.idl \brief interfaces for %SALOME launcher and container manager +*/ + module Engines { -/*! - Type to transmit list of machines. -*/ - typedef sequence MachineList; - typedef sequence CompoList; - typedef sequence FilesList; - typedef sequence ModulesList; +//! Type to transmit list of resources. +typedef sequence ResourceList; +//! components list +typedef sequence CompoList; +//! files list +typedef sequence FilesList; +//! modules list +typedef sequence ModulesList; -/*! - Type to describe properties of resource. -*/ -struct MachineParameters +//! A generic parameter +struct Parameter { + string name; + string value; +}; +//! Generic parameter list +typedef sequence ParameterList; + +//! Type to describe required properties of a resource +struct ResourceParameters +{ + //! resource name - manual selection + string name; + //! host name + string hostname; + //! if given required operating system + string OS; + //! if given list of components that could be loaded on a container + //! Optional if no resource are found with this constraint + CompoList componentList; + + // Permits to order resources + //! required number of proc + long nb_proc; + //! required memory size + long mem_mb; + //! required frequency + long cpu_clock; + //! required number of node + long nb_node; + //! required number of proc per node + long nb_proc_per_node; + + // Permits to configure SALOME resource management + //! resource management policy : first, cycl, altcycl or best (can be extended) + string policy; + //! restricted list of resources to search in + ResourceList resList; +}; + +//! Type to describe required properties of a container +struct ContainerParameters +{ + //! container name if given else automatic string container_name; + + //! creation mode for GiveContainer if given else automatic + /*!start creates a new container + * get try to find an existing container + * getorstart use an existing container if it exists or creates a new one + */ + string mode; + + //! container working directory if given else automatic + string workingdir; + + // Parallel part + //! Number of proc of a parallel container + long nb_proc; + //! if true start a MPI container + boolean isMPI; + //! PaCO specific informations + string parallelLib; + + //! Parameters to choose a resource + ResourceParameters resource_params; +}; + +//! Type to describe a resource +struct ResourceDefinition +{ + //! name + string name; + //! hostname string hostname; - string alias; + //! protocol to connect to the resource + //! protocol used to start a remote container (ssh or rsh) string protocol; + //! login name to use to start a remote container string username; + //! salome application to use to start a remote container string applipath; - ModulesList modList; + //! list of available components + CompoList componentList; + //! Type of resource: interactive or batch + string mode; + + //! operating system string OS; + //! memory size per node long mem_mb; + //! frequency long cpu_clock; - long nb_proc_per_node; + //! number of node long nb_node; - boolean isMPI; - string mpiImpl; + //! number of proc per node + long nb_proc_per_node; + //! batch system string batch; - string workingdir; + //! MPI implementation + string mpiImpl; + //! if the resource is a cluster: + //! internal protocol to use to start a remote container (ssh or rsh) on the cluster + string iprotocol; - // PaCO specific informations - string parallelLib; - long nb_component_nodes; + //! Specify if the resource is a cluster head; + boolean is_cluster_head; + + //! Predefined working directory on the resource + string working_directory; }; -/*! - exception thrown if a computer is not found in the catalog -*/ - exception NotFound {}; +//! exception thrown if a computer is not found in the catalog +exception NotFound {}; - enum policy {P_FIRST,P_CYCL,P_BEST}; - typedef policy ResPolicy; +struct JobParameters +{ + string job_name; + //! Job Type - Could be equal to "command" or "yacs_file" or "python_salome" + string job_type; -/*! - Structure used for Salome Batch Job parameters -*/ -struct BatchParameters + // Common values + string job_file; + string env_file; + FilesList in_files; + FilesList out_files; + string work_directory; + string local_directory; + string result_directory; + + /*! Time for the batch (has to be like this : hh:mm) - Could be empty, in + this case, default value of the selected resource will be used. + */ + string maximum_duration; + + // Memory is expressed in megabytes -> mem_mb + // Number of Processors -> nb_proc + ResourceParameters resource_required; + + /*! + Name of the batch queue choosed - optional + */ + string queue; + + /*! + Specific parameters for each type of job - optional + */ + Engines::ParameterList specific_parameters; +}; + +struct JobDescription +{ + long job_id; + Engines::JobParameters job_parameters; +}; +typedef sequence JobsList; + +interface SalomeLauncherObserver { - string batch_directory; // Where batch command will be launched - // and log files will be created - string expected_during_time; // Time for the batch - // has to be like this : hh:mm - string mem; // Minimum of memory needed - // has to be like : 32gb or 512mb - long nb_proc; // Number of processors requested + void notify(in string event_name, in string event_data); }; /*! \brief Interface of the %salomelauncher This interface is used for interaction with the unique instance of SalomeLauncher */ - interface SalomeLauncher - { - long submitJob( in string xmlExecuteFile, - in string clusterName ) raises (SALOME::SALOME_Exception); - long submitSalomeJob( in string fileToExecute, - in FilesList filesToExport, - in FilesList filesToImport, - in BatchParameters batch_params, - in MachineParameters params ) raises (SALOME::SALOME_Exception); - string queryJob( in long jobId, in MachineParameters params ) raises (SALOME::SALOME_Exception); - void deleteJob( in long jobId, in MachineParameters params ) raises (SALOME::SALOME_Exception); - void getResultsJob( in string directory, in long jobId, in MachineParameters params ) raises (SALOME::SALOME_Exception); - - boolean testBatch(in MachineParameters params) raises (SALOME::SALOME_Exception); - - void Shutdown(); - - long getPID(); - - } ; - -/*! \brief Interface of the %containerManager - This interface is used for interaction with the unique instance - of ContainerManager -*/ - interface ContainerManager - { - Container FindOrStartContainer( in MachineParameters params, - in MachineList possibleComputers); - - /*! - This operation launches a PaCO++ container. +interface SalomeLauncher +{ + // Main methods + long createJob (in Engines::JobParameters job_parameters) raises (SALOME::SALOME_Exception); + void launchJob (in long job_id) raises (SALOME::SALOME_Exception); + string getJobState (in long job_id) raises (SALOME::SALOME_Exception); + void getJobResults(in long job_id, in string directory) raises (SALOME::SALOME_Exception); + boolean getJobDumpState(in long job_id, in string directory) raises (SALOME::SALOME_Exception); + void stopJob (in long job_id) raises (SALOME::SALOME_Exception); + void removeJob (in long job_id) raises (SALOME::SALOME_Exception); - \param Description of the container resquested. - \param List of computers ressources. + // Useful methods + long createJobWithFile(in string xmlJobFile, in string clusterName) raises (SALOME::SALOME_Exception); + boolean testBatch (in ResourceParameters params) raises (SALOME::SALOME_Exception); - \return Container's CORBA reference. - */ - Container FindOrStartParallelContainer( in MachineParameters params, - in MachineList possibleComputers); + // SALOME kernel service methods + void Shutdown(); + long getPID(); - Container StartContainer( in MachineParameters params, - in ResPolicy policy, - in CompoList componentList ); + // Observer and introspection methods + void addObserver(in Engines::SalomeLauncherObserver observer); + void removeObserver(in Engines::SalomeLauncherObserver observer); + Engines::JobsList getJobsList(); + Engines::JobParameters getJobParameters(in long job_id) raises (SALOME::SALOME_Exception); - Container GiveContainer( in MachineParameters params, - in ResPolicy policy, - in CompoList componentList ); + // Save and load methods + void loadJobs(in string jobs_file) raises (SALOME::SALOME_Exception); + void saveJobs(in string jobs_file) raises (SALOME::SALOME_Exception); - void ShutdownContainers(); +}; + +/*! \brief Interface of the %containerManager + This interface is used for interaction with the unique instance + of ContainerManager +*/ +interface ContainerManager +{ + //! GiveContainer - use mode parameter of ContainerParameters to configure + //! how this method works + //! Currently: get, start, getorstart, findorstart, find + Container GiveContainer(in ContainerParameters params) raises (SALOME::SALOME_Exception); - } ; + //! Shutdown all containers that have been launched by the container manager + void ShutdownContainers(); +} ; /*! \brief Interface of the %resourcesManager This interface is used for interaction with the unique instance of ResourcesManager */ - interface ResourcesManager - { - string FindFirst(in MachineList possibleComputers); +interface ResourcesManager +{ + //! Find first available resource in a resources list + string FindFirst(in ResourceList possibleResources); - MachineList GetFittingResources( in MachineParameters params, - in CompoList componentList ) - raises (SALOME::SALOME_Exception); + //! Find best available computer according to policy in a computers list + string Find(in string policy, in ResourceList possibleResources); - MachineParameters GetMachineParameters( in string hostname ); + //! Get a list of resources that are best suited to launch a container given constraints + /*! + The constraints are resource constraints (params) and components constraints (componentList) + */ + ResourceList GetFittingResources(in ResourceParameters params) raises (SALOME::SALOME_Exception); - } ; + //! Get definition of a resource + ResourceDefinition GetResourceDefinition(in string name); + + //! Add a new resource to the resource_manager + /*! + write -> true, resource manager will add it into a xml_file + xml_file -> could be empty, in this case if write is true, resource manager will write + the resource in its first ResourceCatalog file + */ + void AddResource(in ResourceDefinition new_resource, in boolean write, in string xml_file) + raises (SALOME::SALOME_Exception); + + //! Remove a new resource to the resource_manager + /*! + write -> true, resource manager will write a new xml_file + xml_file -> could be empty, in this case if write is true, resource manager will write + the resource in its first ResourceCatalog file + */ + void RemoveResource(in string resource_name, in boolean write, in string xml_file) + raises (SALOME::SALOME_Exception); +}; + + +// For compatibility - will be erased on SALOME 6 +typedef sequence MachineList; +//! Type to describe required properties of a container. +struct MachineParameters +{ + //! container name if given else automatic + string container_name; + //! host name if given else automatic + string hostname; + //! if given list of components that could be loaded on the container + CompoList componentList; + //! if given restricted list of machines to search in + MachineList computerList; + //! required operating system + string OS; + //! required memory size + long mem_mb; + //! required frequency + long cpu_clock; + //! required number of proc per node + long nb_proc_per_node; + //! required number of node + long nb_node; + //! if true start a MPI container + boolean isMPI; + //! container working directory + string workingdir; + //! creation mode for GiveContainer. + /*!start creates a new container + * get try to find an existing container + * getorstart use an existing container if it exists or creates a new one + */ + string mode; + //! resource management policy : first, cycl, altcycl or best (can be extended) + string policy; + + //! PaCO specific informations + string parallelLib; + long nb_component_nodes; +}; }; #endif diff --git a/idl/SALOME_Exception.idl b/idl/SALOME_Exception.idl index e338e4220..19a25a46d 100644 --- a/idl/SALOME_Exception.idl +++ b/idl/SALOME_Exception.idl @@ -1,30 +1,33 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOME_Exception.idl // Author : Paul RASCLE, EDF // $Header$ // -/*! \file SALOME_Exception.idl This file contains the objects defining the main exception used -in %SALOME application. The idl SALOME_Exception provides a generic CORBA exception for SALOME, +/*! \file SALOME_Exception.idl \brief This file contains the objects defining the main exception used +in %SALOME application. + +The idl SALOME_Exception provides a generic CORBA exception for SALOME, with an attribute that gives an exception type,a message, plus optional source file name and line number. This idl is intended to serve for all user CORBA exceptions raised in SALOME code, as IDL specification does not support exception inheritance. So, all the user CORBA exceptions from SALOME could be @@ -34,25 +37,21 @@ handled in a single catch. #ifndef _SALOME_EXCEPTION_IDL_ #define _SALOME_EXCEPTION_IDL_ -/*! -Module %SALOME regroups all idl definitions for %SALOME Kernel component +/*! \brief +Module %SALOME contains all base interfaces of %SALOME Kernel + */ module SALOME { -/*! -This enumeration contains the elements indicating the type of the exception -which can be raised during %SALOME session. -*/ +//! This enumeration contains the elements indicating the type of the exception which can be raised during %SALOME session. enum ExceptionType { COMM, /*!< Communication problem */ BAD_PARAM, /*!< Bad User parameters */ INTERNAL_ERROR /*!< Application level problem, irrecoverable */ }; -/*! -This struct contains a set of fields defining the structure of the exception. -*/ +//! This struct contains a set of fields defining the structure of the exception. struct ExceptionStruct { ExceptionType type; /*! + + + SALOME + + GenericObj + + + + diff --git a/idl/SALOME_MPIContainer.idl b/idl/SALOME_MPIContainer.idl index 6bcf09a43..28859187a 100644 --- a/idl/SALOME_MPIContainer.idl +++ b/idl/SALOME_MPIContainer.idl @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOME_MPIContainer.idl // #ifndef _SALOME_MPICONTAINER_IDL_ @@ -27,16 +28,18 @@ #include "SALOME_Component.idl" #include "SALOME_MPIObject.idl" +/*! \file SALOME_MPIContainer.idl \brief interfaces for parallel container +*/ + module Engines { + /*! \brief Interface of the MPI parallel container. + This interface defines the process of loading and registration + of new components in %SALOME application + */ + interface MPIContainer:Container,MPIObject { - // asynchronous version to load and remove parallel component in parallel - oneway void Asload_component_Library(in string componentName); - oneway void Ascreate_component_instance(in string componentName,in long studyId); - oneway void Asload_impl(in string nameToRegister, in string componentName); - oneway void Asremove_impl(in Component component_i); - oneway void Asfinalize_removal(); }; } ; diff --git a/idl/SALOME_MPIObject.idl b/idl/SALOME_MPIObject.idl index ae7311128..f1fbec00e 100644 --- a/idl/SALOME_MPIObject.idl +++ b/idl/SALOME_MPIObject.idl @@ -1,32 +1,38 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File : MPIObject.idl + +// File : SALOME_MPIObject.idl // #ifndef _SALOME_MPIOBJECT_IDL_ #define _SALOME_MPIOBJECT_IDL_ +/*! \file SALOME_MPIObject.idl \brief interfaces for parallel (MPI) objects +*/ + module Engines { typedef sequence IORTab; + /*! \brief Interface of a parallel %object for the MPI parallel container. + */ interface MPIObject { attribute IORTab tior; diff --git a/idl/SALOME_ModuleCatalog.idl b/idl/SALOME_ModuleCatalog.idl index 683e93943..8c8c064e9 100644 --- a/idl/SALOME_ModuleCatalog.idl +++ b/idl/SALOME_ModuleCatalog.idl @@ -1,42 +1,42 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOME_ModuleCatalog.idl // Author : Estelle Deville // $Header$ // -/*! \file SALOME_ModuleCatalog.idl This file conatins a set of interfaces used for - creation of the catalog of components in %SALOME application +/*! \file SALOME_ModuleCatalog.idl \brief interfaces used for + getting information from module catalog in %SALOME application */ -/*! -The main package of interfaces used for creation of the module catalog in %SALOME application. +/*! \brief +The main package of interfaces used for the module catalog in %SALOME application. + Module catalog allows to manage components of %SALOME application, to call specified in the xml files interfaces with the help of AComponent interface. */ module SALOME_ModuleCatalog { - // Type Definitions -/*! -This enumeration contains a current set of definitions of the components integrated +/*! \brief This enumeration contains a current set of definitions of the components integrated into %SALOME application. */ enum ComponentType { GEOM, /*! ListOfServicesParameter; +//! The list of datastream parameters of service. typedef sequence ListOfServicesDataStreamParameter; +//! a string list typedef sequence ListOfString; + +//! enumeration to define data types used by services enum TypeKind { NONE , - Dble , - Int , - Str , - Bool , - Objref , - Seq , - Array , - Struc + Dble , /*!< a double */ + Int , /*!< an integer */ + Str , /*!< a string */ + Bool , /*!< a boolean */ + Objref , /*!< an object reference */ + Seq , /*!< a sequence of a content type */ + Array , /*!< an array */ + Struc /*!< a structure with named members */ }; + +//! struct to define members of a Struc TypeKind struct MemberDefinition { - string name; /*! Name of the member */ - string type; /*! Type of the member */ + string name; /*!< Member name */ + string type; /*!< Member type name */ }; +//! List of member definitions in a structure typedef sequence ListOfMemberDefinition; -/*! - * Struct to get the definition of types used in Salome catalogs - */ + +//! Struct to get the definition of types used in Salome catalogs struct TypeDefinition { - string name; /*! Name of the type */ - TypeKind kind; /*! Kind of the type.*/ - string id; /*! id (if needed) */ - string content; /*! Content type (if needed) */ - ListOfString bases; /*! Content type (if needed) */ - ListOfMemberDefinition members; /*! Members types (if needed) */ + string name; /*!< Type name*/ + TypeKind kind; /*!< Type kind.*/ + string id; /*!< id (if needed) */ + string content; /*!< Content type (if needed) */ + ListOfString bases; /*!< base types (if needed) */ + ListOfMemberDefinition members; /*!< Member types (if needed) */ }; +//! list of type definitions typedef sequence ListOfTypeDefinition; -/*! -This struct contains fields completely defining each service. -*/ - +//! This struct contains fields defining each service. struct Service { string ServiceName; /*! ListOfInterfaceService; -/*! -List of services. -*/ +//! List of services. typedef sequence ListOfServices ; -/*! -This struct contains fields defining each interface. -*/ +//! This struct contains fields defining each interface. struct DefinitionInterface { string interfacename ; /*! ListOfDefInterface ; -/*! -List of names of interfaces. -*/ +//! List of interface names. typedef sequence ListOfInterfaces ; -/*! -PathPrefix : association of a machine name and +/*! \brief PathPrefix : association of a machine name and a path to a component */ struct PathPrefix { @@ -160,24 +149,18 @@ a path to a component string path; }; -/*! -List of path prefixes -*/ +//! List of path prefixes typedef sequence PathPrefixes; -/*! -Implementation type -*/ +//! Component implementation type enum ImplType { - SO, /* component implemented as a dynamic library loadable with dlopen */ - PY, /* component implemented as a python module loadable with import */ - EXE, /* component implemented as an executable */ - CEXE /* component to be loaded by a container which executable is given in the catalog */ + SO, /*!< component implemented as a dynamic library loadable with dlopen */ + PY, /*!< component implemented as a python module loadable with import */ + EXE, /*!< component implemented as an executable */ + CEXE /*!< component to be loaded by a container which executable is given in the catalog */ } ; -/*! -Description of a component -*/ +//! Description of a component struct ComponentDef { ComponentType type; @@ -192,17 +175,11 @@ Description of a component PathPrefixes paths; }; -/*! -List of names of components. -*/ +//! List of component names. typedef sequence ListOfComponents ; -/*! -List of names of computers. -*/ +//! List of computer names. typedef sequence ListOfComputers ; -/*! -This struct contains GUI elements used for representation of the module in %IAPP component. -*/ +//! This struct contains GUI elements used for representation of the module in %IAPP component. struct IAPP_Affich { string modulename; /*! ListOfIAPP_Affich ; -/*! - This exception is raised when a %component, a %service or a % pathPrefix is not found. -*/ +//! This exception is raised when a %component, a %service or a %pathPrefix is not found. exception NotFound { string what ; /*!If the specified interface doesn't exist, Notfound exception is thrown \param interfacename Name of the interface \return Required interface */ DefinitionInterface GetInterface(in string interfacename) raises(NotFound); - // GetServiceList : operation to get a list of the services name of - // an interface of a component - /*! - Gets the list of names of services of a definite interface belonging to the component. + /*! \brief Get the list of service names of an interface belonging to the component. + \note
        If the specified interface doesn't exist, Notfound exception is thrown. \param interfacename Name of the interface \return List of services of the required interface @@ -260,77 +229,66 @@ List of pair GUI elements (component name, component icone) ListOfServices GetServiceList(in string interfacename) raises(NotFound); - // GetService : operation to get one service of an interface of a component - - /*! - Gets a definite service of an interface of the component. + /*! \brief Get a service of an interface of the component. + \note
        If the required service or the specified interface don't exist, Notfound exception is thrown. \param interfacename Name of the interface \param servicename Name of the service \return Required service */ - Service GetService(in string interfacename, in string servicename) raises(NotFound); - // GetDefaultService : operation to get the default service - // of an interface of a component -/*! - Gets the default service of an interface of the component. +/*! \brief Get the default service of an interface of the component. + \note
        If the required service or the specified interface don't exist, Notfound exception is thrown. \param interfacename Name of the interface \return Required service */ - Service GetDefaultService(in string interfacename) raises(NotFound); - // GetPathPrefix : operation to get the PathPrefix of a computer - /*! - Gets the prefix path of the computer containing the %component. + /*! \brief Get the prefix path of the computer containing the %component. + \note
        If the required computer doesn't exist, Notfound exception is thrown \param machinename Name of the machine \return Prefix path */ - string GetPathPrefix(in string machinename) raises(NotFound); -/*! - Get the constraint affected to the component - (to be resolved by LifeCycle for the computer choice) +/*! \brief Get the constraint affected to the component + + constraint to be resolved by LifeCycle for the computer choice */ readonly attribute string constraint ; -/*! -Get the name of the component +/*! \brief Get the component name */ readonly attribute string componentname; -/*! -Get the user name of the component +/*! \brief Get the user name of the component */ readonly attribute string componentusername; -/*! -Ask whether the component is multistudy or not +/*! \brief Get whether the component is multistudy or not */ readonly attribute boolean multistudy; -/*! -Ask the type of the component +/*! \brief Get the type of the component */ readonly attribute ComponentType component_type ; -/*! -Gets the icone of the component (for IAPP) +/*! \brief Get the icone of the component (for IAPP) */ readonly attribute string component_icone; -/*! -Gets the implementation type of the component : C++ (dyn lib), Python (module) or executable +/*! \brief Get the implementation type of the component + + C++ (dyn lib), Python (module) or executable */ readonly attribute ImplType implementation_type; -/*! -Gets the implementation name of the component : name of the dyn lib or the python module or the executable +/*! \brief Get the implementation name of the component + + It's the name of the dyn lib or the python module or the executable if the default naming scheme is not convenient. */ readonly attribute string implementation_name; @@ -338,69 +296,61 @@ if the default naming scheme is not convenient. /*! \brief %Module catalog interface -This interface is used for creation of the module catalog in %SALOME application. +Interface to get information about components from the module catalog in %SALOME application. */ interface ModuleCatalog { +/*! \brief ping the ModuleCatalog server +*/ void ping(); -/*! - Returns the PID of the server +/*! \brief Returns the PID of the ModuleCatalog server */ long getPID(); -/*! - Shutdown the ModuleCatalog process. +/*! \brief Shutdown the ModuleCatalog server */ oneway void ShutdownWithExit(); -/*! - * Get the types of the catalog +/*! \brief Get the types of the catalog */ ListOfTypeDefinition GetTypes(); -/*! - Gets a list of names of computers of the catalog +/*! \brief Get a list of computer names of the catalog */ ListOfComputers GetComputerList(); -/*! -Gets the %PathPrefix of a computer -*/ +//! Get the %PathPrefix of a computer string GetPathPrefix(in string machinename) raises(NotFound); -/*! - Gets a list of names of components of the catalog -*/ + +//! Get a list of component names of the catalog ListOfComponents GetComponentList(); -/*! -Gets a list of pair GUI elements (component name, component icone) + +/*! \brief Get a list of pair GUI elements (component name, component icone) used for representation of the module in %IAPP component. */ - ListOfIAPP_Affich GetComponentIconeList(); -/*! -Gets a list of names of components of a particular type, which belong to this catalog. + +/*! \brief Get a list of component names of a particular type, which belong to this catalog. */ - // GetComponentList : operation to get a list of the components name of - // a particular type of the catalog ListOfComponents GetTypedComponentList(in ComponentType _component_type); -/*! -Gets one component of the catalog. +/*! \brief Get one component of the catalog. */ Acomponent GetComponent(in string componentname) raises(NotFound); -/*! -Gets the description of a component of the catalog. +/*! \brief Get the description of a component of the catalog. */ ComponentDef GetComponentInfo(in string componentName) raises(NotFound); -/*! -Reads a xml file and imports new components from this file. +/*! \brief Read a xml file and import new components from this file. + New components replace existing components with the same name. */ void ImportXmlCatalogFile(in string filename) raises(NotFound); +/*! \brief Shutdown the module catalog server +*/ void shutdown(); } ; }; diff --git a/idl/SALOME_PACOExtension.idl b/idl/SALOME_PACOExtension.idl new file mode 100644 index 000000000..29461a5cc --- /dev/null +++ b/idl/SALOME_PACOExtension.idl @@ -0,0 +1,116 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// +// File : SALOME_PACOExtension.idl +// Author : André RIBES, EDF + +#ifndef _SALOME_PACOExtension_IDL_ +#define _SALOME_PACOExtension_IDL_ + +/*! \file SALOME_PACOExtension.idl + \brief Interfaces for Parallel Component and Container using PaCO++ +*/ + +#include "SALOME_Component.idl" +#include "DSC_Engines.idl" + +module Engines +{ + interface Parallel_Component : Engines::EngineComponent { + void send_parallel_proxy_object(in Object proxy_ref); + }; + + interface PACO_Container : Engines::Container { + // Replicated Method used by the proxy to create + // a PACO Component + void create_paco_component_node_instance(in string registeredName, + in string proxy_containerName, + in long studyId) raises(SALOME::SALOME_Exception); + + void updateInstanceNumber(); + }; + +/*--------------------------------------------------------------------------------------------*/ + + /*! \brief Interface of a Parallel_DSC component. + This interface defines the operations needed to add a paco++ port + into a parallel DSC component. + */ + interface Parallel_DSC : Engines::Superv_Component, Engines::Parallel_Component { + + /*! + This operation gives the proxy node of a paco++ port to all the nodes. + Only a node of the parallel component is going to add a proxy object + with an internal method. + + \param ref provides proxy port's reference. + \param provides_port_name provides port's name. + + \see Engines_ParallelDSC_i::add_parallel_provides_proxy_port + */ + void set_paco_proxy(in Object ref, + in string provides_port_name, + in Ports::PortProperties port_prop); + + }; + + /*! \brief Interface of a Parallel_Salome_file + This interface is used by parallel components and containers. + It adds methods to enable to choose on which node of the parallel component the file has to + be received. + */ + interface Parallel_Salome_file : Engines::Salome_file { + + /*! + Set a number of node for the file. Default is the node 0. + + \param file_name name of the file. + \param node_nbr node number where the file is. + + \exception raised if the file doesn't exist. + */ + void setFileNode(in string file_name, in long node_nbr) raises (SALOME::SALOME_Exception); + + /*! + Get the number of the node that actually managed the file. + + \param file_name name of managed file. + + \return node number of the file + + \exception raised if the file doesn't exist. + */ + long getFileNode(in string file_name) raises (SALOME::SALOME_Exception); + + /*! + This method update the state of file for the Parallel_Salome_file. + + \param new_file the new state of file. + */ + Engines::Container updateFile(in Engines::file new_file); + + /*! + This method is used by the parallel implementation of recvFiles. + + \exception raised if the file cannot be ok. + */ + void recvFiles_node() raises (SALOME::SALOME_Exception); + }; +}; + +#endif diff --git a/idl/SALOME_PACOExtension.xml b/idl/SALOME_PACOExtension.xml new file mode 100644 index 000000000..e5263388b --- /dev/null +++ b/idl/SALOME_PACOExtension.xml @@ -0,0 +1,56 @@ + + + + + Engines + + Parallel_Component + + send_parallel_proxy_object + distributed + + + + PACO_Container + + updateInstanceNumber + distributed + + + + Parallel_DSC + + set_paco_proxy + distributed + + + + Parallel_Salome_file + + + + diff --git a/idl/SALOME_ParamPorts.idl b/idl/SALOME_ParamPorts.idl new file mode 100644 index 000000000..ab00fde08 --- /dev/null +++ b/idl/SALOME_ParamPorts.idl @@ -0,0 +1,41 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +// File : SALOME_ParamPorts.idl +// Author : Andre RIBES, EDF +// +#ifndef _SALOME_ParamPorts_IDL_ +#define _SALOME_ParamPorts_IDL_ + +#include "SALOME_Ports.idl" + +module Ports +{ + /*! \brief Interface of a port for parametric application + This interface defines a Data_Port that sends a vector of + double that are distributed along the different processor + and returns a vector of double for the results + */ + interface Param_Double_Port : Ports::Data_Port { + typedef sequence seq_double; + void put(in Ports::Param_Double_Port::seq_double param_data); + void get_results(out Ports::Param_Double_Port::seq_double param_results); + }; +}; +#endif diff --git a/idl/SALOME_ParamPorts.xml b/idl/SALOME_ParamPorts.xml new file mode 100644 index 000000000..0f4835b3a --- /dev/null +++ b/idl/SALOME_ParamPorts.xml @@ -0,0 +1,55 @@ + + + + + Ports + + Param_Double_Port + + put + distributed + + param_data + + BasicBC + + + + + get_results + distributed + + param_results + + GaBro + + + + + + + diff --git a/idl/SALOME_Parametric.idl b/idl/SALOME_Parametric.idl new file mode 100644 index 000000000..91ee40674 --- /dev/null +++ b/idl/SALOME_Parametric.idl @@ -0,0 +1,92 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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 +// + +// File : SALOME_Parametric.idl +// Author : Renaud BARATE, EDF R&D +// + +#ifndef _SALOME_Parametric_IDL_ +#define _SALOME_Parametric_IDL_ + +/*! \brief + This module contains type definitions for the communication between + supervision codes and computation codes in parametric studies. +*/ +module SALOME_TYPES +{ +/*! \brief Structure describing a parameter that can be used for specific + information exchange between the codes. +*/ + struct Parameter { + string name; + string value; + }; + +/*! \brief List of parameters. +*/ + typedef sequence ParameterList; + +/*! \brief Type representing the value of a single variable exchanged between + the codes (e.g. a force "F"). As the variables may be vectors (or even + matrices), their value is represented as a sequence of real numbers. +*/ + typedef sequence Variable; + +/*! \brief Type representing a state, i.e. a set containing the values of all + the variables of interest. +*/ + typedef sequence VariableSequence; + +/*! \brief Type representing a set of states. +*/ + typedef sequence StateSequence; + +/*! \brief Type representing a time sequence, with a set of states for each + time step. Hence it is represented as a sequence of StateSequence. +*/ + typedef sequence TimeSequence; + +/*! \brief List of variable names. +*/ + typedef sequence VarList; + +/*! \brief Structure describing the input of a computation code. +*/ + struct ParametricInput { + VarList inputVarList; + VarList outputVarList; + TimeSequence inputValues; + ParameterList specificParameters; + }; + +/*! \brief Structure describing the output of a computation code. +*/ + struct ParametricOutput { + TimeSequence outputValues; + ParameterList specificOutputInfos; + long returnCode; + string errorMessage; + }; + +}; + +#endif diff --git a/idl/SALOME_Ports.idl b/idl/SALOME_Ports.idl index 4408561bc..ae9780dca 100644 --- a/idl/SALOME_Ports.idl +++ b/idl/SALOME_Ports.idl @@ -1,36 +1,38 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOME_Ports.idl // Author : Andre RIBES, EDF -// $Header: // #ifndef _SALOME_PORTS_IDL_ #define _SALOME_PORTS_IDL_ -/*! \file - This file contains the IDL declarations of the kind of ports provided by the - SALOME component model. +/*! \file SALOME_Ports.idl + \brief This file contains the IDL base interfaces for ports in the SALOME component model. */ +/*! \brief module that contains interfaces to define the kind of ports provided by the +SALOME component model. +*/ module Ports { /*! \brief Interface of a DSC Port. @@ -68,21 +70,13 @@ module Ports { */ interface Data_And_Control_Port : Ports::Port {}; - /*! - This exception indicates that the property doesn't not exist. - */ + //! This exception indicates that the property doesn't not exist. exception NotDefined {}; - /*! - This exception indicates that the given value to the property is not - of a good type. - */ + //! This exception indicates that the given value to the property is not of a good type. exception BadType {}; - /*! - This exception indicates that the given value to the property is not - authorized. - */ + //! This exception indicates that the given value to the property is not authorized. exception BadValue {}; /*! \brief Interface of a PortProperties. @@ -92,8 +86,8 @@ module Ports { */ interface PortProperties { + //! This operation permits to set a value of a property. /*! - This operation permits to set a value of a property. \param name property's name. \param value value of the property. @@ -105,8 +99,8 @@ module Ports { Ports::BadValue, Ports::NotDefined); + //! This operation permits to get property's value. /*! - This operation permits to get property's value. \param name property's name. \return value of the property. @@ -122,6 +116,7 @@ module Ports { a port in the DSC_User programming model. */ interface Data_Short_Port : Ports::Data_Port { + //! this operation can be used by a uses port to send me a short void put(in short data); }; }; diff --git a/idl/SALOME_Ports.xml b/idl/SALOME_Ports.xml index 1e5d82f30..68081219b 100644 --- a/idl/SALOME_Ports.xml +++ b/idl/SALOME_Ports.xml @@ -1,34 +1,30 @@ - - + Ports @@ -37,5 +33,8 @@ Control_Port + + Data_Port + - + diff --git a/idl/SALOME_PyNode.idl b/idl/SALOME_PyNode.idl new file mode 100644 index 000000000..d33636ce7 --- /dev/null +++ b/idl/SALOME_PyNode.idl @@ -0,0 +1,69 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +// File : SALOME_PyNode.idl +// Author : Christian CAREMOLI, EDF +// $Header: +// +#ifndef _SALOME_PYNODE_IDL_ +#define _SALOME_PYNODE_IDL_ + +#include "SALOME_GenericObj.idl" +#include "SALOME_Exception.idl" + +/*! \file SALOME_PyNode.idl \brief interface for remote python execution +*/ + +/*! \brief +This is a package of interfaces used for executing Python code on remote container +*/ +module Engines +{ + typedef sequence pickledArgs; + typedef sequence listofstring; + + interface PyNode : SALOME::GenericObj + { + + /*! \brief execute a python function defined in the node + + \param functionName the python function defined in the node to execute + \param inargs input argument values (tuple,dict) provided as a python pickle + \return output argument values (tuple) as a python pickle + */ + pickledArgs execute(in string functionName,in pickledArgs inargs) raises (SALOME::SALOME_Exception); + + } ; + + interface PyScriptNode : SALOME::GenericObj + { + + /*! \brief execute a python script defined in the node + + \param outargsname output argument names + \param inargs input argument values (dict) provided as a python pickle + \return output argument values (tuple) as a python pickle + */ + pickledArgs execute(in listofstring outargsname, in pickledArgs inargs) raises (SALOME::SALOME_Exception); + + } ; + +}; + +#endif diff --git a/idl/SALOME_Registry.idl b/idl/SALOME_Registry.idl index 22e2f4700..c9bfd752e 100644 --- a/idl/SALOME_Registry.idl +++ b/idl/SALOME_Registry.idl @@ -1,31 +1,38 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOME_Registry.idl // # ifndef __registry_idl__ # define __registry_idl__ +/*! \file SALOME_Registry.idl \brief interfaces for %SALOME registry +*/ + +/*! \brief module that provides interface to %SALOME registry +*/ module Registry { + //! a struct to collect informations about servers (processes) struct Infos { string name; @@ -43,20 +50,33 @@ module Registry string ior; // client }; + //! a list of informations typedef sequence AllInfos; +/*! \brief interface to use %SALOME registry +*/ interface Components { + //! check if registry is running void ping(); - long getPID(); + //! Get the pid of registry server + long getPID(); + //! Add one information to the registry unsigned long add ( in Infos lesInfos ) ; + //! Remove an information from the registry void remove ( in unsigned long id ) ; + //! Get the size of the registry unsigned long size() ; + //! Get all informations from registry AllInfos getall () ; + //! Get history information from registry AllInfos history () ; + //! Stop the registry (hard exit) oneway void end() ; + //! Say hello to registry from process id oneway void hello( in unsigned long id ) ; - void Shutdown(); + //! Shutdown registry server (CORBA exit) + void Shutdown(); } ; } ; diff --git a/idl/SALOME_RessourcesCatalog.idl b/idl/SALOME_RessourcesCatalog.idl index 42f657d05..ff254ef94 100755 --- a/idl/SALOME_RessourcesCatalog.idl +++ b/idl/SALOME_RessourcesCatalog.idl @@ -1,64 +1,90 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOME_RessourcesCatalog.idl // Author : Estelle Deville // $Header$ // +/*! \file SALOME_RessourcesCatalog.idl \brief interfaces for %SALOME Resources Catalog +*/ + +/*! \brief module that provides interface to manage the Resources Catalog of %SALOME +*/ module SALOME_RessourcesCatalog{ - // Type Definitions - //Proc_info : information about a processor + //! Information about a processor struct proc_info{ + //! processor number long number; + //! model name string model_name; + //! frequency in MHz float cpu_mhz; + //! cache size in MB float cache_size; }; + //! a list of processor informations typedef sequence ListOfProc; - //Computer_info : information about a computer - // Os and informations about processors + //! Information about a computer + /*! + Os and informations about processors + */ struct computer_info{ + //! computer name string name; + //! OS name string OS; + //! OS version string OS_version; + //! processors list ListOfProc procs; }; - enum ContainerType {Cpp, python, NP}; + //! Container type + enum ContainerType { + Cpp, /*!< C++ container */ + python, /*!< python container */ + NP /*!< NP container */ + }; + //! a list of container types typedef sequence ListOfContainerType; + //! a list of computer names typedef sequence ListOfComputer; - // exception thrown if a computer is not found in the catalog - + //! exception thrown if a computer is not found in the catalog exception NotFound {}; //------------------------------------------------------------------ - //Interface +/*! \brief interface to get information about Resources +*/ interface RessourcesCatalog { + //! Get the catalog computers list ListOfComputer GetComputerList(); + //! Get the container types list for a given computer ListOfContainerType GetContainerTypeList (in string computer) raises(NotFound); + //! Get computer information for a given computer computer_info GetComputerInfo(in string computer) raises(NotFound); }; }; diff --git a/idl/SALOME_Session.idl b/idl/SALOME_Session.idl index 2b663a488..48bbdada1 100644 --- a/idl/SALOME_Session.idl +++ b/idl/SALOME_Session.idl @@ -1,66 +1,64 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : SALOME_Session.idl // Author : Paul RASCLE, EDF -// $Header$ -// + #include "SALOME_Component.idl" -/*! - This package contains interfaces used for management of the session in %SALOME application. -*/ +/*! \file SALOME_Session.idl \brief file that contains interface of the session + */ + module SALOME { /*! \brief State of the session - + This enumeration contains values defining the state of the session - -*/ - enum SessionState {asleep, /*! Session is inactive */ - running /*! Session is running */ + +*/ + enum SessionState {asleep, /*!< Session is inactive */ + running, /*!< Session is running */ + shutdown /*!< Session is shutting down */ } ; /*! \brief %Session State and Statistics - - This struct contains a field list with general information about the session + This struct contains a field list with general information about the session */ - + struct StatSession { /*! \brief State of the session - + It can be: - * -# asleep : no running study - * -# running : one or more running studies -*/ - SessionState state ; -/*! Number of running studies + -# asleep : no running study + -# running : one or more running studies */ + SessionState state ; + //! Number of running studies short runningStudies ; -/*! It is True if GUI is active in the session -*/ + //! It is True if GUI is active in the session boolean activeGUI ; } ; + /*! \brief Interface of the session The %session Server launches and stops GUI (Graphical User Interface). @@ -69,52 +67,39 @@ module SALOME interface Session { -/*! - This exception is raised when trying to stop the %session with active GUI -*/ +//! This exception is raised when trying to stop the %session with active GUI exception GUIActive {} ; -/*! - This exception is raised when trying to stop the %session with a number of running studies. -*/ - exception RunningStudies {} ; +//! This exception is raised when trying to stop the %session with a number of running studies. + exception RunningStudies {} ; -/*! - Launches GUI in the session -*/ - void GetInterface(); +//! Launches GUI in the session + void GetInterface(); -/*! - Returns a standalone component -*/ - Engines::Component GetComponent(in string theLibraryName); +//! Returns a standalone component + Engines::EngineComponent GetComponent(in string theLibraryName); -/*! - Stops the %Session (It must be idle) -*/ +//! Stops the %Session (It must be idle) void StopSession() raises(GUIActive, RunningStudies) ; -/*! - Gets Session State -*/ +//! Gets Session State StatSession GetStatSession() ; -/*! - Determines whether the server has already been loaded or not. -*/ + +//! Shutdowns Session server + void Shutdown(); + +//! Determines whether the server has already been loaded or not. void ping(); -/*! - Returns the PID of the server -*/ +//! Returns the PID of the server long getPID(); -/*! - Get Active study ID -*/ +//! Returns host name + string getHostname(); +//! Get Active study ID long GetActiveStudyId(); -/*! - Restores a state of the study at theSavePoint -*/ +//! Restores a state of the study at theSavePoint boolean restoreVisualState(in long theSavePoint); + + //! Send a message to the session GUI desktop that will emit a qt signal /*! - Emit a qt signal from the session GUI desktop window. This method can be used to send a message to the GUI from the standalone container. Caution: this method can block the Session and the calling container @@ -123,6 +108,8 @@ module SALOME In such a case it is recommended to use oneway method. */ void emitMessage(in string theMessage); + + //! same as emitMessage but in a non blocking way /*! Emit a qt signal from the session GUI desktop window. This method can be used to send a message to the GUI from the standalone diff --git a/idl/SALOME_TestComponent.idl b/idl/SALOME_TestComponent.idl index dc6ae8c48..4a19a72bb 100644 --- a/idl/SALOME_TestComponent.idl +++ b/idl/SALOME_TestComponent.idl @@ -1,34 +1,38 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : SALOME_TestComponent.idl // Author : Paul RASCLE, EDF - MARC TAJCHMAN, CEA -// $Header$ -// + #include "SALOME_Component.idl" +/*! \file SALOME_TestComponent.idl \brief an interface for testing EngineComponent and Container +*/ + module Engines { - - interface TestComponent : Component + +/*! \brief a component with 2 operations (Coucou and Setenv) +*/ + interface TestComponent : EngineComponent { string Coucou(in long L); void Setenv(); diff --git a/idl/SALOME_TestMPIComponent.idl b/idl/SALOME_TestMPIComponent.idl index 090d74ef5..9459dd871 100644 --- a/idl/SALOME_TestMPIComponent.idl +++ b/idl/SALOME_TestMPIComponent.idl @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + //============================================================================= // File : SALOME_MPITestComponent.idl // Created : mer jui 04 12:08:17 CEST 2003 @@ -30,10 +31,13 @@ #include "SALOME_Component.idl" #include "SALOME_MPIObject.idl" +/*! \file SALOME_TestMPIComponent.idl \brief interface to test MPIObject and MPIContainer +*/ + module Engines { - interface TestMPIComponent : Component, MPIObject + interface TestMPIComponent : EngineComponent, MPIObject { // version synchrone (process 0) void Coucou(in long L); diff --git a/idl/SALOME_TestModuleCatalog.idl b/idl/SALOME_TestModuleCatalog.idl index 06be6c8db..2f96af535 100644 --- a/idl/SALOME_TestModuleCatalog.idl +++ b/idl/SALOME_TestModuleCatalog.idl @@ -1,37 +1,43 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : SALOME_TestModuleCatalog.idl // Author : -// + #ifndef _TestModuleCatalog_IDL #define _TestModuleCatalog_IDL #include "SALOME_Component.idl" +/*! \file SALOME_TestModuleCatalog.idl \brief interfaces for %SALOME module catalog test +*/ + +/*! \brief module to test SALOME_ModuleCatalog +*/ + module SALOME_TestModuleCatalog { interface Adder ; - interface AddComponent : Engines::Component { + interface AddComponent : Engines::EngineComponent { // DataStreamPorts Addition istream(INTEGER, in, T), ostream(STRING, out, I) // DataStreamPorts Addition Ostream(FLOAT, out, T) @@ -41,7 +47,7 @@ module SALOME_TestModuleCatalog { double LastResult() ; }; - interface Adder : Engines::Component { + interface Adder : Engines::EngineComponent { double Add( in double x , in double y , out double z ) ; double AddAndCompare( in double x , in double y , in Adder anOtherAdder, out double z ) ; diff --git a/idl/SALOME_Types.idl b/idl/SALOME_Types.idl new file mode 100644 index 000000000..6536d7a1a --- /dev/null +++ b/idl/SALOME_Types.idl @@ -0,0 +1,31 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +#ifndef __SALOME_TYPES_IDL__ +#define __SALOME_TYPES_IDL__ + +module SALOME_TYPES +{ + typedef sequence ListOfLong; + typedef sequence ListOfDouble; + typedef sequence ListOfString; + typedef sequence ListOfDouble2; +}; + +#endif diff --git a/idl/TestNotif.idl b/idl/TestNotif.idl index ebf91fa51..cd2adf58f 100644 --- a/idl/TestNotif.idl +++ b/idl/TestNotif.idl @@ -1,29 +1,35 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : TestNotif.idl // # ifndef __TESTNOTIF_IDL_ # define __TESTNOTIF_IDL_ +/*! \file TestNotif.idl \brief for testing notification service +*/ + +/* \brief interface to test notification service +*/ interface Solver { boolean Connect(); diff --git a/idl/TypeData.idl b/idl/TypeData.idl index c75ea69e2..6fdcc24c9 100644 --- a/idl/TypeData.idl +++ b/idl/TypeData.idl @@ -1,29 +1,33 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : TypeData.idl // #ifndef _SALOME_TYPEDATA_IDL_ #define _SALOME_TYPEDATA_IDL_ +/*! \file TypeData.idl \brief data definition for tests +*/ + module Engines { diff --git a/idl/nstest.idl b/idl/nstest.idl index c704ff273..60395e3be 100644 --- a/idl/nstest.idl +++ b/idl/nstest.idl @@ -1,38 +1,52 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef NSTEST_IDL #define NSTEST_IDL +/*! \file nstest.idl \brief interfaces for naming service test +*/ + +/*! \brief module with one interface to test naming service +*/ module NSTEST { +/*! \brief small interface for test +*/ interface echo { +/*! \brief operation that returns a long +*/ long getId(); }; +/*! \brief factory interface for test +*/ interface aFactory { +/*! \brief operation that creates a echo %object +*/ echo createInstance(); }; }; -#endif \ No newline at end of file +#endif diff --git a/resources/CatalogResources.xml.in b/resources/CatalogResources.xml.in index 11e6b6e26..3c315ad30 100644 --- a/resources/CatalogResources.xml.in +++ b/resources/CatalogResources.xml.in @@ -1,4 +1,4 @@ - + diff --git a/resources/KERNELCatalog.xml.in b/resources/KERNELCatalog.xml.in index 1452381ff..1fdc30ada 100644 --- a/resources/KERNELCatalog.xml.in +++ b/resources/KERNELCatalog.xml.in @@ -23,16 +23,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/Makefile.am b/resources/Makefile.am index 336a0caeb..1e746e530 100644 --- a/resources/Makefile.am +++ b/resources/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # -* Makefile *- # Author : Guillaume Boulant (CSSI) # Module : KERNEL @@ -34,13 +35,21 @@ include $(top_srcdir)/salome_adm/unix/make_common_starter.am if WITHONLYLAUNCHER dist_salomeres_DATA=\ - CatalogResources.xml \ CatalogModulePersonnel.xml_skel + + # VSR: little trick to avoid putting if generated files to the distribution archive + nodist_salomeres_DATA=\ + CatalogResources.xml else dist_salomeres_DATA=\ - CatalogResources.xml \ CatalogModulePersonnel.xml_skel \ channel.cfg \ - KERNELCatalog.xml \ SALOMEDS_Resources + + # VSR: little trick to avoid putting if generated files to the distribution archive + nodist_salomeres_DATA=\ + CatalogResources.xml \ + KERNELCatalog.xml endif + +EXTRA_DIST = CatalogDataType.xml diff --git a/salome_adm/Makefile.am b/salome_adm/Makefile.am index 9b3ccb7ad..01b7790d5 100644 --- a/salome_adm/Makefile.am +++ b/salome_adm/Makefile.am @@ -1,23 +1,24 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + SUBDIRS = unix cmake_files AUTOMAKE_OPTIONS=filename-length-max=255 diff --git a/salome_adm/cmake_files/FindBOOST.cmake b/salome_adm/cmake_files/FindBOOST.cmake index c8af5d003..bd9ec077f 100644 --- a/salome_adm/cmake_files/FindBOOST.cmake +++ b/salome_adm/cmake_files/FindBOOST.cmake @@ -1,31 +1,170 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -SET(BOOST_ROOT $ENV{BOOST_ROOT}) -IF(BOOST_ROOT) - FIND_PATH(BOOST_INCLUDES boost/shared_ptr.hpp ${BOOST_ROOT}) - FIND_LIBRARY(BOOST_LIB_THREAD libboost_thread-vc90-mt-gd-1_35 ${BOOST_ROOT}/lib) - FIND_LIBRARY(BOOST_LIB_DATE_TIME libboost_date_time-vc90-mt-gd-1_35 ${BOOST_ROOT}/lib) - SET(BOOST_LIBS ${BOOST_LIB_THREAD} ${BOOST_LIB_DATE_TIME}) - SET(BOOST_CPPFLAGS -I${BOOST_INCLUDES}) -ELSE(BOOST_ROOT) - SET(boost_thread -lboost_thread) -ENDIF(BOOST_ROOT) + +# ------ + +MESSAGE(STATUS "Check for boost ...") + +# ------ + +IF(BOOST_IS_MANDATORY STREQUAL 0) + SET(BOOST_IS_MANDATORY 0) + SET(BOOST_IS_OPTIONAL 1) +ENDIF(BOOST_IS_MANDATORY STREQUAL 0) +IF(BOOST_IS_OPTIONAL STREQUAL 0) + SET(BOOST_IS_MANDATORY 1) + SET(BOOST_IS_OPTIONAL 0) +ENDIF(BOOST_IS_OPTIONAL STREQUAL 0) +IF(NOT BOOST_IS_MANDATORY AND NOT BOOST_IS_OPTIONAL) + SET(BOOST_IS_MANDATORY 1) + SET(BOOST_IS_OPTIONAL 0) +ENDIF(NOT BOOST_IS_MANDATORY AND NOT BOOST_IS_OPTIONAL) + +# ------ + +SET(BOOST_STATUS 1) +IF(WITHOUT_BOOST OR WITH_BOOST STREQUAL 0) + SET(BOOST_STATUS 0) + MESSAGE(STATUS "boost disabled from command line.") +ENDIF(WITHOUT_BOOST OR WITH_BOOST STREQUAL 0) + +# ------ + +IF(BOOST_STATUS) + IF(WITH_BOOST) + SET(BOOST_ROOT_USER ${WITH_BOOST}) + ELSE(WITH_BOOST) + SET(BOOST_ROOT_USER $ENV{BOOST_ROOT}) + IF(NOT BOOST_ROOT_USER) + SET(BOOST_ROOT_USER $ENV{BOOSTDIR}) + ENDIF(NOT BOOST_ROOT_USER) + ENDIF(WITH_BOOST) +ENDIF(BOOST_STATUS) + +# ----- + +IF(BOOST_STATUS) + IF(BOOST_ROOT_USER) + SET(BOOST_FIND_PATHS_OPTION NO_DEFAULT_PATH) + ELSE(BOOST_ROOT_USER) + SET(BOOST_FIND_PATHS_OPTION) + ENDIF(BOOST_ROOT_USER) +ENDIF(BOOST_STATUS) + +# ----- + +IF(BOOST_STATUS) + IF(BOOST_ROOT_USER) + SET(BOOST_INCLUDE_PATHS ${BOOST_ROOT_USER} ${BOOST_ROOT_USER}/include) + ELSE(BOOST_ROOT_USER) + SET(BOOST_INCLUDE_PATHS) + ENDIF(BOOST_ROOT_USER) + SET(BOOST_INCLUDE_TO_FIND boost/shared_ptr.hpp) + FIND_PATH(BOOST_INCLUDE_DIR ${BOOST_INCLUDE_TO_FIND} PATHS ${BOOST_INCLUDE_PATHS} ${BOOST_FIND_PATHS_OPTION}) + IF(BOOST_INCLUDE_DIR) + IF(BOOST_ROOT_USER) + SET(BOOST_CPPFLAGS -I${BOOST_INCLUDE_DIR})# to be removed + SET(BOOST_INCLUDE_DIRS ${BOOST_INCLUDE_DIR}) + ENDIF(BOOST_ROOT_USER) + MESSAGE(STATUS "${BOOST_INCLUDE_TO_FIND} found in ${BOOST_INCLUDE_DIR}") + ELSE(BOOST_INCLUDE_DIR) + SET(BOOST_STATUS 0) + IF(BOOST_ROOT_USER) + MESSAGE(STATUS "${BOOST_INCLUDE_TO_FIND} not found in ${BOOST_INCLUDE_PATHS}, check your BOOST installation.") + ELSE(BOOST_ROOT_USER) + MESSAGE(STATUS "${BOOST_INCLUDE_TO_FIND} not found on system, try to use WITH_BOOST option or BOOST_ROOT environment variable.") + ENDIF(BOOST_ROOT_USER) + ENDIF(BOOST_INCLUDE_DIR) +ENDIF(BOOST_STATUS) + +# ---- + +IF(BOOST_STATUS) + IF(BOOST_ROOT_USER) + SET(BOOST_LIB_PATHS ${BOOST_ROOT_USER}/lib) + ELSE(BOOST_ROOT_USER) + SET(BOOST_LIB_PATHS) + ENDIF(BOOST_ROOT_USER) +ENDIF(BOOST_STATUS) + +IF(WINDOWS) + SET(BOOST_ENABLE_DLL 1) +ELSE(WINDOWS) + SET(BOOST_ENABLE_DLL 0) +ENDIF(WINDOWS) + +IF(BOOST_STATUS) + SET(BOOST_LIBS) + FOREACH(name thread date_time signals filesystem system regex) + IF(WINDOWS) + IF(CMAKE_BUILD_TYPE STREQUAL Debug) + SET(EXTENSION -gd) + ELSE(CMAKE_BUILD_TYPE STREQUAL Debug) + SET(EXTENSION) + ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug) + SET(LIB_NAMES) + SET(STATIC_LIB_NAMES) + FOREACH(version 1_35 1_38 1_42 1_46_1 1_49) + SET(LIB_NAMES ${LIB_NAMES} boost_${name}-vc90-mt${EXTENSION}-${version}) + SET(STATIC_LIB_NAMES ${STATIC_LIB_NAMES} libboost_${name}-vc90-mt${EXTENSION}-${version}) + ENDFOREACH(version 1_35 1_38 1_42 1_46_1 1_49) + FIND_LIBRARY(BOOST_LIB_${name} NAMES ${LIB_NAMES} PATHS ${BOOST_LIB_PATHS} ${BOOST_FIND_PATHS_OPTION}) + SET(BOOST_LIB_${name}_FOUNDED ${BOOST_LIB_${name}}) + IF(NOT BOOST_LIB_${name}) + FIND_LIBRARY(STATIC_BOOST_LIB_${name} NAMES ${STATIC_LIB_NAMES} PATHS ${BOOST_LIB_PATHS} ${BOOST_FIND_PATHS_OPTION}) + SET(BOOST_LIB_${name}_FOUNDED ${STATIC_BOOST_LIB_${name}}) + SET(BOOST_ENABLE_DLL 0) + ENDIF(NOT BOOST_LIB_${name}) + ELSE(WINDOWS) + FIND_LIBRARY(BOOST_LIB_${name} NAMES boost_${name} boost_${name}-mt PATHS ${BOOST_LIB_PATHS} ${BOOST_FIND_PATHS_OPTION}) + SET(BOOST_LIB_${name}_FOUNDED ${BOOST_LIB_${name}}) + ENDIF(WINDOWS) + IF(NOT BOOST_LIB_${name}_FOUNDED) + MESSAGE(STATUS "boost lib ${name} not found") + SET(BOOST_STATUS 0) + ENDIF(NOT BOOST_LIB_${name}_FOUNDED) + STRING(TOUPPER ${name} upname) + SET(BOOST_LIB_${upname} ${BOOST_LIB_${name}_FOUNDED}) + SET(BOOST_LIBS ${BOOST_LIBS} ${BOOST_LIB_${name}_FOUNDED}) + ENDFOREACH(name thread date_time signals filesystem system) +ENDIF(BOOST_STATUS) + +# ------ + +IF(BOOST_STATUS) + IF(WINDOWS) + SET(BOOST_CPPFLAGS ${BOOST_CPPFLAGS} -DBOOST_DISABLE_ASSERTS)# to be removed + SET(BOOST_DEFINITIONS -DBOOST_DISABLE_ASSERTS) + IF(BOOST_ENABLE_DLL) + SET(BOOST_CPPFLAGS ${BOOST_CPPFLAGS} -DBOOST_ALL_DYN_LINK)# to be removed + SET(BOOST_DEFINITIONS "${BOOST_DEFINITIONS} -DBOOST_ALL_DYN_LINK") + ENDIF(BOOST_ENABLE_DLL) + ENDIF(WINDOWS) +ELSE(BOOST_STATUS) + IF(BOOST_IS_MANDATORY) + MESSAGE(FATAL_ERROR "boost not found ... mandatory ... abort") + ELSE(BOOST_IS_MANDATORY) + MESSAGE(STATUS "boost not found ... optional ... disabled") + ENDIF(BOOST_IS_MANDATORY) +ENDIF(BOOST_STATUS) + +# ------ diff --git a/salome_adm/cmake_files/FindCPPUNIT.cmake b/salome_adm/cmake_files/FindCPPUNIT.cmake index 5add4eeb3..4193644cd 100644 --- a/salome_adm/cmake_files/FindCPPUNIT.cmake +++ b/salome_adm/cmake_files/FindCPPUNIT.cmake @@ -1,25 +1,151 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -FIND_LIBRARY(CPPUNIT_LIBS cppunit /usr/lib) -IF(CPPUNIT_LIBS) + +# ------ + +MESSAGE(STATUS "Check for cppunit ...") + +# ------ + +IF(CPPUNIT_IS_MANDATORY STREQUAL 0) + SET(CPPUNIT_IS_MANDATORY 0) + SET(CPPUNIT_IS_OPTIONAL 1) +ENDIF(CPPUNIT_IS_MANDATORY STREQUAL 0) +IF(CPPUNIT_IS_OPTIONAL STREQUAL 0) + SET(CPPUNIT_IS_MANDATORY 1) + SET(CPPUNIT_IS_OPTIONAL 0) +ENDIF(CPPUNIT_IS_OPTIONAL STREQUAL 0) +IF(NOT CPPUNIT_IS_MANDATORY AND NOT CPPUNIT_IS_OPTIONAL) + SET(CPPUNIT_IS_MANDATORY 0) + SET(CPPUNIT_IS_OPTIONAL 1) +ENDIF(NOT CPPUNIT_IS_MANDATORY AND NOT CPPUNIT_IS_OPTIONAL) + +# ------ + +SET(CPPUNIT_STATUS 1) +IF(WITHOUT_CPPUNIT OR WITH_CPPUNIT STREQUAL 0) + SET(CPPUNIT_STATUS 0) + MESSAGE(STATUS "cppunit disabled from command line.") +ENDIF(WITHOUT_CPPUNIT OR WITH_CPPUNIT STREQUAL 0) + +# ------ + +IF(CPPUNIT_STATUS) + IF(WITH_CPPUNIT) + SET(CPPUNIT_ROOT_USER ${WITH_CPPUNIT}) + ELSE(WITH_CPPUNIT) + SET(CPPUNIT_ROOT_USER $ENV{CPPUNIT_ROOT}) + ENDIF(WITH_CPPUNIT) +ENDIF(CPPUNIT_STATUS) + +# ----- + +IF(CPPUNIT_STATUS) + IF(CPPUNIT_ROOT_USER) + SET(CPPUNIT_FIND_PATHS_OPTION NO_DEFAULT_PATH) + ELSE(CPPUNIT_ROOT_USER) + SET(CPPUNIT_FIND_PATHS_OPTION) + ENDIF(CPPUNIT_ROOT_USER) +ENDIF(CPPUNIT_STATUS) + +# ----- + +IF(CPPUNIT_STATUS) + IF(CPPUNIT_ROOT_USER) + SET(CPPUNIT_INCLUDE_PATHS ${CPPUNIT_ROOT_USER} ${CPPUNIT_ROOT_USER}/include) + ELSE(CPPUNIT_ROOT_USER) + SET(CPPUNIT_INCLUDE_PATHS) + ENDIF(CPPUNIT_ROOT_USER) + SET(CPPUNIT_INCLUDE_TO_FIND cppunit/extensions/HelperMacros.h) + FIND_PATH(CPPUNIT_INCLUDE_DIR ${CPPUNIT_INCLUDE_TO_FIND} PATHS ${CPPUNIT_INCLUDE_PATHS} ${CPPUNIT_FIND_PATHS_OPTION}) + IF(CPPUNIT_INCLUDE_DIR) + IF(CPPUNIT_ROOT_USER) + SET(CPPUNIT_INCLUDES -I${CPPUNIT_INCLUDE_DIR})# to be removed + IF(${CPPUNIT_INCLUDE_DIR} STREQUAL /usr/include) + SET(CPPUNIT_INCLUDE_DIRS) + ELSE(${CPPUNIT_INCLUDE_DIR} STREQUAL /usr/include) + SET(CPPUNIT_INCLUDE_DIRS ${CPPUNIT_INCLUDE_DIR}) + ENDIF(${CPPUNIT_INCLUDE_DIR} STREQUAL /usr/include) + ENDIF(CPPUNIT_ROOT_USER) + MESSAGE(STATUS "${CPPUNIT_INCLUDE_TO_FIND} found in ${CPPUNIT_INCLUDE_DIR}") + ELSE(CPPUNIT_INCLUDE_DIR) + SET(CPPUNIT_STATUS 0) + IF(CPPUNIT_ROOT_USER) + MESSAGE(STATUS "${CPPUNIT_INCLUDE_TO_FIND} not found in ${CPPUNIT_INCLUDE_PATHS}, check your CPPUNIT installation.") + ELSE(CPPUNIT_ROOT_USER) + MESSAGE(STATUS "${CPPUNIT_INCLUDE_TO_FIND} not found on system, try to use WITH_CPPUNIT option or CPPUNIT_ROOT environment variable.") + ENDIF(CPPUNIT_ROOT_USER) + ENDIF(CPPUNIT_INCLUDE_DIR) +ENDIF(CPPUNIT_STATUS) + +# ---- + +IF(CPPUNIT_STATUS) + IF(CPPUNIT_ROOT_USER) + SET(CPPUNIT_LIB_PATHS ${CPPUNIT_ROOT_USER}/lib) + ELSE(CPPUNIT_ROOT_USER) + SET(CPPUNIT_LIB_PATHS) + ENDIF(CPPUNIT_ROOT_USER) +ENDIF(CPPUNIT_STATUS) + +IF(CPPUNIT_STATUS) + IF(WINDOWS) + IF(CMAKE_BUILD_TYPE STREQUAL Debug) + FIND_LIBRARY(CPPUNIT_LIB cppunitd_dll PATHS ${CPPUNIT_LIB_PATHS} ${CPPUNIT_FIND_PATHS_OPTION}) + ELSE(CMAKE_BUILD_TYPE STREQUAL Debug) + FIND_LIBRARY(CPPUNIT_LIB cppunit_dll PATHS ${CPPUNIT_LIB_PATHS} ${CPPUNIT_FIND_PATHS_OPTION}) + ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug) + ELSE(WINDOWS) + FIND_LIBRARY(CPPUNIT_LIB cppunit PATHS ${CPPUNIT_LIB_PATHS} ${CPPUNIT_FIND_PATHS_OPTION}) + ENDIF(WINDOWS) + SET(CPPUNIT_LIBS) + IF(CPPUNIT_LIB) + SET(CPPUNIT_LIBS ${CPPUNIT_LIBS} ${CPPUNIT_LIB}) + MESSAGE(STATUS "cppunit lib found: ${CPPUNIT_LIB}") + ELSE(CPPUNIT_LIB) + SET(CPPUNIT_STATUS 0) + IF(CPPUNIT_ROOT_USER) + MESSAGE(STATUS "cppunit lib not found in ${CPPUNIT_LIB_PATHS}, check your CPPUNIT installation.") + ELSE(CPPUNIT_ROOT_USER) + MESSAGE(STATUS "cppunit lib not found on system, try to use WITH_CPPUNIT option or CPPUNIT_ROOT environment variable.") + ENDIF(CPPUNIT_ROOT_USER) + ENDIF(CPPUNIT_LIB) +ENDIF(CPPUNIT_STATUS) + +# ---- + +IF(CPPUNIT_STATUS) SET(CPPUNIT_IS_OK 1) -ENDIF(CPPUNIT_LIBS) + SET(CPPUNIT_DEFINITIONS) + IF(WINDOWS) + SET(CPPUNIT_INCLUDES ${CPPUNIT_INCLUDES} -DCPPUNIT_DLL) + SET(CPPUNIT_DEFINITIONS "-DCPPUNIT_DLL") + ENDIF(WINDOWS) +ELSE(CPPUNIT_STATUS) + IF(CPPUNIT_IS_MANDATORY) + MESSAGE(FATAL_ERROR "cppunit not found ... mandatory ... abort") + ELSE(CPPUNIT_IS_MANDATORY) + MESSAGE(STATUS "cppunit not found ... optional ... disabled") + ENDIF(CPPUNIT_IS_MANDATORY) +ENDIF(CPPUNIT_STATUS) + +# ------ diff --git a/salome_adm/cmake_files/FindDOXYGEN.cmake b/salome_adm/cmake_files/FindDOXYGEN.cmake new file mode 100644 index 000000000..45dce3377 --- /dev/null +++ b/salome_adm/cmake_files/FindDOXYGEN.cmake @@ -0,0 +1,94 @@ +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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 +# + +# ------ + +MESSAGE(STATUS "Check for doxygen ...") + +# ------ + +IF(DOXYGEN_IS_MANDATORY STREQUAL 0) + SET(DOXYGEN_IS_MANDATORY 0) + SET(DOXYGEN_IS_OPTIONAL 1) +ENDIF(DOXYGEN_IS_MANDATORY STREQUAL 0) +IF(DOXYGEN_IS_OPTIONAL STREQUAL 0) + SET(DOXYGEN_IS_MANDATORY 1) + SET(DOXYGEN_IS_OPTIONAL 0) +ENDIF(DOXYGEN_IS_OPTIONAL STREQUAL 0) +IF(NOT DOXYGEN_IS_MANDATORY AND NOT DOXYGEN_IS_OPTIONAL) + SET(DOXYGEN_IS_MANDATORY 0) + SET(DOXYGEN_IS_OPTIONAL 1) +ENDIF(NOT DOXYGEN_IS_MANDATORY AND NOT DOXYGEN_IS_OPTIONAL) + +# ------ + +SET(DOXYGEN_STATUS 1) +IF(WITHOUT_DOXYGEN OR WITH_DOXYGEN STREQUAL 0) + SET(DOXYGEN_STATUS 0) + MESSAGE(STATUS "doxygen disabled from command line.") +ENDIF(WITHOUT_DOXYGEN OR WITH_DOXYGEN STREQUAL 0) + +# ------ + +IF(DOXYGEN_STATUS) + IF(WITH_DOXYGEN) + SET(DOXYGEN_ROOT_USER ${WITH_DOXYGEN}) + ENDIF(WITH_DOXYGEN) + IF(NOT DOXYGEN_ROOT_USER) + SET(DOXYGEN_ROOT_USER $ENV{DOXYGEN_ROOT}) + ENDIF(NOT DOXYGEN_ROOT_USER) + IF(NOT DOXYGEN_ROOT_USER) + SET(DOXYGEN_ROOT_USER $ENV{DOXYGENHOME}) + ENDIF(NOT DOXYGEN_ROOT_USER) +ENDIF(DOXYGEN_STATUS) + +# ------ + +IF(DOXYGEN_STATUS) + SET(DOXYGEN_EXECUTABLE_TO_FIND doxygen) + IF(DOXYGEN_ROOT_USER) + FIND_PROGRAM(DOXYGEN_EXECUTABLE ${DOXYGEN_EXECUTABLE_TO_FIND} PATHS ${DOXYGEN_ROOT_USER}/bin NO_DEFAULT_PATH) + ELSE(DOXYGEN_ROOT_USER) + FIND_PROGRAM(DOXYGEN_EXECUTABLE ${DOXYGEN_EXECUTABLE_TO_FIND}) + ENDIF(DOXYGEN_ROOT_USER) + IF(DOXYGEN_EXECUTABLE) + MESSAGE(STATUS "${DOXYGEN_EXECUTABLE_TO_FIND} found: ${DOXYGEN_EXECUTABLE}") + ELSE(DOXYGEN_EXECUTABLE) + MESSAGE(STATUS "${DOXYGEN_EXECUTABLE_TO_FIND} not found, try to use WITH_DOXYGEN option or DOXYGEN_ROOT (or DOXYGENHOME) environment variable") + SET(DOXYGEN_STATUS 0) + ENDIF(DOXYGEN_EXECUTABLE) +ENDIF(DOXYGEN_STATUS) + +# ---- + +IF(DOXYGEN_STATUS) + SET(DOXYGEN_IS_OK 1) +ELSE(DOXYGEN_STATUS) + SET(DOXYGEN_IS_OK 0) + IF(DOXYGEN_IS_MANDATORY) + MESSAGE(FATAL_ERROR "doxygen not found ... mandatory ... abort") + ELSE(DOXYGEN_IS_MANDATORY) + MESSAGE(STATUS "doxygen not found ... optional ... disabled") + ENDIF(DOXYGEN_IS_MANDATORY) +ENDIF(DOXYGEN_STATUS) + +# ---- diff --git a/salome_adm/cmake_files/FindHDF5.cmake b/salome_adm/cmake_files/FindHDF5.cmake index c0f0a60c1..1ecd8a497 100644 --- a/salome_adm/cmake_files/FindHDF5.cmake +++ b/salome_adm/cmake_files/FindHDF5.cmake @@ -1,38 +1,198 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -FIND_PROGRAM(HDF5_DUMP h5dump) -SET(HDF5_ROOT ${HDF5_DUMP}) -GET_FILENAME_COMPONENT(HDF5_ROOT ${HDF5_ROOT} PATH) -GET_FILENAME_COMPONENT(HDF5_ROOT ${HDF5_ROOT} PATH) +# ------ -FIND_PATH(HDF5_INCLUDES H5public.h ${HDF5_ROOT}/include) -SET(HDF5_INCLUDES -I${HDF5_INCLUDES}) +MESSAGE(STATUS "Check for hdf5 ...") -IF(WINDOWS) - FIND_LIBRARY(HDF5_LIBS hdf5d ${HDF5_ROOT}/lib) -ELSE(WINDOWS) - FIND_LIBRARY(HDF5_LIBS hdf5 ${HDF5_ROOT}/lib) -ENDIF(WINDOWS) +# ------ + +IF(HDF5_IS_MANDATORY STREQUAL 0) + SET(HDF5_IS_MANDATORY 0) + SET(HDF5_IS_OPTIONAL 1) +ENDIF(HDF5_IS_MANDATORY STREQUAL 0) +IF(HDF5_IS_OPTIONAL STREQUAL 0) + SET(HDF5_IS_MANDATORY 1) + SET(HDF5_IS_OPTIONAL 0) +ENDIF(HDF5_IS_OPTIONAL STREQUAL 0) +IF(NOT HDF5_IS_MANDATORY AND NOT HDF5_IS_OPTIONAL) + SET(HDF5_IS_MANDATORY 1) + SET(HDF5_IS_OPTIONAL 0) +ENDIF(NOT HDF5_IS_MANDATORY AND NOT HDF5_IS_OPTIONAL) + +# ------ + +SET(HDF5_STATUS 1) +IF(WITHOUT_HDF5 OR WITH_HDF5 STREQUAL 0) + SET(HDF5_STATUS 0) + MESSAGE(STATUS "hdf5 disabled from command line.") +ENDIF(WITHOUT_HDF5 OR WITH_HDF5 STREQUAL 0) + +# ------ + +IF(HDF5_STATUS) + IF(WITH_HDF5) + SET(HDF5_ROOT_USER ${WITH_HDF5}) + ENDIF(WITH_HDF5) + IF(NOT HDF5_ROOT_USER) + SET(HDF5_ROOT_USER $ENV{HDF5_ROOT}) + ENDIF(NOT HDF5_ROOT_USER) + IF(NOT HDF5_ROOT_USER) + SET(HDF5_ROOT_USER $ENV{HDF5HOME}) + ENDIF(NOT HDF5_ROOT_USER) +ENDIF(HDF5_STATUS) + +# ------ + +IF(HDF5_STATUS) + IF(NOT HDF5_ROOT_USER) + FIND_PROGRAM(HDF5_DUMP h5dump) + IF(HDF5_DUMP) + MESSAGE(STATUS "h5dump found: ${HDF5_DUMP}") + IF(HDF5_DUMP STREQUAL /usr/bin/h5dump) + ELSE(HDF5_DUMP STREQUAL /usr/bin/h5dump) + SET(HDF5_ROOT_USER ${HDF5_DUMP}) + GET_FILENAME_COMPONENT(HDF5_ROOT_USER ${HDF5_ROOT_USER} PATH) + GET_FILENAME_COMPONENT(HDF5_ROOT_USER ${HDF5_ROOT_USER} PATH) + ENDIF(HDF5_DUMP STREQUAL /usr/bin/h5dump) + ELSE(HDF5_DUMP) + MESSAGE(STATUS "h5dump not found, try to use WITH_HDF5 option or HDF5_ROOT (or HDF5HOME) environment variable") + SET(HDF5_STATUS 0) + ENDIF(HDF5_DUMP) + ENDIF(NOT HDF5_ROOT_USER) +ENDIF(HDF5_STATUS) + +# ------ + +IF(HDF5_STATUS) + IF(HDF5_ROOT_USER) + SET(HDF5_FIND_PATHS_OPTION NO_DEFAULT_PATH) + ELSE(HDF5_ROOT_USER) + SET(HDF5_FIND_PATHS_OPTION) + ENDIF(HDF5_ROOT_USER) +ENDIF(HDF5_STATUS) + +# ------ + +IF(HDF5_STATUS) + IF(HDF5_ROOT_USER) + SET(HDF5_INCLUDE_PATHS ${HDF5_ROOT_USER}/include) + ELSE(HDF5_ROOT_USER) + SET(HDF5_INCLUDE_PATHS) + ENDIF(HDF5_ROOT_USER) + SET(HDF5_INCLUDE_TO_FIND H5public.h) + FIND_PATH(HDF5_INCLUDE_DIR ${HDF5_INCLUDE_TO_FIND} PATHS ${HDF5_INCLUDE_PATHS} ${HDF5_FIND_PATHS_OPTION}) + IF(HDF5_INCLUDE_DIR) + IF(HDF5_ROOT_USER) + SET(HDF5_INCLUDES -I${HDF5_INCLUDE_DIR})# to be removed + IF(${HDF5_INCLUDE_DIR} STREQUAL /usr/include) + SET(HDF5_INCLUDE_DIRS) + ELSE(${HDF5_INCLUDE_DIR} STREQUAL /usr/include) + SET(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR}) + ENDIF(${HDF5_INCLUDE_DIR} STREQUAL /usr/include) + ENDIF(HDF5_ROOT_USER) + SET(HDF5_DEFINITIONS "-DH5_USE_16_API -D_HDF5USEDLL_") + SET(HDF5_INCLUDES -DH5_USE_16_API -D_HDF5USEDLL_ ${HDF5_INCLUDES})# to be removed + MESSAGE(STATUS "${HDF5_INCLUDE_TO_FIND} found in ${HDF5_INCLUDE_DIR}") + ELSE(HDF5_INCLUDE_DIR) + SET(HDF5_STATUS 0) + IF(HDF5_ROOT_USER) + MESSAGE(STATUS "${HDF5_INCLUDE_TO_FIND} not found in ${HDF5_INCLUDE_PATHS}, check your HDF5 installation.") + ELSE(HDF5_ROOT_USER) + MESSAGE(STATUS "${HDF5_INCLUDE_TO_FIND} not found on system, try to use WITH_HDF5 option or HDF5_ROOT (or HDF5HOME) environment variable.") + ENDIF(HDF5_ROOT_USER) + ENDIF(HDF5_INCLUDE_DIR) +ENDIF(HDF5_STATUS) + +# ---- + +IF(HDF5_STATUS) + IF(HDF5_ROOT_USER) + IF(WINDOWS) + SET(HDF5_LIB_PATHS ${HDF5_ROOT_USER}/dll ${HDF5_ROOT_USER}/lib) + ELSE(WINDOWS) + SET(HDF5_LIB_PATHS ${HDF5_ROOT_USER}/lib) + ENDIF(WINDOWS) + ELSE(HDF5_ROOT_USER) + SET(HDF5_LIB_PATHS) + ENDIF(HDF5_ROOT_USER) + IF(WINDOWS) + IF(CMAKE_BUILD_TYPE STREQUAL Release) + FIND_LIBRARY(HDF5_LIB hdf5dll PATHS ${HDF5_LIB_PATHS} ${HDF5_FIND_PATHS_OPTION}) + ELSE(CMAKE_BUILD_TYPE STREQUAL Release) + FIND_LIBRARY(HDF5_LIB hdf5ddll PATHS ${HDF5_LIB_PATHS} ${HDF5_FIND_PATHS_OPTION}) + ENDIF(CMAKE_BUILD_TYPE STREQUAL Release) + ELSE(WINDOWS) + FIND_LIBRARY(HDF5_LIB hdf5 PATHS ${HDF5_LIB_PATHS} ${HDF5_FIND_PATHS_OPTION}) + ENDIF(WINDOWS) + SET(HDF5_LIBS) + IF(HDF5_LIB) + SET(HDF5_LIBS ${HDF5_LIBS} ${HDF5_LIB}) + MESSAGE(STATUS "hdf5 lib found: ${HDF5_LIB}") + ELSE(HDF5_LIB) + SET(HDF5_STATUS 0) + IF(HDF5_ROOT_USER) + MESSAGE(STATUS "hdf5 lib not found in ${HDF5_LIB_PATHS}, check your HDF5 installation.") + ELSE(HDF5_ROOT_USER) + MESSAGE(STATUS "hdf5 lib not found on system, try to use WITH_HDF5 option or HDF5_ROOT (or HDF5HOME) environment variable.") + ENDIF(HDF5_ROOT_USER) + ENDIF(HDF5_LIB) +ENDIF(HDF5_STATUS) + +IF(HDF5_STATUS) + FILE(TO_NATIVE_PATH "${HDF5_INCLUDE_DIR}/H5public.h" HDF5_H5PUBLIC_FILE) + EXECUTE_PROCESS( + COMMAND ${PYTHON_EXECUTABLE} -c "import re,sys ; f=file(sys.argv[1]) ; s=f.read() ; c=re.compile('^#[\\s]*include[\\s]*\\\"(?P[A-Za-z0-9\\-]+\\.h)\\\"',re.M) ; sys.stdout.write(c.search(s).group('nm'))" + ${HDF5_H5PUBLIC_FILE} + OUTPUT_VARIABLE HDF5_H5PUBLIC_DEFS_FILE + ) + FILE(TO_NATIVE_PATH "${HDF5_INCLUDE_DIR}/${HDF5_H5PUBLIC_DEFS_FILE}" HDF5_H5PUBLIC_DEFS_FILE) + EXECUTE_PROCESS( + COMMAND ${PYTHON_EXECUTABLE} -c "import re,sys ; f=file(sys.argv[1]) ; s=f.read() ; c=re.compile('^#[\\s]*define[\\s]+H5_HAVE_PARALLEL[\\s]+(?P[\\d]+)',re.M) ; m=c.search(s); exec('if m: sys.stdout.write(m.group(\\'nm\\'))') ; exec('if not m: sys.stdout.write(\\'0\\')')" + ${HDF5_H5PUBLIC_DEFS_FILE} + OUTPUT_VARIABLE HDF5_HAVE_PARALLEL + ) + IF(HDF5_HAVE_PARALLEL) + MESSAGE(STATUS "hdf5 is parallel") + SET(HDF5_INCLUDES ${HDF5_INCLUDES} -I${MPI_INCLUDE_DIRS}) # to remove after "cmakeization" + SET(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS} ${MPI_INCLUDE_DIRS}) + SET(HDF5_DEFINITIONS "${HDF5_DEFINITIONS} ${MPI_DEFINITIONS}") + SET(HDF5_LIBS ${HDF5_LIBS} ${MPI_LIBS}) + ENDIF(HDF5_HAVE_PARALLEL) +ENDIF(HDF5_STATUS) + +# ---- + +IF(HDF5_STATUS) + SET(HDF5_CPPFLAGS ${HDF5_INCLUDES})# to be removed +ELSE(HDF5_STATUS) + IF(HDF5_IS_MANDATORY) + MESSAGE(FATAL_ERROR "hdf5 not found ... mandatory ... abort") + ELSE(HDF5_IS_MANDATORY) + MESSAGE(STATUS "hdf5 not found ... optional ... disabled") + ENDIF(HDF5_IS_MANDATORY) +ENDIF(HDF5_STATUS) + +# ------ #SET(ZLIB_ROOT $ENV{ZLIB_ROOT}) #STRING(LENGTH "${ZLIB_ROOT}" NB) @@ -47,3 +207,5 @@ ENDIF(WINDOWS) # FIND_LIBRARY(SZIP_LIBS szlib ${SZIP_ROOT}/lib) # SET(HDF5_LIBS ${HDF5_LIBS} ${SZIP_LIBS}) #ENDIF(${NB} GREATER 0) + +# ------ diff --git a/salome_adm/cmake_files/FindKERNEL.cmake b/salome_adm/cmake_files/FindKERNEL.cmake index b6fe5c8e3..5354a7624 100644 --- a/salome_adm/cmake_files/FindKERNEL.cmake +++ b/salome_adm/cmake_files/FindKERNEL.cmake @@ -1,49 +1,65 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -SET(KERNEL_CXXFLAGS -I${KERNEL_ROOT_DIR}/include/salome) +SET(KERNEL_CXXFLAGS -I${KERNEL_ROOT_DIR}/include/salome) # to be removed +SET(KERNEL_INCLUDE_DIRS ${KERNEL_ROOT_DIR}/include/salome) + +FIND_LIBRARY(CalciumC CalciumC ${KERNEL_ROOT_DIR}/lib/salome) FIND_LIBRARY(DF DF ${KERNEL_ROOT_DIR}/lib/salome) FIND_LIBRARY(Launcher Launcher ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(LifeCycleCORBATest LifeCycleCORBATest ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(NamingServiceTest NamingServiceTest ${KERNEL_ROOT_DIR}/lib/salome) FIND_LIBRARY(OpUtil OpUtil ${KERNEL_ROOT_DIR}/lib/salome) FIND_LIBRARY(Registry Registry ${KERNEL_ROOT_DIR}/lib/salome) FIND_LIBRARY(ResourcesManager ResourcesManager ${KERNEL_ROOT_DIR}/lib/salome) FIND_LIBRARY(SALOMEBasics SALOMEBasics ${KERNEL_ROOT_DIR}/lib/salome) -FIND_LIBRARY(SalomeBatch SalomeBatch ${KERNEL_ROOT_DIR}/lib/salome) FIND_LIBRARY(SalomeCatalog SalomeCatalog ${KERNEL_ROOT_DIR}/lib/salome) FIND_LIBRARY(SalomeCommunication SalomeCommunication ${KERNEL_ROOT_DIR}/lib/salome) FIND_LIBRARY(SalomeContainer SalomeContainer ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeDatastream SalomeDatastream ${KERNEL_ROOT_DIR}/lib/salome) FIND_LIBRARY(SalomeDSCContainer SalomeDSCContainer ${KERNEL_ROOT_DIR}/lib/salome) FIND_LIBRARY(SalomeDSClient SalomeDSClient ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeDSCSupervBasic SalomeDSCSupervBasic ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeDSCSuperv SalomeDSCSuperv ${KERNEL_ROOT_DIR}/lib/salome) FIND_LIBRARY(SalomeDSImpl SalomeDSImpl ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SALOMEDSImplTest SALOMEDSImplTest ${KERNEL_ROOT_DIR}/lib/salome) FIND_LIBRARY(SalomeDS SalomeDS ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SALOMEDSTest SALOMEDSTest ${KERNEL_ROOT_DIR}/lib/salome) FIND_LIBRARY(SalomeGenericObj SalomeGenericObj ${KERNEL_ROOT_DIR}/lib/salome) FIND_LIBRARY(SalomeHDFPersist SalomeHDFPersist ${KERNEL_ROOT_DIR}/lib/salome) FIND_LIBRARY(SalomeIDLKernel SalomeIDLKernel ${KERNEL_ROOT_DIR}/lib/salome) FIND_LIBRARY(SalomeLauncher SalomeLauncher ${KERNEL_ROOT_DIR}/lib/salome) FIND_LIBRARY(SalomeLifeCycleCORBA SalomeLifeCycleCORBA ${KERNEL_ROOT_DIR}/lib/salome) FIND_LIBRARY(SALOMELocalTrace SALOMELocalTrace ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SALOMELocalTraceTest SALOMELocalTraceTest ${KERNEL_ROOT_DIR}/lib/salome) FIND_LIBRARY(SalomeLoggerServer SalomeLoggerServer ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeMPIContainer SalomeMPIContainer ${KERNEL_ROOT_DIR}/lib/salome) FIND_LIBRARY(SalomeNotification SalomeNotification ${KERNEL_ROOT_DIR}/lib/salome) FIND_LIBRARY(SalomeNS SalomeNS ${KERNEL_ROOT_DIR}/lib/salome) FIND_LIBRARY(SalomeResourcesManager SalomeResourcesManager ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeTestComponentEngine SalomeTestComponentEngine ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeTestMPIComponentEngine SalomeTestMPIComponentEngine ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SALOMETraceCollectorTest SALOMETraceCollectorTest ${KERNEL_ROOT_DIR}/lib/salome) FIND_LIBRARY(TOOLSDS TOOLSDS ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(UtilsTest UtilsTest ${KERNEL_ROOT_DIR}/lib/salome) FIND_LIBRARY(with_loggerTraceCollector with_loggerTraceCollector ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeKernelHelpers SalomeKernelHelpers ${KERNEL_ROOT_DIR}/lib/salome) diff --git a/salome_adm/cmake_files/FindLIBBATCH.cmake b/salome_adm/cmake_files/FindLIBBATCH.cmake new file mode 100644 index 000000000..6ebfb6891 --- /dev/null +++ b/salome_adm/cmake_files/FindLIBBATCH.cmake @@ -0,0 +1,137 @@ +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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 +# + +# ------ + +MESSAGE(STATUS "Check for libbatch ...") + +# ------ + +IF(LIBBATCH_IS_MANDATORY STREQUAL 0) + SET(LIBBATCH_IS_MANDATORY 0) + SET(LIBBATCH_IS_OPTIONAL 1) +ENDIF(LIBBATCH_IS_MANDATORY STREQUAL 0) +IF(LIBBATCH_IS_OPTIONAL STREQUAL 0) + SET(LIBBATCH_IS_MANDATORY 1) + SET(LIBBATCH_IS_OPTIONAL 0) +ENDIF(LIBBATCH_IS_OPTIONAL STREQUAL 0) +IF(NOT LIBBATCH_IS_MANDATORY AND NOT LIBBATCH_IS_OPTIONAL) + SET(LIBBATCH_IS_MANDATORY 0) + SET(LIBBATCH_IS_OPTIONAL 1) +ENDIF(NOT LIBBATCH_IS_MANDATORY AND NOT LIBBATCH_IS_OPTIONAL) + +# ------ + +SET(LIBBATCH_STATUS 1) +IF(WITHOUT_LIBBATCH OR WITH_LIBBATCH STREQUAL 0) + SET(LIBBATCH_STATUS 0) + MESSAGE(STATUS "libbatch disabled from command line.") +ENDIF(WITHOUT_LIBBATCH OR WITH_LIBBATCH STREQUAL 0) + +# ------ + +IF(LIBBATCH_STATUS) + IF(WITH_LIBBATCH) + SET(LIBBATCH_ROOT_USER ${WITH_LIBBATCH}) + ELSE(WITH_LIBBATCH) + SET(LIBBATCH_ROOT_USER $ENV{LIBBATCH_ROOT_DIR}) + ENDIF(WITH_LIBBATCH) +ENDIF(LIBBATCH_STATUS) + +# ----- + +IF(LIBBATCH_STATUS) + IF(LIBBATCH_ROOT_USER) + SET(LIBBATCH_FIND_PATHS_OPTION NO_DEFAULT_PATH) + ELSE(LIBBATCH_ROOT_USER) + SET(LIBBATCH_FIND_PATHS_OPTION) + ENDIF(LIBBATCH_ROOT_USER) +ENDIF(LIBBATCH_STATUS) + +# ----- + +IF(LIBBATCH_STATUS) + IF(LIBBATCH_ROOT_USER) + SET(LIBBATCH_INCLUDE_PATHS ${LIBBATCH_ROOT_USER} ${LIBBATCH_ROOT_USER}/include) + ELSE(LIBBATCH_ROOT_USER) + SET(LIBBATCH_INCLUDE_PATHS) + ENDIF(LIBBATCH_ROOT_USER) + SET(LIBBATCH_INCLUDE_TO_FIND Batch/Batch_BatchManager.hxx) + FIND_PATH(LIBBATCH_INCLUDE_DIR ${LIBBATCH_INCLUDE_TO_FIND} PATHS ${LIBBATCH_INCLUDE_PATHS} ${LIBBATCH_FIND_PATHS_OPTION}) + IF(LIBBATCH_INCLUDE_DIR) + IF(LIBBATCH_ROOT_USER) + SET(LIBBATCH_INCLUDES -I${LIBBATCH_INCLUDE_DIR}) + ENDIF(LIBBATCH_ROOT_USER) + MESSAGE(STATUS "${LIBBATCH_INCLUDE_TO_FIND} found in ${LIBBATCH_INCLUDE_DIR}") + ELSE(LIBBATCH_INCLUDE_DIR) + SET(LIBBATCH_STATUS 0) + IF(LIBBATCH_ROOT_USER) + MESSAGE(STATUS "${LIBBATCH_INCLUDE_TO_FIND} not found in ${LIBBATCH_INCLUDE_PATHS}, check your LIBBATCH installation.") + ELSE(LIBBATCH_ROOT_USER) + MESSAGE(STATUS "${LIBBATCH_INCLUDE_TO_FIND} not found on system, try to use WITH_LIBBATCH option or LIBBATCH_ROOT environment variable.") + ENDIF(LIBBATCH_ROOT_USER) + ENDIF(LIBBATCH_INCLUDE_DIR) +ENDIF(LIBBATCH_STATUS) + +# ---- + +IF(LIBBATCH_STATUS) + IF(LIBBATCH_ROOT_USER) + SET(LIBBATCH_LIB_PATHS ${LIBBATCH_ROOT_USER}/lib) + ELSE(LIBBATCH_ROOT_USER) + SET(LIBBATCH_LIB_PATHS) + ENDIF(LIBBATCH_ROOT_USER) +ENDIF(LIBBATCH_STATUS) + +IF(LIBBATCH_STATUS) + IF(WINDOWS) + FIND_LIBRARY(LIBBATCH_LIB Batch PATHS ${LIBBATCH_LIB_PATHS} ${LIBBATCH_FIND_PATHS_OPTION}) + ELSE(WINDOWS) + FIND_LIBRARY(LIBBATCH_LIB Batch PATHS ${LIBBATCH_LIB_PATHS} ${LIBBATCH_FIND_PATHS_OPTION}) + ENDIF(WINDOWS) + SET(LIBBATCH_LIBS) + IF(LIBBATCH_LIB) + SET(LIBBATCH_LIBS ${LIBBATCH_LIBS} ${LIBBATCH_LIB}) + MESSAGE(STATUS "libbatch lib found: ${LIBBATCH_LIB}") + ELSE(LIBBATCH_LIB) + SET(LIBBATCH_STATUS 0) + IF(LIBBATCH_ROOT_USER) + MESSAGE(STATUS "libbatch lib not found in ${LIBBATCH_LIB_PATHS}, check your LIBBATCH installation.") + ELSE(LIBBATCH_ROOT_USER) + MESSAGE(STATUS "libbatch lib not found on system, try to use WITH_LIBBATCH option or LIBBATCH_ROOT environment variable.") + ENDIF(LIBBATCH_ROOT_USER) + ENDIF(LIBBATCH_LIB) +ENDIF(LIBBATCH_STATUS) + +# ---- + +IF(LIBBATCH_STATUS) + SET(WITH_LIBBATCH 1) +ELSE(LIBBATCH_STATUS) + IF(LIBBATCH_IS_MANDATORY) + MESSAGE(FATAL_ERROR "libbatch not found ... mandatory ... abort") + ELSE(LIBBATCH_IS_MANDATORY) + MESSAGE(STATUS "libbatch not found ... optional ... disabled") + ENDIF(LIBBATCH_IS_MANDATORY) +ENDIF(LIBBATCH_STATUS) + +# ------ diff --git a/salome_adm/cmake_files/FindLIBXML2.cmake b/salome_adm/cmake_files/FindLIBXML2.cmake index cd0b45469..5eafb937d 100644 --- a/salome_adm/cmake_files/FindLIBXML2.cmake +++ b/salome_adm/cmake_files/FindLIBXML2.cmake @@ -1,43 +1,158 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -SET(LIBXML2_ROOT $ENV{LIBXML2_ROOT}) -IF(LIBXML2_ROOT) - FIND_PATH(LIBXML2_INCLUDE_DIR libxml/parser.h ${LIBXML2_ROOT}/include) - FIND_LIBRARY(LIBXML2_LIBS libxml2 ${LIBXML2_ROOT}/lib) -ELSE(LIBXML2_ROOT) - FIND_PATH(LIBXML2_INCLUDE_DIR libxml/parser.h /usr/include/libxml2) - FIND_LIBRARY(LIBXML2_LIBS xml2 /usr/lib) -ENDIF(LIBXML2_ROOT) - -SET(LIBXML2_INCLUDES -I${LIBXML2_INCLUDE_DIR}) - -SET(ICONV_ROOT $ENV{ICONV_ROOT}) -IF(ICONV_ROOT) - FIND_PATH(ICONV_INCLUDE_DIR iconv.h ${ICONV_ROOT}/include) - FIND_LIBRARY(ICONV_LIBS iconv ${ICONV_ROOT}/lib) - SET(LIBXML2_INCLUDES ${LIBXML2_INCLUDES} -I${ICONV_INCLUDE_DIR}) - SET(LIBXML2_LIBS ${LIBXML2_LIBS} ${ICONV_LIBS}) -ENDIF(ICONV_ROOT) - -SET(LIBXML_INCLUDES ${LIBXML2_INCLUDES}) -SET(LIBXML_CPPFLAGS ${LIBXML2_INCLUDES}) -SET(LIBXML_LIBS ${LIBXML2_LIBS}) + +# ------ + +MESSAGE(STATUS "Check for libxml2 ...") + +# ------ + +IF(LIBXML2_IS_MANDATORY STREQUAL 0) + SET(LIBXML2_IS_MANDATORY 0) + SET(LIBXML2_IS_OPTIONAL 1) +ENDIF(LIBXML2_IS_MANDATORY STREQUAL 0) +IF(LIBXML2_IS_OPTIONAL STREQUAL 0) + SET(LIBXML2_IS_MANDATORY 1) + SET(LIBXML2_IS_OPTIONAL 0) +ENDIF(LIBXML2_IS_OPTIONAL STREQUAL 0) +IF(NOT LIBXML2_IS_MANDATORY AND NOT LIBXML2_IS_OPTIONAL) + SET(LIBXML2_IS_MANDATORY 1) + SET(LIBXML2_IS_OPTIONAL 0) +ENDIF(NOT LIBXML2_IS_MANDATORY AND NOT LIBXML2_IS_OPTIONAL) + +# ------ + +SET(LIBXML2_STATUS 1) +IF(WITHOUT_LIBXML2 OR WITH_LIBXML2 STREQUAL 0) + SET(LIBXML2_STATUS 0) + MESSAGE(STATUS "libxml2 disabled from command line.") +ENDIF(WITHOUT_LIBXML2 OR WITH_LIBXML2 STREQUAL 0) + +# ------ + +IF(LIBXML2_STATUS) + IF(WITH_LIBXML2) + SET(LIBXML2_ROOT_USER ${WITH_LIBXML2}) + ELSE(WITH_LIBXML2) + SET(LIBXML2_ROOT_USER $ENV{LIBXML2_ROOT}) + IF(NOT LIBXML2_ROOT_USER) + SET(LIBXML2_ROOT_USER $ENV{LIBXML_DIR}) + ENDIF(NOT LIBXML2_ROOT_USER) + ENDIF(WITH_LIBXML2) +ENDIF(LIBXML2_STATUS) + +# ----- + +IF(LIBXML2_STATUS) + IF(LIBXML2_ROOT_USER) + SET(LIBXML2_FIND_PATHS_OPTION NO_DEFAULT_PATH) + ELSE(LIBXML2_ROOT_USER) + SET(LIBXML2_FIND_PATHS_OPTION) + ENDIF(LIBXML2_ROOT_USER) +ENDIF(LIBXML2_STATUS) + +# ----- + +IF(LIBXML2_STATUS) + IF(LIBXML2_ROOT_USER) + IF(WINDOWS) + SET(LIBXML2_INCLUDE_PATHS ${LIBXML2_ROOT_USER}/include) + ELSE(WINDOWS) + SET(LIBXML2_INCLUDE_PATHS ${LIBXML2_ROOT_USER}/include/libxml2) + ENDIF(WINDOWS) + ELSE(LIBXML2_ROOT_USER) + SET(LIBXML2_INCLUDE_PATHS /usr/include/libxml2) + ENDIF(LIBXML2_ROOT_USER) + SET(LIBXML2_INCLUDE_TO_FIND libxml/parser.h) + FIND_PATH(LIBXML2_INCLUDE_DIR ${LIBXML2_INCLUDE_TO_FIND} PATHS ${LIBXML2_INCLUDE_PATHS} ${LIBXML2_FIND_PATHS_OPTION}) + IF(LIBXML2_INCLUDE_DIR) + SET(LIBXML2_INCLUDES -I${LIBXML2_INCLUDE_DIR})# to remove + SET(LIBXML_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIR}) + MESSAGE(STATUS "${LIBXML2_INCLUDE_TO_FIND} found in ${LIBXML2_INCLUDE_DIR}") + ELSE(LIBXML2_INCLUDE_DIR) + SET(LIBXML2_STATUS 0) + IF(LIBXML2_ROOT_USER) + MESSAGE(STATUS "${LIBXML2_INCLUDE_TO_FIND} not found in ${LIBXML2_INCLUDE_PATHS}, check your LIBXML2 installation.") + ELSE(LIBXML2_ROOT_USER) + MESSAGE(STATUS "${LIBXML2_INCLUDE_TO_FIND} not found on system, try to use WITH_LIBXML2 option or LIBXML2_ROOT environment variable.") + ENDIF(LIBXML2_ROOT_USER) + ENDIF(LIBXML2_INCLUDE_DIR) +ENDIF(LIBXML2_STATUS) + +# ---- + +IF(LIBXML2_STATUS) + IF(LIBXML2_ROOT_USER) + SET(LIBXML2_LIB_PATHS ${LIBXML2_ROOT_USER}/lib) + ELSE(LIBXML2_ROOT_USER) + SET(LIBXML2_LIB_PATHS) + ENDIF(LIBXML2_ROOT_USER) +ENDIF(LIBXML2_STATUS) + +IF(LIBXML2_STATUS) + IF(WINDOWS) + FIND_LIBRARY(LIBXML2_LIB libxml2 PATHS ${LIBXML2_LIB_PATHS} ${LIBXML2_FIND_PATHS_OPTION}) + ELSE(WINDOWS) + FIND_LIBRARY(LIBXML2_LIB xml2 PATHS ${LIBXML2_LIB_PATHS} ${LIBXML2_FIND_PATHS_OPTION}) + ENDIF(WINDOWS) + SET(LIBXML2_LIBS) + IF(LIBXML2_LIB) + SET(LIBXML2_LIBS ${LIBXML2_LIBS} ${LIBXML2_LIB}) + MESSAGE(STATUS "libxml2 lib found: ${LIBXML2_LIB}") + ELSE(LIBXML2_LIB) + SET(LIBXML2_STATUS 0) + IF(LIBXML2_ROOT_USER) + MESSAGE(STATUS "libxml2 lib not found in ${LIBXML2_LIB_PATHS}, check your LIBXML2 installation.") + ELSE(LIBXML2_ROOT_USER) + MESSAGE(STATUS "libxml2 lib not found on system, try to use WITH_LIBXML2 option or LIBXML2_ROOT environment variable.") + ENDIF(LIBXML2_ROOT_USER) + ENDIF(LIBXML2_LIB) +ENDIF(LIBXML2_STATUS) + +# ---- + +IF(WINDOWS) + SET(ICONV_ROOT $ENV{ICONV_ROOT}) + IF(ICONV_ROOT) + FIND_PATH(ICONV_INCLUDE_DIR iconv.h ${ICONV_ROOT}/include) + FIND_LIBRARY(ICONV_LIBS iconv ${ICONV_ROOT}/lib) + SET(LIBXML2_INCLUDES ${LIBXML2_INCLUDES} -I${ICONV_INCLUDE_DIR})# to remove + SET(LIBXML_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIRS} ${ICONV_INCLUDE_DIR}) + SET(LIBXML2_LIBS ${LIBXML2_LIBS} ${ICONV_LIBS}) + ENDIF(ICONV_ROOT) +ENDIF(WINDOWS) + +# ------ +IF(LIBXML2_STATUS) + SET(LIBXML_INCLUDES ${LIBXML2_INCLUDES})# to remove + SET(LIBXML_CPPFLAGS ${LIBXML2_INCLUDES}) + SET(LIBXML_DEFINITIONS) + SET(LIBXML_LIBS ${LIBXML2_LIBS}) +ELSE(LIBXML2_STATUS) + IF(LIBXML2_IS_MANDATORY) + MESSAGE(FATAL_ERROR "libxml2 not found ... mandatory ... abort") + ELSE(LIBXML2_IS_MANDATORY) + MESSAGE(STATUS "libxml2 not found ... optional ... disabled") + ENDIF(LIBXML2_IS_MANDATORY) +ENDIF(LIBXML2_STATUS) + +# ------ diff --git a/salome_adm/cmake_files/FindMPI.cmake b/salome_adm/cmake_files/FindMPI.cmake new file mode 100644 index 000000000..8818c5fac --- /dev/null +++ b/salome_adm/cmake_files/FindMPI.cmake @@ -0,0 +1,153 @@ +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 +# + +# ------ +# +MESSAGE(STATUS "Check for MPI ...") + +# ------ + +SET(MPI_STATUS 1) +IF(WITHOUT_MPI OR WITH_MPI STREQUAL 0) + SET(MPI_STATUS 0) + MESSAGE(STATUS "mpi disabled from command line.") +ENDIF(WITHOUT_MPI OR WITH_MPI STREQUAL 0) + +IF(WITH_MPI) + SET(MPI_ROOT_USER ${WITH_MPI}) +ELSE(WITH_MPI) + SET(MPI_ROOT_USER $ENV{MPI_ROOT}) +ENDIF(WITH_MPI) + +IF(NOT MPI_ROOT_USER) + FIND_PROGRAM(MPICC mpicc) + IF(MPICC) + MESSAGE(STATUS "mpicc found: ${MPICC}") + SET(MPI_ROOT ${MPICC}) + GET_FILENAME_COMPONENT(MPI_ROOT ${MPI_ROOT} PATH) + GET_FILENAME_COMPONENT(MPI_ROOT ${MPI_ROOT} PATH) + IF(MPICC STREQUAL /usr/bin/mpicc) + ELSE(MPICC STREQUAL /usr/bin/mpicc) + SET(MPI_ROOT_USER ${MPI_ROOT}) + ENDIF(MPICC STREQUAL /usr/bin/mpicc) + ENDIF(MPICC) +ELSE(NOT MPI_ROOT_USER) + SET(MPI_ROOT ${MPI_ROOT_USER}) +ENDIF(NOT MPI_ROOT_USER) + +# ------ + +IF(NOT MPI_ROOT) + MESSAGE(STATUS "MPI not found, try to use WITH_MPI option or MPI_ROOT environment variable.") + SET(MPI_STATUS 0) +ENDIF(NOT MPI_ROOT) + +# ------ + +IF(MPI_STATUS) + MESSAGE(STATUS "Check MPI in ${MPI_ROOT}") + + SET(MPI_INCLUDE_TO_FIND mpi.h) + + IF(MPI_ROOT_USER) + SET(MPI_ROOT ${MPI_ROOT_USER}) + SET(MPI_INCLUDE_PATHS ${MPI_ROOT} ${MPI_ROOT}/include) + FIND_PATH(MPI_INCLUDES ${MPI_INCLUDE_TO_FIND} PATHS ${MPI_INCLUDE_PATHS} NO_DEFAULT_PATH) + IF(NOT MPI_INCLUDES) + MESSAGE(STATUS "MPI include ${MPI_INCLUDE_TO_FIND} not found in ${MPI_INCLUDE_PATHS}, check your MPI installation.") + SET(MPI_STATUS 0) + ENDIF(NOT MPI_INCLUDES) + ELSE(MPI_ROOT_USER) + FIND_PATH(MPI_INCLUDES ${MPI_INCLUDE_TO_FIND}) + IF(NOT MPI_INCLUDES) + MESSAGE(STATUS "MPI include ${MPI_INCLUDE_TO_FIND} not found on system, try to use WITH_MPI option or MPI_ROOT environment variable.") + SET(MPI_STATUS 0) + ENDIF(NOT MPI_INCLUDES) + GET_FILENAME_COMPONENT(MPI_ROOT ${MPI_INCLUDES} PATH) + ENDIF(MPI_ROOT_USER) + + MESSAGE(STATUS "MPI include ${MPI_INCLUDE_TO_FIND} found in ${MPI_INCLUDES}") + + SET(MPI_INCLUDE_DIR ${MPI_INCLUDES}) + SET(MPI_INCLUDE_DIRS ${MPI_INCLUDES}) + SET(MPI_INCLUDES -I${MPI_INCLUDES})# to remove + + # ------ + + IF(WINDOWS) + FIND_LIBRARY(MPI_LIB_THREAD libboost_thread-vc90-mt-gd-1_35 ${MPI_ROOT}/lib) + FIND_LIBRARY(MPI_LIB_DATE_TIME libboost_date_time-vc90-mt-gd-1_35 ${MPI_ROOT}/lib) + ELSE(WINDOWS) + SET(MPI_LIB_FOUND 0) + FOREACH(lib mpi_cxx mpi mpich) + FIND_LIBRARY(MPI_LIB_${lib} ${lib} ${MPI_ROOT}/lib) + IF(MPI_LIB_${lib}) + SET(MPI_LIB_FOUND 1) + ENDIF(MPI_LIB_${lib}) + ENDFOREACH(lib mpi_cxx mpi mpich) + IF(MPI_LIB_FOUND) + IF(MPI_LIB_mpi_cxx AND MPI_LIB_mpi) + SET(MPI_LIBS ${MPI_LIB_mpi_cxx} ${MPI_LIB_mpi}) + SET(MPI_INCLUDES ${MPI_INCLUDES} -DOMPI_IGNORE_CXX_SEEK)# to remove + SET(MPI_DEFINITIONS -DOMPI_IGNORE_CXX_SEEK) + ELSEIF(MPI_LIB_mpi_cxx) + SET(MPI_LIBS ${MPI_LIB_mpi_cxx}) + SET(MPI_INCLUDES ${MPI_INCLUDES} -DOMPI_IGNORE_CXX_SEEK)# to remove + SET(MPI_DEFINITIONS -DOMPI_IGNORE_CXX_SEEK) + ELSEIF(MPI_LIB_mpi) + SET(MPI_LIBS ${MPI_LIB_mpi}) + SET(MPI_INCLUDES ${MPI_INCLUDES} -DOMPI_IGNORE_CXX_SEEK)# to remove + SET(MPI_DEFINITIONS -DOMPI_IGNORE_CXX_SEEK) + ELSEIF(MPI_LIB_mpich) + SET(MPI_LIBS ${MPI_LIB_mpich}) + SET(MPI_INCLUDES ${MPI_INCLUDES} -DMPICH_IGNORE_CXX_SEEK)# to remove + SET(MPI_DEFINITIONS -DMPICH_IGNORE_CXX_SEEK) + ENDIF() + ELSE(MPI_LIB_FOUND) + MESSAGE(STATUS "MPI lib not found, check your MPI installation.") + SET(MPI_STATUS 0) + ENDIF(MPI_LIB_FOUND) + ENDIF(WINDOWS) + MESSAGE(STATUS "MPI libs: ${MPI_LIBS}") +ENDIF(MPI_STATUS) + +# ------ + +IF(MPI_STATUS) + include(CheckSymbolExists) + SET(CMAKE_REQUIRED_LIBRARIES ${MPI_LIBS}) + CHECK_SYMBOL_EXISTS(MPI_Publish_name ${MPI_INCLUDE_DIR}/mpi.h MPI2_IS_OK) + IF(MPI2_IS_OK) + MESSAGE(STATUS "Your mpi implemtentation is compatible with mpi2 ... adding -DHAVE_MPI2") + SET(MPI_INCLUDES ${MPI_INCLUDES} -DHAVE_MPI2)# to remove + SET(MPI_DEFINITIONS "${MPI_DEFINITIONS} -DHAVE_MPI2") + ENDIF(MPI2_IS_OK) +ENDIF(MPI_STATUS) + +# ------ + +IF(MPI_STATUS) + SET(MPI_IS_OK ON) +ELSE(MPI_STATUS) + IF(MPI_IS_MANDATORY) + MESSAGE(FATAL_ERROR "MPI not found but mandatory") + ELSE(MPI_IS_MANDATORY) + MESSAGE(STATUS "MPI not found. Build procedure depending of mpi will be disable") + ENDIF(MPI_IS_MANDATORY) +ENDIF(MPI_STATUS) diff --git a/salome_adm/cmake_files/FindOMNIORB.cmake b/salome_adm/cmake_files/FindOMNIORB.cmake index f9cd2d618..df341c48d 100644 --- a/salome_adm/cmake_files/FindOMNIORB.cmake +++ b/salome_adm/cmake_files/FindOMNIORB.cmake @@ -1,112 +1,245 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -# ----- -FIND_PROGRAM(OMNIORB_IDL omniidl) - -# ----- - -IF(OMNIORB_IDL) - SET(CORBA_GEN 1) -ELSE(OMNIORB_IDL) - SET(CORBA_GEN 0) -ENDIF(OMNIORB_IDL) - -# ----- - -SET(OMNIORB_ROOT ${OMNIORB_IDL}) -GET_FILENAME_COMPONENT(OMNIORB_ROOT ${OMNIORB_ROOT} PATH) -IF(WINDOWS) - GET_FILENAME_COMPONENT(OMNIORB_ROOT ${OMNIORB_ROOT} PATH) -ENDIF(WINDOWS) -GET_FILENAME_COMPONENT(OMNIORB_ROOT ${OMNIORB_ROOT} PATH) - -# ---- - -FIND_PATH(OMNIORB_INC1 - NAMES omniORB4/CORBA.h - PATHS ${OMNIORB_ROOT}/include - ) -FIND_PATH(OMNIORB_INC2 - NAMES CORBA.h - PATHS ${OMNIORB_ROOT}/include/omniORB4 - ) - -SET(OMNIORB_INCLUDES -I${OMNIORB_INC1} -I${OMNIORB_INC2}) -SET(CORBA_INCLUDES ${OMNIORB_INCLUDES}) +# ------ + +MESSAGE(STATUS "Check for omniorb ...") + +# ------ + +IF(OMNIORB_IS_MANDATORY STREQUAL 0) + SET(OMNIORB_IS_MANDATORY 0) + SET(OMNIORB_IS_OPTIONAL 1) +ENDIF(OMNIORB_IS_MANDATORY STREQUAL 0) +IF(OMNIORB_IS_OPTIONAL STREQUAL 0) + SET(OMNIORB_IS_MANDATORY 1) + SET(OMNIORB_IS_OPTIONAL 0) +ENDIF(OMNIORB_IS_OPTIONAL STREQUAL 0) +IF(NOT OMNIORB_IS_MANDATORY AND NOT OMNIORB_IS_OPTIONAL) + SET(OMNIORB_IS_MANDATORY 1) + SET(OMNIORB_IS_OPTIONAL 0) +ENDIF(NOT OMNIORB_IS_MANDATORY AND NOT OMNIORB_IS_OPTIONAL) + +# ------ + +SET(OMNIORB_STATUS 1) +IF(WITHOUT_OMNIORB OR WITH_OMNIORB STREQUAL 0) + SET(OMNIORB_STATUS 0) + MESSAGE(STATUS "omniorb disabled from command line.") +ENDIF(WITHOUT_OMNIORB OR WITH_OMNIORB STREQUAL 0) + +# ------ + +IF(OMNIORB_STATUS) + IF(WITH_OMNIORB) + SET(OMNIORB_ROOT_USER ${WITH_OMNIORB}) + ENDIF(WITH_OMNIORB) + IF(NOT OMNIORB_ROOT_USER) + SET(OMNIORB_ROOT_USER $ENV{OMNIORB_ROOT}) + ENDIF(NOT OMNIORB_ROOT_USER) + IF(NOT OMNIORB_ROOT_USER) + SET(OMNIORB_ROOT_USER $ENV{OMNIORBHOME}) + ENDIF(NOT OMNIORB_ROOT_USER) +ENDIF(OMNIORB_STATUS) + +# ------ + +IF(OMNIORB_STATUS) + SET(OMNIIDL_EXECUTABLE_TO_FIND omniidl) + IF(OMNIORB_ROOT_USER) + FIND_PROGRAM(OMNIIDL_EXECUTABLE ${OMNIIDL_EXECUTABLE_TO_FIND} PATHS ${OMNIORB_ROOT_USER}/bin) + ELSE(OMNIORB_ROOT_USER) + FIND_PROGRAM(OMNIIDL_EXECUTABLE ${OMNIIDL_EXECUTABLE_TO_FIND}) + ENDIF(OMNIORB_ROOT_USER) + IF(OMNIIDL_EXECUTABLE) + MESSAGE(STATUS "${OMNIIDL_EXECUTABLE_TO_FIND} found: ${OMNIIDL_EXECUTABLE}") + IF(OMNIORB_EXECUTABLE STREQUAL /usr/bin/${OMNIIDL_EXECUTABLE_TO_FIND}) + ELSE(OMNIORB_EXECUTABLE STREQUAL /usr/bin/${OMNIIDL_EXECUTABLE_TO_FIND}) + SET(OMNIORB_ROOT_USER ${OMNIIDL_EXECUTABLE}) + GET_FILENAME_COMPONENT(OMNIORB_ROOT_USER ${OMNIORB_ROOT_USER} PATH) + IF(WINDOWS) + GET_FILENAME_COMPONENT(OMNIORB_ROOT_USER ${OMNIORB_ROOT_USER} PATH) + ENDIF(WINDOWS) + GET_FILENAME_COMPONENT(OMNIORB_ROOT_USER ${OMNIORB_ROOT_USER} PATH) + ENDIF(OMNIORB_EXECUTABLE STREQUAL /usr/bin/${OMNIIDL_EXECUTABLE_TO_FIND}) + ELSE(OMNIIDL_EXECUTABLE) + MESSAGE(STATUS "${OMNIIDL_EXECUTABLE_TO_FIND} not found, try to use WITH_OMNIORB option or OMNIORBHOME environment variable") + SET(OMNIORB_STATUS 0) + ENDIF(OMNIIDL_EXECUTABLE) +ENDIF(OMNIORB_STATUS) + +# ------ + +IF(OMNIORB_STATUS) + IF(OMNIORB_ROOT_USER) + SET(OMNIORB_FIND_PATHS_OPTION NO_DEFAULT_PATH) + ELSE(OMNIORB_ROOT_USER) + SET(OMNIORB_FIND_PATHS_OPTION) + ENDIF(OMNIORB_ROOT_USER) +ENDIF(OMNIORB_STATUS) + +# ------ + +IF(OMNIORB_STATUS) + SET(OMNIORB_INCLUDES) # to be removed + SET(OMNIORB_INCLUDE_DIRS) +ENDIF(OMNIORB_STATUS) +IF(OMNIORB_STATUS) + IF(OMNIORB_ROOT_USER) + SET(OMNIORB_INCLUDE_PATHS ${OMNIORB_ROOT_USER}/include) + ELSE(OMNIORB_ROOT_USER) + SET(OMNIORB_INCLUDE_PATHS) + ENDIF(OMNIORB_ROOT_USER) + SET(OMNIORB_INCLUDE_TO_FIND omniORB4/CORBA.h) + FIND_PATH(OMNIORB_INCLUDE_DIR1 ${OMNIORB_INCLUDE_TO_FIND} PATHS ${OMNIORB_INCLUDE_PATHS} ${OMNIORB_FIND_PATHS_OPTION}) + IF(OMNIORB_INCLUDE_DIR1) + SET(OMNIORB_INCLUDES ${OMNIORB_INCLUDES} -I${OMNIORB_INCLUDE_DIR1}) # to be removed + SET(OMNIORB_INCLUDE_DIRS ${OMNIORB_INCLUDE_DIR1}) + MESSAGE(STATUS "${OMNIORB_INCLUDE_TO_FIND} found in ${OMNIORB_INCLUDE_DIR1}") + ELSE(OMNIORB_INCLUDE_DIR1) + SET(OMNIORB_STATUS 0) + IF(OMNIORB_ROOT_USER) + MESSAGE(STATUS "${OMNIORB_INCLUDE_TO_FIND} not found in ${OMNIORB_INCLUDE_PATHS}, check your OMNIORB installation.") + ELSE(OMNIORB_ROOT_USER) + MESSAGE(STATUS "${OMNIORB_INCLUDE_TO_FIND} not found on system, try to use WITH_OMNIORB option or OMNIORB_ROOT environment variable.") + ENDIF(OMNIORB_ROOT_USER) + ENDIF(OMNIORB_INCLUDE_DIR1) +ENDIF(OMNIORB_STATUS) +IF(OMNIORB_STATUS) + IF(OMNIORB_ROOT_USER) + SET(OMNIORB_INCLUDE_PATHS ${OMNIORB_ROOT_USER}/include/omniORB4) + ELSE(OMNIORB_ROOT_USER) + SET(OMNIORB_INCLUDE_PATHS /usr/include/omniORB4) + ENDIF(OMNIORB_ROOT_USER) + SET(OMNIORB_INCLUDE_TO_FIND CORBA.h) + FIND_PATH(OMNIORB_INCLUDE_DIR2 ${OMNIORB_INCLUDE_TO_FIND} PATHS ${OMNIORB_INCLUDE_PATHS} ${OMNIORB_FIND_PATHS_OPTION}) + IF(OMNIORB_INCLUDE_DIR2) + SET(OMNIORB_INCLUDES ${OMNIORB_INCLUDES} -I${OMNIORB_INCLUDE_DIR2}) # to be removed + SET(OMNIORB_INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OMNIORB_INCLUDE_DIR2}) + MESSAGE(STATUS "${OMNIORB_INCLUDE_TO_FIND} found in ${OMNIORB_INCLUDE_DIR2}") + ELSE(OMNIORB_INCLUDE_DIR2) + SET(OMNIORB_STATUS 0) + MESSAGE(STATUS "${OMNIORB_INCLUDE_TO_FIND} not found in ${OMNIORB_INCLUDE_PATHS}, check your OMNIORB installation.") + ENDIF(OMNIORB_INCLUDE_DIR2) +ENDIF(OMNIORB_STATUS) + +# ------ + +IF(OMNIORB_STATUS) + SET(OMNIORB_CXXFLAGS) # to be removed + # SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -DOMNIORB_VERSION=4) + SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -D__x86__) # to be removed + SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -DCOMP_CORBA_DOUBLE) # to be removed + SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -DCOMP_CORBA_LONG) # to be removed + SET(OMNIORB_DEFINITIONS "-D__x86__ -DCOMP_CORBA_DOUBLE -DCOMP_CORBA_LONG") + IF(WINDOWS) + SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -D__WIN32__) # to be removed + SET(OMNIORB_DEFINITIONS "${OMNIORB_DEFINITIONS} -D__WIN32__") + # # # # SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -D_WIN32_WINNT=0x0400) + # SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -D__NT__) + # SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -D__OSVERSION__=4) + # ELSE(WINDOWS) + # SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -D__linux__) + ENDIF(WINDOWS) + # IF(WINDOWS) + # SET(OMNIORB_LIBS ws2_32.lib mswsock.lib advapi32.lib ${OMNIORB_LIBS}) + # ENDIF(WINDOWS) +ENDIF(OMNIORB_STATUS) # ---- -SET(OMNIORB_CXXFLAGS) -SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -DOMNIORB_VERSION=4) -SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -D__x86__) - -IF(WINDOWS) - SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -D__WIN32__) - # # # SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -D_WIN32_WINNT=0x0400) - SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -D__NT__) - SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -D__OSVERSION__=4) -ELSE(WINDOWS) - SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -D__linux__) -ENDIF(WINDOWS) - -SET(CORBA_CXXFLAGS ${OMNIORB_CXXFLAGS}) - -# ---- - -IF(WINDOWS) - FIND_LIBRARY(lib_omniORB4 omniORB4_rtd ${OMNIORB_ROOT}/lib/x86_win32) - FIND_LIBRARY(lib_omniDynamic4 omniDynamic4_rtd ${OMNIORB_ROOT}/lib/x86_win32) - FIND_LIBRARY(lib_COS4 COS4_rtd ${OMNIORB_ROOT}/lib/x86_win32) - FIND_LIBRARY(lib_COSDynamic4 COSDynamic4_rtd ${OMNIORB_ROOT}/lib/x86_win32) - FIND_LIBRARY(lib_omnithread omnithread_rtd ${OMNIORB_ROOT}/lib/x86_win32) -ELSE(WINDOWS) - FIND_LIBRARY(lib_omniORB4 omniORB4 ${OMNIORB_ROOT}/lib) - FIND_LIBRARY(lib_omniDynamic4 omniDynamic4 ${OMNIORB_ROOT}/lib) - FIND_LIBRARY(lib_COS4 COS4 ${OMNIORB_ROOT}/lib) - FIND_LIBRARY(lib_COSDynamic4 COSDynamic4 ${OMNIORB_ROOT}/lib) - FIND_LIBRARY(lib_omnithread omnithread ${OMNIORB_ROOT}/lib) -ENDIF(WINDOWS) - -SET(OMNIORB_LIBS ${lib_omniORB4} ${lib_omniDynamic4} ${lib_COS4} ${lib_COSDynamic4} ${lib_omnithread}) -IF(WINDOWS) - SET(OMNIORB_LIBS ws2_32.lib mswsock.lib advapi32.lib ${OMNIORB_LIBS}) -ENDIF(WINDOWS) - -SET(CORBA_LIBS ${OMNIORB_LIBS}) +IF(OMNIORB_STATUS) + IF(OMNIORB_ROOT_USER) + IF(WINDOWS) + SET(OMNIORB_LIB_PATHS ${OMNIORB_ROOT_USER}/lib/x86_win32) + ELSE(WINDOWS) + SET(OMNIORB_LIB_PATHS ${OMNIORB_ROOT_USER}/lib) + ENDIF(WINDOWS) + ELSE(OMNIORB_ROOT_USER) + SET(OMNIORB_LIB_PATHS) + ENDIF(OMNIORB_ROOT_USER) +ENDIF(OMNIORB_STATUS) + +IF(OMNIORB_STATUS) + IF(WINDOWS) + IF(CMAKE_BUILD_TYPE STREQUAL Release) + SET(OMNIORB_LIB_SUFFIX _rt) + ELSE(CMAKE_BUILD_TYPE STREQUAL Release) + SET(OMNIORB_LIB_SUFFIX _rtd) + ENDIF(CMAKE_BUILD_TYPE STREQUAL Release) + ELSE(WINDOWS) + SET(OMNIORB_LIB_SUFFIX) + ENDIF(WINDOWS) +ENDIF(OMNIORB_STATUS) + +SET(OMNIORB_LIBS) +FOREACH(lib omniORB4 omniDynamic4 COS4 COSDynamic4 omnithread) + IF(OMNIORB_STATUS) + FIND_LIBRARY(${lib}${OMNIORB_LIB_SUFFIX} ${lib}${OMNIORB_LIB_SUFFIX} PATHS ${OMNIORB_LIB_PATHS} ${OMNIORB_FIND_PATHS_OPTION}) + IF(${lib}${OMNIORB_LIB_SUFFIX}) + SET(OMNIORB_LIBS ${OMNIORB_LIBS} ${${lib}${OMNIORB_LIB_SUFFIX}}) + MESSAGE(STATUS "${lib}${OMNIORB_LIB_SUFFIX} lib found: ${${lib}${OMNIORB_LIB_SUFFIX}}") + ELSE(${lib}${OMNIORB_LIB_SUFFIX}) + SET(OMNIORB_STATUS 0) + IF(OMNIORB_ROOT_USER) + MESSAGE(STATUS "${lib}${OMNIORB_LIB_SUFFIX} lib not found in ${OMNIORB_LIB_PATHS}, check your OMNIORB installation.") + ELSE(OMNIORB_ROOT_USER) + MESSAGE(STATUS "${lib}${OMNIORB_LIB_SUFFIX} lib not found on system, try to use WITH_OMNIORB option or OMNIORB_ROOT environment variable.") + ENDIF(OMNIORB_ROOT_USER) + ENDIF(${lib}${OMNIORB_LIB_SUFFIX}) + ENDIF(OMNIORB_STATUS) +ENDFOREACH(lib omniORB4 omniDynamic4 COS4 COSDynamic4 omnithread) # ---------------- -SET(OMNIORB_IDL_PYTHON $ENV{OMNIIDL_PYTHON}) -IF(NOT OMNIORB_IDL_PYTHON) - SET(OMNIORB_IDL_PYTHON ${OMNIORB_IDL}) -ENDIF(NOT OMNIORB_IDL_PYTHON) +IF(OMNIORB_STATUS) + SET(OMNIORB_IDL_PYTHON $ENV{OMNIIDL_PYTHON}) + IF(NOT OMNIORB_IDL_PYTHON) + SET(OMNIORB_IDL_PYTHON ${OMNIIDL_EXECUTABLE}) + ENDIF(NOT OMNIORB_IDL_PYTHON) +ENDIF(OMNIORB_STATUS) -# ---------------- +# ---- -SET(IDL_CLN_H .hh) -SET(IDL_SRV_H .hh) +IF(OMNIORB_STATUS) + SET(CORBA_GEN 1) + SET(OMNIORB_IDL ${OMNIIDL_EXECUTABLE}) + SET(CORBA_INCLUDES ${OMNIORB_INCLUDES}) + SET(CORBA_CXXFLAGS ${OMNIORB_CXXFLAGS})# to be removed + SET(CORBA_DEFINITIONS ${OMNIORB_DEFINITIONS}) + SET(CORBA_LIBS ${OMNIORB_LIBS}) + SET(OMNIORB_IDLCXXFLAGS -Wba -nf) + SET(OMNIORB_IDLPYFLAGS -bpython) + SET(IDLCXXFLAGS ${OMNIORB_IDLCXXFLAGS}) + SET(IDLPYFLAGS ${OMNIORB_IDLPYFLAGS}) + SET(IDL_CLN_H .hh) + SET(IDL_SRV_H .hh) +ELSE(OMNIORB_STATUS) + SET(CORBA_GEN 0) + IF(OMNIORB_IS_MANDATORY) + MESSAGE(FATAL_ERROR "omniorb not found ... mandatory ... abort") + ELSE(OMNIORB_IS_MANDATORY) + MESSAGE(STATUS "omniorb not found ... optional ... disabled") + ENDIF(OMNIORB_IS_MANDATORY) +ENDIF(OMNIORB_STATUS) -# SET(OMNIORB_IDLCXXFLAGS -Wba -nf) -# SET(OMNIORB_IDLPYFLAGS -bpython) -SET(IDLCXXFLAGS -Wba -nf) -SET(IDLPYFLAGS -bpython) +# ---- diff --git a/salome_adm/cmake_files/FindPLATFORM.cmake b/salome_adm/cmake_files/FindPLATFORM.cmake index 068623d19..b6a36caca 100644 --- a/salome_adm/cmake_files/FindPLATFORM.cmake +++ b/salome_adm/cmake_files/FindPLATFORM.cmake @@ -1,24 +1,22 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# 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 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. # -# 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 # -# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + MARK_AS_ADVANCED(ISSUE) FIND_FILE(ISSUE issue /etc) IF(ISSUE) @@ -29,21 +27,95 @@ ENDIF(ISSUE) IF(WINDOWS) SET(MACHINE WINDOWS) - SET(PLATFORM_CPPFLAGS) - SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DWNT) - SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DPPRO_NT) - SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} /W0) - # # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DWNT -D_CRT_SECURE_NO_WARNINGS) - # # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_WIN32_WINNT=0x0500) - # SET(RM del) ELSE(WINDOWS) SET(MACHINE PCLINUX) - SET(PLATFORM_CPPFLAGS) - # SET(RM /bin/rm) ENDIF(WINDOWS) -## SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_DEBUG_) +SET(CMAKE_INSTALL_PREFIX_ENV $ENV{CMAKE_INSTALL_PREFIX}) +IF(CMAKE_INSTALL_PREFIX_ENV) + SET(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX_ENV} CACHE PATH "installation prefix" FORCE) +ENDIF(CMAKE_INSTALL_PREFIX_ENV) + +IF(NOT CMAKE_BUILD_TYPE) + SET(CMAKE_BUILD_TYPE $ENV{CMAKE_BUILD_TYPE}) +ENDIF(NOT CMAKE_BUILD_TYPE) + +IF(NOT CMAKE_BUILD_TYPE) + SET(CMAKE_BUILD_TYPE Release) +ENDIF(NOT CMAKE_BUILD_TYPE) + +IF(WINDOWS) +ELSE(WINDOWS) + SET(ADD_WERROR ON) + SET(NAMES ACCEPT_SALOME_WARNINGS ACCEPT_${MODULE}_WARNINGS I_AM_A_TROLL_I_DO_NOT_FIX_${MODULE}_WARNINGS) + FOREACH(name ${NAMES}) + SET(VAL $ENV{${name}}) + IF(X${VAL} STREQUAL X0) + SET(ADD_WERROR ON) + ENDIF(X${VAL} STREQUAL X0) + IF(X${VAL} STREQUAL X1) + SET(ADD_WERROR OFF) + ENDIF(X${VAL} STREQUAL X1) + ENDFOREACH(name ${NAMES}) + IF(ADD_WERROR) + SET(CMAKE_C_FLAGS "-Werror") + SET(CMAKE_CXX_FLAGS "-Werror") + ENDIF(ADD_WERROR) +ENDIF(WINDOWS) + +IF(CMAKE_BUILD_TYPE) + IF(WINDOWS) + MARK_AS_ADVANCED(CLEAR CMAKE_CONFIGURATION_TYPES) + SET(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE} CACHE STRING "compilation types" FORCE) + ELSE(WINDOWS) + IF(CMAKE_BUILD_TYPE STREQUAL Debug) + SET(CMAKE_C_FLAGS_DEBUG "-g") + SET(CMAKE_CXX_FLAGS_DEBUG "-g") + ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug) + IF(CMAKE_BUILD_TYPE STREQUAL Release) + SET(CMAKE_C_FLAGS_RELEASE "-O1 -DNDEBUG") + SET(CMAKE_CXX_FLAGS_RELEASE "-O1 -DNDEBUG") + ENDIF(CMAKE_BUILD_TYPE STREQUAL Release) + ENDIF(WINDOWS) +ENDIF(CMAKE_BUILD_TYPE) + +SET(PLATFORM_CPPFLAGS) +SET(PLATFORM_LDFLAGS) +SET(PLATFORM_LIBADD) +IF(WINDOWS) + SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} /W0) + SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_CRT_SECURE_NO_WARNINGS) # To disable windows warnings for strcpy, fopen, ... + SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_SCL_SECURE_NO_WARNINGS) # To disable windows warnings std::copy, std::transform, ... + SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DWNT) + SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DPPRO_NT) # For medfile + SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_USE_MATH_DEFINES) # At least for MEDMEM + SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_WIN32_WINNT=0x0500) # Windows 2000 or later API is required + SET(PLATFORM_LIBADD ${PLATFORM_LIBADD} Ws2_32.lib) + SET(PLATFORM_LIBADD ${PLATFORM_LIBADD} Userenv.lib) # At least for GEOM suit +ELSE(WINDOWS) + # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wparentheses) + # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wreturn-type) + # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wmissing-declarations) + # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wunused) + # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wall) + SET(PLATFORM_LIBADD ${PLATFORM_LIBADD} -ldl) +ENDIF(WINDOWS) + +SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DSIZEOF_FORTRAN_INTEGER=4 -DSIZEOF_LONG=${CMAKE_SIZEOF_VOID_P} -DSIZEOF_INT=4) + +SET(COMPILATION_WITH_CMAKE ON) + +# SET(PLATFORM_CPPFLAGS) +# # # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DWNT -D_CRT_SECURE_NO_WARNINGS) +# # SET(RM del) +#ELSE(WINDOWS) +# # SET(RM /bin/rm) +#ENDIF(WINDOWS) + +### SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_DEBUG_) + +##SET(RCP rcp) +##SET(RSH rsh) +##SET(RCP rcp) -#SET(RCP rcp) -#SET(RSH rsh) -#SET(RCP rcp) +## MESSAGE(FATAL_ERROR "ZZZZZZZ") diff --git a/salome_adm/cmake_files/FindPTHREADS.cmake b/salome_adm/cmake_files/FindPTHREADS.cmake index 0fe504c3f..f9ba97e55 100644 --- a/salome_adm/cmake_files/FindPTHREADS.cmake +++ b/salome_adm/cmake_files/FindPTHREADS.cmake @@ -1,29 +1,138 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -SET(PTHREADS_ROOT $ENV{PTHREADS_ROOT}) -IF(PTHREADS_ROOT) - FIND_PATH(PTHREADS_INCLUDE_DIR pthread.h ${PTHREADS_ROOT}/include) + +# ------ + +MESSAGE(STATUS "Check for pthreads ...") + +# ------ + +IF(PTHREADS_IS_MANDATORY STREQUAL 0) + SET(PTHREADS_IS_MANDATORY 0) + SET(PTHREADS_IS_OPTIONAL 1) +ENDIF(PTHREADS_IS_MANDATORY STREQUAL 0) +IF(PTHREADS_IS_OPTIONAL STREQUAL 0) + SET(PTHREADS_IS_MANDATORY 1) + SET(PTHREADS_IS_OPTIONAL 0) +ENDIF(PTHREADS_IS_OPTIONAL STREQUAL 0) +IF(NOT PTHREADS_IS_MANDATORY AND NOT PTHREADS_IS_OPTIONAL) + SET(PTHREADS_IS_MANDATORY 1) + SET(PTHREADS_IS_OPTIONAL 0) +ENDIF(NOT PTHREADS_IS_MANDATORY AND NOT PTHREADS_IS_OPTIONAL) + +# ------ + +SET(PTHREADS_STATUS 1) +IF(WITHOUT_PTHREADS OR WITH_PTHREADS STREQUAL 0) + SET(PTHREADS_STATUS 0) + MESSAGE(STATUS "pthreads disabled from command line.") +ENDIF(WITHOUT_PTHREADS OR WITH_PTHREADS STREQUAL 0) + +# ------ + +IF(PTHREADS_STATUS) + IF(WITH_PTHREADS) + SET(PTHREADS_ROOT_USER ${WITH_PTHREADS}) + ELSE(WITH_PTHREADS) + SET(PTHREADS_ROOT_USER $ENV{PTHREADS_ROOT}) + ENDIF(WITH_PTHREADS) +ENDIF(PTHREADS_STATUS) + +# ----- + +IF(PTHREADS_STATUS) + IF(PTHREADS_ROOT_USER) + SET(PTHREADS_FIND_PATHS_OPTION NO_DEFAULT_PATH) + ELSE(PTHREADS_ROOT_USER) + SET(PTHREADS_FIND_PATHS_OPTION) + ENDIF(PTHREADS_ROOT_USER) +ENDIF(PTHREADS_STATUS) + +# ----- + +IF(PTHREADS_STATUS) + IF(PTHREADS_ROOT_USER) + SET(PTHREADS_INCLUDE_PATHS ${PTHREADS_ROOT_USER}/include) + ELSE(PTHREADS_ROOT_USER) + SET(PTHREADS_INCLUDE_PATHS) + ENDIF(PTHREADS_ROOT_USER) + SET(PTHREADS_INCLUDE_TO_FIND pthread.h) + FIND_PATH(PTHREADS_INCLUDE_DIR ${PTHREADS_INCLUDE_TO_FIND} PATHS ${PTHREADS_INCLUDE_PATHS} ${PTHREADS_FIND_PATHS_OPTION}) IF(PTHREADS_INCLUDE_DIR) - SET(PTHREADS_INCLUDES -I${PTHREADS_INCLUDE_DIR}) + IF(PTHREADS_ROOT_USER) + SET(PTHREAD_CFLAGS -I${PTHREADS_INCLUDE_DIR}) + ENDIF(PTHREADS_ROOT_USER) + MESSAGE(STATUS "${PTHREADS_INCLUDE_TO_FIND} found in ${PTHREADS_INCLUDE_DIR}") + ELSE(PTHREADS_INCLUDE_DIR) + SET(PTHREADS_STATUS 0) + IF(PTHREADS_ROOT_USER) + MESSAGE(STATUS "${PTHREADS_INCLUDE_TO_FIND} not found in ${PTHREADS_INCLUDE_PATHS}, check your PTHREADS installation.") + ELSE(PTHREADS_ROOT_USER) + MESSAGE(STATUS "${PTHREADS_INCLUDE_TO_FIND} not found on system, try to use WITH_PTHREADS option or PTHREADS_ROOT environment variable.") + ENDIF(PTHREADS_ROOT_USER) ENDIF(PTHREADS_INCLUDE_DIR) - FIND_LIBRARY(PTHREADS_LIBRARY pthreadVSE2d ${PTHREADS_ROOT}/lib) -ENDIF(PTHREADS_ROOT) +ENDIF(PTHREADS_STATUS) + +# ---- + +IF(PTHREADS_STATUS) + IF(PTHREADS_ROOT_USER) + SET(PTHREADS_LIB_PATHS ${PTHREADS_ROOT_USER}/lib) + ELSE(PTHREADS_ROOT_USER) + SET(PTHREADS_LIB_PATHS) + ENDIF(PTHREADS_ROOT_USER) +ENDIF(PTHREADS_STATUS) + +IF(PTHREADS_STATUS) + IF(WINDOWS) + IF(CMAKE_BUILD_TYPE STREQUAL Release) + FIND_LIBRARY(PTHREAD_LIB pthreadVSE2 pthreadVC2 PATHS ${PTHREADS_LIB_PATHS} ${PTHREADS_FIND_PATHS_OPTION}) + ELSE(CMAKE_BUILD_TYPE STREQUAL Release) + FIND_LIBRARY(PTHREAD_LIB pthreadVSE2d pthreadVC2d PATHS ${PTHREADS_LIB_PATHS} ${PTHREADS_FIND_PATHS_OPTION}) + ENDIF(CMAKE_BUILD_TYPE STREQUAL Release) + ELSE(WINDOWS) + FIND_LIBRARY(PTHREAD_LIB pthread PATHS ${PTHREADS_LIB_PATHS} ${PTHREADS_FIND_PATHS_OPTION}) + ENDIF(WINDOWS) + SET(PTHREAD_LIBS) + IF(PTHREAD_LIB) + SET(PTHREAD_LIBS ${PTHREAD_LIBS} ${PTHREAD_LIB}) + MESSAGE(STATUS "pthread lib found: ${PTHREAD_LIB}") + ELSE(PTHREAD_LIB) + SET(PTHREADS_STATUS 0) + IF(PTHREADS_ROOT_USER) + MESSAGE(STATUS "pthread lib not found in ${PTHREADS_LIB_PATHS}, check your PTHREADS installation.") + ELSE(PTHREADS_ROOT_USER) + MESSAGE(STATUS "pthread lib not found on system, try to use WITH_PTHREADS option or PTHREADS_ROOT environment variable.") + ENDIF(PTHREADS_ROOT_USER) + ENDIF(PTHREAD_LIB) +ENDIF(PTHREADS_STATUS) + +# ---- + +IF(PTHREADS_STATUS) +ELSE(PTHREADS_STATUS) + IF(PTHREADS_IS_MANDATORY) + MESSAGE(FATAL_ERROR "pthreads not found ... mandatory ... abort") + ELSE(PTHREADS_IS_MANDATORY) + MESSAGE(STATUS "pthreads not found ... optional ... disabled") + ENDIF(PTHREADS_IS_MANDATORY) +ENDIF(PTHREADS_STATUS) diff --git a/salome_adm/cmake_files/FindPYTHON.cmake b/salome_adm/cmake_files/FindPYTHON.cmake index 4b84d7c58..df658fba4 100644 --- a/salome_adm/cmake_files/FindPYTHON.cmake +++ b/salome_adm/cmake_files/FindPYTHON.cmake @@ -1,51 +1,236 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -IF(WINDOWS) - FIND_PROGRAM(PYTHON_EXECUTABLE python_d) -ELSE(WINDOWS) - FIND_PROGRAM(PYTHON_EXECUTABLE python) -ENDIF(WINDOWS) - -EXECUTE_PROCESS( - COMMAND ${PYTHON_EXECUTABLE} -c "import sys; sys.stdout.write(sys.version[:3])" - OUTPUT_VARIABLE PYTHON_VERSION - ) - -SET(PYTHON_ROOT ${PYTHON_EXECUTABLE}) -GET_FILENAME_COMPONENT(PYTHON_ROOT ${PYTHON_ROOT} PATH) -GET_FILENAME_COMPONENT(PYTHON_ROOT ${PYTHON_ROOT} PATH) - -FIND_PATH(PYTHON_INCLUDE_PATH Python.h PATHS ${PYTHON_ROOT}/include ${PYTHON_ROOT}/include/python${PYTHON_VERSION}) - -IF(WINDOWS) - STRING(REPLACE "." "" PYTHON_VERSION_WITHOUT_DOT ${PYTHON_VERSION}) - FIND_LIBRARY(PYTHON_LIBRARIES python${PYTHON_VERSION_WITHOUT_DOT}_d ${PYTHON_ROOT}/libs) -ELSE(WINDOWS) - FIND_LIBRARY(PYTHON_LIBRARIES python${PYTHON_VERSION} ${PYTHON_ROOT}/lib) -ENDIF(WINDOWS) - -SET(PYTHON_INCLUDES -I${PYTHON_INCLUDE_PATH}) -SET(PYTHON_LIBS ${PYTHON_LIBRARIES}) - -IF(WINDOWS) - SET(PYTHON_INCLUDES ${PYTHON_INCLUDES} -DHAVE_DEBUG_PYTHON) -ENDIF(WINDOWS) + +# ------ + +MESSAGE(STATUS "Check for python ...") + +# ------ + +IF(PYTHON_IS_MANDATORY STREQUAL 0) + SET(PYTHON_IS_MANDATORY 0) + SET(PYTHON_IS_OPTIONAL 1) +ENDIF(PYTHON_IS_MANDATORY STREQUAL 0) +IF(PYTHON_IS_OPTIONAL STREQUAL 0) + SET(PYTHON_IS_MANDATORY 1) + SET(PYTHON_IS_OPTIONAL 0) +ENDIF(PYTHON_IS_OPTIONAL STREQUAL 0) +IF(NOT PYTHON_IS_MANDATORY AND NOT PYTHON_IS_OPTIONAL) + SET(PYTHON_IS_MANDATORY 1) + SET(PYTHON_IS_OPTIONAL 0) +ENDIF(NOT PYTHON_IS_MANDATORY AND NOT PYTHON_IS_OPTIONAL) + +# ------ + +SET(PYTHON_STATUS 1) +IF(WITHOUT_PYTHON OR WITH_PYTHON STREQUAL 0) + SET(PYTHON_STATUS 0) + MESSAGE(STATUS "python disabled from command line.") +ENDIF(WITHOUT_PYTHON OR WITH_PYTHON STREQUAL 0) + +# ------ + +IF(PYTHON_STATUS) + IF(WITH_PYTHON) + SET(PYTHON_ROOT_USER ${WITH_PYTHON}) + ENDIF(WITH_PYTHON) + IF(NOT PYTHON_ROOT_USER) + SET(PYTHON_ROOT_USER $ENV{PYTHON_ROOT}) + ENDIF(NOT PYTHON_ROOT_USER) + IF(NOT PYTHON_ROOT_USER) + SET(PYTHON_ROOT_USER $ENV{PYTHONHOME}) + ENDIF(NOT PYTHON_ROOT_USER) +ENDIF(PYTHON_STATUS) + +# ------ + +IF(PYTHON_STATUS) + IF(PYTHON_ROOT_USER) + SET(PYTHON_FIND_PATHS_OPTION NO_DEFAULT_PATH) + ELSE(PYTHON_ROOT_USER) + SET(PYTHON_FIND_PATHS_OPTION) + ENDIF(PYTHON_ROOT_USER) +ENDIF(PYTHON_STATUS) + +# ------ + +IF(PYTHON_STATUS) + IF(WINDOWS) + IF(CMAKE_BUILD_TYPE STREQUAL Release) + SET(PYTHON_EXECUTABLE_TO_FIND python) + ELSE(CMAKE_BUILD_TYPE STREQUAL Release) + SET(PYTHON_EXECUTABLE_TO_FIND python_d) + ENDIF(CMAKE_BUILD_TYPE STREQUAL Release) + ELSE(WINDOWS) + SET(PYTHON_EXECUTABLE_TO_FIND python) + ENDIF(WINDOWS) + IF(NOT PYTHON_ROOT_USER) + SET(PYTHON_EXECUTABLE_PATHS) + ELSE(NOT PYTHON_ROOT_USER) + IF(WINDOWS) + SET(PYTHON_EXECUTABLE_PATHS ${PYTHON_ROOT_USER}) + ELSE(WINDOWS) + SET(PYTHON_EXECUTABLE_PATHS ${PYTHON_ROOT_USER}/bin) + ENDIF(WINDOWS) + ENDIF(NOT PYTHON_ROOT_USER) + FIND_PROGRAM(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE_TO_FIND} PATHS ${PYTHON_EXECUTABLE_PATHS} ${PYTHON_FIND_PATHS_OPTION}) + IF(PYTHON_EXECUTABLE) + MESSAGE(STATUS "python found: ${PYTHON_EXECUTABLE}") + IF(PYTHON_EXECUTABLE STREQUAL /usr/bin/python) + ELSE(PYTHON_EXECUTABLE STREQUAL /usr/bin/python) + SET(PYTHON_ROOT_USER ${PYTHON_EXECUTABLE}) + GET_FILENAME_COMPONENT(PYTHON_ROOT_USER ${PYTHON_ROOT_USER} PATH) + IF(NOT WINDOWS) + GET_FILENAME_COMPONENT(PYTHON_ROOT_USER ${PYTHON_ROOT_USER} PATH) + ENDIF(NOT WINDOWS) + ENDIF(PYTHON_EXECUTABLE STREQUAL /usr/bin/python) + ELSE(PYTHON_EXECUTABLE) + IF(PYTHON_ROOT_USER) + MESSAGE(STATUS "${PYTHON_EXECUTABLE_TO_FIND} not found in ${PYTHON_EXECUTABLE_PATHS}, check your PYTHON installation.") + ELSE(PYTHON_ROOT_USER) + MESSAGE(STATUS "${PYTHON_EXECUTABLE_TO_FIND} not found on system, try to use WITH_PYTHON option or PYTHON_ROOT environment variable.") + ENDIF(PYTHON_ROOT_USER) + SET(PYTHON_STATUS 0) + ENDIF(PYTHON_EXECUTABLE) +ENDIF(PYTHON_STATUS) + +# ------ + +IF(PYTHON_STATUS) + EXECUTE_PROCESS( + COMMAND ${PYTHON_EXECUTABLE} -c "import sys; sys.stdout.write(sys.version[:3])" + OUTPUT_VARIABLE PYTHON_VERSION + ) +ENDIF(PYTHON_STATUS) + +# ------ + +IF(PYTHON_STATUS) + IF(PYTHON_ROOT_USER) + SET(PYTHON_FIND_PATHS_OPTION NO_DEFAULT_PATH) + ELSE(PYTHON_ROOT_USER) + SET(PYTHON_FIND_PATHS_OPTION) + ENDIF(PYTHON_ROOT_USER) +ENDIF(PYTHON_STATUS) + +# ------ + +IF(PYTHON_STATUS) + IF(PYTHON_ROOT_USER) + SET(PYTHON_INCLUDE_PATHS ${PYTHON_ROOT_USER}/include ${PYTHON_ROOT_USER}/include/python${PYTHON_VERSION}) + ELSE(PYTHON_ROOT_USER) + SET(PYTHON_INCLUDE_PATHS /usr/include/python${PYTHON_VERSION}) + ENDIF(PYTHON_ROOT_USER) + SET(PYTHON_INCLUDE_TO_FIND Python.h) + FIND_PATH(PYTHON_INCLUDE_DIR ${PYTHON_INCLUDE_TO_FIND} PATHS ${PYTHON_INCLUDE_PATHS} ${PYTHON_FIND_PATHS_OPTION}) + SET(PYTHON_DEFINITIONS) + IF(PYTHON_INCLUDE_DIR) + SET(PYTHON_INCLUDES -I${PYTHON_INCLUDE_DIR})# to remove + SET(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIR}) + IF(WINDOWS) + IF(CMAKE_BUILD_TYPE STREQUAL Release) + ELSE(CMAKE_BUILD_TYPE STREQUAL Release) + SET(PYTHON_INCLUDES ${PYTHON_INCLUDES} -DHAVE_DEBUG_PYTHON)# to remove + SET(PYTHON_DEFINITIONS "-DHAVE_DEBUG_PYTHON") + ENDIF(CMAKE_BUILD_TYPE STREQUAL Release) + ENDIF(WINDOWS) + MESSAGE(STATUS "${PYTHON_INCLUDE_TO_FIND} found in ${PYTHON_INCLUDE_DIR}") + ELSE(PYTHON_INCLUDE_DIR) + SET(PYTHON_STATUS 0) + IF(PYTHON_ROOT_USER) + MESSAGE(STATUS "${PYTHON_INCLUDE_TO_FIND} not found in ${PYTHON_INCLUDE_PATHS}, check your PYTHON installation.") + ELSE(PYTHON_ROOT_USER) + MESSAGE(STATUS "${PYTHON_INCLUDE_TO_FIND} not found on system, try to use WITH_PYTHON option or PYTHON_ROOT environment variable.") + ENDIF(PYTHON_ROOT_USER) + ENDIF(PYTHON_INCLUDE_DIR) +ENDIF(PYTHON_STATUS) + +# ---- + +IF(PYTHON_STATUS) + IF(PYTHON_ROOT_USER) + IF(WINDOWS) + SET(PYTHON_LIB_PATHS ${PYTHON_ROOT_USER}/libs) + ELSE(WINDOWS) + SET(PYTHON_LIB_PATHS ${PYTHON_ROOT_USER}/lib ${PYTHON_ROOT_USER}/lib/python${PYTHON_VERSION}/config) + ENDIF(WINDOWS) + ELSE(PYTHON_ROOT_USER) + SET(PYTHON_LIB_PATHS) + ENDIF(PYTHON_ROOT_USER) + IF(WINDOWS) + STRING(REPLACE "." "" PYTHON_VERSION_WITHOUT_DOT ${PYTHON_VERSION}) + IF(CMAKE_BUILD_TYPE STREQUAL Release) + FIND_LIBRARY(PYTHON_LIB python${PYTHON_VERSION_WITHOUT_DOT} PATHS ${PYTHON_LIB_PATHS} ${PYTHON_FIND_PATHS_OPTION}) + ELSE(CMAKE_BUILD_TYPE STREQUAL Release) + FIND_LIBRARY(PYTHON_LIB python${PYTHON_VERSION_WITHOUT_DOT}_d PATHS ${PYTHON_LIB_PATHS} ${PYTHON_FIND_PATHS_OPTION}) + ENDIF(CMAKE_BUILD_TYPE STREQUAL Release) + ELSE(WINDOWS) + FIND_LIBRARY(PYTHON_LIB python${PYTHON_VERSION} PATHS ${PYTHON_LIB_PATHS} ${PYTHON_FIND_PATHS_OPTION}) + ENDIF(WINDOWS) + SET(PYTHON_LIBS) + IF(PYTHON_LIB) + SET(PYTHON_LIBS ${PYTHON_LIBS} ${PYTHON_LIB}) + MESSAGE(STATUS "python lib found: ${PYTHON_LIB}") + ELSE(PYTHON_LIB) + SET(PYTHON_STATUS 0) + IF(PYTHON_ROOT_USER) + MESSAGE(STATUS "python lib not found in ${PYTHON_LIB_PATHS}, check your PYTHON installation.") + ELSE(PYTHON_ROOT_USER) + MESSAGE(STATUS "python lib not found on system, try to use WITH_PYTHON option or PYTHON_ROOT environment variable.") + ENDIF(PYTHON_ROOT_USER) + ENDIF(PYTHON_LIB) +ENDIF(PYTHON_STATUS) + +# ---- + +SET(NUMPY_STATUS 0) +IF(PYTHON_STATUS) + EXECUTE_PROCESS( + COMMAND ${PYTHON_EXECUTABLE} -c "import numpy ; import sys ; sys.stdout.write(numpy.get_include())" + OUTPUT_VARIABLE NUMPY_INCLUDE_DIR + ERROR_QUIET + ) + IF(NUMPY_INCLUDE_DIR) + SET(NUMPY_STATUS 1) + ENDIF(NUMPY_INCLUDE_DIR) + IF(NUMPY_STATUS) + SET(PYTHON_INCLUDES ${PYTHON_INCLUDES} -DWITH_NUMPY -I${NUMPY_INCLUDE_DIR})# to remove + SET(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS} ${NUMPY_INCLUDE_DIR}) + SET(PYTHON_DEFINITIONS "${PYTHON_DEFINITIONS} -DWITH_NUMPY") + MESSAGE(STATUS "numpy found : ${NUMPY_INCLUDE_DIR}") + ELSE(NUMPY_STATUS) + MESSAGE(STATUS "numpy not found") + ENDIF(NUMPY_STATUS) +ENDIF(PYTHON_STATUS) + +# ---- + +IF(PYTHON_STATUS) + SET(PYTHON_CPPFLAGS ${PYTHON_INCLUDES})# to remove + SET(PYLOGLEVEL WARNING) +ELSE(PYTHON_STATUS) + IF(PYTHON_IS_MANDATORY) + MESSAGE(FATAL_ERROR "python not found ... mandatory ... abort") + ELSE(PYTHON_IS_MANDATORY) + MESSAGE(STATUS "python not found ... optional ... disabled") + ENDIF(PYTHON_IS_MANDATORY) +ENDIF(PYTHON_STATUS) diff --git a/salome_adm/cmake_files/FindSPHINX.cmake b/salome_adm/cmake_files/FindSPHINX.cmake new file mode 100755 index 000000000..354b8194d --- /dev/null +++ b/salome_adm/cmake_files/FindSPHINX.cmake @@ -0,0 +1,98 @@ +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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 +# + +# ------ +MESSAGE(STATUS "Check for sphinx ...") +# ------ + +IF(SPHINX_IS_MANDATORY STREQUAL 0) + SET(SPHINX_IS_MANDATORY 0) + SET(SPHINX_IS_OPTIONAL 1) +ENDIF(SPHINX_IS_MANDATORY STREQUAL 0) +IF(SPHINX_IS_OPTIONAL STREQUAL 0) + SET(SPHINX_IS_MANDATORY 1) + SET(SPHINX_IS_OPTIONAL 0) +ENDIF(SPHINX_IS_OPTIONAL STREQUAL 0) +IF(NOT SPHINX_IS_MANDATORY AND NOT SPHINX_IS_OPTIONAL) + SET(SPHINX_IS_MANDATORY 0) + SET(SPHINX_IS_OPTIONAL 1) +ENDIF(NOT SPHINX_IS_MANDATORY AND NOT SPHINX_IS_OPTIONAL) + +# ------ + +SET(SPHINX_STATUS 1) +IF(WITHOUT_SPHINX OR WITH_SPHINX STREQUAL 0) + SET(SPHINX_STATUS 0) + MESSAGE(STATUS "sphinx disabled from command line.") +ENDIF(WITHOUT_SPHINX OR WITH_SPHINX STREQUAL 0) + +# ------ + +IF(SPHINX_STATUS) + IF(WITH_SPHINX) + SET(SPHINX_ROOT_USER ${WITH_SPHINX}) + ENDIF(WITH_SPHINX) + IF(NOT SPHINX_ROOT_USER) + SET(SPHINX_ROOT_USER $ENV{SPHINX_ROOT}) + ENDIF(NOT SPHINX_ROOT_USER) + IF(NOT SPHINX_ROOT_USER) + SET(SPHINX_ROOT_USER $ENV{SPHINXHOME}) + ENDIF(NOT SPHINX_ROOT_USER) +ENDIF(SPHINX_STATUS) + +# ------ + +IF(SPHINX_STATUS) + SET(SPHINX_EXECUTABLE_TO_FIND sphinx-build) + IF(SPHINX_ROOT_USER) + SET(BINDIR) + IF(WINDOWS) + SET(BINDIR ${SPHINX_ROOT_USER}/Scripts) + ELSE(WINDOWS) + SET(BINDIR ${SPHINX_ROOT_USER}/bin) + ENDIF(WINDOWS) + FIND_PROGRAM(SPHINX_EXECUTABLE ${SPHINX_EXECUTABLE_TO_FIND} PATHS ${BINDIR} NO_DEFAULT_PATH) + ELSE(SPHINX_ROOT_USER) + FIND_PROGRAM(SPHINX_EXECUTABLE ${SPHINX_EXECUTABLE_TO_FIND}) + ENDIF(SPHINX_ROOT_USER) + IF(SPHINX_EXECUTABLE) + MESSAGE(STATUS "${SPHINX_EXECUTABLE_TO_FIND} found: ${SPHINX_EXECUTABLE}") + ELSE(SPHINX_EXECUTABLE) + MESSAGE(STATUS "${SPHINX_EXECUTABLE_TO_FIND} not found, try to use WITH_SPHINX option or SPHINX_ROOT (or SPHINXHOME) environment variable") + SET(SPHINX_STATUS 0) + ENDIF(SPHINX_EXECUTABLE) +ENDIF(SPHINX_STATUS) + +# ---- + +IF(SPHINX_STATUS) + SET(SPHINX_IS_OK 1) +ELSE(SPHINX_STATUS) + SET(SPHINX_IS_OK 0) + IF(SPHINX_IS_MANDATORY) + MESSAGE(FATAL_ERROR "sphinx not found ... mandatory ... abort") + ELSE(SPHINX_IS_MANDATORY) + MESSAGE(STATUS "sphinx not found ... optional ... disabled") + ENDIF(SPHINX_IS_MANDATORY) +ENDIF(SPHINX_STATUS) + +# ---- diff --git a/salome_adm/cmake_files/FindSWIG.cmake b/salome_adm/cmake_files/FindSWIG.cmake index c6a9a4356..ca6aa1ff2 100644 --- a/salome_adm/cmake_files/FindSWIG.cmake +++ b/salome_adm/cmake_files/FindSWIG.cmake @@ -1,23 +1,99 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -FIND_PROGRAM(SWIG_EXECUTABLE swig) -SET(SWIG_FLAGS -c++ -python -shadow) + +# ------ + +MESSAGE(STATUS "Check for swig ...") + +# ------ + +IF(SWIG_IS_MANDATORY STREQUAL 0) + SET(SWIG_IS_MANDATORY 0) + SET(SWIG_IS_OPTIONAL 1) +ENDIF(SWIG_IS_MANDATORY STREQUAL 0) +IF(SWIG_IS_OPTIONAL STREQUAL 0) + SET(SWIG_IS_MANDATORY 1) + SET(SWIG_IS_OPTIONAL 0) +ENDIF(SWIG_IS_OPTIONAL STREQUAL 0) +IF(NOT SWIG_IS_MANDATORY AND NOT SWIG_IS_OPTIONAL) + SET(SWIG_IS_MANDATORY 1) + SET(SWIG_IS_OPTIONAL 0) +ENDIF(NOT SWIG_IS_MANDATORY AND NOT SWIG_IS_OPTIONAL) + +# ------ + +SET(SWIG_STATUS 1) +IF(WITHOUT_SWIG OR WITH_SWIG STREQUAL 0) + SET(SWIG_STATUS 0) + MESSAGE(STATUS "swig disabled from command line.") +ENDIF(WITHOUT_SWIG OR WITH_SWIG STREQUAL 0) + +# ------ + +IF(SWIG_STATUS) + IF(WITH_SWIG) + SET(SWIG_ROOT_USER ${WITH_SWIG}) + ENDIF(WITH_SWIG) + IF(NOT SWIG_ROOT_USER) + SET(SWIG_ROOT_USER $ENV{SWIG_ROOT}) + ENDIF(NOT SWIG_ROOT_USER) + IF(NOT SWIG_ROOT_USER) + SET(SWIG_ROOT_USER $ENV{SWIGHOME}) + ENDIF(NOT SWIG_ROOT_USER) +ENDIF(SWIG_STATUS) + +# ------ + +IF(SWIG_STATUS) + SET(SWIG_EXECUTABLE_TO_FIND swig) + IF(SWIG_ROOT_USER) + FIND_PROGRAM(SWIG_EXECUTABLE ${SWIG_EXECUTABLE_TO_FIND} PATHS ${SWIG_ROOT_USER}/bin NO_DEFAULT_PATH) + ELSE(SWIG_ROOT_USER) + FIND_PROGRAM(SWIG_EXECUTABLE ${SWIG_EXECUTABLE_TO_FIND}) + ENDIF(SWIG_ROOT_USER) + IF(SWIG_EXECUTABLE) + MESSAGE(STATUS "${SWIG_EXECUTABLE_TO_FIND} found: ${SWIG_EXECUTABLE}") + ELSE(SWIG_EXECUTABLE) + MESSAGE(STATUS "${SWIG_EXECUTABLE_TO_FIND} not found, try to use WITH_SWIG option or SWIG_ROOT (or SWIGHOME) environment variable") + SET(SWIG_STATUS 0) + ENDIF(SWIG_EXECUTABLE) +ENDIF(SWIG_STATUS) + +# ---- + +IF(SWIG_STATUS) + SET(SWIG_FLAGS -c++ -python -shadow) +ELSE(SWIG_STATUS) + IF(SWIG_IS_MANDATORY) + MESSAGE(FATAL_ERROR "swig not found ... mandatory ... abort") + ELSE(SWIG_IS_MANDATORY) + MESSAGE(STATUS "swig not found ... optional ... disabled") + ENDIF(SWIG_IS_MANDATORY) +ENDIF(SWIG_STATUS) + +# ---- + +IF(NUMPY_STATUS) + SET(SWIG_FLAGS ${SWIG_FLAGS} -DWITH_NUMPY=WITH_NUMPY) +ENDIF(NUMPY_STATUS) + +# ---- diff --git a/salome_adm/cmake_files/InstallAndCompilePythonFile.cmake b/salome_adm/cmake_files/InstallAndCompilePythonFile.cmake new file mode 100644 index 000000000..8836d0019 --- /dev/null +++ b/salome_adm/cmake_files/InstallAndCompilePythonFile.cmake @@ -0,0 +1,33 @@ +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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 +# + +MACRO(INSTALL_AND_COMPILE_PYTHON_FILE PYFILE2COMPINST PYFILELOC) + INSTALL(CODE "SET(PYTHON_FILE ${f})") + FOREACH(input ${PYFILE2COMPINST}) + GET_FILENAME_COMPONENT(inputname ${input} NAME) + INSTALL(FILES ${input} DESTINATION ${CMAKE_INSTALL_PREFIX}/${PYFILELOC}) + INSTALL(CODE "MESSAGE(STATUS \"py compiling ${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}\")") + INSTALL(CODE "SET(CMD \"import py_compile ; py_compile.compile('${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}')\")") + INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c \"\${CMD}\")") + INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -O -c \"\${CMD}\")") + ENDFOREACH(input ${PYFILE2COMPINST}) +ENDMACRO(INSTALL_AND_COMPILE_PYTHON_FILE PYFILE2COMPINST PYFILELOC) diff --git a/salome_adm/cmake_files/Makefile.am b/salome_adm/cmake_files/Makefile.am index 6da6dc213..b21d38c4e 100644 --- a/salome_adm/cmake_files/Makefile.am +++ b/salome_adm/cmake_files/Makefile.am @@ -1,36 +1,46 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + include $(top_srcdir)/salome_adm/unix/make_common_starter.am dist_salome_cmake_DATA = \ am2cmake.py \ FindBOOST.cmake \ FindCPPUNIT.cmake \ +FindDOXYGEN.cmake \ FindHDF5.cmake \ FindKERNEL.cmake \ +FindLIBBATCH.cmake \ FindLIBXML2.cmake \ +FindMPI.cmake \ FindOMNIORB.cmake \ +UseOMNIORB.cmake \ FindPLATFORM.cmake \ FindPTHREADS.cmake \ FindPYTHON.cmake \ FindSWIG.cmake \ -install_python_from_idl.cmake +FindSPHINX.cmake \ +install_python_from_idl.cmake \ +install_and_compile_python_file.cmake \ +InstallAndCompilePythonFile.cmake + +dist_salomescript_SCRIPTS = prepare_generating_doc.py diff --git a/salome_adm/cmake_files/UseOMNIORB.cmake b/salome_adm/cmake_files/UseOMNIORB.cmake new file mode 100644 index 000000000..9cfcbb35b --- /dev/null +++ b/salome_adm/cmake_files/UseOMNIORB.cmake @@ -0,0 +1,80 @@ +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 +# + +INSTALL(CODE "SET(INSTALL_PYIDL_DIR lib/python${PYTHON_VERSION}/site-packages/salome)") # R1 CHECK + IF(WINDOWS) + INSTALL(CODE "SET(INSTALL_PYIDL_DIR bin/salome)") # R1 CHECK + ENDIF(WINDOWS) + +INSTALL(CODE "MACRO(OMNIORB_COMPILE_IDL_FORPYTHON_ON_INSTALL MYOMNIORBIDLPYTHON MYIDLPYFLAGS MYIDLFILE MYFULLDIR) + FILE(MAKE_DIRECTORY \${MYFULLDIR}) + STRING(REPLACE \" \" \";\" MYIDLPYFLAGS2 \${MYIDLPYFLAGS}) + MESSAGE(STATUS \"Compiling \${MYIDLFILE} into \${MYFULLDIR}\") + EXECUTE_PROCESS(COMMAND \${MYOMNIORBIDLPYTHON} \${MYIDLPYFLAGS2} -C\${MYFULLDIR} \${MYIDLFILE}) +ENDMACRO(OMNIORB_COMPILE_IDL_FORPYTHON_ON_INSTALL)") + +# This MACRO uses the following vars +# - OMNIORB_IDL : the idl tool (given by default by FindOMNIORB.cmake) +# - OMNIORB_IDLCXXFLAGS : the options (include excluded) to give to omniidl generator (given by default by FindOMNIORB.cmake) +# +# MYMODULE is a string that will be used to create a target with sources containing *.cc coming from the compilation of ${MYIDLFILES} +# MYIDLFILES containing all idl files to be compiled. +# MYIDLCXXFLAGS containing all directories (only directories) where to find *.idl which depend ${MYIDLFILES}. +MACRO(OMNIORB_ADD_MODULE MYMODULE MYIDLFILES MYIDLCXXFLAGS) + SET(MYSOURCES) + FOREACH(input ${MYIDLFILES}) + STRING(REGEX REPLACE ".idl" "" base ${input}) + SET(OMNIORB_IDLCXXFLAGS2 "${OMNIORB_IDLCXXFLAGS}") + SET(src ${CMAKE_CURRENT_BINARY_DIR}/${base}SK.cc) + SET(MYSOURCES ${MYSOURCES} ${src}) + SET(outputs ${src}) + SET(dynsrc ${CMAKE_CURRENT_BINARY_DIR}/${base}DynSK.cc) + SET(outputs ${outputs} ${dynsrc}) + SET(inc ${CMAKE_CURRENT_BINARY_DIR}/${base}.hh) + SET(outputs ${outputs} ${inc}) + SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${input}) + SET(flags ${OMNIORB_IDLCXXFLAGS2}) + STRING(REGEX MATCH "-bcxx" ISBCXX ${flags}) + IF(NOT ISBCXX) + SET(flags -bcxx ${flags}) + ENDIF(NOT ISBCXX) + FOREACH(f ${MYIDLCXXFLAGS}) + SET(flags ${flags} "-I${f}") + ENDFOREACH(f ${MYIDLCXXFLAGS}) + ADD_CUSTOM_COMMAND(OUTPUT ${outputs} + COMMAND ${OMNIORB_IDL} ${flags} ${input} + MAIN_DEPENDENCY ${input}) + SET(IDLPYFLAGS ${flags}) + INSTALL(FILES ${input} DESTINATION idl/salome) + SET(IDL_HEADER ${CMAKE_CURRENT_BINARY_DIR}/${base}.hh) + INSTALL(FILES ${IDL_HEADER} DESTINATION include/salome) + SET(flags) + FOREACH(f ${MYIDLCXXFLAGS}) + SET(flags "${flags} -I${f}") + ENDFOREACH(f ${MYIDLCXXFLAGS}) + STRING(REGEX MATCH "-bpython" ISBPYTHON ${flags}) + IF(NOT ISBPYTHON) + SET(flags "-bpython ${flags}") + ENDIF(NOT ISBPYTHON) + SET(IDLPYFLAGS ${flags}) + STRING(REPLACE "\\" "/" IDLPYFLAGS ${IDLPYFLAGS}) + INSTALL(CODE "OMNIORB_COMPILE_IDL_FORPYTHON_ON_INSTALL( \"${OMNIORB_IDL_PYTHON}\" \"${IDLPYFLAGS}\" \"${input}\" \"${CMAKE_INSTALL_PREFIX}/\${INSTALL_PYIDL_DIR}\" )") + ENDFOREACH(input ${MYIDLFILES}) + ADD_LIBRARY(${MYMODULE} SHARED ${MYSOURCES}) +ENDMACRO(OMNIORB_ADD_MODULE) diff --git a/salome_adm/cmake_files/am2cmake.py b/salome_adm/cmake_files/am2cmake.py index 26ab21a36..20f0e9c7b 100644 --- a/salome_adm/cmake_files/am2cmake.py +++ b/salome_adm/cmake_files/am2cmake.py @@ -1,24 +1,23 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# 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 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. # -# 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 # -# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + import re # ---- @@ -53,7 +52,7 @@ p_if = re.compile(r""" if # an if \s+ # 1 or more space (?P # open the group val -[^\s]+ # the group contain 1 or more non space characters +.+ # the group contain 1 or more non space characters ) # close the group """, re.VERBOSE) @@ -125,14 +124,9 @@ class CMakeFile(object): content = p_multiline.sub(r' ', content) # -- - content = content.replace("-no-undefined -version-info=0:0:0", "") - content = content.replace("-include SALOMEconfig.h", "") - - # -- - # Compatibility medfile + # Compatibility netgen plugin # -- - content = content.replace("-no-undefined -version-info 0:0:0", "") - content = content.replace("-no-undefined -version-info 2:5:1", "") + content = content.replace("../NETGEN/libNETGEN.la", "${NETGEN_LIBS}") # -- cas_list = [ @@ -205,33 +199,53 @@ class CMakeFile(object): "XmlTObjPlugin", "XmlXCAFPlugin", ] + vtk_list = [ + "vtkCommonPythonD", + "vtkGraphicsPythonD", + "vtkImagingPythonD", + "vtkPythonCore", + ] kernel_list = [ + "CalciumC", "DF", "Launcher", + "LifeCycleCORBATest", + "NamingServiceTest", "OpUtil", "Registry", "ResourcesManager", "SALOMEBasics", - "SalomeBatch", "SalomeCatalog", "SalomeCommunication", "SalomeContainer", + "SalomeDatastream", "SalomeDSCContainer", "SalomeDSClient", + "SalomeDSCSupervBasic", + "SalomeDSCSuperv", "SalomeDSImpl", + "SALOMEDSImplTest", "SalomeDS", + "SALOMEDSTest", "SalomeGenericObj", "SalomeHDFPersist", "SalomeIDLKernel", "SalomeLauncher", "SalomeLifeCycleCORBA", "SALOMELocalTrace", + "SALOMELocalTraceTest", "SalomeLoggerServer", + "SalomeMPIContainer", "SalomeNotification", "SalomeNS", "SalomeResourcesManager", + "SalomeTestComponentEngine", + "SalomeTestMPIComponentEngine", + "SALOMETraceCollectorTest", "TOOLSDS", + "UtilsTest", "with_loggerTraceCollector", + "SalomeKernelHelpers", ] gui_list = [ "caf", @@ -244,6 +258,7 @@ class CMakeFile(object): "LogWindow", "ObjBrowser", "OCCViewer", + "OpenGLUtils", "Plot2d", "PyConsole", "PyInterp", @@ -251,9 +266,14 @@ class CMakeFile(object): "qtx", "QxScene", "SalomeApp", + "SalomeAppTest", "SalomeIDLGUI", "SalomeObject", "SalomePrs", + "SalomePyQtGUILight", + "SalomePyQtGUI", + "SalomePyQt", + "SalomePy", "SalomeSession", "SalomeStyle", "SOCC", @@ -264,9 +284,13 @@ class CMakeFile(object): "SUPERVGraph", "SVTK", "ToolsGUI", + "ViewerTools", "VTKViewer", + "vtkEDFOverloads", + "vtkTools" ] geom_list = [ + "AdvancedGUI", "BasicGUI", "BlocksGUI", "BooleanGUI", @@ -278,6 +302,7 @@ class CMakeFile(object): "EntityGUI", "GenerationGUI", "GEOMAlgo", + "GEOMAlgo_NEW", "GEOMArchimede", "GEOMBase", "GEOMbasic", @@ -294,8 +319,12 @@ class CMakeFile(object): "IGESExport", "IGESImport", "MeasureGUI", + "Material", "NMTDS", + "NMTDS_NEW", "NMTTools", + "NMTTools_NEW", + "OCC2VTK", "OperationGUI", "PrimitiveGUI", "RepairGUI", @@ -305,25 +334,63 @@ class CMakeFile(object): "STEPImport", "STLExport", "TransformationGUI", + "VTKExport", ] med_list = [ "interpkernel", "InterpKernelTest", + "MEDClientcmodule", + "medcouplingclient", + "medcouplingcorba", + "medcouplingremapper", + "medcoupling", + "MEDEngine", + "medloader", "MEDMEMCppTest", + "MEDMEMImpl", "medmem", + "MED", + "medsplitter", + "MEDSPLITTERTest", "med_V2_1", "MEDWrapperBase", "MEDWrapper", "MEDWrapper_V2_1", "MEDWrapper_V2_2", + "paramedcouplingcorba", + "paramedloader", + "paramedmemcompo", + "paramedmem", + "ParaMEDMEMTest", "SalomeIDLMED", + "SalomeIDLMEDTests", ] - full_list = cas_list + kernel_list + gui_list - full_list += geom_list + med_list - # -- - full_list += [ - "boost_thread", + smesh_list = [ + "GeomSelectionTools", + "MEFISTO2D", + "MeshDriverDAT", + "MeshDriverMED", + "MeshDriver", + "MeshDriverSTL", + "MeshDriverUNV", + "SalomeIDLSMESH", + "SMDS", + "SMESHClient", + "SMESHControls", + "SMESHDS", + "SMESHEngine", + "SMESHFiltersSelection", + "SMESHimpl", + "SMESHObject", + "SMESH", + "SMESHUtils", + "StdMeshersEngine", + "StdMeshersGUI", + "StdMeshers", ] + full_list = cas_list + vtk_list + full_list += kernel_list + gui_list + full_list += geom_list + med_list + smesh_list # -- # E.A. : sort by len before substitution ... # Why ? Thing to "-lMEDWrapper" then "-lMEDWrapper_V2_1" substition @@ -333,6 +400,7 @@ class CMakeFile(object): # -- for key in full_list: content = content.replace("-l%s"%(key), "${%s}"%(key)) + pass # -- @@ -374,17 +442,25 @@ class CMakeFile(object): self.finalize(newlines) # -- - # Add a last CR at the end of the file + # Concatenate newlines into content # -- - newlines.append('\n') + content = '\n'.join(newlines) # -- - # Concatenate newlines into content + # Add a CR at end if necessary # -- - content = '\n'.join(newlines) - + lines = content.split('\n') + # lines = [ l.strip() for l in lines ] + if len(lines[-1]) != 0: + lines.append('') + pass + content = '\n'.join(lines) + # -- - self.content = content + self.content = "# ---------------------------------------------------------------------\n" + self.content += "# This file was automatically generated by am2cmake (erwan.adam@cea.fr)\n" + self.content += "# ---------------------------------------------------------------------\n" + self.content += content # -- return @@ -393,82 +469,221 @@ class CMakeFile(object): if self.root == self.the_root: # -- newlines.append(""" - CMAKE_MINIMUM_REQUIRED(VERSION 2.4) + CMAKE_MINIMUM_REQUIRED(VERSION 2.4.7 FATAL_ERROR) IF(COMMAND cmake_policy) cmake_policy(SET CMP0003 NEW) ENDIF(COMMAND cmake_policy) """) # -- - if self.module == "kernel": + newlines.append(""" + ENABLE_TESTING() + """) + # -- + newlines.append(""" + SET(MODULE %s) + """%(self.module.upper())) + # -- + if self.module == "netgen": newlines.append(""" - INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindPLATFORM.cmake) - INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindPYTHON.cmake) - INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindOMNIORB.cmake) - INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindPTHREADS.cmake) - INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindHDF5.cmake) - INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindBOOST.cmake) - INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindLIBXML2.cmake) - INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindSWIG.cmake) - INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/cmake/FindPLATFORM.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/cmake/FindCAS.cmake) """) - pass else: - newlines.append(""" - SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR}) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPLATFORM.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPYTHON.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindOMNIORB.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPTHREADS.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindHDF5.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindBOOST.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindLIBXML2.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSWIG.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindKERNEL.cmake) - """) - if self.module == "gui": + if self.module == "kernel": newlines.append(""" - INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindCAS.cmake) - INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindQT4.cmake) - INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindOPENGL.cmake) - INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindVTK.cmake) - INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindQWT.cmake) - INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindSIPPYQT.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindPLATFORM.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindPYTHON.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindOMNIORB.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindPTHREADS.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindMPI.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindHDF5.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindBOOST.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindLIBXML2.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindSWIG.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindDOXYGEN.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindLIBBATCH.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindSPHINX.cmake) """) + pass else: - newlines.append(""" - SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR}) - INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindCAS.cmake) - INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindQT4.cmake) - INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindOPENGL.cmake) - INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindVTK.cmake) - INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindQWT.cmake) - INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindSIPPYQT.cmake) - INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindGUI.cmake) - """) if self.module == "med": newlines.append(""" - INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindMEDFILE.cmake) + SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR}) + IF(KERNEL_ROOT_DIR) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPLATFORM.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPYTHON.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindOMNIORB.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPTHREADS.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindMPI.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindHDF5.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindBOOST.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindLIBXML2.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSWIG.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindDOXYGEN.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindLIBBATCH.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindKERNEL.cmake) + ELSE(KERNEL_ROOT_DIR) + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local_without_kernel/cmake_files/FindPLATFORM.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local_without_kernel/cmake_files/FindMPI.cmake) + ENDIF(KERNEL_ROOT_DIR) + """) + else: + newlines.append(""" + SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR}) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPLATFORM.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPYTHON.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindOMNIORB.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPTHREADS.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindMPI.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindHDF5.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindBOOST.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindLIBXML2.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSWIG.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindDOXYGEN.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindLIBBATCH.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindKERNEL.cmake) """) pass - if self.module == "smesh": + if self.module == "gui": + newlines.append(""" + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindCAS.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindQT4.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindOPENGL.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindVTK.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindQWT.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindSIPPYQT.cmake) + """) + else: newlines.append(""" - SET(GEOM_ROOT_DIR $ENV{GEOM_ROOT_DIR}) - SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR}) - INCLUDE(${GEOM_ROOT_DIR}/adm_local/cmake_files/FindGEOM.cmake) - INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMEDFILE.cmake) - INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMED.cmake) + SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR}) + IF(GUI_ROOT_DIR) + INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindCAS.cmake) + INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindQT4.cmake) + INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindOPENGL.cmake) + INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindVTK.cmake) + INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindQWT.cmake) + INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindSIPPYQT.cmake) + INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindGUI.cmake) + ENDIF(GUI_ROOT_DIR) """) + if self.module == "med": + #METIS must be after PARMETIS to prevent to activate METIS if PARMETIS already exists + newlines.append(""" + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindPARMETIS.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindMETIS.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindSCOTCH.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindSPLITTER.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindRENUMBER.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindMEDFILE.cmake) + IF(WINDOWS) + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindXDR.cmake) + ENDIF(WINDOWS) + """) + pass + if self.module == "smesh": + newlines.append(""" + SET(GEOM_ROOT_DIR $ENV{GEOM_ROOT_DIR}) + SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR}) + INCLUDE(${GEOM_ROOT_DIR}/adm_local/cmake_files/FindGEOM.cmake) + INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMEDFILE.cmake) + INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMED.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSPHINX.cmake) + """) + pass + if self.module == "geom": + newlines.append(""" + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSPHINX.cmake) + """) + pass + + if self.module == "netgenplugin": + newlines.append(""" + SET(GEOM_ROOT_DIR $ENV{GEOM_ROOT_DIR}) + SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR}) + SET(SMESH_ROOT_DIR $ENV{SMESH_ROOT_DIR}) + INCLUDE(${GEOM_ROOT_DIR}/adm_local/cmake_files/FindGEOM.cmake) + INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMED.cmake) + INCLUDE(${SMESH_ROOT_DIR}/adm_local/cmake_files/FindSMESH.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindNETGEN.cmake) + """) + pass + if self.module == "blsurfplugin": + newlines.append(""" + SET(GEOM_ROOT_DIR $ENV{GEOM_ROOT_DIR}) + SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR}) + SET(SMESH_ROOT_DIR $ENV{SMESH_ROOT_DIR}) + INCLUDE(${GEOM_ROOT_DIR}/adm_local/cmake_files/FindGEOM.cmake) + INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMED.cmake) + INCLUDE(${SMESH_ROOT_DIR}/adm_local/cmake_files/FindSMESH.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindBLSURF.cmake) + """) + pass + if self.module in ["ghs3dplugin", "hexoticplugin"]: + newlines.append(""" + SET(GEOM_ROOT_DIR $ENV{GEOM_ROOT_DIR}) + SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR}) + SET(SMESH_ROOT_DIR $ENV{SMESH_ROOT_DIR}) + INCLUDE(${GEOM_ROOT_DIR}/adm_local/cmake_files/FindGEOM.cmake) + INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMED.cmake) + INCLUDE(${SMESH_ROOT_DIR}/adm_local/cmake_files/FindSMESH.cmake) + """) + pass + if self.module == "ghs3dprlplugin": + newlines.append(""" + SET(GEOM_ROOT_DIR $ENV{GEOM_ROOT_DIR}) + SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR}) + SET(SMESH_ROOT_DIR $ENV{SMESH_ROOT_DIR}) + INCLUDE(${GEOM_ROOT_DIR}/adm_local/cmake_files/FindGEOM.cmake) + INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMEDFILE.cmake) + INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMED.cmake) + INCLUDE(${SMESH_ROOT_DIR}/adm_local/cmake_files/FindSMESH.cmake) + """) + pass + if self.module == "visu": + newlines.append(""" + SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR}) + INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMED.cmake) + """) + pass + if self.module == "yacs": + newlines.append(""" + INCLUDE(${CMAKE_SOURCE_DIR}/adm/cmake/FindEXPAT.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/adm/cmake/FindGRAPHVIZ.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSPHINX.cmake) + """) + pass + if self.module == "hxx2salome": + newlines.append(""" + SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR}) + INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMEDFILE.cmake) + INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMED.cmake) + """) + pass pass pass pass # -- + newlines.append(""" + SET(DOXYGEN_IS_OK 0) + """) + if self.module not in ['med']: + newlines.append(""" + IF(WINDOWS) + SET(CPPUNIT_IS_OK 0) + ENDIF(WINDOWS) + """) + pass + # -- if self.module == "kernel": newlines.append(""" SET(WITH_LOCAL 1) SET(WITH_BATCH 1) - set(VERSION 4.1.3) - set(XVERSION 0x040103) + SET(CALCIUM_IDL_INT_F77 long) + SET(CALCIUM_CORBA_INT_F77 CORBA::Long) + SET(LONG_OR_INT int) """) elif self.module == "gui": newlines.append(""" @@ -480,19 +695,28 @@ class CMakeFile(object): SET(ENABLE_PLOT2DVIEWER ON) SET(ENABLE_PYCONSOLE ON) SET(ENABLE_SUPERVGRAPHVIEWER ON) - # SET(ENABLE_QXGRAPHVIEWER ON) + SET(ENABLE_QXGRAPHVIEWER ON) + """) + pass + elif self.module == "jobmanager": + newlines.append(""" + IF(GUI_ROOT_DIR) + SET(HAS_GUI ON) + ENDIF(GUI_ROOT_DIR) """) pass elif self.module == "geom": newlines.append(""" + IF(GUI_ROOT_DIR) SET(GEOM_ENABLE_GUI ON) + ENDIF(GUI_ROOT_DIR) """) pass elif self.module == "medfile": newlines.append(""" - SET(MED_NUM_MAJEUR 2) - SET(MED_NUM_MINEUR 3) - SET(MED_NUM_RELEASE 5) + SET(MED_NUM_MAJEUR 3) + SET(MED_NUM_MINEUR 0) + SET(MED_NUM_RELEASE 3) SET(LONG_OR_INT int) IF(NOT WINDOWS) SET(FLIBS -lgfortranbegin -lgfortran) @@ -501,19 +725,158 @@ class CMakeFile(object): pass elif self.module == "med": newlines.append(""" + IF(KERNEL_ROOT_DIR) SET(MED_ENABLE_KERNEL ON) + IF(NOT WINDOWS) + SET(MED_ENABLE_SPLITTER ON) + ENDIF(NOT WINDOWS) + ENDIF(KERNEL_ROOT_DIR) + IF(GUI_ROOT_DIR) SET(MED_ENABLE_GUI ON) + ENDIF(GUI_ROOT_DIR) + """) + pass + elif self.module == "smesh": + newlines.append(""" + IF(GUI_ROOT_DIR) + SET(SMESH_ENABLE_GUI ON) + ENDIF(GUI_ROOT_DIR) + """) + pass + elif self.module == "netgen": + newlines.append(""" + SET(OCCFLAGS ${CAS_CPPFLAGS}) + SET(OCCLIBS ${CAS_LDPATH}) + SET(OCCLIBS ${OCCLIBS} ${TKernel} ${TKGeomBase} ${TKMath} ${TKG2d} ${TKG3d} ${TKXSBase} ${TKOffset} ${TKFillet} ${TKShHealing}) + SET(OCCLIBS ${OCCLIBS} ${TKMesh} ${TKMeshVS} ${TKTopAlgo} ${TKGeomAlgo} ${TKBool} ${TKPrim} ${TKBO} ${TKIGES} ${TKBRep}) + SET(OCCLIBS ${OCCLIBS} ${TKSTEPBase} ${TKSTEP} ${TKSTL} ${TKSTEPAttr} ${TKSTEP209} ${TKXDESTEP} ${TKXDEIGES} ${TKXCAF} ${TKLCAF} ${FWOSPlugin}) + """) + pass + elif self.module == "netgenplugin": + newlines.append(""" + IF(GUI_ROOT_DIR) + SET(NETGENPLUGIN_ENABLE_GUI ON) + ENDIF(GUI_ROOT_DIR) + """) + pass + elif self.module == "blsurfplugin": + newlines.append(""" + IF(GUI_ROOT_DIR) + SET(BLSURFPLUGIN_ENABLE_GUI ON) + ENDIF(GUI_ROOT_DIR) + """) + pass + elif self.module == "ghs3dplugin": + newlines.append(""" + IF(GUI_ROOT_DIR) + SET(GHS3DPLUGIN_ENABLE_GUI ON) + ENDIF(GUI_ROOT_DIR) + """) + pass + elif self.module == "hexoticplugin": + newlines.append(""" + IF(GUI_ROOT_DIR) + SET(HEXOTICPLUGIN_ENABLE_GUI ON) + ENDIF(GUI_ROOT_DIR) + """) + pass + elif self.module == "ghs3dprlplugin": + newlines.append(""" + IF(GUI_ROOT_DIR) + SET(GHS3DPRLPLUGIN_ENABLE_GUI ON) + ENDIF(GUI_ROOT_DIR) + """) + pass + elif self.module == "yacs": + newlines.append(""" + SET(SALOME_KERNEL ON) + SET(HAS_GUI ON) + SET(WITH_QT4 ON) """) pass # -- + newlines.append(""" + set(VERSION 6.5.0) + set(SHORT_VERSION 6.5) + set(XVERSION 0x060500) + """) pass # -- newlines.append(""" + SET(VERSION_INFO 0.0.0) + SET(SOVERSION_INFO 0) SET(SUBDIRS) - SET(AM_CPPFLAGS) - SET(AM_CXXFLAGS) + SET(bin_PROGRAMS) + SET(AM_CPPFLAGS -I${CMAKE_BINARY_DIR} ) + SET(AM_CXXFLAGS -I${CMAKE_BINARY_DIR}) SET(LDADD) + SET(pythondir lib/python${PYTHON_VERSION}/site-packages) + SET(salomepythondir ${pythondir}/salome) + SET(salomepypkgdir ${salomepythondir}/salome) """) + + if self.module == "smesh" and self.root[-len('SMESH_PY'):] == 'SMESH_PY': + newlines.append(""" + SET(smeshpypkgdir ${salomepythondir}/salome/smesh) + """) + pass + if self.module == "netgen": + newlines.append(r''' + SET(AM_CXXFLAGS ${AM_CXXFLAGS} -DNO_PARALLEL_THREADS -DOCCGEOMETRY -I${CMAKE_CURRENT_SOURCE_DIR}) + ''') + elif self.module == "kernel": + newlines.append(r''' + SET(AM_CPPFLAGS ${AM_CPPFLAGS} -DHAVE_SALOME_CONFIG -I${CMAKE_BINARY_DIR}/salome_adm/unix -include SALOMEconfig.h) + SET(AM_CXXFLAGS ${AM_CXXFLAGS} -DHAVE_SALOME_CONFIG -I${CMAKE_BINARY_DIR}/salome_adm/unix -include SALOMEconfig.h) + ''') + else: + if self.module not in ["yacs"]: + newlines.append(r''' + IF(KERNEL_ROOT_DIR) + SET(AM_CPPFLAGS ${AM_CPPFLAGS} -DHAVE_SALOME_CONFIG -I${KERNEL_ROOT_DIR}/include/salome -include SALOMEconfig.h) + SET(AM_CXXFLAGS ${AM_CXXFLAGS} -DHAVE_SALOME_CONFIG -I${KERNEL_ROOT_DIR}/include/salome -include SALOMEconfig.h) + ENDIF(KERNEL_ROOT_DIR) + ''') + pass + if self.module == "gui": + newlines.append(r''' + IF(KERNEL_ROOT_DIR) + SET(AM_CPPFLAGS ${AM_CPPFLAGS} -DWITH_SALOMEDS_OBSERVER -DSUIT_ENABLE_PYTHON) + SET(AM_CXXFLAGS ${AM_CXXFLAGS} -DWITH_SALOMEDS_OBSERVER -DSUIT_ENABLE_PYTHON) + ENDIF(KERNEL_ROOT_DIR) + ''') + pass + if self.module in ["smesh", "netgenplugin", "blsurfplugin", "ghs3dplugin", "hexoticplugin"]: + newlines.append(r''' + SET(AM_CPPFLAGS ${AM_CPPFLAGS} -DWITH_SMESH_CANCEL_COMPUTE) + SET(AM_CXXFLAGS ${AM_CXXFLAGS} -DWITH_SMESH_CANCEL_COMPUTE) + ''') + pass + if self.module == "ghs3dplugin": + # TODO: Auto-detect TetGen-GHS3D version automatically + newlines.append(r''' + SET(AM_CPPFLAGS ${AM_CPPFLAGS} -DGHS3D_VERSION=42) + SET(AM_CXXFLAGS ${AM_CXXFLAGS} -DGHS3D_VERSION=42) + ''') + pass + if self.module == "hxx2salome": + key = "_SRC" + if self.the_root[-len(key):] != key: + msg = "Source dir must finished with %s !"%(key) + raise Exception(msg) + hxxmodule = self.the_root[:-len(key)] + from os.path import basename + hxxmodule = basename(hxxmodule) + hxxmodule = hxxmodule.lower() + self.hxxmodule = hxxmodule + newlines.append(r''' + SET(HXXCPP_ROOT_DIR $ENV{%sCPP_ROOT_DIR}) + SET(AM_CPPFLAGS ${AM_CPPFLAGS} -I${HXXCPP_ROOT_DIR}/include) + SET(AM_CXXFLAGS ${AM_CXXFLAGS} -I${HXXCPP_ROOT_DIR}/include) + SET(LDADD ${LDADD} -L${HXXCPP_ROOT_DIR}/lib) + '''%(hxxmodule.upper())) + pass + pass # -- return @@ -535,7 +898,21 @@ class CMakeFile(object): # If the line begins with 'include ', just comment it # -- if line.find("include ") == 0: - newlines.append("# " + line) + if line.find("include $(top_srcdir)/config/automake.common") == 0: + for l in [ + "MAINTAINERCLEANFILES = Makefile.in", + "AM_CPPFLAGS=-I$(top_srcdir)/include -I$(top_builddir)/include", + "AM_FFLAGS=-I$(top_srcdir)/include -I$(top_builddir)/include", + "AM_FCFLAGS=-I$(top_srcdir)/include -I$(top_builddir)/include", + "AM_CPPFLAGS+=@HDF5_CPPFLAGS@", + "AM_LDFLAGS=@HDF5_LDFLAGS@", + ]: + self.treatLine(l, newlines, opened_ifs) + pass + pass + else: + newlines.append("# " + line) + pass return # -- @@ -553,7 +930,7 @@ class CMakeFile(object): return # -- - # A particuliar case + # A particuliar case where there are two ":" on the same line # -- if line.find('install-exec-local:') == 0: newlines.append("# " + line) @@ -566,6 +943,25 @@ class CMakeFile(object): newlines.append("# " + line) return + # -- + # -- + key = "-version-info" + if line.find(key) >= 0: + # -- + before = line.split(key)[0] + after = line[len(before)+len(key):] + sep = after[0] + after = after[1:] + version_info = after.split()[0] + line = line.replace(key+sep+version_info, "") + # -- + version_info = version_info.replace(':', '.') + soversion_info = version_info.split('.')[0] + newlines.append("SET(VERSION_INFO " + version_info + ")") + newlines.append("SET(SOVERSION_INFO " + soversion_info + ")") + # -- + pass + # -- # Replace the $(TOTO) by ${TOTO} # Replace the @TOTO@ by ${TOTO} @@ -652,6 +1048,7 @@ class CMakeFile(object): # -- fields = value.split() + for i in range(len(fields)): newlines.append("%s %s"%(spaces, fields[i])) pass @@ -681,14 +1078,98 @@ class CMakeFile(object): return def finalize(self, newlines): - + # -- # Convert the .in files in build dir # -- + upmod = "" + if self.module == "hexoticplugin" : + upmod = "HexoticPLUGIN" + else : + upmod = self.module.upper() + + import operator + mod = self.module + if mod in ['kernel', 'gui'] and self.root[-len('gui'):] == 'gui' or mod == 'med' and operator.contains(self.root, 'doxygen'): + newlines.append(r''' + SET(top_builddir + ${CMAKE_BINARY_DIR} + ) + SET(top_srcdir + ${CMAKE_SOURCE_DIR} + ) + SET(srcdir + ${CMAKE_CURRENT_SOURCE_DIR} + ) + SET(builddir + ${CMAKE_CURRENT_BINARY_DIR} + ) + SET(datadir + ${CMAKE_INSTALL_PREFIX}/share + ) + SET(docdir + ${datadir}/doc/salome + ) + ''') + self.files.append("static/header.html.in") + elif self.root[-len(mod):] == upmod and operator.contains(self.root, 'doc') or mod in ['kernel', 'gui', 'geom', 'med', 'smesh', 'visu'] and self.root[-len('tui'):] == 'tui': + newlines.append(r''' + SET(top_builddir + ${CMAKE_BINARY_DIR} + ) + SET(top_srcdir + ${CMAKE_SOURCE_DIR} + ) + SET(srcdir + ${CMAKE_CURRENT_SOURCE_DIR} + ) + SET(builddir + ${CMAKE_CURRENT_BINARY_DIR} + ) + SET(datadir + ${CMAKE_INSTALL_PREFIX}/share + ) + SET(docdir + ${datadir}/doc/salome + ) + ''') + self.files.append("static/header.html.in") + if mod in ['geom', 'smesh', 'visu','netgenplugin','blsurfplugin','hexoticplugin','ghs3dplugin',"ghs3dprlplugin"] and self.root[-len(mod):] == upmod: + self.files.append("static/header_py.html.in") + + if self.module == "yacs": + key = "salomegui" + if self.root[-len(key):] == key: + self.files.append("resources/YACSCatalog.xml.in") + self.files.append("resources/SalomeApp.xml.in") + pass + pass + from os import path + if operator.contains(self.root, 'YACS_SRC'+path.sep+'doc'): + newlines.append(r''' + SET(srcdir + ${CMAKE_CURRENT_SOURCE_DIR} + ) + ''') + + if self.module == "jobmanager": + key = "salomegui" + if self.root[-len(key):] == key: + self.files.append("resources/SalomeApp.xml.in") + pass + pass for f in self.files: if f[-3:] == ".in": + if self.module == 'yacs' and f == "Doxyfile.in": + continue if f == "sstream.in": continue + if f in ["runContainer.in", "stopContainer.in"]: + if self.module == "med": + if self.root[-3:] == "csh": + continue + pass + pass if f == "SALOMEconfig.ref.in": out = "SALOMEconfig.h" else: @@ -706,7 +1187,147 @@ class CMakeFile(object): ''') pass pass - + + # -- + # add commands for generating of user's documentation + # -- + doc_gui_destination = "${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/%s"%(upmod) + doc_tui_destination = "${CMAKE_INSTALL_PREFIX}/share/doc/salome/tui/%s"%(upmod) + doc_destination = "${CMAKE_INSTALL_PREFIX}/share/doc/salome" + head_source = "${CMAKE_CURRENT_SOURCE_DIR}/images/head.png" + if mod == 'kernel': + prepare_generating_doc_src = "${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/prepare_generating_doc.py" + else: + prepare_generating_doc_src = "$ENV{KERNEL_ROOT_DIR}/bin/salome/prepare_generating_doc.py" + if mod in ['kernel', 'gui'] and self.root[-len('gui'):] == 'gui' or mod == 'med' and operator.contains(self.root, 'doxygen'): + if mod == 'med': + doc_source = "${CMAKE_CURRENT_BINARY_DIR}/doc_ref_user/html" + input = "Doxyfile_med_user" + else: + doc_source = "${CMAKE_CURRENT_BINARY_DIR}/%s"%(upmod) + input = "" + newlines.append("""\t ADD_CUSTOM_TARGET(usr_docs ${DOXYGEN_EXECUTABLE} %s + COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''%s''', True); shutil.copytree(r'''%s''', r'''%s'''); shutil.copy(r'''%s''', r'''%s''')" + VERBATIM + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + )"""%(input, doc_gui_destination, doc_source, doc_gui_destination, head_source, doc_gui_destination)) + from os import path + if mod in ['geom', 'smesh', 'visu', 'netgenplugin','blsurfplugin','hexoticplugin','ghs3dplugin','ghs3dprlplugin'] and self.root[-len(mod):] == upmod and operator.contains(self.root, 'doc'): + ign = r"""'*usr_docs*', '*CMakeFiles*', '*.cmake', 'doxyfile*', '*.vcproj', 'static', 'Makefile*'""" + if mod in ['geom', 'smesh']: + if mod == 'geom': + tmp = 'geompy' + input = "COMMAND ${DOXYGEN_EXECUTABLE} doxyfile_tui \n\t\t" + else: + tmp = 'smesh' + input = '' + newlines.append(r""" + IF(WINDOWS) + STRING(REPLACE "/" "\\" f "%s") + ELSE(WINDOWS) + SET(f "%s") + ENDIF(WINDOWS) + ADD_CUSTOM_TARGET(usr_docs ${PYTHON_EXECUTABLE} ${f} %s.py ${CMAKE_SOURCE_DIR}/src/%s_SWIG/%sDC.py %s + %sCOMMAND ${DOXYGEN_EXECUTABLE} doxyfile_py + COMMAND ${DOXYGEN_EXECUTABLE} doxyfile + COMMAND ${PYTHON_EXECUTABLE} -c "import os; os.remove(r'''%s.py''')" + COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''%s''', True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}''', r'''%s''', ignore=shutil.ignore_patterns(%s)); shutil.copy(r'''%s''', r'''%s''')" + VERBATIM + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + )"""%(prepare_generating_doc_src, prepare_generating_doc_src, tmp, upmod, tmp, tmp, input, tmp, doc_gui_destination, doc_gui_destination, ign, head_source, doc_gui_destination)) + else: + config_f = "" + if mod in ['netgenplugin','blsurfplugin','hexoticplugin','ghs3dplugin', "ghs3dprlplugin"] : + config_f = "doxyfile_py" + else: + config_f = "doxyfile_idl" + newlines.append("""\t ADD_CUSTOM_TARGET(usr_docs ${DOXYGEN_EXECUTABLE} %s + COMMAND ${DOXYGEN_EXECUTABLE} doxyfile + COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''%s''',True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}''',r'''%s''', ignore=shutil.ignore_patterns(%s)); shutil.copy(r'''%s''',r'''%s''')" + VERBATIM + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + )"""%(config_f, doc_gui_destination, doc_gui_destination, ign, head_source, doc_gui_destination)) + elif mod == 'yacs' and operator.contains(self.root, upmod + '_SRC'+path.sep+'doc'): + from sys import platform + params = ''; + if platform == "win32": + params = '-Q'; + newlines.append(r""" + ADD_CUSTOM_TARGET(html_docs ${SPHINX_EXECUTABLE} %s -c ${CMAKE_BINARY_DIR}/doc -b html ${ALLSPHINXOPTS} html + COMMAND ${PYTHON_EXECUTABLE} -c \"import shutil\;shutil.rmtree('''%s''', True)\;shutil.copytree('''${CMAKE_CURRENT_BINARY_DIR}/html''', '''%s''')\" + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})"""%(params, doc_gui_destination, doc_gui_destination)) + elif mod in ['kernel', 'smesh', 'geom'] and operator.contains(self.root, upmod + '_SRC'+path.sep+'doc'+path.sep+'docutils'): + from sys import platform + params = "" + ext = "" + prf = "" + if platform == "win32": + params = '-Q'; + ext = "bat" + prf = "call" + else: + ext = "sh" + prf = ". " + doc_gui_destination = "${CMAKE_INSTALL_PREFIX}/share/doc/salome/tui/%s/docutils"%(upmod) + scr = self.writeEnvScript(upmod) + newlines.append(r""" + IF(WINDOWS) + STRING(REPLACE "/" "\\" SCR "%s") + ELSE(WINDOWS) + SET(SCR "%s") + ENDIF(WINDOWS) + FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/env_s.%s "${SCR}") + ADD_CUSTOM_TARGET(html_docs %s ${CMAKE_CURRENT_BINARY_DIR}/env_s.%s && ${SPHINX_EXECUTABLE} %s -c ${CMAKE_BINARY_DIR}/doc/docutils -W -b html ${ALLSPHINXOPTS} html + COMMAND ${PYTHON_EXECUTABLE} -c \"import shutil\;shutil.rmtree('''%s''', True)\;shutil.copytree('''${CMAKE_CURRENT_BINARY_DIR}/html''', '''%s''')\" + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})"""%(scr,scr,ext,prf,ext,params, doc_gui_destination, doc_gui_destination)) + + + + + # -- + # add commands for generating of developer's documentation + # -- + + upmod = self.module.upper() + if mod in ['kernel', 'gui', 'med', 'smesh', 'visu'] and self.root[-len('tui'):] == 'tui': + if mod == 'kernel': + tmp = """\tADD_CUSTOM_TARGET(dev_docs ${DOXYGEN_EXECUTABLE} -u + COMMAND ${DOXYGEN_EXECUTABLE} + COMMAND ${PYTHON_EXECUTABLE} -c "import os; os.remove(r'''${CMAKE_CURRENT_BINARY_DIR}/doxyfile.bak''')" """ + tmp1="" + else: + tmp = """\tADD_CUSTOM_TARGET(dev_docs ${DOXYGEN_EXECUTABLE}""" + if mod == 'visu': + tmp1= r"""\n COMMAND ${PYTHON_EXECUTABLE} -c "from shutil import copy; copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/visuscreen.png''', r'''%s''')" """%(doc_tui_destination) + elif mod == 'smesh': + extra_srcdir = "${CMAKE_CURRENT_SOURCE_DIR}/extra" + tmp1= """\n COMMAND ${PYTHON_EXECUTABLE} -c "from shutil import copy; copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/smeshscreen.png''', r'''%s'''); copy(r'''%s/AddNetgenInSalome2.pdf''', r'''%s'''); copy(r'''%s/PluginMeshers.html''', r'''%s''')" + COMMAND ${PYTHON_EXECUTABLE} -c "from shutil import copy; copy(r'''%s/AddNetgenInSalome2.ps''', r'''%s'''); copy(r'''%s/AddNetgenInSalome2.sxw''', r'''%s''')" """%(doc_tui_destination, extra_srcdir,doc_destination, extra_srcdir,doc_destination, extra_srcdir,doc_destination,extra_srcdir,doc_destination) + else: + tmp1="" + doc_source = "${CMAKE_CURRENT_BINARY_DIR}/%s"%(upmod) + newlines.append(tmp + """ + COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''%s''', True); shutil.copytree(r'''%s''', r'''%s'''); shutil.copy(r'''%s''', r'''%s''')" """%(doc_tui_destination, doc_source, doc_tui_destination, head_source, doc_tui_destination) + tmp1 + """ + VERBATIM + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + )""") + if mod == 'geom' and self.root[-len('tui'):] == 'tui': + tmp = 'geompy' + doc_source = "${CMAKE_CURRENT_BINARY_DIR}/%s"%(upmod) + newlines.append(r""" + IF(WINDOWS) + STRING(REPLACE "/" "\\" f "%s") + ELSE(WINDOWS) + SET(f "%s") + ENDIF(WINDOWS) + ADD_CUSTOM_TARGET(dev_docs ${PYTHON_EXECUTABLE} ${f} ${CMAKE_BINARY_DIR}/src/%s_SWIG/%s.py ${CMAKE_SOURCE_DIR}/src/%s_SWIG/%sDC.py %s + COMMAND ${DOXYGEN_EXECUTABLE} doxyfile + COMMAND ${PYTHON_EXECUTABLE} -c "import os; os.remove(r'''${CMAKE_BINARY_DIR}/src/%s_SWIG/%s.py''')" + COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''%s''', True); shutil.copytree(r'''%s''', r'''%s'''); shutil.copy(r'''%s''', r'''%s'''); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/geomscreen.png''', r'''%s''')" + VERBATIM + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + )"""%(prepare_generating_doc_src, prepare_generating_doc_src, upmod, tmp, upmod, tmp, tmp, upmod, tmp, doc_tui_destination, doc_source, doc_tui_destination, head_source, doc_tui_destination, doc_tui_destination)) + # -- # convert the SUBDIRS in cmake grammar # -- @@ -722,7 +1343,7 @@ class CMakeFile(object): # -- # -- - for key in ["lib_LTLIBRARIES", "noinst_LTLIBRARIES", "salomepyexec_LTLIBRARIES"]: + for key in ["lib_LTLIBRARIES", "noinst_LTLIBRARIES", "salomepyexec_LTLIBRARIES", "libparaview_LTLIBRARIES"] : if self.__thedict__.has_key(key): self.addLibTarget(key, newlines) pass @@ -730,7 +1351,7 @@ class CMakeFile(object): # -- # -- - for key in ["bin_PROGRAMS"]: + for key in ["bin_PROGRAMS", "check_PROGRAMS"]: if self.__thedict__.has_key(key): self.addBinTarget(key, newlines) pass @@ -752,6 +1373,11 @@ class CMakeFile(object): key = "IDL_FILES" if self.__thedict__.has_key(key): + if self.module == "kernel": + newlines.append(''' + SET(IDL_FILES ${IDL_FILES} Calcium_Ports.idl) + ''') + pass newlines.append(''' FOREACH(input ${IDL_FILES}) STRING(REGEX REPLACE ".idl" "" base ${input}) @@ -759,16 +1385,39 @@ class CMakeFile(object): SET(outputs ${src}) SET(dynsrc ${CMAKE_CURRENT_BINARY_DIR}/${base}DynSK.cc) SET(outputs ${outputs} ${dynsrc}) + SET(inc ${CMAKE_CURRENT_BINARY_DIR}/${base}.hh) + SET(outputs ${outputs} ${inc}) + IF(input STREQUAL Calcium_Ports.idl) + SET(input ${CMAKE_CURRENT_BINARY_DIR}/${input}) + ELSE(input STREQUAL Calcium_Ports.idl) + SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${input}) + ENDIF(input STREQUAL Calcium_Ports.idl) + SET(flags ${IDLCXXFLAGS} ${OMNIORB_IDLCXXFLAGS}) + STRING(REGEX MATCH "-bcxx" ISBCXX ${flags}) + IF(NOT ISBCXX) + SET(flags -bcxx ${flags}) + ENDIF(NOT ISBCXX) ADD_CUSTOM_COMMAND( OUTPUT ${outputs} - COMMAND ${OMNIORB_IDL} ${IDLCXXFLAGS} ${OMNIORB_IDLCXXFLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/${input} + COMMAND ${OMNIORB_IDL} ${flags} ${input} MAIN_DEPENDENCY ${input} ) + ''') + newlines.append(''' install(FILES ${input} DESTINATION idl/salome) - SET(IDL_HEADER ${CMAKE_CURRENT_BINARY_DIR}/${base}.hh) - install(FILES ${IDL_HEADER} DESTINATION include/salome) + ''') + if self.module not in ["pyhello"]: + newlines.append(''' + SET(IDL_HEADER ${CMAKE_CURRENT_BINARY_DIR}/${base}.hh) + install(FILES ${IDL_HEADER} DESTINATION include/salome) + ''') + pass + newlines.append(''' INSTALL(CODE "SET(IDL_FILE ${input})") - INSTALL(CODE "SET(DIR lib/python${PYTHON_VERSION}/site-packages/salome)") + INSTALL(CODE "SET(DIR ${salomepythondir})") + IF(WINDOWS) + INSTALL(CODE "SET(DIR bin/salome)") + ENDIF(WINDOWS) INSTALL(CODE "SET(CMAKE_CURRENT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})") INSTALL(CODE "SET(OMNIORB_IDL_PYTHON ${OMNIORB_IDL_PYTHON})") # -- @@ -776,6 +1425,10 @@ class CMakeFile(object): FOREACH(f ${IDLPYFLAGS}) SET(flags "${flags} ${f}") ENDFOREACH(f ${IDLPYFLAGS}) + STRING(REGEX MATCH "-bpython" ISBPYTHON ${flags}) + IF(NOT ISBPYTHON) + SET(flags "-bpython ${flags}") + ENDIF(NOT ISBPYTHON) SET(IDLPYFLAGS ${flags}) STRING(REPLACE "\\\\" "/" IDLPYFLAGS ${IDLPYFLAGS}) INSTALL(CODE "SET(IDLPYFLAGS ${IDLPYFLAGS})") @@ -816,21 +1469,62 @@ class CMakeFile(object): ELSE(SWIG_SOURCES MATCHES ";") SET(SWIG_SOURCES_FIRST "${SWIG_SOURCES}") ENDIF(SWIG_SOURCES MATCHES ";") + SET(flags) + FOREACH(f ${SWIG_FLAGS} ${MY_SWIG_FLAGS}) + SET(test ON) + IF(flags) + LIST(FIND flags ${f} index) + IF(NOT index EQUAL -1) + SET(test OFF) + ENDIF(NOT index EQUAL -1) + ENDIF(flags) + IF(test) + SET(flags ${flags} ${f}) + ENDIF(test) + ENDFOREACH(f ${SWIG_FLAGS} ${MY_SWIG_FLAGS}) ADD_CUSTOM_COMMAND( OUTPUT ${build_srcs} - COMMAND ${SWIG_EXECUTABLE} ${SWIG_FLAGS} ${MY_SWIG_FLAGS} -o ${build_srcs} ${CMAKE_CURRENT_SOURCE_DIR}/${SWIG_SOURCES_FIRST} + COMMAND ${SWIG_EXECUTABLE} ${flags} -o ${build_srcs} ${CMAKE_CURRENT_SOURCE_DIR}/${SWIG_SOURCES_FIRST} MAIN_DEPENDENCY ${SWIG_SOURCES} ) ''') pass + # -- + # -- + if self.__thedict__.has_key("BUILT_SOURCES"): + newlines.append(''' + FOREACH(f ${BUILT_SOURCES}) + IF(f MATCHES "WRAP.cxx$") + # STRING(REGEX REPLACE "WRAP.cxx" "WRAP.h" inc ${f}) + STRING(REGEX REPLACE "WRAP.cxx" ".i" input ${f}) + ADD_CUSTOM_COMMAND( + OUTPUT ${f} # ${inc} + COMMAND ${SWIG_EXECUTABLE} ${SWIG_FLAGS} ${SWIG_PYTHON_INCLUDES} ${MYSWIG_FLAGS} -o ${f} ${CMAKE_CURRENT_SOURCE_DIR}/${input} + MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/${input} + ) + ENDIF(f MATCHES "WRAP.cxx$") + ENDFOREACH(f ${BUILT_SOURCES}) + ''') + pass + # -- # -- key = "MOC_FILES" if self.__thedict__.has_key(key): newlines.append(''' FOREACH(output ${MOC_FILES}) - STRING(REGEX REPLACE _moc.cxx .h input ${output}) + ''') + if self.module in ["jobmanager", "yacs"]: + newlines.append(''' + STRING(REGEX REPLACE _moc.cxx .hxx input ${output}) + ''') + else: + newlines.append(''' + STRING(REGEX REPLACE _moc.cxx .h input ${output}) + ''') + pass + newlines.append(''' SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${input}) SET(output ${CMAKE_CURRENT_BINARY_DIR}/${output}) ADD_CUSTOM_COMMAND( @@ -842,6 +1536,28 @@ class CMakeFile(object): ''') pass + # -- + # -- + key = "MOC_FILES_HXX" + if self.__thedict__.has_key(key): + newlines.append(''' + FOREACH(output ${MOC_FILES_HXX}) + ''') + newlines.append(''' + STRING(REGEX REPLACE _moc.cxx .hxx input ${output}) + ''') + newlines.append(''' + SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${input}) + SET(output ${CMAKE_CURRENT_BINARY_DIR}/${output}) + ADD_CUSTOM_COMMAND( + OUTPUT ${output} + COMMAND ${QT_MOC_EXECUTABLE} ${MOC_FLAGS} ${input} -o ${output} + MAIN_DEPENDENCY ${input} + ) + ENDFOREACH(output ${MOC_FILES_HXX}) + ''') + pass + # -- # -- key = "UIC_FILES" @@ -861,6 +1577,25 @@ class CMakeFile(object): ''') pass + # -- + # -- + key = "PYUIC_FILES" + if self.__thedict__.has_key(key): + newlines.append(''' + FOREACH(output ${PYUIC_FILES}) + STRING(REPLACE "_ui.py" ".ui" input ${output}) + SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${input}) + SET(output ${CMAKE_CURRENT_BINARY_DIR}/${output}) + ADD_CUSTOM_COMMAND( + OUTPUT ${output} + COMMAND ${PYUIC_EXECUTABLE} -o ${output} ${input} + MAIN_DEPENDENCY ${input} + ) + ENDFOREACH(output ${PYUIC_FILES}) + ADD_CUSTOM_TARGET(BUILD_PY_UI_FILES ALL DEPENDS ${PYUIC_FILES}) + ''') + pass + # -- # -- key = "QRC_FILES" @@ -900,31 +1635,129 @@ class CMakeFile(object): ENDFOREACH(input ${SIP_FILES}) ''') pass + + # -- + # For GUI/tools/dlgfactory + # -- + key = "UIC_FILES_QDIALOG" + if self.__thedict__.has_key(key): + newlines.append(''' + FOREACH(output ${UIC_FILES_QDIALOG} ${UIC_FILES_GDIALOG}) + STRING(REPLACE "ui_" "" input ${output}) + STRING(REPLACE ".hxx" ".ui" input ${input}) + SET(input_path ${CMAKE_CURRENT_SOURCE_DIR}/${input}) + IF (NOT EXISTS ${input_path}) + SET(input_path ${CMAKE_CURRENT_BINARY_DIR}/${input}) + ENDIF (NOT EXISTS ${input_path}) + ADD_CUSTOM_COMMAND( + OUTPUT ${output} + COMMAND ${QT_UIC_EXECUTABLE} -o ${output} ${input_path} + MAIN_DEPENDENCY ${input} + ) + ENDFOREACH(output ${UIC_FILES}) + + FOREACH(output ${MOC_FILES_QDIALOG} ${MOC_FILES_GDIALOG}) + STRING(REGEX REPLACE _moc.cxx .hxx input ${output}) + SET(input_path ${CMAKE_CURRENT_SOURCE_DIR}/${input}) + IF (NOT EXISTS ${input_path}) + SET(input_path ${CMAKE_CURRENT_BINARY_DIR}/${input}) + ENDIF (NOT EXISTS ${input_path}) + ADD_CUSTOM_COMMAND( + OUTPUT ${output} + COMMAND ${QT_MOC_EXECUTABLE} ${MOC_FLAGS} ${input_path} -o ${output} + MAIN_DEPENDENCY ${input} + ) + ENDFOREACH(output ${MOC_FILES}) + + ADD_CUSTOM_COMMAND( + OUTPUT QDialogTest.ui QDialogTest.hxx QDialogTest.cxx + COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/dlgfactory.py -n QDialogTest -t qdialog + DEPENDS __QDIALOG__.ui __QDIALOG__.hxx __QDIALOG__.cxx dlgfactory.py + ) + + ADD_CUSTOM_COMMAND( + OUTPUT GDialogTest.ui GDialogTest.hxx GDialogTest.cxx + COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/dlgfactory.py -n GDialogTest -t gdialog + DEPENDS __GDIALOG__.ui __GDIALOG__.hxx __GDIALOG__.cxx dlgfactory.py + ) + ''') + pass + + # -- + # For make check + # -- + for key in ["TESTS"]: + if self.__thedict__.has_key(key): + newlines.append(''' + SET(UNIT_TEST_PROG ${%s}) + '''%(key)) + self.__thedict__["UNIT_TEST_PROG"] = self.__thedict__[key] + pass + pass + key = "UNIT_TEST_PROG" + if self.__thedict__.has_key(key): + newlines.append(''' + FOREACH(input ${UNIT_TEST_PROG}) + GET_FILENAME_COMPONENT(ext ${input} EXT) + IF(ext STREQUAL .py) + SET(test ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/${input}) + ELSE(ext STREQUAL .py) + IF(WINDOWS) + SET(test ${CMAKE_CURRENT_BINARY_DIR}/${input}_exe.exe) + ELSE() + SET(test ${CMAKE_CURRENT_BINARY_DIR}/${input}_exe) + ENDIF() + ENDIF(ext STREQUAL .py) + ADD_TEST(${input} ${test}) + SET(fail_regex "KO") + SET_PROPERTY(TEST ${input} PROPERTY FAIL_REGULAR_EXPRESSION "${fail_regex}") + # IF(NOT WINDOWS) + # ADD_TEST(${input}_valgrind valgrind ${test}) + # SET_PROPERTY(TEST ${input}_valgrind PROPERTY FAIL_REGULAR_EXPRESSION "${fail_regex}") + # SET_PROPERTY(TEST ${input}_valgrind PROPERTY PASS_REGULAR_EXPRESSION "no leaks are possible") + # ENDIF() + ENDFOREACH(input ${UNIT_TEST_PROG}) + ''') + pass # -- # Treat the install targets # -- + resdir = self.module + if resdir == "hxx2salome": + resdir = self.hxxmodule + pass d = { - "salomeadmux_DATA" : "salome_adm/unix", - "dist_salomeadmux_DATA" : "salome_adm/unix", - "dist_salome_cmake_DATA" : "salome_adm/cmake_files", - "dist_salomem4_DATA" : "salome_adm/unix/config_files", - "dist_salome4depr_DATA" : "salome_adm/unix/config_files/DEPRECATED", - "dist_admlocalm4_DATA" : "adm_local/unix/config_files", - "dist_admlocal_cmake_DATA" : "adm_local/cmake_files", - "salomeinclude_DATA" : "include/salome", - "salomeinclude_HEADERS" : "include/salome", - "dist_salomeres_DATA" : "share/salome/resources/%s"%(self.module), - "nodist_salomeres_DATA" : "share/salome/resources/%s"%(self.module), - "nodist_salomeres_SCRIPTS" : "share/salome/resources/%s"%(self.module), - "dist_salomescript_SCRIPTS" : "bin/salome", - "dist_salomescript_DATA" : "bin/salome", - "dist_salomescript_PYTHON" : "bin/salome", - "nodist_salomescript_DATA" : "bin/salome", - "salomepython_PYTHON" : "lib/python${PYTHON_VERSION}/site-packages/salome", - "nodist_salomepython_PYTHON" : "lib/python${PYTHON_VERSION}/site-packages/salome", - "sharedpkgpython_PYTHON" : "lib/python${PYTHON_VERSION}/site-packages/salome/shared_modules", + "salomeadmux_DATA" : "salome_adm/unix", + "dist_salomeadmux_DATA" : "salome_adm/unix", + "dist_salome_cmake_DATA" : "salome_adm/cmake_files", + "dist_salomem4_DATA" : "salome_adm/unix/config_files", + "dist_salome4depr_DATA" : "salome_adm/unix/config_files/DEPRECATED", + "dist_admlocalm4_DATA" : "adm_local/unix/config_files", + "dist_admlocal_cmake_DATA" : "adm_local/cmake_files", + "salomeinclude_DATA" : "include/salome", + "salomeinclude_HEADERS" : "include/salome", + "nodist_salomeinclude_HEADERS" : "include/salome", + "dist_salomeres_DATA" : "share/salome/resources/%s"%(resdir), + "nodist_salomeres_DATA" : "share/salome/resources/%s"%(resdir), + "nodist_salomeres_SCRIPTS" : "share/salome/resources/%s"%(resdir), + "dist_salomescript_SCRIPTS" : "bin/salome", + "dist_salomescript_DATA" : "bin/salome", + "dist_salomescript_PYTHON" : "bin/salome", + "dist_appliskel_SCRIPTS" : "bin/salome/appliskel", + "dist_appliskel_PYTHON" : "bin/salome/appliskel", + "nodist_salomescript_DATA" : "bin/salome", + "salomepython_PYTHON" : "${salomepythondir}", + "nodist_salomepython_PYTHON" : "${salomepythondir}", + "dist_salomepython_DATA" : "${salomepythondir}", + "sharedpkgpython_PYTHON" : "${salomepythondir}/shared_modules", + "salomepypkg_PYTHON" : "${salomepypkgdir}", + "mypkgpython_PYTHON" : "${mypkgpythondir}", + "nodist_mypkgpython_PYTHON" : "${mypkgpythondir}", } + if self.module == "jobmanager": + d["bin_SCRIPTS"] = "bin" + pass if self.module == "medfile": d = { "include_HEADERS" : "include", @@ -933,6 +1766,14 @@ class CMakeFile(object): "doc_DATA" : "${docdir}", } pass + if self.module == "netgen": + d = { + "include_HEADERS" : "include", + "noinst_HEADERS" : "share/netgen/include", + "dist_pkgdata_DATA" : "share/netgen", + "dist_doc_DATA" : "share/doc/netgen", + } + pass for key, value in d.items(): if self.__thedict__.has_key(key): self.addInstallTarget(key, value, newlines) @@ -950,65 +1791,86 @@ class CMakeFile(object): # -- newlines.append(r''' IF(WINDOWS) - SET(libadd ${libadd} Userenv.lib Ws2_32.lib) + SET(targets) + SET(targets ${targets} MEFISTO2D) + FOREACH(target ${targets}) + IF(name STREQUAL ${target}) + SET(dir $ENV{F2CHOME}) + STRING(REPLACE "\\\\" "/" dir ${dir}) + SET(libadd ${libadd} ${dir}/LIBF77.lib) + SET(libadd ${libadd} ${dir}/LIBI77.lib) + ENDIF(name STREQUAL ${target}) + ENDFOREACH(target ${targets}) ELSE(WINDOWS) - SET(libadd ${libadd} -ldl -lpthread) + SET(targets) + SET(targets ${targets} MEFISTO2D) + FOREACH(target ${targets}) + IF(name STREQUAL ${target}) + SET(libadd ${libadd} -lf2c) + ENDIF(name STREQUAL ${target}) + ENDFOREACH(target ${targets}) ENDIF(WINDOWS) ''') # -- newlines.append(r''' - SET(libs ${${amname}_LIBADD} ${${amname}_LDADD} ${${amname}_LDFLAGS}) + SET(libs ${PLATFORM_LIBADD} ${PLATFORM_LDFLAGS} ${LDADD} ${${amname}_LIBADD} ${${amname}_LDADD} ${${amname}_LDFLAGS}) + FOREACH(lib SALOMEBasics SalomeBatch) + IF(name STREQUAL lib) + SET(libs ${libs} ${PTHREAD_LIBS}) + ENDIF(name STREQUAL lib) + ENDFOREACH(lib SALOMEBasics SalomeBatch) ''') - if key == "bin_PROGRAMS": - newlines.append(r''' - SET(libs ${libs} ${LDADD}) - ''') - pass # -- newlines.append(r''' FOREACH(lib ${libs}) GET_FILENAME_COMPONENT(ext ${lib} EXT) IF(ext STREQUAL .la) GET_FILENAME_COMPONENT(lib ${lib} NAME_WE) - STRING(REPLACE "lib" "" lib ${lib}) + STRING(REGEX REPLACE "^lib" "" lib ${lib}) ENDIF(ext STREQUAL .la) + SET(vars) + SET(vars ${vars} -no-undefined) + SET(vars ${vars} -lvtkWidgets) IF(WINDOWS) - SET(vars -Xlinker -export-dynamic -module -Wl,-E) - SET(vars ${vars} -lutil -lm) + SET(vars ${vars} -module) + SET(vars ${vars} -Wl,-E) + SET(vars ${vars} -Xlinker) + SET(vars ${vars} -export-dynamic) + SET(vars ${vars} -lm) + SET(vars ${vars} -lboost_thread) + SET(vars ${vars} -lboost_signals) + SET(vars ${vars} -pthread -lpthread -ldl) + ENDIF(WINDOWS) FOREACH(v ${vars}) IF(lib STREQUAL v) SET(lib) ENDIF(lib STREQUAL v) ENDFOREACH(v ${vars}) - ENDIF(WINDOWS) + SET(test OFF) + IF(lib) + STRING(REGEX MATCH "^-lQt" test ${lib}) + ENDIF(lib) + IF(NOT test) SET(libadd ${libadd} ${lib}) + ENDIF(NOT test) ENDFOREACH(lib ${libs}) - TARGET_LINK_LIBRARIES(${name} ${PTHREADS_LIBRARY} ${libadd}) + TARGET_LINK_LIBRARIES(${name} ${libadd}) ''') # -- newlines.append(r''' IF(WINDOWS) SET(targets) - SET(targets ${targets} SalomeHDFPersist) - SET(targets ${targets} medC) - SET(targets ${targets} medimport) - SET(targets ${targets} medimportcxx) + SET(targets ${targets} MEFISTO2D) FOREACH(target ${targets}) IF(name STREQUAL ${target}) - SET_TARGET_PROPERTIES(${name} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:LIBCMTD") + IF(CMAKE_BUILD_TYPE STREQUAL Debug) + SET_TARGET_PROPERTIES(${name} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:MSVCRT") + ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug) ENDIF(name STREQUAL ${target}) ENDFOREACH(target ${targets}) ENDIF(WINDOWS) ''') # -- - if self.module == "med": - newlines.append(r''' - IF(WINDOWS) - SET_TARGET_PROPERTIES(${name} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:LIBCMTD") - ENDIF(WINDOWS) - ''') - pass - # -- return def setCompilationFlags(self, key, newlines): @@ -1018,11 +1880,17 @@ class CMakeFile(object): SET(targets) SET(targets ${targets} SalomeIDLKernel) SET(targets ${targets} SalomeDS) + SET(targets ${targets} SALOMEDSTest) SET(targets ${targets} SALOMEDS_Client_exe) SET(targets ${targets} SalomeIDLGEOM) SET(targets ${targets} GEOMEngine) SET(targets ${targets} MEDEngine) SET(targets ${targets} SMESHEngine) + SET(targets ${targets} SMESH) + SET(targets ${targets} SalomeIDLSPADDER) + SET(targets ${targets} MeshJobManagerEngine) + SET(targets ${targets} StdMeshersEngine) + SET(targets ${targets} VISUEngineImpl) FOREACH(target ${targets}) IF(name STREQUAL ${target}) SET(var ${var} -DNOGDI) @@ -1031,9 +1899,26 @@ class CMakeFile(object): ENDIF(WINDOWS) ''') # -- + if self.module in ["medfile", "yacs"]: + newlines.append(r''' + IF(WINDOWS) + SET(var ${var} -DNOGDI) + ENDIF(WINDOWS) + ''') + pass + # -- newlines.append(r''' IF(WINDOWS) - SET(var ${var} -D_USE_MATH_DEFINES) + SET(targets) + SET(targets ${targets} MEFISTO2D) + FOREACH(target ${targets}) + IF(name STREQUAL ${target}) + SET(dir $ENV{F2CHOME}) + STRING(REPLACE "\\\\" "/" dir ${dir}) + SET(var ${var} -I${dir}) + SET(var ${var} -DF2C_BUILD) + ENDIF(name STREQUAL ${target}) + ENDFOREACH(target ${targets}) ENDIF(WINDOWS) ''') # -- @@ -1043,21 +1928,64 @@ class CMakeFile(object): SET(var ${var} -I${CMAKE_CURRENT_BINARY_DIR}) ''') pass - if key == "bin_PROGRAMS": + newlines.append(r''' + SET(var ${var} ${AM_CPPFLAGS}) + SET(var ${var} ${AM_CXXFLAGS}) + ''') + # -- + newlines.append(r''' + IF(type STREQUAL STATIC) + SET(var ${var} -fPIC) + ENDIF(type STREQUAL STATIC) + ''') + # -- + if self.module == "yacs": newlines.append(r''' - SET(var ${var} ${AM_CPPFLAGS}) - SET(var ${var} ${AM_CXXFLAGS}) + SET(var ${var} -DYACS_PTHREAD) + SET(var ${var} -DCMAKE_BUILD) + SET(var ${var} -DSALOME_KERNEL) + SET(var ${var} -DDSC_PORTS) + SET(var ${var} -DOMNIORB) ''') pass newlines.append(r''' - SET(var ${var} ${PLATFORM_CPPFLAGS}) - SET(var ${var} ${PTHREADS_INCLUDES}) - SET(var ${var} ${${amname}_CPPFLAGS}) - SET(var ${var} ${${amname}_CXXFLAGS}) - SET(var ${var} ${${amname}_CFLAGS}) + SET(var ${var} ${PLATFORM_CPPFLAGS}) + SET(var ${var} ${PTHREAD_CFLAGS}) + SET(var ${var} ${${amname}_CPPFLAGS}) + SET(var ${var} ${${amname}_CXXFLAGS}) + SET(var ${var} ${${amname}_CFLAGS}) + SET(vars) + IF(WINDOWS) + SET(vars ${vars} -include SALOMEconfig.h) + SET(vars ${vars} -ftemplate-depth-32) + SET(vars ${vars} -fPIC) + SET(vars ${vars} -g) + ENDIF(WINDOWS) SET(flags) FOREACH(f ${var}) + FOREACH(v ${vars}) + IF(f STREQUAL v) + SET(f) + ENDIF(f STREQUAL v) + ENDFOREACH(v ${vars}) + IF(f) + string(REGEX MATCH "^-I" test_include ${f}) + if(test_include) + string(REGEX REPLACE "^-I" "" include_dir ${f}) + if(include_dir) + if(include_dir STREQUAL /usr/include) + else(include_dir STREQUAL /usr/include) + string(REGEX MATCH "^\\." test_dot ${include_dir}) + if(test_dot) + set(include_dir ${CMAKE_CURRENT_BINARY_DIR}/${include_dir}) + endif(test_dot) + include_directories(${include_dir}) + endif(include_dir STREQUAL /usr/include) + endif(include_dir) + else(test_include) SET(flags "${flags} ${f}") + endif(test_include) + ENDIF(f) ENDFOREACH(f ${var}) SET_TARGET_PROPERTIES(${name} PROPERTIES COMPILE_FLAGS "${flags}") ''') @@ -1113,6 +2041,15 @@ class CMakeFile(object): SET(type SHARED) ENDIF(ISIDL) ''') + if key == "noinst_LTLIBRARIES": + newlines.append(r''' + IF(WINDOWS) + SET(type STATIC) + ELSE(WINDOWS) + SET(type STATIC) + ENDIF(WINDOWS) + ''') + pass # -- # Set sources for the library # -- @@ -1121,6 +2058,23 @@ class CMakeFile(object): FOREACH(src ${${amname}_SOURCES} ${dist_${amname}_SOURCES}) GET_FILENAME_COMPONENT(ext ${src} EXT) IF(ext STREQUAL .f) + IF(src STREQUAL trte.f) + SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${src}) + STRING(REPLACE ".f" ".c" src ${src}) + SET(src ${CMAKE_CURRENT_BINARY_DIR}/${src}) + SET(output ${src}) + SET(cmd f2c) + IF(NOT WINDOWS) + IF(CMAKE_SIZEOF_VOID_P STREQUAL 8) + SET(cmd valgrind f2c) # f2c seems to be buggy on 64 bits ... but with valgrind, it works :) + ENDIF() + ENDIF(NOT WINDOWS) + ADD_CUSTOM_COMMAND( + OUTPUT ${output} + COMMAND ${cmd} ${input} + MAIN_DEPENDENCY ${input} + ) + ELSE(src STREQUAL trte.f) SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${src}) STRING(REPLACE ".f" ".o" src ${src}) SET(src ${CMAKE_CURRENT_BINARY_DIR}/${src}) @@ -1135,18 +2089,40 @@ class CMakeFile(object): COMMAND ${F77} -c -o ${output} ${input} MAIN_DEPENDENCY ${input} ) + ENDIF(src STREQUAL trte.f) ENDIF(ext STREQUAL .f) SET(srcs ${srcs} ${src}) ENDFOREACH(src ${${amname}_SOURCES} ${dist_${amname}_SOURCES}) + ''') + newlines.append(r''' + SET(l ${nodist_${amname}_SOURCES} ${UIC_FILES}) + FOREACH(f ${l}) + SET(src ${CMAKE_CURRENT_BINARY_DIR}/${f}) + SET(srcs ${srcs} ${src}) + ENDFOREACH(f ${l}) + ''') + newlines.append(r''' SET(build_srcs) - FOREACH(f ${nodist_${amname}_SOURCES} ${BUILT_SOURCES}) + SET(l ${nodist_${amname}_SOURCES} ${BUILT_SOURCES}) + FOREACH(f ${l}) GET_FILENAME_COMPONENT(ext ${f} EXT) IF(ext STREQUAL .py) + SET(fff) ELSE(ext STREQUAL .py) - SET(build_srcs ${build_srcs} ${CMAKE_CURRENT_BINARY_DIR}/${f}) + SET(fff ${CMAKE_CURRENT_BINARY_DIR}/${f}) ENDIF(ext STREQUAL .py) - ENDFOREACH(f ${nodist_${amname}_SOURCES}) - SET(srcs ${build_srcs} ${srcs}) + IF(fff) + IF(build_srcs) + LIST(FIND build_srcs ${fff} index) + IF(NOT index EQUAL -1) + SET(fff) + ENDIF(NOT index EQUAL -1) + ENDIF(build_srcs) + ENDIF(fff) + IF(fff) + SET(build_srcs ${build_srcs} ${fff}) + ENDIF(fff) + ENDFOREACH(f ${l}) ''') # -- # Add the library to cmake @@ -1160,132 +2136,41 @@ class CMakeFile(object): self.setCompilationFlags(key, newlines) # -- newlines.append(r''' - SET_TARGET_PROPERTIES(${name} PROPERTIES VERSION 0.0.0 SOVERSION 0) - FOREACH(lib medC med) - IF(lib STREQUAL ${name}) - SET_TARGET_PROPERTIES(${name} PROPERTIES VERSION 1.1.5 SOVERSION 1) - ENDIF(lib STREQUAL ${name}) - ENDFOREACH(lib medC med) - ''') - # -- - from os.path import basename - upper_name = basename(self.root).upper() - # -- - if upper_name in ["2.1.X", "2.3.1"]: - upper_name = "D_" + upper_name - pass - # -- - newlines.append(r''' - SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL %s_EXPORTS) - '''%(upper_name)) - newlines.append(r''' - IF(name STREQUAL SalomeLauncher) - SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL SALOME%s_EXPORTS) - ENDIF(name STREQUAL SalomeLauncher) - '''%(upper_name)) - newlines.append(r''' - IF(name STREQUAL SalomeResourcesManager) - SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL SALOME%s_EXPORTS) - ENDIF(name STREQUAL SalomeResourcesManager) - '''%(upper_name)) - newlines.append(r''' - IF(name STREQUAL GEOMObject) - SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL GEOM_%s_EXPORTS) - ENDIF(name STREQUAL GEOMObject) - '''%(upper_name)) - newlines.append(r''' - IF(name STREQUAL medC) - SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL MEDC_DLL_EXPORTS) - ENDIF(name STREQUAL medC) - ''') - newlines.append(r''' - IF(name STREQUAL med) - SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL MED_DLL_EXPORTS) - ENDIF(name STREQUAL med) - ''') - newlines.append(r''' - IF(name STREQUAL medimport) - SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL MEDIMPORT_DLL_EXPORTS) - ENDIF(name STREQUAL medimport) - ''') - newlines.append(r''' - IF(name STREQUAL medimportcxx) - SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL MEDIMPORTCXX_DLL_EXPORTS) - ENDIF(name STREQUAL medimportcxx) - ''') - newlines.append(r''' - IF(name STREQUAL MEDWrapperBase) - SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL MEDWRAPPER_BASE_EXPORTS) - ENDIF(name STREQUAL MEDWrapperBase) - ''') - newlines.append(r''' - IF(name STREQUAL MEDWrapper_V2_1) - SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL MEDWRAPPER_V2_1_EXPORTS) - ENDIF(name STREQUAL MEDWrapper_V2_1) - ''') - newlines.append(r''' - IF(name STREQUAL med_V2_1) - SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL MEDWRAPPER_V2_1_CORE_EXPORTS) - ENDIF(name STREQUAL med_V2_1) - ''') - newlines.append(r''' - IF(name STREQUAL MEDWrapper_V2_2) - SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL MEDWRAPPER_V2_2_EXPORTS) - ENDIF(name STREQUAL MEDWrapper_V2_2) - ''') - newlines.append(r''' - IF(name STREQUAL MEDWrapper) - SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL MEDWRAPPER_FACTORY_EXPORTS) - ENDIF(name STREQUAL MEDWrapper) - ''') - newlines.append(r''' - IF(name STREQUAL interpkernel) - SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL INTERPKERNEL_EXPORTS) - ENDIF(name STREQUAL interpkernel) - ''') - newlines.append(r''' - IF(name STREQUAL SMESHControls) - SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL SMESHCONTROLS_EXPORTS) - ENDIF(name STREQUAL SMESHControls) - ''') - newlines.append(r''' - IF(name STREQUAL MeshDriver) - SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL MESHDRIVER_EXPORTS) - ENDIF(name STREQUAL MeshDriver) - ''') - newlines.append(r''' - IF(name STREQUAL MeshDriverMED) - SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL MESHDRIVERMED_EXPORTS) - ENDIF(name STREQUAL MeshDriverMED) - ''') - newlines.append(r''' - IF(name STREQUAL MeshDriverDAT) - SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL MESHDRIVERDAT_EXPORTS) - ENDIF(name STREQUAL MeshDriverDAT) - ''') - newlines.append(r''' - IF(name STREQUAL MeshDriverUNV) - SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL MESHDRIVERUNV_EXPORTS) - ENDIF(name STREQUAL MeshDriverUNV) - ''') - newlines.append(r''' - IF(name STREQUAL MeshDriverSTL) - SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL MESHDRIVERSTL_EXPORTS) - ENDIF(name STREQUAL MeshDriverSTL) - ''') - newlines.append(r''' - IF(name STREQUAL MEFISTO2D) - SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL MEFISTO2D_EXPORTS) - ENDIF(name STREQUAL MEFISTO2D) + SET_TARGET_PROPERTIES(${name} PROPERTIES VERSION ${VERSION_INFO} SOVERSION ${SOVERSION_INFO}) ''') # -- self.setLibAdd(key, newlines) # -- if 1: # key != "noinst_LTLIBRARIES": - if self.module == "medfile": + newlines.append(r''' + SET(key %s) + '''%(key)) + newlines.append(r''' + SET(test ON) + IF(${key} STREQUAL noinst_LTLIBRARIES) + SET(test OFF) + ENDIF(${key} STREQUAL noinst_LTLIBRARIES) + ''') + if self.module == "netgen" : + newlines.append(r''' + IF(${key} STREQUAL noinst_LTLIBRARIES) + IF(WINDOWS) + SET(test ON) + ENDIF(WINDOWS) + ENDIF(${key} STREQUAL noinst_LTLIBRARIES) + ''') + pass + newlines.append(r''' + IF(test) + ''') + if self.module in ["medfile", "netgen"]: newlines.append(r''' SET(DEST lib) ''') + elif key == "libparaview_LTLIBRARIES": + newlines.append(r''' + SET(DEST lib/paraview) + ''') else: newlines.append(r''' SET(DEST lib/salome) @@ -1295,6 +2180,34 @@ class CMakeFile(object): IF(BEGIN_WITH_lib) INSTALL(TARGETS ${name} DESTINATION ${DEST}) ''') + if self.module == "gui": + newlines.append(r''' + FOREACH(lib SalomePyQt) + IF(name STREQUAL lib) + IF(WINDOWS) + IF(CMAKE_BUILD_TYPE STREQUAL Release) + INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${DEST}/${name}.dll DESTINATION ${DEST} RENAME ${name}.pyd) + ELSE(CMAKE_BUILD_TYPE STREQUAL Release) + INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${DEST}/${name}.dll DESTINATION ${DEST} RENAME ${name}_d.pyd) + ENDIF(CMAKE_BUILD_TYPE STREQUAL Release) + ELSE(WINDOWS) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/lib${name}.so DESTINATION ${DEST} RENAME ${name}.so) + ENDIF(WINDOWS) + ENDIF(name STREQUAL lib) + ENDFOREACH(lib SalomePyQt) + FOREACH(lib SalomePy) + IF(name STREQUAL lib) + IF(WINDOWS) + IF(CMAKE_BUILD_TYPE STREQUAL Release) + INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${DEST}/${name}.dll DESTINATION ${DEST} RENAME lib${name}.pyd) + ELSE(CMAKE_BUILD_TYPE STREQUAL Release) + INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${DEST}/${name}.dll DESTINATION ${DEST} RENAME lib${name}_d.pyd) + ENDIF(CMAKE_BUILD_TYPE STREQUAL Release) + ENDIF(WINDOWS) + ENDIF(name STREQUAL lib) + ENDFOREACH(lib SalomePy) + ''') + pass if self.module == "geom": newlines.append(r''' IF(WINDOWS) @@ -1310,22 +2223,30 @@ class CMakeFile(object): ''') pass newlines.append(r''' - IF(name STREQUAL SalomePyQt) - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/lib${name}.so DESTINATION ${DEST} RENAME ${name}.so) - ENDIF(name STREQUAL SalomePyQt) ELSE(BEGIN_WITH_lib) + ''') + newlines.append(r''' IF(WINDOWS) - INSTALL(TARGETS ${name} DESTINATION lib/python${PYTHON_VERSION}/site-packages/salome) - INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/lib/python${PYTHON_VERSION}/site-packages/salome/${name}.dll DESTINATION lib/python${PYTHON_VERSION}/site-packages/salome RENAME ${name}_d.pyd) + INSTALL(TARGETS ${name} DESTINATION ${salomepythondir}) + IF(CMAKE_BUILD_TYPE STREQUAL Release) + INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${salomepythondir}/${name}.dll DESTINATION ${salomepythondir} RENAME ${name}.pyd) + ELSE(CMAKE_BUILD_TYPE STREQUAL Release) + INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${salomepythondir}/${name}.dll DESTINATION ${salomepythondir} RENAME ${name}_d.pyd) + ENDIF(CMAKE_BUILD_TYPE STREQUAL Release) ELSE(WINDOWS) GET_TARGET_PROPERTY(version ${name} VERSION) GET_TARGET_PROPERTY(soversion ${name} SOVERSION) - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/lib${name}.so.${version} DESTINATION lib/python${PYTHON_VERSION}/site-packages/salome RENAME ${name}.so.${version}) - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/lib${name}.so.${version} DESTINATION lib/python${PYTHON_VERSION}/site-packages/salome RENAME ${name}.so.${soversion}) - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/lib${name}.so.${version} DESTINATION lib/python${PYTHON_VERSION}/site-packages/salome RENAME ${name}.so) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/lib${name}.so.${version} DESTINATION ${salomepythondir} RENAME ${name}.so.${version}) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/lib${name}.so.${version} DESTINATION ${salomepythondir} RENAME ${name}.so.${soversion}) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/lib${name}.so.${version} DESTINATION ${salomepythondir} RENAME ${name}.so) ENDIF(WINDOWS) + ''') + newlines.append(r''' ENDIF(BEGIN_WITH_lib) ''') + newlines.append(r''' + ENDIF(test) + ''') pass # -- newlines.append(r''' @@ -1337,12 +2258,34 @@ class CMakeFile(object): def addBinTarget(self, key, newlines): # -- newlines.append(r''' - FOREACH(amname ${bin_PROGRAMS}) + FOREACH(amname ${%s}) + '''%(key)) + # -- + newlines.append(r''' + SET(test ON) + ''') + if key == "check_PROGRAMS": + newlines.append(r''' + IF(bin_PROGRAMS) + STRING(REGEX MATCH ${amname} is_present ${bin_PROGRAMS}) + IF(is_present) + SET(test OFF) + ENDIF(is_present) + ENDIF(bin_PROGRAMS) + ''') + pass + newlines.append(r''' + IF(test) ''') # -- newlines.append(r''' SET(name "${amname}_exe") SET(srcs ${${amname}_SOURCES} ${dist_${amname}_SOURCES}) + SET(l ${nodist_${amname}_SOURCES}) + FOREACH(f ${l}) + SET(src ${CMAKE_CURRENT_BINARY_DIR}/${f}) + SET(srcs ${srcs} ${src}) + ENDFOREACH(f ${l}) LIST(LENGTH srcs nb) IF(nb) ADD_EXECUTABLE(${name} ${srcs}) @@ -1352,7 +2295,7 @@ class CMakeFile(object): # -- self.setLibAdd(key, newlines) # -- - if self.module == "medfile": + if self.module in ["jobmanager", "medfile", "netgen"]: newlines.append(r''' SET(DEST bin) ''') @@ -1362,27 +2305,32 @@ class CMakeFile(object): ''') pass # -- - newlines.append(r''' - IF(WINDOWS) - INSTALL(TARGETS ${name} DESTINATION ${DEST}) - INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${DEST}/${name}.exe DESTINATION ${DEST} RENAME ${amname}.exe) - INSTALL(CODE "FILE(REMOVE ${CMAKE_INSTALL_PREFIX}/${DEST}/${name}.exe)") - ELSE(WINDOWS) - SET(PERMS) - SET(PERMS ${PERMS} OWNER_READ OWNER_WRITE OWNER_EXECUTE) - SET(PERMS ${PERMS} GROUP_READ GROUP_EXECUTE) - SET(PERMS ${PERMS} WORLD_READ WORLD_EXECUTE) - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${name} DESTINATION ${DEST} PERMISSIONS ${PERMS} RENAME ${amname}) - ENDIF(WINDOWS) - ''') + if key == "bin_PROGRAMS": + newlines.append(r''' + IF(WINDOWS) + INSTALL(TARGETS ${name} DESTINATION ${DEST}) + INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${DEST}/${name}.exe DESTINATION ${DEST} RENAME ${amname}.exe) + INSTALL(CODE "FILE(REMOVE ${CMAKE_INSTALL_PREFIX}/${DEST}/${name}.exe)") + ELSE(WINDOWS) + SET(PERMS) + SET(PERMS ${PERMS} OWNER_READ OWNER_WRITE OWNER_EXECUTE) + SET(PERMS ${PERMS} GROUP_READ GROUP_EXECUTE) + SET(PERMS ${PERMS} WORLD_READ WORLD_EXECUTE) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${name} DESTINATION ${DEST} PERMISSIONS ${PERMS} RENAME ${amname}) + ENDIF(WINDOWS) + ''') + pass # -- newlines.append(r''' ENDIF(nb) ''') # -- newlines.append(r''' - ENDFOREACH(amname ${bin_PROGRAMS}) + ENDIF(test) ''') + newlines.append(r''' + ENDFOREACH(amname ${%s}) + '''%(key)) # -- return @@ -1402,7 +2350,9 @@ class CMakeFile(object): FIND_FILE(dummy ${f} PATHS ${CMAKE_CURRENT_SOURCE_DIR} NO_DEFAULT_PATH) IF(dummy) ''') - if key in ['dist_salomescript_SCRIPTS']: + if key in ['dist_salomescript_SCRIPTS', + 'dist_appliskel_SCRIPTS', + 'dist_appliskel_PYTHON']: newlines.append(r''' SET(PERMS) SET(PERMS ${PERMS} OWNER_READ OWNER_WRITE OWNER_EXECUTE) @@ -1412,7 +2362,20 @@ class CMakeFile(object): ''') else: newlines.append(r''' + GET_FILENAME_COMPONENT(ext ${f} EXT) + IF(ext STREQUAL .py) + IF(DEST STREQUAL bin/salome) + SET(PERMS) + SET(PERMS ${PERMS} OWNER_READ OWNER_WRITE OWNER_EXECUTE) + SET(PERMS ${PERMS} GROUP_READ GROUP_EXECUTE) + SET(PERMS ${PERMS} WORLD_READ WORLD_EXECUTE) + INSTALL(FILES ${f} DESTINATION ${DEST} PERMISSIONS ${PERMS}) + ELSE(DEST STREQUAL bin/salome) INSTALL(FILES ${f} DESTINATION ${DEST}) + ENDIF(DEST STREQUAL bin/salome) + ELSE(ext STREQUAL .py) + INSTALL(FILES ${f} DESTINATION ${DEST}) + ENDIF(ext STREQUAL .py) ''') pass newlines.append(r''' @@ -1421,7 +2384,7 @@ class CMakeFile(object): IF(ext STREQUAL .qm) STRING(REGEX REPLACE .qm .ts input ${f}) ''') - if self.module in ["kernel", "gui"]: + if self.module in ["kernel", "gui", "yacs"]: newlines.append(r''' SET(input ${CMAKE_CURRENT_SOURCE_DIR}/resources/${input}) ''') @@ -1443,6 +2406,33 @@ class CMakeFile(object): ENDIF(dummy) ENDIF(test_SALOMEconfig.h.in) ''') + newlines.append(r''' + GET_FILENAME_COMPONENT(ext ${f} EXT) + IF(ext STREQUAL .py) + INSTALL(CODE "SET(PYTHON_FILE ${f})") + INSTALL(CODE "SET(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})") + INSTALL(CODE "SET(DEST ${DEST})") + INSTALL(CODE "SET(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})") + ''') + if self.module == "kernel": + newlines.append(''' + IF(f STREQUAL SALOME_ContainerPy.py) + ELSE(f STREQUAL SALOME_ContainerPy.py) + IF(f STREQUAL am2cmake.py) + ELSE(f STREQUAL am2cmake.py) + INSTALL(SCRIPT ${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/install_and_compile_python_file.cmake) + ENDIF(f STREQUAL am2cmake.py) + ENDIF(f STREQUAL SALOME_ContainerPy.py) + ''') + else: + newlines.append(''' + STRING(REPLACE "\\\\" "/" KERNEL_ROOT_DIR ${KERNEL_ROOT_DIR}) + INSTALL(SCRIPT ${KERNEL_ROOT_DIR}/salome_adm/cmake_files/install_and_compile_python_file.cmake) + ''') + pass + newlines.append(r''' + ENDIF(ext STREQUAL .py) + ''') newlines.append(r"ENDFOREACH(f ${%s})"%(key)) return @@ -1451,7 +2441,72 @@ class CMakeFile(object): f.write(self.content) f.close() return - + + def writeEnvScript(self, upmod): + from sys import platform, version_info + p_version = """%s.%s"""%(version_info[0],version_info[1]) + python_path ="PYTHONPATH" + path = "" + begin = "" + end = "" + delim = "" + cmd = "" + pdir = "" + omni = "" + omni_py = "" + if platform == "win32" : + path = "PATH" + begin = "%" + end = "%" + delim = ";" + cmd = "@SET " + omni = "/x86_win32" + omni_py = "/python" + pdir = "PDIR" + else: + path = "LD_LIBRARY_PATH" + begin = "\${" + end = "}" + delim = ":" + cmd = "export " + omni_py = "/python" + p_version + "/" + "site-packages" + pdir = "INST_ROOT" + + + path_ = begin + path + end + root_dir_ = begin + upmod + "_ROOT_DIR" + end + python_path_ = begin + python_path + end + _python_path_ = delim + python_path_+ "\n" + _path_ = delim + path_+ "\n" + _pdir = begin + pdir + end + + + script = cmd + " " + python_path + "=" + root_dir_+"/lib/python" + p_version \ + + "/site-packages/salome" + _python_path_ + + script = script + cmd + " " + python_path + "=" + root_dir_+"/bin/salome" + \ + _python_path_ + + script = script + cmd + " "+ path + "=" + root_dir_+"/lib/salome"+ _path_ + + if upmod == "KERNEL" : + script = script + cmd + " " + python_path + "=" + _pdir + \ + "/omniORB-4.1.5/lib" + omni + _python_path_ + + script = script + cmd + " " + python_path + "=" + _pdir + \ + "/omniORB-4.1.5/lib" + omni_py + _python_path_ + + script = script + cmd + " "+ path + "=" + _pdir+ "/omniORB-4.1.5/lib" + \ + omni + _path_ + + if upmod == "GEOM" : + script = self.writeEnvScript("KERNEL") + script + script = self.writeEnvScript("GUI") + script + + if upmod == "SMESH" : + script = self.writeEnvScript("GEOM") + script + + return script pass def convertAmFile(the_root, root, dirs, files, f, module): @@ -1485,16 +2540,58 @@ if __name__ == "__main__": from os import getcwd the_root = getcwd() # + nok = 0 + # + from os import getenv from os import walk for root, dirs, files in walk(the_root): - from os.path import basename - if basename(root) == "CVS": continue + # -- + # E.A. : Remove 'CVS' in dirs + # E.A. : It allows to not recurse in CVS dirs + # E.A. : See os module python documentation + # -- + try: + dirs.remove('CVS') + except ValueError: + pass + # -- + if "Makefile.am.cmake" in files: + if "Makefile.am" in files: + files.remove("Makefile.am") + pass + pass + # -- for f in files: - from os.path import basename - if basename(f) == "Makefile.am": - convertAmFile(the_root, root, dirs, files, f, module) + if f in ["Makefile.am", "Makefile.am.cmake"]: + convert = True + if getenv("AM2CMAKE_FORCE_GENERATION", "0")=="0": + # detect if conversion should be done + if "CMakeLists.txt" in files: + from os.path import join + ff = open(join(root, "CMakeLists.txt")) + content = ff.read() + ff.close() + if content.find("generated by am2cmake") == -1: + convert = False + pass + pass + pass + if convert: + convertAmFile(the_root, root, dirs, files, f, module) + nok += 1 pass pass pass # + from sys import stdout + if nok: + if nok == 1: + msg = "%s file has been converted to cmake"%(nok) + else: + msg = "%s files have been converted to cmake"%(nok) + pass + stdout.write(msg) + stdout.write("\n") + stdout.flush() + pass pass diff --git a/salome_adm/cmake_files/install_and_compile_python_file.cmake b/salome_adm/cmake_files/install_and_compile_python_file.cmake new file mode 100644 index 000000000..ffbb3f488 --- /dev/null +++ b/salome_adm/cmake_files/install_and_compile_python_file.cmake @@ -0,0 +1,28 @@ +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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 +# + +SET(FULLDIR ${CMAKE_INSTALL_PREFIX}/${DEST}) +MESSAGE(STATUS "py compiling ${FULLDIR}/${PYTHON_FILE}") +SET(CMD "import py_compile ; py_compile.compile('${FULLDIR}/${PYTHON_FILE}')") +EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "${CMD}") +SET(CMD "import py_compile ; py_compile.compile('${FULLDIR}/${PYTHON_FILE}')") +EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -O -c "${CMD}") diff --git a/salome_adm/cmake_files/install_python_from_idl.cmake b/salome_adm/cmake_files/install_python_from_idl.cmake index da4eed0e2..24faa8e66 100644 --- a/salome_adm/cmake_files/install_python_from_idl.cmake +++ b/salome_adm/cmake_files/install_python_from_idl.cmake @@ -1,25 +1,26 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + SET(FULLDIR ${CMAKE_INSTALL_PREFIX}/${DIR}) FILE(MAKE_DIRECTORY ${FULLDIR}) MESSAGE(STATUS "Compiling ${IDL_FILE} into ${FULLDIR}") -EXECUTE_PROCESS(COMMAND ${OMNIORB_IDL_PYTHON} ${IDLPYFLAGS} -C${FULLDIR} ${CMAKE_CURRENT_SOURCE_DIR}/${IDL_FILE}) +EXECUTE_PROCESS(COMMAND ${OMNIORB_IDL_PYTHON} ${IDLPYFLAGS} -C${FULLDIR} ${IDL_FILE}) diff --git a/salome_adm/cmake_files/prepare_generating_doc.py b/salome_adm/cmake_files/prepare_generating_doc.py new file mode 100755 index 000000000..fb218237a --- /dev/null +++ b/salome_adm/cmake_files/prepare_generating_doc.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 sys, re +outfile = open(sys.argv[1], 'wb') +isCom = False +for line in open(sys.argv[2], 'rb').readlines(): + if re.match('class '+sys.argv[3]+'DC', line): + continue + n = line.find('"""') + n1 = line[(n+2):].find('"""') + if (n > -1) and (n1 > -1): + continue + if isCom: + if n > -1: + isCom = False + continue + else: + if n > -1: + isCom = True + continue + line = re.sub(r'^\s+#', '#', line) + line = re.sub(r'^\s+def', 'def', line) + line = re.sub(sys.argv[3]+'DC', sys.argv[3], line) + outfile.write(line) +outfile.close() \ No newline at end of file diff --git a/salome_adm/unix/DEPRECATED/Doxyfile b/salome_adm/unix/DEPRECATED/Doxyfile index 8a02bdd4a..5baae8dd5 100644 --- a/salome_adm/unix/DEPRECATED/Doxyfile +++ b/salome_adm/unix/DEPRECATED/Doxyfile @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # Doxyfile 1.2.8.1 # This file describes the settings to be used by the documentation system # All text after a hash (#) is considered a comment and will be ignored diff --git a/salome_adm/unix/DEPRECATED/F77config.h.in b/salome_adm/unix/DEPRECATED/F77config.h.in index 89a4494da..1bc62dfdd 100644 --- a/salome_adm/unix/DEPRECATED/F77config.h.in +++ b/salome_adm/unix/DEPRECATED/F77config.h.in @@ -1,23 +1,23 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #ifndef F77_FUNC diff --git a/salome_adm/unix/DEPRECATED/config.h.in b/salome_adm/unix/DEPRECATED/config.h.in index d7decbe36..dd65a4e30 100755 --- a/salome_adm/unix/DEPRECATED/config.h.in +++ b/salome_adm/unix/DEPRECATED/config.h.in @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /* config.h.in. Generated from configure.in by autoheader. */ /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP diff --git a/salome_adm/unix/DEPRECATED/depend.in b/salome_adm/unix/DEPRECATED/depend.in index 080bf9a17..2155feb9c 100644 --- a/salome_adm/unix/DEPRECATED/depend.in +++ b/salome_adm/unix/DEPRECATED/depend.in @@ -1,25 +1,44 @@ -## -*- makefile -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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 +# +## -*- makefile -*- ## We keep a list of dependencies in `.depend' for each of the source ## files on which it depends. When one of the source files is modified ## we remove its record from .depend and regenerate its dependencies, ## tacking them onto the end of .depend. By including the .depend file ## into the makefile, we're telling make that the makefile depends on ## the dependency list in the .depend file. -## ## This is as fast as the `.d' method described in the GNU make manual ## for automatic dependencies, but has the added advantage that all ## dependencies are stored in one place. The advantage over the ## `makedepend' program is that only those files that are out of date ## have dependency information rebuilt, and the Makefile is not ## modified. -## ## This is also where tracing information is updated. The $(TRACE) ## program is run on each source file to make sure that the H5TRACE() ## macros are up to date. If they are then the file is not modified, ## otherwise the file is changed and a backup is saved by appending a ## tilde to the file name. -## +# $(srcdir)/Dependencies: .depend @if test "$(srcdir)" != "."; then \ echo '## This file is machine generated on GNU systems.' >$@; \ diff --git a/salome_adm/unix/DEPRECATED/envScript.in b/salome_adm/unix/DEPRECATED/envScript.in index 03e63c195..91fa226c3 100644 --- a/salome_adm/unix/DEPRECATED/envScript.in +++ b/salome_adm/unix/DEPRECATED/envScript.in @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + DIR=`pwd` EXEC_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"` cd $EXEC_DIR/.. diff --git a/salome_adm/unix/DEPRECATED/make_commence.in b/salome_adm/unix/DEPRECATED/make_commence.in index eed28ee29..0107c2167 100644 --- a/salome_adm/unix/DEPRECATED/make_commence.in +++ b/salome_adm/unix/DEPRECATED/make_commence.in @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # common directories to put headerfiles # inc_builddir=$(top_builddir)/include/salome diff --git a/salome_adm/unix/DEPRECATED/make_conclude.in b/salome_adm/unix/DEPRECATED/make_conclude.in index 5ca355492..c161de13c 100644 --- a/salome_adm/unix/DEPRECATED/make_conclude.in +++ b/salome_adm/unix/DEPRECATED/make_conclude.in @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + #======================================================================= # This section of this makefile comes from the file # 'adm/unix/make_conclude' which was generated with config.status diff --git a/salome_adm/unix/DEPRECATED/make_module.in b/salome_adm/unix/DEPRECATED/make_module.in index 2b9fc76b8..3bfa7ac8a 100644 --- a/salome_adm/unix/DEPRECATED/make_module.in +++ b/salome_adm/unix/DEPRECATED/make_module.in @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # generic rule to put in top module Makefile # (for example with module SALOME, SALOME/Makefile.in and SALOME/src/Makefile.in) # build all lib in all subdir diff --git a/salome_adm/unix/DEPRECATED/make_omniorb.in b/salome_adm/unix/DEPRECATED/make_omniorb.in index 1d0976830..4f0853d2b 100644 --- a/salome_adm/unix/DEPRECATED/make_omniorb.in +++ b/salome_adm/unix/DEPRECATED/make_omniorb.in @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + #======================================================================= # Begin specific part to omniorb # (include from file adm/unix/make_omniorb generated by diff --git a/salome_adm/unix/Makefile.am b/salome_adm/unix/Makefile.am index c339c22f0..7029d3f35 100644 --- a/salome_adm/unix/Makefile.am +++ b/salome_adm/unix/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + include $(top_srcdir)/salome_adm/unix/make_common_starter.am SUBDIRS = config_files diff --git a/salome_adm/unix/SALOMEconfig.ref.in b/salome_adm/unix/SALOMEconfig.ref.in index add14555f..8db6100ef 100644 --- a/salome_adm/unix/SALOMEconfig.ref.in +++ b/salome_adm/unix/SALOMEconfig.ref.in @@ -1,61 +1,46 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#ifndef SALOME_CONFIG_H -#define SALOME_CONFIG_H - -#define DEBUG +/* Debug mode ??? */ +#ifndef DEBUG +# define DEBUG +#endif -#define QUOTE(x) #x -#define CORBA_CLIENT_HEADER(x) QUOTE(x@IDL_CLN_H@) -#define CORBA_SERVER_HEADER(x) QUOTE(x@IDL_SRV_H@) +/* CORBA headers include rules */ +#ifndef CORBA_CLIENT_HEADER +# define QUOTE(x) #x +# define CORBA_CLIENT_HEADER(x) QUOTE(x@IDL_CLN_H@) +# define CORBA_SERVER_HEADER(x) QUOTE(x@IDL_SRV_H@) +#endif +/* Platform definition */ #ifndef @MACHINE@ #define @MACHINE@ #endif - -/* A path to a rcp-like command */ -#define RCP "@RCP@" - -/* A path to a rm-like command */ -#define RM "@RM@" - -/* A path to a cp-like command */ -#define CP "@CP@" - -/* A path to a rsh-like command */ -#define RSH "@RSH@" - -/* A path to a scp-like command */ -#define SCP "@SCP@" - -/* A path to a sh-like command */ -#define SH "@SH@" - -/* A path to a ssh-like command */ -#define SSH "@SSH@" - // This is only to suppress warning messages with defines redefined (cause of omniORB that exports these names) +#ifdef PACKAGE +#undef PACKAGE +#endif #ifdef PACKAGE_BUGREPORT #undef PACKAGE_BUGREPORT #endif @@ -71,9 +56,10 @@ #ifdef PACKAGE_VERSION #undef PACKAGE_VERSION #endif +#ifdef VERSION +#undef VERSION +#endif #ifdef _POSIX_C_SOURCE #undef _POSIX_C_SOURCE #endif - -#endif diff --git a/salome_adm/unix/config_files/DEPRECATED/ac_cc_warnings.m4 b/salome_adm/unix/config_files/DEPRECATED/ac_cc_warnings.m4 index b355c487c..4f71c4e9d 100644 --- a/salome_adm/unix/config_files/DEPRECATED/ac_cc_warnings.m4 +++ b/salome_adm/unix/config_files/DEPRECATED/ac_cc_warnings.m4 @@ -1,24 +1,3 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -dnl dnl Synopsis : AC_CC_WARNINGS([ANSI]) dnl Version : 1.1 (2000/12/31) dnl Author : Ville Laurikari diff --git a/salome_adm/unix/config_files/DEPRECATED/ac_cxx_bool.m4 b/salome_adm/unix/config_files/DEPRECATED/ac_cxx_bool.m4 index 513a65abf..3cc6c3bf3 100644 --- a/salome_adm/unix/config_files/DEPRECATED/ac_cxx_bool.m4 +++ b/salome_adm/unix/config_files/DEPRECATED/ac_cxx_bool.m4 @@ -1,24 +1,25 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + dnl @synopsis AC_CXX_BOOL dnl If the compiler recognizes bool as a separate built-in type, dnl define HAVE_BOOL. Note that a typedef is not a separate diff --git a/salome_adm/unix/config_files/DEPRECATED/ac_cxx_mutable.m4 b/salome_adm/unix/config_files/DEPRECATED/ac_cxx_mutable.m4 index c30b22162..e141e800b 100644 --- a/salome_adm/unix/config_files/DEPRECATED/ac_cxx_mutable.m4 +++ b/salome_adm/unix/config_files/DEPRECATED/ac_cxx_mutable.m4 @@ -1,24 +1,25 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + dnl @synopsis AC_CXX_MUTABLE dnl If the compiler allows modifying class data members flagged with dnl the mutable keyword even in const objects (for example in the diff --git a/salome_adm/unix/config_files/DEPRECATED/ac_cxx_partial_specialization.m4 b/salome_adm/unix/config_files/DEPRECATED/ac_cxx_partial_specialization.m4 index 08c8df997..2881b1bf9 100644 --- a/salome_adm/unix/config_files/DEPRECATED/ac_cxx_partial_specialization.m4 +++ b/salome_adm/unix/config_files/DEPRECATED/ac_cxx_partial_specialization.m4 @@ -1,24 +1,25 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + dnl @synopsis AC_CXX_PARTIAL_SPECIALIZATION dnl If the compiler supports partial specialization, dnl define HAVE_PARTIAL_SPECIALIZATION. diff --git a/salome_adm/unix/config_files/DEPRECATED/ac_cxx_typename.m4 b/salome_adm/unix/config_files/DEPRECATED/ac_cxx_typename.m4 index 8477e9cc4..72dbc5e65 100644 --- a/salome_adm/unix/config_files/DEPRECATED/ac_cxx_typename.m4 +++ b/salome_adm/unix/config_files/DEPRECATED/ac_cxx_typename.m4 @@ -1,25 +1,26 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl -ddnl @synopsis AC_CXX_TYPENAME + +dnl @synopsis AC_CXX_TYPENAME dnl dnl If the compiler recognizes the typename keyword, define HAVE_TYPENAME. dnl diff --git a/salome_adm/unix/config_files/DEPRECATED/check_Salome.m4 b/salome_adm/unix/config_files/DEPRECATED/check_Salome.m4 index 8a94f70b4..14808ae84 100644 --- a/salome_adm/unix/config_files/DEPRECATED/check_Salome.m4 +++ b/salome_adm/unix/config_files/DEPRECATED/check_Salome.m4 @@ -1,30 +1,30 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + dnl------------------------------------------------------------ dnl Check availability of Salome binary distribution -dnl dnl Author : Marc Tajchman (CEA, 2002) dnl------------------------------------------------------------ - +dnl AC_DEFUN([CHECK_SALOME],[ AC_CHECKING(for Salome) diff --git a/salome_adm/unix/config_files/DEPRECATED/check_java.m4 b/salome_adm/unix/config_files/DEPRECATED/check_java.m4 index fa9472375..8cb32fb1e 100644 --- a/salome_adm/unix/config_files/DEPRECATED/check_java.m4 +++ b/salome_adm/unix/config_files/DEPRECATED/check_java.m4 @@ -1,24 +1,25 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + AC_DEFUN([CHECK_JAVA],[ dnl AC_REQUIRE([AC_CANONICAL_SYSTEM])dnl dnl AC_REQUIRE([AC_PROG_CPP])dnl diff --git a/salome_adm/unix/config_files/DEPRECATED/check_mico.m4 b/salome_adm/unix/config_files/DEPRECATED/check_mico.m4 index e40456e32..4ecc8c4b7 100644 --- a/salome_adm/unix/config_files/DEPRECATED/check_mico.m4 +++ b/salome_adm/unix/config_files/DEPRECATED/check_mico.m4 @@ -1,24 +1,25 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + AC_DEFUN([CHECK_MICO],[ AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_CXX])dnl diff --git a/salome_adm/unix/config_files/DEPRECATED/check_pthreads.m4 b/salome_adm/unix/config_files/DEPRECATED/check_pthreads.m4 index e9beadb61..62e371449 100644 --- a/salome_adm/unix/config_files/DEPRECATED/check_pthreads.m4 +++ b/salome_adm/unix/config_files/DEPRECATED/check_pthreads.m4 @@ -1,24 +1,3 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -dnl #@synonpsis CHECK_PTHREADS dnl check for pthreads system interfaces. dnl set CFLAGS_PTHREADS, CXXFLAGS_PTHREADS and LIBS_PTHREADS to diff --git a/salome_adm/unix/config_files/DEPRECATED/install-sh b/salome_adm/unix/config_files/DEPRECATED/install-sh index 0e44ef5e0..85d8d0d4a 100755 --- a/salome_adm/unix/config_files/DEPRECATED/install-sh +++ b/salome_adm/unix/config_files/DEPRECATED/install-sh @@ -1,24 +1,24 @@ #! /bin/sh -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # chmodParams="" diff --git a/salome_adm/unix/config_files/DEPRECATED/mkinstalldirs b/salome_adm/unix/config_files/DEPRECATED/mkinstalldirs index ffe7451a8..6b3b5fc5d 100755 --- a/salome_adm/unix/config_files/DEPRECATED/mkinstalldirs +++ b/salome_adm/unix/config_files/DEPRECATED/mkinstalldirs @@ -1,25 +1,4 @@ #! /bin/sh -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -# -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# 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 -# # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 diff --git a/salome_adm/unix/config_files/Makefile.am b/salome_adm/unix/config_files/Makefile.am index 68649d934..f92e4c144 100644 --- a/salome_adm/unix/config_files/Makefile.am +++ b/salome_adm/unix/config_files/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + include $(top_srcdir)/salome_adm/unix/make_common_starter.am @@ -52,6 +53,7 @@ ac_cxx_template_options.m4 \ ac_cxx_use_std_iostream.m4 \ ac_cxx_warnings.m4 \ ac_linker_options.m4 \ +ac_check_sizeof_fortran.m4 \ acx_pthread.m4 \ check_Kernel.m4 \ check_boost.m4 \ @@ -59,25 +61,29 @@ check_cas.m4 \ check_corba.m4 \ check_cppunit.m4 \ check_f77.m4 \ +check_calcium.m4 \ check_hdf5.m4 \ check_htmlgen.m4 \ +check_sphinx.m4 \ check_lam.m4 \ -check_lsf.m4 \ +check_libbatch.m4 \ check_mpi.m4 \ check_openmpi.m4 \ check_mpich.m4 \ check_omniorb.m4 \ -check_openpbs.m4 \ check_sockets.m4 \ check_swig.m4 \ +check_vtk.m4 \ check_withihm.m4 \ enable_pthreads.m4 \ production.m4 \ pyembed.m4 \ python.m4 \ check_libxml.m4 \ -check_local.m4 \ -check_paco++.m4 +check_paco++.m4 \ +local_install.m4 \ +hack_libtool.m4 \ +check_tbb.m4 dist_salome4depr_DATA=\ $(DEPRECATED_FILES) diff --git a/salome_adm/unix/config_files/ac_check_sizeof_fortran.m4 b/salome_adm/unix/config_files/ac_check_sizeof_fortran.m4 new file mode 100644 index 000000000..7e30d4849 --- /dev/null +++ b/salome_adm/unix/config_files/ac_check_sizeof_fortran.m4 @@ -0,0 +1,68 @@ +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl + +AC_DEFUN([AC_CHECK_SIZEOF_FORTRAN], [ + AC_REQUIRE([AC_F77_WRAPPERS]) + AC_CACHE_CHECK([size of Fortran [$1]], [ac_cv_sizeof_fortran_[]translit($1, [A-Z *], [a-z_p])],[ + AC_LANG_SAVE() + AC_LANG([Fortran 77]) + AC_COMPILE_IFELSE([ + AC_LANG_SOURCE([ + subroutine fsize() + $1 i(2) + call csize(i(1), i(2)) + end + ]) + ],[ + AC_LANG([C]) + cp conftest.$ac_objext conftestf.$ac_objext + old_LDFLAGS="$LDFLAGS" + LDFLAGS="conftestf.$ac_objext $LDFLAGS" +#"$ac_cv_f77_libs" + AC_TRY_RUN([ +# include +# define CSIZE F77_FUNC(csize,CSIZE) +# define FSIZE F77_FUNC(fsize,FSIZE) + static long size_val; + /* Called by Fortran */ + void CSIZE (i1p, i2p) + char *i1p, *i2p; + { + size_val = (i2p - i1p); + } + main() { + FILE *f=fopen ("conftestval","w"); + if (!f) return 1; + /* Call the Fortran function */ + FSIZE (); + fprintf (f, "%d\n", size_val); + return 0; + } + ]) + LDFLAGS="$old_LDFLAGS" + ac_cv_sizeof_fortran_[]translit($1, [A-Z *], [a-z_p])=`cat conftestval` + rm -f conftestval conftestf.$ac_objext + ]) + AC_LANG_RESTORE() + ]) + AC_DEFINE_UNQUOTED(SIZEOF_FORTRAN_[]translit($1, [a-z *], [A-Z_p]), + [$ac_cv_sizeof_fortran_[]translit($1, [A-Z *], [a-z_p])], + [The size of a Fortran `$1', as computed by sizeof.]) + +]) diff --git a/salome_adm/unix/config_files/ac_cxx_depend_flag.m4 b/salome_adm/unix/config_files/ac_cxx_depend_flag.m4 index b6e704b4f..44c6e25d5 100644 --- a/salome_adm/unix/config_files/ac_cxx_depend_flag.m4 +++ b/salome_adm/unix/config_files/ac_cxx_depend_flag.m4 @@ -1,34 +1,34 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + dnl @synopsis AC_C_DEPEND_FLAG dnl define C_DEPEND_FLAG dnl define CXX_DEPEND_FLAG dnl @version $Id$ dnl @author Marc Tajchman dnl -AC_DEFUN([AC_DEPEND_FLAG], -[AC_CACHE_CHECK(which flag for dependency information generation, -ac_cv_depend_flag, -[AC_LANG_SAVE +AC_DEFUN([AC_DEPEND_FLAG],[ + AC_MSG_CHECKING([which flag for dependency information generation]) + AC_LANG_SAVE AC_LANG_C echo "conftest.o: conftest.c" > conftest.verif echo "int main() { return 0; }" > conftest.c @@ -121,7 +121,7 @@ dnl sur CCRT/osf pas d'equivalent de l'option -MG de gcc avec compilo natif dnl on utilise donc gnu pour generer les dependances. DEPCC=gcc DEPCXX=g++ - DEPCXXFLAGS="-Wno-deprecated" + DEPCXXFLAGS= DIFFFLAGS="-w" dnl MACHINE="OSF1" ;; @@ -213,6 +213,8 @@ dnl use g++ option -MG : asume unknown file will be construct later printf " C++ : ${DEPCXX} ${CXX_DEPEND_FLAG}" AC_LANG_RESTORE + AC_MSG_RESULT([ ... done]) + AC_SUBST(DEPCC) AC_SUBST(DEPCXX) AC_SUBST(DEPCXXFLAGS) @@ -220,4 +222,3 @@ dnl use g++ option -MG : asume unknown file will be construct later AC_SUBST(CXX_DEPEND_FLAG) AC_SUBST(MACHINE) ]) -]) diff --git a/salome_adm/unix/config_files/ac_cxx_have_sstream.m4 b/salome_adm/unix/config_files/ac_cxx_have_sstream.m4 index 24be4c5d9..26aff117a 100644 --- a/salome_adm/unix/config_files/ac_cxx_have_sstream.m4 +++ b/salome_adm/unix/config_files/ac_cxx_have_sstream.m4 @@ -1,43 +1,48 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + dnl @synopsis AC_CXX_HAVE_SSTREAM dnl If the C++ library has a working stringstream, define HAVE_SSTREAM. dnl @author Ben Stanley dnl @version $Id$ dnl modified by Marc Tajchman (CEA) - 10/10/2002 -dnl -AC_DEFUN([AC_CXX_HAVE_SSTREAM], -[AC_CACHE_CHECK(whether the compiler has stringstream, -HAVE_SSTREAM, -[AC_REQUIRE([AC_CXX_NAMESPACES]) - AC_LANG_SAVE - AC_LANG_CPLUSPLUS - AC_TRY_COMPILE([#include -#ifdef HAVE_NAMESPACES -using namespace std; -#endif],[stringstream message; message << "Hello"; return 0;], - HAVE_SSTREAM=yes, HAVE_SSTREAM=no) - AC_LANG_RESTORE -]) -AC_SUBST(HAVE_SSTREAM) +AC_DEFUN([AC_CXX_HAVE_SSTREAM],[ + AC_CACHE_CHECK([whether the compiler has stringstream], + [ac_cv_prog_cxx_have_sstream], + [ac_cv_prog_cxx_have_sstream=no + AC_REQUIRE([AC_CXX_NAMESPACES]) + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([ + #include + #ifdef HAVE_NAMESPACES + using namespace std; + #endif + ], + [stringstream message; message << "Hello"; return 0;], + [ac_cv_prog_cxx_have_sstream=yes],[ac_cv_prog_cxx_have_sstream=no]) + AC_LANG_RESTORE + ]) + HAVE_SSTREAM=$ac_cv_prog_cxx_have_sstream + AC_SUBST(HAVE_SSTREAM) ]) diff --git a/salome_adm/unix/config_files/ac_cxx_namespaces.m4 b/salome_adm/unix/config_files/ac_cxx_namespaces.m4 index f82d8d5c8..66d0478f0 100644 --- a/salome_adm/unix/config_files/ac_cxx_namespaces.m4 +++ b/salome_adm/unix/config_files/ac_cxx_namespaces.m4 @@ -1,24 +1,25 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + dnl @synopsis AC_CXX_NAMESPACES dnl If the compiler can prevent names clashes using namespaces, define dnl HAVE_NAMESPACES. diff --git a/salome_adm/unix/config_files/ac_cxx_option.m4 b/salome_adm/unix/config_files/ac_cxx_option.m4 index 77b7ffd36..69fccd0c4 100644 --- a/salome_adm/unix/config_files/ac_cxx_option.m4 +++ b/salome_adm/unix/config_files/ac_cxx_option.m4 @@ -1,24 +1,25 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + dnl @synopsis AC_CXX_OPTION(-option,variable where we add option if ok,action if ok; action if not ok) dnl Check options for C++ compiler dnl @author Bernard Secher - 15/01/2004 diff --git a/salome_adm/unix/config_files/ac_cxx_template_options.m4 b/salome_adm/unix/config_files/ac_cxx_template_options.m4 index d4ac01a90..725840ae9 100644 --- a/salome_adm/unix/config_files/ac_cxx_template_options.m4 +++ b/salome_adm/unix/config_files/ac_cxx_template_options.m4 @@ -1,24 +1,25 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + dnl @synopsis AC_CXX_TEMPLATE_OPTIONS dnl Check template options for C++ compiler dnl diff --git a/salome_adm/unix/config_files/ac_cxx_use_std_iostream.m4 b/salome_adm/unix/config_files/ac_cxx_use_std_iostream.m4 index 163568fbe..ced6c099b 100644 --- a/salome_adm/unix/config_files/ac_cxx_use_std_iostream.m4 +++ b/salome_adm/unix/config_files/ac_cxx_use_std_iostream.m4 @@ -1,30 +1,31 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + dnl @synopsis AC_CXX_USE_STD_IOSTREAM dnl dnl If the C++ library use std iostream dnl dnl @author Bernard Secher (CEA) - 05/12/2003 -dnl + AC_DEFUN([AC_CXX_USE_STD_IOSTREAM], [ diff --git a/salome_adm/unix/config_files/ac_cxx_warnings.m4 b/salome_adm/unix/config_files/ac_cxx_warnings.m4 index 14d2cafa8..43ace34b4 100644 --- a/salome_adm/unix/config_files/ac_cxx_warnings.m4 +++ b/salome_adm/unix/config_files/ac_cxx_warnings.m4 @@ -1,31 +1,30 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + dnl @synopsis AC_CXX_WARNINGS dnl Check warning flags for C++ compiler to control warning messages dnl AC_DEFUN([AC_CXX_WARNINGS],[ - AC_CXX_OPTION(-Wno-deprecated,CXXFLAGS) AC_CXX_OPTION(-Wparentheses,CXXFLAGS) AC_CXX_OPTION(-Wreturn-type,CXXFLAGS) - AC_CXX_OPTION(-Wmissing-declarations,CXXFLAGS) AC_CXX_OPTION(-Wunused,CXXFLAGS) ]) diff --git a/salome_adm/unix/config_files/ac_linker_options.m4 b/salome_adm/unix/config_files/ac_linker_options.m4 index dd2abdbf4..b5348464b 100644 --- a/salome_adm/unix/config_files/ac_linker_options.m4 +++ b/salome_adm/unix/config_files/ac_linker_options.m4 @@ -1,24 +1,25 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + dnl @synopsis AC_LINKER_OPTIONS dnl Check warning flags for C++ compiler to control warning messages dnl @@ -37,6 +38,11 @@ AC_DEFUN([AC_LINKER_OPTIONS],[ done AC_SUBST(LDEXPDYNFLAGS) + for opt in "-Xlinker -enable-new-dtags" ; do + AC_CXX_OPTION($opt,LDFLAGS) + done + AC_SUBST(LDFLAGS) + dnl case $host_os in osf*) diff --git a/salome_adm/unix/config_files/acx_pthread.m4 b/salome_adm/unix/config_files/acx_pthread.m4 index 3bc53f764..3ef2c733a 100644 --- a/salome_adm/unix/config_files/acx_pthread.m4 +++ b/salome_adm/unix/config_files/acx_pthread.m4 @@ -1,24 +1,25 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + dnl Paul RASCLE: modification for Linux: -pthread required by boost... dnl Available from the GNU Autoconf Macro Archive at: dnl diff --git a/salome_adm/unix/config_files/check_Kernel.m4 b/salome_adm/unix/config_files/check_Kernel.m4 index 097424ac3..b3a78f62c 100644 --- a/salome_adm/unix/config_files/check_Kernel.m4 +++ b/salome_adm/unix/config_files/check_Kernel.m4 @@ -1,24 +1,25 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + # Check availability of Salome's KERNEL binary distribution # # Author : Jerome Roy (CEA, 2003) diff --git a/salome_adm/unix/config_files/check_boost.m4 b/salome_adm/unix/config_files/check_boost.m4 index 1c8d1ce40..36ab894e8 100644 --- a/salome_adm/unix/config_files/check_boost.m4 +++ b/salome_adm/unix/config_files/check_boost.m4 @@ -1,24 +1,25 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + AC_DEFUN([CHECK_BOOST],[ AC_CHECKING(for BOOST Library) @@ -28,8 +29,11 @@ AC_REQUIRE([ENABLE_PTHREADS])dnl AC_LANG_SAVE AC_LANG_CPLUSPLUS +gccver=`$CC -dumpversion | sed 's/^\([[0-9]]\+\)\.\([[0-9]]\+\).*/\1\2/g'` +SUFFIXES="empty -mt -gcc -gcc-mt -gcc${gccver} -gcc${gccver}-mt" + BOOST_CPPFLAGS="" -BOOST_LIBSUFFIX="-mt" +BOOST_LIBSUFFIX="" BOOST_LIBS="" AC_CHECKING(for BOOST location) @@ -48,9 +52,11 @@ AC_MSG_RESULT(\$BOOSTDIR = ${BOOSTDIR}) CPPFLAGS_old="${CPPFLAGS}" LIBS_old=$LIBS +LIB_SUFFIX="${LIB_LOCATION_SUFFIX}" + if test "x${BOOSTDIR}" != "x" ; then BOOST_CPPFLAGS="-I${BOOSTDIR}/include" - BOOST_LIBS="-L${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}" + BOOST_LIBS="-L${BOOSTDIR}/lib${LIB_SUFFIX}" fi if test "x${BOOSTDIR}" = "x/usr" ; then @@ -100,15 +106,18 @@ if test "x${boost_headers_ok}" = "xyes" ; then AC_CHECKING(for BOOST binaries) boost_lib_dir_ok=yes if test "x${BOOSTDIR}" != "x" ; then - AC_CHECK_FILE(${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_thread${BOOST_LIBSUFFIX}.so, - boost_lib_dir_ok=yes, - boost_lib_dir_ok=no) - if test "x${boost_lib_dir_ok}" = "xno" ; then - BOOST_LIBSUFFIX="" - AC_CHECK_FILE(${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_thread${BOOST_LIBSUFFIX}.so, - boost_lib_dir_ok=yes, - boost_lib_dir_ok=no) - fi + for BOOST_LIBSUFFIX in ${SUFFIXES} ; do + test "${BOOST_LIBSUFFIX}" == "empty" && BOOST_LIBSUFFIX="" + AC_CHECK_FILE([${BOOSTDIR}/lib${LIB_SUFFIX}/libboost_thread${BOOST_LIBSUFFIX}.so], + [boost_lib_dir_ok=yes], + [AC_CHECK_FILE([${BOOSTDIR}/lib64/libboost_thread${BOOST_LIBSUFFIX}.so], + [boost_lib_dir_ok=yes; LIB_SUFFIX=64], + [boost_lib_dir_ok=no]) + ]) + if test "x${boost_lib_dir_ok}" = "xyes" ; then + break + fi + done fi if test "x${boost_lib_dir_ok}" = "xyes" ; then LIBS="${LIBS_old} ${BOOST_LIBS} -lboost_thread${BOOST_LIBSUFFIX}" @@ -116,13 +125,8 @@ if test "x${boost_headers_ok}" = "xyes" ; then [struct TBody{ void operator()(){} }; boost::thread(TBody())], boost_binaries_ok=yes, boost_binaries_ok=no) - if test "x${boost_binaries_ok}" = "xno" ; then - BOOST_LIBSUFFIX="" - LIBS="${LIBS_old} ${BOOST_LIBS} -lboost_thread${BOOST_LIBSUFFIX}" - AC_TRY_LINK([#include ], - [struct TBody{ void operator()(){} }; boost::thread(TBody())], - boost_binaries_ok=yes, - boost_binaries_ok=no) + if test "x${boost_binaries_ok}" = "xyes" ; then + break fi fi fi @@ -133,6 +137,18 @@ if test "x${boost_binaries_ok}" = "xno" ; then else AC_MSG_RESULT(\$BOOST_LIBSUFFIX = ${BOOST_LIBSUFFIX}) AC_MSG_RESULT(\$BOOST_LIBS = ${BOOST_LIBS}) + AC_CHECK_FILE(${BOOSTDIR}/lib${LIB_SUFFIX}/libboost_thread${BOOST_LIBSUFFIX}.so, + BOOST_LIB_THREAD="${BOOST_LIBS} -lboost_thread${BOOST_LIBSUFFIX}", + BOOST_LIB_THREAD="") + AC_CHECK_FILE(${BOOSTDIR}/lib${LIB_SUFFIX}/libboost_signals${BOOST_LIBSUFFIX}.so, + BOOST_LIB_SIGNALS="${BOOST_LIBS} -lboost_signals${BOOST_LIBSUFFIX}", + BOOST_LIB_SIGNALS="") + AC_CHECK_FILE(${BOOSTDIR}/lib${LIB_SUFFIX}/libboost_system${BOOST_LIBSUFFIX}.so, + BOOST_LIB_SYSTEM="${BOOST_LIBS} -lboost_system${BOOST_LIBSUFFIX}", + BOOST_LIB_SYSTEM="") + AC_CHECK_FILE(${BOOSTDIR}/lib${LIB_SUFFIX}/libboost_regex${BOOST_LIBSUFFIX}.so, + BOOST_LIB_REGEX="${BOOST_LIBS} -lboost_regex${BOOST_LIBSUFFIX}", + BOOST_LIB_REGEX="") fi AC_MSG_RESULT(for boost binaries: $boost_binaries_ok) @@ -150,6 +166,10 @@ AC_MSG_RESULT(for boost: $boost_ok) AC_SUBST(BOOST_CPPFLAGS) AC_SUBST(BOOST_LIBSUFFIX) AC_SUBST(BOOST_LIBS) +AC_SUBST(BOOST_LIB_THREAD) +AC_SUBST(BOOST_LIB_SIGNALS) +AC_SUBST(BOOST_LIB_SYSTEM) +AC_SUBST(BOOST_LIB_REGEX) AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) AC_LANG_RESTORE diff --git a/salome_adm/unix/config_files/check_calcium.m4 b/salome_adm/unix/config_files/check_calcium.m4 new file mode 100644 index 000000000..3c33167a4 --- /dev/null +++ b/salome_adm/unix/config_files/check_calcium.m4 @@ -0,0 +1,77 @@ +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl + +AC_DEFUN([CHECK_CALCIUM], [ + +## Guess where as cal_int type is provided by --with-cal_int option +## or auto-detection must be used + +AC_ARG_WITH([cal_int], + AC_HELP_STRING([--with-cal_int=], + [Use for mapping a Fortran integer in C within CALCIUM C/F77 interfaces.]), + [], + [withval=no]) + +AC_CHECK_SIZEOF(long) +AC_CHECK_SIZEOF(int) + +if test "x$withval" = "xno" +then + AC_REQUIRE([CHECK_F77]) + AC_CHECK_SIZEOF_FORTRAN(integer) + + if test "x$ac_cv_sizeof_fortran_integer" = "x8" ; then + AC_DEFINE(HAVE_F77INT64,[], + [The size of a Fortran integer, as computed by sizeof.]) + test "x$ac_cv_sizeof_long" = "x8" || AC_MSG_ERROR([Size of C type long expected to be eight bytes]) + LONG_OR_INT="long" + CALCIUM_IDL_INT_F77="long long" + CALCIUM_CORBA_INT_F77="CORBA::LongLong" + elif test "x$ac_cv_sizeof_fortran_integer" = "x4" ; then + test "x$ac_cv_sizeof_int" = "x4" || AC_MSG_ERROR([Size of C type int expected to be four bytes]) + LONG_OR_INT="int" + CALCIUM_IDL_INT_F77="long" + CALCIUM_CORBA_INT_F77="CORBA::Long" + else + AC_MSG_ERROR([Size of Fortran type integer is neither four nor eigth bytes]) + fi + +elif test "x$withval" = "xint" +then + LONG_OR_INT="int" + CALCIUM_IDL_INT_F77="long" + CALCIUM_CORBA_INT_F77="CORBA::Long" + AC_MSG_NOTICE([Using C type int for cal_int]) + +elif test "x$withval" = "xlong" +then + LONG_OR_INT="long" + CALCIUM_IDL_INT_F77="long long" + CALCIUM_CORBA_INT_F77="CORBA::LongLong" + AC_MSG_NOTICE([Using C type long for cal_int]) +else + AC_MSG_ERROR([Fortran type integer must be mapped to C type int or C type long]) +fi + +AC_SUBST(CALCIUM_IDL_INT_F77) +AC_SUBST(CALCIUM_CORBA_INT_F77) +AC_SUBST(LONG_OR_INT) +AC_DEFINE_UNQUOTED([CAL_INT],[$LONG_OR_INT], + [The C type to be used for mapping a Fortran integer in C within CALCIUM C/F77 interfaces.]) +]) diff --git a/salome_adm/unix/config_files/check_cas.m4 b/salome_adm/unix/config_files/check_cas.m4 index 81a8e6fbf..7646fd377 100644 --- a/salome_adm/unix/config_files/check_cas.m4 +++ b/salome_adm/unix/config_files/check_cas.m4 @@ -1,24 +1,25 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + AC_DEFUN([CHECK_CAS],[ AC_REQUIRE([AC_PROG_CXX])dnl AC_REQUIRE([AC_PROG_CXXCPP])dnl @@ -41,6 +42,10 @@ AC_SUBST(CAS_DATAEXCHANGE) AC_SUBST(CAS_LDFLAGS) AC_SUBST(CAS_LDPATH) AC_SUBST(CAS_STDPLUGIN) +AC_SUBST(CAS_LIBDIR) +AC_SUBST(CAS_DATADIR) +AC_SUBST(OCC_VERSION_DEVELOPMENT) +AC_SUBST(CASROOT) CAS_CPPFLAGS="" CAS_CXXFLAGS="" @@ -87,18 +92,18 @@ if test -z "$CASROOT"; then done fi -if test -d ${CASROOT}/${casdir}/lib; then - CAS_LDPATH="-L$CASROOT/$casdir/lib " +CAS_LIBDIR="$CASROOT/$casdir/lib" +if test -d ${CAS_LIBDIR}; then AC_MSG_RESULT(yes) else if test -d ${CASROOT}/lib; then - CAS_LDPATH="-L$CASROOT/lib " + CAS_LIBDIR="$CASROOT/lib" AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi fi - + CAS_LDPATH="-L$CAS_LIBDIR " dnl were is OCC ? if test -z "$CASROOT"; then @@ -108,8 +113,13 @@ else OCC_VERSION_MAJOR=0 OCC_VERSION_MINOR=0 OCC_VERSION_MAINTENANCE=0 - ff=$CASROOT/inc/Standard_Version.hxx - if test -f $ff ; then + OCC_VERSION_DEVELOPMENT=0 + if test -f $CASROOT/inc/Standard_Version.hxx; then + ff=$CASROOT/inc/Standard_Version.hxx + else + ff=$CASROOT/include/opencascade/Standard_Version.hxx + fi + if test -f $ff; then grep "define OCC_VERSION_MAJOR" $ff > /dev/null if test $? = 0 ; then OCC_VERSION_MAJOR=`grep "define OCC_VERSION_MAJOR" $ff | awk '{i=3 ; print $i}'` @@ -122,6 +132,27 @@ else if test $? = 0 ; then OCC_VERSION_MAINTENANCE=`grep "define OCC_VERSION_MAINTENANCE" $ff | awk '{i=3 ; print $i}'` fi + grep "define OCC_VERSION_DEVELOPMENT" $ff > /dev/null + if test $? = 0 ; then + OCC_VERSION_DEVELOPMENT_STR=`grep "define OCC_VERSION_DEVELOPMENT" $ff | awk '{i=1 ; print $i}'` + if test "${OCC_VERSION_DEVELOPMENT_STR}" = "#define" ; then + OCC_VERSION_DEVELOPMENT=1 + fi + dnl OCC_VERSION_DEVELOPMENT=1 + fi + AC_MSG_CHECKING(for OpenCascade data files) + if test -f ${CASROOT}/src/UnitsAPI/Lexi_Expr.dat; then + CAS_DATADIR=${CASROOT} + AC_MSG_RESULT(found in $CAS_DATADIR/src) + else + if test -f ${CASROOT}/share/opencascade/${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}.${OCC_VERSION_MAINTENANCE}/src/UnitsAPI/Lexi_Expr.dat; then + CAS_DATADIR=${CASROOT}/share/opencascade/${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}.${OCC_VERSION_MAINTENANCE} + AC_MSG_RESULT(found in $CAS_DATADIR/src) + else + occ_ok=no + AC_MSG_RESULT(not found, check OpenCascade installation) + fi + fi fi fi @@ -151,7 +182,7 @@ case $host_os in CAS_CPPFLAGS="$CAS_CPPFLAGS -DOCC_CONVERT_SIGNALS" ;; esac - CAS_CPPFLAGS="$CAS_CPPFLAGS -I$CASROOT/inc" + CAS_CPPFLAGS="$CAS_CPPFLAGS -I$CASROOT/inc -I$CASROOT/include/opencascade" ;; osf*) CAS_CPPFLAGS="-DOCC_VERSION_MAJOR=$OCC_VERSION_MAJOR -DOCC_VERSION_MINOR=$OCC_VERSION_MINOR -DOCC_VERSION_MAINTENANCE=$OCC_VERSION_MAINTENANCE -DLIN -DLINTEL -DCSFDB -DNo_exception -DHAVE_CONFIG_H -DHAVE_LIMITS_H -DHAVE_WOK_CONFIG_H -I$CASROOT/inc" @@ -206,13 +237,18 @@ else CAS_KERNEL="$CAS_LDPATH -lTKernel" CAS_MATH="$CAS_LDPATH -lTKMath" + CAS_OCAF="$CAS_LDPATH -lPTKernel -lTKernel -lTKCDF -lTKLCAF -lTKPCAF -lTKStdSchema" + CAS_OCAFVIS="$CAS_LDPATH -lTKCAF -lTKPLCAF -lTKPShape -lTKStdLSchema -lTKShapeSchema" + if test -f $CASROOT/$casdir/lib/libStdPlugin.so ; then - # this libraries are only for CASCADE 5.2.3 + # standard plugin library libStdPlugin has been added in CASCADE 5.2.3 CAS_STDPLUGIN="StdPlugin" + CAS_OCAFVIS="$CAS_OCAFVIS -lStdPlugin -lStdLPlugin" + elif test -f $CASROOT/$casdir/lib/libTKStdSchema.so ; then + # standard plugin has been renamed in CASCADE 6.5 + CAS_STDPLUGIN=TKStdSchema + CAS_OCAFVIS="$CAS_OCAFVIS -lTKStdSchema -lTKStdLSchema" fi - - CAS_OCAF="$CAS_LDPATH -lPTKernel -lTKernel -lTKCDF -lTKLCAF -lTKPCAF -lTKStdSchema" - CAS_OCAFVIS="$CAS_LDPATH -lTKCAF -lStdPlugin -lStdLPlugin -lTKPLCAF -lTKPShape -lTKStdLSchema -lTKShapeSchema" CAS_TKV3d="$CAS_LDPATH -lTKV3d" CAS_VIEWER="$CAS_TKV3d -lTKService" @@ -233,5 +269,3 @@ fi AC_LANG_RESTORE ])dnl - - diff --git a/salome_adm/unix/config_files/check_corba.m4 b/salome_adm/unix/config_files/check_corba.m4 index 49f6a01f3..740809fcc 100644 --- a/salome_adm/unix/config_files/check_corba.m4 +++ b/salome_adm/unix/config_files/check_corba.m4 @@ -1,24 +1,25 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + AC_DEFUN([CHECK_CORBA],[ if test x"$DEFAULT_ORB" = x"omniORB" @@ -36,6 +37,7 @@ then CORBA_CXXFLAGS=$OMNIORB_CXXFLAGS CORBA_LIBS=$OMNIORB_LIBS IDLCXXFLAGS=$OMNIORB_IDLCXXFLAGS + PACOIDLCXXFLAGS=$OMNIORB_PACOIDLCXXFLAGS IDLPYFLAGS=$OMNIORB_IDLPYFLAGS AC_SUBST(CORBA_ROOT) @@ -43,6 +45,7 @@ then AC_SUBST(CORBA_CXXFLAGS) AC_SUBST(CORBA_LIBS) AC_SUBST(IDLCXXFLAGS) + AC_SUBST(PACOIDLCXXFLAGS) AC_SUBST(IDLPYFLAGS) IDL_CLN_H=$OMNIORB_IDL_CLN_H diff --git a/salome_adm/unix/config_files/check_cppunit.m4 b/salome_adm/unix/config_files/check_cppunit.m4 index c2c679f40..8b77ed481 100644 --- a/salome_adm/unix/config_files/check_cppunit.m4 +++ b/salome_adm/unix/config_files/check_cppunit.m4 @@ -1,24 +1,25 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + AC_DEFUN([CHECK_CPPUNIT],[ AC_CHECKING(for cppunit) diff --git a/salome_adm/unix/config_files/check_f77.m4 b/salome_adm/unix/config_files/check_f77.m4 index e03c6c165..5cd264946 100644 --- a/salome_adm/unix/config_files/check_f77.m4 +++ b/salome_adm/unix/config_files/check_f77.m4 @@ -1,28 +1,28 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + AC_DEFUN([CHECK_F77],[ AC_PROG_F77 - AC_F77_LIBRARY_LDFLAGS AC_F77_WRAPPERS diff --git a/salome_adm/unix/config_files/check_hdf5.m4 b/salome_adm/unix/config_files/check_hdf5.m4 index 96afbc5ae..14e58986b 100644 --- a/salome_adm/unix/config_files/check_hdf5.m4 +++ b/salome_adm/unix/config_files/check_hdf5.m4 @@ -1,24 +1,25 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + AC_DEFUN([CHECK_HDF5],[ AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_CPP])dnl @@ -34,6 +35,7 @@ AC_ARG_WITH(hdf5, AC_SUBST(HDF5_INCLUDES) AC_SUBST(HDF5_LIBS) AC_SUBST(HDF5_MT_LIBS) +AC_SUBST(HDF5HOME) HDF5_INCLUDES="" HDF5_LIBS="" @@ -48,21 +50,44 @@ LOCAL_RLIBS="" if test -z $HDF5HOME then AC_MSG_WARN(undefined HDF5HOME variable which specify hdf5 installation directory) + AC_MSG_NOTICE(Trying native Hdf5...) + dnl For Parallel HDF5 test + HDF5HOME="/usr" else LOCAL_INCLUDES="-I$HDF5HOME/include" if test "x$HDF5HOME" = "x/usr" then + AC_MSG_NOTICE(Trying native Hdf5...) LOCAL_LIBS="" else + AC_MSG_NOTICE(Trying Hdf5 from $HDF5HOME ...) LOCAL_LIBS="-L$HDF5HOME/lib" - LOCAL_RLIBS="-R$HDF5HOME/lib" + LOCAL_RLIBS="-Wl,-R$HDF5HOME/lib" fi fi +if test "x$hdf5_ok" = "xno" +then + if test -e "$HDF5HOME/include/hdf5.h" + then + AC_MSG_CHECKING(if hdf5 is parallel and thus needs mpi) + hdf5_parallel=`grep "#define H5_HAVE_PARALLEL" $HDF5HOME/include/H5pubconf.h | awk '{i=3 ; print $i}'` + if test "x$hdf5_parallel" = "x1" + then + LOCAL_INCLUDES="-DOMPI_SKIP_MPICXX $MPI_INCLUDES $LOCAL_INCLUDES" + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no,hdf5 seems serial) + fi + else + AC_MSG_WARN(File $HDF5HOME/include/hdf5.h not present) + fi +fi + dnl hdf5 headers CPPFLAGS_old="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS $LOCAL_INCLUDES" +CPPFLAGS="$CPPFLAGS $MPI_INCLUDES $LOCAL_INCLUDES" AC_CHECK_HEADER(hdf5.h,hdf5_ok=yes ,hdf5_ok=no) CPPFLAGS="$CPPFLAGS_old" @@ -73,7 +98,7 @@ then dnl hdf5 library LIBS_old="$LIBS" - LIBS="$LIBS $LOCAL_LIBS" + LIBS="$LIBS $MPI_LIBS $LOCAL_LIBS" AC_CHECK_LIB(hdf5,H5open,hdf5_ok=yes,hdf5_ok=no) LIBS="$LIBS_old" @@ -81,9 +106,14 @@ fi if test "x$hdf5_ok" = "xyes" then - HDF5_INCLUDES="$LOCAL_INCLUDES" - HDF5_LIBS="$LOCAL_LIBS -lhdf5 $LOCAL_RLIBS" - HDF5_MT_LIBS="$LOCAL_LIBS -lhdf5 $LOCAL_RLIBS" + HDF5_INCLUDES="$MPI_INCLUDES $LOCAL_INCLUDES" + HDF5_LIBS="$MPI_LIBS $LOCAL_LIBS -lhdf5 $LOCAL_RLIBS" + HDF5_MT_LIBS="$MPI_LIBS $LOCAL_LIBS -lhdf5 $LOCAL_RLIBS" +fi + +if test "x$hdf5_ok" = "xyes" +then + HDF5_INCLUDES="$HDF5_INCLUDES -DH5_USE_16_API" fi AC_MSG_RESULT(for hdf5: $hdf5_ok) diff --git a/salome_adm/unix/config_files/check_htmlgen.m4 b/salome_adm/unix/config_files/check_htmlgen.m4 index c60df5cf6..ea46f5030 100644 --- a/salome_adm/unix/config_files/check_htmlgen.m4 +++ b/salome_adm/unix/config_files/check_htmlgen.m4 @@ -1,24 +1,25 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + AC_DEFUN([CHECK_HTML_GENERATORS],[ #AC_CHECKING(for html generators) diff --git a/salome_adm/unix/config_files/check_lam.m4 b/salome_adm/unix/config_files/check_lam.m4 index 30ff09b41..eb06aaba8 100644 --- a/salome_adm/unix/config_files/check_lam.m4 +++ b/salome_adm/unix/config_files/check_lam.m4 @@ -1,24 +1,25 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + AC_DEFUN([CHECK_LAM],[ AC_REQUIRE([AC_PROG_CC])dnl diff --git a/salome_adm/unix/config_files/check_libbatch.m4 b/salome_adm/unix/config_files/check_libbatch.m4 new file mode 100644 index 000000000..53d3ebd0f --- /dev/null +++ b/salome_adm/unix/config_files/check_libbatch.m4 @@ -0,0 +1,111 @@ +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl + +# CHECK_LIBBATCH +# This macro can be used to find libBatch and set the associated variables in +# a project based on autoconf. You can copy this file in your own project and +# eventually modify it according to your own needs. +# ---------------------------------------------------------------------------- + +AC_DEFUN([CHECK_LIBBATCH],[ + +AC_MSG_NOTICE(Checking for libBatch library) + +AC_SUBST(LIBBATCH_INCLUDES) +AC_SUBST(LIBBATCH_LIBS) + +LIBBATCH_INCLUDES="" +LIBBATCH_LIBS="" + +libbatch_ok=no + +AC_ARG_WITH([libbatch], + [AS_HELP_STRING([--with-libbatch=DIR], + [root directory path of libBatch installation])], + [LIBBATCH_DIR="$withval"], + [LIBBATCH_DIR=""]) + +if test "x$LIBBATCH_DIR" = "x" ; then + # no --with-libbatch option used + if test "x$LIBBATCH_ROOT_DIR" != "x" ; then + # LIBBATCH_ROOT_DIR environment variable defined + LIBBATCH_DIR=$LIBBATCH_ROOT_DIR + fi +fi + +LOCAL_INCLUDES="" +LOCAL_LIBS="" + +if test "x$LIBBATCH_DIR" != "x" ; then + LOCAL_INCLUDES="-I$LIBBATCH_DIR/include" + if test "x$LIBBATCH_DIR" = "x/usr" ; then + LOCAL_LIBS="-lBatch" + else + LOCAL_LIBS="-L$LIBBATCH_DIR/lib -lBatch" + fi +else + LOCAL_INCLUDES="-I/usr/include" + LOCAL_LIBS="-lBatch" +fi + +# libBatch headers + +CPPFLAGS_old="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $LOCAL_INCLUDES" +AC_CHECK_HEADER(Batch/Batch_BatchManager.hxx, + libbatch_ok="yes", + libbatch_ok="no") +CPPFLAGS="$CPPFLAGS_old" + + +if test "x$libbatch_ok" = "xyes" ; then + # libBatch library + + LIBS_old=$LIBS + LIBS="$LIBS $LOCAL_LIBS" + # Can't use AC_SEARCH_LIBS or AC_CHECK_LIB here because + # they don't work with C++ namespaces + # AC_SEARCH_LIBS(Batch::BatchManagerCatalog::getInstance,Batch, + # libbatch_ok="yes",libbatch_ok="no") + AC_MSG_CHECKING( + [for library containing Batch::BatchManagerCatalog::getInstance]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + namespace Batch { + class BatchManagerCatalog { + public: static void getInstance(); + }; + } + ]], + [using namespace Batch; + BatchManagerCatalog::getInstance();])], + [libbatch_ok="yes"], + [libbatch_ok="no"]) + AC_MSG_RESULT($libbatch_ok) + + LIBS=$LIBS_old +fi + +if test "x$libbatch_ok" = "xyes" ; then + LIBBATCH_INCLUDES="$LOCAL_INCLUDES" + LIBBATCH_LIBS="$LOCAL_LIBS" +fi + +AC_MSG_RESULT(for libBatch: $libbatch_ok) + +]) diff --git a/salome_adm/unix/config_files/check_libxml.m4 b/salome_adm/unix/config_files/check_libxml.m4 index d5104cd42..4a0377a50 100644 --- a/salome_adm/unix/config_files/check_libxml.m4 +++ b/salome_adm/unix/config_files/check_libxml.m4 @@ -1,34 +1,43 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + AC_DEFUN([CHECK_LIBXML],[ AC_CHECKING(for libxml library) +AC_LANG_SAVE +AC_LANG_C + AC_SUBST(LIBXML_INCLUDES) AC_SUBST(LIBXML_LIBS) LIBXML_INCLUDES="" LIBXML_LIBS="" +AC_CHECKING(for libxml location) +AC_ARG_WITH(libxml, + [ --with-libxml=DIR root directory path to LIBXML library installation ], + [LIBXML_DIR="$withval" + AC_MSG_RESULT("select $withval as path to LIBXML library")]) + +AC_MSG_RESULT(\$LIBXML_DIR = ${LIBXML_DIR}) + libxml_ok=no LOCAL_INCLUDES="" @@ -39,11 +48,14 @@ then LOCAL_INCLUDES="-I$LIBXML_DIR/include/libxml2" if test "x$LIBXML_DIR" = "x/usr" then + AC_MSG_NOTICE(Trying native Libxml2...) LOCAL_LIBS="-lxml2" else + AC_MSG_NOTICE(Trying Libxml2 from $LIBXML_DIR ...) LOCAL_LIBS="-L$LIBXML_DIR/lib -lxml2" fi else + AC_MSG_NOTICE(Trying native Libxml2...) LOCAL_INCLUDES="-I/usr/include/libxml2" LOCAL_LIBS="-lxml2" fi @@ -74,6 +86,8 @@ fi AC_MSG_RESULT(for libxml: $libxml_ok) +AC_LANG_RESTORE + ])dnl dnl diff --git a/salome_adm/unix/config_files/check_local.m4 b/salome_adm/unix/config_files/check_local.m4 deleted file mode 100755 index df683e86f..000000000 --- a/salome_adm/unix/config_files/check_local.m4 +++ /dev/null @@ -1,90 +0,0 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -dnl -# Check for Local -AC_DEFUN([CHECK_LOCAL], -[ - dnl AC_ARG_VAR([LOCAL], []) - AC_ARG_WITH([local], - AC_HELP_STRING([--with-local], - [tell configure script to use local submission. Default is --with-local.]), - [], - [withval=yes]) - - AC_MSG_CHECKING([for Local]) - - if test "x$withval" = "xyes" - then - WITH_LOCAL=yes - - AC_MSG_RESULT([$withval]) - - AC_ARG_VAR([RM], [A path to a rm-like command]) - AC_PATH_PROG([RM], [rm], [/bin/false]) - AC_DEFINE_UNQUOTED(RM, "$RM", [A path to a rm-like command]) - - AC_ARG_VAR([SH], [A path to a sh-like command]) - AC_PATH_PROG([SH], [sh], [/bin/false]) - AC_DEFINE_UNQUOTED(SH, "$SH", [A path to a sh-like command]) - AC_ARG_VAR([CP], [A path to a cp-like command]) - AC_PATH_PROG([CP], [cp], [/bin/false]) - AC_DEFINE_UNQUOTED(CP, "$CP", [A path to a cp-like command]) - - AC_ARG_VAR([RSH], [A path to a rsh-like command]) - AC_PATH_PROG([RSH], [rsh], [/bin/false]) - AC_DEFINE_UNQUOTED(RSH, "$RSH", [A path to a rsh-like command]) - AC_ARG_VAR([RCP], [A path to a rcp-like command]) - AC_PATH_PROG([RCP], [rcp], [/bin/false]) - AC_DEFINE_UNQUOTED(RCP, "$RCP", [A path to a rcp-like command]) - - AC_ARG_VAR([SSH], [A path to a ssh-like command]) - AC_PATH_PROG([SSH], [ssh], [/bin/false]) - AC_DEFINE_UNQUOTED(SSH, "$SSH", [A path to a ssh-like command]) - AC_ARG_VAR([SCP], [A path to a scp-like command]) - AC_PATH_PROG([SCP], [scp], [/bin/false]) - AC_DEFINE_UNQUOTED(SCP, "$SCP", [A path to a scp-like command]) - - - else - WITH_LOCAL=no - - AC_MSG_RESULT([no]) - - fi - - AM_CONDITIONAL(WITH_LOCAL, test $WITH_LOCAL = yes) - - localbatch_ok=$WITH_LOCAL - AC_SUBST(WITH_LOCAL) - AC_SUBST(RM) - AC_SUBST(SH) - AC_SUBST(CP) - AC_SUBST(RSH) - AC_SUBST(RCP) - AC_SUBST(SSH) - AC_SUBST(SCP) - - dnl _CS_gbo Pour forcer l'utilisation du config.h, inclu - dnl par les fichiers Batch_BatchManager_Local_*.cxx - dnl OWN_CONFIG_H=yes - dnl AC_SUBST(OWN_CONFIG_H) -]) - diff --git a/salome_adm/unix/config_files/check_lsf.m4 b/salome_adm/unix/config_files/check_lsf.m4 deleted file mode 100755 index 59e6694ba..000000000 --- a/salome_adm/unix/config_files/check_lsf.m4 +++ /dev/null @@ -1,105 +0,0 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -dnl -# Check for LSF -AC_DEFUN([CHECK_LSF], -[ - AC_ARG_WITH([lsf], - AC_HELP_STRING([--with-lsf[[[[[=path] ]]]]], - [tell configure script to use LSF that is located at . Default is no. If path is not given, it is automaticaly determined from LSF_ENVDIR variable.]), - [], - [withval=no]) - - AC_MSG_CHECKING([for LSF]) - - if test ! "x$withval" = "xno" - then - if test "x$withval" = "xyes" - then - if test ! "x$LSF_ENVDIR" = "x" - then - test -f "$LSF_ENVDIR/lsf.conf" && . "$LSF_ENVDIR/lsf.conf" - LSF=$LSF_TOP - else - dnl some default values ... - LSF=/usr - LSF_INCLUDEDIR=$LSF/include - LSF_LIBDIR=$LSF/lib - fi - else - LSF=$withval - LSF_INCLUDEDIR=$LSF/include - LSF_LIBDIR=$LSF/lib - fi - - AC_MSG_RESULT([$LSF]) - - dnl INCLUDE directory - - LSF_INCLUDES="-I${LSF_INCLUDEDIR}" - saved_CPPFLAGS=${CPPFLAGS} - CPPFLAGS="${CPPFLAGS} ${LSF_INCLUDES}" - AC_CHECK_HEADER([lsf/lsbatch.h], [lsf_header_found=yes], [lsf_header_found=no], []) - test x${lsf_header_found} = xno && AC_MSG_WARN([LSF include file not found]) - CPPFLAGS=${saved_CPPFLAGS} - AC_SUBST(LSF_INCLUDES) - - dnl LIB directory - - if test "x${LSF_LIBDIR}" = "x/usr/lib" - then - LSF_LDFLAGS="" - else - LSF_LDFLAGS="-L${LSF_LIBDIR}" - fi - LSF_LIBS="-lbat -llsf" - saved_LDFLAGS=${LDFLAGS} - saved_LIBS=${LIBS} - LDFLAGS="${LDFLAGS} ${LSF_LDFLAGS}" - lsf_lib_found=yes - AC_CHECK_LIB([lsf], [ls_load], [lsf_libs="-llsf ${lsf_libs}"], [lsf_lib_found=no], []) - AC_CHECK_LIB([bat], [lsb_init], [lsf_libs="-lbat ${lsf_libs}"], [lsf_lib_found=no], [-llsf]) - test x${lsf_lib_found} = xno && AC_MSG_WARN([LSF library not found]) - LIBS="${LSF_LIBS} ${LIBS}" - LDFLAGS=${saved_LDFLAGS} - LIBS=${saved_LIBS} - AC_SUBST(LSF_LDFLAGS) - AC_SUBST(LSF_LIBS) - - test x${lsf_lib_found} = xyes && test x${lsf_header_found} = xyes && WITH_LSF=yes - - else - WITH_LSF=no - - AC_MSG_RESULT([no]) - - fi - - AM_CONDITIONAL(WITH_LSF, test $WITH_LSF = yes) - - lsf_ok=$WITH_LSF - if test $lsf_ok = no ; then - lsf_ok= - fi - AC_SUBST(WITH_LSF) - -]) - diff --git a/salome_adm/unix/config_files/check_mpi.m4 b/salome_adm/unix/config_files/check_mpi.m4 index 57bedb985..0035d7cfc 100644 --- a/salome_adm/unix/config_files/check_mpi.m4 +++ b/salome_adm/unix/config_files/check_mpi.m4 @@ -1,24 +1,25 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + AC_DEFUN([CHECK_MPI],[ AC_REQUIRE([AC_PROG_CC])dnl @@ -27,6 +28,10 @@ AC_ARG_WITH(mpi_lib, [AC_HELP_STRING([--with-mpi_lib=DIR],[directory path of MPICH lib installation])], MPILIBREQUESTED="$withval") +AC_ARG_WITH(mpi_include, + [AC_HELP_STRING([--with-mpi_include=DIR],[directory path of MPICH header file installation])], + MPIINCLUDEREQUESTED="$withval") + AC_ARG_WITH(mpi, [AC_HELP_STRING([--with-mpi=DIR],[root directory path of MPICH installation])], MPIREQUESTED="yes",MPIREQUESTED="no") @@ -58,6 +63,10 @@ if test x"$MPIREQUESTED" = xyes; then MPI_LIBS="-L$MPILIBREQUESTED" fi + if test x"$MPIINCLUDEREQUESTED" != x; then + MPI_INCLUDES="-I$MPIINCLUDEREQUESTED" + fi + CPPFLAGS_old="$CPPFLAGS" CPPFLAGS="$MPI_INCLUDES $CPPFLAGS" AC_CHECK_HEADER(mpi.h,WITHMPI="yes",WITHMPI="no") @@ -81,6 +90,12 @@ if test x"$MPIREQUESTED" = xyes; then mpi_ok=no fi + if test "$WITHMPI2" = "yes";then + mpi2_ok=yes + else + mpi2_ok=no + fi + fi if test "$WITHMPI" = no; then @@ -126,5 +141,8 @@ AC_SUBST(WITHMPI) AC_SUBST(MPI_INCLUDES) AC_SUBST(MPI_LIBS) AC_SUBST(mpi_ok) +AC_SUBST(mpi2_ok) AM_CONDITIONAL(MPI_IS_OK, [test x"$mpi_ok" = xyes]) +AM_CONDITIONAL(MPI2_IS_OK, [test x"$mpi2_ok" = xyes]) + ])dnl diff --git a/salome_adm/unix/config_files/check_mpich.m4 b/salome_adm/unix/config_files/check_mpich.m4 index 690c5483b..69b7ef851 100644 --- a/salome_adm/unix/config_files/check_mpich.m4 +++ b/salome_adm/unix/config_files/check_mpich.m4 @@ -1,24 +1,25 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + AC_DEFUN([CHECK_MPICH],[ AC_REQUIRE([AC_PROG_CC])dnl @@ -43,9 +44,9 @@ if test "$WITHMPICH" = yes; then MPI_INCLUDES="-I$MPICH_HOME/include" if test "x$MPICH_HOME" = "x/usr" then - MPI_LIBS="" + MPI_LIBS="-lmpichcxx -lmpich -lopa -lmpl -lrt -lpthread" else - MPI_LIBS="-L$MPICH_HOME/lib" + MPI_LIBS="-L$MPICH_HOME/lib -lmpichcxx -lmpich -lopa -lmpl -lrt -lpthread" fi fi @@ -54,20 +55,24 @@ if test "$WITHMPICH" = yes; then AC_CHECK_HEADER(mpi.h,WITHMPICH="yes",WITHMPICH="no") CPPFLAGS="$CPPFLAGS_old" - if test "$WITHMPICH" = "yes";then - LDFLAGS_old="$LDFLAGS" - LDFLAGS="$MPI_LIBS $LDFLAGS" - AC_CHECK_LIB(mpich,MPI_Init,WITHMPICH="yes",WITHMPICH="no") - AC_CHECK_LIB(mpich,MPI_Publish_name,WITHMPI2="yes",WITHMPI2="no") - LDFLAGS="$LDFLAGS_old" - fi + LIBS_old="$LIBS" + LIBS="$MPI_LIBS $LIBS" + AC_CHECK_LIB(mpich,MPI_Init,WITHMPICH="yes",WITHMPICH="no") + AC_CHECK_LIB(mpich,MPI_Publish_name,WITHMPI2="yes",WITHMPI2="no") + LIBS="$LIBS_old" + AC_MSG_CHECKING(for mpich) if test "$WITHMPICH" = "yes";then - WITHMPI="yes" mpi_ok=yes - MPI_LIBS="$MPI_LIBS -lmpich" + mpi2_ok=$WITHMPI2 + WITHMPI="yes" + CPPFLAGS="-DWITHMPICH $CPPFLAGS" + AC_MSG_RESULT(yes) else mpi_ok=no + mpi2_ok=no + WITHMPI=no + AC_MSG_RESULT(no) fi fi diff --git a/salome_adm/unix/config_files/check_omniorb.m4 b/salome_adm/unix/config_files/check_omniorb.m4 index 580625067..a5901fead 100644 --- a/salome_adm/unix/config_files/check_omniorb.m4 +++ b/salome_adm/unix/config_files/check_omniorb.m4 @@ -1,24 +1,25 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + AC_DEFUN([CHECK_OMNIORB],[ AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_CXX])dnl @@ -129,7 +130,7 @@ then OMNIORB_RFLAGS="" else OMNIORB_LDFLAGS="-L$OMNIORB_LIB" - OMNIORB_RFLAGS="-R$OMNIORB_LIB" + OMNIORB_RFLAGS="-Wl,-R$OMNIORB_LIB" fi LIBS_old=$LIBS @@ -209,11 +210,13 @@ if test "x$omniORB_ok" = "xyes" then OMNIORB_IDLCXXFLAGS="-Wba -nf -I${OMNIORB_ROOT}/idl" - OMNIORB_IDLPYFLAGS_1='-bpython' + OMNIORB_PACOIDLCXXFLAGS="-nf -I${OMNIORB_ROOT}/idl" + OMNIORB_IDLPYFLAGS_1='-bpython -nf ' OMNIORB_IDLPYFLAGS_2=" -I${OMNIORB_ROOT}/idl" OMNIORB_IDLPYFLAGS=${OMNIORB_IDLPYFLAGS_1}${OMNIORB_IDLPYFLAGS_2} AC_SUBST(OMNIORB_IDLCXXFLAGS) + AC_SUBST(OMNIORB_PACOIDLCXXFLAGS) AC_SUBST(OMNIORB_IDLPYFLAGS) OMNIORB_IDL_CLN_H=.hh diff --git a/salome_adm/unix/config_files/check_openmpi.m4 b/salome_adm/unix/config_files/check_openmpi.m4 index cbbe91f4d..da3f98031 100644 --- a/salome_adm/unix/config_files/check_openmpi.m4 +++ b/salome_adm/unix/config_files/check_openmpi.m4 @@ -1,24 +1,22 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + AC_DEFUN([CHECK_OPENMPI],[ AC_ARG_WITH(openmpi, AC_HELP_STRING([--with-openmpi=DIR],[root directory path of openmpi installation]), @@ -33,8 +31,17 @@ if test "$WITHOPENMPI" = yes; then OPENMPI_HOME=$withval if test "$OPENMPI_HOME"; then - MPI_INCLUDES=`$OPENMPI_HOME/bin/mpicxx --showme:compile` - MPI_LIBS=`$OPENMPI_HOME/bin/mpicxx --showme:link` + if test -f "${OPENMPI_HOME}/include/mpi.h"; then + MPI_INCLUDES="-I${OPENMPI_HOME}/include" + else + MPI_INCLUDES=`$OPENMPI_HOME/bin/mpicxx --showme:compile` + fi + dnl Small modification for native debian-based distributions + if test "$OPENMPI_HOME" = "/usr/lib/openmpi"; then + MPI_LIBS=`mpicxx --showme:link` + else + MPI_LIBS=`$OPENMPI_HOME/bin/mpicxx --showme:link` + fi fi CPPFLAGS_old="$CPPFLAGS" @@ -42,12 +49,22 @@ if test "$WITHOPENMPI" = yes; then AC_CHECK_HEADER(mpi.h,WITHOPENMPI="yes",WITHOPENMPI="no") CPPFLAGS="$CPPFLAGS_old" + LIBS_old="$LIBS" + LIBS="-L${OPENMPI_HOME}/lib $LIBS" + AC_CHECK_LIB(mpi,MPI_Publish_name,WITHMPI2="yes",WITHMPI2="no") + LIBS="$LIBS_old" + AC_MSG_CHECKING(for openmpi) if test "$WITHOPENMPI" = "yes";then mpi_ok=yes + mpi2_ok=$WITHMPI2 + WITHMPI=yes + CPPFLAGS="-DOMPI_IGNORE_CXX_SEEK -DWITHOPENMPI $CPPFLAGS" AC_MSG_RESULT(yes) else mpi_ok=no + mpi2_ok=no + WITHMPI=no AC_MSG_RESULT(no) fi fi diff --git a/salome_adm/unix/config_files/check_openpbs.m4 b/salome_adm/unix/config_files/check_openpbs.m4 deleted file mode 100644 index a0247bd9f..000000000 --- a/salome_adm/unix/config_files/check_openpbs.m4 +++ /dev/null @@ -1,88 +0,0 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -dnl -# Check for OpenPBS -AC_DEFUN([CHECK_OPENPBS], -[ - AC_ARG_VAR([OPENPBS], [OpenPBS home directory]) - AC_ARG_WITH([openpbs], - AC_HELP_STRING([--with-openpbs=], - [tell configure script to use OpenPBS that is located at ]), - [test ! x"${withval}" = xyes && OPENPBS=${withval}], - []) - - dnl AC_ARG_VAR([OPENPBSSERVERNAME], [OpenPBS server_name file]) - dnl AC_ARG_WITH([openpbs-server-name], - dnl AC_HELP_STRING([--with-openpbs-server-name=], - dnl [tell configure script to use OpenPBS server_name file that is located at ]), - dnl [test ! x"${withval}" = xyes && OPENPBSSERVERNAME=${withval}], - dnl [with_openpbs_server_name=""]) - - - if test -z "${OPENPBS}" - then - AC_MSG_WARN([Environment variable OPENPBS not set. Skipping OpenPBS configuration.]) - - else - - OPENPBS_INCLUDES="-I${OPENPBS}/include" - saved_CPPFLAGS=${CPPFLAGS} - CPPFLAGS="${CPPFLAGS} ${OPENPBS_INCLUDES}" - AC_CHECK_HEADER([pbs_ifl.h], [openpbs_header_found=yes], [openpbs_header_found=no], []) - test x${openpbs_header_found} = xno && AC_MSG_WARN([OpenPBS include file not found]) - CPPFLAGS=${saved_CPPFLAGS} - AC_SUBST(OPENPBS_INCLUDES) - - if test "x${OPENPBS}" = "x/usr" - then - OPENPBS_LIBDIR="" - else - OPENPBS_LIBDIR="-L${OPENPBS}/lib" - fi - OPENPBS_LIBS="-lpbs" - saved_LDFLAGS=${LDFLAGS} - saved_LIBS=${LIBS} - LDFLAGS="${LDFLAGS} ${OPENPBS_LIBDIR}" - AC_CHECK_LIB([pbs], [pbs_connect], [openpbs_lib_found=yes], [openpbs_lib_found=no], []) - test x${openpbs_lib_found} = xno && AC_MSG_WARN([OpenPBS library not found]) - LIBS="${LIBS} ${OPENPBS_LIBS}" - LDFLAGS=${saved_LDFLAGS} - LIBS=${saved_LIBS} - AC_SUBST(OPENPBS_LIBDIR) - AC_SUBST(OPENPBS_LIBS) - - dnl test -z "${OPENPBSSERVERNAME}" && OPENPBSSERVERNAME="/usr/spool/PBS/server_name" - dnl AC_CHECK_FILE([${OPENPBSSERVERNAME}], [openpbs_server_name_found=yes], [openpbs_server_name_found=no]) - - test x${openpbs_header_found} = xyes && test x${openpbs_lib_found} = xyes && openpbs_ok="yes" - - fi - - WITHOPENPBS=$openpbs_ok - if test x$WITHOPENPBS = x ; then - WITHOPENPBS=no - fi - AC_SUBST(WITHOPENPBS) - - AM_CONDITIONAL(WITH_OPENPBS, test $WITHOPENPBS = yes) - -]) - diff --git a/salome_adm/unix/config_files/check_paco++.m4 b/salome_adm/unix/config_files/check_paco++.m4 index 844bbf68c..5c1d44502 100644 --- a/salome_adm/unix/config_files/check_paco++.m4 +++ b/salome_adm/unix/config_files/check_paco++.m4 @@ -1,24 +1,25 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + dnl File : check_paco++.m4 dnl Author : André RIBES (EDF) dnl Module : KERNEL @@ -34,14 +35,14 @@ if test "x$WITHPACO" = "xyes"; then PACOPATH=$withval PACO_INCLUDES="-I${PACOPATH}/include" - PACO_LIBS="-L${PACOPATH}/lib -lPaCO" + PACO_LIBS="-L${PACOPATH}/lib -lPaCO -lGaBro -lBasicBC" dnl a basic test to be sure that PaCO++ dnl is correctly installed. - AC_CHECK_PROG(PACO_IDL, PaCOIdlTool, yes, no, ${PACOPATH}/bin) + AC_CHECK_PROG(PACO_IDL, PaCOIdlTool.sh, yes, no, ${PACOPATH}/bin) if test "x$PACO_IDL" = "xno"; then PaCO_ok=no - AC_MSG_RESULT(PaCO++ binary not in ${PACOPATH}) + AC_MSG_RESULT(PaCO++ binary not in ${PACOPATH}/bin) fi else PaCO_ok=no @@ -51,7 +52,7 @@ AC_MSG_CHECKING(for PaCO++) if test "x$PaCO_ok" = "xyes" then AC_MSG_RESULT([yes]) - PACO_IDL=${PACOPATH}/bin/PaCOIdlTool + PACO_IDL=${PACOPATH}/bin/PaCOIdlTool.sh AC_SUBST(PACO_IDL) AC_SUBST(PACOPATH) AC_SUBST(PACO_INCLUDES) diff --git a/salome_adm/unix/config_files/check_sockets.m4 b/salome_adm/unix/config_files/check_sockets.m4 index 85b3bd699..41e7b91b0 100644 --- a/salome_adm/unix/config_files/check_sockets.m4 +++ b/salome_adm/unix/config_files/check_sockets.m4 @@ -1,24 +1,25 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + AC_DEFUN([CHECK_SOCKETS],[ dnl Author diff --git a/salome_adm/unix/config_files/check_sphinx.m4 b/salome_adm/unix/config_files/check_sphinx.m4 new file mode 100644 index 000000000..4210243cc --- /dev/null +++ b/salome_adm/unix/config_files/check_sphinx.m4 @@ -0,0 +1,35 @@ +dnl Copyright (C) 2006-2012 CEA/DEN, EDF R&D, OPEN CASCADE +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl +AC_DEFUN([CHECK_SPHINX],[ + +AC_CHECKING(for sphinx doc generator) + +sphinx_ok=yes +dnl where is sphinx ? +AC_PATH_PROG(SPHINX,sphinx-build) +if test "x$SPHINX" = "x" +then + AC_MSG_WARN(sphinx not found) + sphinx_ok=no +fi + +AM_CONDITIONAL(SPHINX_IS_OK, [test x"$sphinx_ok" = xyes]) + +])dnl +dnl diff --git a/salome_adm/unix/config_files/check_swig.m4 b/salome_adm/unix/config_files/check_swig.m4 index 02e1e4ab1..1109f9154 100644 --- a/salome_adm/unix/config_files/check_swig.m4 +++ b/salome_adm/unix/config_files/check_swig.m4 @@ -1,24 +1,25 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + AC_DEFUN([CHECK_SWIG],[ AC_REQUIRE([CHECK_PYTHON])dnl @@ -61,6 +62,7 @@ numpydir=`$PYTHON -c "import numpy;print numpy.get_include()" 2>/dev/null` if test -d "$numpydir"; then numpy_ok=yes PYTHON_INCLUDES="$PYTHON_INCLUDES -I$numpydir" + SWIG_FLAGS="$SWIG_FLAGS -DWITH_NUMPY=WITH_NUMPY " AC_DEFINE([WITH_NUMPY], [], [Python has numpy extension]) fi diff --git a/salome_adm/unix/config_files/check_tbb.m4 b/salome_adm/unix/config_files/check_tbb.m4 new file mode 100644 index 000000000..df1a86505 --- /dev/null +++ b/salome_adm/unix/config_files/check_tbb.m4 @@ -0,0 +1,117 @@ +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +dnl +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl + +AC_DEFUN([CHECK_TBB],[ +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_CPP])dnl + +AC_CHECKING(for TBB) + +AC_ARG_WITH(TBB, + [ --with-TBB=DIR root directory path to TBB installation ], + [TBBHOME="$withval" + AC_MSG_RESULT("select $withval as path to TBB") + ]) + +AC_SUBST(TBB_INCLUDES) +AC_SUBST(TBB_LIBS) + +TBB_INCLUDES="" +TBB_LIBS="" + +tbb_ok=no + +LOCAL_INCLUDES="" +LOCAL_LIBS="-ltbb -ltbbmalloc" + +AC_LANG_SAVE +AC_LANG_CPLUSPLUS + +CPPFLAGS_old=$CPPFLAGS + +if test "x$TBBHOME" != "xno"; then + if test "x$TBBHOME" == "xyes"; then + TBBHOME="" + fi + if test -z $TBBHOME + then + AC_MSG_WARN(undefined TBBHOME variable which specify TBB library installation directory) + AC_PATH_PROG(BINDIR, tbbvars.sh) + if test "x$BINDIR" != "x" ; then + dnl e.g. BINDIR = ./tbb/bin/intel64/cc4.1.0_libc2.4_kernel2.6.16.21/tbbvars.sh + TBBHOME=$BINDIR + TBBHOME=`echo ${TBBHOME} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"` + TBBHOME=`echo ${TBBHOME} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"` + TBBHOME=`echo ${TBBHOME} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"` + TBBHOME=`echo ${TBBHOME} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"` + fi + fi + if test ! -z $TBBHOME + then + TBBKERNEL='cc4.1.0_libc2.4_kernel2.6.16.21' + LOCAL_INCLUDES="-I$TBBHOME/include" + if test "x$TBBHOME" != "x/usr"; then + if test `uname -m` = "x86_64" ; then + LOCAL_LIBS="-L$TBBHOME/lib/intel64/$TBBKERNEL $LOCAL_LIBS" + else + LOCAL_LIBS="-L$TBBHOME/lib/ia32/$TBBKERNEL $LOCAL_LIBS" + fi + fi + fi + +dnl check tbb header + + CPPFLAGS="$CPPFLAGS $LOCAL_INCLUDES/tbb" + + AC_CHECK_HEADER(tbb.h,tbb_ok=yes ,tbb_ok=no) +fi + +if test "x$tbb_ok" = "xyes" +then + +dnl check TBB library + + LIBS_old="$LIBS" + LIBS="$LIBS $LOCAL_LIBS" + AC_TRY_LINK([#include ], + [tbb::simple_partitioner()], + tbb_ok=yes,tbb_ok=no) + + LIBS="$LIBS_old" + +fi + +CPPFLAGS=$CPPFLAGS_old +AC_LANG_RESTORE + +AC_MSG_RESULT(for TBB: $tbb_ok) + +if test "x$tbb_ok" = "xyes" +then + TBB_LIBS="$LOCAL_LIBS" + TBB_INCLUDES="$LOCAL_INCLUDES" + CPPFLAGS="-DWITH_TBB $CPPFLAGS" +fi + +AM_CONDITIONAL(WITH_TBB, [test x"$tbb_ok" = xyes]) + +])dnl diff --git a/salome_adm/unix/config_files/check_vtk.m4 b/salome_adm/unix/config_files/check_vtk.m4 new file mode 100644 index 000000000..4cfac1d8e --- /dev/null +++ b/salome_adm/unix/config_files/check_vtk.m4 @@ -0,0 +1,398 @@ +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +dnl +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl + +dnl OPTIONS_VTK +dnl ------------------------------------------------------------------------ +dnl Adds the --with-vtk=path, --with-vtk-version and --with-paraview configure options +dnl +AC_DEFUN([OPTIONS_VTK], [ + AC_ARG_WITH([vtk], + [AC_HELP_STRING([--with-vtk], [The prefix where VTK is installed (default "" means taking from environment variable unless VTK from ParaView is detected)])], + [with_vtk=$withval], [with_vtk=""]) + + AC_ARG_WITH([vtk-version], + [AC_HELP_STRING([--with-vtk-version], [VTK include directory name is vtk-suffix, e.g. vtk-5.0/. What is the suffix? (Default "yes" means taking from environment variable)])], + [vtk_suffix=$withval], [vtk_suffix="yes"]) + + AC_ARG_WITH([paraview], + [AC_HELP_STRING([--with-paraview], [ParaView from the specified location is used instead of VTK (default "" means taking from environment variable)])]) +]) + +dnl +dnl CHECK_VTK +dnl ------------------------------------------------------------------------ +dnl +AC_DEFUN([CHECK_VTK], [ +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_CXX])dnl +AC_REQUIRE([AC_PROG_CPP])dnl +AC_REQUIRE([AC_PROG_CXXCPP])dnl +AC_REQUIRE([AC_LINKER_OPTIONS])dnl + +AC_REQUIRE([OPTIONS_VTK])dnl + +AC_LANG_SAVE +AC_LANG_CPLUSPLUS + +AC_SUBST(VTK_INCLUDES) +AC_SUBST(VTK_LIBS) +AC_SUBST(VTKPY_MODULES) + +VTK_INCLUDES="" +VTK_LIBS="" +VTKPY_MODULES="" + +vtk_ok=no + +if test "x$OpenGL_ok" != "xyes" ; then + AC_MSG_WARN(VTK needs OpenGL correct configuration, check configure output) +fi + +AC_PATH_X +if test "x$x_libraries" != "x" +then + LXLIB="-L$x_libraries" +else + LXLIB="" +fi + +if test "x$x_libraries" = "x/usr/lib" +then + LXLIB="" +fi + +if test "x$x_libraries" = "x/usr/lib${LIB_LOCATION_SUFFIX}" +then + LXLIB="" +fi + +LOCAL_INCLUDES="$OGL_INCLUDES" +LOCAL_LIBS="-lvtkCommon -lvtkGraphics -lvtkImaging -lvtkFiltering -lvtkIO -lvtkRendering -lvtkHybrid -lvtkParallel -lvtkWidgets $LXLIB -lX11 -lXt" +TRY_LINK_LIBS="-lvtkCommon $LXLIB -lX11 -lXt" + +dnl VTK version suffix +if test -z $vtk_suffix ; then + vtk_suffix="yes" +fi +if test "x$vtk_suffix" = "xno" ; then + dnl in case user wrote --with-vtk-version=no, use empty suffix + vtk_suffix="" +fi +if test "x$vtk_suffix" != "xyes" ; then + VTKSUFFIX="$vtk_suffix" +else + dnl in case user wrote --with-vtk-version=yes, get the suffix from env + if test -z $VTKSUFFIX ; then + VTKSUFFIX="-5.0" + fi +fi + +dnl +dnl Use VTK from ParaView unless --with-paraview=no is given +dnl + +pv_vtk_ok=no + +case "x$with_paraview" in + + xno ) + PVHOME="" + ;; + + xyes | x ) + + if test -z $PVHOME ; then + AC_PATH_PROG(para_path, paraview) + if test "x$para_path" != "x" ; then + para_path=`dirname $para_path` + PVHOME=`dirname $para_path` + else + for d in /usr/local /usr ; do + if test -f ${d}/include/paraview${PVVERSION}/pqDialog.h ; then + AC_MSG_RESULT(trying ${d}) + PVHOME="${d}" + break + fi + if test -f ${d}/include/paraview-3.7/pqDialog.h ; then + AC_MSG_RESULT(trying ${d}) + PVHOME="${d}" + PVVERSION="-3.7" + break + fi + if test -f ${d}/include/paraview-3.8/pqDialog.h ; then + AC_MSG_RESULT(trying ${d}) + PVHOME="${d}" + PVVERSION="-3.8" + break + fi + if test -f ${d}/include/paraview/pqDialog.h ; then + AC_MSG_RESULT(trying ${d}) + PVHOME="${d}" + PVVERSION="" + break + fi + done + fi + fi + ;; + + * ) + PVHOME=${with_paraview} + ;; +esac + +dnl Check VTK from ParaView. + +if test "x$PVHOME" != "x" ; then + + if test "x$PVVERSION" = "x" ; then + for suffix in 3.7 3.8 ; do + if test -f $PVHOME/include/paraview-$suffix/vtkPVConfig.h ; then + PVVERSION=$suffix + break; + fi + done + fi + if test "x$PVVERSION" = "x" ; then + ls -1d $PVHOME/include/paraview-* > /dev/null 2>&1 + if test $? = 0 ; then + nb=$(ls -1d $PVHOME/include/paraview-* | wc -l) + if test $nb = 1 ; then + d=$(ls -1d $PVHOME/include/paraview-*) + PVVERSION=$(echo $d | awk -F "-" '{print $(NF)}') + fi + fi + fi + if test "x$PVVERSION" = "x" ; then + PVVERSION=`basename $PVHOME | sed -e "s,[[^-]]*,,"` + else + if test "${PVVERSION:0:1}" != "-" ; then + PVVERSION="-$PVVERSION" + fi + fi + + AC_CHECKING(for VTK from ParaView) + + PV_LOCAL_INCLUDES="-I$PVHOME/include/paraview$PVVERSION $LOCAL_INCLUDES" + PV_LOCAL_LIBS="-L$PVHOME/lib/paraview$PVVERSION -lvtksys -lvtkmetaio -lvtkverdict -lvtkNetCDF -lvtkDICOMParser -lvtkftgl -lvtkexoIIc $LOCAL_LIBS" + PV_TRY_LINK_LIBS="-L$PVHOME/lib/paraview$PVVERSION -lvtksys $TRY_LINK_LIBS" + + dnl vtk headers + CPPFLAGS_old="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $PV_LOCAL_INCLUDES" + + AC_CHECK_HEADER(vtkPoints.h,pv_vtk_ok="yes",pv_vtk_ok="no") + + CPPFLAGS="$CPPFLAGS_old" + + if test "x$pv_vtk_ok" = "xyes"; then + + dnl vtk libraries + + AC_MSG_CHECKING(linking VTK library from ParaView) + + LIBS_old="$LIBS" + LIBS="$LIBS $PV_TRY_LINK_LIBS" + CPPFLAGS_old="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $PV_LOCAL_INCLUDES" + + AC_CACHE_VAL(salome_cv_lib_pvvtk,[ + AC_TRY_LINK([#include "vtkPoints.h" + ], + [vtkPoints::New()], + [salome_cv_lib_pvvtk=yes], + [salome_cv_lib_pvvtk=no]) + ]) + pv_vtk_ok="$salome_cv_lib_pvvtk" + LIBS="$LIBS_old" + CPPFLAGS="$CPPFLAGS_old" + AC_MSG_RESULT($pv_vtk_ok) + fi + + dnl Find out version of VTK from ParaView + PVVTKVERSION=" Undefined" + if test "x$pv_vtk_ok" = "xyes"; then + AC_MSG_CHECKING(VTK version) + PVVTKVERSION=`grep VTK_VERSION $PVHOME/include/paraview$PVVERSION/vtkConfigure.h` + AC_MSG_RESULT(${PVVTKVERSION:20:10}) + fi +fi + +dnl +dnl Use regular VTK if no ParaView found or a newer version is provided via --with-vtk +dnl + +try_regular_vtk=no +if test "$pv_vtk_ok" = "no"; then + try_regular_vtk=yes +fi + +if test -z $with_vtk ; then + with_vtk="" +fi +case "x$with_vtk" in + xyes) + dnl in case user wrote --with-vtk=yes + with_vtk="" + ;; + xno) + dnl in case user wrote --with-vtk=no + with_vtk="" + AC_MSG_WARN(Value "no", specified for option --with-vtk, is not supported) + ;; + x) + ;; + *) + try_regular_vtk=yes + ;; +esac + +if test "$try_regular_vtk" = "yes"; then + + dnl Check regular VTK installation + AC_CHECKING(for regular VTK) + + dnl VTK install dir + + if test "x$with_vtk" != "x" ; then + VTKHOME="$with_vtk" + else + if test -z $VTKHOME ; then + AC_MSG_WARN(undefined VTKHOME variable which specify where vtk was compiled) + for d in /usr/local /usr ; do + if test -f ${d}/include/vtk${VTKSUFFIX}/vtkPlane.h ; then + AC_MSG_RESULT(trying ${d}) + VTKHOME="${d}" + break + fi + if test -f ${d}/include/vtk-5.0/vtkPlane.h ; then + AC_MSG_RESULT(trying ${d}) + VTKHOME="${d}" + VTKSUFFIX="-5.0" + break + fi + if test -f ${d}/include/vtk-5.2/vtkPlane.h ; then + AC_MSG_RESULT(trying ${d}) + VTKHOME="${d}" + VTKSUFFIX="-5.2" + break + fi + if test -f ${d}/include/vtk/vtkPlane.h ; then + AC_MSG_RESULT(trying ${d}) + VTKHOME="${d}" + VTKSUFFIX="" + break + fi + done + fi + fi + + VTK_LOCAL_INCLUDES="-I$VTKHOME/include/vtk${VTKSUFFIX} $LOCAL_INCLUDES" + VTK_LOCAL_LIBS="-L$VTKHOME/lib${LIB_LOCATION_SUFFIX}/vtk${VTKSUFFIX} $LOCAL_LIBS" + VTK_TRY_LINK_LIBS="-L$VTKHOME/lib${LIB_LOCATION_SUFFIX} -L$VTKHOME/lib${LIB_LOCATION_SUFFIX}/vtk${VTKSUFFIX} $TRY_LINK_LIBS" + if test "x$VTKHOME" != "x/usr" ; then + VTK_LOCAL_LIBS="-L$VTKHOME/lib${LIB_LOCATION_SUFFIX}/vtk${VTKSUFFIX} $LOCAL_LIBS" + fi + + dnl vtk headers + CPPFLAGS_old="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $VTK_LOCAL_INCLUDES" + + AC_CHECK_HEADER(vtkPlane.h,vtk_ok="yes",vtk_ok="no") + + CPPFLAGS="$CPPFLAGS_old" + + if test "x$vtk_ok" = "xyes"; then + + # VTK_INCLUDES="$LOCAL_INCLUDES" + + dnl vtk libraries + + AC_MSG_CHECKING(linking regular VTK library) + + LIBS_old="$LIBS" + LIBS="$LIBS $VTK_TRY_LINK_LIBS" + CPPFLAGS_old="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $VTK_LOCAL_INCLUDES" + + dnl VTKPY_MODULES="$VTKHOME/python" + + AC_CACHE_VAL(salome_cv_lib_vtk,[ + AC_TRY_LINK([#include "vtkPlane.h" + ], + [vtkPlane::New()], + [salome_cv_lib_vtk=yes], + [salome_cv_lib_vtk=no]) + ]) + vtk_ok="$salome_cv_lib_vtk" + LIBS="$LIBS_old" + CPPFLAGS="$CPPFLAGS_old" + AC_MSG_RESULT($vtk_ok) + fi + + VTKVERSION=" Undefined" + if test "x$vtk_ok" = "xyes"; then + AC_MSG_CHECKING(VTK version) + VTKVERSION=`grep VTK_VERSION $VTKHOME/include/vtk${VTKSUFFIX}/vtkConfigure.h` + AC_MSG_RESULT(${VTKVERSION:20:10}) + fi +fi + +dnl Select either of VTKs +if test "x$pv_vtk_ok" = "xyes" ; then + if test "x$vtk_ok" = "xyes" ; then + if test "$VTKVERSION" \> "$PVVTKVERSION" ; then + AC_MSG_RESULT([VTK from ParaView is older, ignored]) + pv_vtk_ok=no + else + AC_MSG_RESULT([regular VTK is older, ignored]) + vtk_ok=no + fi + fi +fi + +if test "x$pv_vtk_ok" = "xyes" ; then + AC_MSG_RESULT(for VTK: yes) + VTK_INCLUDES="$PV_LOCAL_INCLUDES -DVTK_EXCLUDE_STRSTREAM_HEADERS" + VTK_LIBS="$PV_LOCAL_LIBS" + VTK_MT_LIBS="$VTK_LIBS" + #VTKPY_MODULES= + vtk_ok=yes +else + if test "x$vtk_ok" = "xyes" ; then + AC_MSG_RESULT(for VTK: yes) + VTK_INCLUDES="$VTK_LOCAL_INCLUDES -DVTK_EXCLUDE_STRSTREAM_HEADERS" + VTK_LIBS="$VTK_LOCAL_LIBS" + VTK_MT_LIBS="$VTK_LIBS" + #VTKPY_MODULES= + else + AC_MSG_RESULT(for VTK: no) + AC_MSG_WARN(unable to link with vtk library) + fi +fi + +AC_LANG_RESTORE + +# Save cache +AC_CACHE_SAVE + +])dnl diff --git a/salome_adm/unix/config_files/check_withihm.m4 b/salome_adm/unix/config_files/check_withihm.m4 index 6448f9685..17398f9da 100644 --- a/salome_adm/unix/config_files/check_withihm.m4 +++ b/salome_adm/unix/config_files/check_withihm.m4 @@ -1,24 +1,25 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + AC_DEFUN([CHECK_WITHIHM],[ AC_ARG_WITH(gui, diff --git a/salome_adm/unix/config_files/enable_pthreads.m4 b/salome_adm/unix/config_files/enable_pthreads.m4 index 70804f7ff..c7325cc4b 100644 --- a/salome_adm/unix/config_files/enable_pthreads.m4 +++ b/salome_adm/unix/config_files/enable_pthreads.m4 @@ -1,24 +1,3 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -dnl dnl modify CFLAGS, CXXFLAGS and LIBS for compiling pthread-based programs. dnl@author (C) Ruslan Shevchenko , 1998, 2000 dnl@id $Id$ diff --git a/salome_adm/unix/config_files/hack_libtool.m4 b/salome_adm/unix/config_files/hack_libtool.m4 new file mode 100644 index 000000000..a571e0b41 --- /dev/null +++ b/salome_adm/unix/config_files/hack_libtool.m4 @@ -0,0 +1,48 @@ +dnl Copyright (C) 2010-2012 CEA/DEN, EDF R&D, OPEN CASCADE +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl + +dnl --- +dnl File : hack_libtool.m4 +dnl Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) +dnl --- +dnl +dnl The purpose of below autoconf macro is to workaround very annoying problem +dnl of the GNU libtool program. The problem leads to the incorrect linking +dnl to the native libraries (installed in /usr/lib[64]) instead of those supplied +dnl with specific -Ldir options. + +AC_DEFUN([AC_HACK_LIBTOOL],[ +cat > hack_libtool < ${INSTALL} << EOF +#!/bin/sh + +nb_args=\$[#] +args=\$[*] +if test \$nb_args -gt 1 ; then + nb=\$(expr \$nb_args - 2) + shift \$nb + target=\$[2] + if test -f \$target ; then + orig=\$[1] + if test -f \$orig ; then + diff \$orig \$target > /dev/null 2>&1 + if test \$[?] = 0 ; then + echo \$orig and \$target are identical + exit 0 + fi + fi + fi +fi +${GLOBAL_INSTALL} \$args +EOF +chmod +x ${INSTALL} +AC_SUBST(INSTALL) +AC_SUBST(GLOBAL_INSTALL) +])dnl diff --git a/salome_adm/unix/config_files/production.m4 b/salome_adm/unix/config_files/production.m4 index e109a03dc..3efe7f474 100644 --- a/salome_adm/unix/config_files/production.m4 +++ b/salome_adm/unix/config_files/production.m4 @@ -1,24 +1,25 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + dnl define macros : dnl AC_ENABLE_PRODUCTION AC_DISABLE_PRODUCTION dnl AC_ENABLE_DEBUG AC_DISABLE_DEBUG @@ -38,10 +39,8 @@ AC_ARG_ENABLE([production], ], [enable_production=]AC_ENABLE_PRODUCTION_DEFAULT) -AC_CXX_OPTION(-Wno-deprecated,CXXFLAGS) AC_CXX_OPTION(-Wparentheses,CXXFLAGS) AC_CXX_OPTION(-Wreturn-type,CXXFLAGS) -AC_CXX_OPTION(-Wmissing-declarations,CXXFLAGS) AC_CXX_OPTION(-fmessage-length=0,CXXFLAGS) AC_CXX_OPTION(-Wunused,CXXFLAGS) AC_CXX_OPTION(-pipe,CXXFLAGS) @@ -82,3 +81,25 @@ fi # AC_DISABLE_DEBUG - set the default flag to --disable-debug AC_DEFUN([AC_DISABLE_DEBUG], [AC_ENABLE_DEBUG(no)]) + +dnl AC_ENABLE_MPI_SEQ_CONTAINER +dnl +dnl This macro enables mpi into the sequential container +dnl default = not enabled +dnl +AC_DEFUN([AC_ENABLE_MPI_SEQ_CONTAINER], + [define([AC_ENABLE_MPI_SEQ_CONTAINER_DEFAULT], ifelse($1, no, no, yes))dnl + AC_ARG_ENABLE([mpi-seq-container], + [AC_HELP_STRING([--enable-mpi-seq-container], + [enable mpi into seq container @<:@default=]AC_ENABLE_MPI_SEQ_CONTAINER_DEFAULT[@:>@])], + [ + enable_mpi_seq_container=$enableval + ], + [enable_mpi_seq_container=]AC_ENABLE_MPI_SEQ_CONTAINER_DEFAULT) + +if test "X$enable_mpi_seq_container" = "Xyes"; then + CFLAGS="$CFLAGS -D_MPI_SEQ_CONTAINER_ " + CXXFLAGS="$CXXFLAGS -D_MPI_SEQ_CONTAINER_ " +fi +AM_CONDITIONAL([WITH_MPI_SEQ_CONTAINER], [test "x$enable_mpi_seq_container" = "xyes"]) +]) diff --git a/salome_adm/unix/config_files/pyembed.m4 b/salome_adm/unix/config_files/pyembed.m4 index e737ab584..1c4845bb5 100644 --- a/salome_adm/unix/config_files/pyembed.m4 +++ b/salome_adm/unix/config_files/pyembed.m4 @@ -1,24 +1,25 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + dnl This macro defines the PYTHON_EMBED_{CFLAGS,LDFLAGS,LIBS} substitutions dnl that should be used when embedding the python interpreter into a program. dnl AM_INIT_PYTHON_EMBED diff --git a/salome_adm/unix/config_files/python.m4 b/salome_adm/unix/config_files/python.m4 index 16c068371..5ebc1f505 100644 --- a/salome_adm/unix/config_files/python.m4 +++ b/salome_adm/unix/config_files/python.m4 @@ -1,24 +1,25 @@ -dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl + ## ------------------------ ## Python file handling ## From Andrew Dalke @@ -63,6 +64,11 @@ AC_DEFUN([CHECK_PYTHON], AC_SUBST(PYTHON_VERSION) PY_MAKEFILE=${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python$PYTHON_VERSION/config/Makefile + if test ! -f "$PY_MAKEFILE"; then + if test "${build_cpu::6}" = "x86_64" ; then + PY_MAKEFILE=${PYTHON_PREFIX}/lib64/python$PYTHON_VERSION/config/Makefile + fi + fi if test ! -f "$PY_MAKEFILE"; then AC_MSG_WARN([*** Couldn't find ${PY_MAKEFILE}. Maybe you are *** missing the development portion of the python installation]) @@ -76,6 +82,13 @@ AC_DEFUN([CHECK_PYTHON], PYTHON_LIBS="-L${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/config -lpython${PYTHON_VERSION}" PYTHON_LIB=$PYTHON_LIBS PYTHON_LIBA=${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python$PYTHON_VERSION/config/libpython$PYTHON_VERSION.a + if test "${build_cpu::6}" = "x86_64" ; then + if test "$PY_MAKEFILE" = "${PYTHON_PREFIX}/lib64/python$PYTHON_VERSION/config/Makefile" ; then + PYTHON_LIBS="-L${PYTHON_PREFIX}/lib64/python${PYTHON_VERSION}/config -lpython${PYTHON_VERSION}" + PYTHON_LIB=$PYTHON_LIBS + PYTHON_LIBA=${PYTHON_PREFIX}/lib64/python$PYTHON_VERSION/config/libpython$PYTHON_VERSION.a + fi + fi dnl At times (like when building shared libraries) you may want dnl to know which OS Python thinks this is. diff --git a/salome_adm/unix/make_common_starter.am b/salome_adm/unix/make_common_starter.am index 13a4014ad..2f07b58af 100644 --- a/salome_adm/unix/make_common_starter.am +++ b/salome_adm/unix/make_common_starter.am @@ -1,24 +1,38 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + +# ============================================================ +# The following is to avoid PACKAGE_... env variable +# redefinition compilation warnings +# ============================================================ + +if !WITHONLYLAUNCHER + AM_CXXFLAGS = -I$(top_builddir)/salome_adm/unix -include SALOMEconfig.h + AM_CPPFLAGS = -I$(top_builddir)/salome_adm/unix -include SALOMEconfig.h +else WITHONLYLAUNCHER + AM_CXXFLAGS = + AM_CPPFLAGS = +endif + # ============================================================ # This file defines the common definitions used in several # Makefile. This file must be included, if needed, by the file @@ -30,9 +44,17 @@ salomeincludedir = $(includedir)/salome libdir = $(prefix)/lib@LIB_LOCATION_SUFFIX@/salome bindir = $(prefix)/bin/salome salomescriptdir = $(bindir) +# _GBO_SALOME_PYTHON_PACKAGING_ +# Maybe we could try to suppress on stage in this folder path, for +# example by installing by default the python files in site-packages +# folder. Then, python packages could be installed in the +# site-packages/salome folder (main package containing the root +# __init__.py file). This could be done by replacing salomepythondir +# and salomepyexecdir by pythondir and pyexecdir respectively (TO BE +# DONE) salomepythondir = $(pythondir)/salome salomepyexecdir = $(pyexecdir)/salome - +salomepypkgdir = $(salomepythondir)/salome # Directory for installing idl files salomeidldir = $(prefix)/idl/salome diff --git a/src/Basics/BasicsGenericDestructor.cxx b/src/Basics/BasicsGenericDestructor.cxx index 65464f664..5f35554f2 100644 --- a/src/Basics/BasicsGenericDestructor.cxx +++ b/src/Basics/BasicsGenericDestructor.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Basics : general SALOME definitions and tools (C++ part - no CORBA) // File : BasicGenericDestructor.cxx // Author : Antoine YESSAYAN, Paul RASCLE, EDF @@ -31,8 +32,6 @@ #include "BasicsGenericDestructor.hxx" -using namespace std; - void HouseKeeping(); std::list PROTECTED_DELETE::_objList; @@ -60,17 +59,17 @@ void PROTECTED_DELETE::deleteInstance(PROTECTED_DELETE *anObject) return; else { - int ret; - ret = pthread_mutex_lock(&_listMutex); // acquire lock, an check again - if (std::find(_objList.begin(), _objList.end(), anObject) - != _objList.end()) - { - DEVTRACE("PROTECTED_DELETE::deleteInstance1 " << anObject); - delete anObject; - DEVTRACE("PROTECTED_DELETE::deleteInstance2 " << &_objList); - _objList.remove(anObject); - } - ret = pthread_mutex_unlock(&_listMutex); // release lock + int ret; + ret = pthread_mutex_lock(&_listMutex); // acquire lock, an check again + if (std::find(_objList.begin(), _objList.end(), anObject) + != _objList.end()) + { + DEVTRACE("PROTECTED_DELETE::deleteInstance1 " << anObject); + delete anObject; + DEVTRACE("PROTECTED_DELETE::deleteInstance2 " << &_objList); + _objList.remove(anObject); + } + ret = pthread_mutex_unlock(&_listMutex); // release lock } } @@ -116,12 +115,16 @@ public: { if (Make_ATEXIT && !atExitSingletonDone) { - DEVTRACE("atExitSingleton(" << Make_ATEXIT << ")"); - assert(GENERIC_DESTRUCTOR::Destructors == 0); - GENERIC_DESTRUCTOR::Destructors = new std::list; - int cr = atexit(HouseKeeping); - assert(cr == 0); - atExitSingletonDone = true; + DEVTRACE("atExitSingleton(" << Make_ATEXIT << ")"); + assert(GENERIC_DESTRUCTOR::Destructors == 0); + GENERIC_DESTRUCTOR::Destructors = new std::list; +#ifndef _DEBUG_ + atexit(HouseKeeping); +#else + int cr = atexit(HouseKeeping); + assert(cr == 0); +#endif + atExitSingletonDone = true; } } @@ -150,16 +153,16 @@ void HouseKeeping( void ) if(GENERIC_DESTRUCTOR::Destructors->size()) { std::list::iterator it = - GENERIC_DESTRUCTOR::Destructors->end(); + GENERIC_DESTRUCTOR::Destructors->end(); do - { - it-- ; - GENERIC_DESTRUCTOR* ptr = *it ; - DEVTRACE("HouseKeeping() " << typeid(ptr).name()); - (*ptr)(); - delete ptr ; - } + { + it-- ; + GENERIC_DESTRUCTOR* ptr = *it ; + DEVTRACE("HouseKeeping() " << typeid(ptr).name()); + (*ptr)(); + delete ptr ; + } while (it != GENERIC_DESTRUCTOR::Destructors->begin()) ; DEVTRACE("HouseKeeping() end list "); @@ -186,7 +189,7 @@ void HouseKeeping( void ) const int GENERIC_DESTRUCTOR::Add(GENERIC_DESTRUCTOR &anObject) { DEVTRACE("GENERIC_DESTRUCTOR::Add("<= 0); } @@ -153,9 +158,9 @@ public: { if (_objectPtr) { - DEVTRACE("DESTRUCTOR_OF<>::operator() " << _objectPtr); - if (_objectPtr) PROTECTED_DELETE::deleteInstance(_objectPtr); - _objectPtr = NULL; + DEVTRACE("DESTRUCTOR_OF<>::operator() " << _objectPtr); + if (_objectPtr) PROTECTED_DELETE::deleteInstance(_objectPtr); + _objectPtr = NULL; } } diff --git a/src/Basics/Basics_DirUtils.cxx b/src/Basics/Basics_DirUtils.cxx index e1682301f..22359e8d3 100644 --- a/src/Basics/Basics_DirUtils.cxx +++ b/src/Basics/Basics_DirUtils.cxx @@ -1,43 +1,40 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : Basics_DirUtils.cxx // Autor : Alexander A. BORODIN // Module : SALOME // #include "Basics_DirUtils.hxx" - +#include #include #include #ifndef WIN32 # include # include +# include #else # include # include #endif -using namespace std; - #ifdef WIN32 # define _separator_ '\\' #else @@ -46,25 +43,32 @@ using namespace std; namespace Kernel_Utils { - string GetBaseName( const std::string& file_path ) + std::string GetBaseName( const std::string& file_path ) { int pos = file_path.rfind( _separator_ ); if ( pos >= 0 ) - return pos < file_path.size()-1 ? file_path.substr( pos+1 ) : ""; + return pos < (int)file_path.size()-1 ? file_path.substr( pos+1 ) : ""; return file_path; } - string GetTmpDirByEnv( const std::string& tmp_path_env ) + std::string GetDirName( const std::string& file_path ) + { + int pos = file_path.rfind( _separator_ ); + if ( pos >= 0 ) + return pos < (int)file_path.size()-1 ? file_path.substr(0, pos ) : ""; + return std::string("."); + } + + std::string GetTmpDirByEnv( const std::string& tmp_path_env ) { - string dir; char* val = getenv( tmp_path_env.c_str() ); - val ? dir = string( val ) : ""; + std::string dir = val ? val : ""; return GetTmpDirByPath( dir ); } - string GetTmpDirByPath( const std::string& tmp_path ) + std::string GetTmpDirByPath( const std::string& tmp_path ) { - string aTmpDir = tmp_path; + std::string aTmpDir = tmp_path; if ( aTmpDir == "" ) { #ifdef WIN32 @@ -73,14 +77,14 @@ namespace Kernel_Utils { Tmp_dir = getenv("TMP"); if (Tmp_dir == NULL) - aTmpDir = string("C:\\"); + aTmpDir = std::string("C:\\"); else - aTmpDir = string(Tmp_dir); + aTmpDir = std::string(Tmp_dir); } else - aTmpDir = string(Tmp_dir); + aTmpDir = std::string(Tmp_dir); #else - aTmpDir = string("/tmp/"); + aTmpDir = std::string("/tmp/"); #endif } @@ -91,12 +95,12 @@ namespace Kernel_Utils int aRND = 999 + (int)(100000.0*rand()/(RAND_MAX+1.0)); //Get a random number to present a name of a sub directory char buffer[127]; sprintf(buffer, "%d", aRND); - string aSubDir(buffer); - if(aSubDir.size() <= 1) aSubDir = string("123409876"); + std::string aSubDir(buffer); + if(aSubDir.size() <= 1) aSubDir = std::string("123409876"); aTmpDir += aSubDir; //Get RND sub directory - string aDir = aTmpDir; + std::string aDir = aTmpDir; if(IsExists(aDir)) { for(aRND = 0; IsExists(aDir); aRND++) { @@ -120,7 +124,7 @@ namespace Kernel_Utils // function : GetTempDir // purpose : Returns a temp directory to store created files like "/tmp/sub_dir/" //============================================================================ - string GetTmpDir() + std::string GetTmpDir() { return GetTmpDirByPath( "" ); } @@ -129,17 +133,17 @@ namespace Kernel_Utils // function : GetTempFileName // purpose : Returns the unique temporary file name without any extension /tmp/something/file for Unix or c:\something\file for WIN32 //============================================================================ - string GetTmpFileName() + std::string GetTmpFileName() { - string tmpDir = GetTmpDir(); - string aFilePath = ""; + std::string tmpDir = GetTmpDir(); + std::string aFilePath = ""; if(IsExists(tmpDir)) { srand((unsigned int)time(NULL)); int aRND = 999 + (int)(100000.0*rand()/(RAND_MAX+1.0)); //Get a random number to present a name of a sub directory char buffer[127]; sprintf(buffer, "%d", aRND); - string aSubDir(buffer); - if(aSubDir.size() <= 1) aSubDir = string("123409876"); + std::string aSubDir(buffer); + if(aSubDir.size() <= 1) aSubDir = std::string("123409876"); aFilePath = tmpDir; for(aRND = 0; IsExists(aFilePath); aRND++) { @@ -154,7 +158,7 @@ namespace Kernel_Utils // function : IsExists // purpose : Returns True(False) if the path (not)exists //============================================================================ - bool IsExists(const string& thePath) + bool IsExists(const std::string& thePath) { #ifdef WIN32 if ( GetFileAttributes ( thePath.c_str() ) == 0xFFFFFFFF ) { @@ -169,34 +173,54 @@ namespace Kernel_Utils return true; } + //============================================================================ + // function : IsWritable + // purpose : Returns True(False) if the path is (not) writable + //============================================================================ + bool IsWritable(const std::string& thePath) + { +#ifdef WIN32 + if ( GetFileAttributes ( thePath.c_str() ) == 0xFFFFFFFF ) { + if ( GetLastError () == FILE_ATTRIBUTE_READONLY ) { + return false; + } + } +#else + int status = access(thePath.c_str(),W_OK); + if (status != 0) return false; +#endif + return true; + } + + //============================================================================ // function : GetDirByPath // purpose : Returns directory by path and converts it to native system format //============================================================================ - string GetDirByPath(const string& thePath) + std::string GetDirByPath(const std::string& thePath) { if (thePath.empty()) return ""; - string path = thePath; - string::size_type length = path.length(); + std::string path = thePath; + std::string::size_type length = path.length(); //detect all separators in Unix format - for ( int i = 0; i < length; i++ ) + for ( unsigned int i = 0; i < length; i++ ) { if( path[i] == '/' ) path[i] = '|'; } //detect all separators in Windows format - for ( int i = 0; i < length; i++ ) + for ( unsigned int i = 0; i < length; i++ ) { if( path[i] == '\\' ) path[i] = '|'; } - string::size_type pos = path.rfind('|'); - if ( pos == string::npos ) + std::string::size_type pos = path.rfind('|'); + if ( pos == std::string::npos ) { #ifdef WIN32 //check for disk letter ( C: ) @@ -214,7 +238,7 @@ namespace Kernel_Utils } length = path.length(); - for ( int i = 0; i < length; i++ ) + for ( unsigned int i = 0; i < length; i++ ) { if( path[i] == '|' ) path[i] = _separator_; @@ -227,7 +251,7 @@ namespace Kernel_Utils // purpose : Returns True(False) if the path (not) empty // Also returns False if the path is not valid //============================================================================ - bool IsEmptyDir(const string& thePath) + bool IsEmptyDir(const std::string& thePath) { if ( thePath.empty() || !IsExists(thePath)) return false; @@ -260,7 +284,7 @@ namespace Kernel_Utils result = true; //empty if no file found while ((dirp = readdir(dp)) != NULL && result ) { - string file_name(dirp->d_name); + std::string file_name(dirp->d_name); result = file_name.empty() || file_name == "." || file_name == ".."; //if any file - break and return false } closedir(dp); diff --git a/src/Basics/Basics_DirUtils.hxx b/src/Basics/Basics_DirUtils.hxx index 048bdfea0..1e2e9f071 100644 --- a/src/Basics/Basics_DirUtils.hxx +++ b/src/Basics/Basics_DirUtils.hxx @@ -1,24 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Utils : general SALOME's definitions and tools // File : Basics_DirUtils.hxx // Autor : Alexander A. BORODIN @@ -36,6 +34,9 @@ namespace Kernel_Utils // Extracts and returns the base name of the specified file name. BASICS_EXPORT std::string GetBaseName( const std::string& file_path ); + // Extracts and returns the dir name of the specified file name. + BASICS_EXPORT std::string GetDirName( const std::string& file_path ); + // Returns the unique temporary directory, that is defined in tmp_path_env if this variable is set // otherwise return /tmp/something/ for Unix or c:\something\ for WIN32 BASICS_EXPORT std::string GetTmpDirByEnv( const std::string& tmp_path_env ); @@ -56,6 +57,9 @@ namespace Kernel_Utils // Returns True(False) if the path (not)exists BASICS_EXPORT bool IsExists( const std::string& path ); + // Returns True(False) if the path is writable + BASICS_EXPORT bool IsWritable( const std::string& path ); + // Returns directory by path and converts it to native system format BASICS_EXPORT std::string GetDirByPath( const std::string& path ); diff --git a/src/Basics/Basics_OCCTVersion.hxx b/src/Basics/Basics_OCCTVersion.hxx new file mode 100644 index 000000000..b8cb0814a --- /dev/null +++ b/src/Basics/Basics_OCCTVersion.hxx @@ -0,0 +1,41 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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 +// + +// File : Basics_OCCTVersion.hxx +// Author : Julia DOROVSKIKH, Open CASCADE S.A.S (julia.dorovskikh@opencascade.com) + +#ifndef BASICS_OCCTVERSION_HXX +#define BASICS_OCCTVERSION_HXX + +#include + +#ifdef OCC_VERSION_SERVICEPACK +# define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8 | OCC_VERSION_SERVICEPACK) +#else +# ifdef OCC_VERSION_DEVELOPMENT +# define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8 | 1) +# else +# define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8) +# endif +#endif + +#endif // BASICS_OCCTVERSION_HXX diff --git a/src/Basics/Basics_Utils.cxx b/src/Basics/Basics_Utils.cxx index 10a12b74a..77eaacc19 100644 --- a/src/Basics/Basics_Utils.cxx +++ b/src/Basics/Basics_Utils.cxx @@ -1,43 +1,41 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : Basics_Utils.cxx // Autor : Alexander A. BORODIN // Module : SALOME // + #include "Basics_Utils.hxx" #include +#include #ifndef WIN32 #include #include -#else -#include +#include #endif -using namespace std; namespace Kernel_Utils { - string GetHostname() + std::string GetHostname() { int ls = 100, r = 1; char *s; @@ -77,9 +75,54 @@ namespace Kernel_Utils char *aDot = (strchr(s,'.')); if (aDot) aDot[0] = '\0'; - string p = s; + std::string p = s; delete [] s; return p; } + Localizer::Localizer() + { + myCurLocale = setlocale(LC_NUMERIC, 0); + setlocale(LC_NUMERIC, "C"); + } + + Localizer::~Localizer() + { + setlocale(LC_NUMERIC, myCurLocale.c_str()); + } + + std::string GetGUID( GUIDtype type ) + { + std::string guid; + + switch ( type ) { + case DefUserID: + guid = "FFFFFFFF-D9CD-11d6-945D-1050DA506788"; break; + case ObjectdID: + guid = "C08F3C95-F112-4023-8776-78F1427D0B6D"; break; + } + + return guid; + } + +#ifndef WIN32 + void print_traceback() + { + void *array[50]; + size_t size; + char **strings; + size_t i; + + size = backtrace (array, 40); + strings = backtrace_symbols (array, size); + + for (i = 0; i < size; i++) + { + std::cerr << strings[i] << std::endl; + } + + free (strings); + } +#endif + } diff --git a/src/Basics/Basics_Utils.hxx b/src/Basics/Basics_Utils.hxx index ed99361c7..8a104d2a0 100644 --- a/src/Basics/Basics_Utils.hxx +++ b/src/Basics/Basics_Utils.hxx @@ -1,24 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Utils : general SALOME's definitions and tools // File : Basics_DirUtils.hxx // Autor : Alexander A. BORODIN @@ -28,12 +26,109 @@ #define _Basics_UTILS_HXX_ #include "SALOME_Basics.hxx" - #include +#include + +#ifndef WIN32 +#include +#else +#include +#include +#pragma comment(lib,"winmm.lib") +#endif + namespace Kernel_Utils { BASICS_EXPORT std::string GetHostname(); + + class BASICS_EXPORT Localizer + { + public: + Localizer(); + ~Localizer(); + private: + std::string myCurLocale; + }; + + //! GUID type + enum GUIDtype { + DefUserID = 1, //!< Default user attribute ID + ObjectdID //!< Global usage object identifier ID + }; + + //! Get predefined GUID + BASICS_EXPORT std::string GetGUID( GUIDtype ); +#ifndef WIN32 + BASICS_EXPORT void print_traceback(); +#endif } + +// +// ============================================================= +// Helper macro for time analysis +// ============================================================= +// +#ifndef WIN32 +#define START_TIMING(name) static long name##tcount=0;static long name##cumul;long name##tt0; timeval name##tv; gettimeofday(&name##tv,0); \ + name##tt0=name##tv.tv_usec+name##tv.tv_sec*1000000; \ + if(name##tcount==0)std::cerr<<__FILE__<<":"<<__LINE__<<":"<<#name< +#include +#include + +template < class T > +std::string ToString(const T &arg) +{ + std::stringstream out; + out << arg; + return(out.str()); +} + +template < class T > +double ToDouble(const T &arg) { + std::stringstream out; + out << arg; + double value = atof(out.str().c_str()); + return value; +} + +// +// ============================================================= +// Simple Logger macros (no dependency with SALOME) +// ============================================================= +// +#define STDLOG(msg) {std::cerr< -#include -#include -#ifdef WIN32 -# include -#else -# include -#endif - -//#include "MEDMEM_STRING.hxx" -#include "Batch_Job.hxx" -#include "Batch_JobId.hxx" -#include "Batch_JobInfo.hxx" -#include "Batch_InvalidArgumentException.hxx" -#include "Batch_FactBatchManager.hxx" -#include "Batch_BatchManager.hxx" -using namespace std; - -namespace Batch { - - // Constructeur -// BatchManager::BatchManager(string host) throw(InvalidArgumentException) : _hostname(host), jobid_map() -// { -// // On verifie que le hostname est correct -// if (!gethostbyname(_hostname.c_str())) { // hostname unknown from network -// string msg = "hostname \""; -// msg += _hostname; -// msg += "\" unknown from the network"; -// throw InvalidArgumentException(msg.c_str()); -// } -// } - BatchManager::BatchManager(const FactBatchManager * parent, const char * host) throw(InvalidArgumentException) : _hostname(host), jobid_map(), _parent(parent) - { - // On verifie que le hostname est correct - if (!gethostbyname(_hostname.c_str())) { // hostname unknown from network - string msg = "hostname \""; - msg += _hostname; - msg += "\" unknown from the network"; - throw InvalidArgumentException(msg.c_str()); - } - } - - // Destructeur - BatchManager::~BatchManager() - { - // Nothing to do - } - - string BatchManager::__repr__() const - { - ostringstream oss; - oss << "getType() : "unknown (no factory)") << "' connected to server '" << _hostname << "'>"; - return oss.str(); - } - - // Recupere le l'identifiant d'un job deja soumis au BatchManager -// const JobId BatchManager::getJobIdByReference(const string & ref) -// { -// return JobId(this, ref); -// } - const JobId BatchManager::getJobIdByReference(const char * ref) - { - return JobId(this, ref); - } - -// // Methode pour le controle des jobs : soumet un job au gestionnaire -// const JobId BatchManager::submitJob(const Job & job) -// { -// static int idx = 0; -// //MEDMEM::STRING sst; -// ostringstream sst; -// sst << "Jobid_" << idx++; -// JobId id(this, sst.str()); -// return id; -// } - -// // Methode pour le controle des jobs : retire un job du gestionnaire -// void BatchManager::deleteJob(const JobId & jobid) -// { -// // Nothing to do -// } - -// // Methode pour le controle des jobs : suspend un job en file d'attente -// void BatchManager::holdJob(const JobId & jobid) -// { -// // Nothing to do -// } - -// // Methode pour le controle des jobs : relache un job suspendu -// void BatchManager::releaseJob(const JobId & jobid) -// { -// // Nothing to do -// } - -// // Methode pour le controle des jobs : modifie un job en file d'attente -// void BatchManager::alterJob(const JobId & jobid, const Parametre & param, const Environnement & env) -// { -// // Nothing to do -// } - -// // Methode pour le controle des jobs : modifie un job en file d'attente -// void BatchManager::alterJob(const JobId & jobid, const Parametre & param) -// { -// // Nothing to do -// } - -// // Methode pour le controle des jobs : modifie un job en file d'attente -// void BatchManager::alterJob(const JobId & jobid, const Environnement & env) -// { -// // Nothing to do -// } - -// // Methode pour le controle des jobs : renvoie l'etat du job -// JobInfo BatchManager::queryJob(const JobId & jobid) -// { -// return JobInfo(); -// } - -} diff --git a/src/Batch/Batch_BatchManager.hxx b/src/Batch/Batch_BatchManager.hxx deleted file mode 100644 index bda29616c..000000000 --- a/src/Batch/Batch_BatchManager.hxx +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * BatchManager.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2003 - * Projet : SALOME 2 - * - */ - -#ifndef _BATCHMANAGER_H_ -#define _BATCHMANAGER_H_ - -#include "Batch_Defines.hxx" - -#include -#include -#include "Batch_Job.hxx" -#include "Batch_JobId.hxx" -#include "Batch_JobInfo.hxx" -#include "Batch_InvalidArgumentException.hxx" - -namespace Batch { - - class Job; - class JobId; - class JobInfo; - class FactBatchManager; - - class BATCH_EXPORT BatchManager - { - public: - // Constructeur et destructeur - //BatchManager(std::string host="localhost") throw(InvalidArgumentException); // connexion a la machine host - BatchManager(const Batch::FactBatchManager * parent, const char * host="localhost") throw(InvalidArgumentException); // connexion a la machine host - virtual ~BatchManager(); - virtual std::string __repr__() const; - - // Recupere le l'identifiant d'un job deja soumis au BatchManager - //virtual const JobId getJobIdByReference(const std::string & ref); - virtual const Batch::JobId getJobIdByReference(const char * ref); - - // Methodes pour le controle des jobs : virtuelles pures - virtual const Batch::JobId submitJob(const Batch::Job & job) = 0; // soumet un job au gestionnaire - virtual void deleteJob(const Batch::JobId & jobid) = 0; // retire un job du gestionnaire - virtual void holdJob(const Batch::JobId & jobid) = 0; // suspend un job en file d'attente - virtual void releaseJob(const Batch::JobId & jobid) = 0; // relache un job suspendu - virtual void alterJob(const Batch::JobId & jobid, const Batch::Parametre & param, const Batch::Environnement & env) = 0; // modifie un job en file d'attente - virtual void alterJob(const Batch::JobId & jobid, const Batch::Parametre & param) = 0; // modifie un job en file d'attente - virtual void alterJob(const Batch::JobId & jobid, const Batch::Environnement & env) = 0; // modifie un job en file d'attente - virtual Batch::JobInfo queryJob(const Batch::JobId & jobid) = 0; // renvoie l'etat du job - - protected: - std::string _hostname; // serveur ou tourne le BatchManager - // std::map< const std::string, const Batch::JobId * > jobid_map; // table des jobs deja soumis - std::map< std::string, const Batch::JobId * > jobid_map; // table des jobs deja soumis - const Batch::FactBatchManager * _parent; - - private: - - }; - -} - -#endif diff --git a/src/Batch/Batch_BatchManagerCatalog.cxx b/src/Batch/Batch_BatchManagerCatalog.cxx deleted file mode 100644 index e2d341ec6..000000000 --- a/src/Batch/Batch_BatchManagerCatalog.cxx +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * BatchManagerCatalog.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2004 - * Projet : SALOME 2 - * - */ - -#include -#include -#include -#include "Batch_BatchManagerCatalog.hxx" -#include "Batch_FactBatchManager.hxx" -using namespace std; - -namespace Batch { - - pthread_mutex_t BatchManagerCatalog::_mutex = PTHREAD_MUTEX_INITIALIZER; - std::map * BatchManagerCatalog::_p_catalog = 0; - BatchManagerCatalog BatchManagerCatalog::theCatalog; - - // Constructeur - BatchManagerCatalog::BatchManagerCatalog() - { - // Nothing to do - } - - // Destructeur - BatchManagerCatalog::~BatchManagerCatalog() - { - delete BatchManagerCatalog::_p_catalog; - } - - // Functor - FactBatchManager * BatchManagerCatalog::getFactBatchManager(const char * type) - { - return (* BatchManagerCatalog::_p_catalog)[type]; - } - - void BatchManagerCatalog::addFactBatchManager(const char * type, FactBatchManager * pFBM) - { - if (pFBM) { // *** section critique *** - pthread_mutex_lock(&_mutex); - - if (! BatchManagerCatalog::_p_catalog) BatchManagerCatalog::_p_catalog = new std::map; - (*BatchManagerCatalog::_p_catalog)[type] = pFBM; - - pthread_mutex_unlock(&_mutex); - } - } - - FactBatchManager * BatchManagerCatalog::operator() (const char * type) const - { - return BatchManagerCatalog::getFactBatchManager(type); - } - - std::map * BatchManagerCatalog::dict() const - { - return _p_catalog; - } - - string BatchManagerCatalog::__repr__() const - { - ostringstream oss; - oss << "::const_iterator it = (*_p_catalog).begin(); it != (*_p_catalog).end(); it++, sep=", ") { - oss << sep << "'" << (*it).first << "' : '" << (*it).second->__repr__() << "'"; - } - oss << "}>"; - return oss.str(); - } - -} diff --git a/src/Batch/Batch_BatchManagerCatalog.hxx b/src/Batch/Batch_BatchManagerCatalog.hxx deleted file mode 100644 index 0e95cc622..000000000 --- a/src/Batch/Batch_BatchManagerCatalog.hxx +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * BatchManagerCatalog.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2004 - * Projet : SALOME 2 - * - */ - -#ifndef _CATALOG_H_ -#define _CATALOG_H_ - -#include "Batch_Defines.hxx" - -#include -#include -#include - -namespace Batch { - - class FactBatchManager; - - class BATCH_EXPORT BatchManagerCatalog - { - public: - // Constructeur - BatchManagerCatalog(); - // Destructeur - virtual ~BatchManagerCatalog(); - - static Batch::FactBatchManager * getFactBatchManager(const char * type); - static void addFactBatchManager(const char * type, Batch::FactBatchManager * pFBM); - virtual Batch::FactBatchManager * operator() (const char * type) const; - - virtual std::map * dict() const; - virtual std::string __repr__() const; - - protected: - static BatchManagerCatalog theCatalog; - static std::map * _p_catalog; - static pthread_mutex_t _mutex; - - private: - - }; - -} - -#endif diff --git a/src/Batch/Batch_BatchManager_LSF.cxx b/src/Batch/Batch_BatchManager_LSF.cxx deleted file mode 100644 index ae8afada9..000000000 --- a/src/Batch/Batch_BatchManager_LSF.cxx +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * BatchManager_LSF.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Thu Nov 6 10:17:22 2003 - * Projet : Salome 2 - * - */ - -extern "C" { -#include -#include -} -#include -#include -#include -#include -#include "Batch_BatchManager_LSF.hxx" - -using namespace std; - -namespace Batch { - - BatchManager_LSF::BatchManager_LSF(const FactBatchManager * parent, const char * host) throw(InvalidArgumentException,ConnexionFailureException) : BatchManager(parent, host) - { - // On se connecte au serveur LSF - _connect = lsb_init("Salome2 Batch library"); - if (_connect < 0) { // si erreur - char * errmsg = lsb_sysmsg(); - string msg = "LSF Server on host \""; - msg += _hostname; - msg += "\" : "; - msg += errmsg ? errmsg : "Reason unknown"; - throw ConnexionFailureException(msg.c_str()); - } - } - - // Destructeur - BatchManager_LSF::~BatchManager_LSF() - { - // Nothing to do - } - - // Methode pour le controle des jobs : soumet un job au gestionnaire - const JobId BatchManager_LSF::submitJob(const Job & job) - { - Job_LSF joblsf = job; - struct submitReply reply; - int ref = lsb_submit(joblsf.getSubmitStruct(), - &reply); - if (ref < 0) { // si erreur - char * msg = lsb_sysmsg(); - if (!msg) msg = "unknown"; - throw APIInternalFailureException(string("LSF submit error. Reason : ") + msg); - } - - ostringstream oss; - oss << ref; - JobId id(this, oss.str()); - return id; - } - - // Methode pour le controle des jobs : retire un job du gestionnaire - void BatchManager_LSF::deleteJob(const JobId & jobid) - { - int ref; - istringstream iss(jobid.getReference()); - iss >> ref; - int rc = lsb_deletejob(ref, 0, 0); - if (rc < 0) { // si erreur - char * msg = lsb_sysmsg(); - if (!msg) msg = "unknown"; - throw APIInternalFailureException(string("LSF deljob error. Reason : ") + msg); - } - } - - // Methode pour le controle des jobs : suspend un job en file d'attente - void BatchManager_LSF::holdJob(const JobId & jobid) - { - int ref; - istringstream iss(jobid.getReference()); - iss >> ref; - int rc = lsb_signaljob(ref, SIGSTOP); - if (rc < 0) { // si erreur - char * msg = lsb_sysmsg(); - if (!msg) msg = "unknown"; - throw APIInternalFailureException(string("LSF signaljob error. Reason : ") + msg); - } - } - - // Methode pour le controle des jobs : relache un job suspendu - void BatchManager_LSF::releaseJob(const JobId & jobid) - { - int ref; - istringstream iss(jobid.getReference()); - iss >> ref; - int rc = lsb_signaljob(ref, SIGCONT); - if (rc < 0) { // si erreur - char * msg = lsb_sysmsg(); - if (!msg) msg = "unknown"; - throw APIInternalFailureException(string("LSF signaljob error. Reason : ") + msg); - } - } - - - // Methode pour le controle des jobs : modifie un job en file d'attente - void BatchManager_LSF::alterJob(const JobId & jobid, const Parametre & param, const Environnement & env) - { - int ref; - istringstream iss(jobid.getReference()); - iss >> ref; - - Job_LSF joblsf = Job(param, env); - struct submitReply reply; - ref = lsb_modify(joblsf.getSubmitStruct(), - &reply, - ref); - if (ref < 0) { // si erreur - ostringstream msg_sst; - char * msg = lsb_sysmsg(); - if (!msg) msg = "unknown"; - msg_sst << msg << endl; -// msg_sst << "BadJobId = " << (long) reply.badJobId << endl -// << "BadJobName = " << reply.badJobName << endl -// << "BadReqIndx = " << reply.badReqIndx << endl; - throw APIInternalFailureException(string("LSF modify error. Reason : ") + msg_sst.str()); - } - } - - // Methode pour le controle des jobs : modifie un job en file d'attente - void BatchManager_LSF::alterJob(const JobId & jobid, const Parametre & param) - { - alterJob(jobid, param, Environnement()); - } - - // Methode pour le controle des jobs : modifie un job en file d'attente - void BatchManager_LSF::alterJob(const JobId & jobid, const Environnement & env) - { - alterJob(jobid, Parametre(), env); - } - - - - // Methode pour le controle des jobs : renvoie l'etat du job - JobInfo BatchManager_LSF::queryJob(const JobId & jobid) - { - int id; - istringstream iss(jobid.getReference()); - iss >> id; - - JobInfo_LSF ji = JobInfo_LSF(id); - - return ji; - } - - - - // Methode pour le controle des jobs : teste si un job est present en machine - bool BatchManager_LSF::isRunning(const JobId & jobid) - { - int id; - istringstream iss(jobid.getReference()); - iss >> id; - - JobInfo_LSF ji = JobInfo_LSF(id); - - return ji.isRunning(); - } - - - -} diff --git a/src/Batch/Batch_BatchManager_LSF.hxx b/src/Batch/Batch_BatchManager_LSF.hxx deleted file mode 100644 index 283be2f8d..000000000 --- a/src/Batch/Batch_BatchManager_LSF.hxx +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * BatchManager_LSF.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Thu Nov 6 10:17:22 2003 - * Projet : Salome 2 - * - */ - -#ifndef _BATCHMANAGER_LSF_H_ -#define _BATCHMANAGER_LSF_H_ - -#include "Batch_Defines.hxx" - -#include "Batch_Job.hxx" -#include "Batch_Job.hxx" -#include "Batch_JobId.hxx" -#include "Batch_JobInfo.hxx" -#include "Batch_JobInfo_LSF.hxx" -#include "Batch_Job_LSF.hxx" -#include "Batch_InvalidArgumentException.hxx" -#include "Batch_ConnexionFailureException.hxx" -#include "Batch_APIInternalFailureException.hxx" -#include "Batch_NotYetImplementedException.hxx" -#include "Batch_BatchManager.hxx" - -namespace Batch { - - class Job; - class JobId; - class JobInfo; - class FactBatchManager; - - class BATCH_EXPORT BatchManager_LSF : public BatchManager - { - public: - // Constructeur et destructeur - BatchManager_LSF(const FactBatchManager * parent, const char * host="localhost") throw(InvalidArgumentException,ConnexionFailureException); // connexion a la machine host - virtual ~BatchManager_LSF(); - - // Recupere le nom du serveur par defaut - // static string BatchManager_LSF::getDefaultServer(); - - // Methodes pour le controle des jobs - virtual const JobId submitJob(const Job & job); // soumet un job au gestionnaire - virtual void deleteJob(const JobId & jobid); // retire un job du gestionnaire - virtual void holdJob(const JobId & jobid); // suspend un job en file d'attente - virtual void releaseJob(const JobId & jobid); // relache un job suspendu - virtual void alterJob(const JobId & jobid, const Parametre & param, const Environnement & env); // modifie un job en file d'attente - virtual void alterJob(const JobId & jobid, const Parametre & param); // modifie un job en file d'attente - virtual void alterJob(const JobId & jobid, const Environnement & env); // modifie un job en file d'attente - virtual JobInfo queryJob(const JobId & jobid); // renvoie l'etat du job - virtual bool isRunning(const JobId & jobid); // teste si un job est present en machine - - virtual void setParametre(const JobId & jobid, const Parametre & param) { return alterJob(jobid, param); } // modifie un job en file d'attente - virtual void setEnvironnement(const JobId & jobid, const Environnement & env) { return alterJob(jobid, env); } // modifie un job en file d'attente - - - protected: - int _connect; // LSF connect id - - private: - -#ifdef SWIG - public: - // Recupere le l'identifiant d'un job deja soumis au BatchManager - //virtual const JobId getJobIdByReference(const string & ref) { return BatchManager::getJobIdByReference(ref); } - virtual const JobId getJobIdByReference(const char * ref) { return BatchManager::getJobIdByReference(ref); } -#endif - - }; - -} - -#endif diff --git a/src/Batch/Batch_BatchManager_Local.cxx b/src/Batch/Batch_BatchManager_Local.cxx deleted file mode 100644 index 373547060..000000000 --- a/src/Batch/Batch_BatchManager_Local.cxx +++ /dev/null @@ -1,828 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* -* BatchManager_Local.cxx : -* -* Auteur : Ivan DUTKA-MALEN - EDF R&D -* Mail : mailto:ivan.dutka-malen@der.edf.fr -* Date : Thu Nov 6 10:17:22 2003 -* Projet : Salome 2 -* -*/ - -#include -#include -#include -#include -#include - -#include -#ifdef WIN32 -# include -#else -# include -# include -#endif -#include -#include -#include -#include -#include -#include "Batch_IOMutex.hxx" -#include "Batch_BatchManager_Local.hxx" - -using namespace std; - -namespace Batch { - - - // Constructeur - BatchManager_Local::BatchManager_Local(const FactBatchManager * parent, const char * host) throw(InvalidArgumentException,ConnexionFailureException) : BatchManager(parent, host), _connect(0), _threads_mutex(), _threads(), _thread_id_id_association_mutex(), _thread_id_id_association_cond() -#ifndef WIN32 //TODO: porting of following functionality - ,_thread_id_id_association() -#endif - { - pthread_mutex_init(&_threads_mutex, NULL); - pthread_mutex_init(&_thread_id_id_association_mutex, NULL); - pthread_cond_init(&_thread_id_id_association_cond, NULL); - } - - // Destructeur - BatchManager_Local::~BatchManager_Local() - { - pthread_mutex_destroy(&_threads_mutex); - pthread_mutex_destroy(&_thread_id_id_association_mutex); - pthread_cond_destroy(&_thread_id_id_association_cond); - } - - // Methode pour le controle des jobs : soumet un job au gestionnaire - const JobId BatchManager_Local::submitJob(const Job & job) - { - Job_Local jobLocal = job; - - pthread_t thread_id = submit(jobLocal); - - ostringstream oss; - oss << getIdByThread_id(thread_id); - - JobId id(this, oss.str()); - - return id; - } - - // Methode pour le controle des jobs : retire un job du gestionnaire - void BatchManager_Local::deleteJob(const JobId & jobid) - { - Id id; - - istringstream iss(jobid.getReference()); - iss >> id; - - // On retrouve le thread_id du thread - pthread_t thread_id; - - // @@@ --------> SECTION CRITIQUE <-------- @@@ - pthread_mutex_lock(&_threads_mutex); - if (_threads.find(id) != _threads.end()) - thread_id = _threads[id].thread_id; - pthread_mutex_unlock(&_threads_mutex); - // @@@ --------> SECTION CRITIQUE <-------- @@@ - - cancel(thread_id); - } - - // Methode pour le controle des jobs : suspend un job en file d'attente - void BatchManager_Local::holdJob(const JobId & jobid) - { - Id id; - istringstream iss(jobid.getReference()); - iss >> id; - - UNDER_LOCK( cout << "BatchManager is sending HOLD command to the thread " << id << endl ); - - // On introduit une commande dans la queue du thread - // @@@ --------> SECTION CRITIQUE <-------- @@@ - pthread_mutex_lock(&_threads_mutex); - if (_threads.find(id) != _threads.end()) - _threads[id].command_queue.push(HOLD); - pthread_mutex_unlock(&_threads_mutex); - // @@@ --------> SECTION CRITIQUE <-------- @@@ - } - - // Methode pour le controle des jobs : relache un job suspendu - void BatchManager_Local::releaseJob(const JobId & jobid) - { - Id id; - istringstream iss(jobid.getReference()); - iss >> id; - - UNDER_LOCK( cout << "BatchManager is sending RELEASE command to the thread " << id << endl ); - - // On introduit une commande dans la queue du thread - // @@@ --------> SECTION CRITIQUE <-------- @@@ - pthread_mutex_lock(&_threads_mutex); - if (_threads.find(id) != _threads.end()) - _threads[id].command_queue.push(RELEASE); - pthread_mutex_unlock(&_threads_mutex); - // @@@ --------> SECTION CRITIQUE <-------- @@@ - } - - - // Methode pour le controle des jobs : modifie un job en file d'attente - void BatchManager_Local::alterJob(const JobId & jobid, const Parametre & param, const Environnement & env) - { - } - - // Methode pour le controle des jobs : modifie un job en file d'attente - void BatchManager_Local::alterJob(const JobId & jobid, const Parametre & param) - { - alterJob(jobid, param, Environnement()); - } - - // Methode pour le controle des jobs : modifie un job en file d'attente - void BatchManager_Local::alterJob(const JobId & jobid, const Environnement & env) - { - alterJob(jobid, Parametre(), env); - } - - - - // Methode pour le controle des jobs : renvoie l'etat du job - JobInfo BatchManager_Local::queryJob(const JobId & jobid) - { - Id id; - istringstream iss(jobid.getReference()); - iss >> id; - - Parametre param; - Environnement env; - - //UNDER_LOCK( cout << "JobInfo BatchManager_Local::queryJob(const JobId & jobid) : AVANT section critique" << endl ); - // @@@ --------> SECTION CRITIQUE <-------- @@@ - pthread_mutex_lock(&_threads_mutex); - param = _threads[id].param; - env = _threads[id].env; - pthread_mutex_unlock(&_threads_mutex); - // @@@ --------> SECTION CRITIQUE <-------- @@@ - //UNDER_LOCK( cout << "JobInfo BatchManager_Local::queryJob(const JobId & jobid) : APRES section critique" << endl ); - - JobInfo_Local ji(param, env); - return ji; - } - - - - // Methode pour le controle des jobs : teste si un job est present en machine - bool BatchManager_Local::isRunning(const JobId & jobid) - { - Id id; - istringstream iss(jobid.getReference()); - iss >> id; - - Status status; - - //UNDER_LOCK( cout << "JobInfo BatchManager_Local::queryJob(const JobId & jobid) : AVANT section critique" << endl ); - // @@@ --------> SECTION CRITIQUE <-------- @@@ - pthread_mutex_lock(&_threads_mutex); - status = _threads[id].status; - pthread_mutex_unlock(&_threads_mutex); - // @@@ --------> SECTION CRITIQUE <-------- @@@ - //UNDER_LOCK( cout << "JobInfo BatchManager_Local::queryJob(const JobId & jobid) : APRES section critique" << endl ); - - return (status == RUNNING); - } - - - // Methode d'execution d'un job - pthread_t BatchManager_Local::submit(const Job_Local & job) - { - // L'id du thread a creer - pthread_t thread_id = -#ifdef WIN32 - {0,0}; -#else - 0; -#endif - - // Les attributs du thread a sa creation - pthread_attr_t thread_attr; - pthread_attr_init(&thread_attr); - pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_DETACHED); - - ThreadAdapter * p_ta = new ThreadAdapter(*this, job); - - // Creation du thread qui va executer la commande systeme qu'on lui passe - int rc = pthread_create(&thread_id, - &thread_attr, - &ThreadAdapter::run, - static_cast(p_ta)); - if (rc) { - } - - // Liberation des zones memoire maintenant inutiles occupees par les attributs du thread - pthread_attr_destroy(&thread_attr); - - return thread_id; - } - - - // Methode de destruction d'un job - void BatchManager_Local::cancel(pthread_t thread_id) - { - pthread_cancel(thread_id); - } - - - // Fabrique un identifiant unique pour les threads puisque le thread_id n'est pas unique - // au cours du temps (il peut etre reutilise lorsqu'un thread se termine) - // ATTENTION : cette methode est uniquement protegee par la section critique de l'association - // Thread_id / Id (_thread_id_id_association_mutex) - BatchManager_Local::Id BatchManager_Local::nextId() - { - static Id id = 0; - Id nextId = id++; - //UNDER_LOCK( cout << "BatchManager_Local::Id BatchManager_Local::nextId() : Id = " << nextId << endl ); - return nextId; - } - - - // Retourne l'Id enregistre dans l'association Thread_id / Id et le detruit immediatement - BatchManager_Local::Id BatchManager_Local::getIdByThread_id(pthread_t thread_id) - { - Id id = -1; - - // @@@ --------> SECTION CRITIQUE <-------- @@@ - pthread_mutex_lock(&_thread_id_id_association_mutex); -#ifndef WIN32 //TODO: porting of following functionality - while (_thread_id_id_association.find(thread_id) == _thread_id_id_association.end()) - pthread_cond_wait(&_thread_id_id_association_cond, &_thread_id_id_association_mutex); - - id = _thread_id_id_association[thread_id]; - _thread_id_id_association.erase(thread_id); -#endif - - pthread_mutex_unlock(&_thread_id_id_association_mutex); - // @@@ --------> SECTION CRITIQUE <-------- @@@ - - //UNDER_LOCK( cout << "BatchManager_Local::Id BatchManager_Local::getIdByThread_id(pthread_t thread_id) : Id = " << id << " - thread_id = " << thread_id << endl ); - return id; - } - - - // Associe un Thread_id a un Id nouvellement cree - BatchManager_Local::Id BatchManager_Local::registerThread_id(pthread_t thread_id) - { - Id id = -1; - - // @@@ --------> SECTION CRITIQUE <-------- @@@ - pthread_mutex_lock(&_thread_id_id_association_mutex); -#ifndef WIN32 //TODO: porting of following functionality - if (_thread_id_id_association.find(thread_id) == _thread_id_id_association.end()) { - id = _thread_id_id_association[thread_id] = nextId(); - pthread_cond_signal(&_thread_id_id_association_cond); - - } else { - UNDER_LOCK( cerr << "ERROR : Pthread Inconstency. Two threads own the same thread_id." << endl ); - } -#endif - pthread_mutex_unlock(&_thread_id_id_association_mutex); - // @@@ --------> SECTION CRITIQUE <-------- @@@ - - //UNDER_LOCK( cout << "BatchManager_Local::Id BatchManager_Local::registerThread_id(pthread_t thread_id) : Id = " << id << " - thread_id = " << thread_id << endl ); - return id; - } - - - // Constructeur de la classe ThreadAdapter - BatchManager_Local::ThreadAdapter::ThreadAdapter(BatchManager_Local & bm, const Job_Local & job) : - _bm(bm), _job(job) - { - // Nothing to do - } - - - - // Methode d'execution du thread - void * BatchManager_Local::ThreadAdapter::run(void * arg) - { -#ifndef WIN32 //TODO: porting of following functionality - // On bloque tous les signaux pour ce thread - sigset_t setmask; - sigfillset(&setmask); - pthread_sigmask(SIG_BLOCK, &setmask, NULL); - - // On autorise la terminaison differee du thread - // (ces valeurs sont les valeurs par defaut mais on les force par precaution) - pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); - pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL); - - // On enregistre la fonction de suppression du fils en cas d'arret du thread - // Cette fontion sera automatiquement appelee lorsqu'une demande d'annulation - // sera prise en compte par pthread_testcancel() - pid_t child; - pthread_cleanup_push(BatchManager_Local::kill_child_on_exit, static_cast (&child)); - pthread_cleanup_push(BatchManager_Local::delete_on_exit, arg); - - ThreadAdapter * p_ta = static_cast(arg); - - - - - // Le code retour cumule (ORed) de tous les appels - // Nul en cas de reussite de l'ensemble des operations - int rc = 0; - - // Cette table contient la liste des fichiers a detruire a la fin du processus - std::vector files_to_delete; - - - - // On copie les fichiers d'entree pour le fils - const Parametre param = p_ta->_job.getParametre(); - Parametre::const_iterator it; - - // On initialise la variable workdir a la valeur du Current Working Directory - char * cwd = -#ifdef WIN32 - _getcwd(NULL, 0); -#else - new char [PATH_MAX]; - getcwd(cwd, PATH_MAX); -#endif - string workdir = cwd; - delete [] cwd; - - if ( (it = param.find(WORKDIR)) != param.end() ) { - workdir = static_cast( (*it).second ); - } - - string executionhost = string(param[EXECUTIONHOST]); - - if ( (it = param.find(INFILE)) != param.end() ) { - Versatile V = (*it).second; - Versatile::iterator Vit; - - for(Vit=V.begin(); Vit!=V.end(); Vit++) { - CoupleType cpt = *static_cast< CoupleType * >(*Vit); - Couple cp = cpt; - string local = cp.getLocal(); - string remote = cp.getRemote(); - - string copy_cmd = p_ta->getBatchManager().copy_command("", local, executionhost, workdir + "/" + remote); - UNDER_LOCK( cout << "Copying : " << copy_cmd << endl ); - - if (system(copy_cmd.c_str()) ) { - // Echec de la copie - rc |= 1; - } else { - // On enregistre le fichier comme etant a detruire - files_to_delete.push_back(workdir + "/" + remote); - } - - } - } - - - - -#ifdef WIN32 - //TODO - //Using CreateThread instead fork() POSIX function -#else - // On forke/exec un nouveau process pour pouvoir controler le fils - // (plus finement qu'avec un appel system) - // int rc = system(commande.c_str()); - child = fork(); - if (child < 0) { // erreur - UNDER_LOCK( cerr << "Fork impossible (rc=" << child << ")" << endl ); - - } else if (child > 0) { // pere - p_ta->pere(child); - - } else { // fils - p_ta->fils(); - } -#endif - - - - // On copie les fichiers de sortie du fils - if ( (it = param.find(OUTFILE)) != param.end() ) { - Versatile V = (*it).second; - Versatile::iterator Vit; - - for(Vit=V.begin(); Vit!=V.end(); Vit++) { - CoupleType cpt = *static_cast< CoupleType * >(*Vit); - Couple cp = cpt; - string local = cp.getLocal(); - string remote = cp.getRemote(); - - string copy_cmd = p_ta->getBatchManager().copy_command(executionhost, workdir + "/" + remote, "", local); - UNDER_LOCK( cout << "Copying : " << copy_cmd << endl ); - - if (system(copy_cmd.c_str()) ) { - // Echec de la copie - rc |= 1; - } else { - // On enregistre le fichier comme etant a detruire - files_to_delete.push_back(workdir + "/" + remote); - } - - } - } - - - - - // On efface les fichiers d'entree et de sortie du fils si les copies precedentes ont reussi - // ou si la creation du fils n'a pu avoir lieu - if ( (rc == 0) || (child < 0) ) { - std::vector::const_iterator it; - for(it=files_to_delete.begin(); it!=files_to_delete.end(); it++) { - string remove_cmd = p_ta->getBatchManager().remove_command(executionhost, *it); - UNDER_LOCK( cout << "Removing : " << remove_cmd << endl ); - system(remove_cmd.c_str()); - } - } - - - - // On retire la fonction de nettoyage de la memoire - pthread_cleanup_pop(0); - - // On retire la fonction de suppression du fils - pthread_cleanup_pop(0); - - - - // On invoque la fonction de nettoyage de la memoire - delete_on_exit(arg); - - UNDER_LOCK( cout << "Father is leaving" << endl ); - pthread_exit(NULL); -#endif - return NULL; - } - - - - - void BatchManager_Local::ThreadAdapter::pere(pid_t child) - { -#ifndef WIN32 //TODO: porting of following functionality - time_t child_starttime = time(NULL); - - // On enregistre le fils dans la table des threads - pthread_t thread_id = pthread_self(); - Id id = _bm.registerThread_id(thread_id); - - Parametre param = _job.getParametre(); - Environnement env = _job.getEnvironnement(); - - ostringstream thread_id_sst; - thread_id_sst << id; - param[ID] = thread_id_sst.str(); - param[STATE] = "Running"; - param[PID] = child; - - // @@@ --------> SECTION CRITIQUE <-------- @@@ - pthread_mutex_lock(&_bm._threads_mutex); - _bm._threads[id].thread_id = thread_id; - _bm._threads[id].pid = child; - _bm._threads[id].status = RUNNING; - _bm._threads[id].param = param; - _bm._threads[id].env = env; - _bm._threads[id].command_queue.push(NOP); - pthread_mutex_unlock(&_bm._threads_mutex); - // @@@ --------> SECTION CRITIQUE <-------- @@@ - - - - - - // on boucle en attendant que le fils ait termine - while (1) { - int child_rc = 0; - pid_t child_wait_rc = waitpid(child, &child_rc, WNOHANG /* | WUNTRACED */); - if (child_wait_rc > 0) { - if (WIFSTOPPED(child_rc)) { - // NOTA : pour rentrer dans cette section, il faut que le flag WUNTRACED - // soit positionne dans l'appel a waitpid ci-dessus. Ce flag est couramment - // desactive car s'il est possible de detecter l'arret d'un process, il est - // plus difficile de detecter sa reprise. - - // Le fils est simplement stoppe - // @@@ --------> SECTION CRITIQUE <-------- @@@ - pthread_mutex_lock(&_bm._threads_mutex); - _bm._threads[id].status = STOPPED; - _bm._threads[id].param[STATE] = "Stopped"; - pthread_mutex_unlock(&_bm._threads_mutex); - // @@@ --------> SECTION CRITIQUE <-------- @@@ - UNDER_LOCK( cout << "Father sees his child is STOPPED : " << child_wait_rc << endl ); - - } - else { - // Le fils est termine, on sort de la boucle et du if englobant - // @@@ --------> SECTION CRITIQUE <-------- @@@ - pthread_mutex_lock(&_bm._threads_mutex); - _bm._threads[id].status = DONE; - _bm._threads[id].param[STATE] = "Done"; - pthread_mutex_unlock(&_bm._threads_mutex); - // @@@ --------> SECTION CRITIQUE <-------- @@@ - UNDER_LOCK( cout << "Father sees his child is DONE : " << child_wait_rc << " (child_rc=" << (WIFEXITED(child_rc) ? WEXITSTATUS(child_rc) : -1) << ")" << endl ); - break; - } - } - else if (child_wait_rc == -1) { - // Le fils a disparu ... - // @@@ --------> SECTION CRITIQUE <-------- @@@ - pthread_mutex_lock(&_bm._threads_mutex); - _bm._threads[id].status = DEAD; - _bm._threads[id].param[STATE] = "Dead"; - pthread_mutex_unlock(&_bm._threads_mutex); - // @@@ --------> SECTION CRITIQUE <-------- @@@ - UNDER_LOCK( cout << "Father sees his child is DEAD : " << child_wait_rc << " (Reason : " << strerror(errno) << ")" << endl ); - break; - } - - - - // On teste si le thread doit etre detruit - pthread_testcancel(); - - - - // On regarde si le fils n'a pas depasse son temps (wallclock time) - time_t child_currenttime = time(NULL); - time_t child_elapsedtime = child_currenttime - child_starttime; - if (param.find(MAXWALLTIME) != param.end()) { - int maxwalltime = param[MAXWALLTIME]; - // cout << "child_starttime = " << child_starttime << endl - // << "child_currenttime = " << child_currenttime << endl - // << "child_elapsedtime = " << child_elapsedtime << endl - // << "maxwalltime = " << maxwalltime << endl - // << "int(maxwalltime * 1.1) = " << int(maxwalltime * 1.1) << endl; - if (child_elapsedtime > int(maxwalltime * 1.1) ) { // On se donne 10% de marge avant le KILL - UNDER_LOCK( cout << "Father is sending KILL command to the thread " << id << endl ); - // On introduit une commande dans la queue du thread - // @@@ --------> SECTION CRITIQUE <-------- @@@ - pthread_mutex_lock(&_bm._threads_mutex); - if (_bm._threads.find(id) != _bm._threads.end()) - _bm._threads[id].command_queue.push(KILL); - pthread_mutex_unlock(&_bm._threads_mutex); - // @@@ --------> SECTION CRITIQUE <-------- @@@ - - - } else if (child_elapsedtime > maxwalltime ) { - UNDER_LOCK( cout << "Father is sending TERM command to the thread " << id << endl ); - // On introduit une commande dans la queue du thread - // @@@ --------> SECTION CRITIQUE <-------- @@@ - pthread_mutex_lock(&_bm._threads_mutex); - if (_bm._threads.find(id) != _bm._threads.end()) - _bm._threads[id].command_queue.push(TERM); - pthread_mutex_unlock(&_bm._threads_mutex); - // @@@ --------> SECTION CRITIQUE <-------- @@@ - } - } - - - - // On regarde s'il y a quelque chose a faire dans la queue de commande - // @@@ --------> SECTION CRITIQUE <-------- @@@ - pthread_mutex_lock(&_bm._threads_mutex); - if (_bm._threads.find(id) != _bm._threads.end()) { - while (_bm._threads[id].command_queue.size() > 0) { - Commande cmd = _bm._threads[id].command_queue.front(); - _bm._threads[id].command_queue.pop(); - - switch (cmd) { - case NOP: - UNDER_LOCK( cout << "Father does nothing to his child" << endl ); - break; - - case HOLD: - UNDER_LOCK( cout << "Father is sending SIGSTOP signal to his child" << endl ); - kill(child, SIGSTOP); - break; - - case RELEASE: - UNDER_LOCK( cout << "Father is sending SIGCONT signal to his child" << endl ); - kill(child, SIGCONT); - break; - - case TERM: - UNDER_LOCK( cout << "Father is sending SIGTERM signal to his child" << endl ); - kill(child, SIGTERM); - break; - - case KILL: - UNDER_LOCK( cout << "Father is sending SIGKILL signal to his child" << endl ); - kill(child, SIGKILL); - break; - - case ALTER: - break; - - default: - break; - } - } - - } - pthread_mutex_unlock(&_bm._threads_mutex); - // @@@ --------> SECTION CRITIQUE <-------- @@@ - - // On fait une petite pause pour ne pas surcharger inutilement le processeur - sleep(1); - - } -#endif - - - } - - - - - void BatchManager_Local::ThreadAdapter::fils() - { -#ifndef WIN32 //TODO: porting of following functionality - Parametre param = _job.getParametre(); - Parametre::iterator it; - - try { - - // On se place dans le repertoire de travail - if ( (it = param.find(WORKDIR)) != param.end() ) { - string workdir = static_cast( (*it).second ); - chdir(workdir.c_str()); - } - - - - - // EXECUTABLE is MANDATORY, if missing, we exit with failure notification - char * execpath = NULL; - if (param.find(EXECUTABLE) != param.end()) { - string executable = _bm.exec_command(param); - execpath = new char [executable.size() + 1]; - strncpy(execpath, executable.c_str(), executable.size() + 1); - } else exit(1); - - string debug_command = execpath; - - string name = (param.find(NAME) != param.end()) ? param[NAME] : param[EXECUTABLE]; - - char ** argv = NULL; - if (param.find(ARGUMENTS) != param.end()) { - Versatile V = param[ARGUMENTS]; - - argv = new char * [V.size() + 2]; // 1 pour name et 1 pour le NULL terminal - - argv[0] = new char [name.size() + 1]; - strncpy(argv[0], name.c_str(), name.size() + 1); - - debug_command += string(" # ") + argv[0]; - - int i = 1; - for(Versatile::const_iterator it=V.begin(); it!=V.end(); it++, i++) { - StringType argt = * static_cast(*it); - string arg = argt; - argv[i] = new char [arg.size() + 1]; - strncpy(argv[i], arg.c_str(), arg.size() + 1); - debug_command += string(" # ") + argv[i]; - } - - // assert (i == V.size() + 1) - argv[i] = NULL; - } - - - UNDER_LOCK( cout << "*** debug_command = " << debug_command << endl ); - - - - Environnement env = _job.getEnvironnement(); - - - char ** envp = NULL; - if(env.size() > 0) { - envp = new char * [env.size() + 1]; // 1 pour le NULL terminal - int i = 0; - for(Environnement::const_iterator it=env.begin(); it!=env.end(); it++, i++) { - const string & key = (*it).first; - const string & value = (*it).second; - ostringstream oss; - oss << key << "=" << value; - envp[i] = new char [oss.str().size() + 1]; - strncpy(envp[i], oss.str().c_str(), oss.str().size() + 1); - } - - // assert (i == env.size()) - envp[i] = NULL; - } - - - - - // On positionne les limites systeme imposees au fils - if (param.find(MAXCPUTIME) != param.end()) { - int maxcputime = param[MAXCPUTIME]; - struct rlimit limit; - limit.rlim_cur = maxcputime; - limit.rlim_max = int(maxcputime * 1.1); - setrlimit(RLIMIT_CPU, &limit); - } - - if (param.find(MAXDISKSIZE) != param.end()) { - int maxdisksize = param[MAXDISKSIZE]; - struct rlimit limit; - limit.rlim_cur = maxdisksize * 1024; - limit.rlim_max = int(maxdisksize * 1.1) * 1024; - setrlimit(RLIMIT_FSIZE, &limit); - } - - if (param.find(MAXRAMSIZE) != param.end()) { - int maxramsize = param[MAXRAMSIZE]; - struct rlimit limit; - limit.rlim_cur = maxramsize * 1024; - limit.rlim_max = int(maxramsize * 1.1) * 1024; - setrlimit(RLIMIT_AS, &limit); - } - - - - // On cree une session pour le fils de facon a ce qu'il ne soit pas - // detruit lorsque le shell se termine (le shell ouvre une session et - // tue tous les process appartenant a la session en quittant) - setsid(); - - - // On ferme les descripteurs de fichiers standards - //close(STDIN_FILENO); - //close(STDOUT_FILENO); - //close(STDERR_FILENO); - - - // On execute la commande du fils - execve(execpath, argv, envp); - - // No need to deallocate since nothing happens after a successful exec - - // Normalement on ne devrait jamais arriver ici - ofstream file_err("error.log"); - UNDER_LOCK( file_err << "Echec de l'appel a execve" << endl ); - - } catch (GenericException & e) { - - std::cerr << "Caught exception : " << e.type << " : " << e.message << std::endl; - } - - exit(99); -#endif - } - - - - - void BatchManager_Local::kill_child_on_exit(void * p_pid) - { -#ifndef WIN32 - //TODO: porting of following functionality - pid_t child = * static_cast(p_pid); - - // On tue le fils - kill(child, SIGTERM); - - // Nota : on pourrait aussi faire a la suite un kill(child, SIGKILL) - // mais cette option n'est pas implementee pour le moment, car il est - // preferable de laisser le process fils se terminer normalement et seul. -#endif - } - - void BatchManager_Local::delete_on_exit(void * arg) - { - ThreadAdapter * p_ta = static_cast(arg); - delete p_ta; - } - -} diff --git a/src/Batch/Batch_BatchManager_Local.hxx b/src/Batch/Batch_BatchManager_Local.hxx deleted file mode 100644 index 894c75a21..000000000 --- a/src/Batch/Batch_BatchManager_Local.hxx +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * BatchManager_Local.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Thu Nov 6 10:17:22 2003 - * Projet : Salome 2 - * - */ - -#ifndef _BATCHMANAGER_LOCAL_H_ -#define _BATCHMANAGER_LOCAL_H_ - -#include "Batch_Defines.hxx" - -#include -#include -#include -#include -#include "Batch_Job.hxx" -#include "Batch_JobId.hxx" -#include "Batch_JobInfo.hxx" -#include "Batch_JobInfo_Local.hxx" -#include "Batch_Job_Local.hxx" -#include "Batch_InvalidArgumentException.hxx" -#include "Batch_ConnexionFailureException.hxx" -#include "Batch_APIInternalFailureException.hxx" -#include "Batch_NotYetImplementedException.hxx" -#include "Batch_BatchManager.hxx" - -namespace Batch { - - class FactBatchManager; - - class BATCH_EXPORT BatchManager_Local : public BatchManager - { - private: - friend class ThreadAdapter; - class ThreadAdapter{ - public: - ThreadAdapter(BatchManager_Local & bm, const Job_Local & job); - static void * run(void * arg); - BatchManager_Local & getBatchManager() const { return _bm; }; - - protected: - BatchManager_Local & _bm; - const Job_Local _job; - - private: - void pere(pid_t child); - void fils(); - - }; - - typedef int Id; - - enum Commande { - NOP = 0, - HOLD, - RELEASE, - TERM, - KILL, - ALTER, - }; - - enum Status { - UNKNOWN = 0, - RUNNING, - STOPPED, - DONE, - DEAD, - }; - - struct Child { - pthread_t thread_id; - std::queue > command_queue; - pid_t pid; - int exit_code; - Status status; - Parametre param; - Environnement env; - }; - - - - public: - // Constructeur et destructeur - BatchManager_Local(const FactBatchManager * parent, const char * host="localhost") throw(InvalidArgumentException,ConnexionFailureException); // connexion a la machine host - virtual ~BatchManager_Local(); - - // Recupere le nom du serveur par defaut - // static string BatchManager_Local::getDefaultServer(); - - // Methodes pour le controle des jobs - virtual const JobId submitJob(const Job & job); // soumet un job au gestionnaire - virtual void deleteJob(const JobId & jobid); // retire un job du gestionnaire - virtual void holdJob(const JobId & jobid); // suspend un job en file d'attente - virtual void releaseJob(const JobId & jobid); // relache un job suspendu - virtual void alterJob(const JobId & jobid, const Parametre & param, const Environnement & env); // modifie un job en file d'attente - virtual void alterJob(const JobId & jobid, const Parametre & param); // modifie un job en file d'attente - virtual void alterJob(const JobId & jobid, const Environnement & env); // modifie un job en file d'attente - virtual JobInfo queryJob(const JobId & jobid); // renvoie l'etat du job - virtual bool isRunning(const JobId & jobid); // teste si un job est present en machine - - virtual void setParametre(const JobId & jobid, const Parametre & param) { return alterJob(jobid, param); } // modifie un job en file d'attente - virtual void setEnvironnement(const JobId & jobid, const Environnement & env) { return alterJob(jobid, env); } // modifie un job en file d'attente - - - protected: - int _connect; // Local connect id - pthread_mutex_t _threads_mutex; - std::map _threads; - - // Methode abstraite qui renvoie la commande de copie du fichier source en destination - virtual std::string copy_command( const std::string & host_source, - const std::string & source, - const std::string & host_destination, - const std::string & destination) const = 0; - - // Methode abstraite qui renvoie la commande a executer - virtual std::string exec_command(Parametre & param) const = 0; - - // Methode abstraite qui renvoie la commande d'effacement du fichier - virtual std::string remove_command( const std::string & host_destination, - const std::string & destination) const = 0; - - private: - virtual pthread_t submit(const Job_Local & job); - virtual void cancel(pthread_t thread_id); - static void kill_child_on_exit(void * p_pid); - static void delete_on_exit(void * arg); - Id nextId(); // Retourne un identifiant unique pour un thread (clef de la map) - Id getIdByThread_id(pthread_t thread_id); - Id registerThread_id(pthread_t thread_id); - pthread_mutex_t _thread_id_id_association_mutex; - pthread_cond_t _thread_id_id_association_cond; -#ifndef WIN32 //TODO: porting of following functionality - //reason: pthread_t on win32 is a struct of pointer and int members - std::map _thread_id_id_association; -#endif - -#ifdef SWIG - public: - // Recupere le l'identifiant d'un job deja soumis au BatchManager - //virtual const JobId getJobIdByReference(const string & ref) { return BatchManager::getJobIdByReference(ref); } - virtual const JobId getJobIdByReference(const char * ref) { return BatchManager::getJobIdByReference(ref); } -#endif - - }; - -} - -#endif diff --git a/src/Batch/Batch_BatchManager_Local_RSH.cxx b/src/Batch/Batch_BatchManager_Local_RSH.cxx deleted file mode 100644 index 5165ba981..000000000 --- a/src/Batch/Batch_BatchManager_Local_RSH.cxx +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * BatchManager_Local_RSH.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Thu Nov 6 10:17:22 2003 - * Projet : Salome 2 - * - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include -#include -#ifndef WIN32 -#include -#include -#endif -#include -#include -#include -#include -#include -#include "Batch_IOMutex.hxx" -#include "Batch_BatchManager_Local_RSH.hxx" - -#ifndef RM -#error "RM undefined. You must set RM to a valid path to a rm-like command." -#endif - -#ifndef RCP -#error "RCP undefined. You must set RCP to a valid path to a rcp-like command." -#endif - -#ifndef RSH -#error "RSH undefined. You must set RSH to a valid path to a rsh-like command." -#endif - -using namespace std; - -namespace Batch { - - - // Constructeur - BatchManager_Local_RSH::BatchManager_Local_RSH(const FactBatchManager * parent, const char * host) throw(InvalidArgumentException,ConnexionFailureException) : BatchManager_Local(parent, host) - { - } - - // Destructeur - BatchManager_Local_RSH::~BatchManager_Local_RSH() - { - } - - - // Methode abstraite qui renvoie la commande de copie du fichier source en destination - string BatchManager_Local_RSH::copy_command(const string & host_source, const string & source, const string & host_destination, const string & destination) const - { - ostringstream fullsource; - if (host_source.size() == 0) { - fullsource << "localhost:"; - } else { - fullsource << host_source << ":"; - } - fullsource << source; - - ostringstream fulldestination; - if (host_destination.size() == 0) { - fulldestination << "localhost:"; - } else { - fulldestination << host_destination << ":"; - } - fulldestination << destination; - - ostringstream copy_cmd; - copy_cmd << RCP << " " << fullsource.str() << " " << fulldestination.str(); - return copy_cmd.str(); - } - - // Methode abstraite qui renvoie la commande a executer - string BatchManager_Local_RSH::exec_command(Parametre & param) const - { - ostringstream exec_sub_cmd; - exec_sub_cmd << param[EXECUTABLE]; - - if (param.find(ARGUMENTS) != param.end()) { - Versatile V = param[ARGUMENTS]; - for(Versatile::const_iterator it=V.begin(); it!=V.end(); it++) { - StringType argt = * static_cast(*it); - string arg = argt; - exec_sub_cmd << " " << arg; - } - } - - - Versatile new_arguments; - new_arguments.setMaxSize(0); - new_arguments = string(param[EXECUTIONHOST]); - - - if (param.find(USER) != param.end()) { - new_arguments += "-l"; - new_arguments += string(param[USER]); - } - - new_arguments += exec_sub_cmd.str(); - - param[ARGUMENTS] = new_arguments; - - // Sous Linux on est oblige de modifier ces deux parametres pour faire fonctionner la commande rsh - param[EXECUTABLE] = RSH; - param.erase(NAME); - - return RSH; - } - - // Methode qui renvoie la commande d'effacement du fichier - string BatchManager_Local_RSH::remove_command(const string & host_destination, const string & destination) const - { - string host = (host_destination.size()) ? host_destination : "localhost:"; - - ostringstream remove_cmd; - remove_cmd << RSH << " " << host << " \"" << RM << " " << destination << "\""; - return remove_cmd.str(); - } -} diff --git a/src/Batch/Batch_BatchManager_Local_RSH.hxx b/src/Batch/Batch_BatchManager_Local_RSH.hxx deleted file mode 100644 index c5c660425..000000000 --- a/src/Batch/Batch_BatchManager_Local_RSH.hxx +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * BatchManager_Local_RSH.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Thu Nov 6 10:17:22 2003 - * Projet : Salome 2 - * - */ - -#ifndef _BATCHMANAGER_LOCAL_RSH_H_ -#define _BATCHMANAGER_LOCAL_RSH_H_ - -#include "Batch_Defines.hxx" - -#include -#include -#include -#include -#include -#include "Batch_Job.hxx" -#include "Batch_JobId.hxx" -#include "Batch_JobInfo.hxx" -#include "Batch_JobInfo_Local.hxx" -#include "Batch_Job_Local.hxx" -#include "Batch_InvalidArgumentException.hxx" -#include "Batch_ConnexionFailureException.hxx" -#include "Batch_APIInternalFailureException.hxx" -#include "Batch_NotYetImplementedException.hxx" -#include "Batch_BatchManager_Local.hxx" - -namespace Batch { - - class FactBatchManager; - - class BATCH_EXPORT BatchManager_Local_RSH : public BatchManager_Local - { - public: - // Constructeur et destructeur - BatchManager_Local_RSH(const FactBatchManager * parent, const char * host="localhost") throw(InvalidArgumentException,ConnexionFailureException); // connexion a la machine host - virtual ~BatchManager_Local_RSH(); - - protected: - // Methode abstraite qui renvoie la commande de copie du fichier source en destination - virtual std::string copy_command( const std::string & host_source, - const std::string & source, - const std::string & host_destination, - const std::string & destination) const; - - // Methode abstraite qui renvoie la commande a executer - virtual std::string exec_command(Parametre & param) const; - - // Methode qui renvoie la commande d'effacement du fichier - virtual std::string remove_command( const std::string & host_destination, - const std::string & destination) const; - - }; - -} - -#endif diff --git a/src/Batch/Batch_BatchManager_Local_SH.cxx b/src/Batch/Batch_BatchManager_Local_SH.cxx deleted file mode 100644 index 797f55c42..000000000 --- a/src/Batch/Batch_BatchManager_Local_SH.cxx +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * BatchManager_Local_SH.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Thu Nov 6 10:17:22 2003 - * Projet : Salome 2 - * - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include -#include -#ifndef WIN32 -#include -#include -#endif -#include -#include -#include -#include -#include -#include "Batch_IOMutex.hxx" -#include "Batch_BatchManager_Local_SH.hxx" - -#ifndef RM -#error "RM undefined. You must set RM to a valid path to a rm-like command." -#endif - -#ifndef CP -#error "CP undefined. You must set CP to a valid path to a cp-like command." -#endif - -#ifndef SH -#error "SH undefined. You must set SH to a valid path to a sh-like command." -#endif - -using namespace std; - -namespace Batch { - - - // Constructeur - BatchManager_Local_SH::BatchManager_Local_SH(const FactBatchManager * parent, const char * host) throw(InvalidArgumentException,ConnexionFailureException) : BatchManager_Local(parent, host) - { - } - - // Destructeur - BatchManager_Local_SH::~BatchManager_Local_SH() - { - } - - - // Methode qui renvoie la commande de copie du fichier source en destination - string BatchManager_Local_SH::copy_command(const string & host_source, const string & source, const string & host_destination, const string & destination) const - { - ostringstream copy_cmd; - copy_cmd << CP << " " << source << " " << destination; - return copy_cmd.str(); - } - - // Methode qui renvoie la commande a executer - string BatchManager_Local_SH::exec_command(Parametre & param) const - { - ostringstream exec_sub_cmd; - exec_sub_cmd << param[EXECUTABLE]; - - if (param.find(ARGUMENTS) != param.end()) { - Versatile V = param[ARGUMENTS]; - for(Versatile::const_iterator it=V.begin(); it!=V.end(); it++) { - StringType argt = * static_cast(*it); - string arg = argt; - exec_sub_cmd << " " << arg; - } - } - - param[ARGUMENTS] = "-c"; - param[ARGUMENTS] += exec_sub_cmd.str(); - - return SH; - } - - // Methode qui renvoie la commande d'effacement du fichier - string BatchManager_Local_SH::remove_command(const string & host_destination, const string & destination) const - { - ostringstream remove_cmd; - remove_cmd << RM << " " << destination; - return remove_cmd.str(); - } - -} diff --git a/src/Batch/Batch_BatchManager_Local_SH.hxx b/src/Batch/Batch_BatchManager_Local_SH.hxx deleted file mode 100644 index 23b59097a..000000000 --- a/src/Batch/Batch_BatchManager_Local_SH.hxx +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * BatchManager_Local_SH.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Thu Nov 6 10:17:22 2003 - * Projet : Salome 2 - * - */ - -#ifndef _BATCHMANAGER_LOCAL_SH_H_ -#define _BATCHMANAGER_LOCAL_SH_H_ - -#include "Batch_Defines.hxx" - -#include -#include -#include -#include -#include -#include "Batch_Job.hxx" -#include "Batch_JobId.hxx" -#include "Batch_JobInfo.hxx" -#include "Batch_JobInfo_Local.hxx" -#include "Batch_Job_Local.hxx" -#include "Batch_InvalidArgumentException.hxx" -#include "Batch_ConnexionFailureException.hxx" -#include "Batch_APIInternalFailureException.hxx" -#include "Batch_NotYetImplementedException.hxx" -#include "Batch_BatchManager_Local.hxx" - -namespace Batch { - - class FactBatchManager; - - class BATCH_EXPORT BatchManager_Local_SH : public BatchManager_Local - { - public: - // Constructeur et destructeur - BatchManager_Local_SH(const FactBatchManager * parent, const char * host="localhost") throw(InvalidArgumentException,ConnexionFailureException); // connexion a la machine host - virtual ~BatchManager_Local_SH(); - - protected: - // Methode qui renvoie la commande de copie du fichier source en destination - virtual std::string copy_command( const std::string & host_source, - const std::string & source, - const std::string & host_destination, - const std::string & destination) const; - - // Methode qui renvoie la commande a executer - virtual std::string exec_command(Parametre & param) const; - - // Methode qui renvoie la commande d'effacement du fichier - virtual std::string remove_command( const std::string & host_destination, - const std::string & destination) const; - - }; - -} - -#endif diff --git a/src/Batch/Batch_BatchManager_Local_SSH.cxx b/src/Batch/Batch_BatchManager_Local_SSH.cxx deleted file mode 100644 index 723f91dbe..000000000 --- a/src/Batch/Batch_BatchManager_Local_SSH.cxx +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * BatchManager_Local_SSH.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Thu Nov 6 10:17:22 2003 - * Projet : Salome 2 - * - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include -#include -#ifndef WIN32 -#include -#include -#endif -#include - -#include -#include -#include -#include -#include "Batch_IOMutex.hxx" -#include "Batch_BatchManager_Local_SSH.hxx" - -#ifndef RM -#error "RM undefined. You must set RM to a valid path to a rm-like command." -#endif - -#ifndef RCP -#error "RCP undefined. You must set RCP to a valid path to a scp-like command." -#endif - -#ifndef SSH -#error "SSH undefined. You must set SSH to a valid path to a ssh-like command." -#endif - -using namespace std; - -namespace Batch { - - - // Constructeur - BatchManager_Local_SSH::BatchManager_Local_SSH(const FactBatchManager * parent, const char * host) throw(InvalidArgumentException,ConnexionFailureException) : BatchManager_Local(parent, host) - { - } - - // Destructeur - BatchManager_Local_SSH::~BatchManager_Local_SSH() - { - } - - - // Methode abstraite qui renvoie la commande de copie du fichier source en destination - string BatchManager_Local_SSH::copy_command(const string & host_source, const string & source, const string & host_destination, const string & destination) const - { - ostringstream fullsource; - if (host_source.size() == 0) { - fullsource << "localhost:"; - } else { - fullsource << host_source << ":"; - } - fullsource << source; - - ostringstream fulldestination; - if (host_destination.size() == 0) { - fulldestination << "localhost:"; - } else { - fulldestination << host_destination << ":"; - } - fulldestination << destination; - - ostringstream copy_cmd; - copy_cmd << RCP << " " << fullsource.str() << " " << fulldestination.str(); - return copy_cmd.str(); - } - - // Methode abstraite qui renvoie la commande a executer - string BatchManager_Local_SSH::exec_command(Parametre & param) const - { - ostringstream exec_sub_cmd; - exec_sub_cmd << param[EXECUTABLE]; - - if (param.find(ARGUMENTS) != param.end()) { - Versatile V = param[ARGUMENTS]; - for(Versatile::const_iterator it=V.begin(); it!=V.end(); it++) { - StringType argt = * static_cast(*it); - string arg = argt; - exec_sub_cmd << " " << arg; - } - } - - - Versatile new_arguments; - new_arguments.setMaxSize(0); - new_arguments = string(param[EXECUTIONHOST]); - - - if (param.find(USER) != param.end()) { - new_arguments += "-l"; - new_arguments += string(param[USER]); - } - - new_arguments += exec_sub_cmd.str(); - - param[ARGUMENTS] = new_arguments; - - // Sous Linux on est oblige de modifier ces deux parametres pour faire fonctionner la commande rsh - param[EXECUTABLE] = SSH; - param.erase(NAME); - - return SSH; - } - - // Methode qui renvoie la commande d'effacement du fichier - string BatchManager_Local_SSH::remove_command(const string & host_destination, const string & destination) const - { - string host = (host_destination.size()) ? host_destination : "localhost:"; - - ostringstream remove_cmd; - remove_cmd << SSH << " " << host << " \"" << RM << " " << destination << "\""; - return remove_cmd.str(); - } -} diff --git a/src/Batch/Batch_BatchManager_Local_SSH.hxx b/src/Batch/Batch_BatchManager_Local_SSH.hxx deleted file mode 100644 index 12772fb46..000000000 --- a/src/Batch/Batch_BatchManager_Local_SSH.hxx +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * BatchManager_Local_SSH.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Thu Nov 6 10:17:22 2003 - * Projet : Salome 2 - * - */ - -#ifndef _BATCHMANAGER_LOCAL_SSH_H_ -#define _BATCHMANAGER_LOCAL_SSH_H_ - -#include "Batch_Defines.hxx" - -#include -#include -#include -#include -#include -#include "Batch_Job.hxx" -#include "Batch_JobId.hxx" -#include "Batch_JobInfo.hxx" -#include "Batch_JobInfo_Local.hxx" -#include "Batch_Job_Local.hxx" -#include "Batch_InvalidArgumentException.hxx" -#include "Batch_ConnexionFailureException.hxx" -#include "Batch_APIInternalFailureException.hxx" -#include "Batch_NotYetImplementedException.hxx" -#include "Batch_BatchManager_Local.hxx" - -namespace Batch { - - class FactBatchManager; - - class BATCH_EXPORT BatchManager_Local_SSH : public BatchManager_Local - { - public: - // Constructeur et destructeur - BatchManager_Local_SSH(const FactBatchManager * parent, const char * host="localhost") throw(InvalidArgumentException,ConnexionFailureException); // connexion a la machine host - virtual ~BatchManager_Local_SSH(); - - protected: - // Methode abstraite qui renvoie la commande de copie du fichier source en destination - virtual std::string copy_command( const std::string & host_source, - const std::string & source, - const std::string & host_destination, - const std::string & destination) const; - - // Methode abstraite qui renvoie la commande a executer - virtual std::string exec_command(Parametre & param) const; - - // Methode qui renvoie la commande d'effacement du fichier - virtual std::string remove_command( const std::string & host_destination, - const std::string & destination) const; - - }; - -} - -#endif diff --git a/src/Batch/Batch_BatchManager_PBS.cxx b/src/Batch/Batch_BatchManager_PBS.cxx deleted file mode 100644 index dd2b1b812..000000000 --- a/src/Batch/Batch_BatchManager_PBS.cxx +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * BatchManager_PBS.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Thu Nov 6 10:17:22 2003 - * Projet : Salome 2 - * - */ - -extern "C" { -#include -#include -} -#include -#include -#include -//#include "MEDMEM_STRING.hxx" -#include "Batch_BatchManager_PBS.hxx" -using namespace std; - -namespace Batch { - - // Recupere le nom du serveur par defaut -// string BatchManager_PBS::getDefaultServer() { -// string server_name = "localhost"; - -// const char * server_name_path = "@openpbsspooldir@/server_name"; -// ifstream server_name_file(server_name_path); -// if (server_name_file) { -// server_name_file >> server_name; -// server_name_file.close(); -// } - -// return server_name; -// } - - // Constructeur -// BatchManager_PBS::BatchManager_PBS() throw(InvalidArgumentException,ConnexionFailureException) : BatchManager(BatchManager_PBS::getDefaultServer()) -// { -// // On se connecte au serveur PBS -// _connect = pbs_connect(const_cast< char * >(_hostname.c_str())); -// if (_connect < 0) { // si erreur -// char * errmsg = pbs_geterrmsg(_connect); -// string msg = "PBS Server on host \""; -// msg += _hostname; -// msg += "\" : "; -// msg += errmsg ? errmsg : "Reason unknown"; -// throw ConnexionFailureException(msg.c_str()); -// } -// } - - // Constructeur -// BatchManager_PBS::BatchManager_PBS(string host) throw(InvalidArgumentException,ConnexionFailureException) : BatchManager(host) -// { -// // On se connecte au serveur PBS -// _connect = pbs_connect(const_cast< char * >(_hostname.c_str())); -// if (_connect < 0) { // si erreur -// char * errmsg = pbs_geterrmsg(_connect); -// string msg = "PBS Server on host \""; -// msg += _hostname; -// msg += "\" : "; -// msg += errmsg ? errmsg : "Reason unknown"; -// throw ConnexionFailureException(msg.c_str()); -// } -// } - BatchManager_PBS::BatchManager_PBS(const FactBatchManager * parent, const char * host) throw(InvalidArgumentException,ConnexionFailureException) : BatchManager(parent, host) - { - // On se connecte au serveur PBS - _connect = pbs_connect(const_cast< char * >(_hostname.c_str())); - if (_connect < 0) { // si erreur - char * errmsg = pbs_geterrmsg(_connect); - string msg = "PBS Server on host \""; - msg += _hostname; - msg += "\" : "; - msg += errmsg ? errmsg : "Reason unknown"; - throw ConnexionFailureException(msg.c_str()); - } - } - - // Destructeur - BatchManager_PBS::~BatchManager_PBS() - { - // On se deconnecte du serveur PBS - int rc = pbs_disconnect(_connect); - if (rc < 0) { // si erreur - string msg = "PBS Server on host \""; - msg += _hostname; - msg += "\" : "; - msg += pbs_geterrmsg(_connect); - throw ConnexionFailureException(msg.c_str()); - } - } - - // Methode pour le controle des jobs : soumet un job au gestionnaire - const JobId BatchManager_PBS::submitJob(const Job & job) - { - Job_PBS jobpbs = job; - char * ref = pbs_submit(_connect, - jobpbs.getAttributesOP(), - jobpbs.getScript(), - jobpbs.getDestination(), - NULL); - if (!ref) { // si erreur - char * msg = pbs_geterrmsg(_connect); - if (!msg) msg = "unknown"; - throw APIInternalFailureException(string("PBS submit error. Reason : ") + msg); - } - - JobId id(this, string(ref)); - free(ref); - return id; - } - - // Methode pour le controle des jobs : retire un job du gestionnaire - void BatchManager_PBS::deleteJob(const JobId & jobid) - { - char * ref = const_cast< char * >(jobid.getReference().c_str()); - int rc = pbs_deljob(_connect, ref, 0); - if (rc) { // si erreur - char * msg = pbs_geterrmsg(_connect); - if (!msg) msg = "unknown"; - throw APIInternalFailureException(string("PBS deljob error. Reason : ") + msg); - } - } - - // Methode pour le controle des jobs : suspend un job en file d'attente - void BatchManager_PBS::holdJob(const JobId & jobid) - { - char * ref = const_cast< char * >(jobid.getReference().c_str()); - int rc = pbs_holdjob(_connect, ref, USER_HOLD, 0); - if (rc) { // si erreur - char * msg = pbs_geterrmsg(_connect); - if (!msg) msg = "unknown"; - throw APIInternalFailureException(string("PBS holdjob error. Reason : ") + msg); - } - } - - // Methode pour le controle des jobs : relache un job suspendu - void BatchManager_PBS::releaseJob(const JobId & jobid) - { - char * ref = const_cast< char * >(jobid.getReference().c_str()); - int rc = pbs_rlsjob(_connect, ref, USER_HOLD, 0); - if (rc) { // si erreur - char * msg = pbs_geterrmsg(_connect); - if (!msg) msg = "unknown"; - throw APIInternalFailureException(string("PBS rlsjob error. Reason : ") + msg); - } - } - - - // Methode pour le controle des jobs : modifie un job en file d'attente - void BatchManager_PBS::alterJob(const JobId & jobid, const Parametre & param, const Environnement & env) - { - Job job(param, env); - Job_PBS jobpbs(job); - - char * ref = const_cast< char * >(jobid.getReference().c_str()); - int rc = pbs_alterjob(_connect, - ref, - jobpbs.getAttributes(), - NULL); - if (rc) { // si erreur - char * msg = pbs_geterrmsg(_connect); - if (!msg) msg = "unknown"; - throw APIInternalFailureException(string("PBS alterjob error. Reason : ") + msg); - } - - } - - // Methode pour le controle des jobs : modifie un job en file d'attente - void BatchManager_PBS::alterJob(const JobId & jobid, const Parametre & param) - { - alterJob(jobid, param, Environnement()); - } - - // Methode pour le controle des jobs : modifie un job en file d'attente - void BatchManager_PBS::alterJob(const JobId & jobid, const Environnement & env) - { - alterJob(jobid, Parametre(), env); - } - - - - // Methode pour le controle des jobs : renvoie l'etat du job - JobInfo BatchManager_PBS::queryJob(const JobId & jobid) - { - char * id = const_cast< char * >(jobid.getReference().c_str()); - JobInfo_PBS ji = JobInfo_PBS(pbs_statjob(_connect, id, 0, 0), true); - return ji; - } - - - -} diff --git a/src/Batch/Batch_BatchManager_PBS.hxx b/src/Batch/Batch_BatchManager_PBS.hxx deleted file mode 100644 index ee6ac8218..000000000 --- a/src/Batch/Batch_BatchManager_PBS.hxx +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * BatchManager_PBS.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Thu Nov 6 10:17:22 2003 - * Projet : Salome 2 - * - */ - -#ifndef _BATCHMANAGER_PBS_H_ -#define _BATCHMANAGER_PBS_H_ - -#include "Batch_Defines.hxx" - -#include "Batch_Job.hxx" -#include "Batch_Job.hxx" -#include "Batch_JobId.hxx" -#include "Batch_JobInfo.hxx" -#include "Batch_JobInfo_PBS.hxx" -#include "Batch_Job_PBS.hxx" -#include "Batch_InvalidArgumentException.hxx" -#include "Batch_ConnexionFailureException.hxx" -#include "Batch_APIInternalFailureException.hxx" -#include "Batch_NotYetImplementedException.hxx" -#include "Batch_BatchManager.hxx" - -namespace Batch { - - class Job; - class JobId; - class JobInfo; - class FactBatchManager; - - class BATCH_EXPORT BatchManager_PBS : public BatchManager - { - public: - // Constructeur et destructeur - //BatchManager_PBS() throw(InvalidArgumentException,ConnexionFailureException); // connexion au serveur par defaut - //BatchManager_PBS(std::string host) throw(InvalidArgumentException,ConnexionFailureException); // connexion a la machine host - BatchManager_PBS(const FactBatchManager * parent, const char * host="localhost") throw(InvalidArgumentException,ConnexionFailureException); // connexion a la machine host - virtual ~BatchManager_PBS(); - - // Recupere le nom du serveur par defaut - // static std::string BatchManager_PBS::getDefaultServer(); - - // Methodes pour le controle des jobs - virtual const JobId submitJob(const Job & job); // soumet un job au gestionnaire - virtual void deleteJob(const JobId & jobid); // retire un job du gestionnaire - virtual void holdJob(const JobId & jobid); // suspend un job en file d'attente - virtual void releaseJob(const JobId & jobid); // relache un job suspendu - virtual void alterJob(const JobId & jobid, const Parametre & param, const Environnement & env); // modifie un job en file d'attente - virtual void alterJob(const JobId & jobid, const Parametre & param); // modifie un job en file d'attente - virtual void alterJob(const JobId & jobid, const Environnement & env); // modifie un job en file d'attente - virtual JobInfo queryJob(const JobId & jobid); // renvoie l'etat du job - - virtual void setParametre(const JobId & jobid, const Parametre & param) { return alterJob(jobid, param); } // modifie un job en file d'attente - virtual void setEnvironnement(const JobId & jobid, const Environnement & env) { return alterJob(jobid, env); } // modifie un job en file d'attente - - - protected: - int _connect; // PBS connect id - - private: - -#ifdef SWIG - public: - // Recupere le l'identifiant d'un job deja soumis au BatchManager - //virtual const JobId getJobIdByReference(const std::string & ref) { return BatchManager::getJobIdByReference(ref); } - virtual const JobId getJobIdByReference(const char * ref) { return BatchManager::getJobIdByReference(ref); } -#endif - - }; - -} - -#endif diff --git a/src/Batch/Batch_BatchManager_eClient.cxx b/src/Batch/Batch_BatchManager_eClient.cxx deleted file mode 100644 index ebdd30895..000000000 --- a/src/Batch/Batch_BatchManager_eClient.cxx +++ /dev/null @@ -1,246 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* -* BatchManager_eLSF.cxx : emulation of LSF client -* -* Auteur : Bernard SECHER - CEA DEN -* Mail : mailto:bernard.secher@cea.fr -* Date : Thu Apr 24 10:17:22 2008 -* Projet : PAL Salome -* -*/ - -#include "Batch_BatchManager_eClient.hxx" -#include "Basics_DirUtils.hxx" - -#include -#include -#include -#include -#include -#include - -using namespace std; - - -namespace Batch { - - BatchManager_eClient::BatchManager_eClient(const Batch::FactBatchManager * parent, const char* host, const char* protocol, const char* mpiImpl) : BatchManager(parent, host), _protocol(protocol), _username("") - { - // instanciation of mpi implementation needed to launch executable in batch script - _mpiImpl = FactoryMpiImpl(mpiImpl); - } - - // Destructeur - BatchManager_eClient::~BatchManager_eClient() - { - // Nothing to do - delete _mpiImpl; - } - - void BatchManager_eClient::exportInputFiles(const Job& job) throw(EmulationException) - { - int status; - Parametre params = job.getParametre(); - Versatile V = params[INFILE]; - Versatile::iterator Vit; - string command; - string copy_command; - _username = string(params[USER]); - - // Test protocol - if( _protocol == "rsh" ) - copy_command = "rcp "; - else if( _protocol == "ssh" ) - copy_command = "scp "; - else - throw EmulationException("Unknown protocol : only rsh and ssh are known !"); - - // First step : creating batch tmp files directory - command = _protocol; - command += " "; - if(_username != ""){ - command += _username; - command += "@"; - } - command += _hostname; - command += " \"mkdir -p "; - command += string(params[TMPDIR]); - command += "\"" ; - cerr << command.c_str() << endl; - status = system(command.c_str()); - if(status) { - std::ostringstream oss; - oss << status; - std::string ex_mess("Error of connection on remote host ! status = "); - ex_mess += oss.str(); - throw EmulationException(ex_mess.c_str()); - } - - // Second step : copy fileToExecute into - // batch tmp files directory - string executeFile = params[EXECUTABLE]; - if( executeFile.size() > 0 ){ - command = copy_command; - command += string(params[EXECUTABLE]); - command += " "; - if(_username != ""){ - command += _username; - command += "@"; - } - command += _hostname; - command += ":"; - command += string(params[TMPDIR]); - cerr << command.c_str() << endl; - status = system(command.c_str()); - if(status) { - std::ostringstream oss; - oss << status; - std::string ex_mess("Error of connection on remote host ! status = "); - ex_mess += oss.str(); - throw EmulationException(ex_mess.c_str()); - } - } - - // Third step : copy filesToExportList into - // batch tmp files directory - for(Vit=V.begin(); Vit!=V.end(); Vit++) { - CoupleType cpt = *static_cast< CoupleType * >(*Vit); - Couple inputFile = cpt; - command = copy_command; - command += inputFile.getLocal(); - command += " "; - if(_username != ""){ - command += _username; - command += "@"; - } - command += _hostname; - command += ":"; - command += inputFile.getRemote(); - cerr << command.c_str() << endl; - status = system(command.c_str()); - if(status) { - std::ostringstream oss; - oss << status; - std::string ex_mess("Error of connection on remote host ! status = "); - ex_mess += oss.str(); - throw EmulationException(ex_mess.c_str()); - } - } - - } - - void BatchManager_eClient::importOutputFiles( const Job & job, const string directory ) throw(EmulationException) - { - string command; - int status; - - Parametre params = job.getParametre(); - Versatile V = params[OUTFILE]; - Versatile::iterator Vit; - - for(Vit=V.begin(); Vit!=V.end(); Vit++) { - CoupleType cpt = *static_cast< CoupleType * >(*Vit); - Couple outputFile = cpt; - if( _protocol == "rsh" ) - command = "rcp "; - else if( _protocol == "ssh" ) - command = "scp "; - else - throw EmulationException("Unknown protocol"); - - if (_username != ""){ - command += _username; - command += "@"; - } - command += _hostname; - command += ":"; - command += outputFile.getRemote(); - command += " "; - command += directory; - cerr << command.c_str() << endl; - status = system(command.c_str()); - if(status) - { - // Try to get what we can (logs files) - // throw BatchException("Error of connection on remote host"); - std::string mess("Copy command failed ! status is :"); - ostringstream status_str; - status_str << status; - mess += status_str.str(); - cerr << mess << endl; - } - } - - } - - MpiImpl *BatchManager_eClient::FactoryMpiImpl(string mpiImpl) throw(EmulationException) - { - if(mpiImpl == "lam") - return new MpiImpl_LAM(); - else if(mpiImpl == "mpich1") - return new MpiImpl_MPICH1(); - else if(mpiImpl == "mpich2") - return new MpiImpl_MPICH2(); - else if(mpiImpl == "openmpi") - return new MpiImpl_OPENMPI(); - else if(mpiImpl == "slurm") - return new MpiImpl_SLURM(); - else if(mpiImpl == "prun") - return new MpiImpl_PRUN(); - else if(mpiImpl == "nompi") - throw EmulationException("you must specified an mpi implementation for batch manager"); - else{ - ostringstream oss; - oss << mpiImpl << " : not yet implemented"; - throw EmulationException(oss.str().c_str()); - } - } - - string BatchManager_eClient::BuildTemporaryFileName() const - { - //build more complex file name to support multiple salome session - string aFileName = Kernel_Utils::GetTmpFileName(); -#ifndef WIN32 - aFileName += ".sh"; -#else - aFileName += ".bat"; -#endif - return aFileName; - } - - void BatchManager_eClient::RmTmpFile(std::string & TemporaryFileName) - { -#ifdef WIN32 - string command = "del /F "; -#else - string command = "rm "; -#endif - command += TemporaryFileName; - char *temp = strdup(command.c_str()); - int lgthTemp = strlen(temp); - temp[lgthTemp - 3] = '*'; - temp[lgthTemp - 2] = '\0'; - system(temp); - free(temp); - } -} diff --git a/src/Batch/Batch_BatchManager_eClient.hxx b/src/Batch/Batch_BatchManager_eClient.hxx deleted file mode 100644 index 172ca4abd..000000000 --- a/src/Batch/Batch_BatchManager_eClient.hxx +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * BatchManager_eLSF.hxx : emulation of client - * - * Auteur : Bernard SECHER - CEA DEN - * Mail : mailto:bernard.secher@cea.fr - * Date : Thu Apr 24 10:17:22 2008 - * Projet : PAL Salome - * - */ - -#ifndef _BATCHMANAGER_eClient_H_ -#define _BATCHMANAGER_eClient_H_ - -#include "Batch_Defines.hxx" - -#include "MpiImpl.hxx" -#include "Batch_BatchManager.hxx" - -#include - -namespace Batch { - - class Job; - - class BATCH_EXPORT EmulationException - { - public: - const std::string msg; - - EmulationException(const std::string m) : msg(m) {} - }; - - class BATCH_EXPORT BatchManager_eClient : public BatchManager - { - public: - // Constructeur et destructeur - BatchManager_eClient(const Batch::FactBatchManager * parent, const char* host="localhost", const char* protocol="ssh", const char* mpiImpl="mpich1"); - virtual ~BatchManager_eClient(); - void importOutputFiles( const Job & job, const std::string directory ) throw(EmulationException); - - protected: - std::string _protocol; // protocol to access _hostname - std::string _username; // username to access _hostname - MpiImpl *_mpiImpl; // Mpi implementation to launch executable in batch script - - std::string BuildTemporaryFileName() const; - void RmTmpFile(std::string & TemporaryFileName); - MpiImpl* FactoryMpiImpl(std::string mpiImpl) throw(EmulationException); - void exportInputFiles(const Job & job) throw(EmulationException); - - private: - - }; - -} - -#endif diff --git a/src/Batch/Batch_BatchManager_eLSF.cxx b/src/Batch/Batch_BatchManager_eLSF.cxx deleted file mode 100644 index 009d4c6a4..000000000 --- a/src/Batch/Batch_BatchManager_eLSF.cxx +++ /dev/null @@ -1,363 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * BatchManager_eLSF.cxx : emulation of LSF client - * - * Auteur : Bernard SECHER - CEA DEN - * Mail : mailto:bernard.secher@cea.fr - * Date : Thu Apr 24 10:17:22 2008 - * Projet : PAL Salome - * - */ - -#include -#include -#include -#include -#include -#include - -#include "Batch_BatchManager_eLSF.hxx" -#ifdef WIN32 -# include -# include -#else -# include -#endif - -using namespace std; - -namespace Batch { - - BatchManager_eLSF::BatchManager_eLSF(const FactBatchManager * parent, const char * host, const char * protocol, const char * mpiImpl) throw(InvalidArgumentException,ConnexionFailureException) : BatchManager_eClient(parent,host,protocol,mpiImpl) - { - // Nothing to do - } - - // Destructeur - BatchManager_eLSF::~BatchManager_eLSF() - { - // Nothing to do - } - - // Methode pour le controle des jobs : soumet un job au gestionnaire - const JobId BatchManager_eLSF::submitJob(const Job & job) - { - int status; - Parametre params = job.getParametre(); - const std::string dirForTmpFiles = params[TMPDIR]; - const string fileToExecute = params[EXECUTABLE]; - std::string fileNameToExecute; - if( fileToExecute.size() > 0 ){ - string::size_type p1 = fileToExecute.find_last_of("/"); - string::size_type p2 = fileToExecute.find_last_of("."); - fileNameToExecute = fileToExecute.substr(p1+1,p2-p1-1); - } - else - fileNameToExecute = "command"; - - // export input files on cluster - exportInputFiles(job); - - // build batch script for job - buildBatchScript(job); - - // define name of log file - string logFile="/tmp/logs/"; - logFile += getenv("USER"); - logFile += "/batchSalome_"; - srand ( time(NULL) ); - int ir = rand(); - ostringstream oss; - oss << ir; - logFile += oss.str(); - logFile += ".log"; - - string command; - - // define command to submit batch - command = _protocol; - command += " "; - - if(_username != ""){ - command += _username; - command += "@"; - } - - command += _hostname; - command += " \"cd " ; - command += dirForTmpFiles ; - command += "; bsub < " ; - command += fileNameToExecute ; - command += "_Batch.sh\" > "; - command += logFile; - cerr << command.c_str() << endl; - status = system(command.c_str()); - if(status) - throw EmulationException("Error of connection on remote host"); - - // read id of submitted job in log file - char line[128]; - FILE *fp = fopen(logFile.c_str(),"r"); - fgets( line, 128, fp); - fclose(fp); - - string sline(line); - int p10 = sline.find("<"); - int p20 = sline.find(">"); - string strjob = sline.substr(p10+1,p20-p10-1); - - JobId id(this, strjob); - return id; - } - - // Methode pour le controle des jobs : retire un job du gestionnaire - void BatchManager_eLSF::deleteJob(const JobId & jobid) - { - int status; - int ref; - istringstream iss(jobid.getReference()); - iss >> ref; - - // define command to submit batch - string command; - command = _protocol; - command += " "; - - if (_username != ""){ - command += _username; - command += "@"; - } - - command += _hostname; - command += " \"bkill " ; - command += iss.str(); - command += "\""; - cerr << command.c_str() << endl; - status = system(command.c_str()); - if(status) - throw EmulationException("Error of connection on remote host"); - - cerr << "jobId = " << ref << "killed" << endl; - } - - // Methode pour le controle des jobs : suspend un job en file d'attente - void BatchManager_eLSF::holdJob(const JobId & jobid) - { - throw EmulationException("Not yet implemented"); - } - - // Methode pour le controle des jobs : relache un job suspendu - void BatchManager_eLSF::releaseJob(const JobId & jobid) - { - throw EmulationException("Not yet implemented"); - } - - - // Methode pour le controle des jobs : modifie un job en file d'attente - void BatchManager_eLSF::alterJob(const JobId & jobid, const Parametre & param, const Environnement & env) - { - throw EmulationException("Not yet implemented"); - } - - // Methode pour le controle des jobs : modifie un job en file d'attente - void BatchManager_eLSF::alterJob(const JobId & jobid, const Parametre & param) - { - alterJob(jobid, param, Environnement()); - } - - // Methode pour le controle des jobs : modifie un job en file d'attente - void BatchManager_eLSF::alterJob(const JobId & jobid, const Environnement & env) - { - alterJob(jobid, Parametre(), env); - } - - // Methode pour le controle des jobs : renvoie l'etat du job - JobInfo BatchManager_eLSF::queryJob(const JobId & jobid) - { - int id; - istringstream iss(jobid.getReference()); - iss >> id; - - // define name of log file - string logFile="/tmp/logs/"; - logFile += getenv("USER"); - logFile += "/batchSalome_"; - - srand ( time(NULL) ); - int ir = rand(); - ostringstream oss; - oss << ir; - logFile += oss.str(); - logFile += ".log"; - - string command; - int status; - - // define command to submit batch - command = _protocol; - command += " "; - - if (_username != ""){ - command += _username; - command += "@"; - } - - command += _hostname; - command += " \"bjobs " ; - command += iss.str(); - command += "\" > "; - command += logFile; - cerr << command.c_str() << endl; - status = system(command.c_str()); - if(status) - throw EmulationException("Error of connection on remote host"); - - JobInfo_eLSF ji = JobInfo_eLSF(id,logFile); - return ji; - } - - - - // Methode pour le controle des jobs : teste si un job est present en machine - bool BatchManager_eLSF::isRunning(const JobId & jobid) - { - throw EmulationException("Not yet implemented"); - } - - void BatchManager_eLSF::buildBatchScript(const Job & job) throw(EmulationException) - { -#ifndef WIN32 //TODO: need for porting on Windows - int status; - Parametre params = job.getParametre(); - Environnement env = job.getEnvironnement(); - const int nbproc = params[NBPROC]; - const long edt = params[MAXWALLTIME]; - const long mem = params[MAXRAMSIZE]; - const string workDir = params[WORKDIR]; - const std::string dirForTmpFiles = params[TMPDIR]; - const string fileToExecute = params[EXECUTABLE]; - const string home = params[HOMEDIR]; - const std::string queue = params[QUEUE]; - std::string rootNameToExecute; - std::string fileNameToExecute; - std::string filelogtemp; - if( fileToExecute.size() > 0 ){ - string::size_type p1 = fileToExecute.find_last_of("/"); - string::size_type p2 = fileToExecute.find_last_of("."); - rootNameToExecute = fileToExecute.substr(p1+1,p2-p1-1); - char* basec=strdup(fileToExecute.c_str()); - fileNameToExecute = "~/" + dirForTmpFiles + "/" + string(basename(basec)); - free(basec); - - int idx = dirForTmpFiles.find("Batch/"); - filelogtemp = dirForTmpFiles.substr(idx+6, dirForTmpFiles.length()); - } - else{ - rootNameToExecute = "command"; - } - - std::string TmpFileName = BuildTemporaryFileName(); - ofstream tempOutputFile; - tempOutputFile.open(TmpFileName.c_str(), ofstream::out ); - - tempOutputFile << "#! /bin/sh -f" << endl ; - if (queue != "") - tempOutputFile << "#BSUB -q " << queue << endl; - if( edt > 0 ) - tempOutputFile << "#BSUB -W " << getWallTime(edt) << endl ; - if( mem > 0 ) - tempOutputFile << "#BSUB -M " << mem*1024 << endl ; - tempOutputFile << "#BSUB -n " << nbproc << endl ; - if( fileToExecute.size() > 0 ){ - tempOutputFile << "#BSUB -o " << home << "/" << dirForTmpFiles << "/output.log." << filelogtemp << endl ; - tempOutputFile << "#BSUB -e " << home << "/" << dirForTmpFiles << "/error.log." << filelogtemp << endl ; - } - else{ - tempOutputFile << "#BSUB -o " << dirForTmpFiles << "/" << env["LOGFILE"] << ".output.log" << endl ; - tempOutputFile << "#BSUB -e " << dirForTmpFiles << "/" << env["LOGFILE"] << ".error.log" << endl ; - } - if( workDir.size() > 0 ) - tempOutputFile << "cd " << workDir << endl ; - if( fileToExecute.size() > 0 ){ - tempOutputFile << _mpiImpl->boot("",nbproc); - tempOutputFile << _mpiImpl->run("",nbproc,fileNameToExecute); - tempOutputFile << _mpiImpl->halt(); - } - else{ - tempOutputFile << "source " << env["SOURCEFILE"] << endl ; - tempOutputFile << env["COMMAND"]; - } - - tempOutputFile.flush(); - tempOutputFile.close(); -#ifdef WIN32 - _chmod( -#else - chmod( -#endif - TmpFileName.c_str(), 0x1ED); - cerr << TmpFileName.c_str() << endl; - - string command; - if( _protocol == "rsh" ) - command = "rcp "; - else if( _protocol == "ssh" ) - command = "scp "; - else - throw EmulationException("Unknown protocol"); - command += TmpFileName; - command += " "; - if(_username != ""){ - command += _username; - command += "@"; - } - command += _hostname; - command += ":"; - command += dirForTmpFiles ; - command += "/" ; - command += rootNameToExecute ; - command += "_Batch.sh" ; - cerr << command.c_str() << endl; - status = system(command.c_str()); - if(status) - throw EmulationException("Error of connection on remote host"); - - RmTmpFile(TmpFileName); -#endif - - } - - std::string BatchManager_eLSF::getWallTime(const long edt) - { - long h, m; - h = edt / 60; - m = edt - h*60; - ostringstream oss; - if( m >= 10 ) - oss << h << ":" << m; - else - oss << h << ":0" << m; - return oss.str(); - } - -} diff --git a/src/Batch/Batch_BatchManager_eLSF.hxx b/src/Batch/Batch_BatchManager_eLSF.hxx deleted file mode 100644 index 599d90c68..000000000 --- a/src/Batch/Batch_BatchManager_eLSF.hxx +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * BatchManager_eLSF.hxx : emulation of LSF client - * - * Auteur : Bernard SECHER - CEA DEN - * Mail : mailto:bernard.secher@cea.fr - * Date : Thu Apr 24 10:17:22 2008 - * Projet : PAL Salome - * - */ - -#ifndef _BATCHMANAGER_eLSF_H_ -#define _BATCHMANAGER_eLSF_H_ - -#include "Batch_Defines.hxx" - -#include "Batch_JobId.hxx" -#include "Batch_JobInfo.hxx" -#include "Batch_JobInfo_eLSF.hxx" -#include "Batch_InvalidArgumentException.hxx" -#include "Batch_ConnexionFailureException.hxx" -#include "Batch_APIInternalFailureException.hxx" -#include "Batch_NotYetImplementedException.hxx" -#include "Batch_BatchManager.hxx" -#include "Batch_BatchManager_eClient.hxx" - -namespace Batch { - - class Job; - class JobId; - class JobInfo; - class FactBatchManager; - - class BATCH_EXPORT BatchManager_eLSF : public BatchManager_eClient - { - public: - // Constructeur et destructeur - BatchManager_eLSF(const FactBatchManager * parent, const char * host="localhost", const char * protocol="ssh", const char * mpiImpl="nompi") throw(InvalidArgumentException,ConnexionFailureException); // connexion a la machine host - virtual ~BatchManager_eLSF(); - - // Recupere le nom du serveur par defaut - // static string BatchManager_LSF::getDefaultServer(); - - // Methodes pour le controle des jobs - virtual const JobId submitJob(const Job & job); // soumet un job au gestionnaire - virtual void deleteJob(const JobId & jobid); // retire un job du gestionnaire - virtual void holdJob(const JobId & jobid); // suspend un job en file d'attente - virtual void releaseJob(const JobId & jobid); // relache un job suspendu - virtual void alterJob(const JobId & jobid, const Parametre & param, const Environnement & env); // modifie un job en file d'attente - virtual void alterJob(const JobId & jobid, const Parametre & param); // modifie un job en file d'attente - virtual void alterJob(const JobId & jobid, const Environnement & env); // modifie un job en file d'attente - virtual JobInfo queryJob(const JobId & jobid); // renvoie l'etat du job - virtual bool isRunning(const JobId & jobid); // teste si un job est present en machine - - virtual void setParametre(const JobId & jobid, const Parametre & param) { return alterJob(jobid, param); } // modifie un job en file d'attente - virtual void setEnvironnement(const JobId & jobid, const Environnement & env) { return alterJob(jobid, env); } // modifie un job en file d'attente - - - protected: - void buildBatchScript(const Job & job) throw(EmulationException); - std::string getWallTime(const long edt); - - private: - -#ifdef SWIG - public: - // Recupere le l'identifiant d'un job deja soumis au BatchManager - //virtual const JobId getJobIdByReference(const string & ref) { return BatchManager::getJobIdByReference(ref); } - virtual const JobId getJobIdByReference(const char * ref) { return BatchManager::getJobIdByReference(ref); } -#endif - - }; - -} - -#endif diff --git a/src/Batch/Batch_BatchManager_ePBS.cxx b/src/Batch/Batch_BatchManager_ePBS.cxx deleted file mode 100644 index 177319c32..000000000 --- a/src/Batch/Batch_BatchManager_ePBS.cxx +++ /dev/null @@ -1,342 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * BatchManager_ePBS.cxx : emulation of PBS client - * - * Auteur : Bernard SECHER - CEA DEN - * Mail : mailto:bernard.secher@cea.fr - * Date : Thu Apr 24 10:17:22 2008 - * Projet : PAL Salome - * - */ - -#include -#include -#include -#include -#include -#include - -#include "Batch_BatchManager_ePBS.hxx" -#ifdef WIN32 -# include -# include -#else -# include -#endif - -using namespace std; - -namespace Batch { - - BatchManager_ePBS::BatchManager_ePBS(const FactBatchManager * parent, const char * host, const char * protocol, const char * mpiImpl) throw(InvalidArgumentException,ConnexionFailureException) : BatchManager_eClient(parent,host,protocol,mpiImpl) - { - // Nothing to do - } - - // Destructeur - BatchManager_ePBS::~BatchManager_ePBS() - { - // Nothing to do - } - - // Methode pour le controle des jobs : soumet un job au gestionnaire - const JobId BatchManager_ePBS::submitJob(const Job & job) - { - int status; - Parametre params = job.getParametre(); - const std::string dirForTmpFiles = params[TMPDIR]; - const string fileToExecute = params[EXECUTABLE]; - string::size_type p1 = fileToExecute.find_last_of("/"); - string::size_type p2 = fileToExecute.find_last_of("."); - std::string fileNameToExecute = fileToExecute.substr(p1+1,p2-p1-1); - - // export input files on cluster - exportInputFiles(job); - - // build batch script for job - buildBatchScript(job); - - // define name of log file - string logFile="/tmp/logs/"; - logFile += getenv("USER"); - logFile += "/batchSalome_"; - srand ( time(NULL) ); - int ir = rand(); - ostringstream oss; - oss << ir; - logFile += oss.str(); - logFile += ".log"; - - string command; - - // define command to submit batch - command = _protocol; - command += " "; - - if(_username != ""){ - command += _username; - command += "@"; - } - - command += _hostname; - command += " \"cd " ; - command += dirForTmpFiles ; - command += "; qsub " ; - command += fileNameToExecute ; - command += "_Batch.sh\" > "; - command += logFile; - cerr << command.c_str() << endl; - status = system(command.c_str()); - if(status) - throw EmulationException("Error of connection on remote host"); - - // read id of submitted job in log file - char line[128]; - FILE *fp = fopen(logFile.c_str(),"r"); - fgets( line, 128, fp); - fclose(fp); - - string sline(line); - int pos = sline.find("."); - string strjob; - if(pos == string::npos) - strjob = sline; - else - strjob = sline.substr(0,pos); - - JobId id(this, strjob); - return id; - } - - // Methode pour le controle des jobs : retire un job du gestionnaire - void BatchManager_ePBS::deleteJob(const JobId & jobid) - { - int status; - int ref; - istringstream iss(jobid.getReference()); - iss >> ref; - - // define command to submit batch - string command; - command = _protocol; - command += " "; - - if (_username != ""){ - command += _username; - command += "@"; - } - - command += _hostname; - command += " \"qdel " ; - command += iss.str(); - command += "\""; - cerr << command.c_str() << endl; - status = system(command.c_str()); - if(status) - throw EmulationException("Error of connection on remote host"); - - cerr << "jobId = " << ref << "killed" << endl; - } - - // Methode pour le controle des jobs : suspend un job en file d'attente - void BatchManager_ePBS::holdJob(const JobId & jobid) - { - throw EmulationException("Not yet implemented"); - } - - // Methode pour le controle des jobs : relache un job suspendu - void BatchManager_ePBS::releaseJob(const JobId & jobid) - { - throw EmulationException("Not yet implemented"); - } - - - // Methode pour le controle des jobs : modifie un job en file d'attente - void BatchManager_ePBS::alterJob(const JobId & jobid, const Parametre & param, const Environnement & env) - { - throw EmulationException("Not yet implemented"); - } - - // Methode pour le controle des jobs : modifie un job en file d'attente - void BatchManager_ePBS::alterJob(const JobId & jobid, const Parametre & param) - { - alterJob(jobid, param, Environnement()); - } - - // Methode pour le controle des jobs : modifie un job en file d'attente - void BatchManager_ePBS::alterJob(const JobId & jobid, const Environnement & env) - { - alterJob(jobid, Parametre(), env); - } - - // Methode pour le controle des jobs : renvoie l'etat du job - JobInfo BatchManager_ePBS::queryJob(const JobId & jobid) - { - int id; - istringstream iss(jobid.getReference()); - iss >> id; - - // define name of log file - string logFile="/tmp/logs/"; - logFile += getenv("USER"); - logFile += "/batchSalome_"; - - ostringstream oss; - oss << this << "_" << id; - logFile += oss.str(); - logFile += ".log"; - - string command; - int status; - - // define command to submit batch - command = _protocol; - command += " "; - - if (_username != ""){ - command += _username; - command += "@"; - } - - command += _hostname; - command += " \"qstat -f " ; - command += iss.str(); - command += "\" > "; - command += logFile; - cerr << command.c_str() << endl; - status = system(command.c_str()); - if(status && status != 153 && status != 256*153) - throw EmulationException("Error of connection on remote host"); - - JobInfo_ePBS ji = JobInfo_ePBS(id,logFile); - return ji; - } - - // Methode pour le controle des jobs : teste si un job est present en machine - bool BatchManager_ePBS::isRunning(const JobId & jobid) - { - throw EmulationException("Not yet implemented"); - } - - void BatchManager_ePBS::buildBatchScript(const Job & job) throw(EmulationException) - { -#ifndef WIN32 //TODO: need for porting on Windows - int status; - Parametre params = job.getParametre(); - Environnement env = job.getEnvironnement(); - const long nbproc = params[NBPROC]; - const long edt = params[MAXWALLTIME]; - const long mem = params[MAXRAMSIZE]; - const string workDir = params[WORKDIR]; - const std::string dirForTmpFiles = params[TMPDIR]; - const string fileToExecute = params[EXECUTABLE]; - const string home = params[HOMEDIR]; - const std::string queue = params[QUEUE]; - std::string rootNameToExecute; - std::string fileNameToExecute; - std::string filelogtemp; - if( fileToExecute.size() > 0 ){ - string::size_type p1 = fileToExecute.find_last_of("/"); - string::size_type p2 = fileToExecute.find_last_of("."); - rootNameToExecute = fileToExecute.substr(p1+1,p2-p1-1); - char* basec=strdup(fileToExecute.c_str()); - fileNameToExecute = "~/" + dirForTmpFiles + "/" + string(basename(basec)); - free(basec); - - int idx = dirForTmpFiles.find("Batch/"); - filelogtemp = dirForTmpFiles.substr(idx+6, dirForTmpFiles.length()); - } - else{ - rootNameToExecute = "command"; - } - - std::string TmpFileName = BuildTemporaryFileName(); - ofstream tempOutputFile; - tempOutputFile.open(TmpFileName.c_str(), ofstream::out ); - - tempOutputFile << "#! /bin/sh -f" << endl; - if (queue != "") - tempOutputFile << "#BSUB -q " << queue << endl; - if( edt > 0 ) - tempOutputFile << "#PBS -l walltime=" << edt*60 << endl ; - if( mem > 0 ) - tempOutputFile << "#PBS -l mem=" << mem << "mb" << endl ; - if( fileToExecute.size() > 0 ){ - tempOutputFile << "#PBS -o " << home << "/" << dirForTmpFiles << "/output.log." << filelogtemp << endl ; - tempOutputFile << "#PBS -e " << home << "/" << dirForTmpFiles << "/error.log." << filelogtemp << endl ; - } - else{ - tempOutputFile << "#PBS -o " << dirForTmpFiles << "/" << env["LOGFILE"] << ".output.log" << endl ; - tempOutputFile << "#PBS -e " << dirForTmpFiles << "/" << env["LOGFILE"] << ".error.log" << endl ; - } - if( workDir.size() > 0 ) - tempOutputFile << "cd " << workDir << endl ; - if( fileToExecute.size() > 0 ){ - tempOutputFile << _mpiImpl->boot("${PBS_NODEFILE}",nbproc); - tempOutputFile << _mpiImpl->run("${PBS_NODEFILE}",nbproc,fileNameToExecute); - tempOutputFile << _mpiImpl->halt(); - } - else{ - tempOutputFile << "source " << env["SOURCEFILE"] << endl ; - tempOutputFile << env["COMMAND"]; - } - - tempOutputFile.flush(); - tempOutputFile.close(); -#ifdef WIN32 - _chmod( -#else - chmod( -#endif - TmpFileName.c_str(), 0x1ED); - cerr << TmpFileName.c_str() << endl; - - string command; - if( _protocol == "rsh" ) - command = "rcp "; - else if( _protocol == "ssh" ) - command = "scp "; - else - throw EmulationException("Unknown protocol"); - command += TmpFileName; - command += " "; - if(_username != ""){ - command += _username; - command += "@"; - } - command += _hostname; - command += ":"; - command += dirForTmpFiles ; - command += "/" ; - command += rootNameToExecute ; - command += "_Batch.sh" ; - cerr << command.c_str() << endl; - status = system(command.c_str()); - if(status) - throw EmulationException("Error of connection on remote host"); - - RmTmpFile(TmpFileName); -#endif - } - -} diff --git a/src/Batch/Batch_BatchManager_ePBS.hxx b/src/Batch/Batch_BatchManager_ePBS.hxx deleted file mode 100644 index 9effa53cf..000000000 --- a/src/Batch/Batch_BatchManager_ePBS.hxx +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * BatchManager_ePBS.hxx : emulation of PBS client - * - * Auteur : Bernard SECHER - CEA DEN - * Mail : mailto:bernard.secher@cea.fr - * Date : Thu Apr 24 10:17:22 2008 - * Projet : PAL Salome - * - */ - -#ifndef _BATCHMANAGER_eLSF_H_ -#define _BATCHMANAGER_eLSF_H_ - -#include "Batch_Defines.hxx" - -#include "Batch_JobId.hxx" -#include "Batch_JobInfo.hxx" -#include "Batch_JobInfo_ePBS.hxx" -#include "Batch_InvalidArgumentException.hxx" -#include "Batch_ConnexionFailureException.hxx" -#include "Batch_APIInternalFailureException.hxx" -#include "Batch_NotYetImplementedException.hxx" -#include "Batch_BatchManager.hxx" -#include "Batch_BatchManager_eClient.hxx" - -namespace Batch { - - class Job; - class JobId; - class JobInfo; - class FactBatchManager; - - class BATCH_EXPORT BatchManager_ePBS : public BatchManager_eClient - { - public: - // Constructeur et destructeur - BatchManager_ePBS(const FactBatchManager * parent, const char * host="localhost", const char * protocol="ssh", const char * mpiImpl="nompi") throw(InvalidArgumentException,ConnexionFailureException); // connexion a la machine host - virtual ~BatchManager_ePBS(); - - // Recupere le nom du serveur par defaut - // static string BatchManager_LSF::getDefaultServer(); - - // Methodes pour le controle des jobs - virtual const JobId submitJob(const Job & job); // soumet un job au gestionnaire - virtual void deleteJob(const JobId & jobid); // retire un job du gestionnaire - virtual void holdJob(const JobId & jobid); // suspend un job en file d'attente - virtual void releaseJob(const JobId & jobid); // relache un job suspendu - virtual void alterJob(const JobId & jobid, const Parametre & param, const Environnement & env); // modifie un job en file d'attente - virtual void alterJob(const JobId & jobid, const Parametre & param); // modifie un job en file d'attente - virtual void alterJob(const JobId & jobid, const Environnement & env); // modifie un job en file d'attente - virtual JobInfo queryJob(const JobId & jobid); // renvoie l'etat du job - virtual bool isRunning(const JobId & jobid); // teste si un job est present en machine - - virtual void setParametre(const JobId & jobid, const Parametre & param) { return alterJob(jobid, param); } // modifie un job en file d'attente - virtual void setEnvironnement(const JobId & jobid, const Environnement & env) { return alterJob(jobid, env); } // modifie un job en file d'attente - - - protected: - void buildBatchScript(const Job & job) throw(EmulationException); - - private: - -#ifdef SWIG - public: - // Recupere le l'identifiant d'un job deja soumis au BatchManager - //virtual const JobId getJobIdByReference(const string & ref) { return BatchManager::getJobIdByReference(ref); } - virtual const JobId getJobIdByReference(const char * ref) { return BatchManager::getJobIdByReference(ref); } -#endif - - }; - -} - -#endif diff --git a/src/Batch/Batch_BatchManager_eSGE.cxx b/src/Batch/Batch_BatchManager_eSGE.cxx deleted file mode 100644 index 56130df01..000000000 --- a/src/Batch/Batch_BatchManager_eSGE.cxx +++ /dev/null @@ -1,344 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * BatchManager_eSGE.cxx : emulation of SGE client - * - * Auteur : Bernard SECHER - CEA DEN - * Mail : mailto:bernard.secher@cea.fr - * Date : Thu Apr 24 10:17:22 2008 - * Projet : PAL Salome - * - */ - -#include -#include -#include -#include -#include "Batch_BatchManager_eSGE.hxx" -#include -#ifdef WIN32 -# include -# include -#else -#include -#endif - -using namespace std; - -namespace Batch { - - BatchManager_eSGE::BatchManager_eSGE(const FactBatchManager * parent, const char * host, const char * protocol, const char * mpiImpl) throw(InvalidArgumentException,ConnexionFailureException) : BatchManager_eClient(parent,host,protocol,mpiImpl) - { - // Nothing to do - } - - // Destructeur - BatchManager_eSGE::~BatchManager_eSGE() - { - // Nothing to do - } - - // Methode pour le controle des jobs : soumet un job au gestionnaire - const JobId BatchManager_eSGE::submitJob(const Job & job) - { - int status; - Parametre params = job.getParametre(); - const std::string dirForTmpFiles = params[TMPDIR]; - const string fileToExecute = params[EXECUTABLE]; - string::size_type p1 = fileToExecute.find_last_of("/"); - string::size_type p2 = fileToExecute.find_last_of("."); - std::string fileNameToExecute = fileToExecute.substr(p1+1,p2-p1-1); - - // export input files on cluster - exportInputFiles(job); - - // build batch script for job - buildBatchScript(job); - - // define name of log file - string logFile="/tmp/logs/"; - logFile += getenv("USER"); - logFile += "/batchSalome_"; - srand ( time(NULL) ); - int ir = rand(); - ostringstream oss; - oss << ir; - logFile += oss.str(); - logFile += ".log"; - - string command; - - // define command to submit batch - command = _protocol; - command += " "; - - if(_username != ""){ - command += _username; - command += "@"; - } - - command += _hostname; - command += " \"cd " ; - command += dirForTmpFiles ; - command += "; qsub " ; - command += fileNameToExecute ; - command += "_Batch.sh\" > "; - command += logFile; - cerr << command.c_str() << endl; - status = system(command.c_str()); - if(status) - throw EmulationException("Error of connection on remote host"); - - // read id of submitted job in log file - char line[128]; - FILE *fp = fopen(logFile.c_str(),"r"); - fgets( line, 128, fp); - fclose(fp); - - string strjob; - istringstream iss(line); - iss >> strjob >> strjob >> strjob; - - JobId id(this, strjob); - return id; - } - - // Methode pour le controle des jobs : retire un job du gestionnaire - void BatchManager_eSGE::deleteJob(const JobId & jobid) - { - int status; - int ref; - istringstream iss(jobid.getReference()); - iss >> ref; - - // define command to submit batch - string command; - command = _protocol; - command += " "; - - if (_username != ""){ - command += _username; - command += "@"; - } - - command += _hostname; - command += " \"qdel " ; - command += iss.str(); - command += "\""; - cerr << command.c_str() << endl; - status = system(command.c_str()); - if(status) - throw EmulationException("Error of connection on remote host"); - - cerr << "jobId = " << ref << "killed" << endl; - } - - // Methode pour le controle des jobs : suspend un job en file d'attente - void BatchManager_eSGE::holdJob(const JobId & jobid) - { - throw EmulationException("Not yet implemented"); - } - - // Methode pour le controle des jobs : relache un job suspendu - void BatchManager_eSGE::releaseJob(const JobId & jobid) - { - throw EmulationException("Not yet implemented"); - } - - - // Methode pour le controle des jobs : modifie un job en file d'attente - void BatchManager_eSGE::alterJob(const JobId & jobid, const Parametre & param, const Environnement & env) - { - throw EmulationException("Not yet implemented"); - } - - // Methode pour le controle des jobs : modifie un job en file d'attente - void BatchManager_eSGE::alterJob(const JobId & jobid, const Parametre & param) - { - alterJob(jobid, param, Environnement()); - } - - // Methode pour le controle des jobs : modifie un job en file d'attente - void BatchManager_eSGE::alterJob(const JobId & jobid, const Environnement & env) - { - alterJob(jobid, Parametre(), env); - } - - // Methode pour le controle des jobs : renvoie l'etat du job - JobInfo BatchManager_eSGE::queryJob(const JobId & jobid) - { - int id; - istringstream iss(jobid.getReference()); - iss >> id; - - // define name of log file - string logFile="/tmp/logs/"; - logFile += getenv("USER"); - logFile += "/batchSalome_"; - - ostringstream oss; - oss << this << "_" << id; - logFile += oss.str(); - logFile += ".log"; - - string command; - int status; - - // define command to submit batch - command = _protocol; - command += " "; - - if (_username != ""){ - command += _username; - command += "@"; - } - - command += _hostname; - command += " \"qstat | grep " ; - command += iss.str(); - command += "\" > "; - command += logFile; - cerr << command.c_str() << endl; - status = system(command.c_str()); - if(status && status != 256) - throw EmulationException("Error of connection on remote host"); - - JobInfo_eSGE ji = JobInfo_eSGE(id,logFile); - return ji; - } - - // Methode pour le controle des jobs : teste si un job est present en machine - bool BatchManager_eSGE::isRunning(const JobId & jobid) - { - throw EmulationException("Not yet implemented"); - } - - void BatchManager_eSGE::buildBatchScript(const Job & job) throw(EmulationException) - { -#ifndef WIN32 - //TODO porting on Win32 platform - int status; - Parametre params = job.getParametre(); - Environnement env = job.getEnvironnement(); - const long nbproc = params[NBPROC]; - const long edt = params[MAXWALLTIME]; - const long mem = params[MAXRAMSIZE]; - const string workDir = params[WORKDIR]; - const std::string dirForTmpFiles = params[TMPDIR]; - const string fileToExecute = params[EXECUTABLE]; - const string home = params[HOMEDIR]; - const std::string queue = params[QUEUE]; - std::string rootNameToExecute; - std::string fileNameToExecute; - std::string filelogtemp; - if( fileToExecute.size() > 0 ){ - string::size_type p1 = fileToExecute.find_last_of("/"); - string::size_type p2 = fileToExecute.find_last_of("."); - rootNameToExecute = fileToExecute.substr(p1+1,p2-p1-1); - fileNameToExecute = "~/" + dirForTmpFiles + "/" + string(basename((char *) fileToExecute.c_str())); - - int idx = dirForTmpFiles.find("Batch/"); - filelogtemp = dirForTmpFiles.substr(idx+6, dirForTmpFiles.length()); - } - else{ - rootNameToExecute = "command"; - } - - std::string TmpFileName = BuildTemporaryFileName(); - ofstream tempOutputFile; - tempOutputFile.open(TmpFileName.c_str(), ofstream::out ); - - tempOutputFile << "#! /bin/sh -f" << endl; - if (queue != "") - tempOutputFile << "#$ -q " << queue << endl; - tempOutputFile << "#$ -pe mpich " << nbproc << endl; - if( edt > 0 ) - tempOutputFile << "#$ -l h_rt=" << getWallTime(edt) << endl ; - if( mem > 0 ) - tempOutputFile << "#$ -l h_vmem=" << mem << "M" << endl ; - if( fileToExecute.size() > 0 ){ - tempOutputFile << "#$ -o " << home << "/" << dirForTmpFiles << "/output.log." << filelogtemp << endl ; - tempOutputFile << "#$ -e " << home << "/" << dirForTmpFiles << "/error.log." << filelogtemp << endl ; - } - else{ - tempOutputFile << "#$ -o " << dirForTmpFiles << "/" << env["LOGFILE"] << ".output.log" << endl ; - tempOutputFile << "#$ -e " << dirForTmpFiles << "/" << env["LOGFILE"] << ".error.log" << endl ; - } - if( workDir.size() > 0 ) - tempOutputFile << "cd " << workDir << endl ; - if( fileToExecute.size() > 0 ){ - tempOutputFile << _mpiImpl->boot("",nbproc); - tempOutputFile << _mpiImpl->run("${TMPDIR}/machines",nbproc,fileNameToExecute); - tempOutputFile << _mpiImpl->halt(); - } - else{ - tempOutputFile << "source " << env["SOURCEFILE"] << endl ; - tempOutputFile << env["COMMAND"]; - } - - tempOutputFile.flush(); - tempOutputFile.close(); - chmod(TmpFileName.c_str(), 0x1ED); - cerr << TmpFileName.c_str() << endl; - - string command; - if( _protocol == "rsh" ) - command = "rcp "; - else if( _protocol == "ssh" ) - command = "scp "; - else - throw EmulationException("Unknown protocol"); - command += TmpFileName; - command += " "; - if(_username != ""){ - command += _username; - command += "@"; - } - command += _hostname; - command += ":"; - command += dirForTmpFiles ; - command += "/" ; - command += rootNameToExecute ; - command += "_Batch.sh" ; - cerr << command.c_str() << endl; - status = system(command.c_str()); - if(status) - throw EmulationException("Error of connection on remote host"); - - RmTmpFile(TmpFileName); -#endif //WIN32 - } - - std::string BatchManager_eSGE::getWallTime(const long edt) - { - long h, m; - h = edt / 60; - m = edt - h*60; - ostringstream oss; - if( m >= 10 ) - oss << h << ":" << m; - else - oss << h << ":0" << m; - return oss.str(); - } - -} diff --git a/src/Batch/Batch_BatchManager_eSGE.hxx b/src/Batch/Batch_BatchManager_eSGE.hxx deleted file mode 100644 index c2a0fecca..000000000 --- a/src/Batch/Batch_BatchManager_eSGE.hxx +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * BatchManager_eSGE.hxx : emulation of SGE client - * - * Auteur : Bernard SECHER - CEA DEN - * Mail : mailto:bernard.secher@cea.fr - * Date : Thu Apr 24 10:17:22 2008 - * Projet : PAL Salome - * - */ - -#ifndef _BATCHMANAGER_eLSF_H_ -#define _BATCHMANAGER_eLSF_H_ - -#include "Batch_Defines.hxx" -#include "Batch_JobId.hxx" -#include "Batch_JobInfo.hxx" -#include "Batch_JobInfo_eSGE.hxx" -#include "Batch_InvalidArgumentException.hxx" -#include "Batch_ConnexionFailureException.hxx" -#include "Batch_APIInternalFailureException.hxx" -#include "Batch_NotYetImplementedException.hxx" -#include "Batch_BatchManager.hxx" -#include "Batch_BatchManager_eClient.hxx" - -namespace Batch { - - class Job; - class JobId; - class JobInfo; - class FactBatchManager; - - class BATCH_EXPORT BatchManager_eSGE : public BatchManager_eClient - { - public: - // Constructeur et destructeur - BatchManager_eSGE(const FactBatchManager * parent, const char * host="localhost", const char * protocol="ssh", const char * mpiImpl="nompi") throw(InvalidArgumentException,ConnexionFailureException); // connexion a la machine host - virtual ~BatchManager_eSGE(); - - // Recupere le nom du serveur par defaut - // static string BatchManager_LSF::getDefaultServer(); - - // Methodes pour le controle des jobs - virtual const JobId submitJob(const Job & job); // soumet un job au gestionnaire - virtual void deleteJob(const JobId & jobid); // retire un job du gestionnaire - virtual void holdJob(const JobId & jobid); // suspend un job en file d'attente - virtual void releaseJob(const JobId & jobid); // relache un job suspendu - virtual void alterJob(const JobId & jobid, const Parametre & param, const Environnement & env); // modifie un job en file d'attente - virtual void alterJob(const JobId & jobid, const Parametre & param); // modifie un job en file d'attente - virtual void alterJob(const JobId & jobid, const Environnement & env); // modifie un job en file d'attente - virtual JobInfo queryJob(const JobId & jobid); // renvoie l'etat du job - virtual bool isRunning(const JobId & jobid); // teste si un job est present en machine - - virtual void setParametre(const JobId & jobid, const Parametre & param) { return alterJob(jobid, param); } // modifie un job en file d'attente - virtual void setEnvironnement(const JobId & jobid, const Environnement & env) { return alterJob(jobid, env); } // modifie un job en file d'attente - - - protected: - void buildBatchScript(const Job & job) throw(EmulationException); - std::string getWallTime(const long edt); - - private: - -#ifdef SWIG - public: - // Recupere le l'identifiant d'un job deja soumis au BatchManager - //virtual const JobId getJobIdByReference(const string & ref) { return BatchManager::getJobIdByReference(ref); } - virtual const JobId getJobIdByReference(const char * ref) { return BatchManager::getJobIdByReference(ref); } -#endif - - }; - -} - -#endif diff --git a/src/Batch/Batch_BoolType.cxx b/src/Batch/Batch_BoolType.cxx deleted file mode 100644 index 138b4aebf..000000000 --- a/src/Batch/Batch_BoolType.cxx +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * BoolType.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2003 - * Projet : SALOME 2 - * - */ - -#include -#include -#include "Batch_BoolType.hxx" -using namespace std; - -namespace Batch { - - // Conversion en chaine - string BoolType::affiche() const - { - return _data ? string("true") : string("false"); - } - - // Operateur d'affectation - BoolType & BoolType::operator =(bool b) - { - _data = b; - return *this; - } - - // Conversion en bool - BoolType::operator bool() const - { - return this->_data; - } - - // Clone duplique l'objet et en fabrique un nouveau a l'aide de new - // qu'il faudra detruire ensuite manuellement - GenericType * BoolType::clone() const - { - BoolType * pB = new BoolType(this->_data); - assert(pB != 0); - return pB; - } - -} diff --git a/src/Batch/Batch_BoolType.hxx b/src/Batch/Batch_BoolType.hxx deleted file mode 100644 index 99e87ad99..000000000 --- a/src/Batch/Batch_BoolType.hxx +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * BoolType.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2003 - * Projet : SALOME 2 - * - */ - -#ifndef _BOOLTYPE_H_ -#define _BOOLTYPE_H_ - -#include "Batch_Defines.hxx" - -#include -#include "Batch_GenericType.hxx" - -namespace Batch { - - class BATCH_EXPORT BoolType : public GenericType - { - public: - // Constructeur - BoolType(const bool b=false) : _data(b) {} - - // Conversion en chaine - virtual std::string affiche() const; - - // Operateur d'affectation - virtual BoolType & operator =(bool); - - // Conversion en bool - virtual operator bool() const; - - // Clone duplique l'objet et en fabrique un nouveau a l'aide de new - // qu'il faudra detruire ensuite manuellement - virtual GenericType * clone() const; - - protected: - bool _data; - - private: - - }; - -} - -#endif diff --git a/src/Batch/Batch_CharType.cxx b/src/Batch/Batch_CharType.cxx deleted file mode 100644 index d1649c358..000000000 --- a/src/Batch/Batch_CharType.cxx +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * CharType.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2003 - * Projet : SALOME 2 - * - */ - -#include -#include -#include "Batch_CharType.hxx" -using namespace std; - -namespace Batch { - - // Conversion en chaine - string CharType::affiche() const - { - return string(1, _data); - } - - // Operateur d'affectation - CharType & CharType::operator =(char c) - { - _data = c; - return *this; - } - - // Conversion en char - CharType::operator char() const - { - return this->_data; - } - - // Clone duplique l'objet et en fabrique un nouveau a l'aide de new - // qu'il faudra detruire ensuite manuellement - GenericType * CharType::clone() const - { - CharType * pC = new CharType(this->_data); - assert(pC != 0); - return pC; - } - -} diff --git a/src/Batch/Batch_CharType.hxx b/src/Batch/Batch_CharType.hxx deleted file mode 100644 index 2a6afcaca..000000000 --- a/src/Batch/Batch_CharType.hxx +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * CharType.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2003 - * Projet : SALOME 2 - * - */ - -#ifndef _CHARTYPE_H_ -#define _CHARTYPE_H_ - -#include "Batch_Defines.hxx" - -#include -#include "Batch_GenericType.hxx" - -namespace Batch { - - class BATCH_EXPORT CharType : public GenericType - { - public: - // Constructeur - CharType(const char c=0) : _data(c) {} - - // Conversion en chaine - virtual std::string affiche() const; - - // Operateur d'affectation - virtual CharType & operator =(char); - - // Conversion en char - virtual operator char() const; - - // Clone duplique l'objet et en fabrique un nouveau a l'aide de new - // qu'il faudra detruire ensuite manuellement - virtual GenericType * clone() const; - - protected: - char _data; - - private: - - }; - -} - -#endif - diff --git a/src/Batch/Batch_ConnexionFailureException.cxx b/src/Batch/Batch_ConnexionFailureException.cxx deleted file mode 100644 index e1294f818..000000000 --- a/src/Batch/Batch_ConnexionFailureException.cxx +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * ConnexionFailureException.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Thu Nov 13 11:24:31 2003 - * Projet : Salome 2 - * - */ - -#include "Batch_ConnexionFailureException.hxx" -using namespace std; - -namespace Batch { - -} diff --git a/src/Batch/Batch_ConnexionFailureException.hxx b/src/Batch/Batch_ConnexionFailureException.hxx deleted file mode 100644 index 178fecd45..000000000 --- a/src/Batch/Batch_ConnexionFailureException.hxx +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * ConnexionFailureException.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Thu Nov 13 11:24:31 2003 - * Projet : Salome 2 - * - */ - -#ifndef _CONNEXIONFAILUREEXCEPTION_H_ -#define _CONNEXIONFAILUREEXCEPTION_H_ - -#include "Batch_Defines.hxx" - - -#include "Batch_GenericException.hxx" - -namespace Batch { - - class BATCH_EXPORT ConnexionFailureException : public GenericException - { - public: - // Constructeur - ConnexionFailureException(std::string ch = "undefined") : GenericException("ConnexionFailureException", ch) {} - - }; - -} - -#endif - diff --git a/src/Batch/Batch_Couple.cxx b/src/Batch/Batch_Couple.cxx deleted file mode 100644 index d70367ba7..000000000 --- a/src/Batch/Batch_Couple.cxx +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * Couple.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Tue Dec 9 15:00:35 2003 - * Projet : Salome 2 - * - */ - -#include "Batch_Couple.hxx" -using namespace std; - -namespace Batch { - - // Operateur d'affectation - Couple & Couple::operator =(const Couple & C) - { - _local = C._local; - _remote = C._remote; - return *this; - } - - // Conversion en chaine - string Couple::str() const - { - string res; - res = "Couple(local : "; - res += _local; - res += ", remote : "; - res += _remote; - res += ")"; - return res; - } - - // Operateur pour l'affichage sur un stream - ostream & operator << (ostream & os, const Couple & cp) - { - return os << cp.str(); - } - -} diff --git a/src/Batch/Batch_Couple.hxx b/src/Batch/Batch_Couple.hxx deleted file mode 100644 index 12c428a2a..000000000 --- a/src/Batch/Batch_Couple.hxx +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * Couple.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Tue Dec 9 15:00:35 2003 - * Projet : Salome 2 - * - */ - -#ifndef _COUPLE_H_ -#define _COUPLE_H_ - -#include "Batch_Defines.hxx" - -#include - -namespace Batch { - - class BATCH_EXPORT Couple - { - public: - // Constructeur standard - Couple(const std::string & local="", const std::string & remote="") : _local(local), _remote(remote) {} - - // Constructeur par recopie - Couple(const Couple & C) : _local(C._local), _remote(C._remote) {} - - // Operateur pour l'affichage sur un stream - friend std::ostream & operator << (std::ostream & os, const Couple & cp); - - // Operateur d'affectation - virtual Couple & operator =(const Couple &); - - // Conversion en chaine - virtual std::string str() const; - - // Accesseurs - virtual std::string getLocal() const { return _local; } - virtual std::string getRemote() const { return _remote; } - - protected: - std::string _local; // chemin d'acces au fichier local - std::string _remote; // chemin d'acees au fichier distant - - private: - - }; - -} - -#endif - diff --git a/src/Batch/Batch_CoupleType.cxx b/src/Batch/Batch_CoupleType.cxx deleted file mode 100644 index 2b6bfea63..000000000 --- a/src/Batch/Batch_CoupleType.cxx +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * CoupleType.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Tue Dec 9 14:51:53 2003 - * Projet : Salome 2 - * - */ - -#include -#include "Batch_CoupleType.hxx" -using namespace std; - -namespace Batch { - - // Conversion en chaine - string CoupleType::affiche() const - { - return _data.str(); - } - - // Operateur d'affectation - CoupleType & CoupleType::operator =(const Couple & C) - { - _data = C; - return *this; - } - - // Conversion en char - CoupleType::operator Couple() const - { - return _data; - } - - // Conversion en chaine - CoupleType::operator string() const - { - return _data.str(); - } - - // Clone duplique l'objet et en fabrique un nouveau a l'aide de new - // qu'il faudra detruire ensuite manuellement - GenericType * CoupleType::clone() const - { - CoupleType * pC = new CoupleType(this->_data); - assert(pC != 0); - return pC; - } - -} - diff --git a/src/Batch/Batch_CoupleType.hxx b/src/Batch/Batch_CoupleType.hxx deleted file mode 100644 index ca2e7e9b6..000000000 --- a/src/Batch/Batch_CoupleType.hxx +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * CoupleType.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Tue Dec 9 14:51:53 2003 - * Projet : Salome 2 - * - */ - -#ifndef _COUPLETYPE_H_ -#define _COUPLETYPE_H_ - -#include "Batch_Defines.hxx" - -#include -#include "Batch_GenericType.hxx" -#include "Batch_Couple.hxx" - -namespace Batch { - - class BATCH_EXPORT CoupleType : public GenericType - { - public: - // Constructeur - CoupleType(const Couple & C) : _data(C) {} - - // Conversion en chaine - virtual std::string affiche() const; - virtual operator std::string() const; - - // Operateur d'affectation - virtual CoupleType & operator =(const Couple & C); - - // Conversion en char - virtual operator Couple() const; - - // Clone duplique l'objet et en fabrique un nouveau a l'aide de new - // qu'il faudra detruire ensuite manuellement - virtual GenericType * clone() const; - - protected: - Couple _data; - - private: - - }; - -} - -#endif diff --git a/src/Batch/Batch_Date.cxx b/src/Batch/Batch_Date.cxx deleted file mode 100644 index bc99d9764..000000000 --- a/src/Batch/Batch_Date.cxx +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * Date.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Wed Nov 26 14:11:42 2003 - * Projet : Salome 2 - * - */ - -#include -#include -#include "Batch_Date.hxx" -using namespace std; - -namespace Batch { - - Date::Date(const long l) - { - time_t l_t = l; - struct tm * p_tm = localtime(&l_t); - _day = p_tm->tm_mday; - _month = p_tm->tm_mon + 1; - _year = p_tm->tm_year + 1900; - _hour = p_tm->tm_hour; - _min = p_tm->tm_min; - _sec = p_tm->tm_sec; - } - - Date::Date(const string s) - { - if ((s == "now") || (s == "Now") || (s == "NOW")) { - long l = time(0); - time_t l_t = l; - struct tm * p_tm = localtime(&l_t); - _day = p_tm->tm_mday; - _month = p_tm->tm_mon + 1; - _year = p_tm->tm_year + 1900; - _hour = p_tm->tm_hour; - _min = p_tm->tm_min; - _sec = p_tm->tm_sec; - - } else { -// char c; -// istringstream ist(s); -// ist >> _day >> c -// >> _month >> c -// >> _year >> c -// >> _hour >> c -// >> _min >> c -// >> _sec; - sscanf(s.c_str(), "%ld/%ld/%ld-%ld:%ld:%ld", &_day, &_month, &_year, &_hour, &_min, &_sec); - } - } - - Date & Date::operator =(long l) - { - time_t l_t = l; - struct tm * p_tm = localtime(&l_t); - _day = p_tm->tm_mday; - _month = p_tm->tm_mon + 1; - _year = p_tm->tm_year + 1900; - _hour = p_tm->tm_hour; - _min = p_tm->tm_min; - _sec = p_tm->tm_sec; - - return *this; - } - - Date & Date::operator +(long l) - { - *this = epoch() + l; - return *this; - } - - Date & Date::operator -(long l) - { - *this = epoch() - l; - return *this; - } - - Date & Date::operator +=(long l) - { - *this = epoch() + l; - return *this; - } - - Date & Date::operator -=(long l) - { - *this = epoch() - l; - return *this; - } - - Date & Date::operator =(const string & s) - { - if ((s == "now") || (s == "Now") || (s == "NOW")) { - long l = time(0); - time_t l_t = l; - struct tm * p_tm = localtime(&l_t); - _day = p_tm->tm_mday; - _month = p_tm->tm_mon + 1; - _year = p_tm->tm_year + 1900; - _hour = p_tm->tm_hour; - _min = p_tm->tm_min; - _sec = p_tm->tm_sec; - - } else { -// char c; -// istringstream ist(s); -// ist >> _day >> c -// >> _month >> c -// >> _year >> c -// >> _hour >> c -// >> _min >> c -// >> _sec; - sscanf(s.c_str(), "%ld/%ld/%ld-%ld:%ld:%ld", &_day, &_month, &_year, &_hour, &_min, &_sec); - } - - return *this; - } - - string Date::str() const - { - char buf[64]; - string datestr; - - // _day to char * - sprintf(buf, "%02ld", _day); - datestr += buf; - datestr += "/"; - - // _month to char * - sprintf(buf, "%02ld", _month); - datestr += buf; - datestr += "/"; - - // _year to char * - sprintf(buf, "%04ld", _year); - datestr += buf; - datestr += "-"; - - // _hour to char * - sprintf(buf, "%02ld", _hour); - datestr += buf; - datestr += ":"; - - // _min to char * - sprintf(buf, "%02ld", _min); - datestr += buf; - datestr += ":"; - - // _sec to char * - sprintf(buf, "%02ld", _sec); - datestr += buf; - - return datestr; - } - - long Date::epoch() const - { - struct tm T; - T.tm_mday = _day; - T.tm_mon = _month - 1; - T.tm_year = _year - 1900; - T.tm_hour = _hour; - T.tm_min = _min; - T.tm_sec = _sec; - return mktime(&T); - } - -} - - -// COMMENTS diff --git a/src/Batch/Batch_Date.hxx b/src/Batch/Batch_Date.hxx deleted file mode 100644 index acbe81ff3..000000000 --- a/src/Batch/Batch_Date.hxx +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * Date.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Wed Nov 26 14:11:42 2003 - * Projet : Salome 2 - * - */ - -#ifndef _DATE_H_ -#define _DATE_H_ - -#include "Batch_Defines.hxx" - -#include - -namespace Batch { - - class BATCH_EXPORT Date - { - public: - Date(const long l=0); - Date(const std::string s); - virtual Date & operator =(long l); - virtual Date & operator +(long l); - virtual Date & operator -(long l); - virtual Date & operator +=(long l); - virtual Date & operator -=(long l); - virtual Date & operator =(const std::string & s); - virtual std::string str() const; - virtual long epoch() const; - - protected: - int _day, _month, _year; - int _hour, _min, _sec; - - private: - - }; - -} - -#endif - -// COMMENTS diff --git a/src/Batch/Batch_DateType.cxx b/src/Batch/Batch_DateType.cxx deleted file mode 100644 index 43d78d966..000000000 --- a/src/Batch/Batch_DateType.cxx +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * DateType.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Wed Nov 26 11:15:34 2003 - * Projet : Salome 2 - * - */ -extern "C" { -#include -} -#include -#include "Batch_DateType.hxx" -using namespace std; - -namespace Batch { - - // Conversion en chaine - string DateType::affiche() const - { - return _data.str(); - } - - // Operateur d'affectation - DateType & DateType::operator =(const Date & d) - { - _data = d; - return *this; - } - - // Conversion en Date - DateType::operator Date() const - { - return _data; - } - - // Conversion en long - DateType::operator long() const - { - return _data.epoch(); - } - - // Clone duplique l'objet et en fabrique un nouveau a l'aide de new - // qu'il faudra detruire ensuite manuellement - GenericType * DateType::clone() const - { - DateType * pD = new DateType(this->_data); - assert(pD != 0); - return pD; - } - -} diff --git a/src/Batch/Batch_DateType.hxx b/src/Batch/Batch_DateType.hxx deleted file mode 100644 index bed284683..000000000 --- a/src/Batch/Batch_DateType.hxx +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * DateType.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Wed Nov 26 11:15:34 2003 - * Projet : Salome 2 - * - */ - -#ifndef _DATETYPE_H_ -#define _DATETYPE_H_ - -#include "Batch_Defines.hxx" - -#include -#include "Batch_GenericType.hxx" -#include "Batch_Date.hxx" - -namespace Batch { - - class BATCH_EXPORT DateType : public GenericType - { - public: - // Constructeur - DateType(const Date & d) : _data(d) {}; - - // Conversion en chaine - virtual std::string affiche() const; - - // Operateur d'affectation - virtual DateType & operator =(const Date &); - - // Conversion en Date - virtual operator Date() const; - - // Conversion en long - virtual operator long() const; - - // Clone duplique l'objet et en fabrique un nouveau a l'aide de new - // qu'il faudra detruire ensuite manuellement - virtual GenericType * clone() const; - - protected: - Date _data; - - private: - }; - -} - -#endif - diff --git a/src/Batch/Batch_Defines.hxx b/src/Batch/Batch_Defines.hxx deleted file mode 100755 index e61d83c1e..000000000 --- a/src/Batch/Batch_Defines.hxx +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -// File : Batch_Defines.hxx -// Author : Alexander A. BORODIN -// Module : SALOME -// -#ifndef _BATCH_Defines_HXX_ -#define _BATCH_Defines_HXX_ - -#ifdef WIN32 -# ifdef BATCH_EXPORTS -# define BATCH_EXPORT __declspec( dllexport ) -# else -# define BATCH_EXPORT __declspec( dllimport ) -# endif -# define RM "rm" -# define RCP "rpc" -# define RSH "rsh" -#else -# define BATCH_EXPORT -#endif - -#endif diff --git a/src/Batch/Batch_Environnement.cxx b/src/Batch/Batch_Environnement.cxx deleted file mode 100644 index f74b03025..000000000 --- a/src/Batch/Batch_Environnement.cxx +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * Environnement.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Thu Oct 16 11:37:47 2003 - * Projet : Salome 2 - * - */ - -#include "Batch_Environnement.hxx" -using namespace std; - -namespace Batch { - - -} diff --git a/src/Batch/Batch_Environnement.hxx b/src/Batch/Batch_Environnement.hxx deleted file mode 100644 index 354be1b1a..000000000 --- a/src/Batch/Batch_Environnement.hxx +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * Environnement.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Thu Oct 16 11:37:47 2003 - * Projet : Salome 2 - * - */ - -#ifndef _ENVIRONNEMENT_H_ -#define _ENVIRONNEMENT_H_ - -#include "Batch_Defines.hxx" - - -#include -#include - -namespace Batch { - - typedef std::map < std::string, std::string > Environnement; - -} - -#endif - diff --git a/src/Batch/Batch_FactBatchManager.cxx b/src/Batch/Batch_FactBatchManager.cxx deleted file mode 100644 index 0adc4e7d0..000000000 --- a/src/Batch/Batch_FactBatchManager.cxx +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * FactBatchManager.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2004 - * Projet : SALOME 2 - * - */ - -#include -#include -#include -#include "Batch_BatchManagerCatalog.hxx" -#include "Batch_FactBatchManager.hxx" -using namespace std; - -namespace Batch { - - // Constructeur - FactBatchManager::FactBatchManager(const string & _t) : type(_t) - { - BatchManagerCatalog::addFactBatchManager(type.c_str(), this); - ostringstream msg; - msg << "FactBatchManager of type '" << type << "' inserted into catalog"; - cerr << msg.str().c_str() << endl; - } - - // Destructeur - FactBatchManager::~FactBatchManager() - { - // Nothing to do - } - - // Accesseur - string FactBatchManager::getType() const - { - return type; - } - - string FactBatchManager::__repr__() const - { - ostringstream oss; - oss << ""; - return oss.str(); - } - -} diff --git a/src/Batch/Batch_FactBatchManager.hxx b/src/Batch/Batch_FactBatchManager.hxx deleted file mode 100644 index 6b73b0159..000000000 --- a/src/Batch/Batch_FactBatchManager.hxx +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * FactBatchManager.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2004 - * Projet : SALOME 2 - * - */ - -#ifndef _FACTBATCHMANAGER_H_ -#define _FACTBATCHMANAGER_H_ - -#include "Batch_Defines.hxx" - -#include -#include - -namespace Batch { - - class BatchManager; - - class BATCH_EXPORT FactBatchManager - { - public: - // Constructeur et destructeur - FactBatchManager(const std::string & type); - virtual ~FactBatchManager(); - - virtual Batch::BatchManager * operator() (const char * hostname) const = 0; - std::string getType() const; - std::string __repr__() const; - - protected: - std::string type; - - private: - - }; - -} - -#endif diff --git a/src/Batch/Batch_FactBatchManager_LSF.cxx b/src/Batch/Batch_FactBatchManager_LSF.cxx deleted file mode 100644 index 6149947ff..000000000 --- a/src/Batch/Batch_FactBatchManager_LSF.cxx +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * FactBatchManager_LSF.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2004 - * Projet : SALOME 2 - * - */ - -#include -#include "Batch_BatchManager_LSF.hxx" -#include "Batch_FactBatchManager_LSF.hxx" -//#include "utilities.h" - -namespace Batch { - - static FactBatchManager_LSF sFBM_LSF; - - // Constructeur - FactBatchManager_LSF::FactBatchManager_LSF() : FactBatchManager("LSF") - { - // Nothing to do - } - - // Destructeur - FactBatchManager_LSF::~FactBatchManager_LSF() - { - // Nothing to do - } - - // Functor - BatchManager * FactBatchManager_LSF::operator() (const char * hostname) const - { - // MESSAGE("Building new BatchManager_LSF on host '" << hostname << "'"); - return new BatchManager_LSF(this, hostname); - } - - -} diff --git a/src/Batch/Batch_FactBatchManager_LSF.hxx b/src/Batch/Batch_FactBatchManager_LSF.hxx deleted file mode 100644 index 59ef2ad4f..000000000 --- a/src/Batch/Batch_FactBatchManager_LSF.hxx +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * FactBatchManager_LSF.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2004 - * Projet : SALOME 2 - * - */ - -#ifndef _FACTBATCHMANAGER_LSF_H_ -#define _FACTBATCHMANAGER_LSF_H_ - -#include "Batch_FactBatchManager.hxx" - -namespace Batch { - - class BatchManager_LSF; - - class FactBatchManager_LSF : public FactBatchManager - { - public: - // Constructeur et destructeur - FactBatchManager_LSF(); - virtual ~FactBatchManager_LSF(); - - virtual BatchManager * operator() (const char * hostname) const; - - protected: - - private: - - }; - -} - -#endif diff --git a/src/Batch/Batch_FactBatchManager_Local.cxx b/src/Batch/Batch_FactBatchManager_Local.cxx deleted file mode 100644 index 46fb1302f..000000000 --- a/src/Batch/Batch_FactBatchManager_Local.cxx +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * FactBatchManager_Local.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2004 - * Projet : SALOME 2 - * - */ - -#include -#include "Batch_BatchManager_Local.hxx" -#include "Batch_FactBatchManager_Local.hxx" -//#include "utilities.h" - -namespace Batch { - -// static FactBatchManager_Local sFBM_Local; - - // Constructeur - FactBatchManager_Local::FactBatchManager_Local() : FactBatchManager("Local") - { - // Nothing to do - } - - // Destructeur - FactBatchManager_Local::~FactBatchManager_Local() - { - // Nothing to do - } - - // Functor -// BatchManager * FactBatchManager_Local::operator() (const char * hostname) const -// { -// // MESSAGE("Building new BatchManager_Local on host '" << hostname << "'"); -// return new BatchManager_Local(this, hostname); -// } - - -} diff --git a/src/Batch/Batch_FactBatchManager_Local.hxx b/src/Batch/Batch_FactBatchManager_Local.hxx deleted file mode 100644 index 4b2f0d497..000000000 --- a/src/Batch/Batch_FactBatchManager_Local.hxx +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * FactBatchManager_Local.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2004 - * Projet : SALOME 2 - * - */ - -#ifndef _FACTBATCHMANAGER_LOCAL_H_ -#define _FACTBATCHMANAGER_LOCAL_H_ - -#include "Batch_FactBatchManager.hxx" - -namespace Batch { - - class BatchManager_Local; - - class FactBatchManager_Local : public FactBatchManager - { - public: - // Constructeur et destructeur - FactBatchManager_Local(); - virtual ~FactBatchManager_Local(); - - virtual BatchManager * operator() (const char * hostname) const = 0; - - protected: - - private: - - }; - -} - -#endif diff --git a/src/Batch/Batch_FactBatchManager_Local_RSH.cxx b/src/Batch/Batch_FactBatchManager_Local_RSH.cxx deleted file mode 100644 index e52954fd0..000000000 --- a/src/Batch/Batch_FactBatchManager_Local_RSH.cxx +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * FactBatchManager_Local_RSH.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2004 - * Projet : SALOME 2 - * - */ - -#include -#include "Batch_BatchManager_Local_RSH.hxx" -#include "Batch_FactBatchManager_Local_RSH.hxx" -//#include "utilities.h" - -namespace Batch { - - static FactBatchManager_Local_RSH* instanceOfFBM_eLSF() - { - static FactBatchManager_Local_RSH* sFBM_Local_RSH = 0; - if ( !sFBM_Local_RSH ) - sFBM_Local_RSH = new FactBatchManager_Local_RSH(); - - return sFBM_Local_RSH; - } - - // Constructeur - FactBatchManager_Local_RSH::FactBatchManager_Local_RSH() : FactBatchManager("RSH") - { - // Nothing to do - } - - // Destructeur - FactBatchManager_Local_RSH::~FactBatchManager_Local_RSH() - { - // Nothing to do - } - - // Functor - BatchManager * FactBatchManager_Local_RSH::operator() (const char * hostname) const - { - // MESSAGE("Building new BatchManager_Local_RSH on host '" << hostname << "'"); - return new BatchManager_Local_RSH(this, hostname); - } - - -} diff --git a/src/Batch/Batch_FactBatchManager_Local_RSH.hxx b/src/Batch/Batch_FactBatchManager_Local_RSH.hxx deleted file mode 100644 index 8b11c5d00..000000000 --- a/src/Batch/Batch_FactBatchManager_Local_RSH.hxx +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * FactBatchManager_Local_RSH.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2004 - * Projet : SALOME 2 - * - */ - -#ifndef _FACTBATCHMANAGER_LOCAL_RSH_H_ -#define _FACTBATCHMANAGER_LOCAL_RSH_H_ - -#include "Batch_FactBatchManager.hxx" - -namespace Batch { - - class BatchManager_Local_RSH; - - class FactBatchManager_Local_RSH : public FactBatchManager - { - public: - // Constructeur et destructeur - FactBatchManager_Local_RSH(); - virtual ~FactBatchManager_Local_RSH(); - - virtual BatchManager * operator() (const char * hostname) const; - - protected: - - private: - - }; - -} - -#endif diff --git a/src/Batch/Batch_FactBatchManager_Local_SH.cxx b/src/Batch/Batch_FactBatchManager_Local_SH.cxx deleted file mode 100644 index a317e3c5a..000000000 --- a/src/Batch/Batch_FactBatchManager_Local_SH.cxx +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * FactBatchManager_Local_SH.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2004 - * Projet : SALOME 2 - * - */ - -#include -#include "Batch_BatchManager_Local_SH.hxx" -#include "Batch_FactBatchManager_Local_SH.hxx" -//#include "utilities.h" - -namespace Batch { - - static FactBatchManager_Local_SH sFBM_Local_SH; - - // Constructeur - FactBatchManager_Local_SH::FactBatchManager_Local_SH() : FactBatchManager("SH") - { - // Nothing to do - } - - // Destructeur - FactBatchManager_Local_SH::~FactBatchManager_Local_SH() - { - // Nothing to do - } - - // Functor - BatchManager * FactBatchManager_Local_SH::operator() (const char * hostname) const - { - // MESSAGE("Building new BatchManager_Local_SH on host '" << hostname << "'"); - return new BatchManager_Local_SH(this, hostname); - } - - -} diff --git a/src/Batch/Batch_FactBatchManager_Local_SH.hxx b/src/Batch/Batch_FactBatchManager_Local_SH.hxx deleted file mode 100644 index 499eafef4..000000000 --- a/src/Batch/Batch_FactBatchManager_Local_SH.hxx +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * FactBatchManager_Local_SH.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2004 - * Projet : SALOME 2 - * - */ - -#ifndef _FACTBATCHMANAGER_LOCAL_SH_H_ -#define _FACTBATCHMANAGER_LOCAL_SH_H_ - -#include "Batch_FactBatchManager.hxx" - -namespace Batch { - - class BatchManager_Local_SH; - - class FactBatchManager_Local_SH : public FactBatchManager - { - public: - // Constructeur et destructeur - FactBatchManager_Local_SH(); - virtual ~FactBatchManager_Local_SH(); - - virtual BatchManager * operator() (const char * hostname) const; - - protected: - - private: - - }; - -} - -#endif diff --git a/src/Batch/Batch_FactBatchManager_Local_SSH.cxx b/src/Batch/Batch_FactBatchManager_Local_SSH.cxx deleted file mode 100644 index d96237451..000000000 --- a/src/Batch/Batch_FactBatchManager_Local_SSH.cxx +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * FactBatchManager_Local_SSH.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2004 - * Projet : SALOME 2 - * - */ - -#include -#include "Batch_BatchManager_Local_SSH.hxx" -#include "Batch_FactBatchManager_Local_SSH.hxx" -//#include "utilities.h" - -namespace Batch { - - static FactBatchManager_Local_SSH sFBM_Local_SSH; - - // Constructeur - FactBatchManager_Local_SSH::FactBatchManager_Local_SSH() : FactBatchManager("SSH") - { - // Nothing to do - } - - // Destructeur - FactBatchManager_Local_SSH::~FactBatchManager_Local_SSH() - { - // Nothing to do - } - - // Functor - BatchManager * FactBatchManager_Local_SSH::operator() (const char * hostname) const - { - // MESSAGE("Building new BatchManager_Local_SSH on host '" << hostname << "'"); - return new BatchManager_Local_SSH(this, hostname); - } - - -} diff --git a/src/Batch/Batch_FactBatchManager_Local_SSH.hxx b/src/Batch/Batch_FactBatchManager_Local_SSH.hxx deleted file mode 100644 index 7f64f0e26..000000000 --- a/src/Batch/Batch_FactBatchManager_Local_SSH.hxx +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * FactBatchManager_Local_SSH.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2004 - * Projet : SALOME 2 - * - */ - -#ifndef _FACTBATCHMANAGER_LOCAL_SSH_H_ -#define _FACTBATCHMANAGER_LOCAL_SSH_H_ - -#include "Batch_FactBatchManager.hxx" - -namespace Batch { - - class BatchManager_Local_SSH; - - class FactBatchManager_Local_SSH : public FactBatchManager - { - public: - // Constructeur et destructeur - FactBatchManager_Local_SSH(); - virtual ~FactBatchManager_Local_SSH(); - - virtual BatchManager * operator() (const char * hostname) const; - - protected: - - private: - - }; - -} - -#endif diff --git a/src/Batch/Batch_FactBatchManager_PBS.cxx b/src/Batch/Batch_FactBatchManager_PBS.cxx deleted file mode 100644 index 43c79e213..000000000 --- a/src/Batch/Batch_FactBatchManager_PBS.cxx +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * FactBatchManager_PBS.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2004 - * Projet : SALOME 2 - * - */ - -#include "Batch_BatchManager_PBS.hxx" -#include "Batch_FactBatchManager_PBS.hxx" -using namespace std; - -namespace Batch { - - static FactBatchManager_PBS sFBM_PBS; - - // Constructeur - FactBatchManager_PBS::FactBatchManager_PBS() : FactBatchManager("PBS") - { - // Nothing to do - } - - // Destructeur - FactBatchManager_PBS::~FactBatchManager_PBS() - { - // Nothing to do - } - - // Functor - BatchManager * FactBatchManager_PBS::operator() (const char * hostname) const - { - return new BatchManager_PBS(this, hostname); - } - - -} diff --git a/src/Batch/Batch_FactBatchManager_PBS.hxx b/src/Batch/Batch_FactBatchManager_PBS.hxx deleted file mode 100644 index cc43b6e2d..000000000 --- a/src/Batch/Batch_FactBatchManager_PBS.hxx +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * FactBatchManager_PBS.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2004 - * Projet : SALOME 2 - * - */ - -#ifndef _FACTBATCHMANAGER_PBS_H_ -#define _FACTBATCHMANAGER_PBS_H_ - -#include "Batch_FactBatchManager.hxx" - -namespace Batch { - - class BatchManager_PBS; - - class FactBatchManager_PBS : public FactBatchManager - { - public: - // Constructeur et destructeur - FactBatchManager_PBS(); - virtual ~FactBatchManager_PBS(); - - virtual BatchManager * operator() (const char * hostname) const; - - protected: - - private: - - }; - -} - -#endif diff --git a/src/Batch/Batch_FactBatchManager_eClient.cxx b/src/Batch/Batch_FactBatchManager_eClient.cxx deleted file mode 100644 index 528bed807..000000000 --- a/src/Batch/Batch_FactBatchManager_eClient.cxx +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * FactBatchManager_eClient.cxx : emulation of client - * - * Auteur : Bernard SECHER - CEA DEN - * Mail : mailto:bernard.secher@cea.fr - * Date : Thu Apr 24 10:17:22 2008 - * Projet : PAL Salome - * - */ - -#include -#include -#include "Batch_FactBatchManager_eClient.hxx" -using namespace std; - -namespace Batch { - - // Constructeur - FactBatchManager_eClient::FactBatchManager_eClient(const string & _t) : FactBatchManager(_t) - { - } - - // Destructeur - FactBatchManager_eClient::~FactBatchManager_eClient() - { - // Nothing to do - } - -} diff --git a/src/Batch/Batch_FactBatchManager_eClient.hxx b/src/Batch/Batch_FactBatchManager_eClient.hxx deleted file mode 100644 index 82192d714..000000000 --- a/src/Batch/Batch_FactBatchManager_eClient.hxx +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * FactBatchManager_eClient.hxx : emulation of client - * - * Auteur : Bernard SECHER - CEA DEN - * Mail : mailto:bernard.secher@cea.fr - * Date : Thu Apr 24 10:17:22 2008 - * Projet : PAL Salome - * - */ - -#ifndef _FACTBATCHMANAGER_eClient_H_ -#define _FACTBATCHMANAGER_eClient_H_ - -#include -#include -#include "Batch_FactBatchManager.hxx" - -namespace Batch { - - class BatchManager_eClient; - - class FactBatchManager_eClient : public FactBatchManager - { - public: - // Constructeur et destructeur - FactBatchManager_eClient(const std::string & type); - virtual ~FactBatchManager_eClient(); - - virtual Batch::BatchManager_eClient * operator() (const char * hostname,const char * protocol, const char * mpi) const = 0; - - protected: - - private: - - }; - -} - -#endif diff --git a/src/Batch/Batch_FactBatchManager_eLSF.cxx b/src/Batch/Batch_FactBatchManager_eLSF.cxx deleted file mode 100644 index b21c36598..000000000 --- a/src/Batch/Batch_FactBatchManager_eLSF.cxx +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * FactBatchManager_eLSF.cxx : - * - * Auteur : Bernard SECHER - CEA DEN - * Date : Avril 2008 - * Projet : PAL Salome - * - */ - -#include -#include "Batch_BatchManager_eLSF.hxx" -#include "Batch_FactBatchManager_eLSF.hxx" -//#include "utilities.h" - -namespace Batch { - -static FactBatchManager_eLSF* instanceOfFBM_eLSF() -{ - static FactBatchManager_eLSF* sFBM_eLSF = 0; - if ( !sFBM_eLSF ) - sFBM_eLSF = new FactBatchManager_eLSF(); - - return sFBM_eLSF; -} - - - // Constructeur - FactBatchManager_eLSF::FactBatchManager_eLSF() : FactBatchManager_eClient("eLSF") - { - // Nothing to do - } - - // Destructeur - FactBatchManager_eLSF::~FactBatchManager_eLSF() - { - // Nothing to do - } - - // Functor - BatchManager * FactBatchManager_eLSF::operator() (const char * hostname) const - { - // MESSAGE("Building new BatchManager_LSF on host '" << hostname << "'"); - return new BatchManager_eLSF(this, hostname); - } - - BatchManager_eClient * FactBatchManager_eLSF::operator() (const char * hostname, const char * protocol, const char * mpiImpl) const - { - // MESSAGE("Building new BatchManager_LSF on host '" << hostname << "'"); - return new BatchManager_eLSF(this, hostname, protocol, mpiImpl); - } - -} diff --git a/src/Batch/Batch_FactBatchManager_eLSF.hxx b/src/Batch/Batch_FactBatchManager_eLSF.hxx deleted file mode 100644 index d2dec68b1..000000000 --- a/src/Batch/Batch_FactBatchManager_eLSF.hxx +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * FactBatchManager_eLSF.hxx : - * - * Auteur : Bernard SECHER : CEA DEN - * Date : Avril 2008 - * Projet : PAL Salome - * - */ - -#ifndef _FACTBATCHMANAGER_eLSF_H_ -#define _FACTBATCHMANAGER_eLSF_H_ - -#include "Batch_Defines.hxx" - -#include -#include -#include "Batch_BatchManager_eClient.hxx" -#include "Batch_FactBatchManager_eClient.hxx" - -namespace Batch { - - class BatchManager_eLSF; - - class BATCH_EXPORT FactBatchManager_eLSF : public FactBatchManager_eClient - { - public: - // Constructeur et destructeur - FactBatchManager_eLSF(); - virtual ~FactBatchManager_eLSF(); - - virtual BatchManager * operator() (const char * hostname) const; - virtual BatchManager_eClient * operator() (const char * hostname, const char * protocol, const char * mpiImpl) const; - - protected: - - private: - - }; - -} - -#endif diff --git a/src/Batch/Batch_FactBatchManager_ePBS.cxx b/src/Batch/Batch_FactBatchManager_ePBS.cxx deleted file mode 100644 index e5745b2fc..000000000 --- a/src/Batch/Batch_FactBatchManager_ePBS.cxx +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * FactBatchManager_ePBS.cxx : - * - * Auteur : Bernard SECHER - CEA DEN - * Date : Avril 2008 - * Projet : PAL Salome - * - */ - -#include -#include "Batch_BatchManager_ePBS.hxx" -#include "Batch_FactBatchManager_ePBS.hxx" -//#include "utilities.h" - -namespace Batch { - - static FactBatchManager_ePBS* instanceOfFBM_eLSF() - { - static FactBatchManager_ePBS* sFBM_ePBS = 0; - if ( !sFBM_ePBS ) - sFBM_ePBS = new FactBatchManager_ePBS(); - - return sFBM_ePBS; - } - - // Constructeur - FactBatchManager_ePBS::FactBatchManager_ePBS() : FactBatchManager_eClient("ePBS") - { - // Nothing to do - } - - // Destructeur - FactBatchManager_ePBS::~FactBatchManager_ePBS() - { - // Nothing to do - } - - // Functor - BatchManager * FactBatchManager_ePBS::operator() (const char * hostname) const - { - // MESSAGE("Building new BatchManager_PBS on host '" << hostname << "'"); - return new BatchManager_ePBS(this, hostname); - } - - BatchManager_eClient * FactBatchManager_ePBS::operator() (const char * hostname, const char * protocol, const char * mpiImpl) const - { - // MESSAGE("Building new BatchManager_PBS on host '" << hostname << "'"); - return new BatchManager_ePBS(this, hostname, protocol, mpiImpl); - } - - -} diff --git a/src/Batch/Batch_FactBatchManager_ePBS.hxx b/src/Batch/Batch_FactBatchManager_ePBS.hxx deleted file mode 100644 index 027e9ed62..000000000 --- a/src/Batch/Batch_FactBatchManager_ePBS.hxx +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * FactBatchManager_ePBS.hxx : - * - * Auteur : Bernard SECHER : CEA DEN - * Date : Avril 2008 - * Projet : PAL Salome - * - */ - -#ifndef _FACTBATCHMANAGER_ePBS_H_ -#define _FACTBATCHMANAGER_ePBS_H_ - -#include "Batch_Defines.hxx" - -#include -#include -#include "Batch_BatchManager_eClient.hxx" -#include "Batch_FactBatchManager_eClient.hxx" - -namespace Batch { - - class BatchManager_ePBS; - - class BATCH_EXPORT FactBatchManager_ePBS : public FactBatchManager_eClient - { - public: - // Constructeur et destructeur - FactBatchManager_ePBS(); - virtual ~FactBatchManager_ePBS(); - - virtual BatchManager * operator() (const char * hostname) const; - virtual BatchManager_eClient * operator() (const char * hostname, const char * protocol, const char * mpiImpl) const; - - protected: - - private: - - }; - -} - -#endif diff --git a/src/Batch/Batch_FactBatchManager_eSGE.cxx b/src/Batch/Batch_FactBatchManager_eSGE.cxx deleted file mode 100644 index c7a6c9f90..000000000 --- a/src/Batch/Batch_FactBatchManager_eSGE.cxx +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * FactBatchManager_eSGE.cxx : - * - * Auteur : Bernard SECHER - CEA DEN - * Date : Avril 2008 - * Projet : PAL Salome - * - */ - -#include -#include "Batch_BatchManager_eSGE.hxx" -#include "Batch_FactBatchManager_eSGE.hxx" -//#include "utilities.h" - -namespace Batch { - - static FactBatchManager_eSGE sFBM_eSGE; - - // Constructeur - FactBatchManager_eSGE::FactBatchManager_eSGE() : FactBatchManager_eClient("eSGE") - { - // Nothing to do - } - - // Destructeur - FactBatchManager_eSGE::~FactBatchManager_eSGE() - { - // Nothing to do - } - - // Functor - BatchManager * FactBatchManager_eSGE::operator() (const char * hostname) const - { - // MESSAGE("Building new BatchManager_SGE on host '" << hostname << "'"); - return new BatchManager_eSGE(this, hostname); - } - - BatchManager_eClient * FactBatchManager_eSGE::operator() (const char * hostname, const char * protocol, const char * mpiImpl) const - { - // MESSAGE("Building new BatchManager_SGE on host '" << hostname << "'"); - return new BatchManager_eSGE(this, hostname, protocol, mpiImpl); - } - - -} diff --git a/src/Batch/Batch_FactBatchManager_eSGE.hxx b/src/Batch/Batch_FactBatchManager_eSGE.hxx deleted file mode 100644 index 44f7f6ce0..000000000 --- a/src/Batch/Batch_FactBatchManager_eSGE.hxx +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * FactBatchManager_eSGE.hxx : - * - * Auteur : Bernard SECHER : CEA DEN - * Date : Avril 2008 - * Projet : PAL Salome - * - */ - -#ifndef _FACTBATCHMANAGER_eSGE_H_ -#define _FACTBATCHMANAGER_eSGE_H_ - -#include "Batch_Defines.hxx" - -#include "Batch_BatchManager_eClient.hxx" -#include "Batch_FactBatchManager_eClient.hxx" - -namespace Batch { - - class BatchManager_eSGE; - - class BATCH_EXPORT FactBatchManager_eSGE : public FactBatchManager_eClient - { - public: - // Constructeur et destructeur - FactBatchManager_eSGE(); - virtual ~FactBatchManager_eSGE(); - - virtual BatchManager * operator() (const char * hostname) const; - virtual BatchManager_eClient * operator() (const char * hostname, const char * protocol, const char * mpiImpl) const; - - protected: - - private: - - }; - -} - -#endif diff --git a/src/Batch/Batch_GenericException.cxx b/src/Batch/Batch_GenericException.cxx deleted file mode 100644 index 4303e1c57..000000000 --- a/src/Batch/Batch_GenericException.cxx +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * GenericException.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Wed Nov 26 10:15:57 2003 - * Projet : Salome 2 - * - */ - -#include "Batch_GenericException.hxx" -using namespace std; - -namespace Batch { - -} diff --git a/src/Batch/Batch_GenericException.hxx b/src/Batch/Batch_GenericException.hxx deleted file mode 100644 index ed80ab193..000000000 --- a/src/Batch/Batch_GenericException.hxx +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * GenericException.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Wed Nov 26 10:15:56 2003 - * Projet : Salome 2 - * - */ - -#ifndef _GENERICEXCEPTION_H_ -#define _GENERICEXCEPTION_H_ - -#include "Batch_Defines.hxx" - - -#include - -namespace Batch { - - class BATCH_EXPORT GenericException - { - public: - const std::string type; // la nature de l'exception - const std::string message; // la raison de l'exception - - // Constructeur - GenericException(const std::string tp = "GenericException", const std::string ch = "undefined") : type(tp), message(ch) {} - }; - -} - -#endif diff --git a/src/Batch/Batch_GenericType.cxx b/src/Batch/Batch_GenericType.cxx deleted file mode 100644 index 95a5a16a2..000000000 --- a/src/Batch/Batch_GenericType.cxx +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * GenericType.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2003 - * Projet : SALOME 2 - * - */ - - -#include -#include -#include -#include "Batch_GenericType.hxx" -using namespace std; - -namespace Batch { - - // nombre total d'objet GenericType et al. - int GenericType::_nb = 0; - - // Operateur pour l'affichage sur un stream - ostream & operator << (ostream & os, const GenericType & obj) - { - return os << obj.affiche(); - } - - // Conversion en chaine - string GenericType::affiche() const - { - return string("(GenericType : si ce message apparait, vous devez avoir un probleme)"); - } - - // Clone duplique l'objet et en fabrique un nouveau a l'aide de new - // qu'il faudra detruire ensuite manuellement - GenericType * GenericType::clone() const - { - GenericType * pG = new GenericType; - assert(pG != 0); - return pG; - } - -} - diff --git a/src/Batch/Batch_GenericType.hxx b/src/Batch/Batch_GenericType.hxx deleted file mode 100644 index 613d1f5ff..000000000 --- a/src/Batch/Batch_GenericType.hxx +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * GenericType.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2003 - * Projet : SALOME 2 - * - */ - -#ifndef _GENERICTYPE_H_ -#define _GENERICTYPE_H_ - -#include "Batch_Defines.hxx" - - -#include -#include - -namespace Batch { - - class BATCH_EXPORT GenericType - { - public: - // Constructeur et destructeur - GenericType() { _nb++; } - virtual ~GenericType() { _nb--; } - - // Operateur pour l'affichage sur un stream - friend std::ostream & operator << (std::ostream & os, const GenericType & obj); - - // Conversion en chaine - virtual std::string affiche() const; - - // Clone duplique l'objet et en fabrique un nouveau a l'aide de new - // qu'il faudra detruire ensuite manuellement - virtual GenericType * clone() const; - - // Retourne le nombre d'objets GenericType et al. - static int getNb() { return _nb; } - - protected: - - private: - static int _nb; // nombre total d'objets GenericType et al. - - }; - -} - -#endif - diff --git a/src/Batch/Batch_IOMutex.cxx b/src/Batch/Batch_IOMutex.cxx deleted file mode 100644 index 06a9f7e84..000000000 --- a/src/Batch/Batch_IOMutex.cxx +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * IOMutex.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Fri Nov 14 11:00:39 2003 - * Projet : Salome 2 - * - */ - -#include "Batch_IOMutex.hxx" - -namespace Batch { - - pthread_mutex_t IOMutex = PTHREAD_MUTEX_INITIALIZER; - -} diff --git a/src/Batch/Batch_IOMutex.hxx b/src/Batch/Batch_IOMutex.hxx deleted file mode 100644 index a047b380f..000000000 --- a/src/Batch/Batch_IOMutex.hxx +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * IOMutex.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Fri Nov 14 11:00:39 2003 - * Projet : Salome 2 - * - */ - -#ifndef _IOMUTEX_H_ -#define _IOMUTEX_H_ - -#include - -#define LOCK_IO { pthread_mutex_lock(&Batch::IOMutex) ; } -#define UNLOCK_IO { pthread_mutex_unlock(&Batch::IOMutex) ; } -#define UNDER_LOCK(statement) { LOCK_IO ; { statement ; } ; UNLOCK_IO ; } - -namespace Batch { - - extern pthread_mutex_t IOMutex; - -} - -#endif diff --git a/src/Batch/Batch_IntType.cxx b/src/Batch/Batch_IntType.cxx deleted file mode 100644 index aa704ef27..000000000 --- a/src/Batch/Batch_IntType.cxx +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * IntType.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2003 - * Projet : SALOME 2 - * - */ - -#include -#include -#include -//#include "MEDMEM_STRING.hxx" -#include "Batch_IntType.hxx" -using namespace std; - - -namespace Batch { - - // Conversion en chaine - string IntType::affiche() const - { - //MEDMEM::STRING sst; - ostringstream sst; - sst << _data; - return sst.str(); - } - - // Operateur d'affectation - IntType & IntType::operator =(int i) - { - _data = i; - return *this; - } - - // Conversion en int - IntType::operator int() const - { - return this->_data; - } - - // Clone duplique l'objet et en fabrique un nouveau a l'aide de new - // qu'il faudra detruire ensuite manuellement - GenericType * IntType::clone() const - { - IntType * pI = new IntType(this->_data); - assert(pI != 0); - return pI; - } - -} diff --git a/src/Batch/Batch_IntType.hxx b/src/Batch/Batch_IntType.hxx deleted file mode 100644 index 79db3b734..000000000 --- a/src/Batch/Batch_IntType.hxx +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * IntType.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2003 - * Projet : SALOME 2 - * - */ - -#ifndef _INTTYPE_H_ -#define _INTTYPE_H_ - -#include "Batch_Defines.hxx" - -#include -#include "Batch_GenericType.hxx" - -namespace Batch { - - class BATCH_EXPORT IntType : public GenericType - { - public: - // Constructeur - IntType(const int i=0) : _data(i) {} - - // Conversion en chaine - virtual std::string affiche() const; - - // Operateur d'affectation - virtual IntType & operator =(int); - - // Conversion en int - virtual operator int() const; - - // Clone duplique l'objet et en fabrique un nouveau a l'aide de new - // qu'il faudra detruire ensuite manuellement - virtual GenericType * clone() const; - - protected: - int _data; - - private: - - }; - -} - -#endif diff --git a/src/Batch/Batch_InvalidArgumentException.cxx b/src/Batch/Batch_InvalidArgumentException.cxx deleted file mode 100644 index b57b83453..000000000 --- a/src/Batch/Batch_InvalidArgumentException.cxx +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * InvalidArgumentException.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Thu Oct 16 16:18:00 2003 - * Projet : Salome 2 - * - */ - -#include "Batch_InvalidArgumentException.hxx" -using namespace std; - -namespace Batch { - -} diff --git a/src/Batch/Batch_InvalidArgumentException.hxx b/src/Batch/Batch_InvalidArgumentException.hxx deleted file mode 100644 index b8dd07289..000000000 --- a/src/Batch/Batch_InvalidArgumentException.hxx +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * InvalidArgumentException.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Thu Oct 16 16:18:00 2003 - * Projet : Salome 2 - * - */ - -#ifndef _INVALIDARGUMENTEXCEPTION_H_ -#define _INVALIDARGUMENTEXCEPTION_H_ - - -#include "Batch_Defines.hxx" - -#include "Batch_GenericException.hxx" -#include "Batch_GenericException.hxx" - -namespace Batch { - - class BATCH_EXPORT InvalidArgumentException : public GenericException - { - public: - // Constructeur - InvalidArgumentException(std::string ch = "undefined") : GenericException("InvalidArgumentException", ch) {} - }; - -} - -#endif - diff --git a/src/Batch/Batch_InvalidKeyException.cxx b/src/Batch/Batch_InvalidKeyException.cxx deleted file mode 100644 index 2daaabfd1..000000000 --- a/src/Batch/Batch_InvalidKeyException.cxx +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * InvalidKeyException.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Wed Oct 15 10:39:51 2003 - * Projet : Salome 2 - * - */ - -#include "Batch_InvalidKeyException.hxx" -using namespace std; - -namespace Batch { - -} - diff --git a/src/Batch/Batch_InvalidKeyException.hxx b/src/Batch/Batch_InvalidKeyException.hxx deleted file mode 100644 index 9fc8c70de..000000000 --- a/src/Batch/Batch_InvalidKeyException.hxx +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * InvalidKeyException.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Wed Oct 15 10:39:51 2003 - * Projet : Salome 2 - * - */ - -#ifndef _INVALIDKEYEXCEPTION_H_ -#define _INVALIDKEYEXCEPTION_H_ - -#include "Batch_Defines.hxx" - - -#include "Batch_GenericException.hxx" -#include "Batch_GenericException.hxx" - -namespace Batch { - - class BATCH_EXPORT InvalidKeyException : public GenericException - { - public: - // Constructeur - InvalidKeyException(std::string ch = "undefined") : GenericException("InvalidKeyException", ch) {} - - protected: - - private: - - }; - -} - -#endif - diff --git a/src/Batch/Batch_Job.cxx b/src/Batch/Batch_Job.cxx deleted file mode 100644 index 276037296..000000000 --- a/src/Batch/Batch_Job.cxx +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * Job.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2003 - * Projet : SALOME 2 - * - */ - -#include "Batch_Job.hxx" -#include "Batch_Parametre.hxx" -#include -//#include "MEDMEM_STRING.hxx" -using namespace std; - -namespace Batch { - - // Constructeur - Job::Job() : _param(), _env() - { - // Nothing to do - } - - - // Constructeur - Job::Job(Parametre param) : _param(param), _env() - { - // Nothing to do - } - - - // Constructeur - Job::Job(Environnement env) : _param(), _env(env) - { - // Nothing to do - } - - - // Constructeur - Job::Job(Parametre param, Environnement env) : _param(param), _env(env) - { - // Nothing to do - } - - // Operateur pour l'affichage sur un stream - ostream & operator <<(ostream & os, const Job & job) - { - return os << job.__str__(); - } - - // Accesseur - Batch::Parametre Job::getParametre() const - { - return _param; - } - - // Accesseur - void Job::setParametre(const Batch::Parametre & param) - { - _param = param; - } - - // Accesseur - Environnement Job::getEnvironnement() const - { - return _env; - } - - // Accesseur - void Job::setEnvironnement(const Environnement & env) - { - _env = env; - } - - - // Methode pour l'interfacage avec Python (SWIG) : affichage en Python - string Job::__str__() const { - //MEDMEM::STRING str; - ostringstream str; - str << ""; - return str.str(); - } - - -} diff --git a/src/Batch/Batch_Job.hxx b/src/Batch/Batch_Job.hxx deleted file mode 100644 index 264fb8e82..000000000 --- a/src/Batch/Batch_Job.hxx +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * Job.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2003 - * Projet : SALOME 2 - * - */ - -#ifndef _JOB_H_ -#define _JOB_H_ - -#include "Batch_Defines.hxx" - - -#include "Batch_Parametre.hxx" -#include "Batch_Environnement.hxx" - -namespace Batch { - - class BATCH_EXPORT Job - { - public: - // Constructeurs et destructeur - Job(); - Job(Batch::Parametre param); - Job(Batch::Environnement env); - Job(Batch::Parametre param, Batch::Environnement env); - virtual ~Job() {} - - // Operateur pour l'affichage sur un stream - friend std::ostream & operator <<(std::ostream & os, const Job & job); - - // Accesseurs - Batch::Parametre getParametre() const; - void setParametre(const Batch::Parametre &); - - // Accesseurs - Batch::Environnement getEnvironnement() const; - void setEnvironnement(const Batch::Environnement &); - - // Methodes pour l'interfacage avec Python (SWIG) - // TODO : supprimer ces methodes et transferer leur definitions dans SWIG - std::string __str__() const; // SWIG : affichage en Python - std::string __repr__() const { return __str__(); }; // SWIG : affichage en Python - - protected: - Batch::Parametre _param; // table des parametres batch du job - Batch::Environnement _env; // table des variables d'environnement - - private: - - }; - -} - -#endif diff --git a/src/Batch/Batch_JobId.cxx b/src/Batch/Batch_JobId.cxx deleted file mode 100644 index c465ada53..000000000 --- a/src/Batch/Batch_JobId.cxx +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * JobId.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2003 - * Projet : SALOME 2 - * - */ - -#include "Batch_JobId.hxx" -#include "Batch_BatchManager.hxx" -#include -#include -//#include "MEDMEM_STRING.hxx" -using namespace std; - -namespace Batch { - - // Constructeur standard - JobId::JobId() : _p_batchmanager(), _reference("undefined") - { - // Nothing to do - } - - // Constructeur avec le pointeur sur le BatchManager associe et avec une reference - JobId::JobId(BatchManager * _p_bm, string ref) : _p_batchmanager(_p_bm), _reference(ref) - { - // Nothing to do - } - - // Destructeur - JobId::~JobId() - { - // Nothing to do - } - - // Operateur d'affectation entre objets - JobId & JobId::operator =(const JobId & jobid) - { - _p_batchmanager = jobid._p_batchmanager; - _reference = jobid._reference; - - return *this; - } - - // Constructeur par recopie - JobId::JobId(const JobId & jobid) : _p_batchmanager(jobid._p_batchmanager), _reference(jobid._reference) - { - // Nothing to do - } - - // Accesseur pour la reference interne - string JobId::getReference() const - { - return _reference; - } - - // Methode pour le controle du job : retire le job du gestionnaire - void JobId::deleteJob() const - { - assert(_p_batchmanager != 0); - _p_batchmanager->deleteJob(*this); - } - - // Methode pour le controle du job : suspend le job en file d'attente - void JobId::holdJob() const - { - assert(_p_batchmanager != 0); - _p_batchmanager->holdJob(*this); - } - - // Methode pour le controle du job : relache le job suspendu - void JobId::releaseJob() const - { - assert(_p_batchmanager != 0); - _p_batchmanager->releaseJob(*this); - } - - // Methode pour le controle du job : modifie le job en file d'attente - void JobId::alterJob(const Parametre & param, const Environnement & env) const - { - assert(_p_batchmanager != 0); - _p_batchmanager->alterJob(*this, param, env); - } - - // Methode pour le controle du job : modifie le job en file d'attente - void JobId::alterJob(const Parametre & param) const - { - assert(_p_batchmanager != 0); - _p_batchmanager->alterJob(*this, param); - } - - // Methode pour le controle du job : modifie le job en file d'attente - void JobId::alterJob(const Environnement & env) const - { - assert(_p_batchmanager != 0); - _p_batchmanager->alterJob(*this, env); - } - - // Methode pour le controle du job : renvoie l'etat du job - JobInfo JobId::queryJob() const - { - assert(_p_batchmanager != 0); - return _p_batchmanager->queryJob(*this); - } - - - // Methode pour l'interfacage avec Python (SWIG) : affichage en Python - string JobId::__str__() const { - //MEDMEM::STRING str; - ostringstream str; - str << ""; - return str.str(); - } - -} diff --git a/src/Batch/Batch_JobId.hxx b/src/Batch/Batch_JobId.hxx deleted file mode 100644 index efd26321d..000000000 --- a/src/Batch/Batch_JobId.hxx +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * JobId.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2003 - * Projet : SALOME 2 - * - */ - -#ifndef _JOBID_H_ -#define _JOBID_H_ - - -#include "Batch_Defines.hxx" - -#include "Batch_JobInfo.hxx" -#include "Batch_BatchManager.hxx" - -namespace Batch { - - class BatchManager; - - class BATCH_EXPORT JobId - { - friend class BatchManager; - - public: - // Constructeur standard et destructeur - JobId(); - virtual ~JobId(); - - // Constructeur avec le pointeur sur le BatchManager associe et avec une reference - JobId(Batch::BatchManager *, std::string ref); - - // Operateur d'affectation entre objets - virtual JobId & operator =(const Batch::JobId &); - - // Constructeur par recopie - JobId(const Batch::JobId &); - - // Accesseur pour la reference interne - virtual std::string getReference() const; - - // Methodes pour le controle du job - virtual void deleteJob() const; // retire un job du gestionnaire - virtual void holdJob() const; // suspend un job en file d'attente - virtual void releaseJob() const; // relache un job suspendu - virtual void alterJob(const Batch::Parametre & param, const Batch::Environnement & env) const; // modifie un job en file d'attente - virtual void alterJob(const Batch::Parametre & param) const; // modifie un job en file d'attente - virtual void alterJob(const Batch::Environnement & env) const; // modifie un job en file d'attente - virtual void setParametre(const Batch::Parametre & param) { return alterJob(param); } // modifie un job en file d'attente - virtual void setEnvironnement(const Batch::Environnement & env) { return alterJob(env); } // modifie un job en file d'attente - virtual Batch::JobInfo queryJob() const; // renvoie l'etat du job - - // Methodes pour l'interfacage avec Python (SWIG) - // TODO : supprimer ces methodes et transferer leur definitions dans SWIG - std::string __str__() const; // SWIG : affichage en Python - std::string __repr__() const { return __str__(); }; // SWIG : affichage en Python - - protected: - Batch::BatchManager * _p_batchmanager; // pointeur sur le BatchManager qui controle le job - std::string _reference; // reference du job au sein du BatchManager - - private: - - }; - -} - -#endif diff --git a/src/Batch/Batch_JobInfo.cxx b/src/Batch/Batch_JobInfo.cxx deleted file mode 100644 index 63c85024f..000000000 --- a/src/Batch/Batch_JobInfo.cxx +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * JobInfo.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Thu Nov 6 10:05:30 2003 - * Projet : Salome 2 - * - */ - -#include -#include -#include -//#include "MEDMEM_STRING.hxx" -#include "Batch_JobInfo.hxx" - -using namespace std; - -namespace Batch { - - // Destructeur - JobInfo::~JobInfo() - { - // Nothing to do - } - - - // Operateur pour l'affichage sur un stream - ostream & operator <<(ostream & os, const JobInfo & ji) - { - return os << ji.__str__(); - } - - - // Methodes pour l'interfacage avec Python (SWIG) : affichage en Python - string JobInfo::__str__() const - { - //MEDMEM::STRING sst; - ostringstream sst; - sst << ""; - - return sst.str(); - } - - // Accesseur - Parametre JobInfo::getParametre() const - { - return _param; - } - - // Accesseur - Environnement JobInfo::getEnvironnement() const - { - return _env; - } - - -} diff --git a/src/Batch/Batch_JobInfo.hxx b/src/Batch/Batch_JobInfo.hxx deleted file mode 100644 index f4b54f115..000000000 --- a/src/Batch/Batch_JobInfo.hxx +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * JobInfo.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Thu Nov 6 10:05:30 2003 - * Projet : Salome 2 - * - */ - -#ifndef _JOBINFO_H_ -#define _JOBINFO_H_ - -#include "Batch_Defines.hxx" - -#include -#include -#include "Batch_Parametre.hxx" -#include "Batch_Environnement.hxx" - -namespace Batch { - - class BATCH_EXPORT JobInfo - { - public: - // Constructeur standard et destructeur - JobInfo() : _param(), _env() {}; - virtual ~JobInfo(); - - // Constructeur par recopie - JobInfo(const JobInfo & jinfo) : _param(jinfo._param), _env(jinfo._env) {}; - - // Operateur pour l'affichage sur un stream - friend std::ostream & operator <<(std::ostream & os, const JobInfo & ji); - - // Accesseurs - // _CS_gbo Ajout explicite du namespace pour les besoins de swig (mauvaise gestion - // des namespace par swig. - virtual Batch::Parametre getParametre() const; - virtual Batch::Environnement getEnvironnement() const; - - // Methodes pour l'interfacage avec Python (SWIG) - // TODO : supprimer ces methodes et transferer leur definitions dans SWIG - std::string __str__() const; // SWIG : affichage en Python - std::string __repr__() const { return __str__(); }; // SWIG : affichage en Python - - protected: - Parametre _param; // parametres du job - Environnement _env; // variables d'environnement du job - JobInfo(const Parametre & param, const Environnement & env) : _param(param), _env(env) {}; - - private: - - }; - -} - -#endif diff --git a/src/Batch/Batch_JobInfo_LSF.cxx b/src/Batch/Batch_JobInfo_LSF.cxx deleted file mode 100644 index b964aba9b..000000000 --- a/src/Batch/Batch_JobInfo_LSF.cxx +++ /dev/null @@ -1,204 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * JobInfo_LSF.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Fri Nov 21 09:42:06 2003 - * Projet : Salome 2 - * - */ - -#include -#include -#include -#include "Batch_Parametre.hxx" -#include "Batch_Environnement.hxx" -#include "Batch_RunTimeException.hxx" -#include "Batch_APIInternalFailureException.hxx" -#include "Batch_JobInfo_LSF.hxx" - -using namespace std; - -namespace Batch { - - - - // Constructeurs - JobInfo_LSF::JobInfo_LSF(int id) : JobInfo() - { - struct loadIndexLog * p_ld = new struct loadIndexLog; - struct jobInfoHead * p_jInfoHead = lsb_openjobinfo_a(id, NULL, NULL, NULL, NULL, ALL_JOB); - - int more = p_jInfoHead->numJobs; - if (more != 1) { - char * msg = lsb_sysmsg(); - if (!msg) msg = "unknown"; - throw APIInternalFailureException(string("LSF lsb_openjobinfo error. Reason : ") + msg); - } - - // on remplit une structure contenant elements - struct jobInfoEnt & jobInfo = * lsb_readjobinfo(&more); - - - // On remplit les membres _param et _env - _param[ACCOUNT] = jobInfo.submit.projectName; - _param[CHECKPOINT] = jobInfo.submit.chkpntPeriod != 0; - _param[CKPTINTERVAL] = jobInfo.submit.chkpntPeriod; - _param[CREATIONTIME] = jobInfo.submitTime; - // _param[EGROUP] = jobInfo.; - _param[ELIGIBLETIME] = jobInfo.reserveTime; - _param[ENDTIME] = jobInfo.endTime; - _param[EUSER] = jobInfo.execUsername; - _param[EXECUTABLE] = jobInfo.submit.command; - _param[EXITCODE] = jobInfo.exitStatus; - _param[HOLD] = jobInfo.status & (JOB_STAT_PSUSP | JOB_STAT_SSUSP | JOB_STAT_USUSP); - _param[MAIL] = jobInfo.submit.mailUser; - _param[MAXCPUTIME] = jobInfo.submit.rLimits[LSF_RLIMIT_CPU]; - _param[MAXDISKSIZE] = jobInfo.submit.rLimits[LSF_RLIMIT_FSIZE]; - _param[MAXRAMSIZE] = jobInfo.submit.rLimits[LSF_RLIMIT_SWAP]; - _param[MAXWALLTIME] = jobInfo.submit.rLimits[LSF_RLIMIT_RUN]; - _param[MODIFICATIONTIME] = jobInfo.lastEvent; - _param[NAME] = jobInfo.jName; - _param[NBPROC] = jobInfo.submit.numProcessors; - _param[PID] = jobInfo.jobPid; - _param[QUEUE] = jobInfo.submit.queue; - _param[QUEUEDTIME] = jobInfo.submitTime; - // _param[SERVER] = jobInfo.; - _param[STARTTIME] = jobInfo.startTime; - _param[TEXT] = jobInfo.numReasons ? lsb_pendreason(jobInfo.numReasons, - jobInfo.reasonTb, - p_jInfoHead, - p_ld,0) : ""; - // _param[TMPDIR] = jobInfo.; - _param[USEDCPUTIME] = static_cast(jobInfo.cpuTime); - // _param[USEDDISKSIZE] = jobInfo.; - _param[USEDRAMSIZE] = jobInfo.runRusage.mem; - _param[USEDWALLTIME] = jobInfo.duration * 60L; - _param[USER] = jobInfo.user; - - - ostringstream oss; - int jobid = jobInfo.jobId; - oss << jobid; - _param[ID] = oss.str(); - - - string hosts, sep; - for(int i=0; i < jobInfo.numExHosts; i++, sep="+") { - hosts += jobInfo.exHosts[i]; - hosts += sep; - } - _param[EXECUTIONHOST] = hosts; - - ostringstream status; - - if (IS_PEND(jobInfo.status)) - status << " Job is pending;"; - if (IS_START(jobInfo.status)) - status << " Job is started;"; - if (IS_FINISH(jobInfo.status)) - status << " Job is finished;"; - if (IS_SUSP(jobInfo.status)) - status << " Job is suspended;"; - if (IS_POST_DONE(jobInfo.status)) - status << " Job is post-done;"; - if (IS_POST_ERR(jobInfo.status)) - status << " Job is post-error;"; - - _param[STATE] = status.str(); - _running = IS_FINISH(jobInfo.status) ? false : true; - - - if (strlen(jobInfo.submit.inFile)) - _param[INFILE] += Couple(jobInfo.submit.inFile, "stdin"); - if (strlen(jobInfo.submit.outFile)) - _param[OUTFILE] += Couple(jobInfo.submit.outFile, "stdout"); - if (strlen(jobInfo.submit.errFile)) - _param[OUTFILE] += Couple(jobInfo.submit.errFile, "stderr"); - - for(int i=0; i < jobInfo.submit.nxf; i++) { - switch (jobInfo.submit.xf[i].options) { - case XF_OP_SUB2EXEC: - _param[INFILE] += Couple(jobInfo.submit.xf[i].subFn, jobInfo.submit.xf[i].execFn); - break; - - case XF_OP_EXEC2SUB: - _param[OUTFILE] += Couple(jobInfo.submit.xf[i].subFn, jobInfo.submit.xf[i].execFn); - break; - - default: - break; - } - } - - - lsb_closejobinfo(); - delete p_ld; - } - - - - // Teste si un job est present en machine - bool JobInfo_LSF::isRunning() const - { - return _running; - } - - - // Destructeur - JobInfo_LSF::~JobInfo_LSF() - { - // Nothing to do - } - - - - // Convertit une date HH:MM:SS en secondes - long JobInfo_LSF::HMStoLong(const string & s) - { - long hour, min, sec; - - sscanf( s.c_str(), "%ld:%ld:%ld", &hour, &min, &sec); - return ( ( ( hour * 60L ) + min ) * 60L ) + sec; - } - - // Methode pour l'interfacage avec Python (SWIG) : affichage en Python - string JobInfo_LSF::__str__() const - { - ostringstream sst; - sst << " -#include -} -#include -#include "Batch_RunTimeException.hxx" -#include "Batch_JobInfo.hxx" - -namespace Batch { - - class JobInfo_LSF : public JobInfo - { - public: - // Constructeurs et destructeur - JobInfo_LSF() : _running(false) {}; - JobInfo_LSF(int id); - virtual ~JobInfo_LSF(); - - // Constructeur par recopie - JobInfo_LSF(const JobInfo_LSF & jinfo) : JobInfo(jinfo) {}; - - // Teste si un job est present en machine - virtual bool isRunning() const; - - // Methodes pour l'interfacage avec Python (SWIG) - // TODO : supprimer ces methodes et transferer leur definitions dans SWIG - std::string __str__() const; // SWIG : affichage en Python - std::string __repr__() const { return __str__(); }; // SWIG : affichage en Python - - protected: - bool _running; // etat du job en machine - - private: - // Convertit une date HH:MM:SS en secondes - long HMStoLong(const std::string &); - - }; - -} - -#endif diff --git a/src/Batch/Batch_JobInfo_Local.cxx b/src/Batch/Batch_JobInfo_Local.cxx deleted file mode 100644 index da7a32ca4..000000000 --- a/src/Batch/Batch_JobInfo_Local.cxx +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * JobInfo_Local.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Fri Nov 21 09:42:06 2003 - * Projet : Salome 2 - * - */ - -#include -#include "Batch_Parametre.hxx" -#include "Batch_Environnement.hxx" -#include "Batch_JobInfo_Local.hxx" - -namespace Batch { - - // Constructeurs - JobInfo_Local::JobInfo_Local(const Parametre & param, const Environnement & env) : - JobInfo(param, env) - { - // Nothing to do - } - - - // Destructeur - JobInfo_Local::~JobInfo_Local() - { - // Nothing to do - } - - -} diff --git a/src/Batch/Batch_JobInfo_Local.hxx b/src/Batch/Batch_JobInfo_Local.hxx deleted file mode 100644 index ed325b4e8..000000000 --- a/src/Batch/Batch_JobInfo_Local.hxx +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * JobInfo_Local.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Fri Nov 21 09:42:05 2003 - * Projet : Salome 2 - * - */ - -#ifndef _JOBINFO_LOCAL_H_ -#define _JOBINFO_LOCAL_H_ - -#include -#include "Batch_JobInfo.hxx" - -namespace Batch { - - class JobInfo_Local : public JobInfo - { - public: - // Constructeurs et destructeur - JobInfo_Local() {}; - JobInfo_Local(const Parametre & param, const Environnement & env); - virtual ~JobInfo_Local(); - - // Constructeur par recopie - JobInfo_Local(const JobInfo_Local & jinfo) : JobInfo(jinfo) {}; - - - protected: - - private: - - }; - -} - -#endif diff --git a/src/Batch/Batch_JobInfo_PBS.cxx b/src/Batch/Batch_JobInfo_PBS.cxx deleted file mode 100644 index 3a474fc69..000000000 --- a/src/Batch/Batch_JobInfo_PBS.cxx +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * JobInfo_PBS.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Fri Nov 21 09:42:06 2003 - * Projet : Salome 2 - * - */ - -#include -#include -//#include "MEDMEM_STRING.hxx" -#include "Batch_Parametre.hxx" -#include "Batch_Environnement.hxx" -#include "Batch_RunTimeException.hxx" -#include "Batch_JobInfo_PBS.hxx" -using namespace std; - -namespace Batch { - - // Constructeurs - JobInfo_PBS::JobInfo_PBS(struct batch_status * list, bool tobedeleted) : JobInfo() - { - // On ne considere que le premier element de la liste - // Si tout est OK, la liste ne devrait contenir qu'un element - // Sinon on leve une exception. - struct batch_status * p_job = list; - int i; - for(i=0; p_job; p_job = p_job->next) i++; - if (i == 0) throw RunTimeException("Liste vide (le job est absent de la file)"); - if (i > 1) { - //MEDMEM::STRING sst; - ostringstream sst; - sst << "JobInfo_PBS::JobInfo_PBS(struct batch_status * list, bool tobedeleted) : la liste contient " - << i << " elements" << " (1 seul requis)" << endl; - throw RunTimeException(sst.str()); - } - p_job = list; - - // On remplit les membres _param et _env - - if (p_job->name && strlen(p_job->name)) _param[ID] = p_job->name; - if (p_job->text && strlen(p_job->text)) _param[TEXT] = p_job->text; - - for(struct attrl * p_attr = p_job->attribs; p_attr; p_attr = p_attr->next) { - - string name, res, value; - if (p_attr->name && strlen(p_attr->name)) name = p_attr->name; - if (p_attr->resource && strlen(p_attr->resource)) res = p_attr->resource; - if (p_attr->value && strlen(p_attr->value)) value = p_attr->value; - - if (name == ATTR_N) { - _param[NAME] = value; - - } else if (name == ATTR_owner) { - _param[USER] = value; - - } else if (name == ATTR_state) { - _param[STATE] = value; - - } else if (name == ATTR_queue) { - _param[QUEUE] = value; - - } else if (name == ATTR_A) { - _param[ACCOUNT] = value; - - } else if (name == ATTR_M) { - _param[MAIL] = value; - - } else if (name == ATTR_c) { - if (!strcmp(value.c_str(), CHECKPOINT_UNSPECIFIED)) _param[CHECKPOINT] = 1L; - else _param[CHECKPOINT] = 0L; - - } else if (name == ATTR_h) { - if (!strcmp(value.c_str(), NO_HOLD)) _param[HOLD] = 0L; - else _param[HOLD] = 1L; - - } else if (name == ATTR_ctime) { - _param[CREATIONTIME] = atol(value.c_str()); - - } else if (name == ATTR_etime) { - _param[ELIGIBLETIME] = atol(value.c_str()); - - } else if (name == ATTR_mtime) { - _param[MODIFICATIONTIME] = atol(value.c_str()); - - } else if (name == ATTR_qtime) { - _param[QUEUEDTIME] = atol(value.c_str()); - - } else if (name == ATTR_exechost) { - _param[EXECUTIONHOST] = value; - - } else if (name == ATTR_session) { - _param[PID] = atol(value.c_str()); - - } else if (name == ATTR_euser) { - _param[EUSER] = value; - - } else if (name == ATTR_egroup) { - _param[EGROUP] = value; - - } else if (name == ATTR_l) { - if (res == "cput") { - _param[MAXCPUTIME] = HMStoLong(value); - - } else if (res == "walltime") { - _param[MAXWALLTIME] = HMStoLong(value); - - } - - } else if (name == ATTR_used) { - if (res == "cput") { - _param[USEDCPUTIME] = HMStoLong(value); - - } else if (res == "walltime") { - _param[USEDWALLTIME] = HMStoLong(value); - - } - - } else if (name == ATTR_v) { - int deb = 0; - int pos = 0; - bool ok = true; - - while (ok) { - pos = value.find(",", deb); - string sub = value.substr(deb, pos-deb); - deb = pos + 1; - if (pos < 0) ok = false; - - int eq = sub.find("="); - _env[sub.substr(0, eq)] = sub.substr(eq+1); - } - - } - } - - - if (tobedeleted) pbs_statfree(list); - } - - // Destructeur - JobInfo_PBS::~JobInfo_PBS() - { - // Nothing to do - } - - // Convertit une date HH:MM:SS en secondes - long JobInfo_PBS::HMStoLong(const string & s) - { - long hour, min, sec; - - sscanf( s.c_str(), "%ld:%ld:%ld", &hour, &min, &sec); - return ( ( ( hour * 60L ) + min ) * 60L ) + sec; - } - - // Methode pour l'interfacage avec Python (SWIG) : affichage en Python - string JobInfo_PBS::__str__() const - { - //MEDMEM::STRING sst; - ostringstream sst; - sst << " -#include -} -#include -#include "Batch_RunTimeException.hxx" -#include "Batch_JobInfo.hxx" - -namespace Batch { - - class JobInfo_PBS : public JobInfo - { - public: - // Constructeurs et destructeur - JobInfo_PBS() : JobInfo() {}; - JobInfo_PBS(struct batch_status * stat_list, bool tobedeleted = false); - virtual ~JobInfo_PBS(); - - // Constructeur par recopie - JobInfo_PBS(const JobInfo_PBS & jinfo) : JobInfo(jinfo) {}; - - // Methodes pour l'interfacage avec Python (SWIG) - // TODO : supprimer ces methodes et transferer leur definitions dans SWIG - std::string __str__() const; // SWIG : affichage en Python - std::string __repr__() const { return __str__(); }; // SWIG : affichage en Python - - protected: - - private: - // Convertit une date HH:MM:SS en secondes - long HMStoLong(const std::string &); - - }; - -} - -#endif diff --git a/src/Batch/Batch_JobInfo_eLSF.cxx b/src/Batch/Batch_JobInfo_eLSF.cxx deleted file mode 100644 index 6f6f06312..000000000 --- a/src/Batch/Batch_JobInfo_eLSF.cxx +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * JobInfo_eLSF.cxx : emulation of LSF client - * - * Auteur : Bernard SECHER - CEA DEN - * Mail : mailto:bernard.secher@cea.fr - * Date : Thu Apr 24 10:17:22 2008 - * Projet : PAL Salome - * - */ - -#include -#include -#include -#include -#include "Batch_Parametre.hxx" -#include "Batch_Environnement.hxx" -#include "Batch_RunTimeException.hxx" -#include "Batch_APIInternalFailureException.hxx" -#include "Batch_JobInfo_eLSF.hxx" - -using namespace std; - -namespace Batch { - - - - // Constructeurs - JobInfo_eLSF::JobInfo_eLSF(int id, string logFile) : JobInfo() - { - // On remplit les membres _param et _env - ostringstream oss; - oss << id; - _param[ID] = oss.str(); - - // read status of job in log file - char line[128]; - ifstream fp(logFile.c_str(),ios::in); - fp.getline(line,80,'\n'); - - string sjobid, username, status; - fp >> sjobid; - fp >> username; - fp >> status; - - _param[STATE] = status; - - if( status.find("RUN") != string::npos) - _running = true; - - } - - // Teste si un job est present en machine - bool JobInfo_eLSF::isRunning() const - { - return _running; - } - - - // Destructeur - JobInfo_eLSF::~JobInfo_eLSF() - { - // Nothing to do - } - - // Convertit une date HH:MM:SS en secondes - long JobInfo_eLSF::HMStoLong(const string & s) - { - long hour, min, sec; - - sscanf( s.c_str(), "%ld:%ld:%ld", &hour, &min, &sec); - return ( ( ( hour * 60L ) + min ) * 60L ) + sec; - } - - // Methode pour l'interfacage avec Python (SWIG) : affichage en Python - string JobInfo_eLSF::__str__() const - { - ostringstream sst; - sst << " - -namespace Batch { - - class JobInfo_eLSF : public JobInfo - { - public: - // Constructeurs et destructeur - JobInfo_eLSF() : _running(false) {}; - JobInfo_eLSF(int id,std::string logFile); - virtual ~JobInfo_eLSF(); - - // Constructeur par recopie - JobInfo_eLSF(const JobInfo_eLSF & jinfo) : JobInfo(jinfo) {}; - - // Teste si un job est present en machine - virtual bool isRunning() const; - - // Methodes pour l'interfacage avec Python (SWIG) - // TODO : supprimer ces methodes et transferer leur definitions dans SWIG - std::string __str__() const; // SWIG : affichage en Python - std::string __repr__() const { return __str__(); }; // SWIG : affichage en Python - - protected: - bool _running; // etat du job en machine - - private: - // Convertit une date HH:MM:SS en secondes - long HMStoLong(const std::string &); - - }; - -} - -#endif diff --git a/src/Batch/Batch_JobInfo_ePBS.cxx b/src/Batch/Batch_JobInfo_ePBS.cxx deleted file mode 100644 index b8cd1e888..000000000 --- a/src/Batch/Batch_JobInfo_ePBS.cxx +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * JobInfo_ePBS.cxx : emulation of PBS client - * - * Auteur : Bernard SECHER - CEA DEN - * Mail : mailto:bernard.secher@cea.fr - * Date : Thu Apr 24 10:17:22 2008 - * Projet : PAL Salome - * - */ - -#include -#include -#include -#include -#include "Batch_Parametre.hxx" -#include "Batch_Environnement.hxx" -#include "Batch_RunTimeException.hxx" -#include "Batch_APIInternalFailureException.hxx" -#include "Batch_JobInfo_ePBS.hxx" - -using namespace std; - -namespace Batch { - - - - // Constructeurs - JobInfo_ePBS::JobInfo_ePBS(int id, string logFile) : JobInfo() - { - // On remplit les membres _param et _env - ostringstream oss; - oss << id; - _param[ID] = oss.str(); - - // read of log file - char line[128]; - ifstream fp(logFile.c_str(),ios::in); - - string status; - string sline; - int pos = string::npos; - while( (pos == string::npos) && fp.getline(line,80,'\n') ){ - sline = string(line); - pos = sline.find("job_state"); - }; - - if(pos!=string::npos){ - istringstream iss(sline); - iss >> status; - iss >> status; - iss >> status; - } - else - status = "U"; - - _param[STATE] = status; - - if( status.find("R") != string::npos) - _running = true; - - } - - // Teste si un job est present en machine - bool JobInfo_ePBS::isRunning() const - { - return _running; - } - - - // Destructeur - JobInfo_ePBS::~JobInfo_ePBS() - { - // Nothing to do - } - - // Convertit une date HH:MM:SS en secondes - long JobInfo_ePBS::HMStoLong(const string & s) - { - long hour, min, sec; - - sscanf( s.c_str(), "%ld:%ld:%ld", &hour, &min, &sec); - return ( ( ( hour * 60L ) + min ) * 60L ) + sec; - } - - // Methode pour l'interfacage avec Python (SWIG) : affichage en Python - string JobInfo_ePBS::__str__() const - { - ostringstream sst; - sst << " -#include -#include -#include -#include "Batch_Parametre.hxx" -#include "Batch_Environnement.hxx" -#include "Batch_RunTimeException.hxx" -#include "Batch_APIInternalFailureException.hxx" -#include "Batch_JobInfo_eSGE.hxx" - -using namespace std; - -namespace Batch { - - - - // Constructeurs - JobInfo_eSGE::JobInfo_eSGE(int id, string logFile) : JobInfo() - { - // On remplit les membres _param et _env - ostringstream oss; - oss << id; - _param[ID] = oss.str(); - - // read of log file - char line[128]; - ifstream fp(logFile.c_str(),ios::in); - - string status; - string sline; - fp.getline(line,80,'\n'); - sline = string(line); - - if( sline.length() > 0 ){ - istringstream iss(sline); - iss >> status >> status >> status >> status >> status; - } - else - status = "e"; - - _param[STATE] = status; - - if( status.find("r") != string::npos) - _running = true; - - } - - // Teste si un job est present en machine - bool JobInfo_eSGE::isRunning() const - { - return _running; - } - - - // Destructeur - JobInfo_eSGE::~JobInfo_eSGE() - { - // Nothing to do - } - - // Convertit une date HH:MM:SS en secondes - long JobInfo_eSGE::HMStoLong(const string & s) - { - long hour, min, sec; - - sscanf( s.c_str(), "%ld:%ld:%ld", &hour, &min, &sec); - return ( ( ( hour * 60L ) + min ) * 60L ) + sec; - } - - // Methode pour l'interfacage avec Python (SWIG) : affichage en Python - string JobInfo_eSGE::__str__() const - { - ostringstream sst; - sst << " -#include -#include -#include -#include -#include "Batch_Job_LSF.hxx" - -using namespace std; - -namespace Batch { - - - // Constructeur - Job_LSF::Job_LSF(const Job & job) : _p_submit(0) - { - Parametre P = job.getParametre(); - _p_submit = ParametreToSubmitStruct(P); - } - - - // Destructeur - Job_LSF::~Job_LSF() - { - if (_p_submit) { - if (_p_submit->jobName) delete [] _p_submit->jobName; - if (_p_submit->queue) delete [] _p_submit->queue; - if (_p_submit->askedHosts) { - delete [] *(_p_submit->askedHosts); - delete [] _p_submit->askedHosts; - } - if (_p_submit->resReq) delete [] _p_submit->resReq; - if (_p_submit->hostSpec) delete [] _p_submit->hostSpec; - if (_p_submit->dependCond) delete [] _p_submit->dependCond; - if (_p_submit->timeEvent) delete [] _p_submit->timeEvent; - if (_p_submit->inFile) delete [] _p_submit->inFile; - if (_p_submit->outFile) delete [] _p_submit->outFile; - if (_p_submit->errFile) delete [] _p_submit->errFile; - if (_p_submit->command) delete [] _p_submit->command; - if (_p_submit->newCommand) delete [] _p_submit->newCommand; - if (_p_submit->chkpntDir) delete [] _p_submit->chkpntDir; - if (_p_submit->xf) delete [] _p_submit->xf; - if (_p_submit->preExecCmd) delete [] _p_submit->preExecCmd; - if (_p_submit->mailUser) delete [] _p_submit->mailUser; - if (_p_submit->projectName) delete [] _p_submit->projectName; - if (_p_submit->loginShell) delete [] _p_submit->loginShell; - if (_p_submit->exceptList) delete [] _p_submit->exceptList; - delete _p_submit; - } - } - - - // Accesseur - struct submit * Job_LSF::getSubmitStruct() - { - return _p_submit; - } - - - char * Job_LSF::string2char(const string & s) - { - char * ch = new char [s.size() + 1]; - memset(ch, 0, s.size() + 1); - strncat(ch, s.c_str(), s.size()); - return ch; - } - - - struct submit * Job_LSF::ParametreToSubmitStruct(const Parametre & P) - { - if (! _p_submit) _p_submit = new struct submit; - - memset( (void *) _p_submit, 0, sizeof(struct submit)); - - struct submit & sub = * _p_submit; - sub.options = 0; - sub.options2 = 0; - - sub.beginTime = 0; // job can run as soon as possible (default) - sub.termTime = 0; // job can run as long as it wishes (default) - - sub.numProcessors = 1; // job can run on one single processor (default) - sub.maxNumProcessors = 1; // job can run on one single processor (default) - - for(int i = 0; i< LSF_RLIM_NLIMITS; i++) sub.rLimits[i] = DEFAULT_RLIMIT; - - typedef std::vector< struct xFile > XFTAB; - XFTAB xf_tab; - - string st_second; - for(Parametre::const_iterator it = P.begin(); it != P.end(); it++) { - if ( (*it).first == ACCOUNT ) { - sub.options |= SUB_PROJECT_NAME; - st_second = (*it).second.str(); - sub.projectName = string2char(st_second); - - } else if ( (*it).first == CHECKPOINT ) { - if (static_cast< long >((*it).second)) - sub.options |= SUB_CHKPNT_PERIOD; - else - sub.options &= ~ SUB_CHKPNT_PERIOD; - - } else if ( (*it).first == CKPTINTERVAL ) { - sub.chkpntPeriod = static_cast< long >((*it).second); - - } else if ( (*it).first == EXECUTABLE ) { - st_second = (*it).second.str(); - sub.command = string2char(st_second); - - } else if ( (*it).first == EXECUTIONHOST ) { - sub.options |= SUB_HOST; - if (! sub.numAskedHosts) { - sub.numAskedHosts = 1; - sub.askedHosts = new char* [1]; - } - st_second = (*it).second.str(); - sub.askedHosts[0] = string2char(st_second); - - } else if ( (*it).first == HOLD ) { - if (static_cast< long >((*it).second)) - sub.options2 |= SUB2_HOLD; - else - sub.options2 &= ~ SUB2_HOLD; - - } else if ( (*it).first == INFILE ) { - Versatile V = (*it).second; - Versatile::iterator Vit; - - for(Vit=V.begin(); Vit!=V.end(); Vit++) { - CoupleType cpt = *static_cast< CoupleType * >(*Vit); - Couple cp = cpt; - string local = cp.getLocal(); - string remote = cp.getRemote(); - - // ATTENTION : les notions de fichier "local" ou "remote" sont inverses de celle de PBS qui a un point de vue serveur et non pas utilisateur - if (remote == "stdin"){ - sub.options |= SUB_IN_FILE; - sub.inFile = string2char(local); - - } else { - struct xFile xf; - strncpy(xf.subFn, local.c_str(), MAXFILENAMELEN - 1); xf.subFn[MAXFILENAMELEN - 1] = 0; - strncpy(xf.execFn, remote.c_str(), MAXFILENAMELEN - 1); xf.execFn[MAXFILENAMELEN - 1] = 0; - xf.options = XF_OP_SUB2EXEC; - xf_tab.push_back(xf); - } - } - - } else if ( (*it).first == MAIL ) { - sub.options |= SUB_MAIL_USER; - st_second = (*it).second.str(); - sub.mailUser = string2char(st_second); - - } else if ( (*it).first == MAXCPUTIME ) { - sub.rLimits[LSF_RLIMIT_CPU] = static_cast< long >((*it).second); - - } else if ( (*it).first == MAXDISKSIZE ) { - sub.rLimits[LSF_RLIMIT_FSIZE] = static_cast< long >((*it).second); - - } else if ( (*it).first == MAXRAMSIZE ) { - sub.rLimits[LSF_RLIMIT_SWAP] = static_cast< long >((*it).second); - - } else if ( (*it).first == MAXWALLTIME ) { - sub.rLimits[LSF_RLIMIT_RUN] = static_cast< long >((*it).second); - - } else if ( (*it).first == NAME ) { - sub.options |= SUB_JOB_NAME; - st_second = (*it).second.str(); - sub.jobName = string2char(st_second); - - } else if ( (*it).first == NBPROC ) { - sub.numProcessors = static_cast< long >((*it).second); - sub.maxNumProcessors = static_cast< long >((*it).second); - - } else if ( (*it).first == OUTFILE ) { - Versatile V = (*it).second; - Versatile::iterator Vit; - - for(Vit=V.begin(); Vit!=V.end(); Vit++) { - CoupleType cpt = *static_cast< CoupleType * >(*Vit); - Couple cp = cpt; - string local = cp.getLocal(); - string remote = cp.getRemote(); - - // ATTENTION : les notions de fichier "local" ou "remote" sont inverses de celle de PBS qui a un point de vue serveur et non pas utilisateur - if (remote == "stdout"){ - sub.options |= SUB_OUT_FILE; - sub.outFile = string2char(local); - - } else if (remote == "stderr"){ - sub.options |= SUB_ERR_FILE; - sub.errFile = string2char(local); - - } else { - struct xFile xf; - strncpy(xf.subFn, local.c_str(), MAXFILENAMELEN - 1); xf.subFn[MAXFILENAMELEN - 1] = 0; - strncpy(xf.execFn, remote.c_str(), MAXFILENAMELEN - 1); xf.execFn[MAXFILENAMELEN - 1] = 0; - xf.options = XF_OP_EXEC2SUB; - xf_tab.push_back(xf); - } - } - - - } else if ( (*it).first == QUEUE ) { - sub.options |= SUB_QUEUE; - st_second = (*it).second.str(); - sub.queue = string2char(st_second); - - } else if ( (*it).first == STARTTIME ) { - sub.beginTime = static_cast< long >((*it).second); - - } else if ( (*it).first == TMPDIR ) { - // TODO - - } else if ( (*it).first == USER ) { - // TODO - - } - } - - - // Transfert de fichiers en entree et sortie - sub.options |= SUB_OTHER_FILES; - sub.nxf = xf_tab.size(); - sub.xf = new struct xFile [sub.nxf]; - int ixf = 0; - for(XFTAB::const_iterator it_xf=xf_tab.begin(); it_xf != xf_tab.end(); it_xf++, ixf++) - sub.xf[ixf] = *it_xf; // *it_xf == xf_tab[ixf] - - - return _p_submit; - } - -} diff --git a/src/Batch/Batch_Job_LSF.hxx b/src/Batch/Batch_Job_LSF.hxx deleted file mode 100644 index 8db076685..000000000 --- a/src/Batch/Batch_Job_LSF.hxx +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * Job_LSF.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Fri Nov 14 11:00:39 2003 - * Projet : Salome 2 - * - */ - -#ifndef _JOB_LSF_H_ -#define _JOB_LSF_H_ - -extern "C" { - -#include -#include -} -#include -#include "Batch_Job.hxx" - -namespace Batch { - - class Job_LSF - { - public: - // Constructeur et destructeur - Job_LSF(const Job & job); - virtual ~Job_LSF(); - - // Accesseurs - struct submit * getSubmitStruct(); - - protected: - struct submit * _p_submit; // structure pour soumettre les jobs - - private: - struct submit * ParametreToSubmitStruct(const Parametre & P); - char * string2char(const std::string &); - }; - -} - -#endif diff --git a/src/Batch/Batch_Job_Local.cxx b/src/Batch/Batch_Job_Local.cxx deleted file mode 100644 index 3fa1062d1..000000000 --- a/src/Batch/Batch_Job_Local.cxx +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * Job_Local.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Fri Nov 14 11:00:39 2003 - * Projet : Salome 2 - * - */ - -#include -#include -#ifndef WIN32 -#include -#endif -#include "Batch_Job_Local.hxx" - -using namespace std; - -namespace Batch { - - // Constructeur - Job_Local::Job_Local(const Job & job) : - _command(), _param(job.getParametre()), _env(job.getEnvironnement()) - { - // On positionne le nom du EXECUTIONHOST a "localhost" s'il n'est pas precise - if ( _param.find(EXECUTIONHOST) == _param.end() ) { - _param[EXECUTIONHOST] = "localhost"; - } - - // On convertit les objets Parametre et Environnement en liste chainee d'attributs + operateur - addEnvironnement( _env ); - addParametre ( _param ); - - } - - - // Destructeur - Job_Local::~Job_Local() - { - } - - - void Job_Local::addParametre(const Parametre & P) - { - // En dernier, on ajoute le chemin complet de la commande - _command += P[EXECUTABLE].str(); - } - - - void Job_Local::addEnvironnement(const Environnement & E) - { - for(Environnement::const_iterator it=E.begin(); it != E.end(); it++) { - string variable = (*it).first; - string value = (*it).second; - - // On remplace toutes les occurences de single-quote par backslash-single-quote - for(int pos=0; pos < value.size(); pos++) { - pos = value.find("'", pos); - if ( (pos < 0) || (pos > value.size()) ) break; - value.replace(pos, 1, "\'"); - } - _command += variable + "='" + value + "' "; - } - } - - string Job_Local::getCommand(void) const { - return _command; - } - - - // Retourne l'objet Parametre - Parametre Job_Local::getParametre() const - { - return _param; - } - - // Retourne l'objet Environnement - Environnement Job_Local::getEnvironnement() const - { - return _env; - } - - -} diff --git a/src/Batch/Batch_Job_Local.hxx b/src/Batch/Batch_Job_Local.hxx deleted file mode 100644 index 30e8ffde8..000000000 --- a/src/Batch/Batch_Job_Local.hxx +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * Job_Local.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Fri Nov 14 11:00:39 2003 - * Projet : Salome 2 - * - */ - -#ifndef _JOB_LOCAL_H_ -#define _JOB_LOCAL_H_ - -#include "Batch_Parametre.hxx" -#include "Batch_Environnement.hxx" -#include "Batch_Job.hxx" - -namespace Batch { - - class Job_Local - { - public: - // Constructeur et destructeur - Job_Local(const Job & job); - virtual ~Job_Local(); - - // Retourne la commande _command - virtual std::string getCommand(void) const; - - // Retourne l'objet Parametre - virtual Parametre getParametre() const; - - // Retourne l'objet Environnement - virtual Environnement getEnvironnement() const; - - - protected: - std::string _command; - Parametre _param; - Environnement _env; - - private: - void addParametre(const Parametre & P); - void addEnvironnement(const Environnement & E); - - }; - -} - -#endif diff --git a/src/Batch/Batch_Job_PBS.cxx b/src/Batch/Batch_Job_PBS.cxx deleted file mode 100644 index cb4369731..000000000 --- a/src/Batch/Batch_Job_PBS.cxx +++ /dev/null @@ -1,472 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * Job_PBS.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Fri Nov 14 11:00:39 2003 - * Projet : Salome 2 - * - */ - -#include -#include -#include -#include "Batch_Job_PBS.hxx" -using namespace std; - -namespace Batch { - - // Ajoute un element (name,resource,value) a la liste chainee d'attributs + operateur - void Job_PBS::setResourceAttributeOP(struct attropl ** attr_list, const char * attr_name, const char * attr_resource, const char * attr_value) - { - // L'element (name,resource,value) existe-t-il deja ? si oui ptr != 0 - struct attropl * ptr = findResourceAttributeOP(*attr_list, attr_name, attr_resource); - - if (!ptr) { // L'element n'existe pas, il faut le creer - if (ptr = lastAttributeOP(*attr_list)) { // la liste n'est pas vide - ptr->next = new struct attropl; - ptr = ptr->next; - ptr->next = 0; - - } else { // la liste est completement vide - ptr = *attr_list = new struct attropl; - ptr->next = 0; - } - - // On remplit les champs (name,resource,value) - ptr->name = new char[strlen(attr_name) + 1]; - strncpy(ptr->name, attr_name, strlen(attr_name)); - ptr->name[strlen(attr_name)] = 0; - - ptr->resource = new char[strlen(attr_resource) + 1]; - strncpy(ptr->resource, attr_resource, strlen(attr_resource)); - ptr->resource[strlen(attr_resource)] = 0; - - ptr->value = new char[strlen(attr_value) + 1]; - strncpy(ptr->value, attr_value, strlen(attr_value)); - ptr->value[strlen(attr_value)] = 0; - - } else { // L'attribut existe, on change sa valeur - delete[] ptr->value; // On efface la valeur precedente - ptr->value = new char[strlen(attr_value) + 1]; - strncpy(ptr->value, attr_value, strlen(attr_value)); - ptr->value[strlen(attr_value)] = 0; - - } - } - - - // Recherche un element (name,resource,value) dans la liste chainee d'attributs + operateur - struct attropl * Job_PBS::findResourceAttributeOP(struct attropl * attr_list, const char * attr_name, const char * attr_resource) - { - // On parcoure la liste chainee pour trouver l'element dont les champs name et resource coincident - struct attropl * ptr = attr_list; - while (ptr) { - if (!strcmp(ptr->name, attr_name) && !strcmp(ptr->resource, attr_resource)) break; - ptr = ptr->next; - } - return ptr; - } - - - // Recherche le dernier element de la liste chainee d'attributs + operateur - struct attropl * Job_PBS::lastAttributeOP(struct attropl * attr_list) - { - struct attropl * ptr = attr_list; - while (ptr && ptr->next) { - ptr = ptr->next; - } - return ptr; - } - - - // Convertit un objet Parametre en liste chainee d'attributs + operateur - struct attropl * Job_PBS::ParametreToAttributeOPList(struct attropl ** _p_attr_list, Parametre & P) - { - Parametre::iterator it; - string st_second; - for(it=P.begin(); it!=P.end(); it++) { - if ( (*it).first == ACCOUNT ) { - st_second = (*it).second.str(); - setResourceAttributeOP(_p_attr_list, ATTR_A, "", st_second.c_str()); - - - } else if ( (*it).first == CHECKPOINT ) { - setResourceAttributeOP(_p_attr_list, ATTR_c, "", "u"); - - - } else if ( (*it).first == CKPTINTERVAL ) { - // Not significant - - } else if ( (*it).first == EXECUTABLE ) { - // Already done - - } else if ( (*it).first == HOLD ) { - if (static_cast< long >((*it).second)) - setResourceAttributeOP(_p_attr_list, ATTR_h, "", USER_HOLD); - else - setResourceAttributeOP(_p_attr_list, ATTR_h, "", NO_HOLD); - - } else if ( (*it).first == INFILE ) { - Versatile V = (*it).second; - Versatile::iterator Vit; - - string sep = ""; - string stagein; - - for(Vit=V.begin(); Vit!=V.end(); Vit++, sep=",") { - CoupleType cpt = *static_cast< CoupleType * >(*Vit); - Couple cp = cpt; - string local = cp.getLocal(); - string remote = cp.getRemote(); - - // ATTENTION : les notions de fichier "local" ou "remote" sont inverses de celle de PBS qui a un point de vue serveur et non pas utilisateur - stagein += sep + remote + "@" + local; - } - - if (stagein.size()) - setResourceAttributeOP(_p_attr_list, ATTR_stagein, "", stagein.c_str()); - - - } else if ( (*it).first == MAIL ) { - st_second = (*it).second.str(); - setResourceAttributeOP(_p_attr_list, ATTR_M, "", st_second.c_str()); - - } else if ( (*it).first == MAXCPUTIME ) { - char attr_value[32]; - long secondes = (*it).second; - long heures = secondes / 3600L; - long minutes = (secondes - 3600L * heures) / 60L; - secondes = secondes % 60L; - sprintf(attr_value, "%02ld:%02ld:%02ld", heures, minutes, secondes); - - setResourceAttributeOP(_p_attr_list, ATTR_l, "cput", attr_value); - - - } else if ( (*it).first == MAXDISKSIZE ) { - - } else if ( (*it).first == MAXRAMSIZE ) { - - } else if ( (*it).first == MAXWALLTIME ) { - char attr_value[32]; - long secondes = (*it).second; - long heures = secondes / 3600L; - long minutes = (secondes - 3600L * heures) / 60L; - secondes = secondes % 60L; - sprintf(attr_value, "%02ld:%02ld:%02ld", heures, minutes, secondes); - - setResourceAttributeOP(_p_attr_list, ATTR_l, "walltime", attr_value); - - - } else if ( (*it).first == NAME ) { - st_second = (*it).second.str(); - setResourceAttributeOP(_p_attr_list, ATTR_N, "", st_second.c_str()); - - - } else if ( (*it).first == OUTFILE ) { - Versatile V = (*it).second; - Versatile::iterator Vit; - - string sep = ""; - string stageout; - - for(Vit=V.begin(); Vit!=V.end(); Vit++, sep=",") { - CoupleType cpt = *static_cast< CoupleType * >(*Vit); - Couple cp = cpt; - string local = cp.getLocal(); - string remote = cp.getRemote(); - - if (remote == "stdout") - setResourceAttributeOP(_p_attr_list, ATTR_o, "", local.c_str()); - - else if (remote == "stderr") - setResourceAttributeOP(_p_attr_list, ATTR_e, "", local.c_str()); - - else - // ATTENTION : les notions de fichier "local" ou "remote" sont inverses de celle de PBS qui a un point de vue serveur et non pas utilisateur - stageout += sep + remote + "@" + local; - } - - if (stageout.size()) - setResourceAttributeOP(_p_attr_list, ATTR_stageout, "", stageout.c_str()); - - } else if ( (*it).first == QUEUE ) { - // Already done - - } else if ( (*it).first == STARTTIME ) { - - } else if ( (*it).first == TMPDIR ) { - - } else if ( (*it).first == USER ) { - st_second = (*it).second.str(); - setResourceAttributeOP(_p_attr_list, ATTR_u, "", st_second.c_str()); - - } - } - return *_p_attr_list; - } - - - // Convertit un objet Environnement en liste chainee d'attributs + operateur - struct attropl * Job_PBS::EnvironnementToAttributeOPList(struct attropl ** _p_attr_list, Environnement & E) - { - Environnement::iterator it; - for(it=E.begin(); it!=E.end(); it++) { - setResourceAttributeOP(_p_attr_list, ATTR_v, (*it).first.c_str(), ( (*it).first + "=" + (*it).second ).c_str()); - } - return *_p_attr_list; - } - - - // Ajoute les variables d'environnement presentes dans tout job PBS - void Job_PBS::addPBSEnvironnement(Environnement & E) - { - char * c; - - c = getenv("HOME"); - if (c) E["PBS_O_HOME"] = c; - - c = getenv("LANG"); - if (c) E["PBS_O_LANG"] = c; - - c = getenv("LOGNAME"); - if (c) E["PBS_O_LOGNAME"] = c; - - c = getenv("PATH"); - if (c) E["PBS_O_PATH"] = c; - - c = getenv("LD_LIBRARY_PATH"); - if (c) E["PBS_O_LD_LIBRARY_PATH"] = c; - - c = getenv("MAIL"); - if (c) E["PBS_O_MAIL"] = c; - - c = getenv("SHELL"); - if (c) E["PBS_O_SHELL"] = c; - - c = getenv("TZ"); - if (c) E["PBS_O_TZ"] = c; - - /* Recuperation du working directory */ - size_t size = 256; - char * buf = 0; - char * rc = 0; - do { - if (buf) delete[] buf; - buf = new char[size]; - rc = getcwd(buf, size); - size += size; - } while (!rc); - E["PBS_O_WORKDIR"] = buf; - delete[] buf; - } - - - // Ajoute un element (name,resource,value) a la liste chainee d'attributs - void Job_PBS::setResourceAttribute(struct attrl ** attr_list, const char * attr_name, const char * attr_resource, const char * attr_value) - { - // L'element (name,resource,value) existe-t-il deja ? si oui ptr != 0 - struct attrl * ptr = findResourceAttribute(*attr_list, attr_name, attr_resource); - - if (!ptr) { // L'attribut n'existe pas, il faut le creer - if (ptr = lastAttribute(*attr_list)) { // la liste n'est pas vide - ptr->next = new struct attrl; - ptr = ptr->next; - ptr->next = 0; - - } else { // la liste est completement vide - ptr = *attr_list = new struct attrl; - ptr->next = 0; - } - - // On remplit les champs (name,resource,value) - ptr->name = new char[strlen(attr_name) + 1]; - strncpy(ptr->name, attr_name, strlen(attr_name)); - ptr->name[strlen(attr_name)] = 0; - - ptr->resource = new char[strlen(attr_resource) + 1]; - strncpy(ptr->resource, attr_resource, strlen(attr_resource)); - ptr->resource[strlen(attr_resource)] = 0; - - ptr->value = new char[strlen(attr_value) + 1]; - strncpy(ptr->value, attr_value, strlen(attr_value)); - ptr->value[strlen(attr_value)] = 0; - - } else { // L'attribut existe, on change sa valeur - delete[] ptr->value; // On efface la valeur precedente - ptr->value = new char[strlen(attr_value) + 1]; - strncpy(ptr->value, attr_value, strlen(attr_value)); - ptr->value[strlen(attr_value)] = 0; - - } - } - - // Recherche un element (name,resource,value) dans la liste chainee d'attributs - struct attrl * Job_PBS::findResourceAttribute(struct attrl * attr_list, const char * attr_name, const char * attr_resource) - { - // On parcoure la liste chainee pour trouver l'element dont les champs name et resource coincident - struct attrl * ptr = attr_list; - while (ptr) { - if (!strcmp(ptr->name, attr_name) && !strcmp(ptr->resource, attr_resource)) break; - ptr = ptr->next; - } - return ptr; - } - - - // Recherche le dernier element de la liste chainee d'attributs - struct attrl * Job_PBS::lastAttribute(struct attrl * attr_list) - { - struct attrl * ptr = attr_list; - while (ptr && ptr->next) { - ptr = ptr->next; - } - return ptr; - } - - - // Constructeur - Job_PBS::Job_PBS(const Job & job) : _p_attropl(0), _p_attrl(0), _script(0), _destination(0) - { - Parametre P = job.getParametre(); - Parametre::iterator it; - - // On extrait de l'objet Parametre le champ EXECUTABLE qui deviendra le script PBS - if ( (it=P.find(EXECUTABLE)) != P.end()) { - Versatile V = (*it).second; - string st_exe = V.str(); - const char * exe = st_exe.c_str(); - int lg = strlen(exe); - _script = new char[lg + 1]; - for (int ii=0; iinext; - delete[] current_p_attropl->name; - delete[] current_p_attropl->resource; - delete[] current_p_attropl->value; - delete current_p_attropl; - current_p_attropl = next; - } - - // On detruit la liste chainee d'attributs - struct attrl * current_p_attrl = _p_attrl; - while (current_p_attrl) { - struct attrl * next = current_p_attrl->next; - delete[] current_p_attrl->name; - delete[] current_p_attrl->resource; - delete[] current_p_attrl->value; - delete current_p_attrl; - current_p_attrl = next; - } - - // On detruit les champs alloues - delete[] _script; - delete[] _destination; - } - - - // Accesseur - struct attropl * Job_PBS::getAttributesOP() - { - return _p_attropl; - } - - // Accesseur - // Cette methode sert pour les pbs_alter de PBS - // Pbs_alter est buggé par rapport a la specification ers_all.ps car les - // variables d'environnement ne sont pas supportees (ATTR_v) - struct attrl * Job_PBS::getAttributes() - { - if (_p_attrl == 0) { - - // On remplit la structure attrl a partir de la strucuture attropl - // (elles ne different que par le parametre op, mais elles ne sont pas interchangeables - // dans les appels) - - struct attropl * current_p_attropl = _p_attropl; - while (current_p_attropl) { - if (strcmp(current_p_attropl->name, ATTR_v)) // Bug fix for ATTR_v - setResourceAttribute(&_p_attrl, - current_p_attropl->name, - current_p_attropl->resource, - current_p_attropl->value); - - current_p_attropl = current_p_attropl->next; - } - - } - - return _p_attrl; - } - - // Accesseur - char * Job_PBS::getScript() - { - return _script; - } - - // Accesseur - char * Job_PBS::getDestination() - { - return _destination; - } - -} diff --git a/src/Batch/Batch_Job_PBS.hxx b/src/Batch/Batch_Job_PBS.hxx deleted file mode 100644 index 8124f1c61..000000000 --- a/src/Batch/Batch_Job_PBS.hxx +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * Job_PBS.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Fri Nov 14 11:00:39 2003 - * Projet : Salome 2 - * - */ - -#ifndef _JOB_PBS_H_ -#define _JOB_PBS_H_ - -extern "C" { - -#include -#include -} -#include "Batch_Job.hxx" - -namespace Batch { - - class Job_PBS - { - public: - // Constructeur et destructeur - Job_PBS(const Job & job); - virtual ~Job_PBS(); - - // Accesseurs - struct attropl * getAttributesOP(); - struct attrl * getAttributes(); - char * getScript(); - char * getDestination(); - - protected: - struct attropl * _p_attropl; // liste chainee d'attributs + operateur - struct attrl * _p_attrl; // liste chainee d'attributs - char * _script; // chemin d'acces au script du job - char * _destination; // queue dans laquelle le job est soumis - - private: - // Ajoute un element (name,resource,value) a la liste chainee d'attributs + operateur - void setResourceAttributeOP(struct attropl ** attr_list, const char * attr_name, const char * attr_resource, const char * attr_value); - - // Recherche un element (name,resource,value) dans la liste chainee d'attributs + operateur - struct attropl * findResourceAttributeOP(struct attropl * attr_list, const char * attr_name, const char * attr_resource); - - // Recherche le dernier element de la liste chainee d'attributs + operateur - struct attropl * lastAttributeOP(struct attropl * attr_list); - - // Convertit un objet Parametre en liste chainee d'attributs + operateur - struct attropl * ParametreToAttributeOPList(struct attropl ** _p_attr_list, Parametre & param); - - // Convertit un objet Environnement en liste chainee d'attributs + operateur - struct attropl * EnvironnementToAttributeOPList(struct attropl ** _p_attr_list, Environnement & env); - - // Ajoute les variables d'environnement presentes dans tout job PBS - void addPBSEnvironnement(Environnement & E); - - - // Ajoute un element (name,resource,value) a la liste chainee d'attributs - void setResourceAttribute(struct attrl ** attr_list, const char * attr_name, const char * attr_resource, const char * attr_value); - - // Recherche un element (name,resource,value) dans la liste chainee d'attributs - struct attrl * findResourceAttribute(struct attrl * attr_list, const char * attr_name, const char * attr_resource); - - // Recherche le dernier element de la liste chainee d'attributs - struct attrl * lastAttribute(struct attrl * attr_list); - - }; - -} - -#endif diff --git a/src/Batch/Batch_ListIsFullException.cxx b/src/Batch/Batch_ListIsFullException.cxx deleted file mode 100644 index 1da8c0e6d..000000000 --- a/src/Batch/Batch_ListIsFullException.cxx +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * ListIsFullException.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2003 - * Projet : SALOME 2 - * - */ - -#include "Batch_ListIsFullException.hxx" -using namespace std; - - -namespace Batch { - -} diff --git a/src/Batch/Batch_ListIsFullException.hxx b/src/Batch/Batch_ListIsFullException.hxx deleted file mode 100644 index bfb7ff88d..000000000 --- a/src/Batch/Batch_ListIsFullException.hxx +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * ListIsFullException.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2003 - * Projet : SALOME 2 - * - */ - -#ifndef _LISTISFULLEXCEPTION_H_ -#define _LISTISFULLEXCEPTION_H_ - -#include "Batch_Defines.hxx" - -#include "Batch_GenericException.hxx" - -namespace Batch { - - class BATCH_EXPORT ListIsFullException : public GenericException - { - public: - // Constructeur - ListIsFullException(std::string ch = "undefined") : GenericException("ListIsFullException", ch) {} - }; - -} - -#endif - diff --git a/src/Batch/Batch_LongType.cxx b/src/Batch/Batch_LongType.cxx deleted file mode 100644 index 867c2bcbb..000000000 --- a/src/Batch/Batch_LongType.cxx +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * LongType.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2003 - * Projet : SALOME 2 - * - */ - -#include -#include -#include -//#include "MEDMEM_STRING.hxx" -#include "Batch_LongType.hxx" -using namespace std; - -namespace Batch { - - // Conversion en chaine - string LongType::affiche() const - { - //MEDMEM::STRING sst; - ostringstream sst; - sst << _data; - return sst.str(); - } - - // Operateur d'affectation - LongType & LongType::operator =(long l) - { - _data = l; - return *this; - } - - // Conversion en long - LongType::operator long() const - { - return this->_data; - } - - // Clone duplique l'objet et en fabrique un nouveau a l'aide de new - // qu'il faudra detruire ensuite manuellement - GenericType * LongType::clone() const - { - LongType * pL = new LongType(this->_data); - assert(pL != 0); - return pL; - } - -} diff --git a/src/Batch/Batch_LongType.hxx b/src/Batch/Batch_LongType.hxx deleted file mode 100644 index 448035bfa..000000000 --- a/src/Batch/Batch_LongType.hxx +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * LongType.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2003 - * Projet : SALOME 2 - * - */ - -#ifndef _LONGTYPE_H_ -#define _LONGTYPE_H_ - -#include "Batch_Defines.hxx" - -#include -#include "Batch_GenericType.hxx" - -namespace Batch { - - class BATCH_EXPORT LongType : public GenericType - { - public: - // Constructeur - LongType(const long l=0L) : _data(l) {} - - // Conversion en chaine - virtual std::string affiche() const; - - // Operateur d'affectation - virtual LongType & operator =(long); - - // Conversion en long - virtual operator long() const; - - // Clone duplique l'objet et en fabrique un nouveau a l'aide de new - // qu'il faudra detruire ensuite manuellement - virtual GenericType * clone() const; - - protected: - long _data; - - private: - - }; - -} - -#endif diff --git a/src/Batch/Batch_MapKey.cxx b/src/Batch/Batch_MapKey.cxx deleted file mode 100644 index 0a4d40198..000000000 --- a/src/Batch/Batch_MapKey.cxx +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * MapKey.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Tue Oct 14 14:00:30 2003 - * Projet : Salome 2 - * - */ - -#include -#include "Batch_MapKey.hxx" -using namespace std; - -namespace Batch { - - -} - - -// COMMENTS diff --git a/src/Batch/Batch_MapKey.hxx b/src/Batch/Batch_MapKey.hxx deleted file mode 100644 index c4a7afe2a..000000000 --- a/src/Batch/Batch_MapKey.hxx +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * MapKey.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Tue Oct 14 14:00:29 2003 - * Projet : Salome 2 - * - */ - -#ifndef _MAPKEY_H_ -#define _MAPKEY_H_ - -#include "Batch_Defines.hxx" - - -#include - -namespace Batch { - - // une classe privee pour les differents types - // ces types ne peuvent pas etre redefinis - class BATCH_EXPORT MapKey : public std::string - { - private: - friend class Parametre; // seule la classe Parametre peut creer des MapKey - MapKey() : std::string() {} - MapKey(const MapKey & mk, size_type pos, size_type npos) : std::string(mk, pos, npos) {} - MapKey(const char * s, size_type n) : std::string(s, n) {} - MapKey(const char * s) : std::string(s) {} - MapKey(size_type n, char c) : std::string(n, c) {} -#ifdef __STL_MEMBER_TEMPLATES - template - MapKey(InputIterator __begin, InputIterator __end) : std::string(__begin, __end) {} -#else - MapKey(const_iterator __begin, const_iterator __end) : std::string(__begin, __end) {} -#endif - - public: - MapKey(const MapKey & mk) : std::string(mk) {} - - }; - -} - -#endif - -// COMMENTS diff --git a/src/Batch/Batch_NotYetImplementedException.cxx b/src/Batch/Batch_NotYetImplementedException.cxx deleted file mode 100644 index b9ef409f9..000000000 --- a/src/Batch/Batch_NotYetImplementedException.cxx +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * NotYetImplementedException.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Tue Nov 25 11:35:07 2003 - * Projet : Salome 2 - * - */ - -#include "Batch_NotYetImplementedException.hxx" - -namespace Batch { - -} - diff --git a/src/Batch/Batch_NotYetImplementedException.hxx b/src/Batch/Batch_NotYetImplementedException.hxx deleted file mode 100644 index 2f3b8b446..000000000 --- a/src/Batch/Batch_NotYetImplementedException.hxx +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * NotYetImplementedException.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Tue Nov 25 11:35:07 2003 - * Projet : Salome 2 - * - */ - -#ifndef _NOTYETIMPLEMENTEDEXCEPTION_H_ -#define _NOTYETIMPLEMENTEDEXCEPTION_H_ - -#include "Batch_Defines.hxx" -#include "Batch_GenericException.hxx" - -#include - -namespace Batch { - - class BATCH_EXPORT NotYetImplementedException : public GenericException - { - public: - // Constructeur - NotYetImplementedException(std::string ch = "undefined") : GenericException("NotYetImplementedException", ch) {} - }; - -} - -#endif - diff --git a/src/Batch/Batch_Parametre.cxx b/src/Batch/Batch_Parametre.cxx deleted file mode 100644 index c9d35f602..000000000 --- a/src/Batch/Batch_Parametre.cxx +++ /dev/null @@ -1,295 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * Parametre.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2003 - * Projet : SALOME 2 - * - */ - -#include "Batch_Versatile.hxx" -#include "Batch_InvalidKeyException.hxx" -#include "Batch_Parametre.hxx" - -using namespace std; - -// Definition des membres constants statiques -// Definition des noms globaux pour les clefs en tant que references -// TODO : supprimer les declarations statiques des clefs de la map -def_static_MapKey(ACCOUNT); -def_static_MapKey(ARGUMENTS); -def_static_MapKey(CHECKPOINT); -def_static_MapKey(CKPTINTERVAL); -def_static_MapKey(CREATIONTIME); -def_static_MapKey(EGROUP); -def_static_MapKey(ELIGIBLETIME); -def_static_MapKey(ENDTIME); -def_static_MapKey(EUSER); -def_static_MapKey(EXECUTABLE); -def_static_MapKey(EXECUTIONHOST); -def_static_MapKey(EXITCODE); -def_static_MapKey(HOLD); -def_static_MapKey(ID); -def_static_MapKey(INFILE); -def_static_MapKey(MAIL); -def_static_MapKey(MAXCPUTIME); -def_static_MapKey(MAXDISKSIZE); -def_static_MapKey(MAXRAMSIZE); -def_static_MapKey(MAXWALLTIME); -def_static_MapKey(MODIFICATIONTIME); -def_static_MapKey(NAME); -def_static_MapKey(NBPROC); -def_static_MapKey(OUTFILE); -def_static_MapKey(PID); -def_static_MapKey(QUEUE); -def_static_MapKey(QUEUEDTIME); -def_static_MapKey(SERVER); -def_static_MapKey(STARTTIME); -def_static_MapKey(STATE); -def_static_MapKey(TEXT); -def_static_MapKey(TMPDIR); -def_static_MapKey(USEDCPUTIME); -def_static_MapKey(USEDDISKSIZE); -def_static_MapKey(USEDRAMSIZE); -def_static_MapKey(USEDWALLTIME); -def_static_MapKey(USER); -def_static_MapKey(WORKDIR); -def_static_MapKey(HOMEDIR); - -namespace Batch { - - // Constructeur standard - // La map interne TypeMap possede les memes clefs que la map principale, mais les - // valeurs associees contiennent le type des clefs de la map principale ainsi que - // le nombre de valeurs autorisees dans l'objet Versatile (0=nombre quelconque, - // sinon valeur precisee) - Parametre::Parametre() : map< string, Versatile >() - { - TypeMap[ACCOUNT].type = STRING; - TypeMap[ACCOUNT].maxelem = 1; - - TypeMap[ARGUMENTS].type = STRING; - TypeMap[ARGUMENTS].maxelem = 0; - - TypeMap[CHECKPOINT].type = LONG; - TypeMap[CHECKPOINT].maxelem = 1; - - TypeMap[CKPTINTERVAL].type = LONG; - TypeMap[CKPTINTERVAL].maxelem = 1; - - TypeMap[CREATIONTIME].type = LONG; - TypeMap[CREATIONTIME].maxelem = 1; - - TypeMap[EGROUP].type = STRING; - TypeMap[EGROUP].maxelem = 1; - - TypeMap[ELIGIBLETIME].type = LONG; - TypeMap[ELIGIBLETIME].maxelem = 1; - - TypeMap[ENDTIME].type = LONG; - TypeMap[ENDTIME].maxelem = 1; - - TypeMap[EUSER].type = STRING; - TypeMap[EUSER].maxelem = 1; - - TypeMap[EXECUTABLE].type = STRING; - TypeMap[EXECUTABLE].maxelem = 1; - - TypeMap[EXECUTIONHOST].type = STRING; - TypeMap[EXECUTIONHOST].maxelem = 0; - - TypeMap[EXITCODE].type = LONG; - TypeMap[EXITCODE].maxelem = 1; - - TypeMap[HOLD].type = LONG; - TypeMap[HOLD].maxelem = 1; - - TypeMap[ID].type = STRING; - TypeMap[ID].maxelem = 1; - - TypeMap[INFILE].type = COUPLE; - TypeMap[INFILE].maxelem = 0; - - TypeMap[MAIL].type = STRING; - TypeMap[MAIL].maxelem = 1; - - TypeMap[MAXCPUTIME].type = LONG; - TypeMap[MAXCPUTIME].maxelem = 1; - - TypeMap[MAXDISKSIZE].type = LONG; - TypeMap[MAXDISKSIZE].maxelem = 1; - - TypeMap[MAXRAMSIZE].type = LONG; - TypeMap[MAXRAMSIZE].maxelem = 1; - - TypeMap[MAXWALLTIME].type = LONG; - TypeMap[MAXWALLTIME].maxelem = 1; - - TypeMap[MODIFICATIONTIME].type = LONG; - TypeMap[MODIFICATIONTIME].maxelem = 1; - - TypeMap[NAME].type = STRING; - TypeMap[NAME].maxelem = 1; - - TypeMap[NBPROC].type = LONG; - TypeMap[NBPROC].maxelem = 1; - - TypeMap[OUTFILE].type = COUPLE; - TypeMap[OUTFILE].maxelem = 0; - - TypeMap[PID].type = LONG; - TypeMap[PID].maxelem = 1; - - TypeMap[QUEUE].type = STRING; - TypeMap[QUEUE].maxelem = 1; - - TypeMap[QUEUEDTIME].type = LONG; - TypeMap[QUEUEDTIME].maxelem = 1; - - TypeMap[SERVER].type = STRING; - TypeMap[SERVER].maxelem = 1; - - TypeMap[STARTTIME].type = LONG; - TypeMap[STARTTIME].maxelem = 1; - - TypeMap[STATE].type = STRING; - TypeMap[STATE].maxelem = 1; - - TypeMap[TEXT].type = STRING; - TypeMap[TEXT].maxelem = 1; - - TypeMap[TMPDIR].type = STRING; - TypeMap[TMPDIR].maxelem = 1; - - TypeMap[USEDCPUTIME].type = LONG; - TypeMap[USEDCPUTIME].maxelem = 1; - - TypeMap[USEDDISKSIZE].type = LONG; - TypeMap[USEDDISKSIZE].maxelem = 1; - - TypeMap[USEDRAMSIZE].type = LONG; - TypeMap[USEDRAMSIZE].maxelem = 1; - - TypeMap[USEDWALLTIME].type = LONG; - TypeMap[USEDWALLTIME].maxelem = 1; - - TypeMap[USER].type = STRING; - TypeMap[USER].maxelem = 1; - - TypeMap[WORKDIR].type = STRING; - TypeMap[WORKDIR].maxelem = 1; - - TypeMap[HOMEDIR].type = STRING; - TypeMap[HOMEDIR].maxelem = 1; - } - - // Operateur de recherche dans la map - // Cet operateur agit sur les objets NON CONSTANTS, il autorise la modification de - // la valeur associée à la clef car il retourne une reference non constante - Versatile & Parametre::operator [] (const string & mk) - { - // On controle que la clef est valide - if (TypeMap.find(mk) == TypeMap.end()) throw InvalidKeyException(mk.c_str()); - - // On recherche la valeur associee... - Versatile & V = map< string, Versatile >::operator [] (mk); - - // ... et on l'initialise systematiquement - // ATTENTION : si un probleme de type survient (ie, on stocke une valeur d'un type - // different de celui inscrit dans TypeMap) une exception TypeMismatchException est - // levee - V.setName(mk); - V.setType(TypeMap[mk].type); - V.setMaxSize(TypeMap[mk].maxelem); - - return V; - } - - // Operateur de recherche dans la map - // Cet operateur agit sur les objets CONSTANTS - const Versatile & Parametre::operator [] (const string & mk) const - { - // On controle que la clef est valide - if (TypeMap.find(mk) == TypeMap.end()) throw InvalidKeyException(mk.c_str()); - - // On recherche la valeur associee - Parametre::const_iterator it = find(mk); - if (it == end()) throw InvalidKeyException(mk.c_str()); - const Versatile & V = (*it).second; - - return V; - } - - // Operateur d'affectation - Parametre & Parametre::operator =(const Parametre & PM) - { - // On ne reaffecte pas l'objet a lui-meme, sinon aie, aie, aie - if (this == &PM) return *this; - - // On efface toute la map - erase(begin(), end()); - - // On recopie la map interne - // Meme si cela ne sert a rien pour le moment car les maps internes sont identiques, - // il n'est pas exclu que dans un avenir proche elles puissent etre differentes - (*this).TypeMap = PM.TypeMap; - - // On recree la structure interne de la map avec les valeurs de celle passee en argument - Parametre::const_iterator it; - for(it=PM.begin(); it!=PM.end(); it++) - insert(make_pair( (*it).first , - Versatile( (*it).second) - ) ); - - return *this; - } - - // Constructeur par recopie - Parametre::Parametre(const Parametre & PM) - { - // inutile car l'objet est vierge : il vient d'etre cree - // On efface toute la map - // erase(begin(), end()); - - // On recopie la map interne - (*this).TypeMap = PM.TypeMap; - - // On cree la structure interne de la map avec les valeurs de celle passee en argument - Parametre::const_iterator it; - for(it=PM.begin(); - it!=PM.end(); - it++) - insert( - make_pair( - (*it).first , - Versatile( (*it).second) - ) ); - } - - // map< string, TypeParam > Parametre::getTypeMap() const - // { - // return TypeMap; - // } - -} diff --git a/src/Batch/Batch_Parametre.hxx b/src/Batch/Batch_Parametre.hxx deleted file mode 100644 index c572a73bf..000000000 --- a/src/Batch/Batch_Parametre.hxx +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * Parametre.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2003 - * Projet : SALOME 2 - * - */ - -#ifndef _PARAMETRE_H_ -#define _PARAMETRE_H_ - -#include "Batch_Defines.hxx" - -#include -#include -#include "Batch_InvalidKeyException.hxx" -#include "Batch_Versatile.hxx" - -// Ces macros permettent de simplifier l'ajout de nouvelles -// clefs dans la map Parametre -// TODO : remplacer ce mecanisme statique par la lecture -// TODO : d'une descrption dans un fichier exterieur (genre XML) - -#define def_extern_MapKey(mk) extern BATCH_EXPORT const std::string & mk; -#define def_static_MapKey(mk) const std::string Batch::Parametre::mk(#mk); \ - const std::string & mk = Batch::Parametre::mk; - -namespace Batch { - - class BATCH_EXPORT Parametre : public std::map< std::string, Versatile > - { - public: - // Constructeur standard - Parametre(); - - // Constructeur par recopie - Parametre(const Parametre & PM); - - // Operateur de recherche dans la map - Versatile & operator [] (const std::string &); - const Versatile & operator [] (const std::string &) const; - - // Operateur d'affectation - Parametre & operator =(const Parametre & PM); - - // Declarations statique des clefs de la map - // TODO : supprimer les declarations statiques des clefs de la map - static const std::string ACCOUNT; - static const std::string ARGUMENTS; - static const std::string CHECKPOINT; - static const std::string CKPTINTERVAL; - static const std::string CREATIONTIME; - static const std::string EGROUP; - static const std::string ELIGIBLETIME; - static const std::string ENDTIME; - static const std::string EUSER; - static const std::string EXECUTABLE; - static const std::string EXECUTIONHOST; - static const std::string EXITCODE; - static const std::string HOLD; - static const std::string ID; - static const std::string INFILE; - static const std::string MAIL; - static const std::string MAXCPUTIME; - static const std::string MAXDISKSIZE; - static const std::string MAXRAMSIZE; - static const std::string MAXWALLTIME; - static const std::string MODIFICATIONTIME; - static const std::string NAME; - static const std::string NBPROC; - static const std::string OUTFILE; - static const std::string PID; - static const std::string QUEUE; - static const std::string QUEUEDTIME; - static const std::string SERVER; - static const std::string STARTTIME; - static const std::string STATE; - static const std::string TEXT; - static const std::string TMPDIR; - static const std::string USEDCPUTIME; - static const std::string USEDDISKSIZE; - static const std::string USEDRAMSIZE; - static const std::string USEDWALLTIME; - static const std::string USER; - static const std::string WORKDIR; - static const std::string HOMEDIR; - - protected: - std::map< std::string, TypeParam > TypeMap; // map interne servant a controler le type de la valeur associee a chaque clef - - private: - - }; - -} - -def_extern_MapKey(ACCOUNT); -def_extern_MapKey(ARGUMENTS); -def_extern_MapKey(CHECKPOINT); -def_extern_MapKey(CKPTINTERVAL); -def_extern_MapKey(CREATIONTIME); -def_extern_MapKey(EGROUP); -def_extern_MapKey(ELIGIBLETIME); -def_extern_MapKey(ENDTIME); -def_extern_MapKey(EUSER); -def_extern_MapKey(EXECUTABLE); -def_extern_MapKey(EXECUTIONHOST); -def_extern_MapKey(EXITCODE); -def_extern_MapKey(HOLD); -def_extern_MapKey(ID); -def_extern_MapKey(INFILE); -def_extern_MapKey(MAIL); -def_extern_MapKey(MAXCPUTIME); -def_extern_MapKey(MAXDISKSIZE); -def_extern_MapKey(MAXRAMSIZE); -def_extern_MapKey(MAXWALLTIME); -def_extern_MapKey(MODIFICATIONTIME); -def_extern_MapKey(NAME); -def_extern_MapKey(NBPROC); -def_extern_MapKey(OUTFILE); -def_extern_MapKey(PID); -def_extern_MapKey(QUEUE); -def_extern_MapKey(QUEUEDTIME); -def_extern_MapKey(SERVER); -def_extern_MapKey(STARTTIME); -def_extern_MapKey(STATE); -def_extern_MapKey(TEXT); -def_extern_MapKey(TMPDIR); -def_extern_MapKey(USEDCPUTIME); -def_extern_MapKey(USEDDISKSIZE); -def_extern_MapKey(USEDRAMSIZE); -def_extern_MapKey(USEDWALLTIME); -def_extern_MapKey(USER); -def_extern_MapKey(WORKDIR); -def_extern_MapKey(HOMEDIR); - -#endif diff --git a/src/Batch/Batch_PyVersatile.cxx b/src/Batch/Batch_PyVersatile.cxx deleted file mode 100644 index 620cf5eca..000000000 --- a/src/Batch/Batch_PyVersatile.cxx +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * PyVersatile.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Mon Oct 13 12:01:12 2003 - * Projet : Salome 2 - * - */ - -#include -#include "Batch_TypeMismatchException.hxx" -#include "Batch_ListIsFullException.hxx" -#include "Batch_InvalidArgumentException.hxx" -#include "Batch_PyVersatile.hxx" -#include - -using namespace std; - -namespace Batch { - - // Constructeur a partir d'un objet Versatile - PyVersatile::PyVersatile(const Versatile & V) : Versatile(V) - { - // Nothing to do - } - - - // Constructeur a partir d'un PyObject - // Les objets autorises sont les strings et les ints, - // ainsi que les listes de strings - PyVersatile::PyVersatile(const PyObject * PyO) throw(TypeMismatchException, ListIsFullException, InvalidArgumentException) : Versatile() - { - PyObject * _PyO = const_cast(PyO); - - if (PyList_Check(_PyO)) { // c'est une liste - _maxsize = PyList_Size(_PyO); - for(int i=0; i<_maxsize; i++) { - PyObject * val = PyList_GetItem(_PyO, i); - if (PyString_Check(val)) { - *this += PyString_AsString(val); - - } else if (PyTuple_Check(val) && - (PyTuple_Size(val) == 2) && - PyString_Check( PyTuple_GetItem(val,0) ) && - PyString_Check( PyTuple_GetItem(val,1) ) ) { - *this += Couple( PyString_AsString( PyTuple_GetItem(val,0) ), - PyString_AsString( PyTuple_GetItem(val,1) ) - ); - - } else { - PyErr_SetString(PyExc_RuntimeWarning, "PyVersatile::PyVersatile(const PyObject * PyO) : invalid PyObject"); - } - } - - } else if (PyString_Check(_PyO)) { // c'est une string - const char * s = PyString_AsString(_PyO); - Versatile V = string(s); - *this = V; - - } else if (PyInt_Check(_PyO)) { // c'est un int - *this = PyInt_AsLong(_PyO); - - } else { // erreur - PyErr_SetString(PyExc_RuntimeWarning, "PyVersatile::PyVersatile(const PyObject * PyO) : invalid PyObject"); - } - } - - - - // Conversion de type vers un PyObject - PyVersatile::operator PyObject *() const - { - PyObject * obj; - - if (_maxsize != 1) { // une liste - obj = PyList_New(0); - for(Versatile::const_iterator it=begin(); it!=end(); it++) { -// char ch[2] = {0, 0}; - string st; - Couple cp; -// PyObject * tuple; - switch (_discriminator) { - // case BOOL: - // PyList_Append(obj, PyInt_FromLong(* static_cast(*it))); - // break; - - // case CHAR: - // *ch = * static_cast(*it); - // PyList_Append(obj, PyString_FromString(ch)); - // break; - - // case INT: - // PyList_Append(obj, PyInt_FromLong(* static_cast(*it))); - // break; - - case LONG: - PyList_Append(obj, PyInt_FromLong(* static_cast(*it))); - break; - - case STRING: - st = * static_cast(*it); - PyList_Append(obj, PyString_FromString(st.c_str())); - break; - - case COUPLE: - cp = * static_cast(*it); -// tuple = PyTuple_New(2); -// PyTuple_SetItem(tuple, 0, PyString_FromString( cp.getLocal().c_str() ) ); -// PyTuple_SetItem(tuple, 1, PyString_FromString( cp.getRemote().c_str() ) ); -// PyList_Append(obj, tuple); - PyList_Append(obj, Py_BuildValue("(ss)", cp.getLocal().c_str(), cp.getRemote().c_str() )); - break; - - case UNDEFINED: - PyList_Append(obj, Py_None); - break; - } - - } - - } else { // un scalaire -// char ch[2] = {0, 0}; - string st; - Couple cp; -// PyObject * tuple; - switch (_discriminator) { - // case BOOL: - // obj = PyInt_FromLong(* static_cast(front())); - // break; - - // case CHAR: - // *ch = * static_cast(front()); - // obj = PyString_FromString(ch); - // break; - - // case INT: - // obj = PyInt_FromLong(* static_cast(front())); - // break; - - case LONG: - obj = PyInt_FromLong(* static_cast(front())); - break; - - case STRING: - st = * static_cast(front()); - obj = PyString_FromString(st.c_str()); - break; - - case COUPLE: - cp = * static_cast(front()); -// tuple = PyTuple_New(2); -// PyTuple_SetItem(tuple, 0, PyString_FromString( cp.getLocal().c_str() ) ); -// PyTuple_SetItem(tuple, 1, PyString_FromString( cp.getRemote().c_str() ) ); -// obj = PyList_New(0); -// PyList_Append(obj, tuple); - obj = Py_BuildValue("[(ss)]", cp.getLocal().c_str(), cp.getRemote().c_str() ); - break; - - case UNDEFINED: - obj = Py_None; - break; - } - } - - return obj; - } - - - // Operateur d'affectation a partir d'un objet Versatile - PyVersatile & PyVersatile::operator =(const Versatile & V) - { - Versatile * me = this; - *me = V; - return *this; - } - -} - - -// COMMENTS diff --git a/src/Batch/Batch_PyVersatile.hxx b/src/Batch/Batch_PyVersatile.hxx deleted file mode 100644 index 41439fc6d..000000000 --- a/src/Batch/Batch_PyVersatile.hxx +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * PyVersatile.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Mon Oct 13 12:01:12 2003 - * Projet : Salome 2 - * - */ - -#ifndef _PYVERSATILE_H_ -#define _PYVERSATILE_H_ - - -#include "Batch_Defines.hxx" - -#include -#include "Batch_Versatile.hxx" -#include "Batch_TypeMismatchException.hxx" -#include "Batch_ListIsFullException.hxx" -#include "Batch_InvalidArgumentException.hxx" - -namespace Batch { - - class BATCH_EXPORT PyVersatile : public Versatile - { - public: - // Constructeur a partir d'un objet Versatile - PyVersatile(const Versatile &); - - // Constructeur a partir d'un PyObject - PyVersatile(const PyObject *) throw(TypeMismatchException, ListIsFullException, InvalidArgumentException); - - // Conversion de type vers un PyObject - operator PyObject *() const; - - // Operateur d'affectation a partir d'un objet Versatile - PyVersatile & operator =(const Versatile &); - - protected: - - private: - - }; - -} - -#endif diff --git a/src/Batch/Batch_RunTimeException.cxx b/src/Batch/Batch_RunTimeException.cxx deleted file mode 100644 index 3db54fdaf..000000000 --- a/src/Batch/Batch_RunTimeException.cxx +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * RunTimeException.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Tue Nov 25 14:04:13 2003 - * Projet : Salome 2 - * - */ - -#include "Batch_RunTimeException.hxx" -using namespace std; - -namespace Batch { - -} diff --git a/src/Batch/Batch_RunTimeException.hxx b/src/Batch/Batch_RunTimeException.hxx deleted file mode 100644 index bdb31489f..000000000 --- a/src/Batch/Batch_RunTimeException.hxx +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * RunTimeException.hxx : - * - * Auteur : %author% - EDF R&D - * Mail : mailto:ivan.dutka-malen@der.edf.fr - * Date : Tue Nov 25 14:04:13 2003 - * Projet : Salome 2 - * - */ - -#ifndef _RUNTIMEEXCEPTION_H_ -#define _RUNTIMEEXCEPTION_H_ - -#include "Batch_Defines.hxx" - - -#include "Batch_GenericException.hxx" - -namespace Batch { - - class BATCH_EXPORT RunTimeException : public GenericException - { - public: - // Constructeur - RunTimeException(std::string ch = "undefined") : GenericException("RunTimeException", ch) {} - }; - -} - -#endif diff --git a/src/Batch/Batch_StringType.cxx b/src/Batch/Batch_StringType.cxx deleted file mode 100644 index 33c7c5fd3..000000000 --- a/src/Batch/Batch_StringType.cxx +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * StringType.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2003 - * Projet : SALOME 2 - * - */ - -#include -#include -#include "Batch_StringType.hxx" -using namespace std; - -namespace Batch { - - // Conversion en chaine - string StringType::affiche() const - { - return _data; - } - - // Operateur d'affectation - StringType & StringType::operator =(string s) - { - _data = s; - return *this; - } - - // Conversion en chaine - StringType::operator string() const - { - return this->_data; - } - - // Clone duplique l'objet et en fabrique un nouveau a l'aide de new - // qu'il faudra detruire ensuite manuellement - GenericType * StringType::clone() const - { - StringType * pS = new StringType(this->_data); - assert(pS != 0); - return pS; - } - -} diff --git a/src/Batch/Batch_StringType.hxx b/src/Batch/Batch_StringType.hxx deleted file mode 100644 index fb5a80e0d..000000000 --- a/src/Batch/Batch_StringType.hxx +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * StringType.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2003 - * Projet : SALOME 2 - * - */ - -#ifndef _STRINGTYPE_H_ -#define _STRINGTYPE_H_ - -#include "Batch_Defines.hxx" - -#include -#include "Batch_GenericType.hxx" - -namespace Batch { - - class BATCH_EXPORT StringType : public GenericType - { - public: - // Constructeur - StringType(const std::string & s="") : _data(s) {} - - // Conversion en chaine - virtual std::string affiche() const; - virtual operator std::string() const; - - // Operateur d'affectation - virtual StringType & operator =(std::string); - - // Clone duplique l'objet et en fabrique un nouveau a l'aide de new - // qu'il faudra detruire ensuite manuellement - virtual GenericType * clone() const; - - protected: - std::string _data; - - private: - - }; - -} - -#endif diff --git a/src/Batch/Batch_TypeMismatchException.cxx b/src/Batch/Batch_TypeMismatchException.cxx deleted file mode 100644 index 96b30be4c..000000000 --- a/src/Batch/Batch_TypeMismatchException.cxx +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * TypeMismatchException.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2003 - * Projet : SALOME 2 - * - */ - -#include "Batch_TypeMismatchException.hxx" -using namespace std; - -namespace Batch { - -} diff --git a/src/Batch/Batch_TypeMismatchException.hxx b/src/Batch/Batch_TypeMismatchException.hxx deleted file mode 100644 index 10912f6fb..000000000 --- a/src/Batch/Batch_TypeMismatchException.hxx +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * TypeMismatchException.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2003 - * Projet : SALOME 2 - * - */ - -#ifndef _TYPEMISMATCHEXCEPTION_H_ -#define _TYPEMISMATCHEXCEPTION_H_ - -#include "Batch_Defines.hxx" - - -#include "Batch_GenericException.hxx" - -namespace Batch { - - class BATCH_EXPORT TypeMismatchException : public GenericException - { - public: - // Constructeur - TypeMismatchException(std::string ch = "undefined") : GenericException("TypeMismatchException", ch) {} - }; - -} - -#endif - diff --git a/src/Batch/Batch_Versatile.cxx b/src/Batch/Batch_Versatile.cxx deleted file mode 100644 index 00746006a..000000000 --- a/src/Batch/Batch_Versatile.cxx +++ /dev/null @@ -1,323 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * Versatile.cxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2003 - * Projet : SALOME 2 - * - */ - -#include -#include -#include -#include -#include -//#include "MEDMEM_STRING.hxx" -#include "Batch_GenericType.hxx" -#include "Batch_IntType.hxx" -#include "Batch_BoolType.hxx" -#include "Batch_CharType.hxx" -#include "Batch_LongType.hxx" -#include "Batch_StringType.hxx" -#include "Batch_Versatile.hxx" -#include "Batch_TypeMismatchException.hxx" -#include "Batch_ListIsFullException.hxx" -using namespace std; - -namespace Batch { - - // Constructeur par recopie - Versatile::Versatile(const Versatile & V) : _discriminator(V._discriminator), _maxsize(V._maxsize), _name(V._name) // , _str_value(0) - { - Versatile::const_iterator it; - - // On prend un a un les elements de l'objet passe en argument qu'on duplique - for(it=V.begin(); it!=V.end(); it++) - push_back( (*it)->clone() ); // Attention, la methode clone fait un new implicite - } - - // Destructeur - Versatile::~Versatile() - { - eraseAll(); - } - - // Operateur d'affectation entre objets - Versatile & Versatile::operator = (const Versatile & Vrhs) throw(TypeMismatchException) - { - // ATTENTION : le forçage de type leve une exception TypeMismatchException entre cas de conflit - setType(Vrhs._discriminator); - setMaxSize(Vrhs._maxsize); - _name = Vrhs._name; - - // On efface les donnees precedentes - eraseAll(); - - // On copie les donnees de Vrhs - Versatile::const_iterator it; - - for(it=Vrhs.begin(); it!=Vrhs.end(); it++) - push_back( (*it)->clone() ); // Attention, la methode clone fait un new implicite - - return *this; - } - - // Operateur d'affectation a partir d'un long - Versatile & Versatile::operator = (const long l) throw(TypeMismatchException) - { - // ATTENTION : le forçage de type leve une exception TypeMismatchException entre cas de conflit - setType(LONG); - - // On efface les donnees precedentes - eraseAll(); - - // On ajoute un element interne de type long a l'objet - LongType * pL = new LongType(l); - assert(pL != 0); - push_back(pL); - return *this; - } - - // Operateur d'affectation a partir d'une string - Versatile & Versatile::operator = (const string & ch) throw(TypeMismatchException) - { - // ATTENTION : le forçage de type leve une exception TypeMismatchException entre cas de conflit - setType(STRING); - - // On efface les donnees precedentes - eraseAll(); - - // On ajoute un element interne de type string a l'objet - StringType * pS = new StringType(ch); - assert(pS != 0); - push_back(pS); - - return *this; - } - - // Operateur de concatenation a partir d'une string - Versatile & Versatile::operator +=(const string & ch) throw(TypeMismatchException,ListIsFullException) - { - // ATTENTION : le forçage de type leve une exception TypeMismatchException entre cas de conflit - setType(STRING); - - // Si la taille maximale est atteinte, on leve une exception ListIsFullException - if (_maxsize == 0) push_back(new StringType(ch)); - else if ((_maxsize > 0) && (size() < _maxsize)) push_back(new StringType(ch)); - else { - //MEDMEM::STRING msg; - ostringstream msg; - msg << "Taille maximum : " << _maxsize; - throw(ListIsFullException(msg.str())); - } - return *this; - } - - // Operateur de concatenation a partir d'une string - Versatile & Versatile::operator , (const string & ch) throw(TypeMismatchException,ListIsFullException) - { - *this += ch; - return *this; - } - - // Operateur d'affectation a partir d'un Couple - Versatile & Versatile::operator = (const Couple & cp) throw(TypeMismatchException) - { - // ATTENTION : le forçage de type leve une exception TypeMismatchException entre cas de conflit - setType(COUPLE); - - // On efface les donnees precedentes - eraseAll(); - - // On ajoute un element interne de type Couple a l'objet - CoupleType * pC = new CoupleType(cp); - assert(pC != 0); - push_back(pC); - - return *this; - } - - // Operateur de concatenation a partir d'un Couple - Versatile & Versatile::operator +=(const Couple & cp) throw(TypeMismatchException,ListIsFullException) - { - // ATTENTION : le forçage de type leve une exception TypeMismatchException entre cas de conflit - setType(COUPLE); - - // Si la taille maximale est atteinte, on leve une exception ListIsFullException - if (_maxsize == 0) push_back(new CoupleType(cp)); - else if ((_maxsize > 0) && (size() < _maxsize)) push_back(new CoupleType(cp)); - else { - //MEDMEM::STRING msg; - ostringstream msg; - msg << "Taille maximum : " << _maxsize; - throw(ListIsFullException(msg.str())); - } - return *this; - } - - // Operateur de concatenation a partir d'un Couple - Versatile & Versatile::operator , (const Couple & cp) throw(TypeMismatchException,ListIsFullException) - { - *this += cp; - return *this; - } - - ostream & operator << (ostream & os, const Versatile & V) - { - Versatile::const_iterator it; - const char * sep = ""; - - for(it=V.begin(); it!=V.end(); it++, sep=" ") { - string s = (*it)->affiche(); - os << sep << s; - } - return os; - } - - // Positionnement du type de l'element interne - void Versatile::setType(DiscriminatorType t) throw(TypeMismatchException) - { - // Si le type est deja defini et ne correspond pas au type en argument - // une exception TypeMismatchException est levee - if ( (_discriminator == UNDEFINED) || (_discriminator == t) ) - _discriminator = t; - else { - //MEDMEM::STRING sst; - ostringstream sst; - sst << "Trying to change type of Versatile object \"" - << _name << "\""; - throw(TypeMismatchException(sst.str())); - } - } - - // Positionnement du nombre d'elements internes - void Versatile::setMaxSize(int i) - { - _maxsize = i; - if (i <= 0) return; - // Si la nouvelle taille est inferieure au nombre d'elements deja - // presents, les elements en surplus sont effaces (troncature) - if (size() > _maxsize) - { - int reste = size() - _maxsize; - Versatile::iterator it; - for(it=end(); (it!=begin()) && reste; it--, reste--) - { - delete back(); - pop_back(); - } - } - } - - - // Conversion de type vers un long - Versatile::operator long() const throw(TypeMismatchException) - { - // Si le type ne correspond pas ou si la liste contient plus d'un element, - // la conversion est impossible et une exception TypeMismatchException - // est levee - if ( (_maxsize != 1) || (_discriminator != LONG) || (size() == 0) ) { - //MEDMEM::STRING sst; - ostringstream sst; - sst << "Cannot cast Versatile object \"" - << _name << "\" to long"; - throw(TypeMismatchException(sst.str())); - } - return *( static_cast(this->front()) ); - } - - // Conversion de type vers un Couple - Versatile::operator Couple() const throw(TypeMismatchException) - { - // Si le type ne correspond pas ou si la liste contient plus d'un element, - // la conversion est impossible et une exception TypeMismatchException - // est levee - if ( (_maxsize != 1) || (_discriminator != COUPLE) || (size() == 0) ) { - //MEDMEM::STRING sst; - ostringstream sst; - sst << "Cannot cast Versatile object \"" - << _name << "\" to Couple"; - throw(TypeMismatchException(sst.str())); - } - return *( static_cast(this->front()) ); - } - - // Conversion de type vers une string - string Versatile::str() const throw(TypeMismatchException) - { - // Si le type ne correspond pas, la conversion est impossible et - // une exception TypeMismatchException est levee - if ( (_discriminator != STRING) || (size() == 0) ) { - //MEDMEM::STRING sst; - ostringstream sst; - sst << "Cannot cast Versatile object \"" - << _name << "\" to string"; - throw(TypeMismatchException(sst.str())); - } - - // La chaine renvoyee est la concatenation des chaines internes - string s; - Versatile::const_iterator it; - const char * sep = ""; - for(it=begin(); it!=end(); it++, s+=sep, sep=" ") - s += *( static_cast(*it)); - - return s; - } - - // Conversion de type vers une string - Versatile::operator string () const throw(TypeMismatchException) - { - return str(); - } - - // Efface tous les elements internes de l'objet - void Versatile::eraseAll() - { - while(!empty()) - { - delete back(); - pop_back(); - } - } - - - // Recuperation du type de l'element interne - DiscriminatorType Versatile::getType() const - { - return _discriminator; - } - - // Recuperation du nom de l'objet - string Versatile::getName() const - { - return _name; - } - - // Positionnement du nom de l'objet - void Versatile::setName(const string & name) - { - _name = name; - } -} diff --git a/src/Batch/Batch_Versatile.hxx b/src/Batch/Batch_Versatile.hxx deleted file mode 100644 index 92278b8f8..000000000 --- a/src/Batch/Batch_Versatile.hxx +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * Versatile.hxx : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2003 - * Projet : SALOME 2 - * - */ - -#ifndef _VERSATILE_H_ -#define _VERSATILE_H_ - -#include "Batch_Defines.hxx" - -#include -#include -#include -#include "Batch_GenericType.hxx" -#include "Batch_IntType.hxx" -#include "Batch_BoolType.hxx" -#include "Batch_CharType.hxx" -#include "Batch_LongType.hxx" -#include "Batch_StringType.hxx" -#include "Batch_CoupleType.hxx" -#include "Batch_TypeMismatchException.hxx" -#include "Batch_ListIsFullException.hxx" - -namespace Batch { - - // Les types autorises - // enum DiscriminatorType { UNDEFINED, BOOL, CHAR, INT, LONG, STRING}; - enum DiscriminatorType { UNDEFINED, LONG, STRING, COUPLE }; - - typedef struct { - DiscriminatorType type; // le type de l'element interne - int maxelem; // le nombre d'elements autorises - } TypeParam; - - class BATCH_EXPORT Versatile : public std::list< GenericType * > - { - public: - // Constructeur standard et destructeur - Versatile() : _discriminator(UNDEFINED), _maxsize(1), _name("undefined") {} - virtual ~Versatile(); - - // Constructeur par recopie - Versatile(const Versatile & V); - - // Constructeur depuis le type de "base" - Versatile(long l) : _discriminator(LONG), _maxsize(1), _name("long") { push_back(new LongType(l)); } - Versatile(const std::string & s) : _discriminator(STRING), _maxsize(1), _name("string") { push_back(new StringType(s)); } - Versatile(const Couple & c) : _discriminator(COUPLE), _maxsize(1), _name("couple") { push_back(new CoupleType(c)); } - - // Operateur d'affectation et de concatenation a partir d'un type de "base" - Versatile & operator = (const long l) throw(TypeMismatchException); - Versatile & operator = (const std::string & ch) throw(TypeMismatchException); - Versatile & operator +=(const std::string & ch) throw(TypeMismatchException,ListIsFullException); - Versatile & operator , (const std::string & ch) throw(TypeMismatchException,ListIsFullException); - Versatile & operator = (const Couple & cp) throw(TypeMismatchException); - Versatile & operator +=(const Couple & cp) throw(TypeMismatchException,ListIsFullException); - Versatile & operator , (const Couple & cp) throw(TypeMismatchException,ListIsFullException); - - // Operateur d'affectation entre objets - Versatile & operator = (const Versatile & V) throw(TypeMismatchException); - - // Conversion de type vers un type de "base" - operator long() const throw(TypeMismatchException); - operator std::string() const throw(TypeMismatchException); - operator Couple() const throw(TypeMismatchException); - std::string str() const throw(TypeMismatchException); - - // Operateur pour l'affichage sur un stream - friend std::ostream & operator << (std::ostream & os, const Versatile & ); - - // Positionnement et recuperation du type de l'element interne - void setType(DiscriminatorType) throw(TypeMismatchException); - DiscriminatorType getType() const; - - // Positionnement et recuperation du nombre d'elements internes - void setMaxSize(int i); - int getMaxSize() const { return _maxsize; } - - // Positionnement et recuperation du nom de l'objet - std::string getName() const; - void setName(const std::string & name); - - protected: - // Efface tous les elements internes de l'objet - virtual void eraseAll(); - - DiscriminatorType _discriminator; // type de l'element interne - int _maxsize; // nombre max d'elements internes - std::string _name; // nom de l'objet (sert pour les exceptions) - - private: - - }; - -} - -#endif - diff --git a/src/Batch/Makefile.am b/src/Batch/Makefile.am deleted file mode 100644 index e0bc1b719..000000000 --- a/src/Batch/Makefile.am +++ /dev/null @@ -1,237 +0,0 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -# -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# 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 -# -####################################### library -# SALOME Container : implementation of container and engine for Kernel -# File : Makefile.in -# Author : EDF -# Module : SALOME -# $Header$ -# -include $(top_srcdir)/salome_adm/unix/make_common_starter.am - -# header files -LIB_INCLUDES = \ - Batch_APIInternalFailureException.hxx \ - Batch_BatchManager.hxx \ - Batch_BatchManagerCatalog.hxx \ - Batch_BoolType.hxx \ - Batch_CharType.hxx \ - Batch_ConnexionFailureException.hxx \ - Batch_Couple.hxx \ - Batch_CoupleType.hxx \ - Batch_Date.hxx \ - Batch_DateType.hxx \ - Batch_Environnement.hxx \ - Batch_FactBatchManager.hxx \ - Batch_GenericException.hxx \ - Batch_GenericType.hxx \ - Batch_IntType.hxx \ - Batch_InvalidArgumentException.hxx \ - Batch_InvalidKeyException.hxx \ - Batch_Job.hxx \ - Batch_JobId.hxx \ - Batch_JobInfo.hxx \ - Batch_ListIsFullException.hxx \ - Batch_LongType.hxx \ - Batch_MapKey.hxx \ - Batch_NotYetImplementedException.hxx \ - Batch_Parametre.hxx \ - Batch_PyVersatile.hxx \ - Batch_RunTimeException.hxx \ - Batch_StringType.hxx \ - Batch_TypeMismatchException.hxx \ - Batch_BatchManager_eClient.hxx \ - Batch_FactBatchManager_eClient.hxx \ - Batch_BatchManager_eLSF.hxx \ - Batch_FactBatchManager_eLSF.hxx \ - Batch_JobInfo_eLSF.hxx \ - Batch_BatchManager_ePBS.hxx \ - Batch_FactBatchManager_ePBS.hxx \ - Batch_JobInfo_ePBS.hxx \ - MpiImpl.hxx \ - Batch_Defines.hxx \ - Batch_BatchManager_eSGE.hxx \ - Batch_FactBatchManager_eSGE.hxx \ - Batch_JobInfo_eSGE.hxx \ - MpiImpl.hxx - - -LIB_SRC = \ - Batch_APIInternalFailureException.cxx \ - Batch_BatchManager.cxx \ - Batch_BatchManagerCatalog.cxx \ - Batch_BoolType.cxx \ - Batch_CharType.cxx \ - Batch_ConnexionFailureException.cxx \ - Batch_Couple.cxx \ - Batch_CoupleType.cxx \ - Batch_Date.cxx \ - Batch_DateType.cxx \ - Batch_Environnement.cxx \ - Batch_FactBatchManager.cxx \ - Batch_GenericException.cxx \ - Batch_GenericType.cxx \ - Batch_IntType.cxx \ - Batch_InvalidArgumentException.cxx \ - Batch_InvalidKeyException.cxx \ - Batch_Job.cxx \ - Batch_JobId.cxx \ - Batch_JobInfo.cxx \ - Batch_ListIsFullException.cxx \ - Batch_LongType.cxx \ - Batch_MapKey.cxx \ - Batch_NotYetImplementedException.cxx \ - Batch_Parametre.cxx \ - Batch_PyVersatile.cxx \ - Batch_RunTimeException.cxx \ - Batch_StringType.cxx \ - Batch_TypeMismatchException.cxx \ - Batch_BatchManager_eClient.cxx \ - Batch_FactBatchManager_eClient.cxx \ - Batch_BatchManager_eLSF.cxx \ - Batch_FactBatchManager_eLSF.cxx \ - Batch_JobInfo_eLSF.cxx \ - Batch_BatchManager_ePBS.cxx \ - Batch_FactBatchManager_ePBS.cxx \ - Batch_JobInfo_ePBS.cxx \ - Batch_BatchManager_eSGE.cxx \ - Batch_FactBatchManager_eSGE.cxx \ - Batch_JobInfo_eSGE.cxx \ - MpiImpl.cxx - - -LIB_CPPFLAGS = \ - ${PYTHON_INCLUDES} -if !WITHONLYLAUNCHER - LIB_CPPFLAGS += \ - -I$(srcdir)/../Basics \ - -I$(top_builddir)/salome_adm/unix -endif - -LIB_LIBADD = -if !WITHONLYLAUNCHER - LIB_LIBADD += \ - ../Basics/libSALOMEBasics.la -endif - -LIB_LIBADD += $(PYTHON_LIBS) - -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# Special add for local batch system -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -if WITH_LOCAL -LIB_INCLUDES +=\ - Batch_Versatile.hxx \ - Batch_BatchManager_Local.hxx \ - Batch_BatchManager_Local_RSH.hxx \ - Batch_BatchManager_Local_SH.hxx \ - Batch_BatchManager_Local_SSH.hxx \ - Batch_FactBatchManager_Local.hxx \ - Batch_FactBatchManager_Local_RSH.hxx \ - Batch_FactBatchManager_Local_SH.hxx \ - Batch_FactBatchManager_Local_SSH.hxx \ - Batch_JobInfo_Local.hxx \ - Batch_Job_Local.hxx \ - Batch_IOMutex.hxx - -LIB_SRC +=\ - Batch_Versatile.cxx \ - Batch_BatchManager_Local.cxx \ - Batch_BatchManager_Local_RSH.cxx \ - Batch_BatchManager_Local_SH.cxx \ - Batch_BatchManager_Local_SSH.cxx \ - Batch_FactBatchManager_Local.cxx \ - Batch_FactBatchManager_Local_RSH.cxx \ - Batch_FactBatchManager_Local_SH.cxx \ - Batch_FactBatchManager_Local_SSH.cxx \ - Batch_JobInfo_Local.cxx \ - Batch_Job_Local.cxx \ - Batch_IOMutex.cxx - -if !WITHONLYLAUNCHER - LIB_CPPFLAGS += -DHAVE_CONFIG_H -endif - -endif - -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# Special add for openpbs batch system -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -if WITH_OPENPBS -LIB_INCLUDES += \ - Batch_BatchManager_PBS.hxx \ - Batch_FactBatchManager_PBS.hxx \ - Batch_JobInfo_PBS.hxx \ - Batch_Job_PBS.hxx - -LIB_SRC +=\ - Batch_BatchManager_PBS.cxx \ - Batch_FactBatchManager_PBS.cxx \ - Batch_JobInfo_PBS.cxx \ - Batch_Job_PBS.cxx - -LIB_CPPFLAGS += @OPENPBS_INCLUDES@ -LIB_LIBADD += @OPENPBS_LIBDIR@ @OPENPBS_LIBS@ - -endif - -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# Special add for lsf batch system -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -if WITH_LSF -LIB_INCLUDES += \ - Batch_BatchManager_LSF.hxx \ - Batch_FactBatchManager_LSF.hxx \ - Batch_JobInfo_LSF.hxx \ - Batch_Job_LSF.hxx - -LIB_SRC += \ - Batch_BatchManager_LSF.cxx \ - Batch_FactBatchManager_LSF.cxx \ - Batch_JobInfo_LSF.cxx \ - Batch_Job_LSF.cxx - -LIB_CPPFLAGS += ${LSF_INCLUDES} -LIB_LIBADD += ${LSF_LDFLAGS} ${LSF_LIBS} -endif - - - - -salomeinclude_HEADERS = $(LIB_INCLUDES) - -# -# =============================================================== -# Libraries targets -# =============================================================== -# -lib_LTLIBRARIES = libSalomeBatch.la -libSalomeBatch_la_SOURCES = $(LIB_SRC) -libSalomeBatch_la_CPPFLAGS = ${LIB_CPPFLAGS} -libSalomeBatch_la_LDFLAGS = -no-undefined -version-info=0:0:0 -libSalomeBatch_la_LIBADD = $(LIB_LIBADD) diff --git a/src/Batch/MpiImpl.cxx b/src/Batch/MpiImpl.cxx deleted file mode 100644 index 549158419..000000000 --- a/src/Batch/MpiImpl.cxx +++ /dev/null @@ -1,277 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// - -#include -#include -#include -#include "MpiImpl.hxx" - -using namespace std; - -// Constructor -MpiImpl::MpiImpl() -{ -} - -// Destructor -MpiImpl::~MpiImpl() -{ -} - -// lam implementation -// Constructor -MpiImpl_LAM::MpiImpl_LAM() : MpiImpl() -{ -} - -// Destructor -MpiImpl_LAM::~MpiImpl_LAM() -{ -} - -string MpiImpl_LAM::size() -{ - return "${LAMWORLD}"; -} - -string MpiImpl_LAM::rank() -{ - return "${LAMRANK}"; -} - -string MpiImpl_LAM::boot(const string machinefile, const unsigned int nbnodes) -{ - ostringstream oss; - oss << "lamboot " << machinefile << endl; - return oss.str(); -} - -string MpiImpl_LAM::run(const string machinefile, const unsigned int nbproc, const string fileNameToExecute) -{ - ostringstream oss; - oss << "mpirun -np " << nbproc << " " << fileNameToExecute << endl; - return oss.str(); -} - -string MpiImpl_LAM::halt() -{ - ostringstream oss; - oss << "lamhalt" << endl; - return oss.str(); -} - -// mpich1 implementation -// Constructor -MpiImpl_MPICH1::MpiImpl_MPICH1() : MpiImpl() -{ -} - -// Destructor -MpiImpl_MPICH1::~MpiImpl_MPICH1() -{ -} - -string MpiImpl_MPICH1::size() -{ - return "${MPIRUN_NPROCS}"; -} - -string MpiImpl_MPICH1::rank() -{ - return "${MPIRUN_RANK}"; -} - -string MpiImpl_MPICH1::boot(const string machinefile, const unsigned int nbnodes) -{ - return ""; -} - -string MpiImpl_MPICH1::run(const string machinefile, const unsigned int nbproc, const string fileNameToExecute) -{ - ostringstream oss; - oss << "mpirun -machinefile " << machinefile << " -np " << nbproc << " " << fileNameToExecute << endl; - return oss.str(); -} - -string MpiImpl_MPICH1::halt() -{ - return ""; -} - -// mpich2 implementation -// Constructor -MpiImpl_MPICH2::MpiImpl_MPICH2() : MpiImpl() -{ -} - -// Destructor -MpiImpl_MPICH2::~MpiImpl_MPICH2() -{ -} - -string MpiImpl_MPICH2::size() -{ - return "${PMI_SIZE}"; -} - -string MpiImpl_MPICH2::rank() -{ - return "${PMI_RANK}"; -} - -string MpiImpl_MPICH2::boot(const string machinefile, const unsigned int nbnodes) -{ - ostringstream oss; - oss << "mpdboot" << " -n " << nbnodes; - if (machinefile!="") - oss << " -f " << machinefile; - oss << endl; - return oss.str(); -} - -string MpiImpl_MPICH2::run(const string machinefile, const unsigned int nbproc, const string fileNameToExecute) -{ - ostringstream oss; - oss << "mpirun -np " << nbproc << " " << fileNameToExecute << endl; - return oss.str(); -} - -string MpiImpl_MPICH2::halt() -{ - ostringstream oss; - oss << "mpdallexit" << endl; - return oss.str(); -} - -// openmpi implementation -// Constructor -MpiImpl_OPENMPI::MpiImpl_OPENMPI() : MpiImpl() -{ -} - -// Destructor -MpiImpl_OPENMPI::~MpiImpl_OPENMPI() -{ -} - -string MpiImpl_OPENMPI::size() -{ - return "${OMPI_MCA_ns_nds_num_procs}"; -} - -string MpiImpl_OPENMPI::rank() -{ - return "${OMPI_MCA_ns_nds_vpid}"; -} - -string MpiImpl_OPENMPI::boot(const string machinefile, const unsigned int nbnodes) -{ - return ""; -} - -string MpiImpl_OPENMPI::run(const string machinefile, const unsigned int nbproc, const string fileNameToExecute) -{ - ostringstream oss; - oss << "mpirun -hostfile " << machinefile << " -np " << nbproc << " " << fileNameToExecute << endl; - return oss.str(); -} - -string MpiImpl_OPENMPI::halt() -{ - return ""; -} - -// slurm implementation -// Constructor -MpiImpl_SLURM::MpiImpl_SLURM() : MpiImpl() -{ -} - -// Destructor -MpiImpl_SLURM::~MpiImpl_SLURM() -{ -} - -string MpiImpl_SLURM::size() -{ - return "${SLURM_NPROCS}"; -} - -string MpiImpl_SLURM::rank() -{ - return "${SLURM_PROCID}"; -} - -string MpiImpl_SLURM::boot(const string machinefile, const unsigned int nbnodes) -{ - return ""; -} - -string MpiImpl_SLURM::run(const string machinefile, const unsigned int nbproc, const string fileNameToExecute) -{ - ostringstream oss; - oss << "srun " << fileNameToExecute << endl; - return oss.str(); -} - -string MpiImpl_SLURM::halt() -{ - return ""; -} - -// prun implementation -// Constructor -MpiImpl_PRUN::MpiImpl_PRUN() : MpiImpl() -{ -} - -// Destructor -MpiImpl_PRUN::~MpiImpl_PRUN() -{ -} - -string MpiImpl_PRUN::size() -{ - return "${RMS_NPROCS}"; -} - -string MpiImpl_PRUN::rank() -{ - return "${RMS_RANK}"; -} - -string MpiImpl_PRUN::boot(const string machinefile, const unsigned int nbnodes) -{ - return ""; -} - -string MpiImpl_PRUN::run(const string machinefile, const unsigned int nbproc, const string fileNameToExecute) -{ - ostringstream oss; - oss << "prun -n " << nbproc << " " << "-p mpi " << fileNameToExecute << endl; - return oss.str(); -} - -string MpiImpl_PRUN::halt() -{ - return ""; -} diff --git a/src/Batch/MpiImpl.hxx b/src/Batch/MpiImpl.hxx deleted file mode 100644 index 4639e6e85..000000000 --- a/src/Batch/MpiImpl.hxx +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// - -#ifndef _BL_MPIIMPL_H_ -#define _BL_MPIIMPL_H_ - -#include "Batch_Defines.hxx" -#include - -class BATCH_EXPORT MpiImplException -{ -public: - const std::string msg; - - MpiImplException(const std::string m) : msg(m) {} -}; - -class BATCH_EXPORT MpiImpl -{ -public: - // Constructeur et destructeur - MpiImpl(); // constrcuctor - virtual ~MpiImpl(); //Destructor - - virtual std::string size() = 0; // get number of process of current job - virtual std::string rank() = 0; // get process number of current job - virtual std::string boot(const std::string machinefile, const unsigned int nbnodes) = 0; // get boot command - virtual std::string run(const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute) = 0; // get run command - virtual std::string halt() = 0; // get stop command - -protected: - -private: - -}; - -class BATCH_EXPORT MpiImpl_LAM : public MpiImpl -{ -public: - // Constructeur et destructeur - MpiImpl_LAM(); // constructor - virtual ~MpiImpl_LAM(); //Destructor - - std::string size(); // get number of process of current job - std::string rank(); // get process number of current job - std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command - std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command - std::string halt(); // get stop command - -protected: - -private: - -}; - -class BATCH_EXPORT MpiImpl_MPICH1 : public MpiImpl -{ -public: - // Constructeur et destructeur - MpiImpl_MPICH1(); // constructor - virtual ~MpiImpl_MPICH1(); //Destructor - - std::string size(); // get number of process of current job - std::string rank(); // get process number of current job - std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command - std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command - std::string halt(); // get stop command - -protected: - -private: - -}; - -class BATCH_EXPORT MpiImpl_MPICH2 : public MpiImpl -{ -public: - // Constructeur et destructeur - MpiImpl_MPICH2(); // constructor - virtual ~MpiImpl_MPICH2(); //Destructor - - std::string size(); // get number of process of current job - std::string rank(); // get process number of current job - std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command - std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command - std::string halt(); // get stop command - -protected: - -private: - -}; - -class BATCH_EXPORT MpiImpl_OPENMPI : public MpiImpl -{ -public: - // Constructeur et destructeur - MpiImpl_OPENMPI(); // constructor - virtual ~MpiImpl_OPENMPI(); //Destructor - - std::string size(); // get number of process of current job - std::string rank(); // get process number of current job - std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command - std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command - std::string halt(); // get stop command - -protected: - -private: - -}; - -class BATCH_EXPORT MpiImpl_SLURM : public MpiImpl -{ -public: - // Constructeur et destructeur - MpiImpl_SLURM(); // constructor - virtual ~MpiImpl_SLURM(); //Destructor - - std::string size(); // get number of process of current job - std::string rank(); // get process number of current job - std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command - std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command - std::string halt(); // get stop command - -protected: - -private: - -}; - -class BATCH_EXPORT MpiImpl_PRUN : public MpiImpl -{ -public: - // Constructeur et destructeur - MpiImpl_PRUN(); // constructor - virtual ~MpiImpl_PRUN(); //Destructor - - std::string size(); // get number of process of current job - std::string rank(); // get process number of current job - std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command - std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command - std::string halt(); // get stop command - -protected: - -private: - -}; - -#endif diff --git a/src/Batch_SWIG/Batch_test.py b/src/Batch_SWIG/Batch_test.py deleted file mode 100644 index 500ef1b04..000000000 --- a/src/Batch_SWIG/Batch_test.py +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -# -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# 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 -# -#Batch_test.py -# pratique -# -import readline -import rlcompleter -readline.parse_and_bind('tab: complete') - -# Importation de la bibliotheque de classes Batch -from libBatch_Swig import * - -def work(): - # Definition d'un job... - job=Job() - # ... de ses parametres ... - p={} - p['EXECUTABLE']='/home/dutka/tmp/job' - p['NAME']='MonJob' - p['OUTFILE']=[('/tmp/stdout', 'stdout'), ('/tmp/stderr', 'stderr')] - job.setParametre(p) - # ... et de son environnement - job.setEnvironnement({}) - print job - - # Appel au catalogue de BatchManager pour accéder au serveur cli70cu - # Instanciation du catalogue (quasi-singleton) - c=BatchManagerCatalog() - # Instanciation d'une Factory de BatchManager de type 'PBS' - # fbm=c('PBS') - - # Creation d'un BatchManager de type PBS sur le serveur cli70cu - bm=c('PBS')('cli70cu') - - # Soumission du job au BatchManager - jobid=bm.submitJob(job) - print jobid - - # Interrogation de l'etat du job - jobid.queryJob() - - # On attend que le job soit termine - try: - while 1: jinfo = jobid.queryJob() - except: - print "Job", jobid, "is done" - - pass - -if __name__ == "__main__": - work() - pass - - - diff --git a/src/Batch_SWIG/Makefile.am b/src/Batch_SWIG/Makefile.am deleted file mode 100644 index 3f4539a2b..000000000 --- a/src/Batch_SWIG/Makefile.am +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -# -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# 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 -# -# File : Makefile.am -# Author : Guillaume Boulant (CSSI) -# Module : KERNEL -# $Header$ -# -include $(top_srcdir)/salome_adm/unix/make_common_starter.am - -# -# =============================================================== -# Swig targets -# =============================================================== -# (cf. http://www.geocities.com/foetsch/python/swig_linux.htm) -# -# Step 1: build the wrapping source files with swig -# -# libBatch_Swig.i -- swig --> swig_wrap.cpp -# libBatch_Swig.py -# -# Step 2: build the dynamic library from cpp built source files and -# dependant libraries. -# -# swig_wrap.cpp -- gcc --> swig_wrap.o |-- link --> _libBatch_Swig.la -# + | -# dependant libs | -# -# The file libBatch_Swig.py will be installed in -# /lib/python/site-package/salome. -# The library will be installed in the common place. -# - -BUILT_SOURCES = swig_wrap.cpp libBatch_Swig.py - -SWIG_FLAGS = @SWIG_FLAGS@ -I$(srcdir) -I$(srcdir)/../Batch -SWIGSOURCES = libBatch_Swig.i libBatch_Swig_exception.i libBatch_Swig_typemap.i - -salomepython_PYTHON = libBatch_Swig.py -salomepyexec_LTLIBRARIES = _libBatch_Swig.la -_libBatch_Swig_la_SOURCES = swig_wrap.cpp -_libBatch_Swig_la_CPPFLAGS = @PYTHON_INCLUDES@ -I$(srcdir) -I$(srcdir)/../Batch -_libBatch_Swig_la_LDFLAGS = -module -_libBatch_Swig_la_LIBADD = ../Batch/libSalomeBatch.la @PYTHON_LIBS@ - -if WITH_OPENPBS -_libBatch_Swig_la_CPPFLAGS += @OPENPBS_INCLUDES@ -_libBatch_Swig_la_LIBADD += @OPENPBS_LIBDIR@ @OPENPBS_LIBS@ -endif - -swig_wrap.cpp libBatch_Swig.py : $(SWIGSOURCES) - $(SWIG) $(SWIG_FLAGS) -o swig_wrap.cpp $< - -CLEANFILES = swig_wrap.cpp - -EXTRA_DIST = $(SWIGSOURCES) - -# -# =============================================================== -# Files to be installed -# =============================================================== -# - -# Scripts to be installed. -dist_salomescript_SCRIPTS = Batch_test.py - -# You don't need to specify libBatch_Swig.py. It is automatically -# installed by means of the swig target salomepython_PYTHON. diff --git a/src/Batch_SWIG/libBatch_Swig.i b/src/Batch_SWIG/libBatch_Swig.i deleted file mode 100644 index fc610e787..000000000 --- a/src/Batch_SWIG/libBatch_Swig.i +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * libBatch_Swig.i : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2003 - * Projet : SALOME 2 - * - */ - -/* ATTENTION: - ========== - Certaines classes ont des methodes surchargees et SWIG ne gere pas bien - ces surcharges, d'ou un probleme d'utilisation en Python de celles-ci. - En bref, ça ne marche pas et il faudra corriger le probleme... - - TODO : corriger le probleme de surcharge des methodes en Python - - IDM. -*/ - - -/* Le nom du module Python tel qu'il est importe */ -%module libBatch_Swig - -/* generate docstrings with types */ -%feature("autodoc", "1"); - -/* Inclusion des conversions de type */ -%include libBatch_Swig_typemap.i - -/* Inclusion de la gestion des exceptions */ -%include libBatch_Swig_exception.i - -%{ -#include "Batch_Defines.hxx" -#include "Batch_Job.hxx" -#include "Batch_JobId.hxx" -#include "Batch_JobInfo.hxx" - -#include "Batch_BatchManager.hxx" -#include "Batch_BatchManagerCatalog.hxx" -#include "Batch_FactBatchManager.hxx" -%} - -/* Les classes exportees en Python */ -%include Batch_Defines.hxx -%include Batch_Job.hxx -%include Batch_JobId.hxx -%include Batch_JobInfo.hxx - -%include Batch_BatchManager.hxx -%include Batch_BatchManagerCatalog.hxx -%include Batch_FactBatchManager.hxx - - - -/* Les methodes alterJob (surchargees et mal gerees en Python) sont - remplacees par des methodes setParametre et setEnvironnement. - cf. remarque ci-dessus. -*/ -%ignore JobId::alterJob(const Parametre & param, const Environnement & env) const; -%ignore JobId::alterJob(const Parametre & param) const; -%ignore JobId::alterJob(const Environnement & env) const; diff --git a/src/Batch_SWIG/libBatch_Swig_exception.i b/src/Batch_SWIG/libBatch_Swig_exception.i deleted file mode 100644 index 03c2b0e44..000000000 --- a/src/Batch_SWIG/libBatch_Swig_exception.i +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * _exception.i : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2003 - * Projet : SALOME 2 - * - */ - -%exception { - try { - $action - } - catch (Batch::GenericException & ex) { - std::string msg = ex.type + " : " + ex.message; - PyErr_SetString(PyExc_RuntimeWarning, msg.c_str()); - return NULL; - } - catch (...) { - PyErr_SetString(PyExc_RuntimeWarning, "unknown exception"); - return NULL; - } -} - diff --git a/src/Batch_SWIG/libBatch_Swig_typemap.i b/src/Batch_SWIG/libBatch_Swig_typemap.i deleted file mode 100644 index 6b2a01123..000000000 --- a/src/Batch_SWIG/libBatch_Swig_typemap.i +++ /dev/null @@ -1,247 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -/* - * _typemap.i : - * - * Auteur : Ivan DUTKA-MALEN - EDF R&D - * Date : Septembre 2003 - * Projet : SALOME 2 - * - */ - -%{ -#include -#include -#include -#include "Batch_Parametre.hxx" -#include "Batch_PyVersatile.hxx" -#include "Batch_JobId.hxx" -#include "Batch_FactBatchManager.hxx" -#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) -typedef int Py_ssize_t; -#define PY_SSIZE_T_MAX INT_MAX -#define PY_SSIZE_T_MIN INT_MIN -#endif -%} - -# // supprime toutes les definitions par defaut => sert au debug -# %typemap(in) SWIGTYPE ; - - -# // construction d'un dictionnaire Python a partir d'un objet BatchManagerCatalog C++ -%typemap(out) std::map * -{ - $result = PyDict_New(); - - // on itere sur toutes les clefs de la map - for(std::map::const_iterator it=(* $1).begin(); it!=(* $1).end(); it++) { - std::string key = (*it).first; - PyObject * obj = SWIG_NewPointerObj((void *) (*it).second, SWIGTYPE_p_Batch__FactBatchManager, 0); - PyDict_SetItem($result, PyString_FromString(key.c_str()), obj); - } -} - -%typemap(typecheck,precedence=SWIG_TYPECHECK_POINTER) Batch::Parametre -{ - $1 = PyDict_Check($input)? 1 : 0; -} - -# // construction d'un dictionnaire Python a partir d'un objet Parametre C++ -%typemap(out) Batch::Parametre -{ - $result = PyDict_New(); - - // on itere sur toutes les clefs de la map, et on passe par la classe PyVersatile - // qui convertit un Versatile en PyObject et vice versa - for(Batch::Parametre::const_iterator it=$1.begin(); it!=$1.end(); it++) { - std::string key = (*it).first; - Batch::PyVersatile PyV = (*it).second; - PyDict_SetItem($result, PyString_FromString(key.c_str()), PyV); - } -} - - -# // construction d'un objet Parametre C++ a partir d'un dictionnaire Python -%typemap(in) Batch::Parametre & (Batch::Parametre PM) -{ - if (!PyDict_Check($input)) { - PyErr_SetString(PyExc_ValueError,"Expected a dictionnary"); - return NULL; - } - - try { - // on itere sur toutes les clefs du dictionnaire, et on passe par la classe PyVersatile - // qui convertit un Versatile en PyObject et vice versa - PyObject *key, *value; - Py_ssize_t pos = 0; - while (PyDict_Next($input, &pos, &key, &value)) { - std::string mk = PyString_AsString(key); - Batch::PyVersatile PyV = value; - PyV.setName(mk); - PM[mk] = PyV; - } - - $1 = &PM; // $1 est une reference donc on lui passe une adresse - } - catch (Batch::GenericException & ex) { - std::string msg = ex.type + " : " + ex.message; - PyErr_SetString(PyExc_RuntimeWarning, msg.c_str()); - return NULL; - } - catch (...) { - PyErr_SetString(PyExc_RuntimeWarning, "unknown exception"); - return NULL; - } -} - - -# // construction d'un objet Parametre C++ a partir d'un dictionnaire Python -%typemap(in) Batch::Parametre (Batch::Parametre PM) -{ - if (!PyDict_Check($input)) { - PyErr_SetString(PyExc_ValueError,"Expected a dictionnary"); - return NULL; - } - - try { - // on itere sur toutes les clefs du dictionnaire, et on passe par la classe PyVersatile - // qui convertit un Versatile en PyObject et vice versa - PyObject *key, *value; - Py_ssize_t pos = 0; - while (PyDict_Next($input, &pos, &key, &value)) { - std::string mk = PyString_AsString(key); - Batch::PyVersatile PyV = value; - PyV.setName(mk); - PM[mk] = PyV; - } - - $1 = PM; - } - catch (Batch::GenericException & ex) { - std::string msg = ex.type + " : " + ex.message; - PyErr_SetString(PyExc_RuntimeWarning, msg.c_str()); - return NULL; - } - catch (...) { - PyErr_SetString(PyExc_RuntimeWarning, "unknown exception"); - return NULL; - } -} - -%typemap(typecheck,precedence=SWIG_TYPECHECK_POINTER) Batch::Environnement -{ - $1 = PyDict_Check($input)? 1 : 0; -} - -# // construction d'un dictionnaire Python a partir d'un objet Environnement C++ -%typemap(out) Batch::Environnement -{ - $result = PyDict_New(); - - // on itere sur toutes les clefs de la map - for(Batch::Environnement::const_iterator it=$1.begin(); it!=$1.end(); it++) { - std::string key = (*it).first; - std::string val = (*it).second; - PyDict_SetItem($result, - PyString_FromString(key.c_str()), - PyString_FromString(val.c_str())); - } -} - - -# // construction d'un objet Environnement C++ a partir d'un dictionnaire Python -%typemap(in) Batch::Environnement & (Batch::Environnement E) -{ - if (!PyDict_Check($input)) { - PyErr_SetString(PyExc_ValueError,"Expected a dictionnary"); - return NULL; - } - - // on itere sur toutes les clefs du dictionnaire - PyObject *key, *value; - Py_ssize_t pos = 0; - while (PyDict_Next($input, &pos, &key, &value)) { - std::string mk = PyString_AsString(key); - std::string val = PyString_AsString(value); - E[mk] = val; - } - - $1 = &E; // $1 est une reference donc on lui passe une adresse -} - - - -# // construction d'un objet Environnement C++ a partir d'un dictionnaire Python -%typemap(in) Batch::Environnement (Batch::Environnement E) -{ - if (!PyDict_Check($input)) { - PyErr_SetString(PyExc_ValueError,"Expected a dictionnary"); - return NULL; - } - - // on itere sur toutes les clefs du dictionnaire - PyObject *key, *value; - Py_ssize_t pos = 0; - while (PyDict_Next($input, &pos, &key, &value)) { - std::string mk = PyString_AsString(key); - std::string val = PyString_AsString(value); - E[mk] = val; - } - - $1 = E; -} - - - -# // construction d'une string Python a partir d'une string STL -%typemap(python,out) std::string -{ - $result = PyString_FromString($1.c_str()); -} - - - -# // construction d'une string STL a partir d'une string Python -#%typemap(in) string & (string S) -#{ -## if (!PyString_Check($input)) { -# PyErr_SetString(PyExc_ValueError,"Expected a string"); -# return NULL; -# } -# -# S = string(PyString_AsString($input)); -# $1 = &S; // $1 est une reference donc on lui passe une adresse -#} - - - -# // construction d'une string STL a partir d'une string Python -#%typemap(in) string (string S) -#{ -## if (!PyString_Check($input)) { -# PyErr_SetString(PyExc_ValueError,"Expected a string"); -# return NULL; -# } -# -# S = string(PyString_AsString($input)); -# $1 = S; -#} diff --git a/src/Communication/Makefile.am b/src/Communication/Makefile.am index 936d52524..6255807a8 100644 --- a/src/Communication/Makefile.am +++ b/src/Communication/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + include $(top_srcdir)/salome_adm/unix/make_common_starter.am # @@ -50,7 +51,6 @@ COMMON_CPPFLAGS=\ -I$(srcdir)/../Basics \ -I$(srcdir)/../SALOMELocalTrace \ -I$(srcdir)/../Utils \ - -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ diff --git a/src/Communication/MatrixClient.cxx b/src/Communication/MatrixClient.cxx index 10a5f77f8..0e195ae62 100644 --- a/src/Communication/MatrixClient.cxx +++ b/src/Communication/MatrixClient.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "MatrixClient.hxx" #include "ReceiverFactory.hxx" diff --git a/src/Communication/MatrixClient.hxx b/src/Communication/MatrixClient.hxx index b49961c96..06aa121ce 100644 --- a/src/Communication/MatrixClient.hxx +++ b/src/Communication/MatrixClient.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef __MATRIXCLIENT_HXX__ #define __MATRIXCLIENT_HXX__ diff --git a/src/Communication/MultiCommException.cxx b/src/Communication/MultiCommException.cxx index c55ae0c7b..589e238fe 100644 --- a/src/Communication/MultiCommException.cxx +++ b/src/Communication/MultiCommException.cxx @@ -1,26 +1,26 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "MultiCommException.hxx" -using namespace std; MultiCommException::MultiCommException(const char *message) { diff --git a/src/Communication/MultiCommException.hxx b/src/Communication/MultiCommException.hxx index 985bd752e..ebebd7fa4 100644 --- a/src/Communication/MultiCommException.hxx +++ b/src/Communication/MultiCommException.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef _MULTICOMMEXCEPTION_HXX_ #define _MULTICOMMEXCEPTION_HXX_ diff --git a/src/Communication/Receiver.cxx b/src/Communication/Receiver.cxx index d632318d4..ff240bc55 100644 --- a/src/Communication/Receiver.cxx +++ b/src/Communication/Receiver.cxx @@ -1,27 +1,27 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "Receiver.hxx" #include -using namespace std; /*! return a deep copy of the array contained in the servant. diff --git a/src/Communication/Receiver.hxx b/src/Communication/Receiver.hxx index 9b12136d1..006ddf44c 100644 --- a/src/Communication/Receiver.hxx +++ b/src/Communication/Receiver.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef _RECEIVER_HXX_ #define _RECEIVER_HXX_ diff --git a/src/Communication/ReceiverFactory.cxx b/src/Communication/ReceiverFactory.cxx index 4f86849dd..d805bc90b 100644 --- a/src/Communication/ReceiverFactory.cxx +++ b/src/Communication/ReceiverFactory.cxx @@ -1,30 +1,30 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifdef HAVE_MPI2 #include "mpi.h" #endif #include "ReceiverFactory.hxx" #include "Receivers.hxx" -using namespace std; #ifdef COMP_CORBA_DOUBLE #define CorbaDNoCopyReceiver CorbaNCNoCopyReceiver diff --git a/src/Communication/ReceiverFactory.hxx b/src/Communication/ReceiverFactory.hxx index 48a5bee76..c189aaec8 100644 --- a/src/Communication/ReceiverFactory.hxx +++ b/src/Communication/ReceiverFactory.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef _RECEIVERFACTORY_HXX_ #define _RECEIVERFACTORY_HXX_ diff --git a/src/Communication/Receivers.cxx b/src/Communication/Receivers.cxx index 6249f65eb..48ad995b9 100644 --- a/src/Communication/Receivers.cxx +++ b/src/Communication/Receivers.cxx @@ -1,27 +1,27 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "omniORB4/poa.h" #include "utilities.h" -using namespace std; #define TAILLE_SPLIT 100000 #define TIMEOUT 20 @@ -67,13 +67,13 @@ T *CorbaNCWithCopyReceiver::get for(long i=0;iTAILLE_SPLIT) - n=TAILLE_SPLIT; + n=TAILLE_SPLIT; else - n=size-i; + n=size-i; TSeqCorba seq=_mySender->sendPart(i,n); T *seqd=(T *)seq->get_buffer(0); for(long j=0;j::getDi for(long i=0;iTAILLE_SPLIT) - n=TAILLE_SPLIT; + n=TAILLE_SPLIT; else - n=size-i; + n=size-i; TSeqCorba seq=_mySender->sendPart(i,n); TCorba *seqd=seq->get_buffer(0); for(long j=0;j::get for(long i=0;iTAILLE_SPLIT) - n=TAILLE_SPLIT; + n=TAILLE_SPLIT; else - n=size-i; + n=size-i; TSeqCorba seq=_mySender->sendPart(i,n); TCorba *seqd=seq->get_buffer(0); for(long j=0;j::getDistValue(long &size){ MPI_Status status; MPI_Comm com; char port_name_clt [MPI_MAX_PORT_NAME]; - float telps, tuser, tsys, tcpu; T *_v; long _n; @@ -195,8 +194,8 @@ T *MPIReceiver::getDistValue(long &size){ else{ // Connect to service, get the inter-communicator server // Attention MPI_Comm_connect est un appel collectif : - // - Si lancement mpirun -c n -----> uniquement MPI_COMM_SELF fonctionne - // - Si lancement client_server&client_server ----> MPI_COMM_WORLD fonctionne + // - Si lancement mpirun -c n -----> uniquement MPI_COMM_SELF fonctionne + // - Si lancement client_server&client_server ----> MPI_COMM_WORLD fonctionne // TIMEOUT is inefficient since MPI_Comm_Connect doesn't return if we asked for // a service that has been unpublished ! @@ -282,12 +281,12 @@ T* SocketReceiver::getDistValue(long &siz while( n < size*sizeof(T) ){ m = read(_clientSockfd, (char*)v+n, size*sizeof(T)-n); if( m < 0 ){ - closeCom(); - delete [] v; - SALOME::ExceptionStruct es; - es.type = SALOME::COMM; - es.text = "error read Socket exception"; - throw SALOME::SALOME_Exception(es); + closeCom(); + delete [] v; + SALOME::ExceptionStruct es; + es.type = SALOME::COMM; + es.text = "error read Socket exception"; + throw SALOME::SALOME_Exception(es); } n += m; } @@ -300,9 +299,9 @@ T* SocketReceiver::getDistValue(long &siz catch(SALOME::SALOME_Exception &ex){ if( ex.details.type == SALOME::COMM ) { - _senderDestruc=false; - cout << ex.details.text << endl; - throw MultiCommException("Unknown sender protocol"); + _senderDestruc=false; + std::cout << ex.details.text << std::endl; + throw MultiCommException("Unknown sender protocol"); } else throw ex; @@ -330,9 +329,9 @@ void SocketReceiver::initCom() catch(SALOME::SALOME_Exception &ex){ if( ex.details.type == SALOME::COMM ) { - _senderDestruc=false; - cout << ex.details.text << endl; - throw MultiCommException("Unknown sender protocol"); + _senderDestruc=false; + std::cout << ex.details.text << std::endl; + throw MultiCommException("Unknown sender protocol"); } else throw ex; @@ -363,8 +362,8 @@ void SocketReceiver::connectCom(const cha serv_addr.sin_family = AF_INET; serv_addr.sin_addr.s_addr = INADDR_ANY; bcopy((char *)server->h_addr, - (char *)&serv_addr.sin_addr.s_addr, - server->h_length); + (char *)&serv_addr.sin_addr.s_addr, + server->h_length); serv_addr.sin_port = htons(port); if( connect(_clientSockfd, (struct sockaddr *) & serv_addr, sizeof(struct sockaddr)) < 0 ){ @@ -381,9 +380,9 @@ void SocketReceiver::connectCom(const cha catch(SALOME::SALOME_Exception &ex){ if( ex.details.type == SALOME::COMM ) { - _senderDestruc=false; - cout << ex.details.text << endl; - throw MultiCommException("Unknown sender protocol"); + _senderDestruc=false; + std::cout << ex.details.text << std::endl; + throw MultiCommException("Unknown sender protocol"); } else throw ex; diff --git a/src/Communication/Receivers.hxx b/src/Communication/Receivers.hxx index 045bda79b..09c43c578 100644 --- a/src/Communication/Receivers.hxx +++ b/src/Communication/Receivers.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef _RECEIVERS_HXX_ #define _RECEIVERS_HXX_ diff --git a/src/Communication/SALOMEMultiComm.cxx b/src/Communication/SALOMEMultiComm.cxx index e248cc2f4..9652efb77 100644 --- a/src/Communication/SALOMEMultiComm.cxx +++ b/src/Communication/SALOMEMultiComm.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "SALOMEMultiComm.hxx" SALOMEMultiComm::SALOMEMultiComm():_type(SALOME::CORBA_) diff --git a/src/Communication/SALOMEMultiComm.hxx b/src/Communication/SALOMEMultiComm.hxx index e271a9177..9c3a70282 100644 --- a/src/Communication/SALOMEMultiComm.hxx +++ b/src/Communication/SALOMEMultiComm.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef _SALOMEMULTICOMM_HXX_ #define _SALOMEMULTICOMM_HXX_ diff --git a/src/Communication/SALOME_Comm_i.cxx b/src/Communication/SALOME_Comm_i.cxx index e706c8d53..98f60f5c3 100644 --- a/src/Communication/SALOME_Comm_i.cxx +++ b/src/Communication/SALOME_Comm_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "SALOME_Comm_i.hxx" #ifndef WIN32 #include @@ -30,7 +31,6 @@ #include "utilities.h" #include "SenderFactory.hxx" -using namespace std; #ifndef WIN32 CORBA::ORB_var &getGlobalORB(){ @@ -240,7 +240,7 @@ SALOME_MPISender_i::~SALOME_MPISender_i(){ SALOME::MPISender::param* SALOME_MPISender_i::getParam() { char stag[12]; - int myproc,i=0; + int i=0; SALOME::MPISender::param_var p = new SALOME::MPISender::param; MPI_Comm_rank(MPI_COMM_WORLD,&_cproc); @@ -315,7 +315,6 @@ void* SALOME_MPISender_i::myThread(void *args) void SALOME_MPISender_i::close(const SALOME::MPISender::param& p) { std::string service(p.service); - const char *st=p.service; void *r; _newThr->join(&r); MPI_Comm_free(&_com); @@ -378,7 +377,7 @@ std::string SALOME_SocketSender_i::inetAddress() host = gethostbyname(s); if (host != NULL) inet_ntop(AF_INET, (struct in_addr *) *host->h_addr_list, - t, INET_ADDRSTRLEN); + t, INET_ADDRSTRLEN); } return std::string(t); } @@ -432,19 +431,19 @@ void* SALOME_SocketSender_i::myThread(void *args) *errorFlag = false; while( n < *lgrTabToSend*sizeof(double) ){ - m = write(*clientSockfd, (char*)tabToSend+n, *lgrTabToSend*sizeof(double)-n); - if( m < 0 ){ - if( *clientSockfd >= 0 ){ - ::close(*clientSockfd); - *clientSockfd = -1; - } - if( *serverSockfd >= 0 ){ - ::close(*serverSockfd); - *serverSockfd = -1; - } - *errorFlag = true; - } - n += m; + m = write(*clientSockfd, (char*)tabToSend+n, *lgrTabToSend*sizeof(double)-n); + if( m < 0 ){ + if( *clientSockfd >= 0 ){ + ::close(*clientSockfd); + *clientSockfd = -1; + } + if( *serverSockfd >= 0 ){ + ::close(*serverSockfd); + *serverSockfd = -1; + } + *errorFlag = true; + } + n += m; } xdr_destroy( &xp ); @@ -458,19 +457,19 @@ void* SALOME_SocketSender_i::myThread(void *args) *errorFlag = false; while( n < *lgrTabToSend*sizeof(int) ){ - m = write(*clientSockfd, (char*)tabToSend+n, *lgrTabToSend*sizeof(int)-n); - if( m < 0 ){ - if( *clientSockfd >= 0 ){ - ::close(*clientSockfd); - *clientSockfd = -1; - } - if( *serverSockfd >= 0 ){ - ::close(*serverSockfd); - *serverSockfd = -1; - } - *errorFlag = true; - } - n += m; + m = write(*clientSockfd, (char*)tabToSend+n, *lgrTabToSend*sizeof(int)-n); + if( m < 0 ){ + if( *clientSockfd >= 0 ){ + ::close(*clientSockfd); + *clientSockfd = -1; + } + if( *serverSockfd >= 0 ){ + ::close(*serverSockfd); + *serverSockfd = -1; + } + *errorFlag = true; + } + n += m; } xdr_destroy( &xp ); @@ -502,7 +501,7 @@ void SALOME_SocketSender_i::initCom() throw(SALOME::SALOME_Exception) /* Association of socket with a port */ if( ::bind(_serverSockfd, (struct sockaddr *) & serv_addr, - sizeof(struct sockaddr)) < 0 ) { + sizeof(struct sockaddr)) < 0 ) { closeCom(); es.type = SALOME::COMM; es.text = "error bind Socket exception"; diff --git a/src/Communication/SALOME_Comm_i.hxx b/src/Communication/SALOME_Comm_i.hxx index af386ba09..0ad8cde6b 100644 --- a/src/Communication/SALOME_Comm_i.hxx +++ b/src/Communication/SALOME_Comm_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef _SALOME_COMM_I_HXX_ #define _SALOME_COMM_I_HXX_ @@ -63,7 +64,7 @@ public: }; class COMMUNICATION_EXPORT SALOME_SenderDouble_i : public virtual POA_SALOME::SenderDouble, - public virtual SALOME_Sender_i + public virtual SALOME_Sender_i { public: SALOME_SenderDouble_i(const double *tabToSend,long lgrTabToSend,bool ownTabToSend=false); @@ -74,7 +75,7 @@ public: }; class COMMUNICATION_EXPORT SALOME_SenderInt_i : public virtual POA_SALOME::SenderInt, - public virtual SALOME_Sender_i + public virtual SALOME_Sender_i { public: SALOME_SenderInt_i(const int *tabToSend,long lgrTabToSend,bool ownTabToSend=false); @@ -87,7 +88,7 @@ public: /*! Servant class for CORBA sender for double* when no copy of array _tabToSend is required, that is to say double and CORBA::Double are binary equal. */ class COMMUNICATION_EXPORT SALOME_CorbaDoubleNCSender_i : public POA_SALOME::CorbaDoubleNCSender, - public SALOME_SenderDouble_i + public SALOME_SenderDouble_i { public: SALOME_CorbaDoubleNCSender_i(const double *tabToSend,long lgrTabToSend,bool ownTabToSend=false); @@ -100,7 +101,7 @@ public: /*! Servant class for CORBA sender for double* when copy of array _tabToSend is required, that is to say double and CORBA::Double are NOT binary equal. */ class COMMUNICATION_EXPORT SALOME_CorbaDoubleCSender_i : public POA_SALOME::CorbaDoubleCSender, - public SALOME_SenderDouble_i + public SALOME_SenderDouble_i { public: SALOME_CorbaDoubleCSender_i(const double *tabToSend,long lgrTabToSend,bool ownTabToSend=false); @@ -112,7 +113,7 @@ public: /*! Servant class for CORBA sender for int* when no copy of array _tabToSend is required, that is to say int and CORBA::Long are binary equal. */ class COMMUNICATION_EXPORT SALOME_CorbaLongNCSender_i : public POA_SALOME::CorbaLongNCSender, - public SALOME_SenderInt_i + public SALOME_SenderInt_i { public: SALOME_CorbaLongNCSender_i(const int *tabToSend,long lgrTabToSend,bool ownTabToSend=false); @@ -125,16 +126,13 @@ public: /*! Servant class for CORBA sender for int* when copy of array _tabToSend is required, that is to say int and CORBA::Long are NOT binary equal. */ class COMMUNICATION_EXPORT SALOME_CorbaLongCSender_i : public POA_SALOME::CorbaLongCSender, - public SALOME_SenderInt_i + public SALOME_SenderInt_i { public: SALOME_CorbaLongCSender_i(const int *tabToSend,long lgrTabToSend,bool ownTabToSend=false); ~SALOME_CorbaLongCSender_i(); CORBA::ULong getSize(); SALOME::vectorOfLong* sendPart(CORBA::ULong offset, CORBA::ULong length); -#ifndef WIN32 - SALOME::CorbaLongCSender_ptr _this(); -#endif }; #ifdef HAVE_MPI2 @@ -142,7 +140,7 @@ public: /*! Servant class of sender using MPI2. */ class COMMUNICATION_EXPORT SALOME_MPISender_i : public virtual POA_SALOME::MPISender, - public virtual SALOME_Sender_i + public virtual SALOME_Sender_i { private: static unsigned long _tag1; @@ -173,16 +171,16 @@ private: }; class COMMUNICATION_EXPORT SALOME_MPISenderDouble_i : public POA_SALOME::MPISenderDouble, - public SALOME_SenderDouble_i, - public SALOME_MPISender_i + public SALOME_SenderDouble_i, + public SALOME_MPISender_i { public: SALOME_MPISenderDouble_i(const double *tabToSend,long lgrTabToSend,bool ownTabToSend=false); }; class COMMUNICATION_EXPORT SALOME_MPISenderInt_i : public POA_SALOME::MPISenderInt, - public SALOME_SenderInt_i, - public SALOME_MPISender_i + public SALOME_SenderInt_i, + public SALOME_MPISender_i { public: SALOME_MPISenderInt_i(const int *tabToSend,long lgrTabToSend,bool ownTabToSend=false); @@ -195,7 +193,7 @@ public: /*! Servant class of sender using Sockets. */ class COMMUNICATION_EXPORT SALOME_SocketSender_i : public virtual POA_SALOME::SocketSender, - public virtual SALOME_Sender_i + public virtual SALOME_Sender_i { private: int _serverSockfd; @@ -222,16 +220,16 @@ private: }; class COMMUNICATION_EXPORT SALOME_SocketSenderDouble_i : public POA_SALOME::SocketSenderDouble, - public SALOME_SenderDouble_i, - public SALOME_SocketSender_i + public SALOME_SenderDouble_i, + public SALOME_SocketSender_i { public: SALOME_SocketSenderDouble_i(const double *tabToSend,long lgrTabToSend,bool ownTabToSend=false); }; class COMMUNICATION_EXPORT SALOME_SocketSenderInt_i : public POA_SALOME::SocketSenderInt, - public SALOME_SenderInt_i, - public SALOME_SocketSender_i + public SALOME_SenderInt_i, + public SALOME_SocketSender_i { public: SALOME_SocketSenderInt_i(const int *tabToSend,long lgrTabToSend,bool ownTabToSend=false); diff --git a/src/Communication/SALOME_Communication.hxx b/src/Communication/SALOME_Communication.hxx index 42a7392b3..e7c50f27b 100755 --- a/src/Communication/SALOME_Communication.hxx +++ b/src/Communication/SALOME_Communication.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOME_Communication.hxx // Author : Alexander A. BORODIN // Module : SALOME @@ -27,7 +28,7 @@ #define _SALOME_COMMIUNICATION_HXX_ #ifdef WIN32 -# ifdef COMMUNICATION_EXPORTS +# if defined COMMUNICATION_EXPORTS || defined SalomeCommunication_EXPORTS # define COMMUNICATION_EXPORT __declspec( dllexport ) # else # define COMMUNICATION_EXPORT __declspec( dllimport ) diff --git a/src/Communication/SALOME_Matrix_i.cxx b/src/Communication/SALOME_Matrix_i.cxx index 8fb95a2c4..c95c34487 100644 --- a/src/Communication/SALOME_Matrix_i.cxx +++ b/src/Communication/SALOME_Matrix_i.cxx @@ -1,32 +1,33 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "SALOME_Matrix_i.hxx" #include "SenderFactory.hxx" SALOME_Matrix_i::SALOME_Matrix_i(const SALOMEMultiComm& multiCommunicator,const double *tabToSend,int nbOfRow,int nbOfColumn,bool ownTabToSend):_tabToSend(tabToSend), - _nbOfRow(nbOfRow), - _nbOfColumn(nbOfColumn), - _ownTabToSend(ownTabToSend), - _type(multiCommunicator) + _nbOfRow(nbOfRow), + _nbOfColumn(nbOfColumn), + _ownTabToSend(ownTabToSend), + _type(multiCommunicator) { } diff --git a/src/Communication/SALOME_Matrix_i.hxx b/src/Communication/SALOME_Matrix_i.hxx index 5fe0e2c6f..a4408bab8 100644 --- a/src/Communication/SALOME_Matrix_i.hxx +++ b/src/Communication/SALOME_Matrix_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef __SALOME_MATRIX_I_HXX__ #define __SALOME_MATRIX_I_HXX__ diff --git a/src/Communication/SenderFactory.cxx b/src/Communication/SenderFactory.cxx index d0f38a4ab..3a49ec5c9 100644 --- a/src/Communication/SenderFactory.cxx +++ b/src/Communication/SenderFactory.cxx @@ -1,29 +1,29 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "SALOME_Comm_i.hxx" #include "SenderFactory.hxx" #include "utilities.h" #include "SALOMEMultiComm.hxx" -using namespace std; #ifdef COMP_CORBA_DOUBLE #define SALOME_CorbaDoubleSender SALOME_CorbaDoubleNCSender_i @@ -42,29 +42,29 @@ SALOME::SenderDouble_ptr SenderFactory::buildSender(SALOMEMultiComm &multiCommun { case SALOME::CORBA_: { - SALOME_CorbaDoubleSender * retc=new SALOME_CorbaDoubleSender(tab,lgr,ownTab); - return retc->_this(); + SALOME_CorbaDoubleSender * retc=new SALOME_CorbaDoubleSender(tab,lgr,ownTab); + return retc->_this(); } #ifdef HAVE_MPI2 case SALOME::MPI_: { - SALOME_MPISenderDouble_i* retm=new SALOME_MPISenderDouble_i(tab,lgr,ownTab); - return retm->_this(); + SALOME_MPISenderDouble_i* retm=new SALOME_MPISenderDouble_i(tab,lgr,ownTab); + return retm->_this(); } #endif #ifdef HAVE_SOCKET case SALOME::SOCKET_: { - SALOME_SocketSenderDouble_i* rets=new SALOME_SocketSenderDouble_i(tab,lgr,ownTab); - return rets->_this(); + SALOME_SocketSenderDouble_i* rets=new SALOME_SocketSenderDouble_i(tab,lgr,ownTab); + return rets->_this(); } #endif default: { - multiCommunicator.setProtocol(SALOME::CORBA_); - MESSAGE("PROTOCOL CHANGED TO CORBA"); - SALOME_CorbaDoubleSender * retc=new SALOME_CorbaDoubleSender(tab,lgr,ownTab); - return retc->_this(); + multiCommunicator.setProtocol(SALOME::CORBA_); + MESSAGE("PROTOCOL CHANGED TO CORBA"); + SALOME_CorbaDoubleSender * retc=new SALOME_CorbaDoubleSender(tab,lgr,ownTab); + return retc->_this(); } // throw MultiCommException("Communication protocol not implemented"); } @@ -75,28 +75,28 @@ SALOME::SenderInt_ptr SenderFactory::buildSender(SALOMEMultiComm &multiCommunica { case SALOME::CORBA_: { - SALOME_CorbaLongSender * retc=new SALOME_CorbaLongSender(tab,lgr,ownTab); - return retc->_this(); + SALOME_CorbaLongSender * retc=new SALOME_CorbaLongSender(tab,lgr,ownTab); + return retc->_this(); } #ifdef HAVE_MPI2 case SALOME::MPI_: { - SALOME_MPISenderInt_i* retm=new SALOME_MPISenderInt_i(tab,lgr,ownTab); - return retm->_this(); + SALOME_MPISenderInt_i* retm=new SALOME_MPISenderInt_i(tab,lgr,ownTab); + return retm->_this(); } #endif #ifdef HAVE_SOCKET case SALOME::SOCKET_: { - SALOME_SocketSenderInt_i* rets=new SALOME_SocketSenderInt_i(tab,lgr,ownTab); - return rets->_this(); + SALOME_SocketSenderInt_i* rets=new SALOME_SocketSenderInt_i(tab,lgr,ownTab); + return rets->_this(); } #endif default: { - multiCommunicator.setProtocol(SALOME::CORBA_); - SALOME_CorbaLongSender * retc=new SALOME_CorbaLongSender(tab,lgr,ownTab); - return retc->_this(); + multiCommunicator.setProtocol(SALOME::CORBA_); + SALOME_CorbaLongSender * retc=new SALOME_CorbaLongSender(tab,lgr,ownTab); + return retc->_this(); } // throw MultiCommException("Communication protocol not implemented"); } diff --git a/src/Communication/SenderFactory.hxx b/src/Communication/SenderFactory.hxx index fdce37761..743b0b5d7 100644 --- a/src/Communication/SenderFactory.hxx +++ b/src/Communication/SenderFactory.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef _SENDERFACTORY_HXX_ #define _SENDERFACTORY_HXX_ diff --git a/src/Communication_SWIG/Makefile.am b/src/Communication_SWIG/Makefile.am index 48ef7c401..9f03d8b56 100644 --- a/src/Communication_SWIG/Makefile.am +++ b/src/Communication_SWIG/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : Makefile.am # Author : Guillaume Boulant (CSSI) # Module : KERNEL @@ -64,7 +65,6 @@ _libSALOME_Comm_la_CPPFLAGS =\ -I$(srcdir)/../Basics \ -I$(srcdir)/../SALOMELocalTrace \ -I$(srcdir)/../Utils \ - -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ diff --git a/src/Communication_SWIG/libSALOME_Comm.i b/src/Communication_SWIG/libSALOME_Comm.i index d13560473..a26e36ca6 100644 --- a/src/Communication_SWIG/libSALOME_Comm.i +++ b/src/Communication_SWIG/libSALOME_Comm.i @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + %module libSALOME_Comm %feature("autodoc", "1"); @@ -26,9 +27,6 @@ %{ #include "ReceiverFactory.hxx" #include "MatrixClient.hxx" - #undef SEEK_SET - #undef SEEK_CUR - #undef SEEK_END #include "SALOME_Comm_i.hxx" #include "SALOMEMultiComm.hxx" #include "SenderFactory.hxx" diff --git a/src/Container/Component_i.cxx b/src/Container/Component_i.cxx index dfcae478f..3e77256aa 100644 --- a/src/Container/Component_i.cxx +++ b/src/Container/Component_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Container : implementation of container and engine for Kernel // File : Component_i.cxx // Author : Paul RASCLE, EDF - MARC TAJCHMAN, CEA @@ -47,30 +48,32 @@ int SIGUSR11 = 1000; #include #endif - -using namespace std; - extern bool _Sleeping ; static Engines_Component_i * theEngines_Component ; bool Engines_Component_i::_isMultiStudy = true; bool Engines_Component_i::_isMultiInstance = false; +/*! \class Engines_Component_i + * \brief C++ implementation of Engines::Component interface + * + */ + //============================================================================= /*! * Default constructor, not for use */ //============================================================================= -Engines_Component_i::Engines_Component_i():_myConnexionToRegistry(0), _notifSupplier(0) +Engines_Component_i::Engines_Component_i():_myConnexionToRegistry(0), _notifSupplier(0), _id(0) { //ASSERT(0); MESSAGE("Default Constructor, not for normal use..."); } //============================================================================= -/*! - * Standard Constructor for generic Component, used in derived class +/*! \brief Standard Constructor for generic Component, used in derived class + * * Connection to Registry and Notification * \param orb Object Request broker given by Container * \param poa Portable Object Adapter from Container (normally root_poa) @@ -78,15 +81,17 @@ Engines_Component_i::Engines_Component_i():_myConnexionToRegistry(0), _notifSupp * \param instanceName unique instance name for this object (see Container_i) * \param interfaceName component class name * \param notif use of notification + * \param regist (true or false) use of registry (default true) */ //============================================================================= Engines_Component_i::Engines_Component_i(CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName, - bool notif) : + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName, + bool notif, + bool regist ) : _instanceName(instanceName), _interfaceName(interfaceName), _myConnexionToRegistry(0), @@ -97,26 +102,32 @@ Engines_Component_i::Engines_Component_i(CORBA::ORB_ptr orb, _graphName("") , _nodeName(""), _studyId(-1), + _id(0), + _contId(0), _CanceledThread(false) { MESSAGE("Component constructor with instanceName "<< _instanceName); - //SCRUTE(pd_refCount); _orb = CORBA::ORB::_duplicate(orb); _poa = PortableServer::POA::_duplicate(poa); _contId = contId ; CORBA::Object_var o = _poa->id_to_reference(*contId); // container ior... _container=Engines::Container::_narrow(o); - const CORBA::String_var ior = _orb->object_to_string(o); - _myConnexionToRegistry = new RegistryConnexion(0, 0, ior,"theSession", - _instanceName.c_str()); + setContainerName(); - _notifSupplier = new NOTIFICATION_Supplier(instanceName, notif); - //SCRUTE(pd_refCount); + if(regist) + { + const CORBA::String_var ior = _orb->object_to_string(o); + _myConnexionToRegistry = new RegistryConnexion(0, 0, ior,"theSession", + _instanceName.c_str()); + } + + if(notif) + _notifSupplier = new NOTIFICATION_Supplier(instanceName, notif); } //============================================================================= -/*! - * Standard Constructor for standalone Component, used in derived class +/*! \brief Standard Constructor for standalone Component, used in derived class + * * Connection to Registry and Notification * \param orb Object Request broker given by Container * \param poa Portable Object Adapter from Container (normally root_poa) @@ -145,70 +156,24 @@ Engines_Component_i::Engines_Component_i(CORBA::ORB_ptr orb, _graphName("") , _nodeName(""), _studyId(-1), + _id(0), + _contId(0), _CanceledThread(false) { MESSAGE("Component constructor with instanceName "<< _instanceName); _orb = CORBA::ORB::_duplicate(orb); _poa = PortableServer::POA::_duplicate(poa); _container=Engines::Container::_duplicate(container); - try - { - _contId=_poa->reference_to_id(container); - } - catch(PortableServer::POA::WrongAdapter) - { - //not created by this poa - _contId = 0; - } + setContainerName(); const CORBA::String_var ior = _orb->object_to_string(_container); if(regist) _myConnexionToRegistry = new RegistryConnexion(0, 0, ior,"theSession", _instanceName.c_str()); - _notifSupplier = new NOTIFICATION_Supplier(instanceName, notif); -} - + if(notif) + _notifSupplier = new NOTIFICATION_Supplier(instanceName, notif); -//============================================================================= -/*! - * Standard constructor for parallel component - * Connection Notification (no connection to Registry !) - * \param orb Object Request broker given by Container - * \param poa Portable Object Adapter from Container (normally root_poa) - * \param contId container CORBA id inside the server - * \param instanceName unique instance name for this object (see Container_i) - * \param interfaceName component class name - * \param flag not used... - * \param notif use of notification - */ -//============================================================================= - -Engines_Component_i::Engines_Component_i(CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName, - int flag, - bool notif ) : - _instanceName(instanceName), - _interfaceName(interfaceName), - _myConnexionToRegistry(0), - _notifSupplier(0), - _ThreadId(0) , - _ThreadCpuUsed(0) , - _Executed(false) , - _graphName("") , - _nodeName(""), - _studyId(-1), - _CanceledThread(false) -{ - _orb = CORBA::ORB::_duplicate(orb); - _poa = PortableServer::POA::_duplicate(poa); - _contId = contId ; - CORBA::Object_var o = _poa->id_to_reference(*contId); // container ior... - _container=Engines::Container::_narrow(o); - - _notifSupplier = new NOTIFICATION_Supplier(instanceName, notif); } + //============================================================================= /*! * Destructor: call Container for decrement of instances count. @@ -222,7 +187,20 @@ Engines_Component_i::~Engines_Component_i() MESSAGE("Component destructor"); Engines_Container_i::decInstanceCnt(_interfaceName); if(_myConnexionToRegistry)delete _myConnexionToRegistry; - if(_notifSupplier)delete _notifSupplier; + _myConnexionToRegistry = 0 ; + + if(_id) delete _id; + _id=0; + + if(_notifSupplier) + { + SCRUTE(_notifSupplier->_refcount_value()); + PortableServer::POA_var poa=_notifSupplier->_default_POA(); + PortableServer::ObjectId_var anObjectId = poa->servant_to_id(_notifSupplier); + poa->deactivate_object(anObjectId.in()); + SCRUTE(_notifSupplier->_refcount_value()); + _notifSupplier->_remove_ref(); + } } //============================================================================= @@ -292,17 +270,11 @@ void Engines_Component_i::ping() void Engines_Component_i::destroy() { MESSAGE("Engines_Component_i::destroy()"); - //SCRUTE(pd_refCount); - - if(_myConnexionToRegistry)delete _myConnexionToRegistry; - _myConnexionToRegistry = 0 ; - if(_notifSupplier)delete _notifSupplier; - _notifSupplier = 0; - if(_id) - delete(_id) ; - //SCRUTE(pd_refCount); - _thisObj->_remove_ref(); - //SCRUTE(pd_refCount); + //SCRUTE(_refcount_value()); + _poa->deactivate_object(*_id); + //SCRUTE(_refcount_value()); + _remove_ref(); + //SCRUTE(_refcount_value()); MESSAGE("Engines_Component_i::destroyed") ; } @@ -351,7 +323,7 @@ Engines::FieldsDict* Engines_Component_i::getProperties() { Engines::FieldsDict_var copie = new Engines::FieldsDict; copie->length(_fieldsDict.size()); - map::iterator it; + std::map::iterator it; CORBA::ULong i = 0; for (it = _fieldsDict.begin(); it != _fieldsDict.end(); it++, i++) { @@ -362,6 +334,29 @@ Engines::FieldsDict* Engines_Component_i::getProperties() return copie._retn(); } +//============================================================================= +/*! + * CORBA method: + * This method is to set an option specific to a certain EngineComponent. + */ +//============================================================================= + +void Engines_Component_i::SetOption(const char*, const char*) +{ +} + +//============================================================================= +/*! + * CORBA method: + * This method is to get value of an option specific to a certain EngineComponent. + */ +//============================================================================= + +char* Engines_Component_i::GetOption(const char*) +{ + return CORBA::string_dup("") ; +} + //============================================================================= /*! * CORBA method: used by Supervision to give names to this instance @@ -423,14 +418,14 @@ bool Engines_Component_i::Stop_impl() MESSAGE("Engines_Component_i::Stop_i() pthread_t "<< pthread_self() << " pid " << getpid() << " instanceName " << _instanceName.c_str() << " interface " << _interfaceName.c_str() - << " machineName " << Kernel_Utils::GetHostname().c_str()<< " _id " << hex << _id - << dec << " _ThreadId " << _ThreadId ); + << " machineName " << Kernel_Utils::GetHostname().c_str()<< " _id " << std::hex << _id + << std::dec << " _ThreadId " << _ThreadId ); #else MESSAGE("Engines_Component_i::Stop_i() pthread_t "<< pthread_self().p << " pid " << _getpid() << " instanceName " << _instanceName.c_str() << " interface " << _interfaceName.c_str() - << " machineName " << Kernel_Utils::GetHostname().c_str()<< " _id " << hex << _id - << dec << " _ThreadId " << _ThreadId ); + << " machineName " << Kernel_Utils::GetHostname().c_str()<< " _id " << std::hex << _id + << std::dec << " _ThreadId " << _ThreadId ); #endif @@ -463,14 +458,14 @@ bool Engines_Component_i::Suspend_impl() MESSAGE("Engines_Component_i::Suspend_i() pthread_t "<< pthread_self() << " pid " << getpid() << " instanceName " << _instanceName.c_str() << " interface " << _interfaceName.c_str() - << " machineName " << Kernel_Utils::GetHostname().c_str()<< " _id " << hex << _id - << dec << " _ThreadId " << _ThreadId ); + << " machineName " << Kernel_Utils::GetHostname().c_str()<< " _id " << std::hex << _id + << std::dec << " _ThreadId " << _ThreadId ); #else MESSAGE("Engines_Component_i::Suspend_i() pthread_t "<< pthread_self().p << " pid " << _getpid() << " instanceName " << _instanceName.c_str() << " interface " << _interfaceName.c_str() - << " machineName " << Kernel_Utils::GetHostname().c_str()<< " _id " << hex << _id - << dec << " _ThreadId " << _ThreadId ); + << " machineName " << Kernel_Utils::GetHostname().c_str()<< " _id " << std::hex << _id + << std::dec << " _ThreadId " << _ThreadId ); #endif bool RetVal = false ; @@ -481,17 +476,17 @@ bool Engines_Component_i::Suspend_impl() #endif { if ( _Sleeping ) - { - return false ; - } + { + return false ; + } else { #ifndef WIN32 - RetVal = Killer( _ThreadId ,SIGINT ) ; + RetVal = Killer( _ThreadId ,SIGINT ) ; #else - RetVal = Killer( *_ThreadId ,SIGINT ) ; + RetVal = Killer( *_ThreadId ,SIGINT ) ; #endif - //if ( RetVal ) _Sleeping = true; + //if ( RetVal ) _Sleeping = true; } } @@ -510,14 +505,14 @@ bool Engines_Component_i::Resume_impl() MESSAGE("Engines_Component_i::Resume_i() pthread_t "<< pthread_self() << " pid " << getpid() << " instanceName " << _instanceName.c_str() << " interface " << _interfaceName.c_str() - << " machineName " << Kernel_Utils::GetHostname().c_str()<< " _id " << hex << _id - << dec << " _ThreadId " << _ThreadId ); + << " machineName " << Kernel_Utils::GetHostname().c_str()<< " _id " << std::hex << _id + << std::dec << " _ThreadId " << _ThreadId ); #else MESSAGE("Engines_Component_i::Resume_i() pthread_t "<< pthread_self().p << " pid " << _getpid() << " instanceName " << _instanceName.c_str() << " interface " << _interfaceName.c_str() - << " machineName " << Kernel_Utils::GetHostname().c_str()<< " _id " << hex << _id - << dec << " _ThreadId " << _ThreadId ); + << " machineName " << Kernel_Utils::GetHostname().c_str()<< " _id " << std::hex << _id + << std::dec << " _ThreadId " << _ThreadId ); #endif bool RetVal = false ; #ifndef WIN32 @@ -528,12 +523,12 @@ bool Engines_Component_i::Resume_impl() { if ( _Sleeping ) { - _Sleeping = false ; - RetVal = true ; + _Sleeping = false ; + RetVal = true ; } else { - RetVal = false ; + RetVal = false ; } } return RetVal ; @@ -557,35 +552,35 @@ CORBA::Long Engines_Component_i::CpuUsed_impl() #else if ( pthread_self().p != _ThreadId->p ) #endif - { + { if ( _Sleeping ) - { - } + { + } else - { - // Get Cpu in the appropriate thread with that object !... - theEngines_Component = this ; + { + // Get Cpu in the appropriate thread with that object !... + theEngines_Component = this ; #ifndef WIN32 - Killer( _ThreadId ,SIGUSR1 ) ; + Killer( _ThreadId ,SIGUSR1 ) ; #else - Killer( *_ThreadId ,SIGUSR11 ) ; + Killer( *_ThreadId ,SIGUSR11 ) ; #endif - } + } cpu = _ThreadCpuUsed ; - } + } else - { - _ThreadCpuUsed = CpuUsed() ; - cpu = _ThreadCpuUsed ; - // cout << pthread_self() << " Engines_Component_i::CpuUsed_impl " - // << _serviceName << " " << cpu << endl ; + { + _ThreadCpuUsed = CpuUsed() ; + cpu = _ThreadCpuUsed ; + // cout << pthread_self() << " Engines_Component_i::CpuUsed_impl " + // << _serviceName << " " << cpu << endl ; } } else { - cpu = _ThreadCpuUsed ; - // cout << pthread_self() << " Engines_Component_i::CpuUsed_impl " - // << _serviceName << " " << cpu<< endl ; + cpu = _ThreadCpuUsed ; + // cout << pthread_self() << " Engines_Component_i::CpuUsed_impl " + // << _serviceName << " " << cpu<< endl ; } } else @@ -605,7 +600,8 @@ CORBA::Long Engines_Component_i::CpuUsed_impl() Engines_Container_i *Engines_Component_i::GetContainerPtr() { - return dynamic_cast(_poa->id_to_servant(*_contId)) ; + PortableServer::ObjectId_var contId=_poa->reference_to_id(_container); + return dynamic_cast(_poa->id_to_servant(contId)) ; } //============================================================================= @@ -654,13 +650,8 @@ PortableServer::ObjectId * Engines_Component_i::getId() void Engines_Component_i::beginService(const char *serviceName) { -#ifndef WIN32 - MESSAGE(pthread_self() << "Send BeginService notification for " <::iterator it; + + // --- all strings given with setProperties are set in environment + std::map::iterator it; for (it = _fieldsDict.begin(); it != _fieldsDict.end(); it++) { std::string cle((*it).first); if ((*it).second.type()->kind() == CORBA::tk_string) - { - const char* value; - (*it).second >>= value; - // ---todo: replace __GNUC__ test by an autoconf macro AC_CHECK_FUNC. -#if defined __GNUC__ -// int ret = setenv(cle.c_str(), value, overwrite); - setenv(cle.c_str(), value, overwrite); -#else - //CCRT porting : setenv not defined in stdlib.h - std::string s(cle); - s+='='; - s+=value; - // char* cast because 1st arg of linux putenv function - // is not a const char* ! -// int ret=putenv((char *)s.c_str()); - putenv((char *)s.c_str()); - //End of CCRT porting -#endif - MESSAGE("--- setenv: "<>= value; + std::string s(cle); + s+='='; + s+=value; + putenv((char *)s.c_str()); + MESSAGE("--- setenv: "<Send(_graphName.c_str(), _nodeName.c_str(), event_type, message); } @@ -915,9 +889,9 @@ void Engines_Component_i::sendMessage(const char *event_type, */ //============================================================================= -string Engines_Component_i::GetDynLibraryName(const char *componentName) +std::string Engines_Component_i::GetDynLibraryName(const char *componentName) { - string ret="lib"; + std::string ret="lib"; ret+=componentName; ret+="Engine.so"; return ret; @@ -930,10 +904,11 @@ string Engines_Component_i::GetDynLibraryName(const char *componentName) //============================================================================= Engines::TMPFile* Engines_Component_i::DumpPython(CORBA::Object_ptr theStudy, - CORBA::Boolean isPublished, - CORBA::Boolean& isValidScript) + CORBA::Boolean isPublished, + CORBA::Boolean isMultiFile, + CORBA::Boolean& isValidScript) { - const char* aScript = "def RebuildData(theStudy): pass"; + const char* aScript = isMultiFile ? "def RebuildData(theStudy): pass" : ""; char* aBuffer = new char[strlen(aScript)+1]; strcpy(aBuffer, aScript); CORBA::Octet* anOctetBuf = (CORBA::Octet*)aBuffer; @@ -945,7 +920,7 @@ Engines::TMPFile* Engines_Component_i::DumpPython(CORBA::Object_ptr theStudy, Engines::Salome_file_ptr Engines_Component_i::getInputFileToService(const char* service_name, - const char* Salome_file_name) + const char* Salome_file_name) { // Try to find the service, if it doesn't exist, we throw an exception. _Service_file_map_it = _Input_Service_file_map.find(service_name); @@ -972,7 +947,7 @@ Engines_Component_i::getInputFileToService(const char* service_name, Engines::Salome_file_ptr Engines_Component_i::setInputFileToService(const char* service_name, - const char* Salome_file_name) + const char* Salome_file_name) { // Try to find the service, if it doesn't exist, we add it. _Service_file_map_it = _Input_Service_file_map.find(service_name); @@ -1016,7 +991,7 @@ Engines_Component_i::checkInputFilesToService(const char* service_name) Engines::Salome_file_ptr Engines_Component_i::getOutputFileToService(const char* service_name, - const char* Salome_file_name) + const char* Salome_file_name) { // Try to find the service, if it doesn't exist, we throw an exception. _Service_file_map_it = _Output_Service_file_map.find(service_name); @@ -1043,7 +1018,7 @@ Engines_Component_i::getOutputFileToService(const char* service_name, Engines::Salome_file_ptr Engines_Component_i::setOutputFileToService(const char* service_name, - const char* Salome_file_name) + const char* Salome_file_name) { // Try to find the service, if it doesn't exist, we add it. _Service_file_map_it = _Output_Service_file_map.find(service_name); @@ -1096,9 +1071,37 @@ Engines_Component_i::checkOutputFilesToService(const char* service_name) //============================================================================= void Engines_Component_i::configureSalome_file(std::string service_name, - std::string file_port_name, - Salome_file_i * file) + std::string file_port_name, + Salome_file_i * file) { // By default this method does nothing } +//============================================================================= +/*! + * C++ method: return the name of the container associated with this component + * This name does not contains the "/Containers" string and all "/" are replaced by "_" + * \return the container name (reformatted) + */ +//============================================================================= +std::string Engines_Component_i::getContainerName() +{ + return _containerName; +} +//============================================================================= +/*! + * C++ method: set the name of the container associated with this component (attribute _containerName) + * This name does not contains the "/Containers" string and all "/" are replaced by "_" + * \return the container name (reformatted) + */ +//============================================================================= +void Engines_Component_i::setContainerName() +{ + CORBA::String_var containerName=_container->name(); + std::string name(containerName); + name.erase(0,12); + std::string::size_type slash =name.find_first_of('/'); + if(slash != std::string::npos) + name[slash]='_'; + _containerName=name; +} diff --git a/src/Container/Container_i.cxx b/src/Container/Container_i.cxx index 954c8fcf7..fc00d4611 100644 --- a/src/Container/Container_i.cxx +++ b/src/Container/Container_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Container : implementation of container and engine for Kernel // File : Container_i.cxx // Author : Paul RASCLE, EDF - MARC TAJCHMAN, CEA @@ -29,10 +30,12 @@ #include #include #include +#include #ifndef WIN32 #include #include #include +#include #else #include #include @@ -53,21 +56,19 @@ int SIGUSR1 = 1000; #include "SALOME_NamingService.hxx" #include "Basics_Utils.hxx" +#ifdef _XOPEN_SOURCE +#undef _XOPEN_SOURCE +#endif + #include #include "Container_init_python.hxx" -using namespace std; - bool _Sleeping = false ; // // Needed by multi-threaded Python --- Supervision int _ArgC ; char ** _ArgV ; - -// Containers with name FactoryServer are started via rsh in LifeCycleCORBA -// Other Containers are started via start_impl of FactoryServer - extern "C" {void ActSigIntHandler() ; } #ifndef WIN32 extern "C" {void SigIntHandler(int, siginfo_t *, void *) ; } @@ -75,18 +76,38 @@ extern "C" {void SigIntHandler(int, siginfo_t *, void *) ; } extern "C" {void SigIntHandler( int ) ; } #endif -#ifdef WIN32 -# define separator '\\' +#ifndef WIN32 +#define LIB "lib" +#define ENGINESO "Engine.so" #else -# define separator '/' +#define LIB "" +#define ENGINESO "Engine.dll" #endif +#ifdef WIN32 +#define SEP ';' +#define SLASH '\\' +#else +#define SEP ':' +#define SLASH '/' +#endif -map Engines_Container_i::_cntInstances_map; -map Engines_Container_i::_library_map; -map Engines_Container_i::_toRemove_map; +std::map Engines_Container_i::_cntInstances_map; +std::map Engines_Container_i::_library_map; +std::map Engines_Container_i::_toRemove_map; omni_mutex Engines_Container_i::_numInstanceMutex ; +static PyObject* _pyCont; + +int checkifexecutable(const std::string&); +int findpathof(const std::string& path, std::string&, const std::string&); + +/*! \class Engines_Container_i + * \brief C++ implementation of Engines::Container interface + * + */ + + //============================================================================= /*! * Default constructor, not for use @@ -94,7 +115,7 @@ omni_mutex Engines_Container_i::_numInstanceMutex ; //============================================================================= Engines_Container_i::Engines_Container_i () : -_numInstance(0) +_numInstance(0),_id(0),_NS(0) { } @@ -111,7 +132,7 @@ Engines_Container_i::Engines_Container_i (CORBA::ORB_ptr orb, bool activAndRegist, bool isServantAloneInProcess ) : -_numInstance(0),_isServantAloneInProcess(isServantAloneInProcess) + _numInstance(0),_isServantAloneInProcess(isServantAloneInProcess),_id(0),_NS(0) { _pid = (long)getpid(); @@ -121,7 +142,7 @@ _numInstance(0),_isServantAloneInProcess(isServantAloneInProcess) _argc = argc ; _argv = argv ; - string hostname = Kernel_Utils::GetHostname(); + std::string hostname = Kernel_Utils::GetHostname(); #ifndef WIN32 MESSAGE(hostname << " " << getpid() << " Engines_Container_i starting argc " << @@ -145,13 +166,6 @@ _numInstance(0),_isServantAloneInProcess(isServantAloneInProcess) } SCRUTE(argv[1]); _isSupervContainer = false; - if (strcmp(argv[1],"SuperVisionContainer") == 0) _isSupervContainer = true; - - if (_isSupervContainer) - { - _ArgC = argc ; - _ArgV = argv ; - } _orb = CORBA::ORB::_duplicate(orb) ; _poa = PortableServer::POA::_duplicate(poa) ; @@ -181,35 +195,29 @@ _numInstance(0),_isServantAloneInProcess(isServantAloneInProcess) // pycont = SALOME_Container.SALOME_Container_i(containerIORStr) CORBA::String_var sior = _orb->object_to_string(pCont); - string myCommand="pyCont = SALOME_Container.SALOME_Container_i('"; + std::string myCommand="pyCont = SALOME_Container.SALOME_Container_i('"; myCommand += _containerName + "','"; myCommand += sior; myCommand += "')\n"; SCRUTE(myCommand); - if (!_isSupervContainer) - { -#ifdef WIN32 - - PyEval_AcquireLock(); - PyThreadState *myTstate = PyThreadState_New(KERNEL_PYTHON::_interp); - PyThreadState *myoldTstate = PyThreadState_Swap(myTstate); -#else - Py_ACQUIRE_NEW_THREAD; -#endif + PyGILState_STATE gstate = PyGILState_Ensure(); #ifdef WIN32 - // mpv: this is temporary solution: there is a unregular crash if not - //Sleep(2000); - // - // first element is the path to Registry.dll, but it's wrong - PyRun_SimpleString("import sys\n"); - PyRun_SimpleString("sys.path = sys.path[1:]\n"); + // mpv: this is temporary solution: there is a unregular crash if not + //Sleep(2000); + // + // first element is the path to Registry.dll, but it's wrong + PyRun_SimpleString("import sys\n"); + PyRun_SimpleString("sys.path = sys.path[1:]\n"); #endif - PyRun_SimpleString("import SALOME_Container\n"); - PyRun_SimpleString((char*)myCommand.c_str()); - Py_RELEASE_NEW_THREAD; - } + PyRun_SimpleString("import SALOME_Container\n"); + PyRun_SimpleString((char*)myCommand.c_str()); + PyObject *mainmod = PyImport_AddModule("__main__"); + PyObject *globals = PyModule_GetDict(mainmod); + _pyCont = PyDict_GetItemString(globals, "pyCont"); + + PyGILState_Release(gstate); fileTransfer_i* aFileTransfer = new fileTransfer_i(); CORBA::Object_var obref=aFileTransfer->_this(); @@ -227,12 +235,14 @@ _numInstance(0),_isServantAloneInProcess(isServantAloneInProcess) Engines_Container_i::~Engines_Container_i() { MESSAGE("Container_i::~Container_i()"); - delete _id; + if(_id) + delete _id; if(_NS) delete _NS; } //============================================================================= +//! Get container name /*! * CORBA attribute: Container name (see constructor) */ @@ -244,6 +254,7 @@ char* Engines_Container_i::name() } //============================================================================= +//! Get container working directory /*! * CORBA attribute: Container working directory */ @@ -257,6 +268,7 @@ char* Engines_Container_i::workingdir() } //============================================================================= +//! Get container log file name /*! * CORBA attribute: Container log file name */ @@ -267,12 +279,14 @@ char* Engines_Container_i::logfilename() return CORBA::string_dup(_logfilename.c_str()) ; } +//! Set container log file name void Engines_Container_i::logfilename(const char* name) { _logfilename=name; } //============================================================================= +//! Get container host name /*! * CORBA method: Get the hostName of the Container (without domain extensions) */ @@ -280,12 +294,13 @@ void Engines_Container_i::logfilename(const char* name) char* Engines_Container_i::getHostName() { - string s = Kernel_Utils::GetHostname(); + std::string s = Kernel_Utils::GetHostname(); // MESSAGE("Engines_Container_i::getHostName " << s); return CORBA::string_dup(s.c_str()) ; } //============================================================================= +//! Get container PID /*! * CORBA method: Get the PID (process identification) of the Container */ @@ -297,17 +312,18 @@ CORBA::Long Engines_Container_i::getPID() } //============================================================================= +//! Ping the servant to check it is still alive /*! * CORBA method: check if servant is still alive */ //============================================================================= - void Engines_Container_i::ping() { MESSAGE("Engines_Container_i::ping() pid "<< getpid()); } //============================================================================= +//! Shutdown the container /*! * CORBA method, oneway: Server shutdown. * - Container name removed from naming service, @@ -315,15 +331,17 @@ void Engines_Container_i::ping() * - orb shutdown if no other servants in the process */ //============================================================================= - void Engines_Container_i::Shutdown() { MESSAGE("Engines_Container_i::Shutdown()"); + // Clear registered temporary files + clearTemporaryFiles(); + /* For each component contained in this container * tell it to self-destroy */ - std::map::iterator itm; + std::map::iterator itm; for (itm = _listInstances_map.begin(); itm != _listInstances_map.end(); itm++) { try @@ -339,11 +357,10 @@ void Engines_Container_i::Shutdown() // ignore this entry and continue } } + _listInstances_map.clear(); _NS->Destroy_FullDirectory(_containerName.c_str()); _NS->Destroy_Name(_containerName.c_str()); - //_remove_ref(); - //_poa->deactivate_object(*_id); if(_isServantAloneInProcess) { MESSAGE("Effective Shutdown of container Begins..."); @@ -352,226 +369,278 @@ void Engines_Container_i::Shutdown() } } -/* int checkifexecutable(const char *filename) -* -* Return non-zero if the name is an executable file, and -* zero if it is not executable, or if it does not exist. +//============================================================================= +//! load a component implementation +/*! +* CORBA method +* \param componentName component name +* \param reason explains error when load fails +* \return true if dlopen successfull or already done, false otherwise */ - -int checkifexecutable(const string& filename) +//============================================================================= +bool +Engines_Container_i::load_component_Library(const char* componentName, CORBA::String_out reason) { - int result; - struct stat statinfo; - - result = stat(filename.c_str(), &statinfo); - if (result < 0) return 0; - if (!S_ISREG(statinfo.st_mode)) return 0; - -#ifdef WIN32 - return 1; -#else - if (statinfo.st_uid == geteuid()) return statinfo.st_mode & S_IXUSR; - if (statinfo.st_gid == getegid()) return statinfo.st_mode & S_IXGRP; - return statinfo.st_mode & S_IXOTH; -#endif -} - -/* int findpathof(char *pth, const char *exe) -* -* Find executable by searching the PATH environment variable. -* -* const char *exe - executable name to search for. -* char *pth - the path found is stored here, space -* needs to be available. -* -* If a path is found, returns non-zero, and the path is stored -* in pth. If exe is not found returns 0, with pth undefined. -*/ - -int findpathof(string& pth, const string& exe) -{ - string path( getenv("PATH") ); - if ( path.size() == 0 ) - return 0; - - char path_spr = -#ifdef WIN32 - ';'; -#else - ':'; -#endif + //================================================================= + // --- C++ implementation section + //================================================================= + std::string retso; + if(load_component_CppImplementation(componentName,retso)) + { + reason=CORBA::string_dup(""); + return true; + } + else if(retso != "ImplementationNotFound") + { + reason=CORBA::string_dup(retso.c_str()); + return false; + } - char dir_spr = -#ifdef WIN32 - '\\'; -#else - '/'; -#endif - - int offset = 0; - int stop = 0; - int found = 0; - while(!stop && !found) - { - int pos = path.find( path_spr, offset ); - if (pos == string::npos) - stop = 1; + retso="Component "; + retso+=componentName; + retso+=": Can't find C++ implementation "; + retso+=std::string(LIB) + componentName + ENGINESO; - pth = path.substr( offset, pos - offset ); - if ( pth.size() > 0 ) + //================================================================= + // --- Python implementation section + //================================================================= + std::string retpy; + if(load_component_PythonImplementation(componentName,retpy)) { - if( pth[pth.size()-1] != dir_spr ) - pth += dir_spr; - pth += exe; - found = checkifexecutable(pth.c_str()); + reason=CORBA::string_dup(""); + return true; + } + else if(retpy != "ImplementationNotFound") + { + reason=CORBA::string_dup(retpy.c_str()); + return false; + } + + retpy="Component "; + retpy+=componentName; + retpy+=": Can't find python implementation "; + retpy+=componentName; + retpy+="(.py)"; + + //================================================================= + // -- Executable implementation section + //================================================================= + std::string retex; + if(load_component_ExecutableImplementation(componentName,retex)) + { + reason=CORBA::string_dup(""); + return true; + } + else if(retex != "ImplementationNotFound") + { + reason=CORBA::string_dup(retex.c_str()); + return false; } - offset = pos+1; - } + retex="Component "; + retex+=componentName; + retex+=": Can't find executable implementation "; + retex+=componentName; + retex+=".exe"; -/* char *searchpath; - char *beg, *end; - int stop, found; - int len; + std::string ret="Component implementation not found: "; + ret += componentName ; + ret += '\n' ; + ret += retso+ '\n' ; + ret += retpy+ '\n' ; + ret += retex+ '\n' ; - if (strchr(exe, separator) != NULL) { -#ifndef WIN32 - if (realpath(exe, pth) == NULL) return 0; -#endif - return checkifexecutable(pth); - } + std::cerr << ret << std::endl; + reason=CORBA::string_dup(ret.c_str()); - searchpath = getenv("PATH"); - if (searchpath == NULL) return 0; - if (strlen(searchpath) <= 0) return 0; - - string env_path(searchpath); - - beg = searchpath; - stop = 0; found = 0; - do { - end = strchr(beg, ':'); - if (end == NULL) { - stop = 1; - strncpy(pth, beg, PATH_MAX); - len = strlen(pth); - } else { - strncpy(pth, beg, end - beg); - pth[end - beg] = '\0'; - len = end - beg; - } - if (pth[len - 1] != '/') strncat(pth, "/", 1); - strncat(pth, exe, PATH_MAX - len); - found = checkifexecutable(pth); - if (!stop) beg = end + 1; - } while (!stop && !found); -*/ - return found; + return false; } - - //============================================================================= +//! try to load a C++ component implementation /*! -* CORBA method: load a new component class (Python or C++ implementation) -* \param componentName like COMPONENT -* try to make a Python import of COMPONENT, -* then a lib open of libCOMPONENTEngine.so -* \return true if dlopen successfull or already done, false otherwise +* C++ method: +* \param componentName the name of the component (COMPONENT, for example) +* \param reason explains error when load fails +* \return true if loading is successfull or already done, false otherwise */ //============================================================================= - bool -Engines_Container_i::load_component_Library(const char* componentName) +Engines_Container_i::load_component_CppImplementation(const char* componentName, std::string& reason) { - - string aCompName = componentName; - - // --- try dlopen C++ component - -#ifndef WIN32 - string impl_name = string ("lib") + aCompName + string("Engine.so"); -#else - string impl_name = aCompName + string("Engine.dll"); -#endif + std::string aCompName(componentName); + std::string impl_name = std::string(LIB) + aCompName + ENGINESO; SCRUTE(impl_name); - _numInstanceMutex.lock(); // lock to be alone + _numInstanceMutex.lock(); // lock to be alone // (see decInstanceCnt, finalize_removal)) if (_toRemove_map.count(impl_name) != 0) _toRemove_map.erase(impl_name); if (_library_map.count(impl_name) != 0) - { - MESSAGE("Library " << impl_name << " already loaded"); - _numInstanceMutex.unlock(); - return true; - } + { + MESSAGE("Library " << impl_name << " already loaded"); + _numInstanceMutex.unlock(); + reason=""; + return true; + } + _numInstanceMutex.unlock(); #ifndef WIN32 void* handle; - handle = dlopen( impl_name.c_str() , RTLD_LAZY ) ; + handle = dlopen( impl_name.c_str() , RTLD_NOW ) ; + if ( !handle ) + { + //not loadable. Try to find the lib file in LD_LIBRARY_PATH + std::string path; + char* p=getenv("LD_LIBRARY_PATH"); + if(p)path=p; + path=path+SEP+"/usr/lib"+SEP+"/lib"; + + std::string pth; + if(findpathof(path, pth, impl_name)) + { + //found but not loadable + reason="Component "; + reason+=aCompName; + reason+=": C++ implementation found "; + reason+=pth; + reason+=" but it is not loadable. Error:\n"; + reason+=dlerror(); + std::cerr << reason << std::endl; + return false; + } + else + { + //not found + //continue with other implementation + reason="ImplementationNotFound"; + return false; + } + } #else HINSTANCE handle; handle = LoadLibrary( impl_name.c_str() ); + if ( !handle ) + { + reason="ImplementationNotFound"; + } #endif if ( handle ) - { - _library_map[impl_name] = handle; - _numInstanceMutex.unlock(); - return true; - } - _numInstanceMutex.unlock(); + { + _numInstanceMutex.lock(); + _library_map[impl_name] = handle; + _numInstanceMutex.unlock(); + reason=""; + return true; + } - // --- try import Python component + return false; - INFOS("try import Python component "< 0 for mono study instance, =0 for multiStudy"); - return Engines::Component::_nil() ; - } - - Engines::Component_var iobject = Engines::Component::_nil() ; + Engines::FieldsDict_var env = new Engines::FieldsDict; + char* reason; + Engines::EngineComponent_ptr compo = + create_component_instance_env(genericRegisterName, studyId, env, reason); + CORBA::string_free(reason); + return compo; +} - string aCompName = genericRegisterName; - if (_library_map.count(aCompName) != 0) // Python component - { - if (_isSupervContainer) +//============================================================================= +//! Create a new component instance with environment variables specified +/*! +* CORBA method: Creates a new servant instance of a component. +* The servant registers itself to naming service and Registry. +* \param genericRegisterName Name of the component instance to register +* in Registry & Name Service (without _inst_n suffix) +* \param studyId 0 for multiStudy instance, +* study Id (>0) otherwise +* \param env dict of env variables +* \param reason explains error when create_component_instance_env fails +* \return a loaded component +*/ +//============================================================================= +Engines::EngineComponent_ptr +Engines_Container_i::create_component_instance_env(const char*genericRegisterName, + CORBA::Long studyId, + const Engines::FieldsDict& env, + CORBA::String_out reason) +{ + if (studyId < 0) { - INFOS("Supervision Container does not support Python Component Engines"); - return Engines::Component::_nil(); + INFOS("studyId must be > 0 for mono study instance, =0 for multiStudy"); + reason=CORBA::string_dup("studyId must be > 0 for mono study instance, =0 for multiStudy"); + return Engines::EngineComponent::_nil() ; } - _numInstanceMutex.lock() ; // lock on the instance number - _numInstance++ ; - int numInstance = _numInstance ; - _numInstanceMutex.unlock() ; - char aNumI[12]; - sprintf( aNumI , "%d" , numInstance ) ; - string instanceName = aCompName + "_inst_" + aNumI ; - string component_registerName = - _containerName + "/" + instanceName; + std::string error; + if (_library_map.count(genericRegisterName) != 0) + { + // It's a Python component + Engines::EngineComponent_ptr compo = createPythonInstance(genericRegisterName, studyId, error); + reason=CORBA::string_dup(error.c_str()); + return compo; + } - Py_ACQUIRE_NEW_THREAD; - PyObject *mainmod = PyImport_AddModule("__main__"); - PyObject *globals = PyModule_GetDict(mainmod); - PyObject *pyCont = PyDict_GetItemString(globals, "pyCont"); - PyObject *result = PyObject_CallMethod(pyCont, - (char*)"create_component_instance", - (char*)"ssl", - aCompName.c_str(), - instanceName.c_str(), - studyId); - string iors = PyString_AsString(result); - Py_DECREF(result); - SCRUTE(iors); - Py_RELEASE_NEW_THREAD; - - if( iors!="" ) + std::string impl_name = std::string(LIB) + genericRegisterName + ENGINESO; + if (_library_map.count(impl_name) != 0) { - CORBA::Object_var obj = _orb->string_to_object(iors.c_str()); - iobject = Engines::Component::_narrow( obj ) ; - _listInstances_map[instanceName] = iobject; + // It's a C++ component + void* handle = _library_map[impl_name]; + Engines::EngineComponent_ptr compo = createInstance(genericRegisterName, handle, studyId, error); + reason=CORBA::string_dup(error.c_str()); + return compo; } - return iobject._retn(); - } - //--- try C++ + impl_name = std::string(genericRegisterName) + ".exe"; + if (_library_map.count(impl_name) != 0) + { + //It's an executable component + Engines::EngineComponent_ptr compo = createExecutableInstance(genericRegisterName, studyId, env, error); + reason=CORBA::string_dup(error.c_str()); + return compo; + } -#ifndef WIN32 - string impl_name = string ("lib") + genericRegisterName +string("Engine.so"); -#else - string impl_name = genericRegisterName +string("Engine.dll"); -#endif - if (_library_map.count(impl_name) != 0) // C++ component - { - void* handle = _library_map[impl_name]; - iobject = createInstance(genericRegisterName, - handle, - studyId); - return iobject._retn(); - } + error="load_component_Library has probably not been called for component: "; + error += genericRegisterName; + INFOS(error); + reason=CORBA::string_dup(error.c_str()); + return Engines::EngineComponent::_nil() ; +} - // If it's not a Python or a C++ component try to launch a standalone component - // in a sub directory - // This component is implemented in an executable with name genericRegisterName.exe - // It must register itself in Naming Service. The container waits some time (10 s max) - // it's registration. +//============================================================================= +//! Create a new component instance (Executable implementation) +/*! +* \param CompName Name of the component instance +* \param studyId 0 for multiStudy instance, +* study Id (>0) otherwise +* \param env dict of env variables +* \param reason explains error when creation fails +* \return a loaded component +* +* This component is implemented in an executable with name genericRegisterName.exe +* It must register itself in Naming Service. The container waits some time (10 s max) +* it's registration. +*/ +//============================================================================= +Engines::EngineComponent_ptr +Engines_Container_i::createExecutableInstance(std::string CompName, int studyId, + const Engines::FieldsDict& env, + std::string& reason) +{ + Engines::EngineComponent_var iobject = Engines::EngineComponent::_nil() ; _numInstanceMutex.lock() ; // lock on the instance number _numInstance++ ; @@ -667,8 +754,8 @@ Engines_Container_i::create_component_instance(const char*genericRegisterName, char aNumI[12]; sprintf( aNumI , "%d" , numInstance ) ; - string instanceName = aCompName + "_inst_" + aNumI ; - string component_registerName = _containerName + "/" + instanceName; + std::string instanceName = CompName + "_inst_" + aNumI ; + std::string component_registerName = _containerName + "/" + instanceName; //check if an entry exist in naming service CORBA::Object_var nsobj = _NS->Resolve(component_registerName.c_str()); @@ -692,7 +779,7 @@ Engines_Container_i::create_component_instance(const char*genericRegisterName, command+=";cd "; command+=instanceName; command+=";"; - command+=genericRegisterName ; + command+=CompName ; command+=".exe"; command+=" "; command+= sior; // container ior string @@ -702,24 +789,76 @@ Engines_Container_i::create_component_instance(const char*genericRegisterName, command+=instanceName; //instance name command+=" &"; MESSAGE("SALOME_Container::create_component_instance command=" << command); + +#ifndef WIN32 + // use fork/execl instead of system to get finer control on env variables + int status; + pid_t pid = fork(); + if(pid == 0) // child + { + for (CORBA::ULong i=0; i < env.length(); i++) + { + if (env[i].value.type()->kind() == CORBA::tk_string) + { + const char* value; + env[i].value >>= value; + std::string s(env[i].key); + s+='='; + s+=value; + putenv(strdup(s.c_str())); + } + } + + execl("/bin/sh", "sh", "-c", command.c_str() , (char *)0); + status=-1; + } + else if(pid < 0) // failed to fork + { + status=-1; + } + else //parent + { + pid_t tpid; + do + { + tpid = wait(&status); + } while (tpid != pid); + } +#else // launch component with a system call int status=system(command.c_str()); +#endif if (status == -1) { - MESSAGE("SALOME_Container::create_component_instance system failed " << "(system command status -1)"); - return Engines::Component::_nil(); + reason="SALOME_Container::create_component_instance system failed (system command status -1)"; + MESSAGE(reason); + return Engines::EngineComponent::_nil(); } #ifndef WIN32 else if (WEXITSTATUS(status) == 217) { - MESSAGE("SALOME_Container::create_component_instance system failed " << "(system command status 217)"); - return Engines::Component::_nil(); + reason="SALOME_Container::create_component_instance system failed (system command status 217)"; + MESSAGE(reason); + return Engines::EngineComponent::_nil(); } #endif else { int count=20; + if (getenv("TIMEOUT_TO_WAIT_EXE_COMPONENT") != 0) + { + std::string new_count_str = getenv("TIMEOUT_TO_WAIT_EXE_COMPONENT"); + int new_count; + std::istringstream ss(new_count_str); + if (!(ss >> new_count)) + { + INFOS("[Container] TIMEOUT_TO_WAIT_EXE_COMPONENT should be an int"); + } + else + count = new_count; + } + INFOS("[Container] waiting " << count << " second steps exe component "); CORBA::Object_var obj = CORBA::Object::_nil() ; while ( CORBA::is_nil(obj) && count ) { @@ -729,321 +868,79 @@ Engines_Container_i::create_component_instance(const char*genericRegisterName, Sleep(1000); #endif count-- ; - MESSAGE( count << ". Waiting for component " << genericRegisterName); + MESSAGE( count << ". Waiting for component " << CompName); obj = _NS->Resolve(component_registerName.c_str()); } if(CORBA::is_nil(obj)) { - MESSAGE("SALOME_Container::create_component_instance failed"); - return Engines::Component::_nil(); + reason="SALOME_Container::create_component_instance failed"; + MESSAGE(reason); + return Engines::EngineComponent::_nil(); } else { MESSAGE("SALOME_Container::create_component_instance successful"); - iobject=Engines::Component::_narrow(obj); + iobject = Engines::EngineComponent::_narrow(obj); _listInstances_map[instanceName] = iobject; return iobject._retn(); } } } + //============================================================================= +//! Create a new component instance (Python implementation) /*! -* CORBA method: Finds a servant instance of a component -* \param registeredName Name of the component in Registry or Name Service, -* without instance suffix number -* \param studyId 0 if instance is not associated to a study, -* >0 otherwise (== study id) -* \return the first instance found with same studyId -*/ -//============================================================================= - -Engines::Component_ptr -Engines_Container_i::find_component_instance( const char* registeredName, - CORBA::Long studyId) -{ - Engines::Component_var anEngine = Engines::Component::_nil(); - map::iterator itm =_listInstances_map.begin(); - while (itm != _listInstances_map.end()) - { - string instance = (*itm).first; - SCRUTE(instance); - if (instance.find(registeredName) == 0) - { - anEngine = (*itm).second; - if (studyId == anEngine->getStudyId()) - { - return anEngine._retn(); - } - } - itm++; - } - return anEngine._retn(); -} - -//============================================================================= -/*! -* CORBA method: find or create an instance of the component (servant), -* load a new component class (dynamic library) if required, -* ---- FOR COMPATIBILITY WITH 2.2 ---- -* ---- USE ONLY FOR MULTISTUDY INSTANCES ! -------- -* The servant registers itself to naming service and Registry. -* \param genericRegisterName Name of the component to register -* in Registry & Name Service -* \param componentName Name of the constructed library of the component +* \param CompName Name of the component instance +* \param studyId 0 for multiStudy instance, +* study Id (>0) otherwise +* \param reason explains error when creation fails * \return a loaded component */ //============================================================================= - -Engines::Component_ptr -Engines_Container_i::load_impl( const char* genericRegisterName, - const char* componentName ) +Engines::EngineComponent_ptr +Engines_Container_i::createPythonInstance(std::string CompName, int studyId, + std::string& reason) { - string impl_name = string ("lib") + genericRegisterName +string("Engine.so"); - Engines::Component_var iobject = Engines::Component::_nil() ; - if (load_component_Library(genericRegisterName)) - iobject = find_or_create_instance(genericRegisterName, impl_name); - return iobject._retn(); -} - + Engines::EngineComponent_var iobject = Engines::EngineComponent::_nil() ; -//============================================================================= -/*! -* CORBA method: Stops the component servant, and deletes all related objects -* \param component_i Component to be removed -*/ -//============================================================================= - -void Engines_Container_i::remove_impl(Engines::Component_ptr component_i) -{ - ASSERT(! CORBA::is_nil(component_i)); - string instanceName = component_i->instanceName() ; - MESSAGE("unload component " << instanceName); - _numInstanceMutex.lock() ; // lock to be alone (stl container write) - _listInstances_map.erase(instanceName); + _numInstanceMutex.lock() ; // lock on the instance number + _numInstance++ ; + int numInstance = _numInstance ; _numInstanceMutex.unlock() ; - component_i->destroy() ; - _NS->Destroy_Name(instanceName.c_str()); -} - -//============================================================================= -/*! -* CORBA method: Discharges unused libraries from the container. -*/ -//============================================================================= - -void Engines_Container_i::finalize_removal() -{ - MESSAGE("finalize unload : dlclose"); - _numInstanceMutex.lock(); // lock to be alone - // (see decInstanceCnt, load_component_Library) - map::iterator ith; - for (ith = _toRemove_map.begin(); ith != _toRemove_map.end(); ith++) - { - void *handle = (*ith).second; - string impl_name= (*ith).first; - if (handle) - { - SCRUTE(handle); - SCRUTE(impl_name); - // dlclose(handle); // SALOME unstable after ... - // _library_map.erase(impl_name); - } - } - _toRemove_map.clear(); - _numInstanceMutex.unlock(); -} - -//============================================================================= -/*! -* CORBA method: Kill the container process with exit(0). -* To remove : never returns ! -*/ -//============================================================================= - -bool Engines_Container_i::Kill_impl() -{ - MESSAGE("Engines_Container_i::Kill() pid "<< getpid() << " containerName " - << _containerName.c_str() << " machineName " - << Kernel_Utils::GetHostname().c_str()); - INFOS("==============================================================="); - INFOS("= REMOVE calls to Kill_impl in C++ container ="); - INFOS("==============================================================="); - //exit( 0 ) ; - ASSERT(0); - return false; -} - -//============================================================================= -/*! -* CORBA method: get or create a fileRef object associated to a local file -* (a file on the computer on which runs the container server), which stores -* a list of (machine, localFileName) corresponding to copies already done. -* -* \param origFileName absolute path for a local file to copy on other -* computers -* \return a fileRef object associated to the file. -*/ -//============================================================================= - -Engines::fileRef_ptr -Engines_Container_i::createFileRef(const char* origFileName) -{ - string origName(origFileName); - Engines::fileRef_var theFileRef = Engines::fileRef::_nil(); - - if (origName[0] != '/') - { - INFOS("path of file to copy must be an absolute path begining with '/'"); - return Engines::fileRef::_nil(); - } - - if (CORBA::is_nil(_fileRef_map[origName])) - { - CORBA::Object_var obj=_poa->id_to_reference(*_id); - Engines::Container_var pCont = Engines::Container::_narrow(obj); - fileRef_i* aFileRef = new fileRef_i(pCont, origFileName); - theFileRef = Engines::fileRef::_narrow(aFileRef->_this()); - _numInstanceMutex.lock() ; // lock to be alone (stl container write) - _fileRef_map[origName] = theFileRef; - _numInstanceMutex.unlock() ; - } - - theFileRef = Engines::fileRef::_duplicate(_fileRef_map[origName]); - ASSERT(! CORBA::is_nil(theFileRef)); - return theFileRef._retn(); -} - -//============================================================================= -/*! -* CORBA method: -* \return a reference to the fileTransfer object -*/ -//============================================================================= - -Engines::fileTransfer_ptr -Engines_Container_i::getFileTransfer() -{ - Engines::fileTransfer_var aFileTransfer - = Engines::fileTransfer::_duplicate(_fileTransfer); - return aFileTransfer._retn(); -} - - -Engines::Salome_file_ptr -Engines_Container_i::createSalome_file(const char* origFileName) -{ - string origName(origFileName); - if (CORBA::is_nil(_Salome_file_map[origName])) - { - Salome_file_i* aSalome_file = new Salome_file_i(); - aSalome_file->setContainer(Engines::Container::_duplicate(this->_this())); - try - { - aSalome_file->setLocalFile(origFileName); - aSalome_file->recvFiles(); - } - catch (const SALOME::SALOME_Exception& e) - { - return Engines::Salome_file::_nil(); - } - - Engines::Salome_file_var theSalome_file = Engines::Salome_file::_nil(); - theSalome_file = Engines::Salome_file::_narrow(aSalome_file->_this()); - _numInstanceMutex.lock() ; // lock to be alone (stl container write) - _Salome_file_map[origName] = theSalome_file; - _numInstanceMutex.unlock() ; - } - - Engines::Salome_file_ptr theSalome_file = - Engines::Salome_file::_duplicate(_Salome_file_map[origName]); - ASSERT(!CORBA::is_nil(theSalome_file)); - return theSalome_file; -} -//============================================================================= -/*! -* C++ method: Finds an already existing servant instance of a component, or -* create an instance. -* ---- USE ONLY FOR MULTISTUDY INSTANCES ! -------- -* \param genericRegisterName Name of the component instance to register -* in Registry & Name Service, -* (without _inst_n suffix, like "COMPONENT") -* \param componentLibraryName like "libCOMPONENTEngine.so" -* \return a loaded component -* -* example with names: -* aGenRegisterName = COMPONENT (= first argument) -* impl_name = libCOMPONENTEngine.so (= second argument) -* _containerName = /Containers/cli76ce/FactoryServer -* factoryName = COMPONENTEngine_factory -* component_registerBase = /Containers/cli76ce/FactoryServer/COMPONENT -* -* instanceName = COMPONENT_inst_1 -* component_registerName = /Containers/cli76ce/FactoryServer/COMPONENT_inst_1 -*/ -//============================================================================= - -Engines::Component_ptr -Engines_Container_i::find_or_create_instance(string genericRegisterName, - string componentLibraryName) -{ - string aGenRegisterName = genericRegisterName; - string impl_name = componentLibraryName; - if (_library_map.count(impl_name) == 0) - { - INFOS("shared library " << impl_name <<" must be loaded before creating instance"); - return Engines::Component::_nil() ; - } - else - { - // --- find a registered instance in naming service, or create - void* handle = _library_map[impl_name]; - string component_registerBase = - _containerName + "/" + aGenRegisterName; - Engines::Component_var iobject = Engines::Component::_nil() ; - try - { - CORBA::Object_var obj = - _NS->ResolveFirst( component_registerBase.c_str()); - if ( CORBA::is_nil( obj ) ) - { - iobject = createInstance(genericRegisterName, - handle, - 0); // force multiStudy instance here ! - } - else - { - iobject = Engines::Component::_narrow( obj ) ; - Engines_Component_i *servant = - dynamic_cast - (_poa->reference_to_servant(iobject)); - ASSERT(servant) - int studyId = servant->getStudyId(); - ASSERT (studyId >= 0); - if (studyId == 0) // multiStudy instance, OK - { - // No ReBind ! - MESSAGE(component_registerBase.c_str()<<" already bound"); - } - else // monoStudy instance: NOK - { - iobject = Engines::Component::_nil(); - INFOS("load_impl & find_component_instance methods " - << "NOT SUITABLE for mono study components"); - } - } - } - catch (...) + char aNumI[12]; + sprintf( aNumI , "%d" , numInstance ) ; + std::string instanceName = CompName + "_inst_" + aNumI ; + std::string component_registerName = _containerName + "/" + instanceName; + + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *result = PyObject_CallMethod(_pyCont, + (char*)"create_component_instance", + (char*)"ssl", + CompName.c_str(), + instanceName.c_str(), + studyId); + const char *ior; + const char *error; + PyArg_ParseTuple(result,"ss", &ior, &error); + std::string iors = ior; + reason=error; + Py_DECREF(result); + PyGILState_Release(gstate); + + if( iors!="" ) { - INFOS( "Container_i::load_impl catched" ) ; + CORBA::Object_var obj = _orb->string_to_object(iors.c_str()); + iobject = Engines::EngineComponent::_narrow( obj ) ; + _listInstances_map[instanceName] = iobject; } - return iobject._retn(); - } + return iobject._retn(); } //============================================================================= +//! Create a new component instance (C++ implementation) /*! * C++ method: create a servant instance of a component. * \param genericRegisterName Name of the component instance to register @@ -1052,35 +949,35 @@ Engines_Container_i::find_or_create_instance(string genericRegisterName, * \param handle loaded library handle * \param studyId 0 for multiStudy instance, * study Id (>0) otherwise +* \param reason explains error when creation fails * \return a loaded component * * example with names: -* aGenRegisterName = COMPONENT (= first argument) -* _containerName = /Containers/cli76ce/FactoryServer -* factoryName = COMPONENTEngine_factory -* component_registerBase = /Containers/cli76ce/FactoryServer/COMPONENT -* instanceName = COMPONENT_inst_1 -* component_registerName = /Containers/cli76ce/FactoryServer/COMPONENT_inst_1 +* - aGenRegisterName = COMPONENT (= first argument) +* - _containerName = /Containers/cli76ce/FactoryServer +* - factoryName = COMPONENTEngine_factory +* - component_registerBase = /Containers/cli76ce/FactoryServer/COMPONENT +* - instanceName = COMPONENT_inst_1 +* - component_registerName = /Containers/cli76ce/FactoryServer/COMPONENT_inst_1 */ //============================================================================= - -Engines::Component_ptr -Engines_Container_i::createInstance(string genericRegisterName, +Engines::EngineComponent_ptr +Engines_Container_i::createInstance(std::string genericRegisterName, void *handle, - int studyId) + int studyId, + std::string& reason) { // --- find the factory - string aGenRegisterName = genericRegisterName; - string factory_name = aGenRegisterName + string("Engine_factory"); + std::string aGenRegisterName = genericRegisterName; + std::string factory_name = aGenRegisterName + std::string("Engine_factory"); SCRUTE(factory_name) ; - typedef PortableServer::ObjectId * (*FACTORY_FUNCTION) - (CORBA::ORB_ptr, - PortableServer::POA_ptr, - PortableServer::ObjectId *, - const char *, - const char *) ; + typedef PortableServer::ObjectId* (*FACTORY_FUNCTION) (CORBA::ORB_ptr, + PortableServer::POA_ptr, + PortableServer::ObjectId *, + const char *, + const char *) ; #ifndef WIN32 FACTORY_FUNCTION Component_factory = (FACTORY_FUNCTION)dlsym( handle, factory_name.c_str() ); @@ -1092,14 +989,15 @@ Engines_Container_i::createInstance(string genericRegisterName, { INFOS( "Can't resolve symbol: " + factory_name ); #ifndef WIN32 - SCRUTE( dlerror() ); + reason=dlerror(); + INFOS(reason); #endif - return Engines::Component::_nil() ; + return Engines::EngineComponent::_nil() ; } // --- create instance - Engines::Component_var iobject = Engines::Component::_nil() ; + Engines::EngineComponent_var iobject = Engines::EngineComponent::_nil() ; try { @@ -1110,42 +1008,40 @@ Engines_Container_i::createInstance(string genericRegisterName, char aNumI[12]; sprintf( aNumI , "%d" , numInstance ) ; - string instanceName = aGenRegisterName + "_inst_" + aNumI ; - string component_registerName = + std::string instanceName = aGenRegisterName + "_inst_" + aNumI ; + std::string component_registerName = _containerName + "/" + instanceName; // --- Instanciate required CORBA object PortableServer::ObjectId *id ; //not owner, do not delete (nore use var) id = (Component_factory) ( _orb, _poa, _id, instanceName.c_str(), - aGenRegisterName.c_str() ) ; + aGenRegisterName.c_str() ) ; if (id == NULL) - return iobject._retn(); + { + reason="Can't get ObjectId from factory"; + INFOS(reason); + return iobject._retn(); + } // --- get reference & servant from id CORBA::Object_var obj = _poa->id_to_reference(*id); - iobject = Engines::Component::_narrow( obj ) ; + iobject = Engines::EngineComponent::_narrow( obj ) ; Engines_Component_i *servant = dynamic_cast(_poa->reference_to_servant(iobject)); ASSERT(servant); - //SCRUTE(servant->pd_refCount); - servant->_remove_ref(); // compensate previous id_to_reference - //SCRUTE(servant->pd_refCount); + //SCRUTE(servant->_refcount_value()); _numInstanceMutex.lock() ; // lock to be alone (stl container write) _listInstances_map[instanceName] = iobject; _cntInstances_map[aGenRegisterName] += 1; _numInstanceMutex.unlock() ; SCRUTE(aGenRegisterName); SCRUTE(_cntInstances_map[aGenRegisterName]); - //SCRUTE(servant->pd_refCount); -#if defined(_DEBUG_) || defined(_DEBUG) - bool ret_studyId = servant->setStudyId(studyId); - ASSERT(ret_studyId); -#else servant->setStudyId(studyId); -#endif + servant->_remove_ref(); // do not need servant any more (remove ref from reference_to_servant) + //SCRUTE(servant->_refcount_value()); // --- register the engine under the name // containerName(.dir)/instanceName(.object) @@ -1155,46 +1051,244 @@ Engines_Container_i::createInstance(string genericRegisterName, } catch (...) { - INFOS( "Container_i::createInstance exception catched" ) ; + reason="Container_i::createInstance exception catched"; + INFOS(reason) ; } return iobject._retn(); } //============================================================================= -/*! +//! Find an existing (in the container) component instance +/*! +* CORBA method: Finds a servant instance of a component +* \param registeredName Name of the component in Registry or Name Service, +* without instance suffix number +* \param studyId 0 if instance is not associated to a study, +* >0 otherwise (== study id) +* \return the first instance found with same studyId +*/ +//============================================================================= +Engines::EngineComponent_ptr +Engines_Container_i::find_component_instance( const char* registeredName, + CORBA::Long studyId) +{ + Engines::EngineComponent_var anEngine = Engines::EngineComponent::_nil(); + std::map::iterator itm =_listInstances_map.begin(); + while (itm != _listInstances_map.end()) + { + std::string instance = (*itm).first; + SCRUTE(instance); + if (instance.find(registeredName) == 0) + { + anEngine = (*itm).second; + if (studyId == anEngine->getStudyId()) + { + return anEngine._retn(); + } + } + itm++; + } + return anEngine._retn(); +} + +//============================================================================= +//! Remove the component instance from container +/*! +* CORBA method: Stops the component servant, and deletes all related objects +* \param component_i Component to be removed +*/ +//============================================================================= + +void Engines_Container_i::remove_impl(Engines::EngineComponent_ptr component_i) +{ + ASSERT(! CORBA::is_nil(component_i)); + std::string instanceName = component_i->instanceName() ; + MESSAGE("unload component " << instanceName); + _numInstanceMutex.lock() ; // lock to be alone (stl container write) + _listInstances_map.erase(instanceName); + _numInstanceMutex.unlock() ; + component_i->destroy() ; + _NS->Destroy_Name(instanceName.c_str()); +} + +//============================================================================= +//! Unload component libraries from the container +/*! +* CORBA method: Discharges unused libraries from the container. +*/ +//============================================================================= +void Engines_Container_i::finalize_removal() +{ + MESSAGE("finalize unload : dlclose"); + _numInstanceMutex.lock(); // lock to be alone + // (see decInstanceCnt, load_component_Library) + std::map::iterator ith; + for (ith = _toRemove_map.begin(); ith != _toRemove_map.end(); ith++) + { + void *handle = (*ith).second; + std::string impl_name= (*ith).first; + if (handle) + { + SCRUTE(handle); + SCRUTE(impl_name); + // dlclose(handle); // SALOME unstable after ... + // _library_map.erase(impl_name); + } + } + _toRemove_map.clear(); + _numInstanceMutex.unlock(); +} + +//============================================================================= +//! Decrement component instance reference count +/*! +* +*/ +//============================================================================= +void Engines_Container_i::decInstanceCnt(std::string genericRegisterName) +{ + if(_cntInstances_map.count(genericRegisterName)==0) + return; + std::string aGenRegisterName =genericRegisterName; + MESSAGE("Engines_Container_i::decInstanceCnt " << aGenRegisterName); + ASSERT(_cntInstances_map[aGenRegisterName] > 0); + _numInstanceMutex.lock(); // lock to be alone + // (see finalize_removal, load_component_Library) + _cntInstances_map[aGenRegisterName] -= 1; + SCRUTE(_cntInstances_map[aGenRegisterName]); + if (_cntInstances_map[aGenRegisterName] == 0) + { + std::string impl_name = + Engines_Component_i::GetDynLibraryName(aGenRegisterName.c_str()); + SCRUTE(impl_name); + void* handle = _library_map[impl_name]; + ASSERT(handle); + _toRemove_map[impl_name] = handle; + } + _numInstanceMutex.unlock(); +} + +//============================================================================= +//! Find or create a new component instance +/*! +* CORBA method: find or create an instance of the component (servant), +* load a new component class (dynamic library) if required, +* +* ---- FOR COMPATIBILITY WITH 2.2 ---- +* +* ---- USE ONLY FOR MULTISTUDY INSTANCES ! -------- +* +* The servant registers itself to naming service and Registry. +* \param genericRegisterName Name of the component to register +* in Registry & Name Service +* \param componentName Name of the constructed library of the component +* \return a loaded component +*/ +//============================================================================= + +Engines::EngineComponent_ptr +Engines_Container_i::load_impl( const char* genericRegisterName, + const char* componentName ) +{ + char* reason; + std::string impl_name = std::string(LIB) + genericRegisterName + ENGINESO; + Engines::EngineComponent_var iobject = Engines::EngineComponent::_nil() ; + if (load_component_Library(genericRegisterName,reason)) + iobject = find_or_create_instance(genericRegisterName, impl_name); + CORBA::string_free(reason); + return iobject._retn(); +} + +//============================================================================= +//! Finds an already existing component instance or create a new instance +/*! +* C++ method: Finds an already existing servant instance of a component, or +* create an instance. +* ---- USE ONLY FOR MULTISTUDY INSTANCES ! -------- +* \param genericRegisterName Name of the component instance to register +* in Registry & Name Service, +* (without _inst_n suffix, like "COMPONENT") +* \param componentLibraryName like "libCOMPONENTEngine.so" +* \return a loaded component * +* example with names: +* - aGenRegisterName = COMPONENT (= first argument) +* - impl_name = libCOMPONENTEngine.so (= second argument) +* - _containerName = /Containers/cli76ce/FactoryServer +* - factoryName = COMPONENTEngine_factory +* - component_registerBase = /Containers/cli76ce/FactoryServer/COMPONENT +* - instanceName = COMPONENT_inst_1 +* - component_registerName = /Containers/cli76ce/FactoryServer/COMPONENT_inst_1 */ //============================================================================= -void Engines_Container_i::decInstanceCnt(string genericRegisterName) +Engines::EngineComponent_ptr +Engines_Container_i::find_or_create_instance(std::string genericRegisterName, + std::string componentLibraryName) { - if(_cntInstances_map.count(genericRegisterName)==0) - return; - string aGenRegisterName =genericRegisterName; - MESSAGE("Engines_Container_i::decInstanceCnt " << aGenRegisterName); - ASSERT(_cntInstances_map[aGenRegisterName] > 0); - _numInstanceMutex.lock(); // lock to be alone - // (see finalize_removal, load_component_Library) - _cntInstances_map[aGenRegisterName] -= 1; - SCRUTE(_cntInstances_map[aGenRegisterName]); - if (_cntInstances_map[aGenRegisterName] == 0) + std::string aGenRegisterName = genericRegisterName; + std::string impl_name = componentLibraryName; + if (_library_map.count(impl_name) == 0) { - string impl_name = - Engines_Component_i::GetDynLibraryName(aGenRegisterName.c_str()); - SCRUTE(impl_name); + INFOS("shared library " << impl_name <<" must be loaded before creating instance"); + return Engines::EngineComponent::_nil() ; + } + else + { + // --- find a registered instance in naming service, or create + void* handle = _library_map[impl_name]; - ASSERT(handle); - _toRemove_map[impl_name] = handle; + std::string component_registerBase = + _containerName + "/" + aGenRegisterName; + Engines::EngineComponent_var iobject = Engines::EngineComponent::_nil() ; + std::string reason; + try + { + CORBA::Object_var obj = + _NS->ResolveFirst( component_registerBase.c_str()); + if ( CORBA::is_nil( obj ) ) + { + iobject = createInstance(genericRegisterName, + handle, + 0, + reason); // force multiStudy instance here ! + } + else + { + iobject = Engines::EngineComponent::_narrow( obj ) ; + Engines_Component_i *servant = + dynamic_cast + (_poa->reference_to_servant(iobject)); + ASSERT(servant) + int studyId = servant->getStudyId(); + ASSERT (studyId >= 0); + if (studyId == 0) // multiStudy instance, OK + { + // No ReBind ! + MESSAGE(component_registerBase.c_str()<<" already bound"); + } + else // monoStudy instance: NOK + { + iobject = Engines::EngineComponent::_nil(); + INFOS("load_impl & find_component_instance methods " + << "NOT SUITABLE for mono study components"); + } + } + } + catch (...) + { + INFOS( "Container_i::load_impl catched" ) ; + } + return iobject._retn(); } - _numInstanceMutex.unlock(); } //============================================================================= +//! Indicate if container is a python one /*! * Retrieves only with container naming convention if it is a python container */ //============================================================================= - bool Engines_Container_i::isPythonContainer(const char* ContainerName) { bool ret=false; @@ -1205,17 +1299,37 @@ bool Engines_Container_i::isPythonContainer(const char* ContainerName) return ret; } +//============================================================================= +//! Kill the container +/*! +* CORBA method: Kill the container process with exit(0). +* To remove : never returns ! +*/ +//============================================================================= +bool Engines_Container_i::Kill_impl() +{ + MESSAGE("Engines_Container_i::Kill() pid "<< getpid() << " containerName " + << _containerName.c_str() << " machineName " + << Kernel_Utils::GetHostname().c_str()); + INFOS("==============================================================="); + INFOS("= REMOVE calls to Kill_impl in C++ container ="); + INFOS("==============================================================="); + //_exit( 0 ) ; + ASSERT(0); + return false; +} + //============================================================================= /*! * */ //============================================================================= - void ActSigIntHandler() { #ifndef WIN32 struct sigaction SigIntAct ; SigIntAct.sa_sigaction = &SigIntHandler ; + sigemptyset(&SigIntAct.sa_mask); SigIntAct.sa_flags = SA_SIGINFO ; #endif @@ -1270,9 +1384,9 @@ void SigIntHandler(int what , // A stream operation may be interrupted by a signal and if the Handler use stream we // may have a "Dead-Lock" ===HangUp //==MESSAGE is commented - // MESSAGE(pthread_self() << "SigIntHandler what " << what << endl - // << " si_signo " << siginfo->si_signo << endl - // << " si_code " << siginfo->si_code << endl + // MESSAGE(pthread_self() << "SigIntHandler what " << what << std::endl + // << " si_signo " << siginfo->si_signo << std::endl + // << " si_code " << siginfo->si_code << std::endl // << " si_pid " << siginfo->si_pid) ; if ( _Sleeping ) @@ -1311,9 +1425,9 @@ void SigIntHandler(int what , void SigIntHandler( int what ) { #ifndef WIN32 - MESSAGE( pthread_self() << "SigIntHandler what " << what << endl ); + MESSAGE( pthread_self() << "SigIntHandler what " << what << std::endl ); #else - MESSAGE( "SigIntHandler what " << what << endl ); + MESSAGE( "SigIntHandler what " << what << std::endl ); #endif if ( _Sleeping ) { @@ -1344,3 +1458,320 @@ void SigIntHandler( int what ) } } #endif + +//============================================================================= +//! Get or create a file reference object associated to a local file (to transfer it) +/*! +* CORBA method: get or create a fileRef object associated to a local file +* (a file on the computer on which runs the container server), which stores +* a list of (machine, localFileName) corresponding to copies already done. +* +* \param origFileName absolute path for a local file to copy on other +* computers +* \return a fileRef object associated to the file. +*/ +//============================================================================= +Engines::fileRef_ptr +Engines_Container_i::createFileRef(const char* origFileName) +{ + std::string origName(origFileName); + Engines::fileRef_var theFileRef = Engines::fileRef::_nil(); + + if (origName[0] != '/') + { + INFOS("path of file to copy must be an absolute path begining with '/'"); + return Engines::fileRef::_nil(); + } + + if (CORBA::is_nil(_fileRef_map[origName])) + { + CORBA::Object_var obj=_poa->id_to_reference(*_id); + Engines::Container_var pCont = Engines::Container::_narrow(obj); + fileRef_i* aFileRef = new fileRef_i(pCont, origFileName); + theFileRef = Engines::fileRef::_narrow(aFileRef->_this()); + _numInstanceMutex.lock() ; // lock to be alone (stl container write) + _fileRef_map[origName] = theFileRef; + _numInstanceMutex.unlock() ; + } + + theFileRef = Engines::fileRef::_duplicate(_fileRef_map[origName]); + ASSERT(! CORBA::is_nil(theFileRef)); + return theFileRef._retn(); +} + +//============================================================================= +//! Get a fileTransfer reference +/*! +* CORBA method: +* \return a reference to the fileTransfer object +*/ +//============================================================================= +Engines::fileTransfer_ptr +Engines_Container_i::getFileTransfer() +{ + Engines::fileTransfer_var aFileTransfer + = Engines::fileTransfer::_duplicate(_fileTransfer); + return aFileTransfer._retn(); +} + +//============================================================================= +//! Create a Salome file +//============================================================================= +Engines::Salome_file_ptr +Engines_Container_i::createSalome_file(const char* origFileName) +{ + std::string origName(origFileName); + if (CORBA::is_nil(_Salome_file_map[origName])) + { + Salome_file_i* aSalome_file = new Salome_file_i(); + aSalome_file->setContainer(Engines::Container::_duplicate(this->_this())); + try + { + aSalome_file->setLocalFile(origFileName); + aSalome_file->recvFiles(); + } + catch (const SALOME::SALOME_Exception& e) + { + return Engines::Salome_file::_nil(); + } + + Engines::Salome_file_var theSalome_file = Engines::Salome_file::_nil(); + theSalome_file = Engines::Salome_file::_narrow(aSalome_file->_this()); + _numInstanceMutex.lock() ; // lock to be alone (stl container write) + _Salome_file_map[origName] = theSalome_file; + _numInstanceMutex.unlock() ; + } + + Engines::Salome_file_ptr theSalome_file = + Engines::Salome_file::_duplicate(_Salome_file_map[origName]); + ASSERT(!CORBA::is_nil(theSalome_file)); + return theSalome_file; +} + +//============================================================================= +/*! \brief copy a file from a remote host (container) to the local host + * \param container the remote container + * \param remoteFile the file to copy locally from the remote host into localFile + * \param localFile the local file + */ +//============================================================================= +void Engines_Container_i::copyFile(Engines::Container_ptr container, const char* remoteFile, const char* localFile) +{ + Engines::fileTransfer_var fileTransfer = container->getFileTransfer(); + + FILE* fp; + if ((fp = fopen(localFile,"wb")) == NULL) + { + INFOS("file " << localFile << " cannot be open for writing"); + return; + } + + CORBA::Long fileId = fileTransfer->open(remoteFile); + if (fileId > 0) + { + Engines::fileBlock* aBlock; + int toFollow = 1; + int ctr=0; + while (toFollow) + { + ctr++; + SCRUTE(ctr); + aBlock = fileTransfer->getBlock(fileId); + toFollow = aBlock->length(); + SCRUTE(toFollow); + CORBA::Octet *buf = aBlock->get_buffer(); + fwrite(buf, sizeof(CORBA::Octet), toFollow, fp); + delete aBlock; + } + fclose(fp); + MESSAGE("end of transfer"); + fileTransfer->close(fileId); + } + else + { + INFOS("open reference file for copy impossible"); + } +} + +//============================================================================= +/*! \brief create a PyNode object to execute remote python code + * \param nodeName the name of the node + * \param code the python code to load + * \return the PyNode + */ +//============================================================================= +Engines::PyNode_ptr Engines_Container_i::createPyNode(const char* nodeName, const char* code) +{ + Engines::PyNode_var node= Engines::PyNode::_nil(); + + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *res = PyObject_CallMethod(_pyCont, + (char*)"create_pynode", + (char*)"ss", + nodeName, + code); + if(res==NULL) + { + //internal error + PyErr_Print(); + PyGILState_Release(gstate); + SALOME::ExceptionStruct es; + es.type = SALOME::INTERNAL_ERROR; + es.text = "can not create a python node"; + throw SALOME::SALOME_Exception(es); + } + long ierr=PyInt_AsLong(PyTuple_GetItem(res,0)); + PyObject* result=PyTuple_GetItem(res,1); + std::string astr=PyString_AsString(result); + Py_DECREF(res); + PyGILState_Release(gstate); + + if(ierr==0) + { + CORBA::Object_var obj = _orb->string_to_object(astr.c_str()); + node = Engines::PyNode::_narrow(obj); + return node._retn(); + } + else + { + SALOME::ExceptionStruct es; + es.type = SALOME::INTERNAL_ERROR; + es.text = astr.c_str(); + throw SALOME::SALOME_Exception(es); + } + +} + +//============================================================================= +/*! \brief create a PyScriptNode object to execute remote python code + * \param nodeName the name of the node + * \param code the python code to load + * \return the PyScriptNode + */ +//============================================================================= +Engines::PyScriptNode_ptr Engines_Container_i::createPyScriptNode(const char* nodeName, const char* code) +{ + Engines::PyScriptNode_var node= Engines::PyScriptNode::_nil(); + + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *res = PyObject_CallMethod(_pyCont, + (char*)"create_pyscriptnode", + (char*)"ss", + nodeName, + code); + if(res==NULL) + { + //internal error + PyErr_Print(); + PyGILState_Release(gstate); + SALOME::ExceptionStruct es; + es.type = SALOME::INTERNAL_ERROR; + es.text = "can not create a python node"; + throw SALOME::SALOME_Exception(es); + } + long ierr=PyInt_AsLong(PyTuple_GetItem(res,0)); + PyObject* result=PyTuple_GetItem(res,1); + std::string astr=PyString_AsString(result); + Py_DECREF(res); + PyGILState_Release(gstate); + + if(ierr==0) + { + CORBA::Object_var obj = _orb->string_to_object(astr.c_str()); + node = Engines::PyScriptNode::_narrow(obj); + return node._retn(); + } + else + { + SALOME::ExceptionStruct es; + es.type = SALOME::INTERNAL_ERROR; + es.text = astr.c_str(); + throw SALOME::SALOME_Exception(es); + } +} + +//============================================================================= +/* int checkifexecutable(const char *filename) +* +* Return non-zero if the name is an executable file, and +* zero if it is not executable, or if it does not exist. +*/ +//============================================================================= +int checkifexecutable(const std::string& filename) +{ + int result; + struct stat statinfo; + + result = stat(filename.c_str(), &statinfo); + if (result < 0) return 0; + if (!S_ISREG(statinfo.st_mode)) return 0; + +#ifdef WIN32 + return 1; +#else + if (statinfo.st_uid == geteuid()) return statinfo.st_mode & S_IXUSR; + if (statinfo.st_gid == getegid()) return statinfo.st_mode & S_IXGRP; + return statinfo.st_mode & S_IXOTH; +#endif +} + + +//============================================================================= +/*! \brief Find a file by searching in a path + * \param filename file name to search + * \param path path to search in + * \param pth the complete file path if found + * \return 1 if found 0 if not +*/ +//============================================================================= +int findpathof(const std::string& path, std::string& pth, const std::string& filename) +{ + if ( path.size() == 0 ) return 0; + + std::string::size_type offset = 0; + std::string::size_type pos = 0; + int found = 0; + struct stat statinfo; + + while(!found) + { + pos = path.find( SEP, offset ); + pth = path.substr( offset, pos - offset ); + if ( pth.size() > 0 ) + { + if( pth[pth.size()-1] != SLASH ) pth += SLASH; + pth += filename; + int result=stat(pth.c_str(), &statinfo); + if(result == 0) found=1; + } + if (pos == std::string::npos) break; + offset = pos+1; + } + return found; +} + +void Engines_Container_i::registerTemporaryFile( const std::string& fileName ) +{ + _tmp_files.remove( fileName ); + _tmp_files.push_back( fileName ); +} + +void Engines_Container_i::unregisterTemporaryFile( const std::string& fileName ) +{ + _tmp_files.remove( fileName ); +} + +void Engines_Container_i::clearTemporaryFiles() +{ + std::list::const_iterator it; + for ( it = _tmp_files.begin(); it != _tmp_files.end(); ++it ) { +#ifdef WIN32 + std::string command = "del /F "; +#else + std::string command = "rm -rf "; +#endif + command += *it; + system( command.c_str() ); + } + _tmp_files.clear(); +} diff --git a/src/Container/Container_init_python.cxx b/src/Container/Container_init_python.cxx index e5e1369db..4bfb81423 100644 --- a/src/Container/Container_init_python.cxx +++ b/src/Container/Container_init_python.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Container : implementation of container and engine for Kernel // File : Container_init_python.cxx // Author : Paul RASCLE, EDF @@ -34,8 +35,6 @@ #include "Container_init_python.hxx" -using namespace std; - PyThreadState *KERNEL_PYTHON::_gtstate = 0; PyObject *KERNEL_PYTHON::salome_shared_modules_module = NULL; PyInterpreterState *KERNEL_PYTHON::_interp = NULL; @@ -53,7 +52,9 @@ void KERNEL_PYTHON::init_python(int argc, char **argv) MESSAGE("================================================================="); // set stdout to line buffering (aka C++ std::cout) setvbuf(stdout, (char *)NULL, _IOLBF, BUFSIZ); - Py_SetProgramName(argv[0]); + char* salome_python=getenv("SALOME_PYTHON"); + if(salome_python != 0) + Py_SetProgramName(salome_python); Py_Initialize(); // Initialize the interpreter PySys_SetArgv(argc, argv); KERNEL_PYTHON::_interp = PyThreadState_Get()->interp; diff --git a/src/Container/Container_init_python.hxx b/src/Container/Container_init_python.hxx index 12e85e6de..d06c5ac1b 100644 --- a/src/Container/Container_init_python.hxx +++ b/src/Container/Container_init_python.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Container : implementation of container and engine for Kernel // File : Container_init_python.hxx // Author : Paul RASCLE, EDF @@ -32,6 +33,10 @@ #include #include // must be before Python.h ! + +#ifdef _XOPEN_SOURCE +#undef _XOPEN_SOURCE +#endif #include diff --git a/src/Container/Makefile.am b/src/Container/Makefile.am index 5f8172cff..7243153df 100644 --- a/src/Container/Makefile.am +++ b/src/Container/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # SALOME Container : implementation of container and engine for Kernel # File : Makefile.am # Author : Guillaume Boulant (CSSI) @@ -44,8 +45,9 @@ salomeinclude_HEADERS = \ Salome_file_i.hxx # Scripts to be installed -dist_salomescript_DATA =\ +dist_salomescript_PYTHON =\ SALOME_ComponentPy.py \ + SALOME_PyNode.py \ SALOME_Container.py # These files are executable scripts @@ -61,9 +63,7 @@ dist_salomescript_SCRIPTS=\ # This local variable defines the list of CPPFLAGS common to all target in this package. COMMON_CPPFLAGS=\ @PYTHON_INCLUDES@ \ - @MPI_INCLUDES@ \ @HDF5_INCLUDES@ \ - -I$(srcdir)/../Batch \ -I$(srcdir)/../Basics \ -I$(srcdir)/../SALOMELocalTrace \ -I$(srcdir)/../NamingService \ @@ -72,7 +72,7 @@ COMMON_CPPFLAGS=\ -I$(srcdir)/../Notification \ -I$(srcdir)/../ResourcesManager \ -I$(srcdir)/../HDFPersist \ - -I$(top_builddir)/salome_adm/unix \ + -I$(srcdir)/../GenericObj \ -I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ @LIBXML_INCLUDES@ @@ -87,12 +87,16 @@ COMMON_LIBS =\ ../SALOMELocalTrace/libSALOMELocalTrace.la \ ../Basics/libSALOMEBasics.la \ ../HDFPersist/libSalomeHDFPersist.la \ - ../Batch/libSalomeBatch.la \ + ../GenericObj/libSalomeGenericObj.la \ $(top_builddir)/idl/libSalomeIDLKernel.la \ - @MPI_LIBS@ \ @CORBA_LIBS@ \ $(PYTHON_LIBS) +if WITH_MPI_SEQ_CONTAINER +COMMON_CPPFLAGS += @MPI_INCLUDES@ +COMMON_LIBS += @MPI_LIBS@ +endif + # # =============================================================== # Libraries targets @@ -140,12 +144,15 @@ SALOME_Container_CPPFLAGS =\ SALOME_Container_LDADD = \ libSalomeContainer.la \ - ../Basics/libSALOMEBasics.la \ + ../Basics/libSALOMEBasics.la ${COMMON_LIBS} \ $(HDF5_LIBS) \ - $(MPI_LIBS) \ $(CORBA_LIBS) \ $(PYTHON_LIBS) +if WITH_MPI_SEQ_CONTAINER +SALOME_Container_LDADD += $(MPI_LIBS) +endif + SALOME_Container_LDFLAGS =\ -Xlinker -export-dynamic @@ -158,7 +165,12 @@ TestSalome_file_CPPFLAGS =\ TestSalome_file_LDADD =\ libSalomeContainer.la \ ../Basics/libSALOMEBasics.la \ + $(COMMON_LIBS) \ $(HDF5_LIBS) \ - $(MPI_LIBS) \ $(CORBA_LIBS) \ $(PYTHON_LIBS) + +install-data-hook: + @for f in $(dist_salomescript_PYTHON) ; do \ + chmod -f a+x $(DESTDIR)$(salomescriptdir)/$$f ; \ + done diff --git a/src/Container/SALOME_ComponentPy.py b/src/Container/SALOME_ComponentPy.py index dd7320643..55ec0ff55 100755 --- a/src/Container/SALOME_ComponentPy.py +++ b/src/Container/SALOME_ComponentPy.py @@ -1,37 +1,43 @@ #! /usr/bin/env python -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # SALOME Container : implementation of container and engine for Kernel # File : SALOME_ComponentPy.py # Author : Paul RASCLE, EDF # Module : SALOME # $Header$ + +## @package SALOME_ComponentPy +# \brief python implementation of component interface for Kernel # + import os import sys import time import string import signal -from omniORB import CORBA, PortableServer +from omniORB import CORBA, PortableServer, any import Engines, Engines__POA import Registry from Utils_Identity import * @@ -46,9 +52,10 @@ from thread import * _Sleeping = 0 -#define an implementation of the component interface - -class SALOME_ComponentPy_i (Engines__POA.Component): +## define an implementation of the component interface Engines::Component +# +# +class SALOME_ComponentPy_i (Engines__POA.EngineComponent): _orb = None _poa = None _fieldsDict = [] @@ -145,16 +152,14 @@ class SALOME_ComponentPy_i (Engines__POA.Component): def destroy(self): MESSAGE( "SALOME_ComponentPy_i::destroy" ) - #id = self._poa.servant_to_id(self) - #self._poa.deactivate_object(id) + id = self._poa.servant_to_id(self) + self._poa.deactivate_object(id) return #------------------------------------------------------------------------- def GetContainerRef(self): MESSAGE( "SALOME_ComponentPy_i::GetContainerRef" ) - #corbaObj_ptr = self._poa.id_to_reference(self._contId) - #return corbaObj_ptr._narrow(Engines.Container) return self._contId._narrow(Engines.Container) #------------------------------------------------------------------------- @@ -168,7 +173,13 @@ class SALOME_ComponentPy_i (Engines__POA.Component): self._StartUsed = self.CpuUsed_impl() self._ThreadCpuUsed = 0 self._Executed = 1 + print "beginService for ",serviceName," Component instance : ",self._instanceName MESSAGE( "SALOME_ComponentPy_i::beginService _StartUsed " + str( self._ThreadId ) + " " + str( self._StartUsed ) ) + for e in self._fieldsDict: + key=e.key + value=any.from_any(e.value) + if isinstance(value,str): + os.environ[key]=value #------------------------------------------------------------------------- @@ -176,6 +187,8 @@ class SALOME_ComponentPy_i (Engines__POA.Component): def endService(self , serviceName ): MESSAGE( "Send EndService notification for " + str( self._ThreadId ) + " " + str(serviceName) + " for graph/node " + str(self._graphName) + " " + str(self._nodeName) + " CpuUsed " + str( self.CpuUsed_impl() ) ) MESSAGE( "Component instance : " + str(self._instanceName) ) + print "endService for",serviceName,"Component instance :",self._instanceName,"Cpu Used:",self.CpuUsed_impl()," (s) " + #------------------------------------------------------------------------- @@ -270,7 +283,7 @@ class SALOME_ComponentPy_i (Engines__POA.Component): if ( self._ThreadId | self._Executed ) : if self._ThreadId == get_ident() : cpu = time.clock() - self._ThreadCpuUsed = int(cpu) - self._StartUsed + self._ThreadCpuUsed = cpu - self._StartUsed MESSAGE( "SALOME_ComponentPy_i::CpuUsed_impl " + self._serviceName + " " + str( int(cpu) ) + " - " + str( self._StartUsed ) + " = " + str( self._ThreadCpuUsed ) ) return self._ThreadCpuUsed MESSAGE( "SALOME_ComponentPy_i::CpuUsed_impl " + self._serviceName + " " + str( self._ThreadCpuUsed ) ) @@ -280,11 +293,24 @@ class SALOME_ComponentPy_i (Engines__POA.Component): #------------------------------------------------------------------------- - def DumpPython(self, theStudy, isPublished): - aBuffer = "def RebuildData(theStudy): pass\n\0" - return (aBuffer, 1) + def DumpPython(self, theStudy, isPublished, isMultiFile): + aBuffer = "\0" + if isMultiFile : + aBuffer = "def RebuildData(theStudy): pass\n\0" + return (aBuffer, 1) #------------------------------------------------------------------------- def getStudyId(self): return self._studyId + + #------------------------------------------------------------------------- + + def hasObjectInfo(self): + return 0 + + #------------------------------------------------------------------------- + + def getObjectInfo(self, studyId, entry): + return "" + diff --git a/src/Container/SALOME_Component_i.hxx b/src/Container/SALOME_Component_i.hxx index ccf8ddff2..94fd62ce8 100644 --- a/src/Container/SALOME_Component_i.hxx +++ b/src/Container/SALOME_Component_i.hxx @@ -1,30 +1,31 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Container : implementation of container and engine for Kernel // File : SALOME_Component_i.hxx // Author : Paul RASCLE, EDF - MARC TAJCHMAN, CEA // Module : SALOME // $Header$ - +// #ifndef _SALOME_COMPONENT_I_HXX_ #define _SALOME_COMPONENT_I_HXX_ @@ -49,33 +50,26 @@ class RegistryConnexion; class Engines_Container_i; class CONTAINER_EXPORT Engines_Component_i: - public virtual POA_Engines::Component, + public virtual POA_Engines::EngineComponent, public virtual PortableServer::ServantBase { public: Engines_Component_i(); Engines_Component_i(CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName, - bool notif = false); + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName, + bool notif = false, + bool regist = true); //Constructor for standalone component Engines_Component_i(CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - Engines::Container_ptr container, - const char *instanceName, - const char *interfaceName, + PortableServer::POA_ptr poa, + Engines::Container_ptr container, + const char *instanceName, + const char *interfaceName, bool notif = false, - bool regist=true); - // Constructor for parallel component : don't call registry - Engines_Component_i(CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName, - int flag, - bool notif = false); + bool regist = true); virtual ~Engines_Component_i(); @@ -93,41 +87,47 @@ public: void setProperties(const Engines::FieldsDict& dico); Engines::FieldsDict* getProperties(); - void Names( const char * graphName , const char * nodeName ) ; + virtual void SetOption(const char*, const char*); + virtual char* GetOption(const char*); + + void Names( const char * graphName , const char * nodeName ) ; bool Kill_impl(); bool Stop_impl(); bool Suspend_impl(); bool Resume_impl(); CORBA::Long CpuUsed_impl() ; - virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy, - CORBA::Boolean isPublished, - CORBA::Boolean& isValidScript); + virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy, + CORBA::Boolean isPublished, + CORBA::Boolean isMultiFile, + CORBA::Boolean& isValidScript); - // CORBA operations for Salome_file - virtual Engines::Salome_file_ptr getInputFileToService(const char* service_name, - const char* Salome_file_name); - virtual Engines::Salome_file_ptr getOutputFileToService(const char* service_name, - const char* Salome_file_name); + // CORBA operations for Salome_file + virtual Engines::Salome_file_ptr getInputFileToService(const char* service_name, + const char* Salome_file_name); + virtual Engines::Salome_file_ptr getOutputFileToService(const char* service_name, + const char* Salome_file_name); - virtual void checkInputFilesToService(const char* service_name); - virtual Engines::Salome_file_ptr setInputFileToService(const char* service_name, - const char* Salome_file_name); + virtual void checkInputFilesToService(const char* service_name); + virtual Engines::Salome_file_ptr setInputFileToService(const char* service_name, + const char* Salome_file_name); - virtual void checkOutputFilesToService(const char* service_name); - virtual Engines::Salome_file_ptr setOutputFileToService(const char* service_name, - const char* Salome_file_name); + virtual void checkOutputFilesToService(const char* service_name); + virtual Engines::Salome_file_ptr setOutputFileToService(const char* service_name, + const char* Salome_file_name); // Object information virtual bool hasObjectInfo() { return false; } - virtual char* getObjectInfo(CORBA::Long studyId, const char* entry) { return ""; } + virtual char* getObjectInfo(CORBA::Long studyId, const char* entry) { return CORBA::string_dup(""); } // --- local C++ methods PortableServer::ObjectId * getId(); Engines_Container_i *GetContainerPtr(); + std::string getContainerName(); + void setContainerName(); - bool setStudyId(CORBA::Long studyId); + virtual bool setStudyId(CORBA::Long studyId); static bool isMultiStudy(); static bool isMultiInstance(); static std::string GetDynLibraryName(const char *componentName); @@ -143,8 +143,8 @@ public: void CancelThread() ; virtual void configureSalome_file(std::string service_name, - std::string file_port_name, - Salome_file_i * file); + std::string file_port_name, + Salome_file_i * file); protected: @@ -154,6 +154,7 @@ protected: std::string _instanceName ; std::string _interfaceName ; + std::string _containerName ; CORBA::ORB_var _orb; PortableServer::POA_var _poa; diff --git a/src/Container/SALOME_Container.cxx b/src/Container/SALOME_Container.cxx index 07024cd13..e5a077a4f 100644 --- a/src/Container/SALOME_Container.cxx +++ b/src/Container/SALOME_Container.cxx @@ -1,36 +1,39 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Container : implementation of container and engine for Kernel // File : SALOME_Container.cxx // Author : Paul RASCLE, EDF - MARC TAJCHMAN, CEA // Module : SALOME // $Header$ // -#ifdef HAVE_MPI2 +#ifdef _MPI_SEQ_CONTAINER_ + #ifdef HAVE_MPI2 #include + #endif #endif #include -#include +#include #include #include #include @@ -57,8 +60,6 @@ #include "Container_init_python.hxx" -using namespace std; - extern "C" void HandleServerSideSignals(CORBA::ORB_ptr theORB); #include @@ -68,7 +69,14 @@ extern "C" void HandleServerSideSignals(CORBA::ORB_ptr theORB); # include #endif +void AttachDebugger(); +void Handler(int); +void terminateHandler(); +void unexpectedHandler(); + #ifndef WIN32 +void (* setsig(int, void (*)(int)))(int); + typedef void (*sighandler_t)(int); sighandler_t setsig(int sig, sighandler_t handler) { @@ -98,10 +106,10 @@ void AttachDebugger() void Handler(int theSigId) { - std::cerr << "SIGSEGV: " << std::endl; + std::cerr << "Signal= "<< theSigId << std::endl; AttachDebugger(); //to exit or not to exit - exit(1); + _exit(1); } void terminateHandler(void) @@ -118,16 +126,19 @@ void unexpectedHandler(void) int main(int argc, char* argv[]) { -#ifdef HAVE_MPI2 +#ifdef _MPI_SEQ_CONTAINER_ + #ifdef HAVE_MPI2 MPI_Init(&argc,&argv); -#endif + #endif +#endif #ifndef WIN32 if(getenv ("DEBUGGER")) { setsig(SIGSEGV,&Handler); - set_terminate(&terminateHandler); - set_unexpected(&unexpectedHandler); + setsig(SIGFPE,&Handler); + std::set_terminate(&terminateHandler); + std::set_unexpected(&unexpectedHandler); } #endif @@ -144,20 +155,8 @@ int main(int argc, char* argv[]) ASSERT(argc > 1); SCRUTE(argv[1]); - bool isSupervContainer = false; - if (strcmp(argv[1],"SuperVisionContainer") == 0) isSupervContainer = true; - if (!isSupervContainer) - { - // int _argc = 1; - // char* _argv[] = {""}; - KERNEL_PYTHON::init_python(argc,argv); - } - else - { - Py_Initialize() ; - PySys_SetArgv( argc , argv ) ; - } + KERNEL_PYTHON::init_python(argc,argv); char *containerName = (char *)""; if(argc > 1) @@ -175,8 +174,8 @@ int main(int argc, char* argv[]) // add new container to the kill list #ifndef WIN32 - stringstream aCommand ; - aCommand << "addToKillList.py " << getpid() << " SALOME_Container" << ends ; + std::stringstream aCommand ; + aCommand << "addToKillList.py " << getpid() << " SALOME_Container" << std::ends ; system(aCommand.str().c_str()); #endif @@ -193,16 +192,15 @@ int main(int argc, char* argv[]) HandleServerSideSignals(orb); - if (!isSupervContainer) - { +//#define MEMORYLEAKS +#ifdef MEMORYLEAKS PyGILState_Ensure(); - //Delete python container that destroy orb from python (pyCont._orb.destroy()) + //Destroy orb from python (for chasing memory leaks) + PyRun_SimpleString("from omniORB import CORBA"); + PyRun_SimpleString("orb=CORBA.ORB_init([''], CORBA.ORB_ID)"); + PyRun_SimpleString("orb.destroy()"); Py_Finalize(); - } - else - { - orb->destroy(); - } +#endif } catch(CORBA::SystemException&) { @@ -225,13 +223,12 @@ int main(int argc, char* argv[]) INFOS("Caught unknown exception."); } -#ifdef HAVE_MPI2 +#ifdef _MPI_SEQ_CONTAINER_ + #ifdef HAVE_MPI2 MPI_Finalize(); -#endif + #endif +#endif - //END_OF(argv[0]); - //LocalTraceBufferPool* bp1 = LocalTraceBufferPool::instance(); - //bp1->deleteInstance(bp1); return 0 ; } diff --git a/src/Container/SALOME_Container.hxx b/src/Container/SALOME_Container.hxx index c1e1e24df..f6b1b336f 100755 --- a/src/Container/SALOME_Container.hxx +++ b/src/Container/SALOME_Container.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOME_Container.hxx // Author : Alexander A. BORODIN // Module : SALOME @@ -27,7 +28,7 @@ #define _SALOME_Container_HXX_ #ifdef WIN32 -# ifdef CONTAINER_EXPORTS +# if defined CONTAINER_EXPORTS || defined SalomeContainer_EXPORTS # define CONTAINER_EXPORT __declspec( dllexport ) # else # define CONTAINER_EXPORT __declspec( dllimport ) diff --git a/src/Container/SALOME_Container.py b/src/Container/SALOME_Container.py index 9b6d7f893..ed5d6dd78 100644 --- a/src/Container/SALOME_Container.py +++ b/src/Container/SALOME_Container.py @@ -1,39 +1,48 @@ #! /usr/bin/env python -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # SALOME Container : implementation of container and engine for Kernel # File : SALOME_Container.py # Author : Paul RASCLE, EDF # Module : SALOME # $Header$ + +## @package SALOME_Container +# \brief python implementation of container interface for Kernel # + import os import sys import string +import traceback +import imp from omniORB import CORBA, PortableServer -import SALOMEDS +import SALOMEDS import Engines, Engines__POA from SALOME_NamingServicePy import * from SALOME_ComponentPy import * +import SALOME_PyNode from SALOME_utilities import * from Utils_Identity import getShortHostName @@ -41,7 +50,7 @@ from launchConfigureParser import verbose #============================================================================= -#define an implementation of the container interface +#define an implementation of the container interface for embedding in Container implemented in C++ class SALOME_Container_i: _orb = None @@ -62,20 +71,31 @@ class SALOME_Container_i: #------------------------------------------------------------------------- - #def __del__(self ): - # self._orb.destroy() - def import_component(self, componentName): MESSAGE( "SALOME_Container_i::import_component" ) - ret=0 + ret="" try: if verbose(): print "try import ",componentName __import__(componentName) if verbose(): print "import ",componentName," successful" - ret=1 + except ImportError,e: + #can't import python module componentName + #try to find it in python path + try: + fp, pathname, description = imp.find_module(componentName) + if fp:fp.close() + #module file found in path + ret="Component "+componentName+": Python implementation found but it can't be loaded\n" + ret=ret+traceback.format_exc(10) + except ImportError,ee: + ret="ImplementationNotFound" + except: + if verbose():print "error when calling find_module" + ret="ImplementationNotFound" except: + ret="Component "+componentName+": Python implementation found but it can't be loaded\n" + ret=ret+traceback.format_exc(10) if verbose(): - import traceback traceback.print_exc() print "import ",componentName," not possible" return ret @@ -85,6 +105,7 @@ class SALOME_Container_i: def create_component_instance(self, componentName, instanceName, studyId): MESSAGE( "SALOME_Container_i::create_component_instance" ) comp_iors="" + ret="" try: component=__import__(componentName) factory=getattr(component,componentName) @@ -99,9 +120,32 @@ class SALOME_Container_i: comp_o = comp_i._this() comp_iors = self._orb.object_to_string(comp_o) except: - import traceback + ret=traceback.format_exc(10) traceback.print_exc() MESSAGE( "SALOME_Container_i::create_component_instance : NOT OK") - return comp_iors + return comp_iors, ret + def create_pynode(self,nodeName,code): + try: + node=SALOME_PyNode.PyNode_i(nodeName,code,self._poa,self) + id_o = self._poa.activate_object(node) + comp_o = self._poa.id_to_reference(id_o) + comp_iors = self._orb.object_to_string(comp_o) + return 0,comp_iors + except: + exc_typ,exc_val,exc_fr=sys.exc_info() + l=traceback.format_exception(exc_typ,exc_val,exc_fr) + return 1,"".join(l) + + def create_pyscriptnode(self,nodeName,code): + try: + node=SALOME_PyNode.PyScriptNode_i(nodeName,code,self._poa,self) + id_o = self._poa.activate_object(node) + comp_o = self._poa.id_to_reference(id_o) + comp_iors = self._orb.object_to_string(comp_o) + return 0,comp_iors + except: + exc_typ,exc_val,exc_fr=sys.exc_info() + l=traceback.format_exception(exc_typ,exc_val,exc_fr) + return 1,"".join(l) diff --git a/src/Container/SALOME_ContainerManager.cxx b/src/Container/SALOME_ContainerManager.cxx index 3c7fdf021..a513af413 100644 --- a/src/Container/SALOME_ContainerManager.cxx +++ b/src/Container/SALOME_ContainerManager.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "SALOME_ContainerManager.hxx" #include "SALOME_NamingService.hxx" #include "SALOME_ModuleCatalog.hh" @@ -26,28 +27,32 @@ #include "Basics_DirUtils.hxx" #include #include +#include #ifndef WIN32 #include #endif #include #include "Utils_CorbaException.hxx" -#include "Batch_Date.hxx" +#include +#include -#ifdef WITH_PACO_PARALLEL -#include "PaCO++.h" +#ifdef WNT +#include +#define getpid _getpid #endif -#define TIME_OUT_TO_LAUNCH_CONT 61 - -using namespace std; - -vector SALOME_ContainerManager::_batchLaunchedContainers; +#ifdef WITH_PACO_PARALLEL +#include "PaCOPP.hxx" +#endif -vector::iterator SALOME_ContainerManager::_batchLaunchedContainersIter; +#define TIME_OUT_TO_LAUNCH_CONT 60 const char *SALOME_ContainerManager::_ContainerManagerNameInNS = "/ContainerManager"; +omni_mutex SALOME_ContainerManager::_numInstanceMutex; + + //============================================================================= /*! * Constructor @@ -57,12 +62,11 @@ const char *SALOME_ContainerManager::_ContainerManagerNameInNS = */ //============================================================================= -SALOME_ContainerManager::SALOME_ContainerManager(CORBA::ORB_ptr orb, PortableServer::POA_var poa, SALOME_ResourcesManager *rm, SALOME_NamingService *ns) +SALOME_ContainerManager::SALOME_ContainerManager(CORBA::ORB_ptr orb, PortableServer::POA_var poa, SALOME_ResourcesManager *rm, SALOME_NamingService *ns):_nbprocUsed(1) { MESSAGE("constructor"); _NS = ns; _ResManager = rm; - _id=0; PortableServer::POAManager_var pman = poa->the_POAManager(); _orb = CORBA::ORB::_duplicate(orb) ; @@ -80,8 +84,53 @@ SALOME_ContainerManager::SALOME_ContainerManager(CORBA::ORB_ptr orb, PortableSer Engines::ContainerManager::_narrow(obj); _NS->Register(refContMan,_ContainerManagerNameInNS); - _MpiStarted = false; _isAppliSalomeDefined = (getenv("APPLI") != 0); + +#ifdef HAVE_MPI2 +#ifdef WITHOPENMPI + _pid_mpiServer = -1; + // the urifile name depends on pid of the process + std::stringstream urifile; + urifile << getenv("HOME") << "/.urifile_" << getpid(); + setenv("OMPI_URI_FILE",urifile.str().c_str(),1); + if( getenv("OMPI_URI_FILE") != NULL ){ + // get the pid of all ompi-server + std::set thepids1 = getpidofprogram("ompi-server"); + // launch a new ompi-server + std::string command; + command = "ompi-server -r "; + command += getenv("OMPI_URI_FILE"); + int status=system(command.c_str()); + if(status!=0) + throw SALOME_Exception("Error when launching ompi-server"); + // get the pid of all ompi-server + std::set thepids2 = getpidofprogram("ompi-server"); + // my ompi-server is the new one + std::set::const_iterator it; + for(it=thepids2.begin();it!=thepids2.end();it++) + if(thepids1.find(*it) == thepids1.end()) + _pid_mpiServer = *it; + if(_pid_mpiServer < 0) + throw SALOME_Exception("Error when getting ompi-server id"); + } +#elif defined(WITHMPICH) + _pid_mpiServer = -1; + // get the pid of all hydra_nameserver + std::set thepids1 = getpidofprogram("hydra_nameserver"); + // launch a new hydra_nameserver + std::string command; + command = "hydra_nameserver &"; + system(command.c_str()); + // get the pid of all hydra_nameserver + std::set thepids2 = getpidofprogram("hydra_nameserver"); + // my hydra_nameserver is the new one + std::set::const_iterator it; + for(it=thepids2.begin();it!=thepids2.end();it++) + if(thepids1.find(*it) == thepids1.end()) + _pid_mpiServer = *it; +#endif +#endif + MESSAGE("constructor end"); } @@ -94,11 +143,29 @@ SALOME_ContainerManager::SALOME_ContainerManager(CORBA::ORB_ptr orb, PortableSer SALOME_ContainerManager::~SALOME_ContainerManager() { MESSAGE("destructor"); +#ifdef HAVE_MPI2 +#ifdef WITHOPENMPI + if( getenv("OMPI_URI_FILE") != NULL ){ + // kill my ompi-server + if( kill(_pid_mpiServer,SIGTERM) != 0 ) + throw SALOME_Exception("Error when killing ompi-server"); + // delete my urifile + int status=system("rm -f ${OMPI_URI_FILE}"); + if(status!=0) + throw SALOME_Exception("Error when removing urifile"); + } +#elif defined(WITHMPICH) + // kill my hydra_nameserver + if(_pid_mpiServer > -1) + if( kill(_pid_mpiServer,SIGTERM) != 0 ) + throw SALOME_Exception("Error when killing hydra_nameserver"); +#endif +#endif } //============================================================================= +//! shutdown all the containers, then the ContainerManager servant /*! CORBA method: - * shutdown all the containers, then the ContainerManager servant */ //============================================================================= @@ -109,13 +176,11 @@ void SALOME_ContainerManager::Shutdown() _NS->Destroy_Name(_ContainerManagerNameInNS); PortableServer::ObjectId_var oid = _poa->servant_to_id(this); _poa->deactivate_object(oid); - //_remove_ref() has already been done at creation - //_remove_ref(); } //============================================================================= +//! Loop on all the containers listed in naming service, ask shutdown on each /*! CORBA Method: - * Loop on all the containers listed in naming service, ask shutdown on each */ //============================================================================= @@ -125,9 +190,9 @@ void SALOME_ContainerManager::ShutdownContainers() bool isOK; isOK = _NS->Change_Directory("/Containers"); if( isOK ){ - vector vec = _NS->list_directory_recurs(); - list lstCont; - for(vector::iterator iter = vec.begin();iter!=vec.end();iter++) + std::vector vec = _NS->list_directory_recurs(); + std::list lstCont; + for(std::vector::iterator iter = vec.begin();iter!=vec.end();iter++) { SCRUTE((*iter)); CORBA::Object_var obj=_NS->Resolve((*iter).c_str()); @@ -135,7 +200,7 @@ void SALOME_ContainerManager::ShutdownContainers() { Engines::Container_var cont=Engines::Container::_narrow(obj); if(!CORBA::is_nil(cont)) - lstCont.push_back((*iter)); + lstCont.push_back((*iter)); } catch(const CORBA::Exception& e) { @@ -143,632 +208,486 @@ void SALOME_ContainerManager::ShutdownContainers() } } MESSAGE("Container list: "); - for(list::iterator iter=lstCont.begin();iter!=lstCont.end();iter++){ + for(std::list::iterator iter=lstCont.begin();iter!=lstCont.end();iter++){ SCRUTE((*iter)); } - for(list::iterator iter=lstCont.begin();iter!=lstCont.end();iter++){ - SCRUTE((*iter)); - CORBA::Object_var obj=_NS->Resolve((*iter).c_str()); - Engines::Container_var cont=Engines::Container::_narrow(obj); - if(!CORBA::is_nil(cont)) + for(std::list::iterator iter=lstCont.begin();iter!=lstCont.end();iter++) + { + try + { + SCRUTE((*iter)); + CORBA::Object_var obj=_NS->Resolve((*iter).c_str()); + Engines::Container_var cont=Engines::Container::_narrow(obj); + if(!CORBA::is_nil(cont)) { - MESSAGE("ShutdownContainers: " << (*iter)); - try - { - cont->Shutdown(); - } - catch(CORBA::SystemException& e) - { - INFOS("CORBA::SystemException ignored : " << e); - } - catch(CORBA::Exception&) - { - INFOS("CORBA::Exception ignored."); - } - catch(...) - { - INFOS("Unknown exception ignored."); - } + MESSAGE("ShutdownContainers: " << (*iter)); + cont->Shutdown(); } - else - MESSAGE("ShutdownContainers: no container ref for " << (*iter)); + else + MESSAGE("ShutdownContainers: no container ref for " << (*iter)); + } + catch(CORBA::SystemException& e) + { + INFOS("CORBA::SystemException ignored : " << e); + } + catch(CORBA::Exception&) + { + INFOS("CORBA::Exception ignored."); + } + catch(...) + { + INFOS("Unknown exception ignored."); + } } } } //============================================================================= +//! Give a suitable Container given constraints /*! CORBA Method: - * Find a suitable Container in a list of machines, or start one - * \param params Machine Parameters required for the container - * \param possibleComputers list of machines usable for find or start - */ -//============================================================================= - -Engines::Container_ptr -SALOME_ContainerManager:: -FindOrStartContainer(const Engines::MachineParameters& params, - const Engines::MachineList& possibleComputers) -{ - Engines::Container_ptr ret = FindContainer(params,possibleComputers); - if(!CORBA::is_nil(ret)) - return ret; - MESSAGE("Container doesn't exist try to launch it ..."); - - return StartContainer(params,possibleComputers,Engines::P_FIRST); - -} - -//============================================================================= -/*! CORBA Method: - * Start a suitable Container in a list of machines - * \param params Machine Parameters required for the container - * \param possibleComputers list of machines usable for start + * \param params Container Parameters required for the container + * \return the container or nil */ //============================================================================= - Engines::Container_ptr -SALOME_ContainerManager:: -StartContainer(const Engines::MachineParameters& params, - const Engines::MachineList& possibleComputers, - Engines::ResPolicy policy,const std::string& container_exe) +SALOME_ContainerManager::GiveContainer(const Engines::ContainerParameters& params) { -#ifdef WITH_PACO_PARALLEL - std::string parallelLib(params.parallelLib); - if (parallelLib != "") - return FindOrStartParallelContainer(params, possibleComputers); -#endif - long id; - string containerNameInNS; - char idc[3*sizeof(long)]; + std::string machFile; Engines::Container_ptr ret = Engines::Container::_nil(); - MESSAGE("SALOME_ContainerManager::StartContainer " << - possibleComputers.length()); - - vector lm; - for(unsigned int i=0;iGetImpl()->FindFirst(lm); - break; - case Engines::P_CYCL: - theMachine=_ResManager->GetImpl()->FindNext(lm); - break; - case Engines::P_BEST: - theMachine=_ResManager->GetImpl()->FindBest(lm); - break; + // Step 0: Default mode is start + Engines::ContainerParameters local_params(params); + if (std::string(local_params.mode.in()) == "") + local_params.mode = CORBA::string_dup("start"); + std::string mode = local_params.mode.in(); + MESSAGE("[GiveContainer] starting with mode: " << mode); + + // Step 1: Find Container for find and findorstart mode + if (mode == "find" || mode == "findorstart") + { + ret = FindContainer(params, params.resource_params.resList); + if(!CORBA::is_nil(ret)) + return ret; + else + { + if (mode == "find") + { + MESSAGE("[GiveContainer] no container found"); + return ret; + } + else + { + mode = "start"; + } } } - catch( const SALOME_Exception &ex ){ - MESSAGE(ex.what()); - return Engines::Container::_nil(); - } - - //If the machine name is localhost use the real name - if(theMachine == "localhost") - theMachine=Kernel_Utils::GetHostname(); - - MESSAGE("try to launch it on " << theMachine); - - // Get Id for container: a parallel container registers in Naming Service - // on the machine where is process 0. ContainerManager does'nt know the name - // of this machine before the launch of the parallel container. So to get - // the IOR of the parallel container in Naming Service, ContainerManager - // gives a unique Id. The parallel container registers his name under - // /ContainerManager/Id directory in NamingService - id = GetIdForContainer(); - - string command; - if(theMachine==""){ - MESSAGE("SALOME_ContainerManager::StartContainer : " << - "no possible computer"); - return Engines::Container::_nil(); - } - else if(theMachine==Kernel_Utils::GetHostname()) - command = BuildCommandToLaunchLocalContainer(params,id,container_exe); - else - command = BuildCommandToLaunchRemoteContainer(theMachine,params,id,container_exe); + // Step 2: Get all possibleResources from the parameters + Engines::ResourceList_var possibleResources = _ResManager->GetFittingResources(local_params.resource_params); + MESSAGE("[GiveContainer] - length of possible resources " << possibleResources->length()); + std::vector local_resources; - // RmTmpFile(); Too early! May be this function has not been used for a long time... + // Step 3: if mode is "get" keep only machines with existing containers + if(mode == "get") + { + for(unsigned int i=0; i < possibleResources->length(); i++) + { + Engines::Container_ptr cont = FindContainer(params, possibleResources[i].in()); + try + { + if(!cont->_non_existent()) + local_resources.push_back(std::string(possibleResources[i])); + } + catch(CORBA::Exception&) {} + } - //check if an entry exists in Naming service - if(params.isMPI) + // if local_resources is empty, we cannot give a container + if (local_resources.size() == 0) { - containerNameInNS = "/ContainerManager/id"; - sprintf(idc,"%ld",id); - containerNameInNS += idc; + MESSAGE("[GiveContainer] cannot find a container for mode get"); + return ret; } + } else - containerNameInNS = _NS->BuildContainerNameForNS(params,theMachine.c_str()); - - SCRUTE(containerNameInNS); - CORBA::Object_var obj = _NS->Resolve(containerNameInNS.c_str()); - if ( !CORBA::is_nil(obj) ) + for(unsigned int i=0; i < possibleResources->length(); i++) + local_resources.push_back(std::string(possibleResources[i])); + + // Step 4: select the resource where to get/start the container + bool resource_available = true; + std::string resource_selected; + std::vector resources = local_resources; + while (resource_available) + { + if (resources.size() == 0) + resource_available = false; + else { try + { + resource_selected = _ResManager->GetImpl()->Find(params.resource_params.policy.in(), resources); + // Remove resource_selected from vector + std::vector::iterator it; + for (it=resources.begin() ; it < resources.end(); it++ ) + if (*it == resource_selected) + { + resources.erase(it); + break; + } + } + catch(const SALOME_Exception &ex) + { + MESSAGE("[GiveContainer] Exception in ResourceManager find !: " << ex.what()); + return ret; + } + MESSAGE("[GiveContainer] Resource selected is: " << resource_selected); + + // Step 5: Create container name + Engines::ResourceDefinition_var resource_definition = _ResManager->GetResourceDefinition(resource_selected.c_str()); + std::string hostname(resource_definition->hostname.in()); + std::string containerNameInNS; + if(params.isMPI){ + int nbproc; + if ( params.nb_proc <= 0 ) + nbproc = 1; + else + nbproc = params.nb_proc; + try { - // shutdown the registered container if it exists - Engines::Container_var cont=Engines::Container::_narrow(obj); - if(!CORBA::is_nil(cont)) - cont->Shutdown(); + if( getenv("LIBBATCH_NODEFILE") != NULL ) + machFile = machinesFile(nbproc); } - catch(CORBA::Exception&) + catch(const SALOME_Exception & ex) { - INFOS("CORBA::Exception ignored."); + std::string err_msg = ex.what(); + err_msg += params.container_name; + INFOS(err_msg.c_str()); + return ret; } - } - - //redirect stdout and stderr in a file - string logFilename="/tmp/"+_NS->ContainerName(params)+"_"+ theMachine +"_"+getenv( "USER" )+".log" ; - command += " > " + logFilename + " 2>&1 &"; - - // launch container with a system call - int status=system(command.c_str()); - - - if (status == -1){ - MESSAGE("SALOME_LifeCycleCORBA::StartOrFindContainer rsh failed " << - "(system command status -1)"); - RmTmpFile(); // command file can be removed here - return Engines::Container::_nil(); - } - else if (status == 217){ - MESSAGE("SALOME_LifeCycleCORBA::StartOrFindContainer rsh failed " << - "(system command status 217)"); - RmTmpFile(); // command file can be removed here - return Engines::Container::_nil(); - } - else{ - int count=TIME_OUT_TO_LAUNCH_CONT; - MESSAGE("count = "<BuildContainerNameForNS(params, GetMPIZeroNode(hostname,machFile).c_str()); + } + else + containerNameInNS = _NS->BuildContainerNameForNS(params, hostname.c_str()); + MESSAGE("[GiveContainer] Container name in the naming service: " << containerNameInNS); + // Step 6: check if the name exists in naming service + //if params.mode == "getorstart" or "get" use the existing container + //if params.mode == "start" shutdown the existing container before launching a new one with that name CORBA::Object_var obj = _NS->Resolve(containerNameInNS.c_str()); - ret=Engines::Container::_narrow(obj); - } - - if ( CORBA::is_nil(ret) ) + if (!CORBA::is_nil(obj)) { - MESSAGE("SALOME_LifeCycleCORBA::StartOrFindContainer rsh failed"); + try + { + Engines::Container_var cont=Engines::Container::_narrow(obj); + if(!cont->_non_existent()) + { + if(std::string(params.mode.in())=="getorstart" || std::string(params.mode.in())=="get"){ + return cont._retn(); /* the container exists and params.mode is getorstart or get use it*/ + } + else + { + INFOS("[GiveContainer] A container is already registered with the name: " << containerNameInNS << ", shutdown the existing container"); + cont->Shutdown(); // shutdown the registered container if it exists + } + } + } + catch(CORBA::Exception&) + { + INFOS("[GiveContainer] CORBA::Exception ignored when trying to get the container - we start a new one"); + } } - else + Engines::Container_var cont = LaunchContainer(params, resource_selected, hostname, machFile, containerNameInNS); + if (!CORBA::is_nil(cont)) { - logFilename=":"+logFilename; - logFilename="@"+Kernel_Utils::GetHostname()+logFilename; - logFilename=getenv( "USER" )+logFilename; - ret->logfilename(logFilename.c_str()); + INFOS("[GiveContainer] container " << containerNameInNS << " launched"); + return cont._retn(); } - - RmTmpFile(); // command file can be removed here - return ret; + else + { + INFOS("[GiveContainer] Failed to launch container on resource " << resource_selected); + } + } } -} -//============================================================================= -/*! CORBA Method: - * Start a suitable Container in a list of machines - * \param params Machine Parameters required for the container - * \param possibleComputers list of machines usable for start - */ -//============================================================================= + // We were not able to launch the container + INFOS("[GiveContainer] Cannot launch the container on the following selected resources:") + std::vector::iterator it; + for (it=local_resources.begin() ; it < local_resources.end(); it++ ) + INFOS("[GiveContainer] " << *it) + return ret; +} Engines::Container_ptr -SALOME_ContainerManager:: -StartContainer(const Engines::MachineParameters& params, - Engines::ResPolicy policy, - const Engines::CompoList& componentList) +SALOME_ContainerManager::LaunchContainer(const Engines::ContainerParameters& params, + const std::string & resource_selected, + const std::string & hostname, + const std::string & machFile, + const std::string & containerNameInNS) { - Engines::MachineList_var possibleComputers = _ResManager->GetFittingResources(params,componentList); - // Look into ModulCatalog if a specific container must be launched - CORBA::String_var container_exe; + // Step 1: type of container: PaCO, Exe, Mpi or Classic + // Mpi already tested in step 5, specific code on BuildCommandToLaunch Local/Remote Container methods + // TODO -> separates Mpi from Classic/Exe + // Classic or Exe ? + std::string container_exe = "SALOME_Container"; // Classic container + Engines::ContainerParameters local_params(params); + Engines::Container_ptr ret = Engines::Container::_nil(); int found=0; try + { + CORBA::String_var container_exe_tmp; + CORBA::Object_var obj = _NS->Resolve("/Kernel/ModulCatalog"); + SALOME_ModuleCatalog::ModuleCatalog_var Catalog = SALOME_ModuleCatalog::ModuleCatalog::_narrow(obj) ; + if (CORBA::is_nil (Catalog)) + { + INFOS("[GiveContainer] Module Catalog is not found -> cannot launch a container"); + return ret; + } + // Loop through component list + for(unsigned int i=0; i < local_params.resource_params.componentList.length(); i++) { - CORBA::Object_var obj = _NS->Resolve("/Kernel/ModulCatalog"); - SALOME_ModuleCatalog::ModuleCatalog_var Catalog = SALOME_ModuleCatalog::ModuleCatalog::_narrow(obj) ; - if (CORBA::is_nil (Catalog)) - return Engines::Container::_nil(); - // Loop through component list - for(unsigned int i=0;iGetComponent(compoi); + if (CORBA::is_nil (compoInfo)) + { + continue; + } + SALOME_ModuleCatalog::ImplType impl=compoInfo->implementation_type(); + container_exe_tmp=compoInfo->implementation_name(); + if(impl==SALOME_ModuleCatalog::CEXE) + { + if(found) { - const char* compoi = componentList[i]; - SALOME_ModuleCatalog::Acomponent_var compoInfo = Catalog->GetComponent(compoi); - if (CORBA::is_nil (compoInfo)) - { - continue; - } - SALOME_ModuleCatalog::ImplType impl=compoInfo->implementation_type(); - container_exe=compoInfo->implementation_name(); - if(impl==SALOME_ModuleCatalog::CEXE) - { - if(found) - { - INFOS("ContainerManager Error: you can't have 2 CEXE component in the same container" ); - return Engines::Container::_nil(); - } - found=1; - } + INFOS("ContainerManager Error: you can't have 2 CEXE component in the same container" ); + return Engines::Container::_nil(); } + MESSAGE("[GiveContainer] Exe container found !: " << container_exe_tmp); + container_exe = container_exe_tmp.in(); + found=1; + } } + } catch (ServiceUnreachable&) + { + INFOS("Caught exception: Naming Service Unreachable"); + return ret; + } + catch (...) + { + INFOS("Caught unknown exception."); + return ret; + } + + // Step 2: test resource + // Only if an application directory is set + if(hostname != Kernel_Utils::GetHostname() && _isAppliSalomeDefined) + { + // Preparing remote command + std::string command = ""; + const ParserResourcesType& resInfo = _ResManager->GetImpl()->GetResourcesDescr(resource_selected); + command = getCommandToRunRemoteProcess(resInfo.Protocol, resInfo.HostName, resInfo.UserName); + if (resInfo.AppliPath != "") + command += resInfo.AppliPath; + else { - INFOS("Caught exception: Naming Service Unreachable"); - return Engines::Container::_nil(); + ASSERT(getenv("APPLI")); + command += getenv("APPLI"); } - catch (...) + command += "/runRemote.sh "; + ASSERT(getenv("NSHOST")); + command += getenv("NSHOST"); // hostname of CORBA name server + command += " "; + ASSERT(getenv("NSPORT")); + command += getenv("NSPORT"); // port of CORBA name server + command += " ls /tmp"; + + // Launch remote command + int status = system(command.c_str()); + if (status != 0) { - INFOS("Caught unknown exception."); + // Error on resource - cannot launch commands + INFOS("[LaunchContainer] Cannot launch commands on machine " << hostname); + INFOS("[LaunchContainer] Command was " << command); +#ifndef WIN32 + INFOS("[LaunchContainer] Command status is " << WEXITSTATUS(status)); +#endif return Engines::Container::_nil(); } + } - if(found) - return StartContainer(params,possibleComputers,policy,container_exe.in()); + // Step 3: start a new container + // Check if a PaCO container + // PaCO++ + if (std::string(local_params.parallelLib.in()) != "") + { + ret = StartPaCOPPContainer(params, resource_selected); + return ret; + } + // Other type of containers... + MESSAGE("[GiveContainer] Try to launch a new container on " << resource_selected); + std::string command; + // if a parallel container is launched in batch job, command is: "mpirun -np nbproc -machinefile nodesfile SALOME_MPIContainer" + if( getenv("LIBBATCH_NODEFILE") != NULL && params.isMPI ) + command = BuildCommandToLaunchLocalContainer(params, machFile, container_exe); + // if a container is launched on localhost, command is "SALOME_Container" or "mpirun -np nbproc SALOME_MPIContainer" + else if(hostname == Kernel_Utils::GetHostname()) + command = BuildCommandToLaunchLocalContainer(params, machFile, container_exe); + // if a container is launched in remote mode, command is "ssh resource_selected SALOME_Container" or "ssh resource_selected mpirun -np nbproc SALOME_MPIContainer" else - return StartContainer(params,possibleComputers,policy); -} + command = BuildCommandToLaunchRemoteContainer(resource_selected, params, container_exe); -#ifdef WITH_PACO_PARALLEL -//============================================================================= -/*! CORBA Method: - * Find or Start a suitable PaCO++ Parallel Container in a list of machines. - * \param params Machine Parameters required for the container - * \param possibleComputers list of machines usable for find or start - * - * \return CORBA container reference. - */ -//============================================================================= -Engines::Container_ptr -SALOME_ContainerManager:: -FindOrStartParallelContainer(const Engines::MachineParameters& params_const, - const Engines::MachineList& possibleComputers) -{ - CORBA::Object_var obj; - PaCO::InterfaceManager_var proxy; - Engines::Container_ptr ret = Engines::Container::_nil(); - Engines::MachineParameters params(params_const); - - // Step 1 : Try to find a suitable container - // Currently not as good as could be since - // we have to verified the number of nodes of the container - // if a user tell that. - ret = FindContainer(params, possibleComputers); - - if(CORBA::is_nil(ret)) { - // Step 2 : Starting a new parallel container - INFOS("[FindOrStartParallelContainer] Starting a parallel container"); - - // Step 2.1 : Choose a computer - string theMachine = _ResManager->FindFirst(possibleComputers); - if(theMachine == "") { - INFOS("[FindOrStartParallelContainer] !!!!!!!!!!!!!!!!!!!!!!!!!!"); - INFOS("[FindOrStartParallelContainer] No possible computer found"); - INFOS("[FindOrStartParallelContainer] !!!!!!!!!!!!!!!!!!!!!!!!!!"); - } - else { - INFOS("[FindOrStartParallelContainer] on machine : " << theMachine); - string command; - if(theMachine == Kernel_Utils::GetHostname()) { - // Step 3 : starting parallel container proxy - params.hostname = CORBA::string_dup(theMachine.c_str()); - Engines::MachineParameters params_proxy(params); - try { - command = BuildCommandToLaunchLocalParallelContainer("SALOME_ParallelContainerProxy", params_proxy, "xterm"); - } - catch(const SALOME_Exception & ex){ - MESSAGE(ex.what()); - return Engines::Container::_nil(); - } - // LaunchParallelContainer uses this value to know if it launches the proxy or the nodes - params_proxy.nb_component_nodes = 0; - obj = LaunchParallelContainer(command, params_proxy, _NS->ContainerName(params)); - ret = Engines::Container::_narrow(obj); - proxy = PaCO::InterfaceManager::_narrow(obj); - - // Step 4 : starting parallel container nodes - command = BuildCommandToLaunchLocalParallelContainer("SALOME_ParallelContainerNode", params, "xterm"); - string name = _NS->ContainerName(params) + "Node"; - LaunchParallelContainer(command, params, name); - // Step 5 : connecting nodes and the proxy to actually create a parallel container - try { - for (int i = 0; i < params.nb_component_nodes; i++) { - - char buffer [5]; -#ifndef WIN32 - snprintf(buffer,5,"%d",i); + //redirect stdout and stderr in a file +#ifdef WNT + std::string logFilename=getenv("TEMP"); + logFilename += "\\"; + std::string user = getenv( "USERNAME" ); #else - _snprintf(buffer,5,"%d",i); + std::string user = getenv( "USER" ); + std::string logFilename="/tmp"; + char* val = getenv("SALOME_TMP_DIR"); + if(val) + { + struct stat file_info; + stat(val, &file_info); + bool is_dir = S_ISDIR(file_info.st_mode); + if (is_dir)logFilename=val; + else std::cerr << "SALOME_TMP_DIR environment variable is not a directory use /tmp instead" << std::endl; + } + logFilename += "/"; #endif - string name_cont = name + string(buffer); - - string theNodeMachine(CORBA::string_dup(params.hostname)); - string containerNameInNS = _NS->BuildContainerNameForNS(name_cont.c_str(),theNodeMachine.c_str()); - int count = TIME_OUT_TO_LAUNCH_CONT; - obj = _NS->Resolve(containerNameInNS.c_str()); - while (CORBA::is_nil(obj) && count) { - INFOS("[FindOrStartParallelContainer] CONNECTION FAILED !!!!!!!!!!!!!!!!!!!!!!!!"); -#ifndef WIN32 - sleep(1) ; + logFilename += _NS->ContainerName(params)+"_"+ resource_selected +"_"+user; + std::ostringstream tmp; + tmp << "_" << getpid(); + logFilename += tmp.str(); + logFilename += ".log" ; + command += " > " + logFilename + " 2>&1"; +#ifdef WNT + command = "%PYTHONBIN% -c \"import win32pm ; win32pm.spawnpid(r'" + command + "', '')\""; #else - Sleep(1000); + command += " &"; #endif - count-- ; - obj = _NS->Resolve(containerNameInNS.c_str()); - } - - PaCO::InterfaceParallel_var node = PaCO::InterfaceParallel::_narrow(obj); - MESSAGE("[FindOrStartParallelContainer] Deploying node : " << name); - node->deploy(); - } - proxy->start(); - } - catch(CORBA::SystemException& e) - { - INFOS("Caught CORBA::SystemException. : " << e); - } - catch(PortableServer::POA::ServantAlreadyActive&) - { - INFOS("Caught CORBA::ServantAlreadyActiveException"); - } - catch(CORBA::Exception&) - { - INFOS("Caught CORBA::Exception."); - } - catch(std::exception& exc) - { - INFOS("Caught std::exception - "<> new_count)) + { + INFOS("[LaunchContainer] TIMEOUT_TO_LAUNCH_CONTAINER should be an int"); } + else + count = new_count; } -} -return ret; -} + INFOS("[GiveContainer] waiting " << count << " second steps container " << containerNameInNS); + while (CORBA::is_nil(ret) && count) + { +#ifndef WIN32 + sleep( 1 ) ; #else -//============================================================================= -/*! CORBA Method: - * Find or Start a suitable PaCO++ Parallel Container in a list of machines. - * \param params Machine Parameters required for the container - * \param possibleComputers list of machines usable for find or start - * - * \return CORBA container reference. - */ -//============================================================================= -Engines::Container_ptr -SALOME_ContainerManager:: -FindOrStartParallelContainer(const Engines::MachineParameters& params, - const Engines::MachineList& possibleComputers) -{ - Engines::Container_ptr ret = Engines::Container::_nil(); - INFOS("[FindOrStartParallelContainer] is disabled !"); - INFOS("[FindOrStartParallelContainer] recompile SALOME Kernel to enable parallel extension"); + Sleep(1000); +#endif + count--; + MESSAGE("[GiveContainer] step " << count << " Waiting for container on " << resource_selected); + CORBA::Object_var obj = _NS->Resolve(containerNameInNS.c_str()); + ret=Engines::Container::_narrow(obj); + } + if (CORBA::is_nil(ret)) + { + INFOS("[GiveContainer] was not able to launch container " << containerNameInNS); + } + else + { + // Setting log file name + logFilename=":"+logFilename; + logFilename="@"+Kernel_Utils::GetHostname()+logFilename; + logFilename=user+logFilename; + ret->logfilename(logFilename.c_str()); + RmTmpFile(_TmpFileName); // command file can be removed here + _TmpFileName=""; + } + } return ret; } -#endif //============================================================================= -/*! CORBA Method: - * Give a suitable Container in a list of machines - * \param params Machine Parameters required for the container - * \param possibleComputers list of machines usable for start +//! Find a container given constraints (params) on a list of machines (possibleComputers) +/*! + * */ //============================================================================= Engines::Container_ptr -SALOME_ContainerManager:: -GiveContainer(const Engines::MachineParameters& params, - Engines::ResPolicy policy, - const Engines::CompoList& componentList) +SALOME_ContainerManager::FindContainer(const Engines::ContainerParameters& params, + const Engines::ResourceList& possibleResources) { - char *valenv=getenv("SALOME_BATCH"); - if(valenv) - if (strcmp(valenv,"1")==0) - { - if(_batchLaunchedContainers.empty()) - fillBatchLaunchedContainers(); - - if (_batchLaunchedContainersIter == _batchLaunchedContainers.end()) - _batchLaunchedContainersIter = _batchLaunchedContainers.begin(); - - Engines::Container_ptr rtn = Engines::Container::_duplicate(*_batchLaunchedContainersIter); - _batchLaunchedContainersIter++; - return rtn; - } - return StartContainer(params,policy,componentList); + MESSAGE("[FindContainer] FindContainer on " << possibleResources.length() << " resources"); + for(unsigned int i=0; i < possibleResources.length();i++) + { + Engines::Container_ptr cont = FindContainer(params, possibleResources[i].in()); + if(!CORBA::is_nil(cont)) + return cont; + } + MESSAGE("[FindContainer] no container found"); + return Engines::Container::_nil(); } //============================================================================= -/*! - * +//! Find a container given constraints (params) on a machine (theMachine) +/*! + * */ //============================================================================= Engines::Container_ptr -SALOME_ContainerManager:: -FindContainer(const Engines::MachineParameters& params, - const char *theMachine) +SALOME_ContainerManager::FindContainer(const Engines::ContainerParameters& params, + const std::string& resource) { - string containerNameInNS(_NS->BuildContainerNameForNS(params,theMachine)); + Engines::ResourceDefinition_var resource_definition = _ResManager->GetResourceDefinition(resource.c_str()); + std::string hostname(resource_definition->hostname.in()); + std::string containerNameInNS(_NS->BuildContainerNameForNS(params, hostname.c_str())); + MESSAGE("[FindContainer] Try to find a container " << containerNameInNS << " on resource " << resource); CORBA::Object_var obj = _NS->Resolve(containerNameInNS.c_str()); - if( !CORBA::is_nil(obj) ) - return Engines::Container::_narrow(obj); - else + try + { + if(obj->_non_existent()) + return Engines::Container::_nil(); + else + return Engines::Container::_narrow(obj); + } + catch(const CORBA::Exception& e) + { return Engines::Container::_nil(); + } } -//============================================================================= -/*! - * - */ -//============================================================================= -Engines::Container_ptr -SALOME_ContainerManager:: -FindContainer(const Engines::MachineParameters& params, - const Engines::MachineList& possibleComputers) -{ - MESSAGE("FindContainer "<BuildContainerNameForNS((char*) name.c_str(),theMachine.c_str()); - - INFOS("[LaunchParallelContainer] Waiting for Parallel Container proxy on " << theMachine); - while (CORBA::is_nil(obj) && count) { -#ifndef WIN32 - sleep(1) ; -#else - Sleep(1000); -#endif - count-- ; - obj = _NS->Resolve(containerNameInNS.c_str()); - } - } - else { - INFOS("[LaunchParallelContainer] launching the nodes of the parallel container"); - int status = system(command.c_str()); - if (status == -1) { - INFOS("[LaunchParallelContainer] failed : system command status -1"); - } - else if (status == 217) { - INFOS("[LaunchParallelContainer] failed : system command status 217"); - } - // We are waiting all the nodes - for (int i = 0; i < params.nb_component_nodes; i++) { - obj = CORBA::Object::_nil(); - int count = TIME_OUT_TO_LAUNCH_CONT; - - // Name of the node - char buffer [5]; -#ifndef WIN32 - snprintf(buffer,5,"%d",i); -#else - _snprintf(buffer,5,"%d",i); -#endif - - string name_cont = name + string(buffer); - - // I don't like this... - string theMachine(CORBA::string_dup(params.hostname)); - containerNameInNS = _NS->BuildContainerNameForNS((char*) name_cont.c_str(),theMachine.c_str()); - cerr << "[LaunchContainer] Waiting for Parllel Container node " << containerNameInNS << " on " << theMachine << endl; - while (CORBA::is_nil(obj) && count) { -#ifndef WIN32 - sleep(1) ; -#else - Sleep(1000); -#endif - count-- ; - obj = _NS->Resolve(containerNameInNS.c_str()); - } - } - } - - if ( CORBA::is_nil(obj) ) { - INFOS("[LaunchParallelContainer] failed"); - } - return obj; -} - -//============================================================================= -/*! - * Get Id for container: a parallel container registers in Naming Service - * on the machine where is process 0. ContainerManager does'nt know the name - * of this machine before the launch of the parallel container. So to get - * the IOR of the parallel container in Naming Service, ContainerManager - * gives a unique Id. The parallel container registers his name under - * /ContainerManager/Id directory in NamingService - */ -//============================================================================= - - -long SALOME_ContainerManager::GetIdForContainer(void) -{ - _id++; - return _id; -} - -void SALOME_ContainerManager::fillBatchLaunchedContainers() -{ - _batchLaunchedContainers.clear(); - _NS->Change_Directory("/Containers"); - vector vec = _NS->list_directory_recurs(); - for(vector::iterator iter = vec.begin();iter!=vec.end();iter++){ - CORBA::Object_var obj=_NS->Resolve((*iter).c_str()); - Engines::Container_ptr cont=Engines::Container::_narrow(obj); - if(!CORBA::is_nil(cont)){ - _batchLaunchedContainers.push_back(cont); - } - } - _batchLaunchedContainersIter=_batchLaunchedContainers.begin(); -} +bool isPythonContainer(const char* ContainerName); //============================================================================= /*! * This is no longer valid (C++ container are also python containers) */ //============================================================================= - bool isPythonContainer(const char* ContainerName) { bool ret = false; @@ -804,104 +723,91 @@ bool isPythonContainer(const char* ContainerName) */ //============================================================================= -string +std::string SALOME_ContainerManager::BuildCommandToLaunchRemoteContainer -(const string& machine, - const Engines::MachineParameters& params, const long id,const std::string& container_exe) +(const std::string& resource_name, + const Engines::ContainerParameters& params, const std::string& container_exe) { - string command; - int nbproc; - char idc[3*sizeof(long)]; - - if ( ! _isAppliSalomeDefined ) - command = BuildTempFileToLaunchRemoteContainer(machine, params); + std::string command; + if (!_isAppliSalomeDefined) + command = BuildTempFileToLaunchRemoteContainer(resource_name, params); else - { - const ParserResourcesType& resInfo = _ResManager->GetImpl()->GetResourcesList(machine); - - if (params.isMPI) - { - if ( (params.nb_node <= 0) && (params.nb_proc_per_node <= 0) ) - nbproc = 1; - else if ( params.nb_node == 0 ) - nbproc = params.nb_proc_per_node; - else if ( params.nb_proc_per_node == 0 ) - nbproc = params.nb_node; - else - nbproc = params.nb_node * params.nb_proc_per_node; - } - - // "ssh user@machine distantPath/runRemote.sh hostNS portNS WORKINGDIR workingdir \ - // SALOME_Container containerName &" + { + int nbproc; + Engines::ResourceDefinition_var resource_definition = _ResManager->GetResourceDefinition(resource_name.c_str()); + std::string hostname(resource_definition->hostname.in()); + const ParserResourcesType& resInfo = _ResManager->GetImpl()->GetResourcesDescr(resource_name); - if (resInfo.Protocol == rsh) - command = "rsh "; - else if (resInfo.Protocol == ssh) - command = "ssh "; + if (params.isMPI) + { + if ( params.nb_proc <= 0 ) + nbproc = 1; else - throw SALOME_Exception("Unknown protocol"); - - if (resInfo.UserName != "") - { - command += resInfo.UserName; - command += "@"; - } + nbproc = params.nb_proc; + } - command += machine; - command += " "; + // "ssh -l user machine distantPath/runRemote.sh hostNS portNS WORKINGDIR workingdir \ + // SALOME_Container containerName &" + command = getCommandToRunRemoteProcess(resInfo.Protocol, resInfo.HostName, resInfo.UserName); - if (resInfo.AppliPath != "") - command += resInfo.AppliPath; // path relative to user@machine $HOME - else - { - ASSERT(getenv("APPLI")); - command += getenv("APPLI"); // path relative to user@machine $HOME - } + if (resInfo.AppliPath != "") + command += resInfo.AppliPath; // path relative to user@machine $HOME + else + { + ASSERT(getenv("APPLI")); + command += getenv("APPLI"); // path relative to user@machine $HOME + } - command += "/runRemote.sh "; + command += "/runRemote.sh "; - ASSERT(getenv("NSHOST")); - command += getenv("NSHOST"); // hostname of CORBA name server + ASSERT(getenv("NSHOST")); + command += getenv("NSHOST"); // hostname of CORBA name server - command += " "; - ASSERT(getenv("NSPORT")); - command += getenv("NSPORT"); // port of CORBA name server + command += " "; + ASSERT(getenv("NSPORT")); + command += getenv("NSPORT"); // port of CORBA name server - std::string wdir=params.workingdir.in(); - if(wdir != "") - { - command += " WORKINGDIR "; - command += " '"; - if(wdir == "$TEMPDIR") - wdir="\\$TEMPDIR"; - command += wdir; // requested working directory - command += "'"; - } + std::string wdir = params.workingdir.in(); + if(wdir != "") + { + command += " WORKINGDIR "; + command += " '"; + if(wdir == "$TEMPDIR") + wdir="\\$TEMPDIR"; + command += wdir; // requested working directory + command += "'"; + } - if(params.isMPI) - { - command += " mpirun -np "; - std::ostringstream o; - o << nbproc << " "; - command += o.str(); + if(params.isMPI) + { + command += " mpirun -np "; + std::ostringstream o; + o << nbproc << " "; + command += o.str(); #ifdef WITHLAM - command += "-x PATH,LD_LIBRARY_PATH,OMNIORB_CONFIG,SALOME_trace "; -#endif - command += " SALOME_MPIContainer "; - } - else - command += " " +container_exe+ " "; + command += "-x PATH,LD_LIBRARY_PATH,OMNIORB_CONFIG,SALOME_trace "; +#elif defined(WITHOPENMPI) + if( getenv("OMPI_URI_FILE") == NULL ) + command += "-x PATH -x LD_LIBRARY_PATH -x OMNIORB_CONFIG -x SALOME_trace"; + else{ + command += "-x PATH -x LD_LIBRARY_PATH -x OMNIORB_CONFIG -x SALOME_trace -ompi-server file:"; + command += getenv("OMPI_URI_FILE"); + } +#elif defined(WITHMPICH) + command += "-nameserver " + Kernel_Utils::GetHostname(); +#endif + command += " SALOME_MPIContainer "; + } + else + command += " " +container_exe+ " "; - command += _NS->ContainerName(params); - command += " -id "; - sprintf(idc,"%ld",id); - command += idc; - command += " -"; - AddOmninamesParams(command); + command += _NS->ContainerName(params); + command += " -"; + AddOmninamesParams(command); - MESSAGE("command =" << command); - } + MESSAGE("command =" << command); + } return command; } @@ -911,54 +817,52 @@ SALOME_ContainerManager::BuildCommandToLaunchRemoteContainer * builds the command to be launched. */ //============================================================================= - -string +std::string SALOME_ContainerManager::BuildCommandToLaunchLocalContainer -(const Engines::MachineParameters& params, const long id,const std::string& container_exe) +(const Engines::ContainerParameters& params, const std::string& machinesFile, const std::string& container_exe) { _TmpFileName = BuildTemporaryFileName(); - string command; + std::string command; int nbproc = 0; - //char idc[3*sizeof(long)]; - ofstream command_file( _TmpFileName.c_str() ); + std::ostringstream o; if (params.isMPI) { - //command = "mpirun -np "; - command_file << "mpirun -np "; + o << "mpirun -np "; - if ( (params.nb_node <= 0) && (params.nb_proc_per_node <= 0) ) + if ( params.nb_proc <= 0 ) nbproc = 1; - else if ( params.nb_node == 0 ) - nbproc = params.nb_proc_per_node; - else if ( params.nb_proc_per_node == 0 ) - nbproc = params.nb_node; else - nbproc = params.nb_node * params.nb_proc_per_node; + nbproc = params.nb_proc; - //std::ostringstream o; + o << nbproc << " "; - //o << nbproc << " "; - command_file << nbproc << " "; + if( getenv("LIBBATCH_NODEFILE") != NULL ) + o << "-machinefile " << machinesFile << " "; - //command += o.str(); #ifdef WITHLAM - //command += "-x PATH,LD_LIBRARY_PATH,OMNIORB_CONFIG,SALOME_trace "; - command_file << "-x PATH,LD_LIBRARY_PATH,OMNIORB_CONFIG,SALOME_trace "; + o << "-x PATH,LD_LIBRARY_PATH,OMNIORB_CONFIG,SALOME_trace "; +#elif defined(WITHOPENMPI) + if( getenv("OMPI_URI_FILE") == NULL ) + o << "-x PATH -x LD_LIBRARY_PATH -x OMNIORB_CONFIG -x SALOME_trace"; + else + { + o << "-x PATH -x LD_LIBRARY_PATH -x OMNIORB_CONFIG -x SALOME_trace -ompi-server file:"; + o << getenv("OMPI_URI_FILE"); + } +#elif defined(WITHMPICH) + o << "-nameserver " + Kernel_Utils::GetHostname(); #endif if (isPythonContainer(params.container_name)) - //command += "pyMPI SALOME_ContainerPy.py "; - command_file << "pyMPI SALOME_ContainerPy.py "; + o << " pyMPI SALOME_ContainerPy.py "; else - //command += "SALOME_MPIContainer "; - command_file << "SALOME_MPIContainer "; + o << " SALOME_MPIContainer "; } else { - //command=""; std::string wdir=params.workingdir.in(); if(wdir != "") { @@ -966,13 +870,11 @@ SALOME_ContainerManager::BuildCommandToLaunchLocalContainer if(wdir == "$TEMPDIR") { // a new temporary directory is requested - string dir = Kernel_Utils::GetTmpDir(); + std::string dir = Kernel_Utils::GetTmpDir(); #ifdef WIN32 - //command += "cd /d "+ dir +";"; - command_file << "cd /d " << dir << endl; + o << "cd /d " << dir << std::endl; #else - //command = "cd "+ dir +";"; - command_file << "cd " << dir << ";"; + o << "cd " << dir << ";"; #endif } @@ -980,35 +882,27 @@ SALOME_ContainerManager::BuildCommandToLaunchLocalContainer { // a permanent directory is requested use it or create it #ifdef WIN32 - //command="mkdir " + wdir; - command_file << "mkdir " + wdir << endl; - command_file << "cd /D " + wdir << endl; + o << "mkdir " + wdir << std::endl; + o << "cd /D " + wdir << std::endl; #else - //command="mkdir -p " + wdir + " && cd " + wdir + ";"; - command_file << "mkdir -p " << wdir << " && cd " << wdir + ";"; + o << "mkdir -p " << wdir << " && cd " << wdir + ";"; #endif } } + if (isPythonContainer(params.container_name)) - //command += "SALOME_ContainerPy.py "; - command_file << "SALOME_ContainerPy.py "; + o << "SALOME_ContainerPy.py "; else - //command += container_exe + " "; - command_file << container_exe + " "; + o << container_exe + " "; } + o << _NS->ContainerName(params); + o << " -"; + AddOmninamesParams(o); - /*command += _NS->ContainerName(params); - command += " -id "; - sprintf(idc,"%ld",id); - command += idc; - command += " -"; - AddOmninamesParams(command);*/ - - command_file << _NS->ContainerName(params); - command_file << " -id " << id << " -"; - AddOmninamesParams(command_file); + std::ofstream command_file( _TmpFileName.c_str() ); + command_file << o.str(); command_file.close(); #ifndef WIN32 @@ -1017,6 +911,7 @@ SALOME_ContainerManager::BuildCommandToLaunchLocalContainer command = _TmpFileName; MESSAGE("Command is file ... " << command); + MESSAGE("Command is ... " << o.str()); return command; } @@ -1027,24 +922,24 @@ SALOME_ContainerManager::BuildCommandToLaunchLocalContainer */ //============================================================================= -void SALOME_ContainerManager::RmTmpFile() +void SALOME_ContainerManager::RmTmpFile(std::string& tmpFileName) { - int lenght = _TmpFileName.size(); + int lenght = tmpFileName.size(); if ( lenght > 0) { #ifdef WIN32 - string command = "del /F "; + std::string command = "del /F "; #else - string command = "rm "; + std::string command = "rm "; #endif if ( lenght > 4 ) - command += _TmpFileName.substr(0, lenght - 3 ); + command += tmpFileName.substr(0, lenght - 3 ); else - command += _TmpFileName; + command += tmpFileName; command += '*'; system(command.c_str()); //if dir is empty - remove it - string tmp_dir = Kernel_Utils::GetDirByPath( _TmpFileName ); + std::string tmp_dir = Kernel_Utils::GetDirByPath( tmpFileName ); if ( Kernel_Utils::IsEmptyDir( tmp_dir ) ) { #ifdef WIN32 @@ -1063,13 +958,25 @@ void SALOME_ContainerManager::RmTmpFile() */ //============================================================================= -void SALOME_ContainerManager::AddOmninamesParams(string& command) const - { - CORBA::String_var iorstr = _NS->getIORaddr(); - command += "ORBInitRef NameService="; - command += iorstr; - } +void SALOME_ContainerManager::AddOmninamesParams(std::string& command) const +{ + CORBA::String_var iorstr = _NS->getIORaddr(); + command += "ORBInitRef NameService="; + command += iorstr; +} + +//============================================================================= +/*! + * add to command all options relative to naming service. + */ +//============================================================================= +void SALOME_ContainerManager::AddOmninamesParams(std::ofstream& fileStream) const +{ + CORBA::String_var iorstr = _NS->getIORaddr(); + fileStream << "ORBInitRef NameService="; + fileStream << iorstr; +} //============================================================================= /*! @@ -1077,12 +984,12 @@ void SALOME_ContainerManager::AddOmninamesParams(string& command) const */ //============================================================================= -void SALOME_ContainerManager::AddOmninamesParams(ofstream& fileStream) const - { - CORBA::String_var iorstr = _NS->getIORaddr(); - fileStream << "ORBInitRef NameService="; - fileStream << iorstr; - } +void SALOME_ContainerManager::AddOmninamesParams(std::ostringstream& oss) const +{ + CORBA::String_var iorstr = _NS->getIORaddr(); + oss << "ORBInitRef NameService="; + oss << iorstr; +} //============================================================================= /*! @@ -1090,18 +997,17 @@ void SALOME_ContainerManager::AddOmninamesParams(ofstream& fileStream) const */ //============================================================================= -string SALOME_ContainerManager::BuildTemporaryFileName() const - { - //build more complex file name to support multiple salome session - string aFileName = Kernel_Utils::GetTmpFileName(); +std::string SALOME_ContainerManager::BuildTemporaryFileName() const +{ + //build more complex file name to support multiple salome session + std::string aFileName = Kernel_Utils::GetTmpFileName(); #ifndef WIN32 - aFileName += ".sh"; + aFileName += ".sh"; #else - aFileName += ".bat"; + aFileName += ".bat"; #endif - return aFileName; - } - + return aFileName; +} //============================================================================= /*! @@ -1113,22 +1019,22 @@ string SALOME_ContainerManager::BuildTemporaryFileName() const */ //============================================================================= -string +std::string SALOME_ContainerManager::BuildTempFileToLaunchRemoteContainer -(const string& machine, - const Engines::MachineParameters& params) throw(SALOME_Exception) +(const std::string& resource_name, + const Engines::ContainerParameters& params) throw(SALOME_Exception) { int status; _TmpFileName = BuildTemporaryFileName(); - ofstream tempOutputFile; - tempOutputFile.open(_TmpFileName.c_str(), ofstream::out ); - const ParserResourcesType& resInfo = _ResManager->GetImpl()->GetResourcesList(machine); - tempOutputFile << "#! /bin/sh" << endl; + std::ofstream tempOutputFile; + tempOutputFile.open(_TmpFileName.c_str(), std::ofstream::out ); + const ParserResourcesType& resInfo = _ResManager->GetImpl()->GetResourcesDescr(resource_name); + tempOutputFile << "#! /bin/sh" << std::endl; // --- set env vars - tempOutputFile << "export SALOME_trace=local" << endl; // mkr : 27.11.2006 : PAL13967 - Distributed supervision graphs - Problem with "SALOME_trace" + tempOutputFile << "export SALOME_trace=local" << std::endl; // mkr : 27.11.2006 : PAL13967 - Distributed supervision graphs - Problem with "SALOME_trace" //tempOutputFile << "source " << resInfo.PreReqFilePath << endl; // ! env vars @@ -1138,20 +1044,25 @@ SALOME_ContainerManager::BuildTempFileToLaunchRemoteContainer tempOutputFile << "mpirun -np "; int nbproc; - if ( (params.nb_node <= 0) && (params.nb_proc_per_node <= 0) ) + if ( params.nb_proc <= 0 ) nbproc = 1; - else if ( params.nb_node == 0 ) - nbproc = params.nb_proc_per_node; - else if ( params.nb_proc_per_node == 0 ) - nbproc = params.nb_node; else - nbproc = params.nb_node * params.nb_proc_per_node; + nbproc = params.nb_proc; std::ostringstream o; tempOutputFile << nbproc << " "; #ifdef WITHLAM tempOutputFile << "-x PATH,LD_LIBRARY_PATH,OMNIORB_CONFIG,SALOME_trace "; +#elif defined(WITHOPENMPI) + if( getenv("OMPI_URI_FILE") == NULL ) + tempOutputFile << "-x PATH -x LD_LIBRARY_PATH -x OMNIORB_CONFIG -x SALOME_trace"; + else{ + tempOutputFile << "-x PATH -x LD_LIBRARY_PATH -x OMNIORB_CONFIG -x SALOME_trace -ompi-server file:"; + tempOutputFile << getenv("OMPI_URI_FILE"); + } +#elif defined(WITHMPICH) + tempOutputFile << "-nameserver " + Kernel_Utils::GetHostname(); #endif } @@ -1160,9 +1071,9 @@ SALOME_ContainerManager::BuildTempFileToLaunchRemoteContainer if (params.isMPI) { if (isPythonContainer(params.container_name)) - tempOutputFile << "pyMPI SALOME_ContainerPy.py "; + tempOutputFile << " pyMPI SALOME_ContainerPy.py "; else - tempOutputFile << "SALOME_MPIContainer "; + tempOutputFile << " SALOME_MPIContainer "; } else @@ -1175,7 +1086,7 @@ SALOME_ContainerManager::BuildTempFileToLaunchRemoteContainer tempOutputFile << _NS->ContainerName(params) << " -"; AddOmninamesParams(tempOutputFile); - tempOutputFile << " &" << endl; + tempOutputFile << " &" << std::endl; tempOutputFile.flush(); tempOutputFile.close(); #ifndef WIN32 @@ -1184,15 +1095,15 @@ SALOME_ContainerManager::BuildTempFileToLaunchRemoteContainer // --- Build command - string command; + std::string command; if (resInfo.Protocol == rsh) { command = "rsh "; - string commandRcp = "rcp "; + std::string commandRcp = "rcp "; commandRcp += _TmpFileName; commandRcp += " "; - commandRcp += machine; + commandRcp += resInfo.HostName; commandRcp += ":"; commandRcp += _TmpFileName; status = system(commandRcp.c_str()); @@ -1201,10 +1112,22 @@ SALOME_ContainerManager::BuildTempFileToLaunchRemoteContainer else if (resInfo.Protocol == ssh) { command = "ssh "; - string commandRcp = "scp "; + std::string commandRcp = "scp "; + commandRcp += _TmpFileName; + commandRcp += " "; + commandRcp += resInfo.HostName; + commandRcp += ":"; + commandRcp += _TmpFileName; + status = system(commandRcp.c_str()); + } + + else if (resInfo.Protocol == srun) + { + command = "srun -n 1 -N 1 --share --nodelist="; + std::string commandRcp = "rcp "; commandRcp += _TmpFileName; commandRcp += " "; - commandRcp += machine; + commandRcp += resInfo.HostName; commandRcp += ":"; commandRcp += _TmpFileName; status = system(commandRcp.c_str()); @@ -1215,7 +1138,7 @@ SALOME_ContainerManager::BuildTempFileToLaunchRemoteContainer if(status) throw SALOME_Exception("Error of connection on remote host"); - command += machine; + command += resInfo.HostName; _CommandForRemAccess = command; command += " "; command += _TmpFileName; @@ -1226,149 +1149,833 @@ SALOME_ContainerManager::BuildTempFileToLaunchRemoteContainer } +std::string SALOME_ContainerManager::GetMPIZeroNode(const std::string machine, const std::string machinesFile) +{ + int status; + std::string zeronode; + std::string command; + std::string tmpFile = BuildTemporaryFileName(); + + if( getenv("LIBBATCH_NODEFILE") == NULL ) + { + if (_isAppliSalomeDefined) + { + const ParserResourcesType& resInfo = _ResManager->GetImpl()->GetResourcesDescr(machine); + + if (resInfo.Protocol == rsh) + command = "rsh "; + else if (resInfo.Protocol == ssh) + command = "ssh "; + else if (resInfo.Protocol == srun) + command = "srun -n 1 -N 1 --share --nodelist="; + else + throw SALOME_Exception("Unknown protocol"); + + if (resInfo.UserName != "") + { + command += "-l "; + command += resInfo.UserName; + command += " "; + } + + command += resInfo.HostName; + command += " "; + + if (resInfo.AppliPath != "") + command += resInfo.AppliPath; // path relative to user@machine $HOME + else + { + ASSERT(getenv("APPLI")); + command += getenv("APPLI"); // path relative to user@machine $HOME + } + + command += "/runRemote.sh "; + + ASSERT(getenv("NSHOST")); + command += getenv("NSHOST"); // hostname of CORBA name server + + command += " "; + ASSERT(getenv("NSPORT")); + command += getenv("NSPORT"); // port of CORBA name server + + command += " mpirun -np 1 hostname -s > " + tmpFile; + } + else + command = "mpirun -np 1 hostname -s > " + tmpFile; + } + else + command = "mpirun -np 1 -machinefile " + machinesFile + " hostname -s > " + tmpFile; + + status = system(command.c_str()); + if( status == 0 ){ + std::ifstream fp(tmpFile.c_str(),std::ios::in); + while(fp >> zeronode); + } + + RmTmpFile(tmpFile); + + return zeronode; +} + +std::string SALOME_ContainerManager::machinesFile(const int nbproc) +{ + std::string tmp; + std::string nodesFile = getenv("LIBBATCH_NODEFILE"); + std::string machinesFile = Kernel_Utils::GetTmpFileName(); + std::ifstream fpi(nodesFile.c_str(),std::ios::in); + std::ofstream fpo(machinesFile.c_str(),std::ios::out); + + _numInstanceMutex.lock(); + + for(int i=0;i<_nbprocUsed;i++) + fpi >> tmp; + + for(int i=0;i> tmp ) + fpo << tmp << std::endl; + else + throw SALOME_Exception("You need more processors than batch session have allocated for you! Unable to launch the mpi container: "); + + _nbprocUsed += nbproc; + fpi.close(); + fpo.close(); + + _numInstanceMutex.unlock(); + + return machinesFile; + +} + +std::set SALOME_ContainerManager::getpidofprogram(const std::string program) +{ + std::set thepids; + std::string tmpFile = Kernel_Utils::GetTmpFileName(); + std::string cmd; + std::string thepid; + cmd = "pidof " + program + " > " + tmpFile; + system(cmd.c_str()); + std::ifstream fpi(tmpFile.c_str(),std::ios::in); + while(fpi >> thepid){ + thepids.insert(atoi(thepid.c_str())); + } + return thepids; +} + +std::string SALOME_ContainerManager::getCommandToRunRemoteProcess(AccessProtocolType protocol, + const std::string & hostname, + const std::string & username) +{ + std::ostringstream command; + switch (protocol) + { + case rsh: + command << "rsh "; + if (username != "") + { + command << "-l " << username << " "; + } + command << hostname << " "; + break; + case ssh: + command << "ssh "; + if (username != "") + { + command << "-l " << username << " "; + } + command << hostname << " "; + break; + case srun: + // no need to redefine the user with srun, the job user is taken by default + // (note: for srun, user id can be specified with " --uid=") + command << "srun -n 1 -N 1 --share --nodelist=" << hostname << " "; + break; + case pbsdsh: + command << "pbsdsh -o -h " << hostname << " "; + break; + case blaunch: + command << "blaunch " << hostname << " "; + break; + default: + throw SALOME_Exception("Unknown protocol"); + } + + return command.str(); +} + +bool +SALOME_ContainerManager::checkPaCOParameters(Engines::ContainerParameters & params, std::string resource_selected) +{ + bool result = true; + + // Step 1 : check ContainerParameters + // Check container_name, has to be defined + if (std::string(params.container_name.in()) == "") + { + INFOS("[checkPaCOParameters] You must define a container_name to launch a PaCO++ container"); + result = false; + } + // Check parallelLib + std::string parallelLib = params.parallelLib.in(); + if (parallelLib != "Mpi" && parallelLib != "Dummy") + { + INFOS("[checkPaCOParameters] parallelLib is not correctly defined"); + INFOS("[checkPaCOParameters] you can chosse between: Mpi and Dummy"); + INFOS("[checkPaCOParameters] you entered: " << parallelLib); + result = false; + } + // Check nb_proc + if (params.nb_proc <= 0) + { + INFOS("[checkPaCOParameters] You must define a nb_proc > 0"); + result = false; + } + + // Step 2 : check resource_selected + Engines::ResourceDefinition_var resource_definition = _ResManager->GetResourceDefinition(resource_selected.c_str()); + std::string protocol = resource_definition->protocol.in(); + std::string username = resource_definition->username.in(); + std::string applipath = resource_definition->applipath.in(); + + if (protocol == "" || username == "" || applipath == "") + { + INFOS("[checkPaCOParameters] resource selected is not well defined"); + INFOS("[checkPaCOParameters] resource name: " << resource_definition->name.in()); + INFOS("[checkPaCOParameters] resource hostname: " << resource_definition->hostname.in()); + INFOS("[checkPaCOParameters] resource protocol: " << protocol); + INFOS("[checkPaCOParameters] resource username: " << username); + INFOS("[checkPaCOParameters] resource applipath: " << applipath); + result = false; + } + + return result; +} +#ifdef WITH_PACO_PARALLEL + //============================================================================= -/*! Creates a command line that the container manager uses to launch - * a parallel container. - */ +/*! CORBA Method: + * Start a suitable PaCO++ Parallel Container in a list of machines. + * \param params Container Parameters required for the container + * \return CORBA container reference. + */ //============================================================================= -string -SALOME_ContainerManager::BuildCommandToLaunchLocalParallelContainer(const std::string& exe_name, - const Engines::MachineParameters& params, - const std::string& log) +Engines::Container_ptr +SALOME_ContainerManager::StartPaCOPPContainer(const Engines::ContainerParameters& params_const, + std::string resource_selected) { - // This method knows the differences between the proxy and the nodes. - // nb_component_nodes is not used in the same way if it is a proxy or - // a node. - - string command; - string parallelLib(CORBA::string_dup(params.parallelLib)); - string hostname(CORBA::string_dup(params.hostname)); - int par = exe_name.find("Proxy"); - int nbproc = params.nb_component_nodes; - char buffer [33]; - sprintf(buffer,"%d",nbproc); - - Engines::MachineParameters_var rtn = new Engines::MachineParameters(); - rtn->container_name = params.container_name; - rtn->hostname = params.hostname; - rtn->OS = params.OS; - rtn->mem_mb = params.mem_mb; - rtn->cpu_clock = params.cpu_clock; - rtn->nb_proc_per_node = params.nb_proc_per_node; - rtn->nb_node = params.nb_node; - rtn->isMPI = params.isMPI; - - string real_exe_name = exe_name + parallelLib; - - if (parallelLib == "Dummy") + CORBA::Object_var obj; + PaCO::InterfaceManager_var container_proxy; + Engines::Container_ptr ret = Engines::Container::_nil(); + Engines::ContainerParameters params(params_const); + params.resource_params.name = CORBA::string_dup(resource_selected.c_str()); + + // Step 0 : Check parameters + if (!checkPaCOParameters(params, resource_selected)) { - //command = "gdb --args "; - //command = "valgrind --tool=memcheck --log-file=val_log "; - //command += real_exe_name; + INFOS("[StartPaCOPPContainer] check parameters failed ! see logs..."); + return ret; + } - command = real_exe_name; + // Step 1 : Starting a new parallel container ! + INFOS("[StartPaCOPPContainer] Starting a PaCO++ parallel container"); + INFOS("[StartPaCOPPContainer] on resource : " << resource_selected); - command += " " + _NS->ContainerName(rtn); - command += " " + parallelLib; - command += " " + hostname; - command += " -"; - AddOmninamesParams(command); + // Step 2 : Get a MachineFile for the parallel container + std::string machine_file_name = _ResManager->getMachineFile(resource_selected, + params.nb_proc, + params.parallelLib.in()); + + if (machine_file_name == "") + { + INFOS("[StartPaCOPPContainer] Machine file generation failed"); + return ret; + } + + // Step 3 : starting parallel container proxy + std::string command_proxy(""); + std::string proxy_machine; + try + { + command_proxy = BuildCommandToLaunchPaCOProxyContainer(params, machine_file_name, proxy_machine); + } + catch(const SALOME_Exception & ex) + { + INFOS("[StartPaCOPPContainer] Exception in BuildCommandToLaunchPaCOContainer"); + INFOS(ex.what()); + return ret; + } + obj = LaunchPaCOProxyContainer(command_proxy, params, proxy_machine); + if (CORBA::is_nil(obj)) + { + INFOS("[StartPaCOPPContainer] LaunchPaCOContainer for proxy returns NIL !"); + return ret; } + container_proxy = PaCO::InterfaceManager::_narrow(obj); + MESSAGE("[StartPaCOPPContainer] PaCO container proxy is launched"); - else if (parallelLib == "Mpi") + // Step 4 : starting parallel container nodes + std::string command_nodes(""); + SALOME_ContainerManager::actual_launch_machine_t nodes_machines; + try + { + command_nodes = BuildCommandToLaunchPaCONodeContainer(params, machine_file_name, nodes_machines, proxy_machine); + } + catch(const SALOME_Exception & ex) { - // Step 1 : check if MPI is started - if (_MpiStarted == false) + INFOS("[StarPaCOPPContainer] Exception in BuildCommandToLaunchPaCONodeContainer"); + INFOS(ex.what()); + return ret; + } + + std::string container_generic_node_name = std::string(params.container_name.in()) + std::string("Node"); + bool result = LaunchPaCONodeContainer(command_nodes, params, container_generic_node_name, nodes_machines); + if (!result) + { + INFOS("[StarPaCOPPContainer] LaunchPaCONodeContainer failed !"); + // Il faut tuer le proxy + try + { + Engines::Container_var proxy = Engines::Container::_narrow(container_proxy); + proxy->Shutdown(); + } + catch (...) { - startMPI(); + INFOS("[StarPaCOPPContainer] Exception catched from proxy Shutdown..."); } + return ret; + } - if (par < 0) + // Step 4 : connecting nodes and the proxy to actually create a parallel container + for (int i = 0; i < params.nb_proc; i++) + { + std::ostringstream tmp; + tmp << i; + std::string proc_number = tmp.str(); + std::string container_node_name = container_generic_node_name + proc_number; + + std::string theNodeMachine(nodes_machines[i]); + std::string containerNameInNS = _NS->BuildContainerNameForNS(container_node_name.c_str(), theNodeMachine.c_str()); + obj = _NS->Resolve(containerNameInNS.c_str()); + if (CORBA::is_nil(obj)) + { + INFOS("[StarPaCOPPContainer] CONNECTION FAILED From Naming Service !"); + INFOS("[StarPaCOPPContainer] Container name is " << containerNameInNS); + return ret; + } + try + { + MESSAGE("[StarPaCOPPContainer] Deploying node : " << container_node_name); + PaCO::InterfaceParallel_var node = PaCO::InterfaceParallel::_narrow(obj); + node->deploy(); + MESSAGE("[StarPaCOPPContainer] node " << container_node_name << " is deployed"); + } + catch(CORBA::SystemException& e) + { + INFOS("[StarPaCOPPContainer] Exception in deploying node : " << containerNameInNS); + INFOS("CORBA::SystemException : " << e); + return ret; + } + catch(CORBA::Exception& e) { - // Nodes case - - command = "mpiexec -np " + string(buffer) + " "; -// command += "gdb --args "; - command += real_exe_name; - command += " " + _NS->ContainerName(rtn); - command += " " + parallelLib; - command += " " + hostname; - command += " -"; - AddOmninamesParams(command); + INFOS("[StarPaCOPPContainer] Exception in deploying node : " << containerNameInNS); + INFOS("CORBA::Exception" << e); + return ret; } - else + catch(...) { - // Proxy case - command = "mpiexec -np 1 "; - command += real_exe_name; - command += " " + _NS->ContainerName(rtn); - command += " " + string(buffer); - command += " " + parallelLib; - command += " " + hostname; - command += " -"; - AddOmninamesParams(command); + INFOS("[StarPaCOPPContainer] Exception in deploying node : " << containerNameInNS); + INFOS("Unknown exception !"); + return ret; } } - else + + // Step 5 : starting parallel container + try + { + MESSAGE ("[StarPaCOPPContainer] Starting parallel object"); + container_proxy->start(); + MESSAGE ("[StarPaCOPPContainer] Parallel object is started"); + ret = Engines::Container::_narrow(container_proxy); + } + catch(CORBA::SystemException& e) + { + INFOS("Caught CORBA::SystemException. : " << e); + } + catch(PortableServer::POA::ServantAlreadyActive&) { - std::string message("Unknown parallelLib" + parallelLib); - throw SALOME_Exception(message.c_str()); + INFOS("Caught CORBA::ServantAlreadyActiveException"); } + catch(CORBA::Exception&) + { + INFOS("Caught CORBA::Exception."); + } + catch(std::exception& exc) + { + INFOS("Caught std::exception - "<GetResourceDefinition(params.resource_params.name); + + // Choose hostname + std::string hostname; + std::ifstream machine_file(machine_file_name.c_str()); + std::getline(machine_file, hostname, ' '); + size_t found = hostname.find('\n'); + if (found!=std::string::npos) + hostname.erase(found, 1); // Remove \n + proxy_hostname = hostname; + MESSAGE("[BuildCommandToLaunchPaCOProxyContainer] machine file name extracted is " << hostname); + + // Remote execution + bool remote_execution = false; + if (hostname != std::string(Kernel_Utils::GetHostname())) { - command += " > /tmp/"; - command += _NS->ContainerName(rtn); - command += "_"; - command += Kernel_Utils::GetHostname(); - command += "_"; - command += getenv( "USER" ) ; - command += ".log 2>&1 &" ; + MESSAGE("[BuildCommandToLaunchPaCOProxyContainer] remote machine case detected !"); + remote_execution = true; } - if (log == "xterm") + + // Log environnement + std::string log_type(""); + char * get_val = getenv("PARALLEL_LOG"); + if (get_val) + log_type = get_val; + + // Generating the command + std::string command_begin(""); + std::string command_end(""); + std::ostringstream command; + + LogConfiguration(log_type, "proxy", container_name, hostname, command_begin, command_end); + command << command_begin; + + // Adding connection command + // We can only have a remote execution with + // a SALOME application + if (remote_execution) { - command = "/usr/X11R6/bin/xterm -e \"export LD_LIBRARY_PATH=$LD_LIBRARY_PATH; export PATH=$PATH; " - + command + " \" &"; -// + command + "; echo $LD_LIBRARY_PATH; cat \" &"; + ASSERT(getenv("NSHOST")); + ASSERT(getenv("NSPORT")); + + command << resource_definition->protocol.in(); + command << " -l "; + command << resource_definition->username.in(); + command << " " << hostname; + command << " " << resource_definition->applipath.in(); + command << "/runRemote.sh "; + command << getenv("NSHOST") << " "; // hostname of CORBA name server + command << getenv("NSPORT") << " "; // port of CORBA name server } - return command; -/* if (log == "xterm") + command << exe_name; + command << " " << container_name; + command << " Dummy"; + command << " " << hostname; + command << " " << nb_proc_str; + command << " -"; + AddOmninamesParams(command); + + // Final command + command << command_end; + MESSAGE("[BuildCommandToLaunchPaCOProxyContainer] Command is: " << command.str()); + + return command.str(); +} + +std::string +SALOME_ContainerManager::BuildCommandToLaunchPaCONodeContainer(const Engines::ContainerParameters& params, + const std::string & machine_file_name, + SALOME_ContainerManager::actual_launch_machine_t & vect_machine, + const std::string & proxy_hostname) +{ + // Name of exe + std::string exe_name = "SALOME_ParallelContainerNode"; + exe_name += params.parallelLib.in(); + std::string container_name = params.container_name.in(); + + // Convert nb_proc in string + std::ostringstream nb_proc_stream; + nb_proc_stream << params.nb_proc; + + // Get resource definition + Engines::ResourceDefinition_var resource_definition = + _ResManager->GetResourceDefinition(params.resource_params.name); + + // Log environnement + std::string log_type(""); + char * get_val = getenv("PARALLEL_LOG"); + if (get_val) + log_type = get_val; + + // Now the command is different according to paralleLib + std::ostringstream command_nodes; + std::ifstream machine_file(machine_file_name.c_str()); + if (std::string(params.parallelLib.in()) == "Dummy") { - command = "/usr/X11R6/bin/xterm -e \"export LD_LIBRARY_PATH=$LD_LIBRARY_PATH; export PATH=$PATH; echo $LD_LIBRARY_PATH; echo $PATH; " + command + "; cat \" &"; + for (int i= 0; i < params.nb_proc; i++) + { + // Choose hostname + std::string hostname; + std::getline(machine_file, hostname); + MESSAGE("[BuildCommandToLaunchPaCONodeContainer] machine file name extracted is " << hostname); + + // Remote execution + bool remote_execution = false; + if (hostname != std::string(Kernel_Utils::GetHostname())) + { + MESSAGE("[BuildCommandToLaunchPaCONodeContainer] remote machine case detected !"); + remote_execution = true; + } + + // For each node we have a new command + // Generating the command + std::ostringstream command_node_stream; + std::string command_node_begin(""); + std::string command_node_end(""); + std::ostringstream node_number; + node_number << i; + std::string container_node_name = container_name + node_number.str(); + LogConfiguration(log_type, "node", container_node_name, hostname, command_node_begin, command_node_end); + + // Adding connection command + // We can only have a remote execution with + // a SALOME application + if (remote_execution) + { + ASSERT(getenv("NSHOST")); + ASSERT(getenv("NSPORT")); + + command_node_stream << resource_definition->protocol.in(); + command_node_stream << " -l "; + command_node_stream << resource_definition->username.in(); + command_node_stream << " " << hostname; + command_node_stream << " " << resource_definition->applipath.in(); + command_node_stream << "/runRemote.sh "; + command_node_stream << getenv("NSHOST") << " "; // hostname of CORBA name server + command_node_stream << getenv("NSPORT") << " "; // port of CORBA name server + } + + command_node_stream << exe_name; + command_node_stream << " " << container_name; + command_node_stream << " " << params.parallelLib.in(); + command_node_stream << " " << proxy_hostname; + command_node_stream << " " << node_number.str(); + command_node_stream << " -"; + AddOmninamesParams(command_node_stream); + + command_nodes << command_node_begin << command_node_stream.str() << command_node_end; + vect_machine.push_back(hostname); + } } -*/ -/* command = "cd ; rm " + fichier_commande + "; touch " + \ - fichier_commande + "; echo \" export LD_LIBRARY_PATH=$LD_LIBRARY_PATH; " + \ - command + " >& /tmp/ribes_" + fichier_commande + " & \" > " + fichier_commande + ";"; - command += "ssh cn01 sh " + fichier_commande + " &"; - cerr << "La commande : " << command << endl; -*/ + + else if (std::string(params.parallelLib.in()) == "Mpi") + { + // Choose hostname + std::string hostname; + std::getline(machine_file, hostname, ' '); + MESSAGE("[BuildCommandToLaunchPaCONodeContainer] machine file name extracted is " << hostname); + + // Remote execution + bool remote_execution = false; + if (hostname != std::string(Kernel_Utils::GetHostname())) + { + MESSAGE("[BuildCommandToLaunchPaCONodeContainer] remote machine case detected !"); + remote_execution = true; + } + + // In case of Mpi and Remote, we copy machine_file in the applipath + // scp mpi_machine_file user@machine:Path + std::ostringstream command_remote_stream; + std::string::size_type last = machine_file_name.find_last_of("/"); + if (last == std::string::npos) + last = -1; + + std::string protocol = resource_definition->protocol.in(); + if (protocol == "rsh") + command_remote_stream << "rcp "; + else + command_remote_stream << "scp "; + command_remote_stream << machine_file_name << " "; + command_remote_stream << resource_definition->username.in() << "@"; + command_remote_stream << hostname << ":" << resource_definition->applipath.in(); + command_remote_stream << "/" << machine_file_name.substr(last+1); + + int status = system(command_remote_stream.str().c_str()); + if (status == -1) + { + INFOS("copy of the MPI machine file failed ! - sorry !"); + return ""; + } + + // Generating the command + std::string command_begin(""); + std::string command_end(""); + + LogConfiguration(log_type, "nodes", container_name, hostname, command_begin, command_end); + command_nodes << command_begin; + + // Adding connection command + // We can only have a remote execution with + // a SALOME application + if (remote_execution) + { + ASSERT(getenv("NSHOST")); + ASSERT(getenv("NSPORT")); + + command_nodes << resource_definition->protocol.in(); + command_nodes << " -l "; + command_nodes << resource_definition->username.in(); + command_nodes << " " << hostname; + command_nodes << " " << resource_definition->applipath.in(); + command_nodes << "/runRemote.sh "; + command_nodes << getenv("NSHOST") << " "; // hostname of CORBA name server + command_nodes << getenv("NSPORT") << " "; // port of CORBA name server + } + + if (std::string(resource_definition->mpiImpl.in()) == "lam") + { + command_nodes << "mpiexec -ssi boot "; + command_nodes << "-machinefile " << machine_file_name << " "; + command_nodes << "-n " << params.nb_proc; + } + else + { + command_nodes << "mpirun -np " << params.nb_proc; + } + command_nodes << " " << exe_name; + command_nodes << " " << container_name; + command_nodes << " " << params.parallelLib.in(); + command_nodes << " " << proxy_hostname; + command_nodes << " -"; + AddOmninamesParams(command_nodes); + + // We don't put hostname, because nodes are registered in the resource of the proxy + for (int i= 0; i < params.nb_proc; i++) + vect_machine.push_back(proxy_hostname); + + command_nodes << command_end; + } + return command_nodes.str(); } -void SALOME_ContainerManager::startMPI() +void +SALOME_ContainerManager::LogConfiguration(const std::string & log_type, + const std::string & exe_type, + const std::string & container_name, + const std::string & hostname, + std::string & begin, + std::string & end) { - cerr << "----------------------------------------------" << endl; - cerr << "----------------------------------------------" << endl; - cerr << "----------------------------------------------" << endl; - cerr << "-Only Lam on Localhost is currently supported-" << endl; - cerr << "----------------------------------------------" << endl; - cerr << "----------------------------------------------" << endl; - cerr << "----------------------------------------------" << endl; - - int status = system("lamboot"); - if (status == -1) + if(log_type == "xterm") { - INFOS("lamboot failed : system command status -1"); + begin = "xterm -e \"export LD_LIBRARY_PATH=$LD_LIBRARY_PATH; export PATH=$PATH;"; + end = "\"&"; } - else if (status == 217) + else if(log_type == "xterm_debug") { - INFOS("lamboot failed : system command status 217"); + begin = "xterm -e \"export LD_LIBRARY_PATH=$LD_LIBRARY_PATH; export PATH=$PATH;"; + end = "; cat \" &"; } else { - _MpiStarted = true; + // default into a file... + std::string logFilename = "/tmp/" + container_name + "_" + hostname + "_" + exe_type + "_"; + logFilename += std::string(getenv("USER")) + ".log"; + end = " > " + logFilename + " 2>&1 & "; + } +} + +CORBA::Object_ptr +SALOME_ContainerManager::LaunchPaCOProxyContainer(const std::string& command, + const Engines::ContainerParameters& params, + const std::string & hostname) +{ + PaCO::InterfaceManager_ptr container_proxy = PaCO::InterfaceManager::_nil(); + + MESSAGE("[LaunchPaCOProxyContainer] Launch command"); + int status = system(command.c_str()); + if (status == -1) { + INFOS("[LaunchPaCOProxyContainer] failed : system command status -1"); + return container_proxy; + } + else if (status == 217) { + INFOS("[LaunchPaCOProxyContainer] failed : system command status 217"); + return container_proxy; + } + + int count = TIME_OUT_TO_LAUNCH_CONT; + CORBA::Object_var obj = CORBA::Object::_nil(); + std::string containerNameInNS = _NS->BuildContainerNameForNS(params.container_name.in(), + hostname.c_str()); + MESSAGE("[LaunchParallelContainer] Waiting for Parallel Container proxy : " << containerNameInNS); + + while (CORBA::is_nil(obj) && count) + { + sleep(1); + count--; + obj = _NS->Resolve(containerNameInNS.c_str()); + } + + try + { + container_proxy = PaCO::InterfaceManager::_narrow(obj); + } + catch(CORBA::SystemException& e) + { + INFOS("[StarPaCOPPContainer] Exception in _narrow after LaunchParallelContainer for proxy !"); + INFOS("CORBA::SystemException : " << e); + return container_proxy; + } + catch(CORBA::Exception& e) + { + INFOS("[StarPaCOPPContainer] Exception in _narrow after LaunchParallelContainer for proxy !"); + INFOS("CORBA::Exception" << e); + return container_proxy; + } + catch(...) + { + INFOS("[StarPaCOPPContainer] Exception in _narrow after LaunchParallelContainer for proxy !"); + INFOS("Unknown exception !"); + return container_proxy; + } + if (CORBA::is_nil(container_proxy)) + { + INFOS("[StarPaCOPPContainer] PaCO::InterfaceManager::_narrow returns NIL !"); + return container_proxy; + } + return obj._retn(); +} + +//============================================================================= +/*! This method launches the parallel container. + * It will may be placed on the ressources manager. + * + * \param command to launch + * \param container's parameters + * \param name of the container + * + * \return CORBA container reference + */ +//============================================================================= +bool +SALOME_ContainerManager::LaunchPaCONodeContainer(const std::string& command, + const Engines::ContainerParameters& params, + const std::string& name, + SALOME_ContainerManager::actual_launch_machine_t & vect_machine) +{ + INFOS("[LaunchPaCONodeContainer] Launch command"); + int status = system(command.c_str()); + if (status == -1) { + INFOS("[LaunchPaCONodeContainer] failed : system command status -1"); + return false; + } + else if (status == 217) { + INFOS("[LaunchPaCONodeContainer] failed : system command status 217"); + return false; + } + + INFOS("[LaunchPaCONodeContainer] Waiting for the nodes of the parallel container"); + // We are waiting all the nodes + for (int i = 0; i < params.nb_proc; i++) + { + CORBA::Object_var obj = CORBA::Object::_nil(); + std::string theMachine(vect_machine[i]); + // Name of the node + std::ostringstream tmp; + tmp << i; + std::string proc_number = tmp.str(); + std::string container_node_name = name + proc_number; + std::string containerNameInNS = _NS->BuildContainerNameForNS((char*) container_node_name.c_str(), theMachine.c_str()); + INFOS("[LaunchPaCONodeContainer] Waiting for Parallel Container node " << containerNameInNS << " on " << theMachine); + int count = TIME_OUT_TO_LAUNCH_CONT; + while (CORBA::is_nil(obj) && count) { + sleep(1) ; + count-- ; + obj = _NS->Resolve(containerNameInNS.c_str()); + } + if (CORBA::is_nil(obj)) + { + INFOS("[LaunchPaCONodeContainer] Launch of node failed (or not found) !"); + return false; + } } + return true; } +#else + +Engines::Container_ptr +SALOME_ContainerManager::StartPaCOPPContainer(const Engines::ContainerParameters& params, + std::string resource_selected) +{ + Engines::Container_ptr ret = Engines::Container::_nil(); + INFOS("[StarPaCOPPContainer] is disabled !"); + INFOS("[StarPaCOPPContainer] recompile SALOME Kernel to enable PaCO++ parallel extension"); + return ret; +} + +std::string +SALOME_ContainerManager::BuildCommandToLaunchPaCOProxyContainer(const Engines::ContainerParameters& params, + std::string machine_file_name, + std::string & proxy_hostname) +{ + return ""; +} + +std::string +SALOME_ContainerManager::BuildCommandToLaunchPaCONodeContainer(const Engines::ContainerParameters& params, + const std::string & machine_file_name, + SALOME_ContainerManager::actual_launch_machine_t & vect_machine, + const std::string & proxy_hostname) +{ + return ""; +} +void +SALOME_ContainerManager::LogConfiguration(const std::string & log_type, + const std::string & exe_type, + const std::string & container_name, + const std::string & hostname, + std::string & begin, + std::string & end) +{ +} + +CORBA::Object_ptr +SALOME_ContainerManager::LaunchPaCOProxyContainer(const std::string& command, + const Engines::ContainerParameters& params, + const std::string& hostname) +{ + CORBA::Object_ptr ret = CORBA::Object::_nil(); + return ret; +} + +bool +SALOME_ContainerManager::LaunchPaCONodeContainer(const std::string& command, + const Engines::ContainerParameters& params, + const std::string& name, + SALOME_ContainerManager::actual_launch_machine_t & vect_machine) +{ + return false; +} +#endif + diff --git a/src/Container/SALOME_ContainerManager.hxx b/src/Container/SALOME_ContainerManager.hxx index 7b1f26eab..89b4af84e 100644 --- a/src/Container/SALOME_ContainerManager.hxx +++ b/src/Container/SALOME_ContainerManager.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef __SALOME_CONTAINERMANAGER_HXX__ #define __SALOME_CONTAINERMANAGER_HXX__ @@ -31,6 +32,7 @@ #include "SALOME_LoadRateManager.hxx" #include +#include class SALOME_NamingService; @@ -42,87 +44,70 @@ public: SALOME_ContainerManager(CORBA::ORB_ptr orb, PortableServer::POA_var poa, SALOME_ResourcesManager *rm, SALOME_NamingService *ns); ~SALOME_ContainerManager(); + // Corba Methods Engines::Container_ptr - FindOrStartContainer(const Engines::MachineParameters& params, - const Engines::MachineList& possibleComputer); - - Engines::Container_ptr - StartContainer(const Engines::MachineParameters& params, - const Engines::MachineList& possibleComputer, - Engines::ResPolicy policy, - const std::string& container_exe="SALOME_Container"); - - Engines::Container_ptr - StartContainer(const Engines::MachineParameters& params, - Engines::ResPolicy policy, - const Engines::CompoList& componentList); + GiveContainer(const Engines::ContainerParameters& params); - Engines::Container_ptr - GiveContainer(const Engines::MachineParameters& params, - Engines::ResPolicy policy, - const Engines::CompoList& componentList); + void ShutdownContainers(); + // C++ Methods void Shutdown(); - void ShutdownContainers(); static const char *_ContainerManagerNameInNS; - // Parallel extension - Engines::Container_ptr - FindOrStartParallelContainer(const Engines::MachineParameters& params, - const Engines::MachineList& possibleComputer); protected: + // C++ methods Engines::Container_ptr - FindContainer(const Engines::MachineParameters& params, - const Engines::MachineList& possibleComputers); + FindContainer(const Engines::ContainerParameters& params, + const Engines::ResourceList& possibleResources); Engines::Container_ptr - FindContainer(const Engines::MachineParameters& params, - const char *theMachine); - - // Parallel extension - CORBA::Object_ptr - LaunchParallelContainer(const std::string& command, - const Engines::MachineParameters& params, - const std::string& name); - - void fillBatchLaunchedContainers(); + FindContainer(const Engines::ContainerParameters& params, + const std::string& resource); - long GetIdForContainer(void); + std::string BuildCommandToLaunchRemoteContainer(const std::string & resource_name, + const Engines::ContainerParameters& params, + const std::string& container_exe="SALOME_Container"); - std::string BuildCommandToLaunchRemoteContainer(const std::string& machine, - const Engines::MachineParameters& params, const long id, - const std::string& container_exe="SALOME_Container"); - - std::string BuildCommandToLaunchLocalContainer(const Engines::MachineParameters& params, const long id, + std::string BuildCommandToLaunchLocalContainer(const Engines::ContainerParameters& params, + const std::string& machinesFile, const std::string& container_exe="SALOME_Container"); - std::string BuildTempFileToLaunchRemoteContainer(const std::string& machine, - const Engines::MachineParameters& params) throw(SALOME_Exception); + std::string BuildTempFileToLaunchRemoteContainer(const std::string& resource_name, + const Engines::ContainerParameters& params) throw(SALOME_Exception); - void RmTmpFile(); + void RmTmpFile(std::string& tmpFile); void AddOmninamesParams(std::string& command) const; + void AddOmninamesParams(std::ostringstream& oss) const; + void AddOmninamesParams(std::ofstream& fileStream) const; std::string BuildTemporaryFileName() const; - // Parallel extension - std::string BuildCommandToLaunchLocalParallelContainer(const std::string& exe_name, - const Engines::MachineParameters& params, - const std::string& log = "default"); - void startMPI(); - bool _MpiStarted; + std::string GetMPIZeroNode(const std::string machine, const std::string machinesFile); + + std::string machinesFile(const int nbproc); + + std::set getpidofprogram(const std::string program); + + std::string getCommandToRunRemoteProcess(AccessProtocolType protocol, + const std::string & hostname, + const std::string & username); + + Engines::Container_ptr + LaunchContainer(const Engines::ContainerParameters& params, + const std::string & resource_selected, + const std::string & hostname, + const std::string & machFile, + const std::string & containerNameInNS); - long _id; CORBA::ORB_var _orb; PortableServer::POA_var _poa; SALOME_ResourcesManager *_ResManager; SALOME_NamingService *_NS; - static std::vector _batchLaunchedContainers; - static std::vector::iterator _batchLaunchedContainersIter; //! attribute that contains current tmp files generated std::string _TmpFileName; @@ -134,5 +119,49 @@ protected: //! different behaviour if $APPLI exists (SALOME Application) bool _isAppliSalomeDefined; + //! attribute that contains the number of processes used in batch mode by MPI containers + int _nbprocUsed; + + static omni_mutex _numInstanceMutex ; // lib and instance protection + + pid_t _pid_mpiServer; + + // Begin of PacO++ Parallel extension + typedef std::vector actual_launch_machine_t; + + bool checkPaCOParameters(Engines::ContainerParameters & params, std::string resource_selected); + + Engines::Container_ptr + StartPaCOPPContainer(const Engines::ContainerParameters& params, std::string resource_selected); + + + + std::string BuildCommandToLaunchPaCOProxyContainer(const Engines::ContainerParameters& params, + std::string machine_file_name, + std::string & proxy_hostname); + + std::string BuildCommandToLaunchPaCONodeContainer(const Engines::ContainerParameters& params, + const std::string & machine_file_name, + SALOME_ContainerManager::actual_launch_machine_t & vect_machine, + const std::string & proxy_hostname); + + void LogConfiguration(const std::string & log_type, + const std::string & exe_type, + const std::string & container_name, + const std::string & hostname, + std::string & begin, + std::string & end); + + CORBA::Object_ptr + LaunchPaCOProxyContainer(const std::string& command, + const Engines::ContainerParameters& params, + const std::string& hostname); + + bool + LaunchPaCONodeContainer(const std::string& command, + const Engines::ContainerParameters& params, + const std::string& name, + SALOME_ContainerManager::actual_launch_machine_t & vect_machine); + // End of PaCO++ Parallel extension }; #endif diff --git a/src/Container/SALOME_ContainerPy.py b/src/Container/SALOME_ContainerPy.py index 955a1d8d9..b9144dda9 100755 --- a/src/Container/SALOME_ContainerPy.py +++ b/src/Container/SALOME_ContainerPy.py @@ -1,25 +1,27 @@ #! /usr/bin/env python -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # SALOME Container : implementation of container and engine for Kernel # File : SALOME_ContainerPy.py # Author : Paul RASCLE, EDF @@ -42,7 +44,7 @@ from launchConfigureParser import verbose #============================================================================= -#define an implementation of the container interface +#define an implementation of the container interface for the container implemented in Python class SALOME_ContainerPy_i (Engines__POA.Container): _orb = None @@ -58,7 +60,6 @@ class SALOME_ContainerPy_i (Engines__POA.Container): self._poa = poa myMachine=getShortHostName() Container_path = "/Containers/" + myMachine + "/" + containerName - #self._containerName = containerName self._containerName = Container_path if verbose(): print "container name ",self._containerName @@ -167,18 +168,24 @@ class SALOME_ContainerPy_i (Engines__POA.Container): def import_component(self, componentName): MESSAGE( "SALOME_Container_i::import_component" ) - ret=0 + reason = "" try: - if verbose(): print "try import ",componentName + if verbose(): print "try import %s" % componentName + # try import component module=__import__(componentName) - if verbose(): print "import ",componentName," successful" - ret=1 + if verbose(): print "import %s is done successfully" % componentName + # if import successfully, check that component is loadable + if not hasattr(module, componentName): + reason = "module %s is not loadable" % componentName + print reason + pass + pass except: - if verbose(): - import traceback - traceback.print_exc() - print "import ",componentName," not possible" - return ret + import traceback + print "cannot import %s" % componentName + traceback.print_exc() + reason = "cannot import %s" % componentName + return reason #------------------------------------------------------------------------- @@ -187,28 +194,14 @@ class SALOME_ContainerPy_i (Engines__POA.Container): ret = 0 instanceName = componentName + "_inst_" + `self._numInstance` interfaceName = componentName - #the_command = "import " + componentName + "\n" - #the_command = the_command + "comp_i = " + componentName + "." + componentName - #the_command = the_command + "(self._orb, self._poa, self._this(), self._containerName, instanceName, interfaceName)\n" - #MESSAGE( "SALOME_ContainerPy_i::load_component_Library :" + str (the_command) ) - #exec the_command - #comp_o = comp_i._this() - #if comp_o is not None: - # ret = 1 - #else: - # --- try to import Python component - # retImpl = self.import_component(componentName) - # if retImpl == 1: - #import is possible - # ret = 1 - # else: - #import isn't possible - # ret = 0 - #return ret - return self.import_component(componentName) + reason = self.import_component(componentName) + return reason == "", reason #------------------------------------------------------------------------- + def create_component_instance_env(self, componentName, studyId, env): + return self.create_component_instance(componentName, studyId), "" + def create_component_instance(self, componentName, studyId): MESSAGE( "SALOME_ContainerPy_i::create_component_instance ==> " + str(componentName) + ' ' + str(studyId) ) if studyId < 0: diff --git a/src/Container/SALOME_Container_SignalsHandler.cxx b/src/Container/SALOME_Container_SignalsHandler.cxx index 55b6697f9..85974d3d9 100644 --- a/src/Container/SALOME_Container_SignalsHandler.cxx +++ b/src/Container/SALOME_Container_SignalsHandler.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include #include #include @@ -28,8 +29,6 @@ // CCRT porting // #include "CASCatch_SignalsHandler.h" // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC -using namespace std; - extern "C" void HandleServerSideSignals(CORBA::ORB_ptr theORB) { // CCRT porting diff --git a/src/Container/SALOME_Container_i.hxx b/src/Container/SALOME_Container_i.hxx index 08afa42af..15f11eaa1 100644 --- a/src/Container/SALOME_Container_i.hxx +++ b/src/Container/SALOME_Container_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Container : implementation of container and engine for Kernel // File : SALOME_Container_i.hxx // Author : Paul RASCLE, EDF - MARC TAJCHMAN, CEA @@ -32,6 +33,7 @@ #include #include CORBA_SERVER_HEADER(SALOME_Component) +#include CORBA_SERVER_HEADER(SALOME_PyNode) #include #include @@ -42,6 +44,7 @@ #include #include #include +#include #include class SALOME_NamingService; @@ -53,31 +56,36 @@ class CONTAINER_EXPORT Engines_Container_i: public: Engines_Container_i(); Engines_Container_i(CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - char * containerName , + PortableServer::POA_ptr poa, + char * containerName , int argc, char* argv[], - bool activAndRegist = true, - bool isServantAloneInProcess = true); + bool activAndRegist = true, + bool isServantAloneInProcess = true); virtual ~Engines_Container_i(); // --- CORBA methods - virtual bool load_component_Library(const char* componentName); + virtual bool load_component_Library(const char* componentName, CORBA::String_out reason); - virtual Engines::Component_ptr + virtual Engines::EngineComponent_ptr create_component_instance( const char* componentName, - CORBA::Long studyId); // 0 for multiStudy - - Engines::Component_ptr + CORBA::Long studyId); // 0 for multiStudy + + virtual Engines::EngineComponent_ptr + create_component_instance_env( const char* componentName, + CORBA::Long studyId, // 0 for multiStudy + const Engines::FieldsDict& env, + CORBA::String_out reason); + Engines::EngineComponent_ptr find_component_instance( const char* registeredName, - CORBA::Long studyId); // 0 for multiStudy + CORBA::Long studyId); // 0 for multiStudy - Engines::Component_ptr + Engines::EngineComponent_ptr load_impl(const char* nameToRegister, - const char* componentName); + const char* componentName); - void remove_impl(Engines::Component_ptr component_i); + void remove_impl(Engines::EngineComponent_ptr component_i); void finalize_removal(); virtual void ping(); @@ -96,16 +104,22 @@ public: Engines::fileTransfer_ptr getFileTransfer(); virtual Engines::Salome_file_ptr createSalome_file(const char* origFileName); + void copyFile(Engines::Container_ptr container, const char* remoteFile, const char* localFile); + Engines::PyNode_ptr createPyNode(const char* nodeName, const char* code); + Engines::PyScriptNode_ptr createPyScriptNode(const char* nodeName, const char* code); // --- local C++ methods - Engines::Component_ptr + Engines::EngineComponent_ptr find_or_create_instance( std::string genericRegisterName, - std::string componentLibraryName); + std::string componentLibraryName); + + bool load_component_CppImplementation(const char* componentName,std::string& reason); + bool load_component_PythonImplementation(const char* componentName,std::string& reason); + bool load_component_ExecutableImplementation(const char* componentName,std::string& reason); - Engines::Component_ptr - createInstance(std::string genericRegisterName, - void *handle, - int studyId); + Engines::EngineComponent_ptr createPythonInstance(std::string CompName, int studyId, std::string& error); + Engines::EngineComponent_ptr createExecutableInstance(std::string CompName, int studyId, const Engines::FieldsDict& env, std::string& error); + Engines::EngineComponent_ptr createInstance(std::string genericRegisterName, void *handle, int studyId, std::string& error); static bool isPythonContainer(const char* ContainerName); static void decInstanceCnt(std::string genericRegisterName); @@ -116,6 +130,10 @@ public: int getArgc() { return _argc; } char **getArgv() { return _argv; } + void registerTemporaryFile( const std::string& fileName ); + void unregisterTemporaryFile( const std::string& fileName ); + void clearTemporaryFiles(); + protected: static std::map _cntInstances_map; @@ -133,9 +151,10 @@ protected: PortableServer::POA_var _poa; PortableServer::ObjectId * _id ; int _numInstance ; - std::map _listInstances_map; + std::map _listInstances_map; std::map _fileRef_map; std::map _Salome_file_map; + std::list _tmp_files; Engines::fileTransfer_var _fileTransfer; int _argc ; @@ -145,4 +164,3 @@ protected: }; #endif - diff --git a/src/Container/SALOME_FileRef_i.cxx b/src/Container/SALOME_FileRef_i.cxx index 62c06dbcb..168149ede 100644 --- a/src/Container/SALOME_FileRef_i.cxx +++ b/src/Container/SALOME_FileRef_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOME_FileRef_i.cxx // Author : Paul RASCLE, EDF // Module : SALOME @@ -29,8 +30,6 @@ #include "Basics_Utils.hxx" #include -using namespace std; - //============================================================================= /*! * Default constructor, not for use @@ -48,7 +47,7 @@ fileRef_i::fileRef_i() //============================================================================= fileRef_i::fileRef_i(Engines::Container_ptr container, - const char* origFileName) + const char* origFileName) { MESSAGE("fileRef_i::fileRef_i "<< origFileName); _container = Engines::Container::_duplicate(container); @@ -126,11 +125,11 @@ Engines::Container_ptr fileRef_i::getContainer() //============================================================================= CORBA::Boolean fileRef_i::addRef(const char* machine, - const char* fileName) + const char* fileName) { MESSAGE("fileRef_i::addRef " << machine << " " << fileName); - string theMachine = machine; - string theFileName = fileName; + std::string theMachine = machine; + std::string theFileName = fileName; if (theFileName[0] != '/') { @@ -147,7 +146,7 @@ CORBA::Boolean fileRef_i::addRef(const char* machine, if (! _copies[theMachine].empty()) { INFOS("there is already a copy on " << theMachine << " under the path " - << _copies[theMachine] << " new ref not added! "); + << _copies[theMachine] << " new ref not added! "); return 0; } @@ -168,17 +167,17 @@ CORBA::Boolean fileRef_i::addRef(const char* machine, char* fileRef_i::getRef(const char* machine) { MESSAGE("fileRef_i::getRef "<< machine); - string theMachine = machine; - string theFileName = _copies[theMachine]; + std::string theMachine = machine; + std::string theFileName = _copies[theMachine]; if (_copies[theMachine].empty()) { MESSAGE("no copy of " << _machine << _origFileName << " available on " - << theMachine); + << theMachine); } else { MESSAGE("a copy of " << _machine << _origFileName << "is available on " - << theMachine << _copies[theMachine]); + << theMachine << _copies[theMachine]); } return CORBA::string_dup(_copies[theMachine].c_str()); } diff --git a/src/Container/SALOME_FileRef_i.hxx b/src/Container/SALOME_FileRef_i.hxx index 357473bf6..7303e42a4 100644 --- a/src/Container/SALOME_FileRef_i.hxx +++ b/src/Container/SALOME_FileRef_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOME_FileRef_i.hxx // Author : Paul RASCLE, EDF // Module : SALOME @@ -42,7 +43,7 @@ class CONTAINER_EXPORT fileRef_i: public: fileRef_i(); fileRef_i(Engines::Container_ptr container, - const char* origFileName); + const char* origFileName); virtual ~fileRef_i(); char* origFileName(); @@ -52,7 +53,7 @@ public: Engines::Container_ptr getContainer(); CORBA::Boolean addRef(const char* machine, - const char* fileName); + const char* fileName); char* getRef(const char* machine); diff --git a/src/Container/SALOME_FileTransfer_i.cxx b/src/Container/SALOME_FileTransfer_i.cxx index 2c7d762f2..e04481f6b 100644 --- a/src/Container/SALOME_FileTransfer_i.cxx +++ b/src/Container/SALOME_FileTransfer_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOME_FileTransfer_i.cxx // Author : Paul RASCLE, EDF // Module : SALOME @@ -27,6 +28,11 @@ #include "SALOME_FileTransfer_i.hxx" #include "utilities.h" +/*! \class fileTransfer_i + \brief A class to manage file transfer in SALOME + +*/ + //============================================================================= /*! * Default constructor, @@ -52,8 +58,9 @@ fileTransfer_i::~fileTransfer_i() //============================================================================= -/*! - * CORBA method: try to open the file given. If the file is readable, return +/*! \brief open the given file + * + * CORBA method: try to open the file. If the file is readable, return * a positive integer else return 0; * \param fileName path to the file to be transfered * \return fileId = positive integer > 0 if open OK. @@ -76,7 +83,8 @@ CORBA::Long fileTransfer_i::open(const char* fileName) } //============================================================================= -/*! +/*! \brief close a file + * * CORBA method: close the file associated to the fileId given at open. * \param fileId got in return from open method */ @@ -90,11 +98,18 @@ void fileTransfer_i::close(CORBA::Long fileId) { INFOS(" no FILE structure associated to fileId " < 0 if open OK. + */ +CORBA::Long fileTransfer_i::openW(const char* fileName) +{ + MESSAGE(" fileTransfer_i::openW " << fileName); + int aKey = _fileKey++; + _ctr=0; + FILE* fp; + if ((fp = fopen(fileName,"wb")) == NULL) + { + INFOS("file " << fileName << " is not writable"); + return 0; + } + _fileAccess[aKey] = fp; + return aKey; +} + +/*! \brief put a data block for copy into a file + * + * CORBA method: put a block of data into the file associated to the fileId + * given at openW. + * \param fileId got in return from openW method + * \param block an octet sequence to copy into opened file + */ +void fileTransfer_i::putBlock(CORBA::Long fileId, const Engines::fileBlock& block) +{ + MESSAGE("fileTransfer_i::putBlock"); + FILE* fp; + if (! (fp = _fileAccess[fileId]) ) + { + INFOS(" no FILE structure associated to fileId " < #include CORBA_SERVER_HEADER(SALOME_Component) #include @@ -36,7 +39,8 @@ class CONTAINER_EXPORT fileTransfer_i: public virtual POA_Engines::fileTransfer, - public virtual PortableServer::ServantBase + public virtual PortableServer::ServantBase, + public virtual SALOME::GenericObj_i { public: fileTransfer_i(); @@ -47,10 +51,12 @@ public: void close(CORBA::Long fileId); Engines::fileBlock* getBlock(CORBA::Long fileId); + CORBA::Long openW(const char* fileName); + void putBlock(CORBA::Long fileId, const Engines::fileBlock& block); protected: int _fileKey; - std::map _fileAccess; + std::map _fileAccess; int _ctr; }; diff --git a/src/Container/SALOME_PyNode.py b/src/Container/SALOME_PyNode.py new file mode 100644 index 000000000..f7bab6eeb --- /dev/null +++ b/src/Container/SALOME_PyNode.py @@ -0,0 +1,109 @@ +#! /usr/bin/env python +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 +# + +# File : SALOME_PyNode.py +# Author : Christian CAREMOLI, EDF +# Module : SALOME +# $Header$ +# +import sys,traceback,string +import linecache +import cPickle +import Engines__POA +import SALOME__POA +import SALOME + +class Generic(SALOME__POA.GenericObj): + """A Python implementation of the GenericObj CORBA IDL""" + def __init__(self,poa): + self.poa=poa + self.cnt=1 + + def Register(self): + self.cnt+=1 + + def UnRegister(self): + self.cnt-=1 + if self.cnt <= 0: + oid=self.poa.servant_to_id(self) + self.poa.deactivate_object(oid) + + def Destroy(self): + print "WARNING SALOME::GenericObj::Destroy() function is obsolete! Use UnRegister() instead." + self.UnRegister() + +class PyNode_i (Engines__POA.PyNode,Generic): + """The implementation of the PyNode CORBA IDL""" + def __init__(self, nodeName,code,poa,my_container): + """Initialize the node : compilation in the local context""" + Generic.__init__(self,poa) + self.nodeName=nodeName + self.code=code + self.my_container=my_container._container + linecache.cache[nodeName]=0,None,string.split(code,'\n'),nodeName + ccode=compile(code,nodeName,'exec') + self.context={} + self.context["my_container"] = self.my_container + exec ccode in self.context + + def execute(self,funcName,argsin): + """Execute the function funcName found in local context with pickled args (argsin)""" + try: + argsin,kws=cPickle.loads(argsin) + func=self.context[funcName] + argsout=func(*argsin,**kws) + argsout=cPickle.dumps(argsout,-1) + return argsout + except: + exc_typ,exc_val,exc_fr=sys.exc_info() + l=traceback.format_exception(exc_typ,exc_val,exc_fr) + raise SALOME.SALOME_Exception(SALOME.ExceptionStruct(SALOME.BAD_PARAM,"".join(l),"PyNode: %s, function: %s" % (self.nodeName,funcName),0)) + +class PyScriptNode_i (Engines__POA.PyScriptNode,Generic): + """The implementation of the PyScriptNode CORBA IDL that executes a script""" + def __init__(self, nodeName,code,poa,my_container): + """Initialize the node : compilation in the local context""" + Generic.__init__(self,poa) + self.nodeName=nodeName + self.code=code + self.my_container=my_container._container + linecache.cache[nodeName]=0,None,string.split(code,'\n'),nodeName + self.ccode=compile(code,nodeName,'exec') + self.context={} + self.context["my_container"] = self.my_container + + def execute(self,outargsname,argsin): + """Execute the script stored in attribute ccode with pickled args (argsin)""" + try: + argsname,kws=cPickle.loads(argsin) + self.context.update(kws) + exec self.ccode in self.context + argsout=[] + for arg in outargsname: + if not self.context.has_key(arg): + raise KeyError("There is no variable %s in context" % arg) + argsout.append(self.context[arg]) + argsout=cPickle.dumps(tuple(argsout),-1) + return argsout + except: + exc_typ,exc_val,exc_fr=sys.exc_info() + l=traceback.format_exception(exc_typ,exc_val,exc_fr) + raise SALOME.SALOME_Exception(SALOME.ExceptionStruct(SALOME.BAD_PARAM,"".join(l),"PyScriptNode: %s, outargsname: %s" % (self.nodeName,outargsname),0)) diff --git a/src/Container/Salome_file_i.cxx b/src/Container/Salome_file_i.cxx index 525dcc08d..afcea4d3b 100644 --- a/src/Container/Salome_file_i.cxx +++ b/src/Container/Salome_file_i.cxx @@ -1,24 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : Salome_file_i.cxx // Author : André RIBES, EDF // Module : SALOME @@ -38,6 +36,11 @@ # include #endif +/*! \class Salome_file_i + * \brief A class to manage file transfer in %SALOME + * + */ + //============================================================================= /*! @@ -170,66 +173,66 @@ Salome_file_i::load(const char* hdf5_file) { if (mode == "all") { - // Changing path, is now current directory - path = getcwd(NULL, _path_max); + // Changing path, is now current directory + path = getcwd(NULL, _path_max); - std::string group_name("GROUP"); - group_name += file_name; - hdf_group = new HDFgroup(group_name.c_str(),hdf_file); - hdf_group->OpenOnDisk(); - hdf_dataset = new HDFdataset("FILE DATASET",hdf_group); - hdf_dataset->OpenOnDisk(); - size = hdf_dataset->GetSize(); - buffer = new char[size]; + std::string group_name("GROUP"); + group_name += file_name; + hdf_group = new HDFgroup(group_name.c_str(),hdf_file); + hdf_group->OpenOnDisk(); + hdf_dataset = new HDFdataset("FILE DATASET",hdf_group); + hdf_dataset->OpenOnDisk(); + size = hdf_dataset->GetSize(); + buffer = new char[size]; - if ( (fd = ::open(file_name.c_str(),O_RDWR|O_CREAT,00666)) <0) { - SALOME::ExceptionStruct es; - es.type = SALOME::INTERNAL_ERROR; - std::string text = "open failed"; - es.text = CORBA::string_dup(text.c_str()); - throw SALOME::SALOME_Exception(es); - }; - hdf_dataset->ReadFromDisk(buffer); - if ( write(fd,buffer,size) <0) { - SALOME::ExceptionStruct es; - es.type = SALOME::INTERNAL_ERROR; - std::string text = "write failed"; - es.text = CORBA::string_dup(text.c_str()); - throw SALOME::SALOME_Exception(es); - }; - // Close the target file - ::close(fd); - - Engines::file infos; - infos.file_name = CORBA::string_dup(file_name.c_str()); - infos.path = CORBA::string_dup(path.c_str()); - infos.type = CORBA::string_dup(type.c_str()); - infos.source_file_name = CORBA::string_dup(source_file_name.c_str()); - infos.status = CORBA::string_dup(status.c_str()); - - _fileManaged[file_name] = infos; - - // Update Salome_file state - _state.number_of_files++; - _state.files_ok = true; + if ( (fd = ::open(file_name.c_str(),O_RDWR|O_CREAT,00666)) <0) { + SALOME::ExceptionStruct es; + es.type = SALOME::INTERNAL_ERROR; + std::string text = "open failed"; + es.text = CORBA::string_dup(text.c_str()); + throw SALOME::SALOME_Exception(es); + }; + hdf_dataset->ReadFromDisk(buffer); + if ( write(fd,buffer,size) <0) { + SALOME::ExceptionStruct es; + es.type = SALOME::INTERNAL_ERROR; + std::string text = "write failed"; + es.text = CORBA::string_dup(text.c_str()); + throw SALOME::SALOME_Exception(es); + }; + // Close the target file + ::close(fd); + + Engines::file infos; + infos.file_name = CORBA::string_dup(file_name.c_str()); + infos.path = CORBA::string_dup(path.c_str()); + infos.type = CORBA::string_dup(type.c_str()); + infos.source_file_name = CORBA::string_dup(source_file_name.c_str()); + infos.status = CORBA::string_dup(status.c_str()); + + _fileManaged[file_name] = infos; + + // Update Salome_file state + _state.number_of_files++; + _state.files_ok = true; } else { - Engines::file infos; - infos.file_name = CORBA::string_dup(file_name.c_str()); - infos.path = CORBA::string_dup(path.c_str()); - infos.type = CORBA::string_dup(type.c_str()); - infos.source_file_name = CORBA::string_dup(source_file_name.c_str()); - infos.status = CORBA::string_dup(status.c_str()); - // Infos for parallel extensions... - infos.node = 0; - infos.container = Engines::Container::_duplicate(_container); - - _fileManaged[file_name] = infos; - - // Update Salome_file state - _state.number_of_files++; - if (status != "ok") - _state.files_ok = false; + Engines::file infos; + infos.file_name = CORBA::string_dup(file_name.c_str()); + infos.path = CORBA::string_dup(path.c_str()); + infos.type = CORBA::string_dup(type.c_str()); + infos.source_file_name = CORBA::string_dup(source_file_name.c_str()); + infos.status = CORBA::string_dup(status.c_str()); + // Infos for parallel extensions... + infos.node = 0; + infos.container = Engines::Container::_duplicate(_container); + + _fileManaged[file_name] = infos; + + // Update Salome_file state + _state.number_of_files++; + if (status != "ok") + _state.files_ok = false; } } } @@ -626,7 +629,7 @@ Salome_file_i::connect(Engines::Salome_file_ptr source_Salome_file) _t_fileDistributedSource::iterator it = _fileDistributedSource.find(file_name); if (it == _fileDistributedSource.end()) { - _fileDistributedSource[file_name] = Engines::Salome_file::_duplicate(source_Salome_file); + _fileDistributedSource[file_name] = Engines::Salome_file::_duplicate(source_Salome_file); } } } @@ -666,7 +669,7 @@ Salome_file_i::connect(Engines::Salome_file_ptr source_Salome_file) //============================================================================= void Salome_file_i::connectDistributedFile(const char * file_name, - Engines::Salome_file_ptr source_Salome_file) + Engines::Salome_file_ptr source_Salome_file) { // Test if this file is added _t_fileManaged::iterator it = _fileManaged.find(file_name); @@ -692,7 +695,7 @@ Salome_file_i::connectDistributedFile(const char * file_name, //============================================================================= void Salome_file_i::setDistributedSourceFile(const char* file_name, - const char * source_file_name) + const char * source_file_name) { std::string fname(file_name); @@ -733,12 +736,12 @@ Salome_file_i::recvFiles() { if (std::string(file_infos.type.in()) == "local") { if (std::string(file_infos.status.in()) == "not_ok") - result = checkLocalFile(file_infos.file_name.in()); + result = checkLocalFile(file_infos.file_name.in()); } else { if (std::string(file_infos.status.in()) == "not_ok") - result = getDistributedFile(file_infos.file_name.in()); + result = getDistributedFile(file_infos.file_name.in()); } // if the result is false // we add this file to files_not_ok diff --git a/src/Container/Salome_file_i.hxx b/src/Container/Salome_file_i.hxx index ac72586e7..21ac58b20 100644 --- a/src/Container/Salome_file_i.hxx +++ b/src/Container/Salome_file_i.hxx @@ -1,24 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : Salome_file_i.hxx // Author : André RIBES, EDF // Module : SALOME @@ -33,12 +31,14 @@ #include CORBA_SERVER_HEADER(SALOME_Exception) #include "SALOME_Container.hxx" +#include "SALOME_FileTransfer_i.hxx" + #include #include #include class CONTAINER_EXPORT Salome_file_i: - public virtual POA_Engines::Salome_file + public virtual POA_Engines::Salome_file,public virtual fileTransfer_i { public: Salome_file_i(); @@ -56,9 +56,9 @@ class CONTAINER_EXPORT Salome_file_i: // Configure DistributedFile virtual void connect(Engines::Salome_file_ptr source_Salome_file); virtual void connectDistributedFile(const char * file_name, - Engines::Salome_file_ptr source_Salome_file); + Engines::Salome_file_ptr source_Salome_file); virtual void setDistributedSourceFile(const char* file_name, - const char * source_file_name); + const char * source_file_name); // Recv and check files virtual void recvFiles(); diff --git a/src/Container/TestSalome_file.cxx b/src/Container/TestSalome_file.cxx index 5230d7fc5..4ac1533d6 100644 --- a/src/Container/TestSalome_file.cxx +++ b/src/Container/TestSalome_file.cxx @@ -1,24 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "Salome_file_i.hxx" #include #include @@ -26,25 +24,26 @@ #include "HDFascii.hxx" #include -using namespace std; +void print_infos(Engines::file*); +void print_state(Engines::SfState*); void print_infos(Engines::file * infos) { - cerr << "-------------------------------------------------------------------" << endl; - cerr << "file_name = " << infos->file_name << endl; - cerr << "path = " << infos->path << endl; - cerr << "type = " << infos->type << endl; - cerr << "source_file_name = " << infos->source_file_name << endl; - cerr << "status = " << infos->status << endl; + std::cerr << "-------------------------------------------------------------------" << std::endl; + std::cerr << "file_name = " << infos->file_name << std::endl; + std::cerr << "path = " << infos->path << std::endl; + std::cerr << "type = " << infos->type << std::endl; + std::cerr << "source_file_name = " << infos->source_file_name << std::endl; + std::cerr << "status = " << infos->status << std::endl; } void print_state(Engines::SfState * state) { - cerr << "-------------------------------------------------------------------" << endl; - cerr << "name = " << state->name << endl; - cerr << "hdf5_file_name = " << state->hdf5_file_name << endl; - cerr << "number_of_files = " << state->number_of_files << endl; - cerr << "files_ok = " << state->files_ok << endl; + std::cerr << "-------------------------------------------------------------------" << std::endl; + std::cerr << "name = " << state->name << std::endl; + std::cerr << "hdf5_file_name = " << state->hdf5_file_name << std::endl; + std::cerr << "number_of_files = " << state->number_of_files << std::endl; + std::cerr << "files_ok = " << state->files_ok << std::endl; } @@ -64,23 +63,23 @@ int main (int argc, char * argv[]) PortableServer::POAManager_var pman; CORBA::Object_var obj; - cerr << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl; - cerr << "Test of setLocalFile()" << endl; + std::cerr << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << std::endl; + std::cerr << "Test of setLocalFile()" << std::endl; file.setLocalFile("/tmp/toto"); infos = file.getFileInfos("toto"); print_infos(infos); - cerr << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl; - cerr << "Test of getFilesInfos()" << endl; + std::cerr << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << std::endl; + std::cerr << "Test of getFilesInfos()" << std::endl; all_infos = file.getFilesInfos(); for (int i = 0; i < all_infos->length(); i++) { print_infos(&((*all_infos)[i])); } - cerr << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl; - cerr << "Test of getSalome_fileState()" << endl; + std::cerr << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << std::endl; + std::cerr << "Test of getSalome_fileState()" << std::endl; state = file.getSalome_fileState(); print_state(state); @@ -94,8 +93,8 @@ int main (int argc, char * argv[]) file2.setLocalFile("/tmp/toto_distributed_source"); Engines::Salome_file_ptr file2_ref = file2._this(); - cerr << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl; - cerr << "Test of setDistributedFile()" << endl; + std::cerr << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << std::endl; + std::cerr << "Test of setDistributedFile()" << std::endl; file.setDistributedFile("/tmp/toto_distributed"); file.connectDistributedFile("toto_distributed", file2_ref); // file.setDistributedSourceFile("toto_distributed", "toto_distributed_source"); @@ -121,19 +120,19 @@ int main (int argc, char * argv[]) } catch (SALOME::SALOME_Exception & e) { - cerr << "Exception : " << e.details.text << endl; + std::cerr << "Exception : " << e.details.text << std::endl; } - cerr << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl; - cerr << "Test of getFilesInfos()" << endl; + std::cerr << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << std::endl; + std::cerr << "Test of getFilesInfos()" << std::endl; all_infos = file.getFilesInfos(); for (int i = 0; i < all_infos->length(); i++) { print_infos(&((*all_infos)[i])); } - cerr << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl; - cerr << "Test of getSalome_fileState()" << endl; + std::cerr << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << std::endl; + std::cerr << "Test of getSalome_fileState()" << std::endl; state = file.getSalome_fileState(); print_state(state); @@ -166,11 +165,11 @@ int main (int argc, char * argv[]) // Test of ConvertFromHDFToASCII // and ConvertFromASCIIToHDF - cerr << "Test of ConvertFromASCIIToHDF" << endl; + std::cerr << "Test of ConvertFromASCIIToHDF" << std::endl; HDFascii::ConvertFromASCIIToHDF("/tmp/toto"); // RETURN NULL ! - cerr << "Test of ConvertFromHDFToASCII" << endl; - cerr << HDFascii::ConvertFromHDFToASCII("test2.hdf", false) << endl; - cerr << HDFascii::ConvertFromHDFToASCII("test2.hdf", true) << endl; + std::cerr << "Test of ConvertFromHDFToASCII" << std::endl; + std::cerr << HDFascii::ConvertFromHDFToASCII("test2.hdf", false) << std::endl; + std::cerr << HDFascii::ConvertFromHDFToASCII("test2.hdf", true) << std::endl; - cerr << "End of tests" << endl; + std::cerr << "End of tests" << std::endl; } diff --git a/src/DF/DF_Application.cxx b/src/DF/DF_Application.cxx index 2178c2ef3..c61dc5867 100644 --- a/src/DF/DF_Application.cxx +++ b/src/DF/DF_Application.cxx @@ -1,29 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "DF_definitions.hxx" #include "DF_Application.hxx" -using namespace std; - //Constructor DF_Application::DF_Application() { @@ -37,7 +33,7 @@ DF_Application::~DF_Application() //Creates a new document with given type, returns a smart pointer to //newly created document. -DF_Document* DF_Application::NewDocument(const string& theDocumentType) +DF_Document* DF_Application::NewDocument(const std::string& theDocumentType) { DF_Document* aDoc = new DF_Document(theDocumentType); aDoc->_id = ++_currentID; @@ -68,10 +64,10 @@ DF_Document* DF_Application::GetDocument(int theDocumentID) } //Returns a list of IDs of all currently opened documents -vector DF_Application::GetDocumentIDs() +std::vector DF_Application::GetDocumentIDs() { - vector ids; - typedef map::const_iterator DI; + std::vector ids; + typedef std::map::const_iterator DI; for(DI p = _documents.begin(); p!=_documents.end(); p++) ids.push_back(p->first); return ids; @@ -86,7 +82,7 @@ int DF_Application::NbDocuments() //Restores a Document from the given file, returns a smart //pointer to opened document. -DF_Document* DF_Application::Open(const string& theFileName) +DF_Document* DF_Application::Open(const std::string& theFileName) { //Not implemented return NULL; @@ -94,7 +90,7 @@ DF_Document* DF_Application::Open(const string& theFileName) //Saves a Document in a given file with name theFileName -void DF_Application::SaveAs(const DF_Document* theDocument, const string& theFileName) +void DF_Application::SaveAs(const DF_Document* theDocument, const std::string& theFileName) { //Not implemented } diff --git a/src/DF/DF_Application.hxx b/src/DF/DF_Application.hxx index 0733ce341..09b6837b8 100644 --- a/src/DF/DF_Application.hxx +++ b/src/DF/DF_Application.hxx @@ -1,24 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef DFAPPLICATION_HXX #define DFAPPLICATION_HXX diff --git a/src/DF/DF_Attribute.cxx b/src/DF/DF_Attribute.cxx index 64cd7de7b..4ec652a1a 100644 --- a/src/DF/DF_Attribute.cxx +++ b/src/DF/DF_Attribute.cxx @@ -1,30 +1,26 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "DF_definitions.hxx" #include "DF_Label.hxx" #include "DF_Attribute.hxx" -using namespace std; - //Class DF_Attribute is used to store some data defined by the DF_Attribute type //Constructor @@ -38,11 +34,12 @@ DF_Attribute::~DF_Attribute() //Remove an attribute from a map of the node's attributes to //avoid double deletion on the node destruction if(_node) { - map::iterator mi; + std::map::iterator mi; for(mi =_node->_attributes.begin(); mi != _node->_attributes.end(); mi++) { if(mi->second == this) { - _node->_attributes.erase(mi); - } + _node->_attributes.erase(mi); + return; + } } } } @@ -54,7 +51,7 @@ DF_Label DF_Attribute::Label() const } //Searches an Attribute with given ID located on the same Label as this Attribute. -DF_Attribute* DF_Attribute::FindAttribute(const string& theID) const +DF_Attribute* DF_Attribute::FindAttribute(const std::string& theID) const { if(!_node) return NULL; return Label().FindAttribute(theID); diff --git a/src/DF/DF_Attribute.hxx b/src/DF/DF_Attribute.hxx index 2c3fe560f..7438a0a6e 100644 --- a/src/DF/DF_Attribute.hxx +++ b/src/DF/DF_Attribute.hxx @@ -1,24 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef DFATTRIBUTE_HXX #define DFATTRIBUTE_HXX diff --git a/src/DF/DF_ChildIterator.cxx b/src/DF/DF_ChildIterator.cxx index 889220896..077e67d8c 100644 --- a/src/DF/DF_ChildIterator.cxx +++ b/src/DF/DF_ChildIterator.cxx @@ -1,28 +1,23 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 // -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#include "DF_ChildIterator.hxx" - -using namespace std; +#include "DF_ChildIterator.hxx" //Constructor DF_ChildIterator::DF_ChildIterator(const DF_Label& theLabel, bool allLevels) @@ -59,7 +54,7 @@ DF_Label DF_ChildIterator::Value() //Returns true if there is a current Label bool DF_ChildIterator::More() { - return bool(_current); + return _current!=0; } //Moves to the next Label @@ -75,25 +70,25 @@ void DF_ChildIterator::Next() } else { if(_current->_next) { //Next Brother - _current = _current->_next; + _current = _current->_next; } else { - if(_current->_father && _current->_father != _root) { - DF_LabelNode *father = _current->_father; - _current = father->_next; - if(!_current) { - while(father && father != _root) { - father = father->_father; - if(father->_next) break; - } - if(father == _root) father = NULL; - if(father) _current = father->_next; - else _current = NULL; - } - } - else { - _current = NULL; //We iterate the whole sub tree - } + if(_current->_father && _current->_father != _root) { + DF_LabelNode *father = _current->_father; + _current = father->_next; + if(!_current) { + while(father && father != _root) { + father = father->_father; + if(father->_next) break; + } + if(father == _root) father = NULL; + if(father) _current = father->_next; + else _current = NULL; + } + } + else { + _current = NULL; //We iterate the whole sub tree + } } } } diff --git a/src/DF/DF_ChildIterator.hxx b/src/DF/DF_ChildIterator.hxx index 808aa2525..fa67cbf4c 100644 --- a/src/DF/DF_ChildIterator.hxx +++ b/src/DF/DF_ChildIterator.hxx @@ -1,24 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef DFCHILDITERATOR_HXX #define DFCHILDITERATOR_HXX diff --git a/src/DF/DF_Container.cxx b/src/DF/DF_Container.cxx index d03d6e274..ca12c4851 100644 --- a/src/DF/DF_Container.cxx +++ b/src/DF/DF_Container.cxx @@ -1,34 +1,30 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "DF_definitions.hxx" #include "DF_Label.hxx" #include "DF_Container.hxx" -using namespace std; - //Static method that returns an ID of the give type of attributes -const string& DF_Container::GetID() +const std::string& DF_Container::GetID() { - static string id = "DF_Container_srn"; + static std::string id = "DF_Container_srn"; return id; } @@ -63,13 +59,13 @@ DF_Container::~DF_Container() } //Sets an integer value of the attribute with given ID -void DF_Container::SetInt(const string& theID, int theValue) +void DF_Container::SetInt(const std::string& theID, int theValue) { _ints[theID] = theValue; } //Returns an integer value of the attribute with given ID -int DF_Container::GetInt(const string& theID) +int DF_Container::GetInt(const std::string& theID) { if(!HasIntID(theID)) return 0; @@ -77,68 +73,68 @@ int DF_Container::GetInt(const string& theID) } //Returns True if there is an integer with given ID -bool DF_Container::HasIntID(const string& theID) +bool DF_Container::HasIntID(const std::string& theID) { if(_ints.find(theID) != _ints.end()) return true; return false; } //Sets a double value of the attribute with given ID -void DF_Container::SetDouble(const string& theID, const double& theValue) +void DF_Container::SetDouble(const std::string& theID, const double& theValue) { _doubles[theID] = theValue; } //Returns a double value of the attribute with given ID -double DF_Container::GetDouble(const string& theID) +double DF_Container::GetDouble(const std::string& theID) { if(!HasDoubleID(theID)) return 0.0; return _doubles[theID]; } //Returns True if there is a double with given ID -bool DF_Container::HasDoubleID(const string& theID) +bool DF_Container::HasDoubleID(const std::string& theID) { if(_doubles.find(theID) != _doubles.end()) return true; return false; } //Sets a string value of the attribute with given ID -void DF_Container::SetString(const string& theID, const string& theValue) +void DF_Container::SetString(const std::string& theID, const std::string& theValue) { _strings[theID] = theValue; } //Returns a string value of the attribute with given ID -string DF_Container::GetString(const string& theID) +std::string DF_Container::GetString(const std::string& theID) { if(!HasStringID(theID)) return ""; return _strings[theID]; } //Returns True if there is a string with given ID -bool DF_Container::HasStringID(const string& theID) +bool DF_Container::HasStringID(const std::string& theID) { if(_strings.find(theID) != _strings.end()) return true; return false; } //Sets a boolean value of the attribute with given ID -void DF_Container::SetBool(const string& theID, bool theValue) +void DF_Container::SetBool(const std::string& theID, bool theValue) { _bools[theID] = theValue; } //Returns a boolean value of the attribute with given ID -bool DF_Container::GetBool(const string& theID) +bool DF_Container::GetBool(const std::string& theID) { if(!HasBoolID(theID)) return false; return _bools[theID]; } //Returns True if there is a boolean value with given ID -bool DF_Container::HasBoolID(const string& theID) +bool DF_Container::HasBoolID(const std::string& theID) { if(_bools.find(theID) != _bools.end()) return true; return false; @@ -154,7 +150,7 @@ void DF_Container::Clear() } //ID is a string that uniquely identify the given type of Attributes within the Application. -const string& DF_Container::ID() const +const std::string& DF_Container::ID() const { return GetID(); } @@ -167,19 +163,19 @@ void DF_Container::Restore(DF_Attribute* theAttribute) DF_Container* attr = dynamic_cast(theAttribute); if(!attr) return; - typedef map::const_iterator SI; + typedef std::map::const_iterator SI; for(SI p = attr->_ints.begin(); p != attr->_ints.end(); p++) _ints[p->first] = p->second; - typedef map::const_iterator SD; + typedef std::map::const_iterator SD; for(SD p = attr->_doubles.begin(); p != attr->_doubles.end(); p++) _doubles[p->first] = p->second; - typedef map::const_iterator SS; + typedef std::map::const_iterator SS; for(SS p = attr->_strings.begin(); p != attr->_strings.end(); p++) _strings[p->first] = p->second; - typedef map::const_iterator SB; + typedef std::map::const_iterator SB; for(SB p = attr->_bools.begin(); p != attr->_bools.end(); p++) _bools[p->first] = p->second; } @@ -198,20 +194,19 @@ void DF_Container::Paste(DF_Attribute* theIntoAttribute) attr->Clear(); - typedef map::const_iterator SI; + typedef std::map::const_iterator SI; for(SI p = _ints.begin(); p != _ints.end(); p++) attr->_ints[p->first] = p->second; - typedef map::const_iterator SD; + typedef std::map::const_iterator SD; for(SD p = _doubles.begin(); p != _doubles.end(); p++) attr->_doubles[p->first] = p->second; - typedef map::const_iterator SS; + typedef std::map::const_iterator SS; for(SS p = _strings.begin(); p != _strings.end(); p++) attr->_strings[p->first] = p->second; - typedef map::const_iterator SB; + typedef std::map::const_iterator SB; for(SB p = _bools.begin(); p != _bools.end(); p++) attr-> _bools[p->first] = p->second; } - diff --git a/src/DF/DF_Container.hxx b/src/DF/DF_Container.hxx index 17be5f17d..642c81ccb 100644 --- a/src/DF/DF_Container.hxx +++ b/src/DF/DF_Container.hxx @@ -1,24 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef DFCONTAINER_HXX #define DFCONTAINER_HXX diff --git a/src/DF/DF_Document.cxx b/src/DF/DF_Document.cxx index 5840bc330..7dc3a2675 100644 --- a/src/DF/DF_Document.cxx +++ b/src/DF/DF_Document.cxx @@ -1,35 +1,31 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "DF_definitions.hxx" #include "DF_Document.hxx" #include "DF_Label.hxx" #include "DF_ChildIterator.hxx" -using namespace std; - //Class DF_Document is container for user's data stored as a tree of Labels //with assigned Attributes -DF_Document::DF_Document(const string& theDocumentType) +DF_Document::DF_Document(const std::string& theDocumentType) { _id = -1; _type = theDocumentType; @@ -82,7 +78,7 @@ int DF_Document::GetDocumentID() const } //Returns a type of the Document -string DF_Document::GetDocumentType() +std::string DF_Document::GetDocumentType() { return _type; } @@ -92,7 +88,7 @@ void DF_Document::Clear() { if(_root.IsNull()) return; - vector vn; + std::vector vn; DF_ChildIterator CI(_root, true); for(; CI.More(); CI.Next()) { DF_LabelNode* node = CI.Value()._node; @@ -103,6 +99,7 @@ void DF_Document::Clear() delete vn[i]; _root._node->Reset(); + _root.Nullify(); } //Returns true if this document is empty @@ -139,7 +136,7 @@ void DF_Document::Load(const std::string& theData) } //Converts a content of the Document into the std::string -string DF_Document::Save() +std::string DF_Document::Save() { //Not implemented return ""; diff --git a/src/DF/DF_Document.hxx b/src/DF/DF_Document.hxx index c971096d7..cac63523a 100644 --- a/src/DF/DF_Document.hxx +++ b/src/DF/DF_Document.hxx @@ -1,24 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef DFDOCUMENT_HXX #define DFDOCUMENT_HXX diff --git a/src/DF/DF_Label.cxx b/src/DF/DF_Label.cxx index f83d1521c..38bdf4900 100644 --- a/src/DF/DF_Label.cxx +++ b/src/DF/DF_Label.cxx @@ -1,24 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "DF_definitions.hxx" #include "DF_Label.hxx" #include "DF_Document.hxx" @@ -27,8 +25,6 @@ #include -using namespace std; - //Class DF_Label defines a persistence reference in DF_Document that contains a tree of Labels. //This reference is named "entry" and is a sequence of tags divided by ":". The root entry is "0:". //For example "0:1:1" corresponds the following structure @@ -38,7 +34,7 @@ using namespace std; // | // |_ 1 -DF_Label DF_Label::Label(const DF_Label& theLabel, const string& theEntry, bool isCreated) +DF_Label DF_Label::Label(const DF_Label& theLabel, const std::string& theEntry, bool isCreated) { if(theLabel.IsNull()) return DF_Label(); @@ -48,7 +44,7 @@ DF_Label DF_Label::Label(const DF_Label& theLabel, const string& theEntry, bool char* cc = (char*)theEntry.c_str(); int n = 0; - vector tags; + int i=0; while (*cc != '\0') { while ( *cc >= '0' && *cc <= '9') { @@ -56,21 +52,20 @@ DF_Label DF_Label::Label(const DF_Label& theLabel, const string& theEntry, bool ++cc; } if (*cc == ':' || *cc == '\0') { - tags.push_back(n); + if(i>0) + { + if(aLabel.IsNull())break; + aLabel = aLabel.FindChild(n, isCreated); + } + i++; n = 0; if (*cc != '\0') ++cc; } else { - tags.clear(); - break; + return DF_Label(); } } - if(!tags.size()) return DF_Label(); - - for(int i = 1, len = tags.size(); !aLabel.IsNull() && i_document); + return _node->_document != 0; } //Searches an Attribute with given ID located on this Label. @@ -145,8 +140,10 @@ DF_Attribute* DF_Label::FindAttribute(const std::string& theID) const { if(!_node) return NULL; - if(_node->_attributes.find(theID) == _node->_attributes.end()) return NULL; - return _node->_attributes[theID]; + std::map< std::string, DF_Attribute* >::iterator it=_node->_attributes.find(theID); + if(it == _node->_attributes.end()) return NULL; + return it->second; + } //Returns true if there is an Attribute with given ID on this Label. @@ -190,7 +187,7 @@ bool DF_Label::ForgetAllAttributes(bool clearChildren) const { if(!_node) return false; - vector va = GetAttributes(); + std::vector va = GetAttributes(); _node->_attributes.clear(); for(int i = 0, len = va.size(); i DF_Label::GetAttributes() const +std::vector DF_Label::GetAttributes() const { - vector attributes; + std::vector attributes; if(!_node) return attributes; - typedef map::const_iterator AI; - vector sorted; + typedef std::map::const_iterator AI; + std::vector sorted; for(AI p = _node->_attributes.begin(); p!=_node->_attributes.end(); p++) sorted.push_back(p->first); @@ -261,7 +258,7 @@ bool DF_Label::HasChild() const { if(!_node) return false; - return (bool)(_node->_firstChild); + return _node->_firstChild != 0; } //Returns a number of child Labels. @@ -378,31 +375,33 @@ DF_Label DF_Label::NewChild() } //Returns a string entry of this Label -string DF_Label::Entry() const +std::string DF_Label::Entry() const { - string entry = ""; - vector vi; DF_LabelNode* father = this->_node; - while(father) { - vi.push_back(father->_tag); - father = father->_father; - } - - int len = vi.size(); - if(len == 1) { - entry = "0:"; - } - else { - char buffer[128]; - for(int i = len-1; i>=0; i--) { - int tag = vi[i]; - sprintf(buffer, "%d", tag); - entry+=string(buffer); - if(i) entry += ":"; + if(!father->_father)return "0:"; + int tag; + char buff[128]; + char* wstr= buff; + char* str = buff; + + while(father) + { + tag=father->_tag; + do{ + // Conversion. Number is reversed. + *wstr++ = '0' + (tag % 10); + }while(tag /= 10); + father = father->_father; + if(father)*wstr++ = ':'; } - } + *wstr-- = '\0'; + + //reverse the buffer + char aux; + while (wstr > str) + aux = *wstr, *wstr-- = *str, *str++ = aux; - return entry; + return buff; } bool DF_Label::IsEqual(const DF_Label& theLabel) @@ -421,23 +420,23 @@ void DF_Label::Nullify() void DF_Label::dump() { - if(!_node) cout << "DF_Label addr : " << this << " NULL " << endl; + if(!_node) std::cout << "DF_Label addr : " << this << " NULL " << std::endl; else { - cout << "DF_Label addr : " << this->_node << " entry : " << Entry() << endl; - if(_node->_father) cout << " Father : " << _node->_father << " entry : " << Father().Entry() << endl; - else cout << " Father : NULL " << endl; + std::cout << "DF_Label addr : " << this->_node << " entry : " << Entry() << std::endl; + if(_node->_father) std::cout << " Father : " << _node->_father << " entry : " << Father().Entry() << std::endl; + else std::cout << " Father : NULL " << std::endl; - if(_node->_firstChild) cout << " FirstChild : " << _node->_firstChild << " entry : " << DF_Label(_node->_firstChild).Entry() << endl; - else cout << " FirstChild : NULL " << endl; + if(_node->_firstChild) std::cout << " FirstChild : " << _node->_firstChild << " entry : " << DF_Label(_node->_firstChild).Entry() << std::endl; + else std::cout << " FirstChild : NULL " << std::endl; - if(_node->_lastChild) cout << " LastChild : " << _node->_lastChild << " entry : " << DF_Label(_node->_lastChild).Entry() << endl; - else cout << " LastChild : NULL " << endl; + if(_node->_lastChild) std::cout << " LastChild : " << _node->_lastChild << " entry : " << DF_Label(_node->_lastChild).Entry() << std::endl; + else std::cout << " LastChild : NULL " << std::endl; - if(_node->_previous) cout << " Previous : " << _node->_previous << " entry : " << DF_Label(_node->_previous).Entry() << endl; - else cout << " Previous : NULL " << endl; + if(_node->_previous) std::cout << " Previous : " << _node->_previous << " entry : " << DF_Label(_node->_previous).Entry() << std::endl; + else std::cout << " Previous : NULL " << std::endl; - if(_node->_next) cout << " Next : " << _node->_next << " entry : " << DF_Label(_node->_next).Entry() << endl; - else cout << " Next : NULL " << endl; + if(_node->_next) std::cout << " Next : " << _node->_next << " entry : " << DF_Label(_node->_next).Entry() << std::endl; + else std::cout << " Next : NULL " << std::endl; } } @@ -463,8 +462,8 @@ DF_LabelNode::DF_LabelNode() DF_LabelNode::~DF_LabelNode() { - vector va; - typedef map::const_iterator AI; + std::vector va; + typedef std::map::const_iterator AI; for(AI p = _attributes.begin(); p!=_attributes.end(); p++) va.push_back(p->second); @@ -480,8 +479,8 @@ void DF_LabelNode::Reset() _depth = 0; _tag = 0; - vector va; - typedef map::const_iterator AI; + std::vector va; + typedef std::map::const_iterator AI; for(AI p = _attributes.begin(); p!=_attributes.end(); p++) va.push_back(p->second); diff --git a/src/DF/DF_Label.hxx b/src/DF/DF_Label.hxx index c3c2fcedc..6ab490786 100644 --- a/src/DF/DF_Label.hxx +++ b/src/DF/DF_Label.hxx @@ -1,24 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef DFLABEL_HXX #define DFLABEL_HXX diff --git a/src/DF/DF_definitions.hxx b/src/DF/DF_definitions.hxx index 12e3f6de9..f4a404c7e 100644 --- a/src/DF/DF_definitions.hxx +++ b/src/DF/DF_definitions.hxx @@ -1,29 +1,27 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef DF_DEF_HXX #define DF_DEF_HXX #ifdef WIN32 -# ifdef DF_EXPORTS +# if defined DF_EXPORTS # define DF_EXPORT __declspec( dllexport ) # else # define DF_EXPORT __declspec( dllimport ) @@ -44,27 +42,27 @@ public: template explicit df_shared_ptr(Y * p) { - boost::shared_ptr::reset(p); + boost::shared_ptr::reset(p); } template df_shared_ptr(df_shared_ptr const & r): boost::shared_ptr(r,boost::detail::dynamic_cast_tag()) - {} + {} template df_shared_ptr & operator=(df_shared_ptr const & r) { - df_shared_ptr(r).swap(*this); - return *this; + df_shared_ptr(r).swap(*this); + return *this; } template df_shared_ptr& operator()(Y * p) // Y must be complete { if(T* pt = dynamic_cast(p)) - boost::shared_ptr::reset(pt); + boost::shared_ptr::reset(pt); else - boost::throw_exception(std::bad_cast()); + boost::throw_exception(std::bad_cast()); return *this; } diff --git a/src/DF/Makefile.am b/src/DF/Makefile.am index 78d557daf..e96f2d711 100644 --- a/src/DF/Makefile.am +++ b/src/DF/Makefile.am @@ -1,24 +1,22 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# 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 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. # -# 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 # -# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : Makefile.am # Author : Guillaume Boulant (CSSI) # Module : KERNEL diff --git a/src/DF/testDF.cxx b/src/DF/testDF.cxx index 202ab7089..bc95c6c65 100644 --- a/src/DF/testDF.cxx +++ b/src/DF/testDF.cxx @@ -1,24 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + //File: testDF.cxx //Author: Sergey RUIN // @@ -43,15 +41,14 @@ #include #else #include -#include #include +#include #endif -using namespace std; -void printStr(const string& theValue) +void printStr(const std::string& theValue) { - cout << "printStr: " << theValue << endl; + std::cout << "printStr: " << theValue << std::endl; } void GetSystemDate(int& year, int& month, int& day, int& hours, int& minutes, int& seconds) @@ -85,25 +82,25 @@ void GetSystemDate(int& year, int& month, int& day, int& hours, int& minutes, in #endif } -string GetUserName() +std::string GetUserName() { #ifdef WIN32 char* pBuff = new char[UNLEN + 1]; DWORD dwSize = UNLEN + 1; - string retVal; + std::string retVal; GetUserName ( pBuff, &dwSize ); - string theTmpUserName(pBuff,(int)dwSize -1 ); + std::string theTmpUserName(pBuff,(int)dwSize -1 ); retVal = theTmpUserName; delete [] pBuff; return retVal; #else struct passwd *infos; infos = getpwuid(getuid()); - return string(infos->pw_name); + return std::string(infos->pw_name); #endif } -string GetNameFromPath(const string& thePath) { +std::string GetNameFromPath(const std::string& thePath) { if (thePath.empty()) return ""; int pos1 = thePath.rfind('/'); int pos2 = thePath.rfind('\\'); @@ -112,11 +109,11 @@ string GetNameFromPath(const string& thePath) { return thePath; } -string GetDirFromPath(const string& thePath) { +std::string GetDirFromPath(const std::string& thePath) { if (thePath.empty()) return ""; int pos = thePath.rfind('/'); - string path; + std::string path; if(pos > 0) { path = thePath.substr(0, pos+1); } @@ -142,7 +139,7 @@ string GetDirFromPath(const string& thePath) { } -bool Exists(const string thePath) +bool Exists(const std::string thePath) { #ifdef WIN32 if ( GetFileAttributes ( thePath.c_str() ) == 0xFFFFFFFF ) { @@ -158,14 +155,14 @@ bool Exists(const string thePath) } -string divideString(const string& theValue, int nbChars) +std::string divideString(const std::string& theValue, int nbChars) { return theValue.substr(nbChars, theValue.size()); } -vector splitString(const string& theValue, char separator) +std::vector splitString(const std::string& theValue, char separator) { - vector vs; + std::vector vs; if(theValue[0] == separator && theValue.size() == 1) return vs; int pos = theValue.find(separator); if(pos < 0) { @@ -173,13 +170,13 @@ vector splitString(const string& theValue, char separator) return vs; } - string s = theValue; + std::string s = theValue; if(s[0] == separator) s = s.substr(1, s.size()); while((pos = s.find(separator)) >= 0) { vs.push_back(s.substr(0, pos)); s = s.substr(pos+1, s.size()); } - + if(!s.empty() && s[0] != separator) vs.push_back(s); return vs; } @@ -187,7 +184,7 @@ vector splitString(const string& theValue, char separator) int main (int argc, char * argv[]) { - cout << "Test started " << endl; + std::cout << "Test started " << std::endl; DF_Application* appli = new DF_Application; /* @@ -202,23 +199,23 @@ int main (int argc, char * argv[]) DF_Attribute* attr = NULL; if(!(attr = child.FindAttribute(DF_Container::GetID()))) { - cout << "Attribute wasn't found" << endl; + std::cout << "Attribute wasn't found" << std::endl; } else { attr1 = dynamic_cast(attr); - cout << "Attribute was found " << " HasID " << attr1->HasIntID("eighteen") << " value = " << attr1->GetInt("eighteen")<< endl; + std::cout << "Attribute was found " << " HasID " << attr1->HasIntID("eighteen") << " value = " << attr1->GetInt("eighteen")<< std::endl; } DF_Container *attr2 = (DF_Container*)child.FindAttribute(DF_Container::GetID()); if(!attr2) cout << "Can't find the attribute" << endl; - cout << "Change find : " << attr2->GetInt("eighteen") << endl; + std::cout << "Change find : " << attr2->GetInt("eighteen") << std::endl; - cout << "Forgetting " << child.ForgetAttribute(DF_Container::GetID()) << endl; + std::cout << "Forgetting " << child.ForgetAttribute(DF_Container::GetID()) << std::endl; if(!child.FindAttribute(DF_Container::GetID())) { - cout << "Attribute wasn't found" << endl; + std::cout << "Attribute wasn't found" << std::endl; } @@ -228,8 +225,8 @@ int main (int argc, char * argv[]) child.NewChild();//0:1:4:2 - cout << "Is equal " << (child == child) << endl; - cout << "Is equal " << (child == root1) << endl; + std::cout << "Is equal " << (child == child) << std::endl; + std::cout << "Is equal " << (child == root1) << std::endl; child = root1.NewChild(); //0:1:5 @@ -240,24 +237,24 @@ int main (int argc, char * argv[]) DF_ChildIterator CI(root1.Father(), true); //root1.dump(); for(; CI.More(); CI.Next()) { - cout << CI.Value().Entry() << endl; + std::cout << CI.Value().Entry() << std::endl; //CI.Value().dump(); } DF_Label L = DF_Label::Label(child, "0:1:4:1"); - cout << "Found Label " << L.Entry() << endl; + std::cout << "Found Label " << L.Entry() << std::endl; std::string s("012-56"); int pos = s.find('-'); - cout << "Fisrt part : " << s.substr(0, pos) << endl; - cout << "Last part : " << s.substr(pos+1, s.size()) << endl; + std::cout << "Fisrt part : " << s.substr(0, pos) << std::endl; + std::cout << "Last part : " << s.substr(pos+1, s.size()) << std::endl; - vector vs = splitString("/dn20/salome/srn/salome2/", '/'); + std::vector vs = splitString("/dn20/salome/srn/salome2/", '/'); for(int i = 0; i +#else +# include #endif ConnectionManager_i::ConnectionManager_i(CORBA::ORB_ptr orb) { @@ -47,9 +50,9 @@ ConnectionManager_i::~ConnectionManager_i() {} Engines::ConnectionManager::connectionId ConnectionManager_i::connect(Engines::DSC_ptr uses_component, - const char* uses_port_name, - Engines::DSC_ptr provides_component, - const char* provides_port_name) + const char* uses_port_name, + Engines::DSC_ptr provides_component, + const char* provides_port_name) { Ports::Port_var p_port = provides_component->get_provides_port(provides_port_name, false); @@ -79,7 +82,7 @@ ConnectionManager_i::connect(Engines::DSC_ptr uses_component, void ConnectionManager_i::disconnect(Engines::ConnectionManager::connectionId id, - Engines::DSC::Message message) + Engines::DSC::Message message) { int err=0; // Connection id exist ? @@ -92,8 +95,7 @@ ConnectionManager_i::disconnect(Engines::ConnectionManager::connectionId id, connection_infos * infos = ids[id]; try { - infos->provides_component->disconnect_provides_port(infos->provides_port_name.c_str(), - message); + infos->provides_component->disconnect_provides_port(infos->provides_port_name.c_str(), message); } catch(CORBA::SystemException& ex) { @@ -103,8 +105,7 @@ ConnectionManager_i::disconnect(Engines::ConnectionManager::connectionId id, try { infos->uses_component->disconnect_uses_port(infos->uses_port_name.c_str(), - infos->provides_port, - message); + infos->provides_port, message); } catch(CORBA::SystemException& ex) { @@ -121,10 +122,16 @@ ConnectionManager_i::disconnect(Engines::ConnectionManager::connectionId id, void ConnectionManager_i::ShutdownWithExit() { + ids_it = ids.begin(); + while(ids_it != ids.end()) + { + disconnect(ids_it->first, Engines::DSC::RemovingConnection); + ids_it = ids.begin(); + } + if(!CORBA::is_nil(_orb)) _orb->shutdown(0); - //exit( EXIT_SUCCESS ); } CORBA::Long diff --git a/src/DSC/DSC_Basic/ConnectionManager_i.hxx b/src/DSC/DSC_Basic/ConnectionManager_i.hxx index 7a9b0a4ee..a7bdc2444 100644 --- a/src/DSC/DSC_Basic/ConnectionManager_i.hxx +++ b/src/DSC/DSC_Basic/ConnectionManager_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : ConnectionManager_i.hxx // Author : André RIBES (EDF) // Module : KERNEL @@ -50,9 +51,9 @@ class ConnectionManager_i : * \see Engines::ConnectionManager::connect */ Engines::ConnectionManager::connectionId connect(Engines::DSC_ptr uses_component, - const char* uses_port_name, - Engines::DSC_ptr provides_component, - const char* provides_port_name); + const char* uses_port_name, + Engines::DSC_ptr provides_component, + const char* provides_port_name); /*! * CORBA method : releases a connection performed with @@ -61,7 +62,7 @@ class ConnectionManager_i : * \see Engines::ConnectionManager::disconnect */ void disconnect(Engines::ConnectionManager::connectionId id, - Engines::DSC::Message message); + Engines::DSC::Message message); /*! Shutdown the ConnectionManager process. @@ -84,9 +85,9 @@ class ConnectionManager_i : }; typedef std::map ids_type; + connection_infos *> ids_type; typedef std::map::iterator ids_it_type; + connection_infos *>::iterator ids_it_type; ids_type ids; ids_it_type ids_it; diff --git a/src/DSC/DSC_Basic/DSC_Basic.hxx b/src/DSC/DSC_Basic/DSC_Basic.hxx index 3e0b4922d..53e249994 100755 --- a/src/DSC/DSC_Basic/DSC_Basic.hxx +++ b/src/DSC/DSC_Basic/DSC_Basic.hxx @@ -1,24 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : DSC_Basic.hxx // Author : Natalia ERMOLAYEVA // Module : SALOME @@ -27,7 +25,7 @@ #define _DSC_Basic_HXX_ #ifdef WIN32 -# ifdef DSC_BASIC_EXPORTS +# if defined DSC_BASIC_EXPORTS || defined SalomeDSCContainer_EXPORTS # define DSC_BASIC_EXPORT __declspec( dllexport ) # else # define DSC_BASIC_EXPORT __declspec( dllimport ) diff --git a/src/DSC/DSC_Basic/DSC_Callbacks.hxx b/src/DSC/DSC_Basic/DSC_Callbacks.hxx index 24ba2b006..1f88bfb90 100644 --- a/src/DSC/DSC_Basic/DSC_Callbacks.hxx +++ b/src/DSC/DSC_Basic/DSC_Callbacks.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : DSC_Callbacks.hxx // Author : André RIBES (EDF) // Module : KERNEL @@ -33,7 +34,8 @@ /*! \class DSC_Callbacks * \brief This is an abstract class that defines methods that the component - * uses to prevent the component user code that the state of the component has changed. + * uses to notify the component user code that the state of the component has changed. + * * Currently only port's connection modifications are signaled. */ class DSC_BASIC_EXPORT DSC_Callbacks @@ -42,33 +44,31 @@ class DSC_BASIC_EXPORT DSC_Callbacks DSC_Callbacks() {} virtual ~DSC_Callbacks() {} - /*! - * This method is used by the component when the number of connection - * on a provides port changes. This information helps the user code to detect - * operation on its ports. - * + /*! \brief This method is used by the component when the number of connection + * on a provides port changes. + * + * This information helps the user code to detect operation on its ports. * * \param provides_port_name the name of the provides name that has changed. * \param connection_nbr the new number of connection on the provides port. * \param message contains informations about the modification of the port. */ virtual void provides_port_changed(const char* provides_port_name, - int connection_nbr, - const Engines::DSC::Message message) = 0; + int connection_nbr, + const Engines::DSC::Message message) = 0; - /*! - * This method is used by the component when the number of connection - * on a uses port changes. This information helps the user code to detect - * operation on its ports. - * + /*! \brief This method is used by the component when the number of connection + * on a uses port changes. + * + * This information helps the user code to detect operation on its ports. * * \param uses_port_name the name of the uses name that has changed. * \param new_uses_port the new sequence representing the uses port. * \param message contains informations about the modification of the port. */ virtual void uses_port_changed(const char* uses_port_name, - Engines::DSC::uses_port * new_uses_port, - const Engines::DSC::Message message) = 0; + Engines::DSC::uses_port * new_uses_port, + const Engines::DSC::Message message) = 0; }; #endif diff --git a/src/DSC/DSC_Basic/DSC_i.cxx b/src/DSC/DSC_Basic/DSC_i.cxx index 75f3f05c7..a6d959a37 100644 --- a/src/DSC/DSC_Basic/DSC_i.cxx +++ b/src/DSC/DSC_Basic/DSC_i.cxx @@ -1,43 +1,46 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : DSC_i.cxx // Author : André RIBES (EDF) // Module : KERNEL // #include "DSC_i.hxx" +//#define MYDEBUG + Engines_DSC_i:: Engines_DSC_i(CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName, - bool notif) : Engines_Component_i(orb, - poa, - contId, - instanceName, - interfaceName) + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName, + bool notif) : Engines_Component_i(orb, + poa, + contId, + instanceName, + interfaceName) { -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cerr << "--Engines_DSC_i: MARK 1 --" << instanceName << "----" << std::endl; #endif } @@ -52,7 +55,7 @@ Engines_DSC_i(CORBA::ORB_ptr orb, bool regist) : Engines_Component_i(orb, poa, container, instanceName, interfaceName,notif,regist) { -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cerr << "--Engines_DSC_i: MARK 1 --" << instanceName << "----" << std::endl; #endif } diff --git a/src/DSC/DSC_Basic/DSC_i.hxx b/src/DSC/DSC_Basic/DSC_i.hxx index ccfd98786..6fea7def9 100644 --- a/src/DSC/DSC_Basic/DSC_i.hxx +++ b/src/DSC/DSC_Basic/DSC_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : DSC_i.hxx // Author : André RIBES (EDF) // Module : KERNEL @@ -43,24 +44,24 @@ */ class DSC_BASIC_EXPORT Engines_DSC_i: public Engines_Component_i, // keyword virtual is not use to be able to - // call the right Engines_Component_i constructor. - // If virtual is used, a derived class of Engines_DSC_i - // will have to call the right Engines_Component_i constructor. + // call the right Engines_Component_i constructor. + // If virtual is used, a derived class of Engines_DSC_i + // will have to call the right Engines_Component_i constructor. public virtual POA_Engines::DSC, public Engines_DSC_interface { public: Engines_DSC_i(CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName, - bool notif = false); + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName, + bool notif = false); Engines_DSC_i(CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - Engines::Container_ptr container, - const char *instanceName, - const char *interfaceName, + PortableServer::POA_ptr poa, + Engines::Container_ptr container, + const char *instanceName, + const char *interfaceName, bool notif = false, bool regist = true ); @@ -70,38 +71,38 @@ public: * \see Engines::DSC::add_provides_port */ virtual void add_provides_port(Ports::Port_ptr ref, - const char* provides_port_name, - Ports::PortProperties_ptr port_prop) + const char* provides_port_name, + Ports::PortProperties_ptr port_prop) throw (Engines::DSC::PortAlreadyDefined, - Engines::DSC::NilPort, - Engines::DSC::BadProperty) { + Engines::DSC::NilPort, + Engines::DSC::BadProperty) { Engines_DSC_interface::add_provides_port(ref, - provides_port_name, - port_prop); + provides_port_name, + port_prop); } /*! * \see Engines::DSC::add_uses_port */ virtual void add_uses_port(const char* repository_id, - const char* uses_port_name, - Ports::PortProperties_ptr port_prop) + const char* uses_port_name, + Ports::PortProperties_ptr port_prop) throw (Engines::DSC::PortAlreadyDefined, - Engines::DSC::BadProperty) { + Engines::DSC::BadProperty) { Engines_DSC_interface::add_uses_port(repository_id, - uses_port_name, - port_prop); + uses_port_name, + port_prop); } /*! * \see Engines::DSC::get_provides_port */ virtual Ports::Port_ptr get_provides_port(const char* provides_port_name, - const CORBA::Boolean connection_error) + const CORBA::Boolean connection_error) throw (Engines::DSC::PortNotDefined, - Engines::DSC::PortNotConnected) { + Engines::DSC::PortNotConnected) { return Engines_DSC_interface::get_provides_port(provides_port_name, - connection_error); + connection_error); } /*! @@ -109,7 +110,7 @@ public: */ virtual Engines::DSC::uses_port * get_uses_port(const char* uses_port_name) throw (Engines::DSC::PortNotDefined, - Engines::DSC::PortNotConnected) { + Engines::DSC::PortNotConnected) { return Engines_DSC_interface::get_uses_port(uses_port_name); } @@ -125,12 +126,12 @@ public: * \see Engines::DSC::connect_uses_port */ virtual void connect_uses_port(const char* uses_port_name, - Ports::Port_ptr provides_port_ref) + Ports::Port_ptr provides_port_ref) throw (Engines::DSC::PortNotDefined, - Engines::DSC::BadPortType, - Engines::DSC::NilPort) { + Engines::DSC::BadPortType, + Engines::DSC::NilPort) { Engines_DSC_interface::connect_uses_port(uses_port_name, - provides_port_ref); + provides_port_ref); } /*! @@ -145,25 +146,25 @@ public: * \see Engines::DSC::disconnect_provides_port */ virtual void disconnect_provides_port(const char* provides_port_name, - const Engines::DSC::Message message) + const Engines::DSC::Message message) throw (Engines::DSC::PortNotDefined, - Engines::DSC::PortNotConnected) { + Engines::DSC::PortNotConnected) { Engines_DSC_interface::disconnect_provides_port(provides_port_name, - message); + message); } /*! * \see Engines::DSC::disconnect_uses_port */ virtual void disconnect_uses_port(const char* uses_port_name, - Ports::Port_ptr provides_port_ref, - const Engines::DSC::Message message) + Ports::Port_ptr provides_port_ref, + const Engines::DSC::Message message) throw (Engines::DSC::PortNotDefined, - Engines::DSC::PortNotConnected, - Engines::DSC::BadPortReference) { + Engines::DSC::PortNotConnected, + Engines::DSC::BadPortReference) { Engines_DSC_interface::disconnect_uses_port(uses_port_name, - provides_port_ref, - message); + provides_port_ref, + message); } /*! diff --git a/src/DSC/DSC_Basic/DSC_interface.cxx b/src/DSC/DSC_Basic/DSC_interface.cxx index eb6db311c..dd94faedf 100644 --- a/src/DSC/DSC_Basic/DSC_interface.cxx +++ b/src/DSC/DSC_Basic/DSC_interface.cxx @@ -1,30 +1,41 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : DSC_interface.cxx // Author : André RIBES (EDF) // Module : KERNEL // #include #include "DSC_interface.hxx" +#ifdef WNT +#else +#include +#endif +#include +#include +#include +#include + +//#define MYDEBUG Engines_DSC_interface::Engines_DSC_interface() {} @@ -38,8 +49,8 @@ Engines_DSC_interface::~Engines_DSC_interface() void Engines_DSC_interface::add_provides_port(Ports::Port_ptr ref, - const char* provides_port_name, - Ports::PortProperties_ptr port_prop) + const char* provides_port_name, + Ports::PortProperties_ptr port_prop) throw (Engines::DSC::PortAlreadyDefined, Engines::DSC::NilPort, Engines::DSC::BadProperty) @@ -69,8 +80,8 @@ throw (Engines::DSC::PortAlreadyDefined, void Engines_DSC_interface::add_uses_port(const char* repository_id, - const char* uses_port_name, - Ports::PortProperties_ptr port_prop) + const char* uses_port_name, + Ports::PortProperties_ptr port_prop) throw (Engines::DSC::PortAlreadyDefined, Engines::DSC::BadProperty) { @@ -101,10 +112,10 @@ throw (Engines::DSC::PortAlreadyDefined, Ports::Port_ptr Engines_DSC_interface::get_provides_port(const char* provides_port_name, - const CORBA::Boolean connection_error) + const CORBA::Boolean connection_error) throw (Engines::DSC::PortNotDefined, - Engines::DSC::PortNotConnected, - Engines::DSC::BadPortType) + Engines::DSC::PortNotConnected, + Engines::DSC::BadPortType) { // Method arg test assert(provides_port_name); @@ -138,8 +149,8 @@ Engines_DSC_interface::get_provides_port(const char* provides_port_name, Engines::DSC::uses_port * Engines_DSC_interface::get_uses_port(const char* uses_port_name) throw (Engines::DSC::PortNotDefined, - Engines::DSC::PortNotConnected, - Engines::DSC::BadPortType) + Engines::DSC::PortNotConnected, + Engines::DSC::BadPortType) { // Method arg test assert(uses_port_name); @@ -154,7 +165,9 @@ Engines_DSC_interface::get_uses_port(const char* uses_port_name) Engines::DSC::BadPortType BPT; BPT.expected = CORBA::string_dup("Expected a uses port"); BPT.received = CORBA::string_dup((std::string("Received a provides/none port : ")+uses_port_name).c_str()); +#ifdef MYDEBUG std::cout << "---- DSC_Interface : MARK 1 ---- exception : " << uses_port_name << "----" << std::endl; +#endif throw BPT; } @@ -164,7 +177,9 @@ Engines_DSC_interface::get_uses_port(const char* uses_port_name) } else { +#ifdef MYDEBUG std::cout << "---- DSC_Interface : MARK 2 ---- exception : " << uses_port_name << "----" << std::endl; +#endif throw Engines::DSC::PortNotConnected(); } @@ -190,17 +205,17 @@ Engines_DSC_interface::connect_provides_port(const char* provides_port_name) my_ports[provides_port_name]->connection_nbr += 1; // User code is informed provides_port_changed(provides_port_name, - my_ports[provides_port_name]->connection_nbr, - Engines::DSC::AddingConnection - ); + my_ports[provides_port_name]->connection_nbr, + Engines::DSC::AddingConnection + ); } void Engines_DSC_interface::connect_uses_port(const char* uses_port_name, - Ports::Port_ptr provides_port_ref) + Ports::Port_ptr provides_port_ref) throw (Engines::DSC::PortNotDefined, - Engines::DSC::BadPortType, - Engines::DSC::NilPort) + Engines::DSC::BadPortType, + Engines::DSC::NilPort) { // Method arg test assert(uses_port_name); @@ -234,14 +249,14 @@ Engines_DSC_interface::connect_uses_port(const char* uses_port_name, my_ports[uses_port_name]->connection_nbr += 1; // User code is informed uses_port_changed(uses_port_name, - new Engines::DSC::uses_port(my_ports[uses_port_name]->uses_port_refs), - Engines::DSC::AddingConnection); + new Engines::DSC::uses_port(my_ports[uses_port_name]->uses_port_refs), + Engines::DSC::AddingConnection); } else { Engines::DSC::BadPortType BPT; BPT.expected = CORBA::string_dup("Expected ..."); BPT.received = CORBA::string_dup((std::string("Received an incorrect repository id type ")+ - repository_id).c_str()); + repository_id).c_str()); throw BPT; } @@ -269,7 +284,7 @@ Engines_DSC_interface::is_connected(const char* port_name) void Engines_DSC_interface::disconnect_provides_port(const char* provides_port_name, - const Engines::DSC::Message message) + const Engines::DSC::Message message) throw (Engines::DSC::PortNotDefined, Engines::DSC::PortNotConnected) { @@ -287,8 +302,8 @@ throw (Engines::DSC::PortNotDefined, { my_ports[provides_port_name]->connection_nbr -= 1; provides_port_changed(provides_port_name, - my_ports[provides_port_name]->connection_nbr, - message); + my_ports[provides_port_name]->connection_nbr, + message); } else throw Engines::DSC::PortNotConnected(); @@ -296,8 +311,8 @@ throw (Engines::DSC::PortNotDefined, void Engines_DSC_interface::disconnect_uses_port(const char* uses_port_name, - Ports::Port_ptr provides_port_ref, - const Engines::DSC::Message message) + Ports::Port_ptr provides_port_ref, + const Engines::DSC::Message message) throw (Engines::DSC::PortNotDefined, Engines::DSC::PortNotConnected, Engines::DSC::BadPortReference) @@ -322,8 +337,8 @@ throw (Engines::DSC::PortNotDefined, { if (my_ports[uses_port_name]->uses_port_refs[i]->_is_equivalent(provides_port_ref)) { - port_index = i; - break; + port_index = i; + break; } } if (port_index == -1) @@ -339,15 +354,15 @@ throw (Engines::DSC::PortNotDefined, for(;index_ancien < seq_length;) { if (index_ancien == port_index) { - // Rien a faire ! - // On ne change pas le index du nouveau tableau - index_ancien += 1; + // Rien a faire ! + // On ne change pas le index du nouveau tableau + index_ancien += 1; } else { - (*new_uses_port)[index_nouveau] = my_ports[uses_port_name]->uses_port_refs[index_ancien]; - index_ancien += 1; - index_nouveau += 1; + (*new_uses_port)[index_nouveau] = my_ports[uses_port_name]->uses_port_refs[index_ancien]; + index_ancien += 1; + index_nouveau += 1; } } @@ -356,8 +371,8 @@ throw (Engines::DSC::PortNotDefined, // The user code is informed uses_port_changed(uses_port_name, - new_uses_port, - message); + new_uses_port, + message); } else throw Engines::DSC::PortNotConnected(); @@ -379,3 +394,182 @@ Engines_DSC_interface::get_port_properties(const char* port_name) rtn_properties = Ports::PortProperties::_duplicate(my_ports[port_name]->port_prop); return rtn_properties; } + +//Trace functions for DSC operations: a local function (initTrace) and a class method (Engines_DSC_interface::writeEvent) +static int traceType=-1; // 0=stderr;1=file; +static int traceLevel=-1; // 0=no trace;1=normal trace;2=detailed trace +static std::ofstream traceFile; +static std::ostream *out; + +//! Initialize the trace file +/*! + * The trace file depends on an environment variable (DSC_TRACE). If this variable + * is equal to 1, the trace file is a file with the name : /.tce. + * In all other cases, the trace file is stderr + * The environment variable DSC_TRACELEVEL can be used to suppress the trace (value 0) + * + * \param containerName the name of the container where the trace is built + */ +static void initTrace(const std::string& containerName) +{ + // if initialization has already been done do nothing + if(traceLevel >= 0)return; + + std::string typeenv="0"; + std::string levelenv="1"; + char* valenv=0; + valenv=getenv("DSC_TRACE"); + if(valenv)typeenv=valenv; + valenv=getenv("DSC_TRACELEVEL"); + if(valenv)levelenv=valenv; + + if(levelenv=="0") + traceLevel=0; // no trace + else if(levelenv=="2") + traceLevel=2; //detailed trace + else + traceLevel=1; // normal trace (default) + + if(traceLevel==0) + return; + + if(typeenv=="1") + { + //trace in file + traceType=1; +#ifdef WNT + std::string logFilename=getenv("TEMP"); + logFilename += "\\"; +#else + std::string logFilename="/tmp"; + char* val = getenv("SALOME_TMP_DIR"); + if(val) + { + struct stat file_info; + stat(val, &file_info); + bool is_dir = S_ISDIR(file_info.st_mode); + if (is_dir)logFilename=val; + } + logFilename += "/"; +#endif + + logFilename=logFilename+containerName+".tce"; + traceFile.open(logFilename.c_str(), std::ios::out | std::ios::app); + out=&traceFile; + } + else + { + //trace to stderr (default) + traceType=0; + out=&std::cerr; + } + //trace heading + out->width(17); + *out << "Elapsed time" ; + *out << " | " ; + out->width(16); + *out << "Request" ; + *out << " | " ; + out->width(16); + *out << "Container" ; + *out << " | " ; + out->width(16); + *out << "Instance" ; + *out << " | " ; + out->width(16); + *out << "Port" ; + *out << " | " ; + out->width(24); + *out << "Error"; + *out << " | " ; + *out << "Infos" ; + *out << std::endl; +} + + +//! Write a record in the trace file +/*! + * \param request the name of the request executed + * \param containerName the name of the container where the request is executed + * \param instance_name the name of the component where the request is executed + * \param port_name the name of the port that is concerned + * \param error if an error has occured, a string that identifies the error + * \param message informations about error or about the request + */ +void Engines_DSC_interface::writeEvent(const char* request,const std::string& containerName, const char* instance_name, + const char* port_name, const char* error, const char* message) +{ + if(traceLevel < 0) + initTrace(containerName); + if(traceLevel == 0)return; + +#ifdef WNT +#else + struct timeval tv; + gettimeofday(&tv,0); + long tt0=tv.tv_sec/3600; //hours + + if(traceType == 2) + { + //notifier (not used: salome notifier is now obsolete) + std::ostringstream msg; + msg.width(7); + msg << tt0 ; + msg << ":" ; + long tt1=(tv.tv_sec-3600*tt0)/60;//minutes + msg.width(2); + msg << tt1 ; + msg << ":" ; + long tt2=tv.tv_sec - 3600*tt0-60*tt1; //seconds + msg.width(2); + msg << tt2 ; + msg << ":" ; + long tt3=tv.tv_usec/1000; //milliseconds + msg.width(3); + msg << tt3 ; + msg << " | " ; + msg.width(24); + msg << error; + msg << " | " ; + msg << message ; + //send event to notifier (containerName.c_str(),instance_name, request, msg.str().c_str()) + } + else + { + //cerr or file + out->width(7); + *out << tt0 ; + *out << ":" ; + long tt1=(tv.tv_sec-3600*tt0)/60;//minutes + out->width(2); + *out << tt1 ; + *out << ":" ; + long tt2=tv.tv_sec - 3600*tt0-60*tt1; //seconds + out->width(2); + *out << tt2 ; + *out << ":" ; + long tt3=tv.tv_usec/1000; //milliseconds + out->width(3); + *out << tt3 ; + *out << " | " ; + out->width(16); + *out << request ; + *out << " | " ; + out->width(16); + *out << containerName ; + *out << " | " ; + out->width(16); + *out << instance_name ; + *out << " | " ; + out->width(16); + *out << port_name ; + *out << " | " ; + out->width(24); + *out << error; + *out << " | " ; + *out << message ; + *out << std::endl; + } +#endif +} + diff --git a/src/DSC/DSC_Basic/DSC_interface.hxx b/src/DSC/DSC_Basic/DSC_interface.hxx index af7d7f5b2..3da07d25f 100644 --- a/src/DSC/DSC_Basic/DSC_interface.hxx +++ b/src/DSC/DSC_Basic/DSC_interface.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : DSC_interface.hxx // Author : André RIBES (EDF) // Module : KERNEL @@ -50,37 +51,37 @@ public: * \see Engines::DSC::add_provides_port */ virtual void add_provides_port(Ports::Port_ptr ref, - const char* provides_port_name, - Ports::PortProperties_ptr port_prop) + const char* provides_port_name, + Ports::PortProperties_ptr port_prop) throw (Engines::DSC::PortAlreadyDefined, - Engines::DSC::NilPort, - Engines::DSC::BadProperty); + Engines::DSC::NilPort, + Engines::DSC::BadProperty); /*! * \see Engines::DSC::add_uses_port */ virtual void add_uses_port(const char* repository_id, - const char* uses_port_name, - Ports::PortProperties_ptr port_prop) + const char* uses_port_name, + Ports::PortProperties_ptr port_prop) throw (Engines::DSC::PortAlreadyDefined, - Engines::DSC::BadProperty); + Engines::DSC::BadProperty); /*! * \see Engines::DSC::get_provides_port */ virtual Ports::Port_ptr get_provides_port(const char* provides_port_name, - const CORBA::Boolean connection_error) + const CORBA::Boolean connection_error) throw (Engines::DSC::PortNotDefined, - Engines::DSC::PortNotConnected, - Engines::DSC::BadPortType); + Engines::DSC::PortNotConnected, + Engines::DSC::BadPortType); /*! * \see Engines::DSC::get_uses_port */ virtual Engines::DSC::uses_port * get_uses_port(const char* uses_port_name) throw (Engines::DSC::PortNotDefined, - Engines::DSC::PortNotConnected, - Engines::DSC::BadPortType); + Engines::DSC::PortNotConnected, + Engines::DSC::BadPortType); /*! * \see Engines::DSC::connect_provides_port @@ -100,10 +101,10 @@ public: * port how much provides ports are connected with. */ virtual void connect_uses_port(const char* uses_port_name, - Ports::Port_ptr provides_port_ref) + Ports::Port_ptr provides_port_ref) throw (Engines::DSC::PortNotDefined, - Engines::DSC::BadPortType, - Engines::DSC::NilPort); + Engines::DSC::BadPortType, + Engines::DSC::NilPort); /*! * \see Engines::DSC::is_connected @@ -120,9 +121,9 @@ public: * to manage connections between ports. */ virtual void disconnect_provides_port(const char* provides_port_name, - const Engines::DSC::Message message) + const Engines::DSC::Message message) throw (Engines::DSC::PortNotDefined, - Engines::DSC::PortNotConnected); + Engines::DSC::PortNotConnected); /*! * \see Engines::DSC::disconnect_uses_port @@ -136,11 +137,11 @@ public: * the sequence. */ virtual void disconnect_uses_port(const char* uses_port_name, - Ports::Port_ptr provides_port_ref, - const Engines::DSC::Message message) + Ports::Port_ptr provides_port_ref, + const Engines::DSC::Message message) throw (Engines::DSC::PortNotDefined, - Engines::DSC::PortNotConnected, - Engines::DSC::BadPortReference); + Engines::DSC::PortNotConnected, + Engines::DSC::BadPortReference); /*! * \see Engines::DSC::get_port_properties @@ -148,6 +149,9 @@ public: virtual Ports::PortProperties_ptr get_port_properties(const char* port_name) throw (Engines::DSC::PortNotDefined); + static void writeEvent(const char* request,const std::string& containerName, const char* instance_name, + const char* port_name, const char* error, const char* message); + protected: /*-------------------------------------------------*/ diff --git a/src/DSC/DSC_Basic/Makefile.am b/src/DSC/DSC_Basic/Makefile.am index e29f456d5..439889025 100644 --- a/src/DSC/DSC_Basic/Makefile.am +++ b/src/DSC/DSC_Basic/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : Makefile.am # Author : André RIBES (EDF) # Module : KERNEL @@ -45,12 +46,12 @@ salomeinclude_HEADERS = ConnectionManager_i.hxx \ # This local variable defines the list of CPPFLAGS common to all target in this package. COMMON_CPPFLAGS= -I$(top_srcdir)/src/Container \ + -I$(top_srcdir)/src/GenericObj \ -I$(top_srcdir)/src/Notification \ -I$(top_srcdir)/src/SALOMELocalTrace \ -I$(top_srcdir)/src/Basics \ -I$(top_srcdir)/src/NamingService \ -I$(top_srcdir)/src/Utils \ - -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ @@ -89,4 +90,5 @@ SALOME_ConnectionManagerServer_CXXFLAGS = $(COMMON_CPPFLAGS) SALOME_ConnectionManagerServer_LDADD = $(top_builddir)/idl/libSalomeIDLKernel.la \ $(top_builddir)/src/NamingService/libSalomeNS.la \ - $(top_builddir)/src/SALOMELocalTrace/libSALOMELocalTrace.la + $(top_builddir)/src/SALOMELocalTrace/libSALOMELocalTrace.la \ + ${COMMON_LIBS} diff --git a/src/DSC/DSC_Basic/PortProperties_i.cxx b/src/DSC/DSC_Basic/PortProperties_i.cxx index 8a61a00fe..0062af20e 100644 --- a/src/DSC/DSC_Basic/PortProperties_i.cxx +++ b/src/DSC/DSC_Basic/PortProperties_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : PortProperties_i.cxx // Author : André RIBES (EDF) // Module : KERNEL diff --git a/src/DSC/DSC_Basic/PortProperties_i.hxx b/src/DSC/DSC_Basic/PortProperties_i.hxx index 0afa212de..86537aaad 100644 --- a/src/DSC/DSC_Basic/PortProperties_i.hxx +++ b/src/DSC/DSC_Basic/PortProperties_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : PortProperties_i.hxx // Author : André RIBES (EDF) // Module : KERNEL @@ -46,7 +47,7 @@ class DSC_BASIC_EXPORT PortProperties_i: * \see Ports::PortProperties::set_property */ virtual void set_property(const char * name, - const CORBA::Any& value) + const CORBA::Any& value) throw (Ports::NotDefined, Ports::BadType); /*! diff --git a/src/DSC/DSC_Basic/SALOME_ConnectionManagerServer.cxx b/src/DSC/DSC_Basic/SALOME_ConnectionManagerServer.cxx index 8e97f1a5e..160b0b89e 100644 --- a/src/DSC/DSC_Basic/SALOME_ConnectionManagerServer.cxx +++ b/src/DSC/DSC_Basic/SALOME_ConnectionManagerServer.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOME_ConnectionManagerServer.cxx // Author : André RIBES (EDF) // Module : KERNEL @@ -27,8 +28,6 @@ #include "utilities.h" #include -using namespace std; - int main(int argc, char* argv[]) { PortableServer::POA_var root_poa; diff --git a/src/DSC/DSC_Python/Makefile.am b/src/DSC/DSC_Python/Makefile.am index 5a87b6b30..db96c558c 100644 --- a/src/DSC/DSC_Python/Makefile.am +++ b/src/DSC/DSC_Python/Makefile.am @@ -1,28 +1,26 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# 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 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. # -# 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 # -# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : Makefile.am -# Author : André RIBES (EDF), Eric Fayolle (EDF) +# Author : André RIBES (EDF), Eric Fayolle (EDF) # Module : KERNEL -# + include $(top_srcdir)/salome_adm/unix/make_common_starter.am # =============================================================== @@ -30,19 +28,22 @@ include $(top_srcdir)/salome_adm/unix/make_common_starter.am # =============================================================== # +BUILT_SOURCES = calcium_wrap.cpp calcium.py + # This local variable defines the list of CPPFLAGS common to all target in this package. COMMON_CPPFLAGS= -I$(top_srcdir)/src/DSC/DSC_User \ -I$(top_srcdir)/src/DSC/DSC_User/Datastream \ -I$(top_srcdir)/src/DSC/DSC_User/Datastream/Palm \ -I$(top_srcdir)/src/DSC/DSC_User/Datastream/Calcium \ + -I$(top_builddir)/src/DSC/DSC_User/Datastream/Calcium \ -I$(top_srcdir)/src/DSC/DSC_User/Basic \ -I$(top_srcdir)/src/DSC/DSC_Basic \ -I$(top_srcdir)/src/SALOMELocalTrace \ -I$(top_srcdir)/src/Basics \ -I$(top_srcdir)/src/Utils \ -I$(top_srcdir)/src/Container \ + -I$(top_srcdir)/src/GenericObj \ -I$(top_srcdir)/src/Notification \ - -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ @BOOST_CPPFLAGS@ @@ -69,7 +70,7 @@ _calcium_la_LIBADD = ../DSC_User/Datastream/Calcium/libCalciumC.la \ ../DSC_Basic/libSalomeDSCContainer.la \ ../../Container/libSalomeContainer.la -_calcium_la_CXXFLAGS = $(PYTHON_INCLUDES) $(COMMON_CPPFLAGS) +_calcium_la_CPPFLAGS = $(PYTHON_INCLUDES) $(COMMON_CPPFLAGS) EXTRA_DIST=calcium_wrap.cpp calcium.i diff --git a/src/DSC/DSC_Python/calcium.i b/src/DSC/DSC_Python/calcium.i index 768cb438c..29a74ffab 100644 --- a/src/DSC/DSC_Python/calcium.i +++ b/src/DSC/DSC_Python/calcium.i @@ -1,24 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + %define DOCSTRING "CALCIUM python wrapping : Superv_Component class " @@ -28,6 +26,8 @@ %feature("autodoc", "1"); +%include cstring.i + %{ //C++ Includes #include @@ -118,6 +118,19 @@ typedef PyArrayObject ArrayObject; #define array_size(a,i) (((PyArrayObject *)a)->dimensions[i]) #define array_is_contiguous(a) (PyArray_ISCONTIGUOUS(a)) +const char* pytype_string(PyObject*); +const char* typecode_string(int); +int type_match(int, int); +int require_size(PyArrayObject*, int*, int); +int require_dimensions_n(PyArrayObject*, int*, int); +int require_dimensions(PyArrayObject*, int); +int require_contiguous(PyArrayObject*); +PyArrayObject* make_contiguous(PyArrayObject*, int*, int, int); +PyArrayObject* obj_to_array_no_conversion(PyObject*, int); +PyArrayObject* obj_to_array_allow_conversion(PyObject*, int, int*); +PyArrayObject* obj_to_array_contiguous_allow_conversion(PyObject*, int, int*); +PyArrayObject* obj_to_array_contiguous_allow_conversion(PyObject*, int, int*); + /* Given a PyObject, return a string describing its type. */ const char* pytype_string(PyObject* py_obj) { @@ -400,8 +413,9 @@ typedef PyObject ArrayObject; %include "carrays.i" -%array_class(int, intArray); -%array_class(float, floatArray); +%array_class(int, intArray); +%array_class(long, longArray); +%array_class(float, floatArray); %array_class(double, doubleArray); /* special struct to handle string arrays */ @@ -410,6 +424,7 @@ struct stringArray { stringArray(int nelements,int size=0) { nelem=nelements; + size=size; data= new char*[nelements]; for(int i=0;istrides[0]; for(int i=0;idata + i* array->strides[0]; + { + $1[i]=(char*) malloc(sizeof(char)*(array->strides[0]+1)); + strncpy($1[i],(char*) array->data + i* array->strides[0],array->strides[0]); + *($1[i]+array->strides[0])='\0'; + } %#else SWIG_exception(SWIG_TypeError, "string array expected"); %#endif @@ -513,12 +545,23 @@ TYPEMAP_IN3(double, PyArray_DOUBLE) else { $1=sarray->data; + $2=sarray->size; } } -%typemap(freearg) char** eval { - if (array$argnum) free($1); - if (is_new_object$argnum && array$argnum) Py_DECREF(array$argnum); +%typemap(freearg) (char** eval,int strSize) { +%#ifdef WITH_NUMPY + if (array$argnum) + { + for(int i=0;istrides[0]; for(int i=0;idata+i*temp->strides[0]; + { + $1[i]=(char*) temp->data+i*temp->strides[0]; + memset($1[i],0,temp->strides[0]); //numpy strings must be completed with 0 up to elsize + } %#else temp = NULL; SWIG_exception(SWIG_TypeError, "string array expected"); @@ -590,10 +639,13 @@ TYPEMAP_INPLACE3(double, PyArray_DOUBLE) else { $1=sarray->data; + $2=sarray->size; } } -%typemap(freearg) char** lval { +%typemap(freearg) (char** lval,int strSize) { +%#ifdef WITH_NUMPY if (temp$argnum) free($1); +%#endif } /* End of typemap for array of strings on input/output */ @@ -636,13 +688,16 @@ CORBAPTR(PortableServer::POA) %typemap(out) Ports::Port_ptr { $result = api->cxxObjRefToPyObjRef($1, 1); - //All output Ports::Port_ptr variables are duplicated by security. Need to release them for python . Explanation ?? + //All output Ports::Port_ptr variables are duplicated by security. Need to release them for python. CORBA::release($1); } %typemap(out) Ports::PortProperties_ptr, Engines::Salome_file_ptr { $result = api->cxxObjRefToPyObjRef($1, 1); + //the _ptr is duplicated by the routine called. + //Need to release it for Python because the call to cxxObjRefToPyObjRef has created another ref with a count of 1 + CORBA::release($1); } %typemap(out) Engines::DSC::uses_port * @@ -801,6 +856,7 @@ class PySupervCompo:public Superv_Component_i CORBA::Boolean is_connected(const char* port_name) throw (Engines::DSC::PortNotDefined); // End of DSC interface for python components + static void setTimeOut(); %extend @@ -825,7 +881,9 @@ extern "C" void create_calcium_port(Superv_Component_i* compo,char* name,char* t %ignore CPMESSAGE; %include "calciumP.h" -int cp_cd(Superv_Component_i *component,char *name); +%cstring_bounded_output(char *instanceName, 1024); + +int cp_cd(Superv_Component_i *component,char *instanceName); int cp_een(Superv_Component_i *component,int dep,float t,int n,char *nom,int nval,int *eval); int cp_edb(Superv_Component_i *component,int dep,double t,int n,char *nom,int nval,double *eval); @@ -833,6 +891,8 @@ int cp_ere(Superv_Component_i *component,int dep,float t,int n,char *nom,int nv int cp_ecp(Superv_Component_i *component,int dep,float t,int n,char *nom,int nval,float *ecpval); int cp_elo(Superv_Component_i *component,int dep,float t,int n,char *nom,int nval,int *eval); int cp_ech(Superv_Component_i *component,int dep,float t,int n,char *nom,int nval,char** eval,int strSize); +int cp_elg(Superv_Component_i *component,int dep,float t,int n,char *nom,int nval,long *eval); +int cp_eln(Superv_Component_i *component,int dep,float t,int n,char *nom,int nval,long *eval); int cp_len(Superv_Component_i *component,int dep,float *ti,float *tf,int *niter,char *nom,int nmax,int *nval,int *lval); @@ -841,6 +901,13 @@ int cp_lre(Superv_Component_i *component,int dep,float *ti,float *tf,int *nite int cp_lcp(Superv_Component_i *component,int dep,float *ti,float *tf,int *niter,char *nom,int nmax,int *nval,float *lcpval); int cp_llo(Superv_Component_i *component,int dep,float *ti,float *tf,int *niter,char *nom,int nmax,int *nval,int *lval); int cp_lch(Superv_Component_i *component,int dep,float *ti,float *tf,int *niter,char *nom,int nmax,int *nval,char** lval,int strSize); +int cp_llg(Superv_Component_i *component,int dep,float *ti,float *tf,int *niter,char *nom,int nmax,int *nval,long *lval); +int cp_lln(Superv_Component_i *component,int dep,float *ti,float *tf,int *niter,char *nom,int nmax,int *nval,long *lval); + +int cp_fini(Superv_Component_i *component,char *nom, int n); +int cp_fint(Superv_Component_i *component,char *nom, float t); +int cp_effi(Superv_Component_i *component,char *nom, int n); +int cp_efft(Superv_Component_i *component,char *nom, float t); int cp_fin(Superv_Component_i *component,int cp_end); diff --git a/src/DSC/DSC_Python/dsccalcium.py b/src/DSC/DSC_Python/dsccalcium.py index d928701c8..638ce880b 100644 --- a/src/DSC/DSC_Python/dsccalcium.py +++ b/src/DSC/DSC_Python/dsccalcium.py @@ -1,38 +1,42 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# 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 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. # -# 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 # -# 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 # -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + +## @package dsccalcium +# \brief Module that provides the base class for DSC components implemented in python # + import calcium import SALOME_ComponentPy import SALOME_DriverPy import Engines +## The SALOME base class for all DSC components implemented in python (interface Engines::Superv_Component). +# +# class PyDSCComponent(SALOME_ComponentPy.SALOME_ComponentPy_i, SALOME_DriverPy.SALOME_DriverPy_i): """ - A Python SALOME component is implemented by a Python class that has + A Python DSC component is implemented by a Python class that has the name of the component and is located in a python module that has the name of the component. - This class is a base class for Python DSC components. - You must derive it and implement init_service and those methods that are services of the component. """ @@ -90,3 +94,7 @@ class PyDSCComponent(SALOME_ComponentPy.SALOME_ComponentPy_i, def checkOutputFilesToService(self,service_name): return self.proxy.checkOutputFilesToService(service_name) + def beginService(self,service_name): + SALOME_ComponentPy.SALOME_ComponentPy_i.beginService(self,service_name) + self.proxy.setTimeOut() + diff --git a/src/DSC/DSC_User/Basic/Makefile.am b/src/DSC/DSC_User/Basic/Makefile.am index 9b77a6a6e..0c3752330 100644 --- a/src/DSC/DSC_User/Basic/Makefile.am +++ b/src/DSC/DSC_User/Basic/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : Makefile.am # Author : André RIBES (EDF) # Module : KERNEL @@ -46,11 +47,11 @@ COMMON_CPPFLAGS= -I$(top_builddir)/idl \ -I$(top_srcdir)/src/DSC/DSC_Basic \ -I$(top_srcdir)/src/DSC/DSC_User \ -I$(top_srcdir)/src/Container \ + -I$(top_srcdir)/src/GenericObj \ -I$(top_srcdir)/src/Notification \ -I$(top_srcdir)/src/SALOMELocalTrace \ -I$(top_srcdir)/src/Basics \ -I$(top_srcdir)/src/Utils \ - -I$(top_builddir)/salome_adm/unix \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ # This local variable defines the list of dependant libraries common to all target in this package. diff --git a/src/DSC/DSC_User/Basic/basic_port_factory.cxx b/src/DSC/DSC_User/Basic/basic_port_factory.cxx index 9c147cf05..e9e1ceb9e 100644 --- a/src/DSC/DSC_User/Basic/basic_port_factory.cxx +++ b/src/DSC/DSC_User/Basic/basic_port_factory.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : basic_port_factory.cxx // Author : André RIBES (EDF) // Module : KERNEL @@ -26,7 +27,6 @@ #include "basic_port_factory.hxx" #include "Superv_Component_i.hxx" -using namespace std; basic_port_factory::basic_port_factory() { Superv_Component_i::register_factory("BASIC",this); @@ -35,7 +35,7 @@ basic_port_factory::basic_port_factory() { basic_port_factory::~basic_port_factory() {} provides_port * -basic_port_factory::create_data_servant(string type) { +basic_port_factory::create_data_servant(std::string type) { provides_port * rtn_port = NULL; if (type == "short") { rtn_port = new data_short_port_provides(); @@ -44,7 +44,7 @@ basic_port_factory::create_data_servant(string type) { } uses_port * -basic_port_factory::create_data_proxy(string type) { +basic_port_factory::create_data_proxy(std::string type) { uses_port * rtn_port = NULL; if (type == "short") rtn_port = new data_short_port_uses(); diff --git a/src/DSC/DSC_User/Basic/basic_port_factory.hxx b/src/DSC/DSC_User/Basic/basic_port_factory.hxx index 26cb81392..6814a78e0 100644 --- a/src/DSC/DSC_User/Basic/basic_port_factory.hxx +++ b/src/DSC/DSC_User/Basic/basic_port_factory.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : basic_port_factory.hxx // Author : André RIBES (EDF) // Module : KERNEL diff --git a/src/DSC/DSC_User/Basic/data_short_port_provides.cxx b/src/DSC/DSC_User/Basic/data_short_port_provides.cxx index cd6c02f37..620ebf046 100644 --- a/src/DSC/DSC_User/Basic/data_short_port_provides.cxx +++ b/src/DSC/DSC_User/Basic/data_short_port_provides.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : data_short_port_provides.cxx // Author : André RIBES (EDF) // Module : KERNEL @@ -27,12 +28,12 @@ data_short_port_provides::data_short_port_provides() { _val = 0; - short_termine = false; + short_termine = false; short_mutex = new pthread_mutex_t(); pthread_mutex_init(short_mutex, NULL); short_condition = new pthread_cond_t(); pthread_cond_init(short_condition, NULL); - short_termine_cp = true; + short_termine_cp = true; short_mutex_cp = new pthread_mutex_t(); pthread_mutex_init(short_mutex_cp, NULL); short_condition_cp = new pthread_cond_t(); diff --git a/src/DSC/DSC_User/Basic/data_short_port_provides.hxx b/src/DSC/DSC_User/Basic/data_short_port_provides.hxx index 9be2c3dc1..c62db9aba 100644 --- a/src/DSC/DSC_User/Basic/data_short_port_provides.hxx +++ b/src/DSC/DSC_User/Basic/data_short_port_provides.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : data_short_port_provides.hxx // Author : André RIBES (EDF) // Module : KERNEL diff --git a/src/DSC/DSC_User/Basic/data_short_port_uses.cxx b/src/DSC/DSC_User/Basic/data_short_port_uses.cxx index ecc1ca0a2..db92b14b0 100644 --- a/src/DSC/DSC_User/Basic/data_short_port_uses.cxx +++ b/src/DSC/DSC_User/Basic/data_short_port_uses.cxx @@ -1,31 +1,31 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : data_short_port_uses.cxx // Author : André RIBES (EDF) // Module : KERNEL // #include "data_short_port_uses.hxx" #include -using namespace std; data_short_port_uses::data_short_port_uses() { _my_ports = NULL; @@ -43,7 +43,7 @@ data_short_port_uses::put(CORBA::Short data) { // if (!CORBA::is_nil(_my_port)) // _my_port->put(data); if (!_my_ports) - cerr << "data_short_port_uses::put is NULL" << endl; + std::cerr << "data_short_port_uses::put is NULL" << std::endl; else { for(int i = 0; i < _my_ports->length(); i++) @@ -56,11 +56,11 @@ data_short_port_uses::put(CORBA::Short data) { void data_short_port_uses::uses_port_changed(Engines::DSC::uses_port * new_uses_port, - const Engines::DSC::Message message) + const Engines::DSC::Message message) { if (_my_ports) delete _my_ports; - cerr << "data_short_port_uses::uses_port_changed" << endl; + std::cerr << "data_short_port_uses::uses_port_changed" << std::endl; _my_ports = new Engines::DSC::uses_port(*new_uses_port); } diff --git a/src/DSC/DSC_User/Basic/data_short_port_uses.hxx b/src/DSC/DSC_User/Basic/data_short_port_uses.hxx index 682c0480c..25fb93132 100644 --- a/src/DSC/DSC_User/Basic/data_short_port_uses.hxx +++ b/src/DSC/DSC_User/Basic/data_short_port_uses.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : data_short_port_uses.hxx // Author : André RIBES (EDF) // Module : KERNEL @@ -64,7 +65,7 @@ class data_short_port_uses : * \param message message associated to the modification. */ virtual void uses_port_changed(Engines::DSC::uses_port * new_uses_port, - const Engines::DSC::Message message); + const Engines::DSC::Message message); private : Engines::DSC::uses_port * _my_ports; diff --git a/src/DSC/DSC_User/DSC_Exception.hxx b/src/DSC/DSC_User/DSC_Exception.hxx index 09315144d..2f26db16e 100644 --- a/src/DSC/DSC_User/DSC_Exception.hxx +++ b/src/DSC/DSC_User/DSC_Exception.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : DSC_Exception.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -105,9 +106,9 @@ struct DSC_Exception : public SALOME_Exception { // soit utilisable. // Ne pas mettre lineNumber=0 à cause du calcul log dans la SALOME_Exception si fileName est défini DSC_Exception( const std::string & text, - const char *fileName="", - const unsigned int lineNumber=0, - const char *funcName="" ): + const char *fileName="", + const unsigned int lineNumber=0, + const char *funcName="" ): SALOME_Exception(text.c_str()) , _dscText(text), _filefuncName(setFileFuncName(fileName?fileName:"",funcName?funcName:"")), @@ -166,7 +167,7 @@ protected: #define DSC_EXCEPTION(Derived) struct Derived : public DSC_Exception { \ Derived ( const std::string & text, const char *fileName="", const unsigned int lineNumber=0, const char *funcName="" \ - ) : DSC_Exception(text,fileName,lineNumber,funcName) { \ + ) : DSC_Exception(text,fileName,lineNumber,funcName) { \ _exceptionName = #Derived; \ } \ virtual ~Derived(void) throw();\ diff --git a/src/DSC/DSC_User/Datastream/AdjacentFunctor.hxx b/src/DSC/DSC_User/Datastream/AdjacentFunctor.hxx index f53198c76..654e85c71 100644 --- a/src/DSC/DSC_User/Datastream/AdjacentFunctor.hxx +++ b/src/DSC/DSC_User/Datastream/AdjacentFunctor.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : AdjacentFunctor.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -34,6 +35,8 @@ #include "DisplayPair.hxx" // +//#define MYDEBUG + // Suppose que le container est trié template < typename T > struct AdjacentFunctor { @@ -45,19 +48,19 @@ template < typename T > struct AdjacentFunctor { bool _minFound,_maxFound,_equal; AdjacentFunctor(const T& value):_minValue(value),_maxValue(value), - _minFound(false),_maxFound(false), - _equal(false) {} + _minFound(false),_maxFound(false), + _equal(false) {} // Suppose que les valeurs passées en paramètres sont triées par ordre croissant bool operator()(const T &v1) { -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "AdjacentFunctor: " << _minValue << _maxValue << std::endl; std::cout << "AdjacentFunctor: " << _min << _max << std::endl; #endif if ( v1 <= _minValue && v1 >= _maxValue) { _equal= true; -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "AdjacentFunctor: _equal : " << v1 << std::endl; #endif return true; @@ -65,14 +68,14 @@ template < typename T > struct AdjacentFunctor { if ( v1 < _minValue ) { _min=v1;_minFound=true; -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "AdjacentFunctor: _minFound : " <<_min << std::endl; #endif } else if ( v1 > _maxValue ) { _max=v1;_maxFound=true; -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "AdjacentFunctor: _maxFound : " <<_max << std::endl; #endif } @@ -101,7 +104,7 @@ template < typename T > struct AdjacentFunctor { bool isEqual() const { return _equal;} bool isBounded() const { return _minFound && _maxFound;} bool getBounds(TNoConst & min, TNoConst & max) const { -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "_minFound : " <<_minFound << ", _maxFound " << _maxFound << std::endl; #endif if (_minFound && _maxFound ) { min=_min; max=_max; return true; } diff --git a/src/DSC/DSC_User/Datastream/AdjacentPredicate.hxx b/src/DSC/DSC_User/Datastream/AdjacentPredicate.hxx index fd24b4c48..53bfc0a1e 100644 --- a/src/DSC/DSC_User/Datastream/AdjacentPredicate.hxx +++ b/src/DSC/DSC_User/Datastream/AdjacentPredicate.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : AdjacentPredicate.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -47,14 +48,14 @@ struct AdjacentPredicate : public std::binary_function < T, T, bool > template struct AdjacentPredicate< std::pair, T3 > > : public std::binary_function < std::pair, T3 >, - std::pair, T3 >, bool > + std::pair, T3 >, bool > { std::pair _value; AdjacentPredicate(const std::pair & value):_value(value){ std::cout << "1-Initializing with value " << _value << std::endl; } bool operator()( const std::pair, T3 > & v1, - const std::pair, T3 > v2) const { + const std::pair, T3 > v2) const { std::cout << "1-> :" << v1 << "," << v2 << " " << std::endl; return (v1.first <= _value ) && (_value < v2.first) ; } diff --git a/src/DSC/DSC_User/Datastream/Calcium/Calcium.c b/src/DSC/DSC_User/Datastream/Calcium/Calcium.c deleted file mode 100644 index 94d41020e..000000000 --- a/src/DSC/DSC_User/Datastream/Calcium/Calcium.c +++ /dev/null @@ -1,274 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -// File : Calcium.c -// Author : Eric Fayolle (EDF) -// Module : KERNEL - -#include "calcium.h" -#include -#include -#include - -// Interface C de SalomeCalcium - -typedef int InfoType; -typedef char bool; - -/************************************/ -/* INTERFACES DE LECTURE EN 0 COPIE */ -/************************************/ - -/* Definition des méthodes calcium étendues en 0 copie */ -/* Le buffer est alloué par le port pas par l'utilisateur */ -/* Remarquer le type ** de data */ -/* L'utilisateur devra appeler ecp_..._free pour désallouer le buffer interne */ -/* Attention en cas de lectures multiples : le buffer retourné est le même */ -/* Attention si les niveaux sont actifs le buffer peut être supprimé automatiquement par calcium. */ - -#define CALCIUM_EXT_LECT_INTERFACE_C_(_name,_timeType,_type,_typeName,_qual) \ - InfoType ecp_##_name (void * component, int mode, \ - _timeType * ti, _timeType * tf, int * i, \ - char * nomvar, int bufferLength, \ - int * nRead, _type _qual ** data ) { \ - size_t _nRead; \ - long _i=*i; \ - fflush(stdout); \ - fflush(stderr); \ - fprintf(stderr,"Beginning of ecp_" #_name " : %s %d %f\n",nomvar,*i,*ti); \ - \ - \ - InfoType info = ecp_lecture_##_typeName (component, mode, ti, tf, &_i, \ - nomvar, bufferLength, &_nRead, \ - data ); \ - /* std::cout << "-------- CalciumInterface(C Part), Valeur de data : " << std::endl; */ \ - /* std::cout << "Ptr :" << *data << std::endl; */ \ - /* for (int j=0; j<_nRead;++j) */ \ - /* printf("--- Valeur de data[%d] : %d \n",j,(*data)[j]); */ \ - /* std::cout << "Ptr :" << *data << std::endl; */ \ - /* */ \ - /* std::cerr << "-------- CalciumInterface(C Part) MARK 2 ------------------" << std::endl; */ \ - if(mode == CP_SEQUENTIEL) \ - *i = _i; \ - *nRead=_nRead; \ - /* std::cerr << "-------- CalciumInterface(C Part) MARK 3 ------------------" << std::endl; */ \ - \ - return info; \ - }; \ - void ecp_##_name##_free ( _type _qual * data) { \ - ecp_lecture_##_typeName##_free(data); \ - }; - -#define STAR * -CALCIUM_EXT_LECT_INTERFACE_C_(len,float,int,int,); -CALCIUM_EXT_LECT_INTERFACE_C_(lre,float,float,float,); -CALCIUM_EXT_LECT_INTERFACE_C_(ldb,double,double,double,); -CALCIUM_EXT_LECT_INTERFACE_C_(llo,float,int,bool,); -CALCIUM_EXT_LECT_INTERFACE_C_(lcp,float,float,cplx,); -/* CALCIUM_EXT_LECT_INTERFACE_C_(lch,float,char,STAR[]); */ - -/* L'interface de cette routine diffère de celle obtenue par la macro : - CALCIUM_LECT_INTERFACE_C_. - Le paramètre supplémentaire strSize indique la taille fixe et identique - des chaînes stockées dans data (les ports CALCIUM n'en n'ont pas besoin) -*/ -InfoType ecp_lch(void * component, int mode, float * ti, float * tf, int * i, - char * nomvar, int bufferLength, int * nRead, - char *** data, int strSize) { - - size_t _nRead; - long _i=*i; - fflush(stdout);fflush(stderr); - fprintf(stderr,"Beginning of cp_lch: %s %d %f\n",nomvar,*i,*ti); - - - InfoType info = ecp_lecture_str (component, mode, ti, tf, &_i, - nomvar, bufferLength, &_nRead, - data);/*, strSize ); - strSize est inutile pour les ports CALCIUM - qui gèrent des tailles quelconques de chaines. */ - if(mode == CP_SEQUENTIEL) - *i = _i; - *nRead=_nRead; - fprintf(stderr,"End of cp_lch: %s %d \n",nomvar,*i); - fflush(stdout);fflush(stderr); - - return info; -}; - -void ecp_lch_free (char* * data) { \ - ecp_lecture_str_free(data); \ -}; - - -/**************************************/ -/* INTERFACES DE LECTURE AVEC RECOPIE */ -/**************************************/ - -#define CALCIUM_LECT_INTERFACE_C_(_name,_timeType,_type,_typeName,_qual) \ - InfoType cp_##_name (void * component, int mode, \ - _timeType * ti, _timeType * tf, int * i, \ - char * nomvar, int bufferLength, \ - int * nRead, _type _qual * data ) { \ - size_t _nRead; \ - long _i=*i; \ - fflush(stdout); \ - fflush(stderr); \ - fprintf(stderr,"Beginning of cp_" #_name " : %s %d %f\n",nomvar,*i,*ti); \ - \ - if ( (data == NULL) || (bufferLength < 1) ) return CPNTNULL; \ - \ - InfoType info = ecp_lecture_##_typeName (component, mode, ti, tf, &_i, \ - nomvar, bufferLength, &_nRead, \ - &data ); \ - if(mode == CP_SEQUENTIEL) \ - *i = _i; \ - *nRead=_nRead; \ - fprintf(stderr,"End of cp_" #_name " : %s %d \n",nomvar,*i); \ - fflush(stdout); \ - fflush(stderr); \ - \ - return info; \ - }; \ - void cp_##_name##_free ( _type _qual * data) { \ - ecp_lecture_##_typeName##_free(data); \ - }; - - -/* L'interface de cette routine diffère de celle obtenue par la macro : - CALCIUM_LECT_INTERFACE_C_. - Le paramètre supplémentaire strSize indique la taille fixe et identique - des chaînes stockées dans data (les ports CALCIUM n'en n'ont pas besoin) -*/ -InfoType cp_lch(void * component, int mode, float * ti, float * tf, int * i, - char * nomvar, int bufferLength, int * nRead, - char ** data, int strSize) { - - size_t _nRead; - long _i=*i; - fflush(stdout);fflush(stderr); - fprintf(stderr,"Beginning of cp_lch: %s %d %f\n",nomvar,*i,*ti); - - if ( (data == NULL) || (bufferLength < 1) ) return CPNTNULL; - - InfoType info = ecp_lecture_str (component, mode, ti, tf, &_i, - nomvar, bufferLength, &_nRead, - &data);/*, strSize ); - strSize est inutile pour les ports CALCIUM - qui gèrent des tailles quelconques de chaines. */ - if(mode == CP_SEQUENTIEL) - *i = _i; - *nRead=_nRead; - fprintf(stderr,"End of cp_lch: %s %d \n",nomvar,*i); - fflush(stdout);fflush(stderr); - - return info; -}; - - -/* Definition des méthodes calcium standard */ - -CALCIUM_LECT_INTERFACE_C_(len,float,int,int,); -CALCIUM_LECT_INTERFACE_C_(lre,float,float,float,); -CALCIUM_LECT_INTERFACE_C_(ldb,double,double,double,); -CALCIUM_LECT_INTERFACE_C_(llo,float,int,bool,); -CALCIUM_LECT_INTERFACE_C_(lcp,float,float,cplx,); -#define STAR * -/* CALCIUM_LECT_INTERFACE_C_(lch,float,char,STAR); */ - - - -/**********************************************/ -/* INTERFACES DE DÉBUT ET DE FIN DE COUPLAGE */ -/**********************************************/ - -InfoType cp_cd (void * component, char * instanceName) { - /* TODO : Trouver le nom de l'instance SALOME*/ - if (instanceName) strcpy(instanceName,"UNDEFINED"); - return CPOK; -} -InfoType cp_fin (void * component, int code) { - /* TODO : gérer avec les callbacks des ports DSC */ - - InfoType info = ecp_fin_(component,code); - - return info; -} - - - -/***************************/ -/* INTERFACES D'ECRITURE */ -/***************************/ - -#define CALCIUM_ECR_INTERFACE_C_(_name,_timeType,_type,_typeName,_qual) \ - InfoType cp_##_name (void * component, int mode, \ - _timeType t, int i, \ - char * nomvar, int nbelem, \ - _type _qual * data ) { \ - \ - /*long _i=i;*/ \ - fflush(stdout); \ - fflush(stderr); \ - fprintf(stderr,"Beginning of cp_" #_name " : %s %d %f\n",nomvar,i,t); \ - if ( (data == NULL) || (nbelem < 1) ) return CPNTNULL; \ - \ - InfoType info = ecp_ecriture_##_typeName (component, mode, &t, i, \ - nomvar, nbelem, \ - data ); \ - fprintf(stderr,"End of cp_" #_name " : %s %d \n",nomvar,i); \ - fflush(stdout); \ - fflush(stderr); \ - \ - return info; \ - }; \ - - -/* Definition des méthodes calcium standard */ - -CALCIUM_ECR_INTERFACE_C_(een,float,int,int,); -CALCIUM_ECR_INTERFACE_C_(ere,float,float,float,); -CALCIUM_ECR_INTERFACE_C_(edb,double,double,double,); -/*CALCIUM_ECR_INTERFACE_C_(elo,float,bool,bool,);*/ -CALCIUM_ECR_INTERFACE_C_(elo,float,int,bool,); -CALCIUM_ECR_INTERFACE_C_(ecp,float,float,cplx,); - - -InfoType cp_ech(void * component, int mode, float t, int i, - char * nomvar, int nbelem, - char ** data, int strSize) { - - /*long _i=i;*/ - fflush(stdout);fflush(stderr); - fprintf(stderr,"Beginning of cp_ech: %s %d %f\n",nomvar,i,t); - if ( (data == NULL) || (nbelem < 1) ) return CPNTNULL; - - InfoType info = ecp_ecriture_str (component, mode, &t, i, - nomvar, nbelem, - data);/*, strSize );*/ - fprintf(stderr,"End of cp_ech: %s %d \n",nomvar,i); - fflush(stdout); - fflush(stderr); - - return info; -}; - - diff --git a/src/DSC/DSC_User/Datastream/Calcium/Calcium.cxx b/src/DSC/DSC_User/Datastream/Calcium/Calcium.cxx index eec2ea22f..17278634b 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/Calcium.cxx +++ b/src/DSC/DSC_User/Datastream/Calcium/Calcium.cxx @@ -1,32 +1,30 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "Calcium.hxx" #include "CalciumInterface.hxx" #include "calcium.h" #include +#include #include #include - -//#define _DEBUG_ +#include PySupervCompo::PySupervCompo( CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, @@ -43,8 +41,11 @@ PySupervCompo::~PySupervCompo() } -extern "C" +extern "C" { + void cp_exit(int); + void setDependency(provides_port*, char*, CalciumTypes::DependencyType); + void cp_exit(int err) { throw CalciumException(err,LOC("Abort coupling")); @@ -64,6 +65,10 @@ extern "C" { dynamic_cast(port)->setDependencyType(depend); } + else if(std::string(type)=="CALCIUM_long") + { + dynamic_cast(port)->setDependencyType(depend); + } else if(std::string(type)=="CALCIUM_string") { dynamic_cast(port)->setDependencyType(depend); @@ -84,9 +89,11 @@ extern "C" void create_calcium_port(Superv_Component_i* compo,char* name,char* type,char *mode,char* depend) { -#ifdef _DEBUG_ - std::cerr << "create_calcium_port: " << name << " " << type << " " << mode << " " << depend << std::endl; -#endif + std::stringstream msg; + msg << type << " " << mode << " " << depend; + CORBA::String_var componentName=compo->instanceName(); + std::string containerName=compo->getContainerName(); + Engines_DSC_interface::writeEvent("create_calcium_port",containerName,componentName,name,"",msg.str().c_str()); if(std::string(mode) == "IN") { @@ -142,6 +149,33 @@ extern "C" } } + char** create_multiple_calcium_port(Superv_Component_i* compo,char* name,char* type,char *mode,char* depend, int number) + { + if (number <= 0) + { + std::cerr << "Cannot create a multiple calcium port with number <= 0, value is " << number << std::endl; + return NULL; + } + char** names = new char*[number]; + for (int i = 0; i < number; i++) + { + std::ostringstream new_name; + new_name << name << "_" << i; + std::string cpp_name = new_name.str(); + char * c_name = new char [cpp_name.size()+1]; + strcpy(c_name, cpp_name.c_str()); + names[i] = c_name; + } + + // Create ports + for (int i = 0; i < number; i++) + { + create_calcium_port(compo, (char*)std::string(names[i]).c_str(), type, mode, depend); + } + + return names; + } + } diff --git a/src/DSC/DSC_User/Datastream/Calcium/Calcium.hxx b/src/DSC/DSC_User/Datastream/Calcium/Calcium.hxx index 140d28f74..c9f1d4752 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/Calcium.hxx +++ b/src/DSC/DSC_User/Datastream/Calcium/Calcium.hxx @@ -1,26 +1,23 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "Superv_Component_i.hxx" -#include "calcium_port_factory.hxx" class PySupervCompo:public Superv_Component_i { @@ -33,7 +30,15 @@ class PySupervCompo:public Superv_Component_i bool notif = false); virtual ~PySupervCompo(); CORBA::Boolean init_service(const char * service_name){return true;}; + CORBA::Boolean init_service_with_multiple(const char* service_name, + const Engines::Superv_Component::seq_multiple_param & params) + { + return true; + } }; extern "C" void create_calcium_port(Superv_Component_i* compo,char* name,char* type,char *mode,char* depend); + +// This method permits to help a service developer to create multiple calcium ports +extern "C" char** create_multiple_calcium_port(Superv_Component_i* compo,char* name,char* type,char *mode,char* depend, int number); diff --git a/src/DSC/DSC_User/Datastream/Calcium/CalciumC.c b/src/DSC/DSC_User/Datastream/Calcium/CalciumC.c new file mode 100644 index 000000000..24a766e73 --- /dev/null +++ b/src/DSC/DSC_User/Datastream/Calcium/CalciumC.c @@ -0,0 +1,357 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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 +// + +// File : Calcium.c +// Author : Eric Fayolle (EDF) +// Module : KERNEL +// +#include "calcium.h" +#include "calciumf.h" +#include "CalciumFortranInt.h" +#include +#include +#include +#include + +// Interface C de SalomeCalcium + +typedef int InfoType; +typedef char bool; + +//TODO: ajouter les prototypes pour eviter les pbs de passage par valeur +InfoType ecp_fint_ (void * component, char* nomVar, float t); +InfoType ecp_fini_ (void * component, char* nomVar, int i); +InfoType ecp_efft_ (void * component, char* nomVar, float t); +InfoType ecp_effi_ (void * component, char* nomVar, int i); + +/************************************/ +/* INTERFACES DE LECTURE EN 0 COPIE */ +/************************************/ + +/* Definition des méthodes calcium étendues en 0 copie */ +/* Le buffer est alloué par le port pas par l'utilisateur */ +/* Remarquer le type ** de data */ +/* L'utilisateur devra appeler ecp_..._free pour désallouer le buffer interne */ +/* Attention en cas de lectures multiples : le buffer retourné est le même */ +/* Attention si les niveaux sont actifs le buffer peut être supprimé automatiquement par calcium. */ + +#define CALCIUM_EXT_LECT_INTERFACE_C_(_name,_timeType,_type,_typeName,_qual) \ + InfoType ecp_##_name (void * component, int mode, \ + _timeType * ti, _timeType * tf, int * i, \ + char * nomvar, int bufferLength, \ + int * nRead, _type _qual ** data ) { \ + size_t _nRead; \ + long _i=*i; \ + fflush(stdout); \ + fflush(stderr); \ + \ + InfoType info = ecp_lecture_##_typeName (component, mode, ti, tf, &_i, \ + nomvar, bufferLength, &_nRead, \ + data ); \ + /* std::cout << "-------- CalciumInterface(C Part), Valeur de data : " << std::endl; */ \ + /* std::cout << "Ptr :" << *data << std::endl; */ \ + /* for (int j=0; j<_nRead;++j) */ \ + /* printf("--- Valeur de data[%d] : %d \n",j,(*data)[j]); */ \ + /* std::cout << "Ptr :" << *data << std::endl; */ \ + /* */ \ + /* std::cerr << "-------- CalciumInterface(C Part) MARK 2 ------------------" << std::endl; */ \ + if(mode == CP_SEQUENTIEL) \ + *i = _i; \ + *nRead=_nRead; \ + /* std::cerr << "-------- CalciumInterface(C Part) MARK 3 ------------------" << std::endl; */ \ + \ + return info; \ + }; \ + void ecp_##_name##_free ( _type _qual * data) { \ + ecp_lecture_##_typeName##_free(data); \ + }; + + +/* L'interface de cette routine diffère de celle obtenue par la macro : + CALCIUM_LECT_INTERFACE_C_. + Le paramètre supplémentaire strSize indique la taille fixe et identique + des chaînes stockées dans data (les ports CALCIUM n'en n'ont pas besoin) +*/ +InfoType ecp_lch(void * component, int mode, float * ti, float * tf, int * i, + char * nomvar, int bufferLength, int * nRead, + char *** data, int strSize) { + + size_t _nRead; + long _i=*i; + fflush(stdout);fflush(stderr); + + InfoType info = ecp_lecture_str (component, mode, ti, tf, &_i, + nomvar, bufferLength, &_nRead, + data);/*, strSize ); + strSize est inutile pour les ports CALCIUM + qui gèrent des tailles quelconques de chaines. */ + if(mode == CP_SEQUENTIEL) + *i = _i; + *nRead=_nRead; + fflush(stdout);fflush(stderr); + return info; +}; + +void ecp_lch_free (char* * data) { \ + ecp_lecture_str_free(data); \ +}; + + +#define STAR * +/*REVERIFIER MAINTENANT 0 COPY avec int2integer*/ +CALCIUM_EXT_LECT_INTERFACE_C_(len,float,int,int2integer,); +CALCIUM_EXT_LECT_INTERFACE_C_(lre,float,float,float,); +CALCIUM_EXT_LECT_INTERFACE_C_(ldb,double,double,double,); +CALCIUM_EXT_LECT_INTERFACE_C_(llo,float,int,bool,); +CALCIUM_EXT_LECT_INTERFACE_C_(lcp,float,float,cplx,); +/* CALCIUM_EXT_LECT_INTERFACE_C_(lch,float,char,STAR[]); */ + + +/**************************************/ +/* INTERFACES DE LECTURE AVEC RECOPIE */ +/**************************************/ + +#define CALCIUM_LECT_INTERFACE_C_(_name,_timeType,_calInt,_type,_typeName,_qual,lastarg) \ + _calInt cp_##_name (void * component, _calInt mode, \ + _timeType * ti, _timeType * tf, _calInt * i, \ + char * nomvar, _calInt bufferLength, \ + _calInt * nRead, _type _qual * data \ + lastarg ) { \ + \ + int _mode = (int) mode; \ + size_t _bufferLength = bufferLength; \ + size_t _nRead; \ + long _i =*i; \ + fflush(stdout); \ + fflush(stderr); \ + \ + if ( (data == NULL) || (_bufferLength < 1) ) return CPNTNULL; \ + \ + _calInt info = ecp_lecture_##_typeName (component, _mode, ti, tf, &_i, \ + nomvar, _bufferLength, &_nRead, \ + &data ); \ + if(mode == CP_SEQUENTIEL) \ + *i = _i; \ + *nRead=_nRead; \ + fflush(stdout); \ + fflush(stderr); \ + \ + return info; \ + }; \ + void cp_##_name##_free ( _type _qual * data) { \ + ecp_lecture_##_typeName##_free(data); \ + }; + + +/* L'interface de cette routine diffère de celle obtenue par la macro : + CALCIUM_LECT_INTERFACE_C_. + Le paramètre supplémentaire strSize indique la taille fixe et identique + des chaînes stockées dans data (les ports CALCIUM n'en n'ont pas besoin) +*/ + +/* InfoType cp_lch(void * component, int mode, float * ti, float * tf, int * i, */ +/* char * nomvar, int bufferLength, int * nRead, */ +/* char ** data, int strSize) { */ + +/* size_t _nRead; */ +/* long _i=*i; */ +/* fflush(stdout);fflush(stderr); */ +/* fprintf(stderr,"Beginning of cp_lch: %s %d %f\n",nomvar,*i,*ti); */ +/* if ( (data == NULL) || (bufferLength < 1) ) return CPNTNULL; */ +/* InfoType info = ecp_lecture_str (component, mode, ti, tf, &_i, */ +/* nomvar, bufferLength, &_nRead, */ +/* &data);*/ +/*, strSize ); */ +/* strSize est inutile pour les ports CALCIUM */ +/* qui gèrent des tailles quelconques de chaines. */ +/* if(mode == CP_SEQUENTIEL) */ +/* *i = _i; */ +/* *nRead=_nRead; */ +/* fprintf(stderr,"End of cp_lch: %s %d \n",nomvar,*i); */ +/* fflush(stdout);fflush(stderr); */ +/* return info; */ +/* }; */ + + +/* Definition des méthodes calcium standard */ +/* CALCIUM_LECT_INTERFACE_C_( , , , + , , ,)*/ + +CALCIUM_LECT_INTERFACE_C_(len,float ,int,int ,int2integer,,); +/*llg ne fonctionnera pas toujours correctement (port calcium_integer) si sizeof(long) == 64 bits && cal_int==int (32 bits) + sinon problème de conversion de 64bits vers 32bits */ +CALCIUM_LECT_INTERFACE_C_(llg,float ,int,long ,long2integer,,); + +CALCIUM_LECT_INTERFACE_C_(lln,float ,int,long ,long,,); + +CALCIUM_LECT_INTERFACE_C_(lre,float ,int,float ,float,,); +CALCIUM_LECT_INTERFACE_C_(ldb,double,int,double ,double,,); +CALCIUM_LECT_INTERFACE_C_(llo,float ,int,int ,bool,,); +CALCIUM_LECT_INTERFACE_C_(lcp,float ,int,float ,cplx,,); +#define STAR * +#define LCH_LAST_PARAM ,int strsize +CALCIUM_LECT_INTERFACE_C_(lch,float ,int,char ,str,STAR, LCH_LAST_PARAM ); + + +/* Definition des méthodes calcium destinées à l'interfaçage fortran + avec une taille des INTEGER fortran paramétrés à la configuration du KERNEL */ + +CALCIUM_LECT_INTERFACE_C_(len_fort_,float ,cal_int,cal_int ,integer,,); +CALCIUM_LECT_INTERFACE_C_(lin_fort_,float ,cal_int,int ,int2integer,,); +/*llg_fort_ ne fonctionnera pas toujours correctement (port calcium_integer) si sizeof(long) == 64 bits && cal_int==int (32 bits) + sinon problème de conversion de 64bits vers 32bits */ +CALCIUM_LECT_INTERFACE_C_(llg_fort_,float ,cal_int,long ,long2integer,,); + +CALCIUM_LECT_INTERFACE_C_(lre_fort_,float ,cal_int,float ,float,,); +CALCIUM_LECT_INTERFACE_C_(ldb_fort_,double,cal_int,double ,double,,); +CALCIUM_LECT_INTERFACE_C_(llo_fort_,float ,cal_int,int ,bool,,); /*int pour bool ou cal_int */ +CALCIUM_LECT_INTERFACE_C_(lcp_fort_,float ,cal_int,float ,cplx,,); +CALCIUM_LECT_INTERFACE_C_(lch_fort_,float ,cal_int,char ,str,STAR, LCH_LAST_PARAM ); + +CALCIUM_LECT_INTERFACE_C_(lln_fort_,float ,cal_int,long ,long,,); + +/**********************************************/ +/* INTERFACES DE DÉBUT ET DE FIN DE COUPLAGE */ +/**********************************************/ + +InfoType cp_cd (void * component, char * instanceName) { + InfoType info = ecp_cd_(component,instanceName); + return info; +} + +InfoType cp_fin (void * component, int code) { + /* TODO : gérer avec les callbacks des ports DSC */ + + InfoType info = ecp_fin_(component,code); + + return info; +} + + +/***************************/ +/* INTERFACES D'ECRITURE */ +/***************************/ + +#define CALCIUM_ECR_INTERFACE_C_(_name,_timeType,_calInt,_type,_typeName,_qual,lastarg) \ + _calInt cp_##_name (void * component, _calInt mode, \ + _timeType t, _calInt i, \ + char * nomvar, _calInt nbelem, \ + _type _qual * data \ + lastarg ) { \ + \ + int _mode = mode; \ + long _i = i; \ + size_t _nbelem = nbelem; \ + _timeType _t = t; \ + fflush(stdout); \ + fflush(stderr); \ + if ( (data == NULL) || (nbelem < 1) ) return CPNTNULL; \ + \ + _calInt info = ecp_ecriture_##_typeName (component, _mode, &_t, _i, \ + nomvar, _nbelem, \ + data ); \ + fflush(stdout); \ + fflush(stderr); \ + \ + return info; \ + }; \ + + + + +/* InfoType cp_ech(void * component, int mode, float t, int i, */ +/* char * nomvar, int nbelem, */ +/* char ** data, int strSize) { */ + +/*long _i=i;*/ +/* fflush(stdout);fflush(stderr); */ +/* fprintf(stderr,"Beginning of cp_ech: %s %d %f\n",nomvar,i,t); */ +/* if ( (data == NULL) || (nbelem < 1) ) return CPNTNULL; */ + +/* InfoType info = ecp_ecriture_str (component, mode, &t, i, */ +/* nomvar, nbelem, */ +/* data); */ +/*, strSize );*/ +/* fprintf(stderr,"End of cp_ech: %s %d \n",nomvar,i); */ +/* fflush(stdout); */ +/* fflush(stderr); */ + +/* return info; */ +/* }; */ + +/* Definition des méthodes calcium standard */ +/* CALCIUM_ECR_INTERFACE_C_(_name,_timeType,_calInt,type,_typeName,_qual) */ +CALCIUM_ECR_INTERFACE_C_(een,float ,int,int ,int2integer,,); +/*elg ne fonctionnera pas toujours correctement (port calcium_integer) si sizeof(long) == 64 bits && cal_int==int (32 bits) + sinon problème de conversion de 64bits vers 32bits */ +CALCIUM_ECR_INTERFACE_C_(elg,float ,int,long ,long2integer,,); +CALCIUM_ECR_INTERFACE_C_(ere,float ,int,float ,float,,); +CALCIUM_ECR_INTERFACE_C_(edb,double,int,double,double,,); +CALCIUM_ECR_INTERFACE_C_(elo,float ,int,int ,bool,,); +CALCIUM_ECR_INTERFACE_C_(ecp,float ,int,float ,cplx,,); +CALCIUM_ECR_INTERFACE_C_(ech,float ,int,char ,str,STAR,LCH_LAST_PARAM ); + +CALCIUM_ECR_INTERFACE_C_(eln,float ,int,long ,long,,); + +/* Definition des méthodes calcium destinées à l'interfaçage fortran + avec une taille des INTEGER fortran paramétrés à la configuration du KERNEL */ + +CALCIUM_ECR_INTERFACE_C_(een_fort_,float ,cal_int,cal_int,integer,,); +/*elg_fort_ ne fonctionnera pas toujours correctement (port calcium_integer) si sizeof(long) == 64 bits && cal_int==int (32 bits) + sinon problème de conversion de 64bits vers 32bits */ +CALCIUM_ECR_INTERFACE_C_(elg_fort_,float ,cal_int,long ,long2integer,,); +CALCIUM_ECR_INTERFACE_C_(ein_fort_,float ,cal_int,int ,int2integer,,); +CALCIUM_ECR_INTERFACE_C_(ere_fort_,float ,cal_int,float ,float,,); +CALCIUM_ECR_INTERFACE_C_(edb_fort_,double,cal_int,double,double,,); +CALCIUM_ECR_INTERFACE_C_(elo_fort_,float ,cal_int,int ,bool,,); +CALCIUM_ECR_INTERFACE_C_(ecp_fort_,float ,cal_int,float ,cplx,,); +CALCIUM_ECR_INTERFACE_C_(ech_fort_,float ,cal_int,char ,str,STAR,LCH_LAST_PARAM ); + +CALCIUM_ECR_INTERFACE_C_(eln_fort_,float ,cal_int,long ,long,,); + +/***************************/ +/* Interface for cleaning */ +/***************************/ + +InfoType cp_fini (void * component, char * nomvar, int i) +{ + InfoType info = ecp_fini_(component,nomvar,i); + return info; +} + +InfoType cp_fint (void * component, char * nomvar, float t) +{ + InfoType info = ecp_fint_(component,nomvar,t); + return info; +} + +InfoType cp_effi (void * component, char * nomvar, int i) +{ + InfoType info = ecp_effi_(component,nomvar,i); + return info; +} + +InfoType cp_efft (void * component, char * nomvar, float t) +{ + InfoType info = ecp_efft_(component,nomvar,t); + return info; +} diff --git a/src/DSC/DSC_User/Datastream/Calcium/CalciumCInterface.cxx b/src/DSC/DSC_User/Datastream/Calcium/CalciumCInterface.cxx new file mode 100644 index 000000000..a9974edcf --- /dev/null +++ b/src/DSC/DSC_User/Datastream/Calcium/CalciumCInterface.cxx @@ -0,0 +1,241 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +#include "CalciumCInterface.hxx" +#include "CalciumCxxInterface.hxx" + +#include + + +//#define MYDEBUG +#ifdef MYDEBUG +#define DEBTRACE(msg) {std::cerr<(component); + + bool provideLastGivenValue = false; + if (code == CalciumTypes::CP_CONT ) provideLastGivenValue = true; + + try { + CalciumInterface::ecp_fin( *_component, + provideLastGivenValue); + } catch ( const CalciumException & ex) { //tester l'arrêt par exception + DEBTRACE( ex.what() ); + return ex.getInfo(); + } + return CalciumTypes::CPOK; +}; + +extern "C" CalciumTypes::InfoType +ecp_cd_ (void * component, char * instanceName) { + Superv_Component_i * _component = static_cast(component); + std::string name; + CalciumInterface::ecp_cd( *_component,name); + strcpy(instanceName,name.c_str()); + return CalciumTypes::CPOK; +} + +// Interface for cleaning +extern "C" CalciumTypes::InfoType +ecp_fini_ (void * component, char* nomvar, int i) +{ + Superv_Component_i * _component = static_cast(component); + try + { + CalciumInterface::ecp_fini( *_component,nomvar,i); + } + catch ( const CalciumException & ex) + { + DEBTRACE( ex.what() ); + return ex.getInfo(); + } + return CalciumTypes::CPOK; + +} + +extern "C" CalciumTypes::InfoType +ecp_fint_ (void * component, char* nomvar, float t) +{ + Superv_Component_i * _component = static_cast(component); + try + { + CalciumInterface::ecp_fint( *_component,nomvar,t); + } + catch ( const CalciumException & ex) + { + DEBTRACE( ex.what() ); + return ex.getInfo(); + } + return CalciumTypes::CPOK; +} + +extern "C" CalciumTypes::InfoType +ecp_effi_ (void * component, char* nomvar, int i) +{ + Superv_Component_i * _component = static_cast(component); + try + { + CalciumInterface::ecp_effi( *_component,nomvar,i); + } + catch ( const CalciumException & ex) + { + DEBTRACE( ex.what() ); + return ex.getInfo(); + } + return CalciumTypes::CPOK; + +} + +extern "C" CalciumTypes::InfoType +ecp_efft_ (void * component, char* nomvar, float t) +{ + Superv_Component_i * _component = static_cast(component); + try + { + CalciumInterface::ecp_efft( *_component,nomvar,t); + } + catch ( const CalciumException & ex) + { + DEBTRACE( ex.what() ); + return ex.getInfo(); + } + return CalciumTypes::CPOK; +} + +// INTERFACE C/CPP pour les chaines de caractères +// Le paramètre supplémentaire strsize n'étant pas utilisé +// j'utilise la génération par la macro CALCIUM_C2CPP_INTERFACE_(str,char*,); +// extern "C" CalciumTypes::InfoType ecp_lecture_str (void * component, int dependencyType, +// float * ti, float * tf, long * i, +// const char * const nomvar, size_t bufferLength, +// size_t * nRead, char ** *data, size_t strsize ) { + +// Superv_Component_i * _component = static_cast(component); +// double _ti=*ti; +// double _tf=*tf; +// size_t _nRead=0; +// size_t _bufferLength=bufferLength; +// CalciumTypes::DependencyType dependencyType= +// static_cast(dependencyType); + +// // - GERER POINTEUR NULL : NOTHING TODO +// // - VERIFIER LA TAILLE DES CHAINES RETOURNEES (ELLES DEVRAIENT ETRES CORRECTES SI L'ECRITURE EST BIEN CODEE.) + +// DEBTRACE( "-------- CalciumInterface(lecture Inter Part) MARK 1 ------------------" ) +// try { +// CalciumInterface::ecp_lecture< char*, char* >( *_component, +// dependencyType, +// _ti, _tf, *i, +// nomvar, +// _bufferLength, _nRead, *data); +// } catch ( const CalciumException & ex) { +// DEBTRACE( ex.what() ); +// return ex.getInfo(); +// } + +// *nRead = _nRead; + +// if (dependencyType == CalciumTypes::CP_SEQUENTIEL ) +// *ti=(float)(_ti); + +// DEBTRACE( "-------- CalciumInterface(lecture Inter Part), Data Ptr :" << *data ) ; + +// return CalciumTypes::CPOK; +// }; + + +// extern "C" void ecp_lecture_str_free (char** data) { +// CalciumInterface::ecp_free< char*, char* >(data); +// }; + + +// extern "C" CalciumTypes::InfoType ecp_ecriture_str (void * component, int dependencyType, +// float *t, long i, +// const char * const nomvar, size_t bufferLength, +// char ** data, int strsize ) { + +// Superv_Component_i * _component = static_cast(component); +// /* Je ne sais pas pourquoi, je n'arrive pas à passer t par valeur : corruption de la pile*/ +// double _t=*t; +// size_t _bufferLength=bufferLength; + +// // - VERIFIER LA TAILLE DES CHAINES RETOURNEES (ELLES DEVRAIENT ETRES CORRECTES SI L'ECRITURE EST BIEN CODEE.) + +// DEBTRACE( "-------- CalciumInterface(ecriture Inter Part) MARK 1 ------------------" ) +// try { +// std::string essai(nomvar); +// DEBTRACE( "----------->-" << nomvar ) +// CalciumInterface::ecp_ecriture< char*, char* >( *_component, +// static_cast(dependencyType), +// _t,i,nomvar,_bufferLength,*data); +// } catch ( const CalciumException & ex) { +// std::cerr << ex.what() << std::endl; +// return ex.getInfo(); +// } +// DEBTRACE( "-------- CalciumInterface(ecriture Inter Part), Valeur de data :" << data ) +// return CalciumTypes::CPOK; +// }; diff --git a/src/DSC/DSC_User/Datastream/Calcium/CalciumCInterface.hxx b/src/DSC/DSC_User/Datastream/Calcium/CalciumCInterface.hxx new file mode 100644 index 000000000..e6eca1ae3 --- /dev/null +++ b/src/DSC/DSC_User/Datastream/Calcium/CalciumCInterface.hxx @@ -0,0 +1,96 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +/* + File : CalciumInterface.hxx + Author : Eric Fayolle (EDF) + Module : KERNEL + Modified by : $LastChangedBy$ + Date : $LastChangedDate: 2007-03-01 13:27:58 +0100 (jeu, 01 mar 2007) $ + Id : $Id$ +*/ +#ifndef _CALCIUM_C_INTERFACE_H_ +#define _CALCIUM_C_INTERFACE_H_ + +#include "CalciumMacroCInterface.hxx" +#include "CalciumTypes.hxx" +#include "CalciumFortranInt.h" +#include + +/* Déclaration de l'Interface entre l'API C et l'API C++ + L'utilisateur CALCIUM n'a normalement pas a utliser cette interface + En C/C++ il utilisera celle définie dans Calcium.c (calcium.h) +2 En C++/CORBA directement celle de CalciumCxxInterface.hxx +*/ + +/* En CALCIUM l'utilisation de données de type double + implique des dates de type double, pour les autres + types de données les dates sont de type float +*/ +template struct CalTimeType { + typedef float TimeType; +}; + +template <> struct CalTimeType { + typedef double TimeType; +}; + +/* Déclaration de ecp_lecture_... , ecp_ecriture_..., ecp_free_... */ + +/* Le premier argument est utilisé : + - comme suffixe dans la définition des noms ecp_lecture_ , ecp_ecriture_ et ecp_free_ + Le second argument est utilisé : + - comme argument template à l'appel de la méthode C++ correspondante + ( le type CORBA de port correspondant est alors obtenu par un trait) + Le troisième argument est utilisée : + - pour typer le paramètre data de la procédure générée + - pour déduire le type des paramètres t, ti tf via un trait + - comme premier paramètre template à l'appel de la méthode C++ correspondante + (pour typer les données passées en paramètre ) + Notons que dans le cas CALCIUM_C2CPP_INTERFACE_(int,int,), le type int n'existe pas + en CORBA, le port CALCIUM correspondant utilise une séquence de long. La méthode + C++ CALCIUM de lecture repère cette différence de type et charge + le manipulateur de données d'effectuer une recopie (qui fonctionne si les types sont compatibles). + Notons qu'en CORBA CORBA:Long est mappé sur long uniquement si celui-ci est 32bits sinon + il sera mappé sur le type int (si il est 32bits). Le type CORBA:LongLong est mappé sur le type long + s'il est 64 bits sinon celà peut être un long long (s'il existe). +*/ +CALCIUM_C2CPP_INTERFACE_HXX_(intc,int,int,); +CALCIUM_C2CPP_INTERFACE_HXX_(long,long,long,); + +CALCIUM_C2CPP_INTERFACE_HXX_(integer,integer,cal_int,); +CALCIUM_C2CPP_INTERFACE_HXX_(int2integer,integer,int,); +CALCIUM_C2CPP_INTERFACE_HXX_(long2integer,integer, long,); + +CALCIUM_C2CPP_INTERFACE_HXX_(float,float,float, ); +CALCIUM_C2CPP_INTERFACE_HXX_(double,double,double,); +/* Fonctionne mais essai suivant pour simplification de Calcium.c CALCIUM_C2CPP_INTERFACE_(bool,bool,);*/ +CALCIUM_C2CPP_INTERFACE_HXX_(bool,bool,int,); +CALCIUM_C2CPP_INTERFACE_HXX_(cplx,cplx,float,); +CALCIUM_C2CPP_INTERFACE_HXX_(str,str,char*,); + +/* Déclaration de ecp_fin */ +extern "C" CalciumTypes::InfoType ecp_fin_ (void * component, int code); +extern "C" CalciumTypes::InfoType ecp_cd_ (void * component, char* instanceName); +extern "C" CalciumTypes::InfoType ecp_fini_ (void * component, char* nomVar, int i); +extern "C" CalciumTypes::InfoType ecp_fint_ (void * component, char* nomVar, float t); +extern "C" CalciumTypes::InfoType ecp_effi_ (void * component, char* nomVar, int i); +extern "C" CalciumTypes::InfoType ecp_efft_ (void * component, char* nomVar, float t); + +#endif diff --git a/src/DSC/DSC_User/Datastream/Calcium/CalciumCouplingPolicy.cxx b/src/DSC/DSC_User/Datastream/Calcium/CalciumCouplingPolicy.cxx index cd8dc62ec..582815d75 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/CalciumCouplingPolicy.cxx +++ b/src/DSC/DSC_User/Datastream/Calcium/CalciumCouplingPolicy.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : CalciumCouplingPolicy.cxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -27,71 +28,63 @@ #include "CalciumCouplingPolicy.hxx" CalciumCouplingPolicy::CalciumCouplingPolicy():_dependencyType(CalciumTypes::UNDEFINED_DEPENDENCY), - _storageLevel(CalciumTypes::UNLIMITED_STORAGE_LEVEL), - _dateCalSchem(CalciumTypes::TI_SCHEM), - _interpolationSchem(CalciumTypes::L1_SCHEM), - _extrapolationSchem(CalciumTypes::UNDEFINED_EXTRA_SCHEM), - _alpha(0.0),_deltaT(CalciumTypes::EPSILON), - _disconnectDirective(CalciumTypes::UNDEFINED_DIRECTIVE){}; + _storageLevel(CalciumTypes::UNLIMITED_STORAGE_LEVEL), + _dateCalSchem(CalciumTypes::TI_SCHEM), + _interpolationSchem(CalciumTypes::L1_SCHEM), + _extrapolationSchem(CalciumTypes::UNDEFINED_EXTRA_SCHEM), + _alpha(0.0),_deltaT(CalciumTypes::EPSILON), + _disconnectDirective(CalciumTypes::UNDEFINED_DIRECTIVE){}; void CalciumCouplingPolicy::setDependencyType (CalciumTypes::DependencyType dependencyType) {_dependencyType=dependencyType;} CalciumTypes::DependencyType CalciumCouplingPolicy::getDependencyType () const { return _dependencyType;} void CalciumCouplingPolicy::setStorageLevel (size_t storageLevel) { -#ifdef _DEBUG_ - std::cerr << "CalciumCouplingPolicy::setStorageLevel: " << storageLevel << std::endl; -#endif + MESSAGE( "CalciumCouplingPolicy::setStorageLevel: " << storageLevel ); if ( storageLevel < 1 && (storageLevel != CalciumTypes::UNLIMITED_STORAGE_LEVEL) ) - throw CalciumException(CalciumTypes::CPRENA,LOC("Un niveau < 1 n'est pas autorisé")); + throw CalciumException(CalciumTypes::CPRENA,LOC("StorageLevel < 1 is not allowed")); _storageLevel = storageLevel; } size_t CalciumCouplingPolicy::getStorageLevel () const {return _storageLevel;} void CalciumCouplingPolicy::setDateCalSchem (CalciumTypes::DateCalSchem dateCalSchem) { -#ifdef _DEBUG_ - std::cerr << "CalciumCouplingPolicy::setDateCalSchem: " << dateCalSchem << std::endl; -#endif + MESSAGE( "CalciumCouplingPolicy::setDateCalSchem: " << dateCalSchem ); if ( _dependencyType != CalciumTypes::TIME_DEPENDENCY ) - throw CalciumException(CalciumTypes::CPITVR,LOC("Il est impossible de positionner un schéma temporel sur un port qui n'est pas en dépendance temporelle")); + throw CalciumException(CalciumTypes::CPITVR,LOC("Can't set a temporal scheme on a port that is not time dependent")); _dateCalSchem = dateCalSchem; } CalciumTypes::DateCalSchem CalciumCouplingPolicy::getDateCalSchem () const { return _dateCalSchem; } void CalciumCouplingPolicy::setAlpha(double alpha) { -#ifdef _DEBUG_ - std::cerr << "CalciumCouplingPolicy::setAlpha: " << alpha << std::endl; -#endif + MESSAGE( "CalciumCouplingPolicy::setAlpha: " << alpha ); if ( _dependencyType != CalciumTypes::TIME_DEPENDENCY ) - throw CalciumException(CalciumTypes::CPITVR,LOC("Il est impossible de positionner alpha sur un port qui n'est pas en dépendance temporelle")); + throw CalciumException(CalciumTypes::CPITVR,LOC("Can't set alpha on a port that is not time dependent")); - if ( 0 <= alpha <= 1 ) _alpha = alpha; + if ( 0 <= alpha && alpha <= 1 ) _alpha = alpha; else - throw CalciumException(CalciumTypes::CPRENA,LOC("Le paramètre alpha doit être compris entre [0,1]")); + throw CalciumException(CalciumTypes::CPRENA,LOC("alpha must be between [0,1]")); } double CalciumCouplingPolicy::getAlpha() const { return _alpha; } void CalciumCouplingPolicy::setDeltaT(double deltaT ) { if ( _dependencyType != CalciumTypes::TIME_DEPENDENCY ) - throw CalciumException(CalciumTypes::CPITVR,LOC("Le paramètre deltaT sur un port qui n'est pas en dépendance temporelle n'a pas de sens")); - if ( 0 <= deltaT <= 1 ) _deltaT = deltaT; + throw CalciumException(CalciumTypes::CPITVR,LOC("Can't set deltaT on a port that is not time dependent")); + if ( 0 <= deltaT && deltaT <= 1 ) _deltaT = deltaT; else - throw(CalciumException(CalciumTypes::CPRENA,LOC("Le paramètre deltaT doit être compris entre [0,1]"))); + throw(CalciumException(CalciumTypes::CPRENA,LOC("deltaT must be between [0,1]"))); } double CalciumCouplingPolicy::getDeltaT() const {return _deltaT;} void CalciumCouplingPolicy::setInterpolationSchem (CalciumTypes::InterpolationSchem interpolationSchem) { -#ifdef _DEBUG_ - std::cerr << "CalciumCouplingPolicy::setInterpolationSchem: " << interpolationSchem << std::endl; -#endif + MESSAGE( "CalciumCouplingPolicy::setInterpolationSchem: " << interpolationSchem ); if ( _dependencyType != CalciumTypes::TIME_DEPENDENCY ) - throw CalciumException(CalciumTypes::CPITVR,LOC("Le paramètre InterpolationSchem sur un port qui n'est pas en dépendance temporelle n'a pas de sens")); + throw CalciumException(CalciumTypes::CPITVR,LOC("Can't set InterpolationSchem on a port that is not time dependent")); _interpolationSchem=interpolationSchem; } void CalciumCouplingPolicy::setExtrapolationSchem (CalciumTypes::ExtrapolationSchem extrapolationSchem) { if ( _dependencyType != CalciumTypes::TIME_DEPENDENCY ) - throw CalciumException(CalciumTypes::CPITVR,LOC("Le paramètre ExtrapolationSchem sur un port qui n'est pas en dépendance temporelle n'a pas de sens")); + throw CalciumException(CalciumTypes::CPITVR,LOC("Can't set ExtrapolationSchem on a port that is not time dependent")); _extrapolationSchem=extrapolationSchem; } @@ -101,7 +94,7 @@ CalciumTypes::ExtrapolationSchem CalciumCouplingPolicy::getExtrapolationSchem () CalciumCouplingPolicy::TimeType CalciumCouplingPolicy::getEffectiveTime(CalciumCouplingPolicy::TimeType ti, - CalciumCouplingPolicy::TimeType tf) { + CalciumCouplingPolicy::TimeType tf) { if ( _dateCalSchem == CalciumTypes::TI_SCHEM ) return ti; if ( _dateCalSchem == CalciumTypes::TF_SCHEM ) return tf; @@ -112,10 +105,14 @@ CalciumCouplingPolicy::getEffectiveTime(CalciumCouplingPolicy::TimeType ti, void CalciumCouplingPolicy::disconnect(bool provideLastGivenValue) { if (provideLastGivenValue) { +#ifdef MYDEBUG std::cout << "-------- CalciumCouplingPolicy::disconnect CP_CONT ------------------" << std::endl; +#endif _disconnectDirective = CalciumTypes::CONTINUE; } else { +#ifdef MYDEBUG std::cout << "-------- CalciumCouplingPolicy::disconnect CP_ARRET ------------------" << std::endl; +#endif _disconnectDirective = CalciumTypes::STOP; } diff --git a/src/DSC/DSC_User/Datastream/Calcium/CalciumCouplingPolicy.hxx b/src/DSC/DSC_User/Datastream/Calcium/CalciumCouplingPolicy.hxx index 383f7a698..9f0890209 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/CalciumCouplingPolicy.hxx +++ b/src/DSC/DSC_User/Datastream/Calcium/CalciumCouplingPolicy.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : CalciumCouplingPolicy.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -39,6 +40,8 @@ #include "CalciumTypes.hxx" #include "CalciumException.hxx" +//#define MYDEBUG + class CalciumCouplingPolicy : public CouplingPolicy { @@ -49,6 +52,7 @@ public: template friend class BoundedDataIdProcessor; template friend class EraseDataIdProcessor; + template friend class EraseDataIdBeforeOrAfterTagProcessor; template friend class DisconnectProcessor; typedef CalciumTypes::DependencyType DependencyType; @@ -107,9 +111,10 @@ public: inline TagType getTag (const DataId &dataId) const { return dataId.second;} template struct BoundedDataIdProcessor; + class EnableIf = void > struct BoundedDataIdProcessor; //template struct BoundedDataIdProcessor; template struct EraseDataIdProcessor; + template struct EraseDataIdBeforeOrAfterTagProcessor; template struct DisconnectProcessor; // Renvoie isEqual si le dataId attendu est trouvé dans storedDataIds : @@ -120,9 +125,9 @@ public: // Le container doit être associatif template < typename AssocContainer > bool isDataIdConveniant( AssocContainer & storedDatas, - const typename AssocContainer::key_type & expectedDataId, - bool & isEqual, bool & isBounded, - typename AssocContainer::iterator & wDataIt1) const; + const typename AssocContainer::key_type & expectedDataId, + bool & isEqual, bool & isBounded, + typename AssocContainer::iterator & wDataIt1) const; TimeType getEffectiveTime(TimeType ti, TimeType tf); @@ -143,8 +148,8 @@ struct CalciumCouplingPolicy::InternalDataIdContainer : public std::vector< std: typedef std::vector < DataId > DataIdVect; InternalDataIdContainer(const DataId & dataId, - const CalciumCouplingPolicy & policy - ):std::vector< std::pair< T_TIME,T_TAG> >() { + const CalciumCouplingPolicy & policy + ):std::vector< std::pair< T_TIME,T_TAG> >() { // Ignore les paramètres qui ne sont pas en rapport avec le type de dépendance switch (policy._dependencyType) { case CalciumTypes::TIME_DEPENDENCY: @@ -166,10 +171,12 @@ struct CalciumCouplingPolicy::BoundedDataIdProcessor{ BoundedDataIdProcessor(const CouplingPolicy & couplingPolicy) {}; template < typename Iterator, typename DataId > void inline apply(typename iterator_t::value_type & data, - const DataId & dataId, - const Iterator & it1) const { + const DataId & dataId, + const Iterator & it1) const { typedef typename iterator_t::value_type value_type; +#ifdef MYDEBUG std::cout << "-------- Calcium Generic BoundedDataIdProcessor.apply() called " << std::endl; +#endif } }; @@ -188,7 +195,7 @@ struct CalciumCouplingPolicy::BoundedDataIdProcessor< // Méthode implémentant l'interpolation temporelle template < typename MapIterator > void inline apply (typename iterator_t::value_type & data, - const DataId & dataId, const MapIterator & it1) const { + const DataId & dataId, const MapIterator & it1) const { typedef typename iterator_t::value_type value_type; typedef typename DataManipulator::InnerType InnerType; @@ -196,14 +203,14 @@ struct CalciumCouplingPolicy::BoundedDataIdProcessor< MapIterator it2=it1; ++it2; size_t dataSize1 = DataManipulator::size(it1->second); -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- CalciumCouplingPolicy::BoundedDataIdProcessor : Taille de donnée dataId1 : " << dataSize1 << std::endl; #endif // Gérer dans calcium la limite de la taille du buffer donnée par // l'utilisateur. size_t dataSize2 = DataManipulator::size(it2->second); -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- CalciumCouplingPolicy::BoundedDataIdProcessor : Taille de donnée dataId2 : " << dataSize2 << std::endl; #endif @@ -212,31 +219,31 @@ struct CalciumCouplingPolicy::BoundedDataIdProcessor< DataId dataId1 = it1->first; TimeType t2 = dataId2.first; TimeType t1 = dataId1.first; -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- CalciumCouplingPolicy::BoundedDataIdProcessor : Valeur de t1 : " << t1 << std::endl; std::cout << "-------- CalciumCouplingPolicy::BoundedDataIdProcessor : Valeur de t2 : " << t2 << std::endl; #endif TimeType t = dataId.first; -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- CalciumCouplingPolicy::BoundedDataIdProcessor : Valeur de t : " << t << std::endl; #endif TimeType timeDiff = t2-t1; -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- CalciumCouplingPolicy::BoundedDataIdProcessor : Valeur de timeDiff : " << timeDiff << std::endl; #endif TimeType coeff = (t2-t)/timeDiff; -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- CalciumCouplingPolicy::BoundedDataIdProcessor : Valeur de coeff : " << coeff << std::endl; #endif InnerType const * const InIt1 = DataManipulator::getPointer(it1->second); -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- CalciumCouplingPolicy::BoundedDataIdProcessor : Données à t1 : " << std::endl; std::copy(InIt1,InIt1+dataSize1,std::ostream_iterator(std::cout," ")); std::cout << std::endl; #endif InnerType const * const InIt2 = DataManipulator::getPointer(it2->second); -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- CalciumCouplingPolicy::BoundedDataIdProcessor : Données à t2 : " << std::endl; std::copy(InIt2,InIt2+dataSize2,std::ostream_iterator(std::cout," ")); std::cout << std::endl; @@ -244,7 +251,7 @@ struct CalciumCouplingPolicy::BoundedDataIdProcessor< Type dataOut = DataManipulator::create(dataSize); InnerType * const OutIt = DataManipulator::getPointer(dataOut); -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cerr << "-------- CalciumCouplingPolicy::BoundedDataIdProcessor : interpolationSchem : " << _couplingPolicy._interpolationSchem << std::endl; std::cerr << "-------- CalciumCouplingPolicy::BoundedDataIdProcessor : alpha : " << _couplingPolicy._alpha << std::endl; std::cerr << "-------- CalciumCouplingPolicy::BoundedDataIdProcessor : datecalschem : " << _couplingPolicy._dateCalSchem << std::endl; @@ -259,13 +266,13 @@ struct CalciumCouplingPolicy::BoundedDataIdProcessor< // OLD: REM : Pour des buffers de type int // OLD: le compilo indiquera warning: converting to `long int' from `Double' std::transform(InIt1,InIt1+dataSize,InIt2,OutIt, - ( _1 - _2 ) * coeff + _2 ); + ( _1 - _2 ) * coeff + _2 ); // for(size_t i =0; i < dataSize3; ++i) { -// OutIt[i]=(InIt1[i] - InIt2[i]) * coeff + InIt2[i]; +// OutIt[i]=(InIt1[i] - InIt2[i]) * coeff + InIt2[i]; // } } -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- CalciumCouplingPolicy::BoundedDataIdProcessor : Données calculées à t : " << std::endl; std::copy(OutIt,OutIt+dataSize,std::ostream_iterator(std::cout," ")); std::cout << std::endl; @@ -283,14 +290,14 @@ struct CalciumCouplingPolicy::BoundedDataIdProcessor< // Le container doit être associatif template < typename AssocContainer > bool CalciumCouplingPolicy::isDataIdConveniant( AssocContainer & storedDatas, const typename AssocContainer::key_type & expectedDataId, - bool & isEqual, bool & isBounded, typename AssocContainer::iterator & wDataIt1) const { + bool & isEqual, bool & isBounded, typename AssocContainer::iterator & wDataIt1) const { // Rem : le type key_type == DataId typedef typename AssocContainer::key_type key_type; AdjacentFunctor< key_type > af(expectedDataId); if ( _dependencyType == CalciumTypes::TIME_DEPENDENCY ) { -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- time expected : " << expectedDataId.first << std::endl; std::cout << "-------- time expected corrected : " << expectedDataId.first*(1.0-_deltaT) << std::endl; #endif @@ -310,15 +317,15 @@ bool CalciumCouplingPolicy::isDataIdConveniant( AssocContainer & storedDatas, co // // L'algo find_if ne peut être utilisé car il recopie l'AdjacentFunctor // qui ne peut alors pas mémoriser ses états précédents - // + // // Un codage en reverse serait plus efficace typename AssocContainer::iterator prev = storedDatas.begin(); typename AssocContainer::iterator current = prev; while ( (current != storedDatas.end()) && !af(current->first) ) { -#ifdef _DEBUG_ - std::cout << "------- stored time : " << current->first << std::endl; +#ifdef MYDEBUG + std::cerr << "------- stored time : " << current->first << std::endl; #endif // if ( af(current->first) ) break; prev = current++; @@ -336,13 +343,77 @@ bool CalciumCouplingPolicy::isDataIdConveniant( AssocContainer & storedDatas, co else wDataIt1 = storedDatas.end(); -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- isDataIdConvenient : isEqual : " << isEqual << " , isBounded " << isBounded << std::endl; #endif return isEqual || isBounded; } +//Remove DataId before or after a given time or tag +template < typename DataManipulator > +struct CalciumCouplingPolicy::EraseDataIdBeforeOrAfterTagProcessor +{ + CalciumCouplingPolicy &_couplingPolicy; + + EraseDataIdBeforeOrAfterTagProcessor(CalciumCouplingPolicy &couplingPolicy): + _couplingPolicy(couplingPolicy) {}; + + template < typename Container,typename TimeType,typename TagType > + void apply(Container & storedDatas, TimeType time, TagType tag, bool before) const + { + typedef typename Container::iterator iterator; + typedef typename Container::reverse_iterator riterator; + + if(_couplingPolicy._dependencyType == CalciumTypes::TIME_DEPENDENCY) + { + if(before) + { + iterator it=storedDatas.begin(); + while(it != storedDatas.end() && it->first.first <= time) + { + DataManipulator::delete_data(it->second); + storedDatas.erase(it); + it=storedDatas.begin(); + } + } + else + { + riterator it=storedDatas.rbegin(); + while(it != storedDatas.rend() && it->first.first >= time) + { + DataManipulator::delete_data(it->second); + storedDatas.erase(it->first); + it=storedDatas.rbegin(); + } + } + } + else + { + if(before) + { + iterator it=storedDatas.begin(); + while(it != storedDatas.end() && it->first.second <= tag) + { + DataManipulator::delete_data(it->second); + storedDatas.erase(it); + it=storedDatas.begin(); + } + } + else + { + riterator it=storedDatas.rbegin(); + while(it != storedDatas.rend() && it->first.second >= tag) + { + DataManipulator::delete_data(it->second); + storedDatas.erase(it->first); + it=storedDatas.rbegin(); + } + } + } + } +}; + // TODO :PAS ENCORE TESTE AVEC UN NIVEAU POSITIONNE // Supprime les DataId et les données associées // du container associatif quand le nombre @@ -360,13 +431,13 @@ struct CalciumCouplingPolicy::EraseDataIdProcessor { template < typename Container > void apply(Container & storedDatas, - typename Container::iterator & wDataIt1 ) const { + typename Container::iterator & wDataIt1 ) const { typedef typename Container::key_type key_type; typedef typename Container::value_type value_type; typedef typename Container::iterator iterator; -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- CalciumCouplingPolicy::eraseDataId, storedDatasSize : " << storedDatas.size() << std::endl; #endif @@ -377,18 +448,18 @@ struct CalciumCouplingPolicy::EraseDataIdProcessor { if (s > 0 ) { size_t dist=distance(storedDatas.begin(),wDataIt1); for (int i=0; i bool apply(Container & storedDatas, - const DataId & expectedDataId, - typename Container::iterator & wDataIt1 ) const { + const DataId & expectedDataId, + typename Container::iterator & wDataIt1 ) const { typedef typename Container::key_type key_type; typedef typename Container::value_type value_type; typedef typename Container::iterator iterator; // Pas de traitement particulier a effectuer -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- CalciumCouplingPolicy::DisconnectProcessor MARK1 ("<< _couplingPolicy._disconnectDirective<<") --------" << std::endl; #endif if ( (_couplingPolicy._disconnectDirective) == (CalciumTypes::UNDEFINED_DIRECTIVE) ) return false; -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- CalciumCouplingPolicy::DisconnectProcessor MARK2 --------" << std::endl; #endif // TODO : Ds GenericPort::next il faut convertir en CPSTOPSEQ if ( _couplingPolicy._disconnectDirective == CalciumTypes::CP_ARRET ) - throw(CalciumException(CalciumTypes::CPINARRET,LOC(OSS()<< "La directive CP_ARRET" - << " provoque l'interruption de toute lecture de données"))); -#ifdef _DEBUG_ + throw(CalciumException(CalciumTypes::CPINARRET,LOC(OSS()<< "CP_ARRET directive" + << " interrupts all further data reading"))); +#ifdef MYDEBUG std::cout << "-------- CalciumCouplingPolicy::DisconnectProcessor MARK3 --------" << std::endl; #endif @@ -443,20 +514,20 @@ struct CalciumCouplingPolicy::DisconnectProcessor { // S'il n'y a plus de données indique que l'on a pas pu effectuer de traitement // TODO : Dans la gestion des niveaux il faut peut être interdire un niveau == 0 if ( storedDatas.empty() ) - throw(CalciumException(CalciumTypes::CPNTNULL,LOC(OSS()<< "La directive CP_CONT" - << " est active mais aucune donnée n'est disponible."))); + throw(CalciumException(CalciumTypes::CPNTNULL,LOC(OSS()<< "CP_CONT directive" + << " is active but no data is available."))); // expectedDataId n'a ni été trouvé dans storedDataIds ni encadré mais il se peut // qu'en mode itératif il ne soit pas plus grand que le plus grand DataId stocké auquel // cas on doit renvoyer une expection car on n'est plus connecté et on ne pourra jamais // fournir de données pour ce dataId. -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- CalciumCouplingPolicy::DisconnectProcessor MARK4 " << expectedDataId <<" --------" << std::endl; #endif // >= expectedDataId iterator it1 = storedDatas.lower_bound(expectedDataId); -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- CalciumCouplingPolicy::DisconnectProcessor MARK5 " << std::endl; for (iterator it=storedDatas.begin();it!=storedDatas.end();++it) std::cout <<" "<<(*it).first ; @@ -465,16 +536,16 @@ struct CalciumCouplingPolicy::DisconnectProcessor { // TODO : Il faut en fait renvoyer le plus proche cf IT ou DT if (it1 == storedDatas.end()) - throw(CalciumException(CalciumTypes::CPNTNULL,LOC(OSS()<< "La directive CP_CONT" - << " est active mais le dataId demandé est inférieur ou égal au dernier reçu."))); + throw(CalciumException(CalciumTypes::CPNTNULL,LOC(OSS()<< "CP_CONT directive" + << " is active but the requested dataId is less or equal to the last one received."))); -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- CalciumCouplingPolicy::DisconnectProcessor MARK6 " << std::endl; #endif wDataIt1 = storedDatas.end(); --wDataIt1; -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- CalciumCouplingPolicy::DisconnectProcessor, CP_CONT : " << (*wDataIt1).first << std::endl; #endif diff --git a/src/DSC/DSC_User/Datastream/Calcium/CalciumCxxInterface.cxx b/src/DSC/DSC_User/Datastream/Calcium/CalciumCxxInterface.cxx new file mode 100644 index 000000000..e79f4ea3f --- /dev/null +++ b/src/DSC/DSC_User/Datastream/Calcium/CalciumCxxInterface.cxx @@ -0,0 +1,34 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +// File : CalciumCxxInterface.cxx +// Author : Eric Fayolle (EDF) +// Module : KERNEL +// Modified by : $LastChangedBy$ +// Date : $LastChangedDate: 2007-03-01 13:27:58 +0100 (jeu, 01 mar 2007) $ +// Id : $Id$ +// +#include "CalciumCxxInterface.hxx" +#define PRG_MAIN +#include "calciumP.h" + +namespace CalciumInterface +{ +}; + diff --git a/src/DSC/DSC_User/Datastream/Calcium/CalciumCxxInterface.hxx b/src/DSC/DSC_User/Datastream/Calcium/CalciumCxxInterface.hxx index a0af9e501..4e020d79d 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/CalciumCxxInterface.hxx +++ b/src/DSC/DSC_User/Datastream/Calcium/CalciumCxxInterface.hxx @@ -1,24 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : CalciumCxxInterface.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -29,6 +27,10 @@ #ifndef _CALCIUM_CXXINTERFACE_HXX_ #define _CALCIUM_CXXINTERFACE_HXX_ +#if defined(__CONST_H) || defined(__CALCIUM_H) +#error "The header CalciumCxxInterface.hxx must be included before calcium.h" +#endif + #include #include #include @@ -42,7 +44,7 @@ #include -//#define _DEBUG_ +#include template struct IsSameType { @@ -53,24 +55,33 @@ struct IsSameType { static const bool value = true; }; +extern const char * CPMESSAGE[]; + +//#define MYDEBUG #include namespace CalciumInterface { - /********************* INTERFACE DE DECONNEXION *****************/ + /********************* CONNECTION INTERFACE *****************/ static inline void ecp_cd (Superv_Component_i & component, std::string & instanceName) { /* TODO : Trouver le nom de l'instance SALOME*/ - if (instanceName.empty()) instanceName="UNDEFINED"; - + CORBA::String_var componentName=component.instanceName(); + std::string containerName=component.getContainerName(); + if (instanceName.empty()) instanceName=componentName; + Engines_DSC_interface::writeEvent("CP_CD",containerName,componentName,"","",""); } - static void + static inline void ecp_fin (Superv_Component_i & component, bool provideLastGivenValue) { + CORBA::String_var componentName=component.instanceName(); + std::string containerName=component.getContainerName(); + Engines_DSC_interface::writeEvent("CP_FIN",containerName,componentName,"","",""); + std::vector usesPortNames; std::vector::const_iterator it; component.get_uses_port_names(usesPortNames); @@ -81,46 +92,48 @@ namespace CalciumInterface { // uses_port *myUsesPort; calcium_uses_port* myCalciumUsesPort; - for (it=usesPortNames.begin(); it != usesPortNames.end(); ++it) { - try { - - myCalciumUsesPort= - component.Superv_Component_i::get_port< calcium_uses_port >((*it).c_str()); - -// component.Superv_Component_i::get_port(myUsesPort,(*it).c_str()); -// calcium_uses_port* myCalciumUsesPort= -// dynamic_cast(myUsesPort); - -#ifdef _DEBUG_ - std::cerr << "-------- CalciumInterface(ecp_fin) MARK 1 -|"<< *it <<"|----"<< - // typeid(myUsesPort).name() <<"-------------" << - typeid(myCalciumUsesPort).name() <<"-------------" << std::endl; -#endif - -// if ( !myCalciumUsesPort ) -// throw Superv_Component_i::BadCast(LOC(OSS()<<"Impossible de convertir le port " -// << *it << " en port de type calcium_uses_port." )); - - myCalciumUsesPort->disconnect(provideLastGivenValue); - - } catch ( const Superv_Component_i::BadCast & ex) { -#ifdef _DEBUG_ - std::cerr << ex.what() << std::endl; -#endif - throw (CalciumException(CalciumTypes::CPTPVR,ex)); - } catch ( const DSC_Exception & ex) { -#ifdef _DEBUG_ - std::cerr << ex.what() << std::endl; + for (it=usesPortNames.begin(); it != usesPortNames.end(); ++it) + { + try + { + myCalciumUsesPort= component.Superv_Component_i::get_port< calcium_uses_port >((*it).c_str()); + +// component.Superv_Component_i::get_port(myUsesPort,(*it).c_str()); +// calcium_uses_port* myCalciumUsesPort= +// dynamic_cast(myUsesPort); + +#ifdef MYDEBUG + std::cerr << "-------- CalciumInterface(ecp_fin) MARK 1 -|"<< *it <<"|----"<< + // typeid(myUsesPort).name() <<"-------------" << + typeid(myCalciumUsesPort).name() <<"-------------" << std::endl; #endif - // Exception venant de SupervComponent : - // PortNotDefined(CPNMVR), PortNotConnected(CPLIEN) - // ou du port uses : Dsc_Exception - // On continue à traiter la deconnexion des autres ports uses - } catch (...) { - throw (CalciumException(CalciumTypes::CPATAL,"Exception innatendue")); - // En fonction du mode de gestion des erreurs throw; - } - } + +// if ( !myCalciumUsesPort ) +// throw Superv_Component_i::BadCast(LOC(OSS()<<"Impossible de convertir le port " +// << *it << " en port de type calcium_uses_port." )); + + myCalciumUsesPort->disconnect(provideLastGivenValue); + } + catch ( const Superv_Component_i::BadCast & ex) + { + Engines_DSC_interface::writeEvent("CP_FIN",containerName,componentName,"",CPMESSAGE[CalciumTypes::CPTPVR],ex.what()); + throw (CalciumException(CalciumTypes::CPTPVR,ex)); + } + catch ( const DSC_Exception & ex) + { + Engines_DSC_interface::writeEvent("CP_FIN",containerName,componentName,"",CPMESSAGE[CalciumTypes::CPOK],ex.what()); + // Exception venant de SupervComponent : + // PortNotDefined(CPNMVR), PortNotConnected(CPLIEN) + // ou du port uses : Dsc_Exception + // On continue à traiter la deconnexion des autres ports uses + } + catch (...) + { + Engines_DSC_interface::writeEvent("CP_FIN",containerName,componentName,"",CPMESSAGE[CalciumTypes::CPATAL],"Unexpected exception"); + throw (CalciumException(CalciumTypes::CPATAL,"Unexpected exception")); + // En fonction du mode de gestion des erreurs throw; + } + } } @@ -149,212 +162,263 @@ namespace CalciumInterface { } - /********************* INTERFACES DE LECTURE *****************/ + /********************* READING INTERFACE *****************/ // T1 est le type de données // T2 est un de type Calcium permettant de sélectionner le port CORBA correspondant - // T1 et T2 sont dissociés pour discriminer le cas des nombres complexes + // T1 et T2 sont dissociés pour discriminer par exemple le cas des nombres complexes // -> Les données des nombres complexes sont de type float mais // le port à utiliser est le port cplx template static void ecp_lecture ( Superv_Component_i & component, - int const & dependencyType, - double & ti, - double const & tf, - long & i, - const std::string & nomVar, - size_t bufferLength, - size_t & nRead, - T1 * &data ) + int const & dependencyType, + double & ti, + double const & tf, + long & i, + const std::string & nomVar, + size_t bufferLength, + size_t & nRead, + T1 * &data ) { assert(&component); + CORBA::String_var componentName=component.instanceName(); + std::string containerName=component.getContainerName(); typedef typename ProvidesPortTraits::PortType PortType; typedef typename PortType::DataManipulator DataManipulator; typedef typename DataManipulator::Type CorbaDataType; // Attention != T1 typedef typename DataManipulator::InnerType InnerType; - CalciumTypes::DependencyType _dependencyType= + CalciumTypes::DependencyType _dependencyType= static_cast(dependencyType); CorbaDataType corbaData; -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cerr << "-------- CalciumInterface(ecp_lecture) MARK 1 ------------------" << std::endl; #endif if (nomVar.empty()) - throw CalciumException(CalciumTypes::CPNMVR, - LOC("Le nom de la variable est ")); + { + Engines_DSC_interface::writeEvent("BEGIN_READ",containerName,componentName,"",CPMESSAGE[CalciumTypes::CPNMVR],""); + throw CalciumException(CalciumTypes::CPNMVR, LOC("Empty variable name")); + } PortType * port; -#ifdef _DEBUG_ - std::cout << "-------- CalciumInterface(ecp_lecture) MARK 2 ------------------" << std::endl; +#ifdef MYDEBUG + std::cout << "-------- CalciumInterface(lecture) MARK 2 --"< (nomVar.c_str()); -#ifdef _DEBUG_ - std::cout << "-------- CalciumInterface(ecp_lecture) MARK 3 ------------------" << std::endl; -#endif - } catch ( const Superv_Component_i::PortNotDefined & ex) { -#ifdef _DEBUG_ - std::cerr << ex.what() << std::endl; -#endif - throw (CalciumException(CalciumTypes::CPNMVR,ex)); - } catch ( const Superv_Component_i::PortNotConnected & ex) { -#ifdef _DEBUG_ - std::cerr << ex.what() << std::endl;; -#endif - throw (CalciumException(CalciumTypes::CPLIEN,ex)); - // VERIFIER LES CAS DES CODES : CPINARRET, CPSTOPSEQ, CPCTVR, CPLIEN - } catch ( const Superv_Component_i::BadCast & ex) { -#ifdef _DEBUG_ - std::cerr << ex.what() << std::endl; + try + { + port = component.Superv_Component_i::get_port< PortType > (nomVar.c_str()); +#ifdef MYDEBUG + std::cout << "-------- CalciumInterface(ecp_lecture) MARK 3 ------------------" << std::endl; #endif - throw (CalciumException(CalciumTypes::CPTPVR,ex)); - } + } + catch ( const Superv_Component_i::PortNotDefined & ex) + { + Engines_DSC_interface::writeEvent("BEGIN_READ",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPNMVR],ex.what()); + throw (CalciumException(CalciumTypes::CPNMVR,ex)); + } + catch ( const Superv_Component_i::PortNotConnected & ex) + { + Engines_DSC_interface::writeEvent("BEGIN_READ",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPLIEN],ex.what()); + throw (CalciumException(CalciumTypes::CPLIEN,ex)); + // VERIFIER LES CAS DES CODES : CPINARRET, CPSTOPSEQ, CPCTVR, CPLIEN + } + catch ( const Superv_Component_i::BadCast & ex) + { + Engines_DSC_interface::writeEvent("BEGIN_READ",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPTPVR],ex.what()); + throw (CalciumException(CalciumTypes::CPTPVR,ex)); + } // mode == mode du port CalciumTypes::DependencyType portDependencyType = port->getDependencyType(); if ( portDependencyType == CalciumTypes::UNDEFINED_DEPENDENCY ) - throw CalciumException(CalciumTypes::CPIT, - LOC(OSS()<<"Le mode de dépendance de la variable " - << nomVar << " est indéfini.")); + { + Engines_DSC_interface::writeEvent("BEGIN_READ",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPIT],"Dependency mode is undefined"); + throw CalciumException(CalciumTypes::CPIT, LOC(OSS()<<"Dependency mode of variable " << nomVar << " is undefined.")); + } - if ( ( portDependencyType != _dependencyType ) && - ( _dependencyType != CalciumTypes::SEQUENCE_DEPENDENCY ) ) - throw CalciumException(CalciumTypes::CPITVR, - LOC(OSS()<<"Le mode de dépendance de la variable " - << nomVar << ": " << portDependencyType - << " ne correspond pas au mode demandé.")); + if ( ( portDependencyType != _dependencyType ) && ( _dependencyType != CalciumTypes::SEQUENCE_DEPENDENCY ) ) + { + Engines_DSC_interface::writeEvent("BEGIN_READ",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPIT], + "Dependency mode is not the same as the required one"); + throw CalciumException(CalciumTypes::CPITVR, LOC(OSS()<<"Dependency mode of variable " << nomVar << ": " + << portDependencyType << " is not the same as the required one.")); + } - if ( _dependencyType == CalciumTypes::TIME_DEPENDENCY ) { - corbaData = port->get(ti,tf, 0); -#ifdef _DEBUG_ - std::cout << "-------- CalciumInterface(ecp_lecture) MARK 5 ------------------" << std::endl; + std::stringstream msgout,msg; + if ( _dependencyType == CalciumTypes::TIME_DEPENDENCY ) + { + try + { + double tt=ti; + msg << "ti=" << ti << ", tf=" << tf ; + Engines_DSC_interface::writeEvent("BEGIN_READ",containerName,componentName,nomVar.c_str(),"",msg.str().c_str()); + corbaData = port->get(tt,tf, 0); + msgout << "read t=" << tt ; +#ifdef MYDEBUG + std::cout << "-------- CalciumInterface(ecp_lecture) MARK 5 ------------------" << std::endl; #endif - } - else if ( _dependencyType == CalciumTypes::ITERATION_DEPENDENCY ) { - corbaData = port->get(0, i); -#ifdef _DEBUG_ - std::cout << "-------- CalciumInterface(ecp_lecture) MARK 6 ------------------" << std::endl; + } + catch ( const DSC_Exception & ex) + { + Engines_DSC_interface::writeEvent("END_READ",containerName,componentName,nomVar.c_str(),"",ex.what()); + throw; + } + } + else if ( _dependencyType == CalciumTypes::ITERATION_DEPENDENCY ) + { + try + { + msg << "i=" << i ; + Engines_DSC_interface::writeEvent("BEGIN_READ",containerName,componentName,nomVar.c_str(),"",msg.str().c_str()); + corbaData = port->get(0, i); + msgout << "read i=" << i ; +#ifdef MYDEBUG + std::cout << "-------- CalciumInterface(ecp_lecture) MARK 6 ------------------" << std::endl; #endif - } else { - // Lecture en séquence -#ifdef _DEBUG_ - std::cout << "-------- CalciumInterface(ecp_lecture) MARK 7 ------------------" << std::endl; + } + catch ( const DSC_Exception & ex) + { + Engines_DSC_interface::writeEvent("END_READ",containerName,componentName,nomVar.c_str(),"",ex.what()); + throw; + } + } + else + { + // Sequential read + try + { +#ifdef MYDEBUG + std::cout << "-------- CalciumInterface(ecp_lecture) MARK 7 ------------------" << std::endl; #endif - corbaData = port->next(ti,i); - } + Engines_DSC_interface::writeEvent("BEGIN_READ",containerName,componentName,nomVar.c_str(),"","Sequential read"); + corbaData = port->next(ti,i); + msgout << "read "; + if(i==0)msgout<< "t=" <::value) data = new T1[nRead]; -#ifdef _DEBUG_ - std::cout << "-------- CalciumInterface(ecp_lecture) MARK 9 ------------------" << std::endl; + if ( data == NULL ) + { + if ( bufferLength != 0 ) + { + MESSAGE("bufferLength devrait valoir 0 pour l'utilisation du mode sans copie (data==NULL)"); + } + nRead = corbaDataSize; + // Si les types T1 et InnerType sont différents, il faudra effectuer tout de même une recopie + if (!IsSameType::value) data = new T1[nRead]; +#ifdef MYDEBUG + std::cout << "-------- CalciumInterface(ecp_lecture) MARK 9 ------------------" << std::endl; #endif - // On essaye de faire du 0 copy si les types T1 et InnerType sont les mêmes. - // Copy2UserSpace : - // La raison d'être du foncteur Copy2UserSpace est que le compilateur n'acceptera - // pas une expresion d'affectation sur des types incompatibles même - // si cette expression se trouve dans une branche non exécuté d'un test - // sur la compatibilité des types. - // En utilisant le foncteur Copy2UserSpace, seul la spécialisation en adéquation - // avec la compatibilité des types sera compilée - Copy2UserSpace< IsSameType::value, DataManipulator >::apply(data,corbaData,nRead); -#ifdef _DEBUG_ - std::cout << "-------- CalciumInterface(ecp_lecture) MARK 10 ------------------" << std::endl; + // On essaye de faire du 0 copy si les types T1 et InnerType sont les mêmes. + // Copy2UserSpace : + // La raison d'être du foncteur Copy2UserSpace est qu'il n'est pas possible de compiler + // une expression d'affectation sur des types incompatibles ; même + // si cette expression se trouve dans une branche non exécuté d'un test + // portant sur la compatibilité des types. + // En utilisant le foncteur Copy2UserSpace, seule la spécialisation en adéquation + // avec la compatibilité des types sera compilée + Copy2UserSpace< IsSameType::value, DataManipulator >::apply(data,corbaData,nRead); +#ifdef MYDEBUG + std::cout << "-------- CalciumInterface(ecp_lecture) MARK 10 ------------------" << std::endl; #endif - // Attention : Seul CalciumCouplingPolicy via eraseDataId doit décider de supprimer ou non - // la donnée corba associée à un DataId ! Ne pas effectuer la desallocation suivante : - // DataManipulator::delete_data(corbaData); - // ni DataManipulator::getPointer(corbaData,true); qui détruit la sequence lorsque l'on - // prend la propriété du buffer - // old : Dans les deux cas la structure CORBA n'est plus utile - // old : Si !IsSameType::value l'objet CORBA est détruit avec son contenu - // old : Dans l'autre cas seul la coquille CORBA est détruite - // L'utilisateur devra appeler ecp_free qui déterminera s'il est necessaire - // de désallouer un buffer intermédiaire ( types différents) ou de rendre la propriété - } else { - nRead = std::min < size_t > (corbaDataSize,bufferLength); -#ifdef _DEBUG_ - std::cout << "-------- CalciumInterface(ecp_lecture) MARK 11 ------------------" << std::endl; + // Attention : Seul CalciumCouplingPolicy via eraseDataId doit décider de supprimer ou non + // la donnée corba associée à un DataId ! Ne pas effectuer la desallocation suivante : + // DataManipulator::delete_data(corbaData); + // ni DataManipulator::getPointer(corbaData,true); qui détruit la sequence lorsque l'on + // prend la propriété du buffer + // old : Dans les deux cas la structure CORBA n'est plus utile + // old : Si !IsSameType::value l'objet CORBA est détruit avec son contenu + // old : Dans l'autre cas seul la coquille CORBA est détruite + // L'utilisateur devra appeler ecp_free qui déterminera s'il est necessaire + // de désallouer un buffer intermédiaire ( types différents) ou de rendre la propriété + } + else + { + nRead = std::min < size_t > (corbaDataSize,bufferLength); +#ifdef MYDEBUG + std::cout << "-------- CalciumInterface(ecp_lecture) MARK 11 ------------------" << std::endl; #endif - Copy2UserSpace::apply(data,corbaData,nRead); - DataManipulator::copy(corbaData,data,nRead); - -#ifdef _DEBUG_ - std::cout << "-------- CalciumInterface(ecp_lecture) MARK 12 ------------------" << std::endl; + Copy2UserSpace::apply(data,corbaData,nRead); + //Déjà fait ci-dessus : + //DataManipulator::copy(corbaData,data,nRead); +#ifdef MYDEBUG + std::cout << "-------- CalciumInterface(ecp_lecture) MARK 12 ------------------" << std::endl; #endif - // Attention : Seul CalciumCouplingPolicy via eraseDataId doit décider de supprimer ou non - // la donnée corba associée à un DataId ! Ne pas effectuer la desallocation suivante : - // DataManipulator::delete_data(corbaData); - } -#ifdef _DEBUG_ + } +#ifdef MYDEBUG std::cout << "-------- CalciumInterface(ecp_lecture), Valeur de data : " << std::endl; std::copy(data,data+nRead,std::ostream_iterator(std::cout," ")); std::cout << "Ptr :" << data << std::endl; - std::cout << "-------- CalciumInterface(ecp_lecture) MARK 13 ------------------" << std::endl; #endif - - + Engines_DSC_interface::writeEvent("END_READ",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPOK],msgout.str().c_str()); return; } - // T1 est le type de données + // T1 is the data type template static void ecp_lecture ( Superv_Component_i & component, - int const & dependencyType, - double & ti, - double const & tf, - long & i, - const std::string & nomVar, - size_t bufferLength, - size_t & nRead, - T1 * &data ) + int const & dependencyType, + double & ti, + double const & tf, + long & i, + const std::string & nomVar, + size_t bufferLength, + size_t & nRead, + T1 * &data ) { ecp_lecture (component,dependencyType,ti,tf, - i,nomVar,bufferLength,nRead,data); + i,nomVar,bufferLength,nRead,data); } - /********************* INTERFACES D'ECRITURE *****************/ + /********************* WRITING INTERFACE *****************/ // T1 : DataType // T2 : PortType template static void ecp_ecriture ( Superv_Component_i & component, - int const & dependencyType, - double const & t, - long const & i, - const std::string & nomVar, - size_t bufferLength, - T1 const & data ) + int const & dependencyType, + double const & t, + long const & i, + const std::string & nomVar, + size_t bufferLength, + T1 const & data ) { assert(&component); + CORBA::String_var componentName=component.instanceName(); + std::string containerName=component.getContainerName(); //typedef typename StarTrait::NonStarType T; - typedef typename boost::remove_all_extents< T2 >::type T2_without_extent; typedef typename boost::remove_all_extents< T1 >::type T1_without_extent; - + typedef typename boost::remove_all_extents< T2 >::type T2_without_extent; typedef typename UsesPortTraits ::PortType UsesPortType; typedef typename ProvidesPortTraits::PortType ProvidesPortType;// pour obtenir un manipulateur de données typedef typename ProvidesPortType::DataManipulator DataManipulator; @@ -365,41 +429,49 @@ namespace CalciumInterface { T1_without_extent const & _data = data; - CalciumTypes::DependencyType _dependencyType= + CalciumTypes::DependencyType _dependencyType= static_cast(dependencyType); -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cerr << "-------- CalciumInterface(ecriture) MARK 1 ------------------" << std::endl; #endif - if ( nomVar.empty() ) throw CalciumException(CalciumTypes::CPNMVR, - LOC("Le nom de la variable est ")); + if ( nomVar.empty() ) + { + Engines_DSC_interface::writeEvent("WRITE",containerName,componentName,"",CPMESSAGE[CalciumTypes::CPNMVR],""); + throw CalciumException(CalciumTypes::CPNMVR, LOC("Empty variable name")); + } UsesPortType * port; -#ifdef _DEBUG_ - std::cout << "-------- CalciumInterface(ecriture) MARK 2 ------------------" << std::endl; +#ifdef MYDEBUG + std::cout << "-------- CalciumInterface(ecriture) MARK 2 ---"< (nomVar.c_str()); -#ifdef _DEBUG_ - std::cout << "-------- CalciumInterface(ecriture) MARK 3 ------------------" << std::endl; -#endif - } catch ( const Superv_Component_i::PortNotDefined & ex) { -#ifdef _DEBUG_ - std::cerr << ex.what() << std::endl; -#endif - throw (CalciumException(CalciumTypes::CPNMVR,ex)); - } catch ( const Superv_Component_i::PortNotConnected & ex) { -#ifdef _DEBUG_ - std::cerr << ex.what() << std::endl;; -#endif - throw (CalciumException(CalciumTypes::CPLIEN,ex)); - // VERIFIER LES CAS DES CODES : CPINARRET, CPSTOPSEQ, CPCTVR, CPLIEN - } catch ( const Superv_Component_i::BadCast & ex) { -#ifdef _DEBUG_ - std::cerr << ex.what() << std::endl; + try + { + port = component.Superv_Component_i::get_port< UsesPortType > (nomVar.c_str()); +#ifdef MYDEBUG + std::cout << "-------- CalciumInterface(ecriture) MARK 3 ------------------" << std::endl; #endif - throw (CalciumException(CalciumTypes::CPTPVR,ex)); - } + } + catch ( const Superv_Component_i::PortNotDefined & ex) + { + Engines_DSC_interface::writeEvent("WRITE",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPNMVR],ex.what()); + throw (CalciumException(CalciumTypes::CPNMVR,ex)); + } + catch ( const Superv_Component_i::PortNotConnected & ex) + { + Engines_DSC_interface::writeEvent("WRITE",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPLIEN],ex.what()); + throw (CalciumException(CalciumTypes::CPLIEN,ex)); + // VERIFIER LES CAS DES CODES : CPINARRET, CPSTOPSEQ, CPCTVR, CPLIEN + } + catch ( const Superv_Component_i::BadCast & ex) + { + Engines_DSC_interface::writeEvent("WRITE",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPTPVR],ex.what()); + throw (CalciumException(CalciumTypes::CPTPVR,ex)); + } // mode == mode du port // On pourrait créer la méthode CORBA dans le mode de Couplage CALCIUM. @@ -415,14 +487,18 @@ namespace CalciumInterface { // } if ( _dependencyType == CalciumTypes::UNDEFINED_DEPENDENCY ) - throw CalciumException(CalciumTypes::CPIT, - LOC(OSS()<<"Le mode de dépendance demandé pour la variable " - << nomVar << " est indéfini.")); + { + Engines_DSC_interface::writeEvent("WRITE",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPIT],"Dependency mode is undefined"); + throw CalciumException(CalciumTypes::CPIT, LOC(OSS()<<"Dependency mode of variable " << nomVar << " is undefined.")); + } if ( _dependencyType == CalciumTypes::SEQUENCE_DEPENDENCY ) - throw CalciumException(CalciumTypes::CPIT, - LOC(OSS()<<"Le mode de dépendance SEQUENCE_DEPENDENCY pour la variable " - << nomVar << " est impossible en écriture.")); + { + Engines_DSC_interface::writeEvent("WRITE",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPIT], + "SEQUENCE_DEPENDENCY mode is not possible when writing"); + throw CalciumException(CalciumTypes::CPIT, LOC(OSS()<<"Dependency mode SEQUENCE_DEPENDENCY for variable " << nomVar + << " is not possible when writing.")); + } // Il faudrait que le port provides génère une exception si le mode donnée n'est pas // le bon. La seule façon de le faire est d'envoyer -1 en temps si on n'est en itération @@ -431,20 +507,20 @@ namespace CalciumInterface { // ----> // if ( portDependencyType != _dependencyType ) // throw CalciumException(CalciumTypes::CPITVR, -// LOC(OSS()<<"Le mode de dépendance de la variable " -// << nomVar << " ne correspond pas au mode demandé.")); +// LOC(OSS()<<"Le mode de dépendance de la variable " +// << nomVar << " ne correspond pas au mode demandé.")); if ( bufferLength < 1 ) - throw CalciumException(CalciumTypes::CPNTNULL, - LOC(OSS()<<"Le buffer a envoyer est de taille nulle ")); - + { + Engines_DSC_interface::writeEvent("WRITE",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPNTNULL],"Buffer to send is empty"); + throw CalciumException(CalciumTypes::CPNTNULL, LOC(OSS()<<"Buffer to send is empty")); + } -#ifdef _DEBUG_ + CorbaDataType corbaData; +#ifdef MYDEBUG std::cout << "-------- CalciumInterface(ecriture) MARK 4 ------------------" << std::endl; #endif - CorbaDataType corbaData; - // Si les types Utilisateurs et CORBA sont différents // il faut effectuer une recopie sinon on utilise directement le @@ -466,40 +542,56 @@ namespace CalciumInterface { // OLD : Il faut effectuer une copie dans le port provides. // OLD : Cette copie est effectuée dans GenericPortUses::put // OLD : en fonction de la collocalisation ou non. +#ifdef MYDEBUG + T1_without_extent t1b; + InnerType t2b; + std::cout << "-------- CalciumInterface(ecriture) MARK 4b1 -----" << typeid(t1b).name() << "-------------" << std::endl; + std::cout << "-------- CalciumInterface(ecriture) MARK 4b2 -----" << typeid(t2b).name() << "-------------" << std::endl; +#endif + Copy2CorbaSpace::value, DataManipulator >::apply(corbaData,_data,bufferLength); - //TODO : GERER LES EXCEPTIONS ICI : ex le port n'est pas connecté - if ( _dependencyType == CalciumTypes::TIME_DEPENDENCY ) { - try - { - port->put(*corbaData,t, -1); - } - catch ( const DSC_Exception & ex) + //TODO : GERER LES EXCEPTIONS ICI : ex le port n'est pas connecte + if ( _dependencyType == CalciumTypes::TIME_DEPENDENCY ) { - throw (CalciumException(CalciumTypes::CPATAL,ex.what())); - } - //Le -1 peut être traité par le cst DataIdContainer et transformé en 0 - //Etre obligé de mettre une étoile ds (*corbadata) va poser des pb pour les types <> seq -#ifdef _DEBUG_ - std::cout << "-------- CalciumInterface(ecriture) MARK 5 ------------------" << std::endl; + try + { + port->put(*corbaData,t, -1); + std::stringstream msg; + msg << "t=" << t ; + Engines_DSC_interface::writeEvent("WRITE",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPOK],msg.str().c_str()); + } + catch ( const DSC_Exception & ex) + { + Engines_DSC_interface::writeEvent("WRITE",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPATAL],ex.what()); + throw (CalciumException(CalciumTypes::CPATAL,ex.what())); + } + //Le -1 peut être traité par le cst DataIdContainer et transformé en 0 + //Etre obligé de mettre une étoile ds (*corbadata) va poser des pb pour les types <> seq +#ifdef MYDEBUG + std::cout << "-------- CalciumInterface(ecriture) MARK 5 ------------------" << std::endl; #endif - } - else if ( _dependencyType == CalciumTypes::ITERATION_DEPENDENCY ) { - try - { - port->put(*corbaData,-1, i); - } - catch ( const DSC_Exception & ex) + } + else if ( _dependencyType == CalciumTypes::ITERATION_DEPENDENCY ) { - throw (CalciumException(CalciumTypes::CPATAL,ex.what())); - } -#ifdef _DEBUG_ - std::cout << "-------- CalciumInterface(ecriture) MARK 6 ------------------" << std::endl; + try + { + port->put(*corbaData,-1, i); + std::stringstream msg; + msg << "i=" << i ; + Engines_DSC_interface::writeEvent("WRITE",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPOK],msg.str().c_str()); + } + catch ( const DSC_Exception & ex) + { + Engines_DSC_interface::writeEvent("WRITE",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPATAL],ex.what()); + throw (CalciumException(CalciumTypes::CPATAL,ex.what())); + } +#ifdef MYDEBUG + std::cout << "-------- CalciumInterface(ecriture) MARK 6 ------------------" << std::endl; #endif - } - + } -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- CalciumInterface(ecriture), Valeur de corbaData : " << std::endl; for (int i = 0; i < corbaData->length(); ++i) std::cout << "-------- CalciumInterface(ecriture), corbaData[" << i << "] = " << (*corbaData)[i] << std::endl; @@ -509,7 +601,7 @@ namespace CalciumInterface { // Supprime l'objet CORBA avec eventuellement les données qu'il contient (cas de la recopie) delete corbaData; -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- CalciumInterface(ecriture) MARK 7 ------------------" << std::endl; #endif @@ -518,15 +610,252 @@ namespace CalciumInterface { template static void ecp_ecriture ( Superv_Component_i & component, - int const & dependencyType, - double const & t, - long const & i, - const std::string & nomVar, - size_t bufferLength, - T1 const & data ) { + int const & dependencyType, + double const & t, + long const & i, + const std::string & nomVar, + size_t bufferLength, + T1 const & data ) + { ecp_ecriture (component,dependencyType,t,i,nomVar,bufferLength,data); }; + static inline void + ecp_fini(Superv_Component_i & component,const std::string & nomVar,long const & i) + { + CORBA::String_var componentName=component.instanceName(); + std::string containerName=component.getContainerName(); + + if (nomVar.empty()) + { + Engines_DSC_interface::writeEvent("CP_FINI",containerName,componentName,"",CPMESSAGE[CalciumTypes::CPNMVR],""); + throw CalciumException(CalciumTypes::CPNMVR, LOC("Empty variable name")); + } + + calcium_provides_port* port; + + try + { + port = component.Superv_Component_i::get_port< calcium_provides_port >(nomVar.c_str()); + } + catch ( const Superv_Component_i::PortNotDefined & ex) + { + Engines_DSC_interface::writeEvent("CP_FINI",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPNMVR],ex.what()); + throw (CalciumException(CalciumTypes::CPNMVR,ex)); + } + catch ( const Superv_Component_i::PortNotConnected & ex) + { + Engines_DSC_interface::writeEvent("CP_FINI",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPLIEN],ex.what()); + throw (CalciumException(CalciumTypes::CPLIEN,ex)); + } + catch ( const Superv_Component_i::BadCast & ex) + { + Engines_DSC_interface::writeEvent("CP_FINI",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPTPVR],ex.what()); + throw (CalciumException(CalciumTypes::CPTPVR,ex)); + } + + // get dependency mode + CalciumTypes::DependencyType portDependencyType = port->getDependencyType(); + + if ( portDependencyType == CalciumTypes::UNDEFINED_DEPENDENCY ) + { + Engines_DSC_interface::writeEvent("CP_FINI",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPIT],"Dependency mode is undefined"); + throw CalciumException(CalciumTypes::CPIT, LOC(OSS()<<"Dependency mode of variable " << nomVar << " is undefined.")); + } + + if ( portDependencyType != CalciumTypes::ITERATION_DEPENDENCY ) + { + Engines_DSC_interface::writeEvent("CP_FINI",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPIT], + "Dependency mode must be iteration mode"); + throw CalciumException(CalciumTypes::CPITVR, LOC(OSS()<<"Dependency mode of variable " << nomVar << ": " + << portDependencyType << " must be iteration mode.")); + } + + port->calcium_erase(0., i,true); + + std::stringstream msg; + msg << "i<=" << i ; + Engines_DSC_interface::writeEvent("CP_FINI",containerName,componentName,nomVar.c_str(),"",msg.str().c_str()); + + }; + + static inline void + ecp_fint(Superv_Component_i & component,const std::string & nomVar,double const & t) + { + CORBA::String_var componentName=component.instanceName(); + std::string containerName=component.getContainerName(); + + if (nomVar.empty()) + { + Engines_DSC_interface::writeEvent("CP_FINT",containerName,componentName,"",CPMESSAGE[CalciumTypes::CPNMVR],""); + throw CalciumException(CalciumTypes::CPNMVR, LOC("Empty variable name")); + } + + calcium_provides_port* port; + + try + { + port = component.Superv_Component_i::get_port< calcium_provides_port >(nomVar.c_str()); + } + catch ( const Superv_Component_i::PortNotDefined & ex) + { + Engines_DSC_interface::writeEvent("CP_FINT",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPNMVR],ex.what()); + throw (CalciumException(CalciumTypes::CPNMVR,ex)); + } + catch ( const Superv_Component_i::PortNotConnected & ex) + { + Engines_DSC_interface::writeEvent("CP_FINT",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPLIEN],ex.what()); + throw (CalciumException(CalciumTypes::CPLIEN,ex)); + } + catch ( const Superv_Component_i::BadCast & ex) + { + Engines_DSC_interface::writeEvent("CP_FINT",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPTPVR],ex.what()); + throw (CalciumException(CalciumTypes::CPTPVR,ex)); + } + + // get dependency mode + CalciumTypes::DependencyType portDependencyType = port->getDependencyType(); + + if ( portDependencyType == CalciumTypes::UNDEFINED_DEPENDENCY ) + { + Engines_DSC_interface::writeEvent("CP_FINT",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPIT],"Dependency mode is undefined"); + throw CalciumException(CalciumTypes::CPIT, LOC(OSS()<<"Dependency mode of variable " << nomVar << " is undefined.")); + } + + if ( portDependencyType != CalciumTypes::TIME_DEPENDENCY ) + { + Engines_DSC_interface::writeEvent("CP_FINT",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPIT], + "Dependency mode must be time mode"); + throw CalciumException(CalciumTypes::CPITVR, LOC(OSS()<<"Dependency mode of variable " << nomVar << ": " + << portDependencyType << " must be time mode.")); + } + + port->calcium_erase(t, 0,true); + + std::stringstream msg; + msg << "t<=" << t ; + Engines_DSC_interface::writeEvent("CP_FINT",containerName,componentName,nomVar.c_str(),"",msg.str().c_str()); + + }; + + static inline void + ecp_effi(Superv_Component_i & component,const std::string & nomVar,long const & i) + { + CORBA::String_var componentName=component.instanceName(); + std::string containerName=component.getContainerName(); + + if (nomVar.empty()) + { + Engines_DSC_interface::writeEvent("CP_EFFI",containerName,componentName,"",CPMESSAGE[CalciumTypes::CPNMVR],""); + throw CalciumException(CalciumTypes::CPNMVR, LOC("Empty variable name")); + } + + calcium_provides_port* port; + + try + { + port = component.Superv_Component_i::get_port< calcium_provides_port >(nomVar.c_str()); + } + catch ( const Superv_Component_i::PortNotDefined & ex) + { + Engines_DSC_interface::writeEvent("CP_EFFI",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPNMVR],ex.what()); + throw (CalciumException(CalciumTypes::CPNMVR,ex)); + } + catch ( const Superv_Component_i::PortNotConnected & ex) + { + Engines_DSC_interface::writeEvent("CP_EFFI",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPLIEN],ex.what()); + throw (CalciumException(CalciumTypes::CPLIEN,ex)); + } + catch ( const Superv_Component_i::BadCast & ex) + { + Engines_DSC_interface::writeEvent("CP_EFFI",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPTPVR],ex.what()); + throw (CalciumException(CalciumTypes::CPTPVR,ex)); + } + + // get dependency mode + CalciumTypes::DependencyType portDependencyType = port->getDependencyType(); + + if ( portDependencyType == CalciumTypes::UNDEFINED_DEPENDENCY ) + { + Engines_DSC_interface::writeEvent("CP_EFFI",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPIT],"Dependency mode is undefined"); + throw CalciumException(CalciumTypes::CPIT, LOC(OSS()<<"Dependency mode of variable " << nomVar << " is undefined.")); + } + + if ( portDependencyType != CalciumTypes::ITERATION_DEPENDENCY ) + { + Engines_DSC_interface::writeEvent("CP_EFFI",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPIT], + "Dependency mode must be iteration mode"); + throw CalciumException(CalciumTypes::CPITVR, LOC(OSS()<<"Dependency mode of variable " << nomVar << ": " + << portDependencyType << " must be iteration mode.")); + } + + port->calcium_erase(0., i,false); + + std::stringstream msg; + msg << "i>=" << i ; + Engines_DSC_interface::writeEvent("CP_EFFI",containerName,componentName,nomVar.c_str(),"",msg.str().c_str()); + + }; + + static inline void + ecp_efft(Superv_Component_i & component,const std::string & nomVar,double const & t) + { + CORBA::String_var componentName=component.instanceName(); + std::string containerName=component.getContainerName(); + + if (nomVar.empty()) + { + Engines_DSC_interface::writeEvent("CP_EFFT",containerName,componentName,"",CPMESSAGE[CalciumTypes::CPNMVR],""); + throw CalciumException(CalciumTypes::CPNMVR, LOC("Empty variable name")); + } + + calcium_provides_port* port; + + try + { + port = component.Superv_Component_i::get_port< calcium_provides_port >(nomVar.c_str()); + } + catch ( const Superv_Component_i::PortNotDefined & ex) + { + Engines_DSC_interface::writeEvent("CP_EFFT",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPNMVR],ex.what()); + throw (CalciumException(CalciumTypes::CPNMVR,ex)); + } + catch ( const Superv_Component_i::PortNotConnected & ex) + { + Engines_DSC_interface::writeEvent("CP_EFFT",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPLIEN],ex.what()); + throw (CalciumException(CalciumTypes::CPLIEN,ex)); + } + catch ( const Superv_Component_i::BadCast & ex) + { + Engines_DSC_interface::writeEvent("CP_EFFT",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPTPVR],ex.what()); + throw (CalciumException(CalciumTypes::CPTPVR,ex)); + } + + // get dependency mode + CalciumTypes::DependencyType portDependencyType = port->getDependencyType(); + + if ( portDependencyType == CalciumTypes::UNDEFINED_DEPENDENCY ) + { + Engines_DSC_interface::writeEvent("CP_EFFT",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPIT],"Dependency mode is undefined"); + throw CalciumException(CalciumTypes::CPIT, LOC(OSS()<<"Dependency mode of variable " << nomVar << " is undefined.")); + } + + if ( portDependencyType != CalciumTypes::TIME_DEPENDENCY ) + { + Engines_DSC_interface::writeEvent("CP_EFFT",containerName,componentName,nomVar.c_str(),CPMESSAGE[CalciumTypes::CPIT], + "Dependency mode must be time mode"); + throw CalciumException(CalciumTypes::CPITVR, LOC(OSS()<<"Dependency mode of variable " << nomVar << ": " + << portDependencyType << " must be time mode.")); + } + + port->calcium_erase(t, 0,false); + + std::stringstream msg; + msg << "t>=" << t ; + Engines_DSC_interface::writeEvent("CP_EFFT",containerName,componentName,nomVar.c_str(),"",msg.str().c_str()); + + }; + }; #endif diff --git a/src/DSC/DSC_User/Datastream/Calcium/CalciumException.hxx b/src/DSC/DSC_User/Datastream/Calcium/CalciumException.hxx index 4587f71bb..64654e620 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/CalciumException.hxx +++ b/src/DSC/DSC_User/Datastream/Calcium/CalciumException.hxx @@ -1,24 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : CalciumException.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -29,6 +27,10 @@ #ifndef CALCIUM_EXCEPTION_HXX #define CALCIUM_EXCEPTION_HXX +#if defined(__CONST_H) || defined(__CALCIUM_H) +#error "The header CalciumException.hxx must be included before calcium.h" +#endif + #include "DSC_Exception.hxx" #include "CalciumTypes.hxx" #include @@ -36,17 +38,17 @@ struct CalciumException : public DSC_Exception { CalciumException( const CalciumTypes::InfoType info, - const std::string & text, - const char *fileName, - const unsigned int lineNumber, - const char *funcName): + const std::string & text, + const char *fileName, + const unsigned int lineNumber, + const char *funcName): DSC_Exception(text,fileName,lineNumber,funcName), _info(info),_exceptionName("CalciumException") {}; CalciumException( const CalciumTypes::InfoType info, - const std::string & text ): + const std::string & text ): DSC_Exception(text),_info(info),_exceptionName("CalciumException") {}; diff --git a/src/DSC/DSC_User/Datastream/Calcium/CalciumFortranInt.h.in b/src/DSC/DSC_User/Datastream/Calcium/CalciumFortranInt.h.in new file mode 100644 index 000000000..6efaf771c --- /dev/null +++ b/src/DSC/DSC_User/Datastream/Calcium/CalciumFortranInt.h.in @@ -0,0 +1,42 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +/* + File : CalciumInterface.hxx + Author : Eric Fayolle (EDF) + Module : KERNEL + Modified by : $LastChangedBy$ + Date : $LastChangedDate: 2007-03-01 13:27:58 +0100 (jeu, 01 mar 2007) $ + Id : $Id$ +*/ + +#ifndef _CALCIUM_FORTRAN_INT_H_ +#define _CALCIUM_FORTRAN_INT_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +typedef @LONG_OR_INT@ cal_int; + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/src/DSC/DSC_User/Datastream/Calcium/CalciumGenericProvidesPort.hxx b/src/DSC/DSC_User/Datastream/Calcium/CalciumGenericProvidesPort.hxx index 50ae4bd53..2150151d6 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/CalciumGenericProvidesPort.hxx +++ b/src/DSC/DSC_User/Datastream/Calcium/CalciumGenericProvidesPort.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : CalciumGenericProvidesPort.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -54,22 +55,22 @@ // (qui est considéré comme un séparateur d'argument par le PP ) #define CALCIUM_GENERIC_PROVIDES_PORT_HXX(specificPortName,CorbaInterface,...) \ - class specificPortName : public virtual CorbaInterface , \ - public virtual POA_Ports::PortProperties, \ - public GenericProvidesPort< __VA_ARGS__ , CalciumCouplingPolicy, calcium_provides_port > { \ - private : \ + class specificPortName : public virtual CorbaInterface , \ + public virtual POA_Ports::PortProperties, \ + public GenericProvidesPort< __VA_ARGS__ , CalciumCouplingPolicy, calcium_provides_port > { \ + private : \ omni_mutex _disconnect_mutex; \ int _mustnotdisconnect; \ - public : \ - typedef __VA_ARGS__ DataManipulator; \ - typedef DataManipulator::Type CorbaDataType; \ - typedef GenericPort< DataManipulator , \ - CalciumCouplingPolicy > Port; \ + public : \ + typedef __VA_ARGS__ DataManipulator; \ + typedef DataManipulator::Type CorbaDataType; \ + typedef GenericPort< DataManipulator , \ + CalciumCouplingPolicy > Port; \ specificPortName () : _mustnotdisconnect(0) {}; \ - \ - virtual ~ specificPortName (); \ - \ - inline void disconnect(bool provideLastGivenValue) { \ + \ + virtual ~ specificPortName (); \ + \ + inline void disconnect(bool provideLastGivenValue) { \ _disconnect_mutex.lock(); \ if(_mustnotdisconnect > 1) \ { \ @@ -81,157 +82,162 @@ Port::disconnect(provideLastGivenValue); \ } \ _disconnect_mutex.unlock(); \ - } \ + } \ inline void setDependencyType(CalciumTypes::DependencyType dependencyType) { \ - Port::setDependencyType(dependencyType); \ - } \ - inline CalciumTypes::DependencyType getDependencyType () const { \ - return Port::getDependencyType(); \ - } \ - inline void setStorageLevel (size_t storageLevel) { \ - Port::setStorageLevel(storageLevel); \ - } \ - inline size_t getStorageLevel () const { \ - return Port::getStorageLevel(); \ - } \ + Port::setDependencyType(dependencyType); \ + } \ + inline CalciumTypes::DependencyType getDependencyType () const { \ + return Port::getDependencyType(); \ + } \ + inline void setStorageLevel (size_t storageLevel) { \ + Port::setStorageLevel(storageLevel); \ + } \ + inline size_t getStorageLevel () const { \ + return Port::getStorageLevel(); \ + } \ inline void setDateCalSchem (CalciumTypes::DateCalSchem dateCalSchem) { \ - Port::setDateCalSchem (dateCalSchem); \ - } \ - inline CalciumTypes::DateCalSchem getDateCalSchem () const { \ - return Port::getDateCalSchem (); \ - } \ - inline void setAlpha(double alpha) { \ - Port::setAlpha(alpha); \ - } \ - inline double getAlpha() const { \ - return Port::getAlpha(); \ - } \ - inline void setDeltaT(double deltaT ) { \ - Port::setDeltaT(deltaT); \ - } \ - inline double getDeltaT() const { \ - return Port::getDeltaT(); \ - } \ + Port::setDateCalSchem (dateCalSchem); \ + } \ + inline CalciumTypes::DateCalSchem getDateCalSchem () const { \ + return Port::getDateCalSchem (); \ + } \ + inline void setAlpha(double alpha) { \ + Port::setAlpha(alpha); \ + } \ + inline double getAlpha() const { \ + return Port::getAlpha(); \ + } \ + inline void setDeltaT(double deltaT ) { \ + Port::setDeltaT(deltaT); \ + } \ + inline double getDeltaT() const { \ + return Port::getDeltaT(); \ + } \ inline void setInterpolationSchem (CalciumTypes::InterpolationSchem interpolationSchem) { \ - Port::setInterpolationSchem(interpolationSchem); \ - } \ + Port::setInterpolationSchem(interpolationSchem); \ + } \ inline void setExtrapolationSchem (CalciumTypes::ExtrapolationSchem extrapolationSchem) { \ - Port::setExtrapolationSchem(extrapolationSchem); \ - } \ + Port::setExtrapolationSchem(extrapolationSchem); \ + } \ inline CalciumTypes::InterpolationSchem getInterpolationSchem() const { \ - return Port::getInterpolationSchem(); \ - } \ + return Port::getInterpolationSchem(); \ + } \ inline CalciumTypes::ExtrapolationSchem getExtrapolationSchem() const { \ - return Port::getExtrapolationSchem(); \ - } \ - \ - inline void put( DataManipulator::CorbaInType data, \ - CORBA::Double time, CORBA::Long tag) { \ - Port::put(data, time, tag); \ - } \ - \ - inline Ports::Port_ptr get_port_ref() { \ - return _this(); \ - } \ - \ - Ports::PortProperties_ptr get_port_properties() { \ - return POA_Ports::PortProperties::_this(); \ - } \ - \ + return Port::getExtrapolationSchem(); \ + } \ + \ + inline void put( DataManipulator::CorbaInType data, \ + CORBA::Double time, CORBA::Long tag) { \ + Port::put(data, time, tag); \ + } \ + \ + inline Ports::Port_ptr get_port_ref() { \ + return _this(); \ + } \ + \ + Ports::PortProperties_ptr get_port_properties() { \ + return POA_Ports::PortProperties::_this(); \ + } \ + \ virtual void set_property(const char * name, const CORBA::Any& value) \ - throw (Ports::NotDefined, Ports::BadType, Ports::BadValue); \ - \ - virtual CORBA::Any* get_property(const char* name) \ - throw (Ports::NotDefined); \ - \ - virtual void provides_port_changed(int connection_nbr, \ - const Engines::DSC::Message message) { \ - if ( message == Engines::DSC::AddingConnection) \ - { \ - _disconnect_mutex.lock(); \ - _mustnotdisconnect++; \ - _disconnect_mutex.unlock(); \ - } \ - else if ( message == Engines::DSC::RemovingConnection ) \ - { \ - disconnect(false); \ - } \ - } \ - }; \ + throw (Ports::NotDefined, Ports::BadType, Ports::BadValue); \ + \ + virtual CORBA::Any* get_property(const char* name) \ + throw (Ports::NotDefined); \ + \ + virtual void provides_port_changed(int connection_nbr, \ + const Engines::DSC::Message message) { \ + if ( message == Engines::DSC::AddingConnection) \ + { \ + _disconnect_mutex.lock(); \ + _mustnotdisconnect++; \ + _disconnect_mutex.unlock(); \ + } \ + else if ( message == Engines::DSC::RemovingConnection ) \ + { \ + disconnect(false); \ + } \ + } \ + \ + inline void calcium_erase(float t,long i, bool before) \ + { \ + erase(t,i,before); \ + } \ + }; \ -#define CALCIUM_GENERIC_PROVIDES_PORT_CXX(specificPortName) \ - \ - specificPortName::~specificPortName(void) {}; \ - \ +#define CALCIUM_GENERIC_PROVIDES_PORT_CXX(specificPortName) \ + \ + specificPortName::~specificPortName(void) {}; \ + \ void specificPortName::set_property(const char * name, const CORBA::Any& value) \ - throw (Ports::NotDefined, Ports::BadType, Ports::BadValue) { \ - \ - const std::string key(name); \ - CORBA::Long sl; \ - CORBA::Double alpha,delta; \ - Ports::Calcium_Ports::DependencyType dt; \ - Ports::Calcium_Ports::DateCalSchem dcs; \ - Ports::Calcium_Ports::InterpolationSchem is; \ - Ports::Calcium_Ports::ExtrapolationSchem es; \ - bool ok=false; \ - \ - try { \ - \ - if (key == "StorageLevel" ) \ - {if ( ok=(value >>= sl) ) Port::setStorageLevel(sl);} \ - else if (key == "Alpha" ) \ - {if ( ok=(value >>= alpha) ) Port::setAlpha(alpha);} \ - else if (key == "DeltaT" ) \ - {if ( ok=(value >>= delta) ) Port::setDeltaT(delta);} \ - else if (key == "DependencyType" ) \ - {if ( ok=( value >>= dt) ) Port::setDependencyType(dependencyType[dt]);} \ - else if (key == "DateCalSchem" ) \ - {if ( ok=(value >>= dcs) ) \ - Port::setDateCalSchem(dateCalSchem[dcs]);} \ - else if (key == "InterpolationSchem") \ - {if ( ok=(value >>= is) ) \ - Port::setInterpolationSchem(interpolationSchem[is]);} \ - else if (key == "ExtrapolationSchem") \ - {if ( ok=(value >>= es) ) \ - Port::setExtrapolationSchem(extrapolationSchem[es]);} \ - else \ - throw Ports::NotDefined(); \ - if (!ok) throw Ports::BadType(); \ - \ - } catch ( const DSC_Exception & ex ) { \ - \ - std::cerr << ex.what() << std::endl; \ - throw Ports::BadValue(); \ - } \ - } \ - \ - \ - CORBA::Any* specificPortName::get_property(const char* name) \ - throw (Ports::NotDefined) { \ - const std::string key(name); \ - CORBA::Any* value=new CORBA::Any; \ - if (key == "StorageLevel" ) \ + throw (Ports::NotDefined, Ports::BadType, Ports::BadValue) { \ + \ + const std::string key(name); \ + CORBA::Long sl; \ + CORBA::Double alpha,delta; \ + Ports::Calcium_Ports::DependencyType dt; \ + Ports::Calcium_Ports::DateCalSchem dcs; \ + Ports::Calcium_Ports::InterpolationSchem is; \ + Ports::Calcium_Ports::ExtrapolationSchem es; \ + bool ok=false; \ + \ + try { \ + \ + if (key == "StorageLevel" ) \ + {if ( ( ok=(value >>= sl) ) ) Port::setStorageLevel(sl);} \ + else if (key == "Alpha" ) \ + {if ( ( ok=(value >>= alpha) ) ) Port::setAlpha(alpha);} \ + else if (key == "DeltaT" ) \ + {if ( ( ok=(value >>= delta) ) ) Port::setDeltaT(delta);} \ + else if (key == "DependencyType" ) \ + {if ( ( ok=( value >>= dt) ) ) Port::setDependencyType(dependencyType[dt]);} \ + else if (key == "DateCalSchem" ) \ + {if ( ( ok=(value >>= dcs) ) ) \ + Port::setDateCalSchem(dateCalSchem[dcs]);} \ + else if (key == "InterpolationSchem") \ + {if ( ( ok=(value >>= is) ) ) \ + Port::setInterpolationSchem(interpolationSchem[is]);} \ + else if (key == "ExtrapolationSchem") \ + {if ( ( ok=(value >>= es) ) ) \ + Port::setExtrapolationSchem(extrapolationSchem[es]);} \ + else \ + throw Ports::NotDefined(); \ + if (!ok) throw Ports::BadType(); \ + \ + } catch ( const DSC_Exception & ex ) { \ + \ + std::cerr << ex.what() << std::endl; \ + throw Ports::BadValue(); \ + } \ + } \ + \ + \ + CORBA::Any* specificPortName::get_property(const char* name) \ + throw (Ports::NotDefined) { \ + const std::string key(name); \ + CORBA::Any* value=new CORBA::Any; \ + if (key == "StorageLevel" ) \ { (*value) <<= static_cast(Port::getStorageLevel()); } \ - else if (key == "Alpha" ) \ - { *value <<= (CORBA::Double) Port::getAlpha();} \ - else if (key == "DeltaT" ) \ - { *value <<= (CORBA::Double) Port::getDeltaT();} \ - else if (key == "DependencyType" ) \ - { *value <<= corbaDependencyType[Port::getDependencyType()];} \ - else if (key == "DateCalSchem" ) \ - { *value <<= corbaDateCalSchem[Port::getDateCalSchem()];} \ - else if (key == "InterpolationSchem") \ + else if (key == "Alpha" ) \ + { *value <<= (CORBA::Double) Port::getAlpha();} \ + else if (key == "DeltaT" ) \ + { *value <<= (CORBA::Double) Port::getDeltaT();} \ + else if (key == "DependencyType" ) \ + { *value <<= corbaDependencyType[Port::getDependencyType()];} \ + else if (key == "DateCalSchem" ) \ + { *value <<= corbaDateCalSchem[Port::getDateCalSchem()];} \ + else if (key == "InterpolationSchem") \ { *value <<= corbaInterpolationSchem[Port::getInterpolationSchem()];} \ - else if (key == "ExtrapolationSchem") \ + else if (key == "ExtrapolationSchem") \ { *value <<= corbaExtrapolationSchem[Port::getExtrapolationSchem()];} \ - else { \ - delete value; \ - throw Ports::NotDefined(); \ - } \ - return value; \ - }; - + else { \ + delete value; \ + throw Ports::NotDefined(); \ + } \ + return value; \ + }; + #endif diff --git a/src/DSC/DSC_User/Datastream/Calcium/CalciumGenericUsesPort.hxx b/src/DSC/DSC_User/Datastream/Calcium/CalciumGenericUsesPort.hxx index f42338ea9..437c984b8 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/CalciumGenericUsesPort.hxx +++ b/src/DSC/DSC_User/Datastream/Calcium/CalciumGenericUsesPort.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : CalciumGenericUsesPort.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -32,7 +33,7 @@ template class CalciumGenericUsesPort : public GenericUsesPort + calcium_uses_port > { public : virtual ~CalciumGenericUsesPort() {}; @@ -53,7 +54,9 @@ CalciumGenericUsesPort< DataManipulator,CorbaPortType, repositoryName >::disconn for(int i = 0; i < this->_my_ports->length(); i++) { CorbaPortTypePtr port = CorbaPortType::_narrow((*this->_my_ports)[i]); try { +#ifdef MYDEBUG std::cerr << "-------- CalciumGenericUsesPort<>::disconnect: "<< i << std::endl; +#endif port->disconnect(provideLastGivenValue); } catch(const CORBA::SystemException& ex){ diff --git a/src/DSC/DSC_User/Datastream/Calcium/CalciumInterface.hxx b/src/DSC/DSC_User/Datastream/Calcium/CalciumInterface.hxx index 5d2422fa0..d3d9106d1 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/CalciumInterface.hxx +++ b/src/DSC/DSC_User/Datastream/Calcium/CalciumInterface.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : CalciumInterface.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -29,232 +30,21 @@ #ifndef _CALCIUM_INTERFACE_HXX_ #define _CALCIUM_INTERFACE_HXX_ -//Interface CALCIUM des utilisateurs en C++ -#include "CalciumCxxInterface.hxx" - -#include "CalciumException.hxx" -#include "CalciumTypes.hxx" - -#include - -//Ce fichier déclare et défini l'interfaçage entre l'API utilisteur C et C++ -//Les procédures déclarées n'ont pas vocation à être utilisées directement (celà est -// cependant possible). -//#define _DEBUG_ - -#ifdef _DEBUG_ -#define DEBTRACE(msg) {std::cerr< struct CalTimeType { - typedef float TimeType; -}; - -template <> struct CalTimeType { - typedef double TimeType; -}; - -// Définition de ecp_fin -extern "C" CalciumTypes::InfoType -ecp_fin_ (void * component, int code) { - - Superv_Component_i * _component = static_cast(component); - - bool provideLastGivenValue = false; - if (code == CalciumTypes::CP_CONT ) provideLastGivenValue = true; - - try { - CalciumInterface::ecp_fin( *_component, - provideLastGivenValue); - } catch ( const CalciumException & ex) { //tester l'arrêt par exception - DEBTRACE( ex.what() ); - return ex.getInfo(); - } - return CalciumTypes::CPOK; -}; - - -// Définition de ecp_lecture_... , ecp_ecriture_..., ecp_free_... -#define CALCIUM_C2CPP_INTERFACE_(_name,_type,_qual) \ - extern "C" CalciumTypes::InfoType ecp_lecture_##_name (void * component, int dependencyType, \ - CalTimeType< _type _qual >::TimeType * ti, \ - CalTimeType< _type _qual >::TimeType * tf, long * i, \ - const char * const nomvar, size_t bufferLength, \ - size_t * nRead, _type _qual ** data ) { \ - Superv_Component_i * _component = static_cast(component); \ - double _ti=*ti; \ - double _tf=*tf; \ - size_t _nRead=0; \ - size_t _bufferLength=bufferLength; \ - \ - if ( IsSameType< _name , cplx >::value ) _bufferLength*=2; \ - DEBTRACE( "-------- CalciumInterface(lecture Inter Part) MARK 1 ------------------" ) \ - try { \ - CalciumInterface::ecp_lecture< _type, _name >( *_component, \ - dependencyType, \ - _ti, _tf, *i, \ - nomvar, \ - _bufferLength, _nRead, *data); \ - } catch ( const CalciumException & ex) { \ - DEBTRACE( ex.what() ); \ - return ex.getInfo(); \ - } catch ( ... ) { \ - std::cerr << "Unexpected exception " << std::endl; \ - return CalciumTypes::CPATAL; \ - } \ - if ( IsSameType< _name , cplx >::value ) { *nRead=_nRead/2; \ - DEBTRACE( "-------- CalciumInterface(lecture Inter Part) IsSameType cplx -------------" ) \ - DEBTRACE( "-------- CalciumInterface(lecture Inter Part) _nRead : " << _nRead ) \ - DEBTRACE( "-------- CalciumInterface(lecture Inter Part) *nRead : " << *nRead ) \ - } else *nRead = _nRead; \ - if (dependencyType == CalciumTypes::CP_SEQUENTIEL ) \ - *ti=(CalTimeType< _type _qual >::TimeType)(_ti); \ - DEBTRACE( "-------- CalciumInterface(lecture Inter Part), Data Ptr :" << *data ) \ - return CalciumTypes::CPOK; \ - }; \ - \ - \ - extern "C" void ecp_lecture_##_name##_free ( _type _qual * data) { \ - CalciumInterface::ecp_free< _type, _name >(data); \ - }; \ - \ - \ - extern "C" CalciumTypes::InfoType ecp_ecriture_##_name (void * component, int dependencyType, \ - CalTimeType< _type _qual >::TimeType *t, \ - long i, \ - const char * const nomvar, size_t bufferLength, \ - _type _qual * data ) { \ - Superv_Component_i * _component = static_cast(component); \ - /* Je ne sais pas pourquoi, je n'arrive pas à passer t par valeur : corruption de la pile*/ \ - double _t=*t; \ - size_t _bufferLength=bufferLength; \ - if ( IsSameType< _name , cplx >::value ) _bufferLength=_bufferLength*2; \ - DEBTRACE( "-------- CalciumInterface(ecriture Inter Part) MARK 1 ------------------" ) \ - try { \ - /*printf("-------- CalciumInterface(ecriture Inter Part), cp_name : Nom de la var. de type %s : %s\n",#_type,nomvar);*/ \ - DEBTRACE( "----------->-" << nomvar ) \ - CalciumInterface::ecp_ecriture< _type, _name >( *_component, \ - dependencyType, \ - _t,i,nomvar,_bufferLength,*data); \ - } catch ( const CalciumException & ex) { \ - std::cerr << ex.what() << std::endl; \ - return ex.getInfo(); \ - } catch ( ... ) { \ - std::cerr << "Unexpected exception " << std::endl; \ - return CalciumTypes::CPATAL; \ - } \ - DEBTRACE( "-------- CalciumInterface(ecriture Inter Part), Valeur de data :" << data ) \ - return CalciumTypes::CPOK; \ - }; \ - - - -#define STAR * -// Le premier argument est utilisée : -// - comme suffixe dans la définition des noms ecp_lecture_ , ecp_ecriture_ et ecp_free_ -// - comme second argument template à l'appel de la méthode C++ correspondante -// ( le type de port correspondant est alors obtenu par un trait) -// Le second argument est utilisée : -// - pour typer le paramètre data de la procédure générée -// - pour déduire le type des paramètres t, ti tf via un trait -// - comme premier paramètre template à l'appel de la méthode C++ correspondante -// (pour typer les données passées en paramètre ) -// Notons que dans le cas CALCIUM_C2CPP_INTERFACE_(int,int,), le type int n'existe pas -// en CORBA, le port CALCIUM correspondant utilise une séquence de long. La méthode -// C++ CALCIUM de lecture repère cette différence de type et charge -// le manipulateur de données d'effectuer une recopie (qui fonctionne si les types sont compatibles). -CALCIUM_C2CPP_INTERFACE_(int,int,); -CALCIUM_C2CPP_INTERFACE_(float,float, ); -CALCIUM_C2CPP_INTERFACE_(double,double,); -// Fonctionne mais essai suivant pour simplification de Calcium.c CALCIUM_C2CPP_INTERFACE_(bool,bool,); -CALCIUM_C2CPP_INTERFACE_(bool,int,); -CALCIUM_C2CPP_INTERFACE_(cplx,float,); -CALCIUM_C2CPP_INTERFACE_(str,char*,); - -// INTERFACE C/CPP pour les chaines de caractères -// Le paramètre supplémentaire strsize n'étant pas utilisé -// j'utilise la génération par la macro CALCIUM_C2CPP_INTERFACE_(str,char*,); -// extern "C" CalciumTypes::InfoType ecp_lecture_str (void * component, int dependencyType, -// float * ti, float * tf, long * i, -// const char * const nomvar, size_t bufferLength, -// size_t * nRead, char ** *data, size_t strsize ) { - -// Superv_Component_i * _component = static_cast(component); -// double _ti=*ti; -// double _tf=*tf; -// size_t _nRead=0; -// size_t _bufferLength=bufferLength; -// CalciumTypes::DependencyType dependencyType= -// static_cast(dependencyType); - -// // - GERER POINTEUR NULL : NOTHING TODO -// // - VERIFIER LA TAILLE DES CHAINES RETOURNEES (ELLES DEVRAIENT ETRES CORRECTES SI L'ECRITURE EST BIEN CODEE.) - -// DEBTRACE( "-------- CalciumInterface(lecture Inter Part) MARK 1 ------------------" ) -// try { -// CalciumInterface::ecp_lecture< char*, char* >( *_component, -// dependencyType, -// _ti, _tf, *i, -// nomvar, -// _bufferLength, _nRead, *data); -// } catch ( const CalciumException & ex) { -// DEBTRACE( ex.what() ); -// return ex.getInfo(); -// } - -// *nRead = _nRead; - -// if (dependencyType == CalciumTypes::CP_SEQUENTIEL ) -// *ti=(float)(_ti); - -// DEBTRACE( "-------- CalciumInterface(lecture Inter Part), Data Ptr :" << *data ) ; - -// return CalciumTypes::CPOK; -// }; - - -// extern "C" void ecp_lecture_str_free (char** data) { -// CalciumInterface::ecp_free< char*, char* >(data); -// }; - - -// extern "C" CalciumTypes::InfoType ecp_ecriture_str (void * component, int dependencyType, -// float *t, long i, -// const char * const nomvar, size_t bufferLength, -// char ** data, int strsize ) { - -// Superv_Component_i * _component = static_cast(component); -// /* Je ne sais pas pourquoi, je n'arrive pas à passer t par valeur : corruption de la pile*/ -// double _t=*t; -// size_t _bufferLength=bufferLength; +/* Déclaration de l'Interface entre l'API C et l'API C++ + L'utilisateur CALCIUM n'a normalement pas a utliser cette interface + En C/C++ il utilisera celle définie dans Calcium.c (calcium.h) + En C++/CORBA directement celle de CalciumCxxInterface.hxx +*/ +#include "CalciumCInterface.hxx" -// // - VERIFIER LA TAILLE DES CHAINES RETOURNEES (ELLES DEVRAIENT ETRES CORRECTES SI L'ECRITURE EST BIEN CODEE.) -// DEBTRACE( "-------- CalciumInterface(ecriture Inter Part) MARK 1 ------------------" ) -// try { -// std::string essai(nomvar); -// DEBTRACE( "----------->-" << nomvar ) -// CalciumInterface::ecp_ecriture< char*, char* >( *_component, -// static_cast(dependencyType), -// _t,i,nomvar,_bufferLength,*data); -// } catch ( const CalciumException & ex) { -// std::cerr << ex.what() << std::endl; -// return ex.getInfo(); -// } -// DEBTRACE( "-------- CalciumInterface(ecriture Inter Part), Valeur de data :" << data ) -// return CalciumTypes::CPOK; -// }; #endif diff --git a/src/DSC/DSC_User/Datastream/Calcium/CalciumMacroCInterface.hxx b/src/DSC/DSC_User/Datastream/Calcium/CalciumMacroCInterface.hxx new file mode 100644 index 000000000..f904a01fd --- /dev/null +++ b/src/DSC/DSC_User/Datastream/Calcium/CalciumMacroCInterface.hxx @@ -0,0 +1,154 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +/* +File : CalciumInterface.hxx +Author : Eric Fayolle (EDF) +Module : KERNEL +Modified by : $LastChangedBy$ +Date : $LastChangedDate: 2007-03-01 13:27:58 +0100 (jeu, 01 mar 2007) $ +Id : $Id$ +*/ + +#ifndef _CALCIUM_MACRO_C_INTERFACE_H_ +#define _CALCIUM_MACRO_C_INTERFACE_H_ + + + +/****** CALCIUM_C2CPP_INTERFACE_HXX_ : ******/ +/****** Declarations: ecp_lecture_... , ecp_ecriture_..., ecp_free_... ******/ + +#define CALCIUM_C2CPP_INTERFACE_HXX_(_name,_porttype,_type,_qual) \ + extern "C" CalciumTypes::InfoType ecp_lecture_##_name (void * component, int dependencyType, \ + CalTimeType< _type _qual >::TimeType * ti, \ + CalTimeType< _type _qual >::TimeType * tf, long * i, \ + const char * const nomvar, size_t bufferLength, \ + size_t * nRead, _type _qual ** data ); \ + \ + \ + extern "C" void ecp_lecture_##_name##_free ( _type _qual * data); \ + \ + \ + extern "C" CalciumTypes::InfoType ecp_ecriture_##_name (void * component, int dependencyType, \ + CalTimeType< _type _qual >::TimeType *t, \ + long i, \ + const char * const nomvar, size_t bufferLength, \ + _type _qual * data ); \ + + + + + +/****** CALCIUM_C2CPP_INTERFACE_CXX_ : ******/ +/******Definitions: ecp_lecture_... , ecp_ecriture_..., ecp_free_... ******/ +#define CALCIUM_C2CPP_INTERFACE_CXX_(_name,_porttype,_type,_qual) \ + extern "C" CalciumTypes::InfoType ecp_lecture_##_name (void * component, int dependencyType, \ + CalTimeType< _type _qual >::TimeType * ti, \ + CalTimeType< _type _qual >::TimeType * tf, long * i, \ + const char * const nomvar, size_t bufferLength, \ + size_t * nRead, _type _qual ** data ) \ + { \ + Superv_Component_i * _component = static_cast(component); \ + double _ti=0.; \ + double _tf=0.; \ + if(dependencyType == CalciumTypes::CP_TEMPS) \ + { \ + _ti=*ti; \ + _tf=*tf; \ + } \ + size_t _nRead=0; \ + size_t _bufferLength=bufferLength; \ + \ + if ( IsSameType< _porttype , cplx >::value ) _bufferLength*=2; \ + DEBTRACE( "-------- CalciumInterface(lecture Inter Part) MARK 1 ------------------" ) \ + try \ + { \ + CalciumInterface::ecp_lecture< _type,_porttype >( *_component, dependencyType, _ti, _tf, *i, nomvar, \ + _bufferLength, _nRead, *data); \ + } \ + catch ( const CalciumException & ex) \ + { \ + DEBTRACE( ex.what() ); \ + return ex.getInfo(); \ + } \ + catch ( ... ) \ + { \ + DEBTRACE( "Unexpected exception ") ; \ + return CalciumTypes::CPATAL; \ + } \ + if ( IsSameType< _porttype , cplx >::value ) \ + { \ + *nRead=_nRead/2; \ + DEBTRACE( "-------- CalciumInterface(lecture Inter Part) IsSameType cplx -------------" ) \ + DEBTRACE( "-------- CalciumInterface(lecture Inter Part) _nRead : " << _nRead ) \ + DEBTRACE( "-------- CalciumInterface(lecture Inter Part) *nRead : " << *nRead ) \ + } \ + else \ + *nRead = _nRead; \ + if (dependencyType == CalciumTypes::CP_SEQUENTIEL ) \ + *ti=(CalTimeType< _type _qual >::TimeType)(_ti); \ + DEBTRACE( "-------- CalciumInterface(lecture Inter Part), Data Ptr :" << *data ) \ + return CalciumTypes::CPOK; \ + }; \ + \ + \ + extern "C" void ecp_lecture_##_name##_free ( _type _qual * data) \ + { \ + CalciumInterface::ecp_free< _type, _porttype >(data); \ + }; \ + \ + \ + extern "C" CalciumTypes::InfoType ecp_ecriture_##_name (void * component, int dependencyType, \ + CalTimeType< _type _qual >::TimeType *t, \ + long i, \ + const char * const nomvar, size_t bufferLength, \ + _type _qual * data ) \ + { \ + DEBTRACE( "-------- CalciumInterface(ecriture Inter Part) MARK 0 ------------------" ) \ + Superv_Component_i * _component = static_cast(component); \ + /* Je ne sais pas pourquoi, je n'arrive pas à passer t par valeur : corruption de la pile*/ \ + double _t=0.; \ + if(dependencyType == CalciumTypes::CP_TEMPS) \ + _t=*t; \ + size_t _bufferLength=bufferLength; \ + if ( IsSameType< _porttype , cplx >::value ) _bufferLength=_bufferLength*2; \ + DEBTRACE( "-------- CalciumInterface(ecriture Inter Part) MARK 1 ------------------" ) \ + try \ + { \ + /*printf("-------- CalciumInterface(ecriture Inter Part), cp_name : Nom de la var. de type %s : %s\n",#_type,nomvar);*/ \ + DEBTRACE( "----------->-" << nomvar ) \ + CalciumInterface::ecp_ecriture< _type, _porttype >( *_component, dependencyType, \ + _t,i,nomvar,_bufferLength,*data); \ + } \ + catch ( const CalciumException & ex) \ + { \ + DEBTRACE( ex.what() ); \ + return ex.getInfo(); \ + } \ + catch ( ... ) \ + { \ + DEBTRACE("Unexpected exception " ); \ + return CalciumTypes::CPATAL; \ + } \ + DEBTRACE( "-------- CalciumInterface(ecriture Inter Part), Valeur de data :" << data ) \ + return CalciumTypes::CPOK; \ + }; \ + + +#endif diff --git a/src/DSC/DSC_User/Datastream/Calcium/CalciumPortTraits.hxx b/src/DSC/DSC_User/Datastream/Calcium/CalciumPortTraits.hxx index b607de119..a10c1313c 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/CalciumPortTraits.hxx +++ b/src/DSC/DSC_User/Datastream/Calcium/CalciumPortTraits.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : CalciumPortTraits.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -38,11 +39,15 @@ template struct UnknownProvidesPortType {}; template struct ProvidesPortTraits { typedef UnknownProvidesPortType PortType; }; -template <> struct ProvidesPortTraits { +struct integer {}; +template <> struct ProvidesPortTraits { typedef calcium_integer_port_provides PortType; }; +template <> struct ProvidesPortTraits { + typedef calcium_intc_port_provides PortType; +}; template <> struct ProvidesPortTraits { - typedef calcium_integer_port_provides PortType; + typedef calcium_long_port_provides PortType; }; template <> struct ProvidesPortTraits { typedef calcium_real_port_provides PortType; @@ -65,6 +70,12 @@ struct str {}; template <> struct ProvidesPortTraits { typedef calcium_string_port_provides PortType; }; +// Définition du type intc pour obtenir le type de port +// correspondant +struct intc {}; +template <> struct ProvidesPortTraits { + typedef calcium_intc_port_provides PortType; +}; template < typename T > struct StarTrait { typedef T NonStarType; }; @@ -76,11 +87,14 @@ template struct UnknownUsesPortType {}; template struct UsesPortTraits { typedef UnknownUsesPortType PortType; }; -template <> struct UsesPortTraits { +template <> struct UsesPortTraits { typedef calcium_integer_port_uses PortType; }; +template <> struct UsesPortTraits { + typedef calcium_intc_port_uses PortType; +}; template <> struct UsesPortTraits { - typedef calcium_integer_port_uses PortType; + typedef calcium_long_port_uses PortType; }; template <> struct UsesPortTraits { typedef calcium_real_port_uses PortType; @@ -97,5 +111,8 @@ template <> struct UsesPortTraits { template <> struct UsesPortTraits { typedef calcium_complex_port_uses PortType; }; +template <> struct UsesPortTraits { + typedef calcium_intc_port_uses PortType; +}; #endif diff --git a/src/DSC/DSC_User/Datastream/Calcium/CalciumProvidesPort.cxx b/src/DSC/DSC_User/Datastream/Calcium/CalciumProvidesPort.cxx index b6a25e6f9..0f0a814db 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/CalciumProvidesPort.cxx +++ b/src/DSC/DSC_User/Datastream/Calcium/CalciumProvidesPort.cxx @@ -1,30 +1,35 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "CalciumProvidesPort.hxx" CALCIUM_GENERIC_PROVIDES_PORT_CXX(calcium_integer_port_provides) -CALCIUM_GENERIC_PROVIDES_PORT_CXX(calcium_real_port_provides) +CALCIUM_GENERIC_PROVIDES_PORT_CXX(calcium_long_port_provides) + +CALCIUM_GENERIC_PROVIDES_PORT_CXX(calcium_intc_port_provides) + +CALCIUM_GENERIC_PROVIDES_PORT_CXX(calcium_real_port_provides) CALCIUM_GENERIC_PROVIDES_PORT_CXX(calcium_double_port_provides) diff --git a/src/DSC/DSC_User/Datastream/Calcium/CalciumProvidesPort.hxx b/src/DSC/DSC_User/Datastream/Calcium/CalciumProvidesPort.hxx.in similarity index 56% rename from src/DSC/DSC_User/Datastream/Calcium/CalciumProvidesPort.hxx rename to src/DSC/DSC_User/Datastream/Calcium/CalciumProvidesPort.hxx.in index d22453a39..ceb68d8a2 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/CalciumProvidesPort.hxx +++ b/src/DSC/DSC_User/Datastream/Calcium/CalciumProvidesPort.hxx.in @@ -1,24 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // Modified by : $LastChangedBy$ // Date : $LastChangedDate: 2007-03-01 13:40:26 +0100 (Thu, 01 Mar 2007) $ // Id : $Id$ @@ -35,6 +33,14 @@ CALCIUM_GENERIC_PROVIDES_PORT_HXX(calcium_integer_port_provides, \ POA_Ports::Calcium_Ports::Calcium_Integer_Port, \ + seq_u_manipulation ) \ + +CALCIUM_GENERIC_PROVIDES_PORT_HXX(calcium_long_port_provides, \ + POA_Ports::Calcium_Ports::Calcium_Long_Port, \ + seq_u_manipulation ) \ + +CALCIUM_GENERIC_PROVIDES_PORT_HXX(calcium_intc_port_provides, \ + POA_Ports::Calcium_Ports::Calcium_Intc_Port, \ seq_u_manipulation ) \ CALCIUM_GENERIC_PROVIDES_PORT_HXX(calcium_real_port_provides, \ diff --git a/src/DSC/DSC_User/Datastream/Calcium/CalciumTypes.hxx b/src/DSC/DSC_User/Datastream/Calcium/CalciumTypes.hxx index 328e50910..62da2f91e 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/CalciumTypes.hxx +++ b/src/DSC/DSC_User/Datastream/Calcium/CalciumTypes.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : CalciumTypes.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -35,11 +36,11 @@ namespace CalciumTypes { const float EPSILON = 1.e-6; - /* Type de dependance des variables */ - const int CP_TEMPS = 40; - const int CP_ITERATION = 41; - const int CP_SEQUENTIEL = 42; - /* Mode de dependance inconnu */ + /* Type de dependance des variables */ + const int CP_TEMPS = 40; + const int CP_ITERATION = 41; + const int CP_SEQUENTIEL = 42; + /* Mode de dependance inconnu */ const int CPIT = 6; /* Directive de continuation d'une instance */ @@ -65,144 +66,144 @@ namespace CalciumTypes { typedef int InfoType ; const int UNLIMITED_STORAGE_LEVEL = CP_ILLIMITE; typedef enum {UNDEFINED_DEPENDENCY=CPIT,TIME_DEPENDENCY=CP_TEMPS, - ITERATION_DEPENDENCY=CP_ITERATION, - // TYPE uniquement utilisé ds CalciumInterface - SEQUENCE_DEPENDENCY =CP_SEQUENTIEL + ITERATION_DEPENDENCY=CP_ITERATION, + // TYPE uniquement utilisé ds CalciumInterface + SEQUENCE_DEPENDENCY =CP_SEQUENTIEL } DependencyType; typedef enum {TI_SCHEM=TI,TF_SCHEM=TF,ALPHA_SCHEM} DateCalSchem; typedef enum {L0_SCHEM=CP_ESCALIER,L1_SCHEM=CP_LINEAIRE} InterpolationSchem; typedef enum {UNDEFINED_EXTRA_SCHEM,E0_SCHEM,E1_SCHEM} ExtrapolationSchem; typedef enum {UNDEFINED_DIRECTIVE=0,CONTINUE=CP_CONT,STOP=CP_ARRET} DisconnectDirective; - /* Codes d'erreur */ + /* Codes d'erreur */ - /* Pas d'erreur */ + /* Pas d'erreur */ const int CPOK = 0; - /* Emetteur inconnu */ + /* Emetteur inconnu */ const int CPERIU = 1; - /* Nom de variable inconnu */ + /* Nom de variable inconnu */ const int CPNMVR = 2; - /* Type entree/sortie incompatible */ + /* Type entree/sortie incompatible */ const int CPIOVR = 3; - /* Type inconnu */ + /* Type inconnu */ const int CPTP = 4; - /* Type de variable incompatible */ + /* Type de variable incompatible */ const int CPTPVR = 5; - /* Mode de dependance inconnu */ + /* Mode de dependance inconnu */ // Déclaré au dessus // const int CPIT = 6; - /* Mode dependance incompatible */ + /* Mode dependance incompatible */ const int CPITVR = 7; - /* Requete non autorisee */ + /* Requete non autorisee */ const int CPRENA = 8; - /* Type de deconnexion incorrect */ + /* Type de deconnexion incorrect */ const int CPDNTP = 9; - /* Directive de deconnexion incorrecte */ + /* Directive de deconnexion incorrecte */ const int CPDNDI = 10; - /* Nom de code inconnu */ + /* Nom de code inconnu */ const int CPNMCD = 11; - /* Nom d'instance inconnu */ + /* Nom d'instance inconnu */ const int CPNMIN = 12; - /* Attente */ + /* Attente */ const int CPATTENTE = 13; - /* Blocage */ + /* Blocage */ const int CPBLOC = 14; - /* Nombre de valeurs transmises egal a zero */ + /* Nombre de valeurs transmises egal a zero */ const int CPNTNULL = 15; - /* Longueur de variable insuffisante */ + /* Longueur de variable insuffisante */ const int CPLGVR = 16; - /* L'instance doit s'arreter */ + /* L'instance doit s'arreter */ const int CPSTOP = 17; - /* Arret anormal */ + /* Arret anormal */ const int CPATAL = 18; - /* Coupleur absent */ + /* Coupleur absent */ const int CPNOCP = 19; - /* Variable sortante non connectee */ + /* Variable sortante non connectee */ const int CPCTVR = 20; - /* Nombre de pas a executer egal a zero */ + /* Nombre de pas a executer egal a zero */ const int CPPASNULL = 21; - /* Machine inconnue */ + /* Machine inconnue */ const int CPMACHINE = 22; - /* COUPLAGE_GROUPE non positionnee */ + /* COUPLAGE_GROUPE non positionnee */ const int CPGRNU = 23; - /* Groupe d'instances incorrect */ + /* Groupe d'instances incorrect */ const int CPGRIN = 24; - /* Fin du fichier d'entree */ + /* Fin du fichier d'entree */ const int CPFINFICH = 25; - /* Erreur de format dans un fichier */ + /* Erreur de format dans un fichier */ const int CPERRFICH = 26; - /* Requete d'avance de n pas annulee */ - /* par passage en mode NORMAL */ + /* Requete d'avance de n pas annulee */ + /* par passage en mode NORMAL */ const int CPNORERR = 27; - /* Coupleur en mode NORMAL pour une */ - /* requete RUN_N_PAS ou DEF_* */ + /* Coupleur en mode NORMAL pour une */ + /* requete RUN_N_PAS ou DEF_* */ const int CPRUNERR = 28; - /* Option inconnue */ + /* Option inconnue */ const int CPOPT = 29; - /* Valeur d'option inconnue */ + /* Valeur d'option inconnue */ const int CPVALOPT = 30; - /* Ecriture impossible par effacement */ + /* Ecriture impossible par effacement */ const int CPECREFF = 31; - /* Lecture d'une variable non connectee */ - /* ou n'appartenant pas a un lien VAS */ - /* ou VAV s'il s'agit d'une sortante */ + /* Lecture d'une variable non connectee */ + /* ou n'appartenant pas a un lien VAS */ + /* ou VAV s'il s'agit d'une sortante */ const int CPLIEN = 32; /* Lecture d'une variable d'une instance*/ - /* deconnectee avec directive CP_ARRET */ + /* deconnectee avec directive CP_ARRET */ const int CPINARRET = 33; - /* Les lectures sequentielles ne pourront plus */ - /* etre satisfaites : instance productrice arretee */ + /* Les lectures sequentielles ne pourront plus */ + /* etre satisfaites : instance productrice arretee */ const int CPSTOPSEQ = 34; - /* Erreur dans la chaine de declaration */ + /* Erreur dans la chaine de declaration */ const int CPDECL = 35; /* Erreur dans l'execution de l'instance ajoutee */ const int CPINEXEC = 36; - /* Erreur PVM */ + /* Erreur PVM */ // const int CPPVM = 37; // const int CPCOM = 37; /* Erreur detectee au niveau de l'int CPERRINST = 38; - /* Mode d'execution non defini */ + /* Mode d'execution non defini */ // const int CPMODE = 39; - /* Instance deconnectee */ + /* Instance deconnectee */ const int CPINSTDEC = 40; } diff --git a/src/DSC/DSC_User/Datastream/Calcium/CalciumTypes2CorbaTypes.cxx b/src/DSC/DSC_User/Datastream/Calcium/CalciumTypes2CorbaTypes.cxx index e99de9a6a..13bb0e73e 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/CalciumTypes2CorbaTypes.cxx +++ b/src/DSC/DSC_User/Datastream/Calcium/CalciumTypes2CorbaTypes.cxx @@ -1,40 +1,41 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // Modified by : $LastChangedBy$ // Date : $LastChangedDate: 2007-03-01 13:40:26 +0100 (Thu, 01 Mar 2007) $ // Id : $Id$ // #include "CalciumTypes2CorbaTypes.hxx" +#include "utilities.h" #include -using namespace std; -CORBA_DATE_CAL_SCHEM::CORBA_DATE_CAL_SCHEM() : map() +CORBA_DATE_CAL_SCHEM::CORBA_DATE_CAL_SCHEM() : std::map() { - map & - table = ( map & ) *this ; + table = ( std::map & ) *this ; table[CalciumTypes::TI_SCHEM ] = Ports::Calcium_Ports::TI_SCHEM ; table[CalciumTypes::TF_SCHEM ] = Ports::Calcium_Ports::TF_SCHEM ; @@ -44,9 +45,9 @@ table[CalciumTypes::ALPHA_SCHEM ] = Ports::Calcium_Ports::ALPHA_SCHEM ; Ports::Calcium_Ports::DateCalSchem CORBA_DATE_CAL_SCHEM::operator[]( const CalciumTypes::DateCalSchem &c ) const { - map &table = (map&)*this ; + std::map &table = (std::map&)*this ; assert( table.find( (CalciumTypes::DateCalSchem)c ) != table.end() ) ; return table[ (CalciumTypes::DateCalSchem)c ] ; } @@ -55,40 +56,33 @@ const CORBA_DATE_CAL_SCHEM corbaDateCalSchem ; -CORBA_DEPENDENCY_TYPE::CORBA_DEPENDENCY_TYPE() : map() +CORBA_DEPENDENCY_TYPE::CORBA_DEPENDENCY_TYPE() : std::map() { - map & - table = ( map & ) *this ; - -table[CalciumTypes::TIME_DEPENDENCY ] = Ports::Calcium_Ports::TIME_DEPENDENCY ; -table[CalciumTypes::ITERATION_DEPENDENCY ] = Ports::Calcium_Ports::ITERATION_DEPENDENCY ; -table[CalciumTypes::UNDEFINED_DEPENDENCY ] = Ports::Calcium_Ports::UNDEFINED_DEPENDENCY ; - - -#ifdef _DEBUG_ -std::cerr << "CORBA_DEPENDENCY_TYPE() : table["< & ) *this ; + + table[CalciumTypes::TIME_DEPENDENCY ] = Ports::Calcium_Ports::TIME_DEPENDENCY ; + table[CalciumTypes::ITERATION_DEPENDENCY ] = Ports::Calcium_Ports::ITERATION_DEPENDENCY ; + table[CalciumTypes::UNDEFINED_DEPENDENCY ] = Ports::Calcium_Ports::UNDEFINED_DEPENDENCY ; + + + MESSAGE("CORBA_DEPENDENCY_TYPE() : table["< & - table = (map& ) *this ; + table = (std::map& ) *this ; -#ifdef _DEBUG_ -std::cerr << "CORBA_DEPENDENCY_TYPE() : ::operator["< () +CORBA_INTERPOLATION_SCHEM::CORBA_INTERPOLATION_SCHEM() : std::map () { - map & - table = ( map & ) *this ; + table = ( std::map & ) *this ; table[CalciumTypes::L0_SCHEM ] = Ports::Calcium_Ports::L0_SCHEM ; table[CalciumTypes::L1_SCHEM ] = Ports::Calcium_Ports::L1_SCHEM ; @@ -114,9 +108,9 @@ CORBA_INTERPOLATION_SCHEM::CORBA_INTERPOLATION_SCHEM() : map &table = - (map& ) *this ; assert( table.find( (CalciumTypes::InterpolationSchem)c ) != table.end() ) ; @@ -127,13 +121,13 @@ const CORBA_INTERPOLATION_SCHEM corbaInterpolationSchem ; -CORBA_EXTRAPOLATION_SCHEM::CORBA_EXTRAPOLATION_SCHEM() : map () +CORBA_EXTRAPOLATION_SCHEM::CORBA_EXTRAPOLATION_SCHEM() : std::map () { - map & - table = ( map & ) *this ; + table = ( std::map & ) *this ; table[CalciumTypes::E0_SCHEM ] = Ports::Calcium_Ports::E0_SCHEM ; table[CalciumTypes::E1_SCHEM ] = Ports::Calcium_Ports::E1_SCHEM ; @@ -143,9 +137,9 @@ CORBA_EXTRAPOLATION_SCHEM::CORBA_EXTRAPOLATION_SCHEM() : map &table = - (map& ) *this ; assert( table.find( (CalciumTypes::ExtrapolationSchem)c ) != table.end() ) ; diff --git a/src/DSC/DSC_User/Datastream/Calcium/CalciumTypes2CorbaTypes.hxx b/src/DSC/DSC_User/Datastream/Calcium/CalciumTypes2CorbaTypes.hxx index 1d5861d7d..f9476ddf3 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/CalciumTypes2CorbaTypes.hxx +++ b/src/DSC/DSC_User/Datastream/Calcium/CalciumTypes2CorbaTypes.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // Modified by : $LastChangedBy$ // Date : $LastChangedDate: 2007-03-01 13:40:26 +0100 (Thu, 01 Mar 2007) $ // Id : $Id$ @@ -34,7 +35,7 @@ class CORBA_DATE_CAL_SCHEM : public std::map + Ports::Calcium_Ports::DateCalSchem > { public : @@ -46,7 +47,7 @@ public : extern const CORBA_DATE_CAL_SCHEM corbaDateCalSchem ; class CORBA_DEPENDENCY_TYPE : public std::map + Ports::Calcium_Ports::DependencyType> { public : @@ -57,7 +58,7 @@ public : extern const CORBA_DEPENDENCY_TYPE corbaDependencyType ; class CORBA_INTERPOLATION_SCHEM : public std::map + Ports::Calcium_Ports::InterpolationSchem> { public : @@ -68,7 +69,7 @@ public : extern const CORBA_INTERPOLATION_SCHEM corbaInterpolationSchem ; class CORBA_EXTRAPOLATION_SCHEM : public std::map + Ports::Calcium_Ports::ExtrapolationSchem> { public : diff --git a/src/DSC/DSC_User/Datastream/Calcium/CalciumTypesManipulator.hxx b/src/DSC/DSC_User/Datastream/Calcium/CalciumTypesManipulator.hxx index 9a8b3e53d..18636cfd1 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/CalciumTypesManipulator.hxx +++ b/src/DSC/DSC_User/Datastream/Calcium/CalciumTypesManipulator.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : CalciumTypesManipulator.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -31,13 +32,13 @@ template struct CalciumTypesManipulator : public seq_u_manipulation { + Ports::Calcium_Ports::Complex> { static bool needInterpolation=true; } template struct CalciumTypesManipulator : public seq_u_manipulation { + Ports::Calcium_Ports::Complex> { static bool needInterpolation=true; } diff --git a/src/DSC/DSC_User/Datastream/Calcium/Copy2CorbaSpace.hxx b/src/DSC/DSC_User/Datastream/Calcium/Copy2CorbaSpace.hxx index 3d9cf6653..bb6b52ccf 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/Copy2CorbaSpace.hxx +++ b/src/DSC/DSC_User/Datastream/Calcium/Copy2CorbaSpace.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : Copy2CorbaSpace.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -29,10 +30,13 @@ #ifndef _COPY_TO_CORBA_SPACE_HXX_ #define _COPY_TO_CORBA_SPACE_HXX_ + #include #include #include "CalciumPortTraits.hxx" +//#define MYDEBUG + template struct Copy2CorbaSpace { @@ -44,7 +48,7 @@ struct Copy2CorbaSpace { //ESSAI: typedef typename PortType::DataManipulator DataManipulator; typedef typename DataManipulator::InnerType InnerType; -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cerr << "-------- Copy2CorbaSpace MARK 1 ------------------" << std::endl; #endif // Crée le type corba à partir du data sans lui en donner la propriété. @@ -52,9 +56,9 @@ struct Copy2CorbaSpace { // DataManipulator::create n'a pas le caractère const sur son paramètre data pour le // cas de figure où la propriété de la donnée lui est donnée. corbaData = DataManipulator::create(nRead,const_cast (&data),false); -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cerr << "-------- Copy2CorbaSpace MARK 2 --(dataPtr : " - << DataManipulator::getPointer(corbaData,false)<<")----------------" << std::endl; + << DataManipulator::getPointer(corbaData,false)<<")----------------" << std::endl; #endif } @@ -75,14 +79,14 @@ Copy2CorbaSpace { corbaData = DataManipulator::create(nRead); InnerType * dataPtr = DataManipulator::getPointer(corbaData,false); -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cerr << "-------- Copy2CorbaSpace MARK 1 --(dataPtr : " << dataPtr<<")----------------" << std::endl; #endif // Attention : Pour les chaines ou tout autre object complexe il faut utiliser une recopie profonde ! std::copy(&data,&data+nRead,dataPtr); -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cerr << "-------- Copy2CorbaSpace MARK 2 --(nRead: "< MARK 3 : " ; diff --git a/src/DSC/DSC_User/Datastream/Calcium/Copy2UserSpace.hxx b/src/DSC/DSC_User/Datastream/Calcium/Copy2UserSpace.hxx index 9d5054126..01e76d17d 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/Copy2UserSpace.hxx +++ b/src/DSC/DSC_User/Datastream/Calcium/Copy2UserSpace.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : Copy2UserSpace.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -35,6 +36,8 @@ #include +//#define MYDEBUG + //Les demandes de copies vers l'espace utilisateur //proviennent d'une procédure de lecture @@ -69,11 +72,11 @@ struct Copy2UserSpace{ // Le PORT doit être capable de répondre aux demandes de lecture // multiples d'une donnée pour une même estampille et doit donc garder un pointeur valide // sur le buffer. Il se pose cependant un problème s'il décide - // de supprimer la donnée alors que des client utilise le buffer (historique) ! + // de supprimer la donnée alors que des client utilise le buffer (historique calcium) ! // La seule façon de gérer proprement cette situation est d'utiliser un shared_pointer (TODO). // Pour l'instant l'utilisateur du mode zero copie doit s'assurer que le niveau d'historique // utilisé par le port est compatible avec son utilisation des buffers. Il doit - // être également conscient que s'il modifie le buffer, il est modifier pour tous les + // être également conscient que s'il modifie le buffer, il est modifié pour tous les // utilisateurs actuels et futurs. //REF: InnerType * dataPtr = DataManipulator::getPointer(corbaData,true); @@ -84,7 +87,7 @@ struct Copy2UserSpace{ // Cette ligne poserait uun problème dans la méthode appelante, si elle // ne testait pas que les types utilisateurs et CORBA sont identiques : // ex : InnerType == Corba::Long et d'un T == int - // C'est l'objet de la procédure suivante + // C'est l'objet de la spécialisation ci-dessous. data = dataPtr; // En zero copie l'utilisateur doit appeler ecp_free ( cas ou un buffer intermédiaire @@ -106,7 +109,7 @@ struct Copy2UserSpace { typedef typename DataManipulator::InnerType InnerType; -#ifdef _DEBUG_ +#ifdef MYDEBUG InnerType * dataPtr = NULL; // Affiche la valeur du pointeur de la structure corba // et les pointeurs contenus le cas échéant @@ -139,7 +142,7 @@ struct Copy2UserSpace { //std::copy(dataPtr,dataPtr+nRead,data); DataManipulator::copy(corbaData,data,nRead); -#ifdef _DEBUG_ +#ifdef MYDEBUG tmpData = data; std::cerr << "-------- Copy2UserSpace MARK 1c --data("< -using namespace std; - -DATE_CAL_SCHEM::DATE_CAL_SCHEM() : map() +DATE_CAL_SCHEM::DATE_CAL_SCHEM() : std::map() { - map & - table = ( map & ) *this ; + table = ( std::map & ) *this ; table[Ports::Calcium_Ports::TI_SCHEM ] = CalciumTypes::TI_SCHEM ; table[Ports::Calcium_Ports::TF_SCHEM ] = CalciumTypes::TF_SCHEM ; @@ -44,9 +44,9 @@ table[Ports::Calcium_Ports::ALPHA_SCHEM ] = CalciumTypes::ALPHA_SCHEM ; CalciumTypes::DateCalSchem DATE_CAL_SCHEM::operator[]( const Ports::Calcium_Ports::DateCalSchem &c ) const { - map &table = (map&)*this ; + std::map &table = (std::map&)*this ; assert( table.find( (Ports::Calcium_Ports::DateCalSchem)c ) != table.end() ) ; return table[ (Ports::Calcium_Ports::DateCalSchem)c ] ; } @@ -55,39 +55,31 @@ const DATE_CAL_SCHEM dateCalSchem ; -DEPENDENCY_TYPE::DEPENDENCY_TYPE() : map() +DEPENDENCY_TYPE::DEPENDENCY_TYPE() : std::map() { - map & - table = ( map & ) *this ; - -table[Ports::Calcium_Ports::TIME_DEPENDENCY ] = CalciumTypes::TIME_DEPENDENCY ; -table[Ports::Calcium_Ports::ITERATION_DEPENDENCY ] = CalciumTypes::ITERATION_DEPENDENCY ; -table[Ports::Calcium_Ports::UNDEFINED_DEPENDENCY ] = CalciumTypes::UNDEFINED_DEPENDENCY ; - - -#ifdef _DEBUG_ -std::cerr << "DEPENDENCY_TYPE() : table["< & ) *this ; + + table[Ports::Calcium_Ports::TIME_DEPENDENCY ] = CalciumTypes::TIME_DEPENDENCY ; + table[Ports::Calcium_Ports::ITERATION_DEPENDENCY ] = CalciumTypes::ITERATION_DEPENDENCY ; + table[Ports::Calcium_Ports::UNDEFINED_DEPENDENCY ] = CalciumTypes::UNDEFINED_DEPENDENCY ; + + MESSAGE("DEPENDENCY_TYPE() : table["< &table = (map&)*this ; + std::map &table = (std::map&)*this ; -#ifdef _DEBUG_ -std::cerr << "DEPENDENCY_TYPE() : ::operator["< () +INTERPOLATION_SCHEM::INTERPOLATION_SCHEM() : std::map () { - map & - table = ( map & ) *this ; + table = ( std::map & ) *this ; table[Ports::Calcium_Ports::L0_SCHEM ] = CalciumTypes::L0_SCHEM ; table[Ports::Calcium_Ports::L1_SCHEM ] = CalciumTypes::L1_SCHEM ; @@ -113,9 +105,9 @@ INTERPOLATION_SCHEM::INTERPOLATION_SCHEM() : map &table = - (map& ) *this ; assert( table.find( (Ports::Calcium_Ports::InterpolationSchem)c ) != table.end() ) ; @@ -126,13 +118,13 @@ const INTERPOLATION_SCHEM interpolationSchem ; -EXTRAPOLATION_SCHEM::EXTRAPOLATION_SCHEM() : map () +EXTRAPOLATION_SCHEM::EXTRAPOLATION_SCHEM() : std::map () { - map & - table = ( map & ) *this ; + table = ( std::map & ) *this ; table[Ports::Calcium_Ports::E0_SCHEM ] = CalciumTypes::E0_SCHEM ; table[Ports::Calcium_Ports::E1_SCHEM ] = CalciumTypes::E1_SCHEM ; @@ -142,9 +134,9 @@ EXTRAPOLATION_SCHEM::EXTRAPOLATION_SCHEM() : map &table = - (map& ) *this ; assert( table.find( (Ports::Calcium_Ports::ExtrapolationSchem)c ) != table.end() ) ; diff --git a/src/DSC/DSC_User/Datastream/Calcium/CorbaTypes2CalciumTypes.hxx b/src/DSC/DSC_User/Datastream/Calcium/CorbaTypes2CalciumTypes.hxx index b7a748c7b..4123841cf 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/CorbaTypes2CalciumTypes.hxx +++ b/src/DSC/DSC_User/Datastream/Calcium/CorbaTypes2CalciumTypes.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // Modified by : $LastChangedBy$ // Date : $LastChangedDate: 2007-03-01 13:40:26 +0100 (Thu, 01 Mar 2007) $ // Id : $Id$ @@ -34,7 +35,7 @@ class DATE_CAL_SCHEM : public std::map + CalciumTypes::DateCalSchem> { public : @@ -46,7 +47,7 @@ public : extern const DATE_CAL_SCHEM dateCalSchem ; class DEPENDENCY_TYPE : public std::map + CalciumTypes::DependencyType> { public : @@ -57,7 +58,7 @@ public : extern const DEPENDENCY_TYPE dependencyType ; class INTERPOLATION_SCHEM : public std::map + CalciumTypes::InterpolationSchem> { public : @@ -68,7 +69,7 @@ public : extern const INTERPOLATION_SCHEM interpolationSchem ; class EXTRAPOLATION_SCHEM : public std::map + CalciumTypes::ExtrapolationSchem> { public : diff --git a/src/DSC/DSC_User/Datastream/Calcium/Makefile.am b/src/DSC/DSC_User/Datastream/Calcium/Makefile.am index da56a1f68..deff2298c 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/Makefile.am +++ b/src/DSC/DSC_User/Datastream/Calcium/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : Makefile.am # Author : André RIBES (EDF), Eric Fayolle (EDF) # Module : KERNEL @@ -38,8 +39,8 @@ salomeinclude_HEADERS = calcium_port_factory.hxx \ calcium_uses_port.hxx \ CalciumGenericUsesPort.hxx \ calcium_provides_port.hxx \ - CalciumProvidesPort.hxx \ - calcium_integer_port_uses.hxx \ + calcium_intc_port_uses.hxx \ + calcium_long_port_uses.hxx \ calcium_real_port_uses.hxx \ calcium_double_port_uses.hxx \ calcium_string_port_uses.hxx \ @@ -49,18 +50,28 @@ salomeinclude_HEADERS = calcium_port_factory.hxx \ CalciumException.hxx \ CalciumTypes.hxx \ CalciumCxxInterface.hxx \ + CalciumMacroCInterface.hxx \ + CalciumCInterface.hxx \ CalciumInterface.hxx \ Copy2UserSpace.hxx \ Copy2CorbaSpace.hxx \ CalciumPortTraits.hxx \ calcium.h \ + calciumf.h \ Calcium.hxx \ calciumP.h \ calciumE.h \ version.h \ calcium.hf -EXTRA_DIST=fortoc.h +nodist_salomeinclude_HEADERS = calcium_integer_port_uses.hxx CalciumProvidesPort.hxx CalciumFortranInt.h + +EXTRA_DIST=fortoc.h calcium_integer_port_uses.hxx.in CalciumProvidesPort.hxx.in CalciumFortranInt.h.in + +calcium_integer_port_uses.hxx: calcium_integer_port_uses.hxx.in +CalciumProvidesPort.hxx : CalciumProvidesPort.hxx.in +CalciumFortranInt.h : CalciumFortranInt.h.in + # # =============================================================== # Local definitions @@ -71,15 +82,17 @@ EXTRA_DIST=fortoc.h COMMON_CPPFLAGS= -I$(top_srcdir)/src/DSC/DSC_User \ -I$(top_srcdir)/src/DSC/DSC_User/Datastream \ -I$(top_srcdir)/src/DSC/DSC_User/Datastream/Palm \ + -I$(top_srcdir)/src/DSC/DSC_User/Datastream/Calcium \ -I$(top_srcdir)/src/DSC/DSC_User/Basic \ -I$(top_srcdir)/src/DSC/DSC_Basic \ -I$(top_srcdir)/src/SALOMELocalTrace \ -I$(top_srcdir)/src/Basics \ -I$(top_srcdir)/src/Utils \ -I$(top_srcdir)/src/Container \ + -I$(top_srcdir)/src/GenericObj \ -I$(top_srcdir)/src/Notification \ - -I$(top_builddir)/salome_adm/unix -include SALOMEconfig.h \ -I$(top_builddir)/idl \ + -I$(top_builddir)/src/DSC/DSC_User/Datastream/Calcium \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ @BOOST_CPPFLAGS@ # This local variable defines the list of dependant libraries common to all target in this package. @@ -98,7 +111,9 @@ libSalomeCalcium_la_SOURCES = calcium_port_factory.cxx \ calcium_repository_types.cxx \ CalciumCouplingPolicy.cxx \ CorbaTypes2CalciumTypes.cxx \ + CalciumCxxInterface.cxx \ CalciumTypes2CorbaTypes.cxx \ + CalciumCInterface.cxx \ CalciumProvidesPort.cxx \ Calcium.cxx \ calcium_destructors_port_uses.cxx @@ -109,7 +124,7 @@ libSalomeCalcium_la_LDFLAGS = -no-undefined -version-info=0:0:0 AM_CFLAGS = -fexceptions lib_LTLIBRARIES = libCalciumC.la -libCalciumC_la_SOURCES = Calcium.c Calcium.cxx calciumf.c +libCalciumC_la_SOURCES = CalciumC.c Calcium.cxx calciumf.c libCalciumC_la_CXXFLAGS = $(COMMON_CPPFLAGS) # @@ -126,7 +141,8 @@ test_DataIdContainer_SOURCES = test_DataIdContainer.cxx test_DataIdContainer_CXXFLAGS = $(COMMON_CPPFLAGS) -test_DataIdContainer_LDADD = libSalomeCalcium.la $(top_builddir)/src/Utils/libOpUtil.la +test_DataIdContainer_LDADD = libSalomeCalcium.la \ + $(top_builddir)/src/Utils/libOpUtil.la \ + $(top_builddir)/src/SALOMELocalTrace/libSALOMELocalTrace.la test_DataIdContainer_LDFLAGS = $(COMMON_LIBS) - diff --git a/src/DSC/DSC_User/Datastream/Calcium/calcium.h b/src/DSC/DSC_User/Datastream/Calcium/calcium.h index 2b3383b8d..f103fe937 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/calcium.h +++ b/src/DSC/DSC_User/Datastream/Calcium/calcium.h @@ -1,28 +1,29 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : calcium.h // Author : Eric Fayolle (EDF) // Module : KERNEL - +// /* Outils d'Aide au Couplage de Code de Calcul : $Id$ */ #ifndef __CALCIUM_H @@ -33,9 +34,9 @@ #include "calciumP.h" #if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus) -#define CPNeedPrototype 1 +#define CPNeedPrototype 1 #else -#define CPNeedPrototype 0 +#define CPNeedPrototype 0 #endif @@ -43,711 +44,787 @@ extern "C" { #endif -/* */ -/* */ -/* Fonctions de connexion */ -/* */ -/* */ -extern int cp_cd( -/* ----- */ +/* */ +/* */ +/* Fonctions de connexion */ +/* */ +/* */ +extern int cp_cd( +/* ----- */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, char * /* S Nom de l instance appelante*/ #endif ); -/* */ -/* */ -/* Fonction de deconnexion */ -/* */ -/* */ -extern int cp_fin( -/* ------ */ -#if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Directive de continuation */ - /* CP_CONT ou CP_ARRET */ -#endif -); - - - -/* */ -/* */ -/* Fonctions de lecture bloquante */ -/* */ -/* */ -extern int cp_len( -/* ------ */ -#if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance ou de lecture */ - /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, - float * /* E/S Borne inf de l'intervalle de lecture */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - float * /* E Borne Sup de l'intervalle de lecture */, - int * /* E/S Pas d'iteration a lire */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - char * /* E Nom de la variable a lire */, - int /* E Nombre max de valeurs a lire */, - int * /* S Nombre de valeurs rellement lues */, - int * /* S Tableau d'entiers pour stocker les */ - /* valeurs lues */ -#endif -); - -extern int cp_lre( -/* ------ */ -#if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance ou de lecture */ - /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, - float * /* E/S Borne inf de l'intervalle de lecture */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - float * /* E Borne Sup de l'intervalle de lecture */, - int * /* E/S Pas d'iteration a lire */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - char * /* E Nom de la variable a lire */, - int /* E Nombre max de valeurs a lire */, - int * /* S Nombre de valeurs rellement lues */, - float * /* S Tableau de flottants pour stocker les */ - /* valeurs lues */ -#endif -); - -extern int cp_ldb( -/* ------ */ -#if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance ou de lecture */ - /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, - double* /* E/S Borne inf de l'intervalle de lecture */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - double* /* E Borne Sup de l'intervalle de lecture */, - int * /* E/S Pas d'iteration a lire */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - char * /* E Nom de la variable a lire */, - int /* E Nombre max de valeurs a lire */, - int * /* S Nombre de valeurs rellement lues */, - double* /* S Tableau de doubles pour stocker les */ - /* valeurs lues */ -#endif -); - -extern int cp_lcp( -/* ------ */ -#if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance ou de lecture */ - /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, - float * /* E/S Borne inf de l'intervalle de lecture */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - float * /* E Borne Sup de l'intervalle de lecture */, - int * /* E/S Pas d'iteration lire */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - char * /* E Nom de la variable a lire */, - int /* E Nombre max de valeurs a lire */, - int * /* S Nombre de valeurs rellement lues */, - float * /* S Tableau de flottants pour stocker les */ - /* valeurs lues (dimension = 2 * le nombre */ - /* de valeurs lues) */ -#endif -); - -extern int cp_llo( -/* ------ */ -#if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance ou de lecture */ - /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, - float * /* E/S Borne inf de l'intervalle de lecture */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - float * /* E Borne Sup de l'intervalle de lecture */, - int * /* E/S Pas d'iteration a lire */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - char * /* E Nom de la variable a lire */, - int /* E Nombre max de valeurs a lire */, - int * /* S Nombre de valeurs rellement lues */, - int * /* S Tableau d 'entier pour stocker les */ - /* valeurs lues (remplace le logiques) */ -#endif -); - -extern int cp_lch( -/* ------ */ -#if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance ou de lecture */ - /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, - float * /* E/S Borne inf de l'intervalle de lecture */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - float * /* E Borne Sup de l'intervalle de lecture */, - int * /* E/S Pas d'iteration a lire */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - char * /* E Nom de la variable a lire */, - int /* E Nombre max de valeurs a lire */, - int * /* S Nombre de valeurs rellement lues */, - char *[]/* S Tableau de chaines pour stocker les */ - /* valeurs lues (remplace le logiques) */, - int /* E Taille des chaines du tablaeu */ -#endif -); - - - -/* */ -/* */ -/* Fonctions de lecture non bloquantes */ -/* */ -/* */ -extern int cp_nlen( -/* ------- */ -#if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance ou de lecture */ - /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, - float * /* E/S Borne inf de l'intervalle de lecture */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - float * /* E Borne Sup de l'intervalle de lecture */, - int * /* E/S Pas d'iteration a lire */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - char * /* E Nom de la variable a lire */, - int /* E Nombre max de valeurs a lire */, - int * /* S Nombre de valeurs rellement lues */, - int * /* S Tableau d'entiers pour stocker les */ - /* valeurs lues */ -#endif -); - -extern int cp_nlre( -/* ------- */ -#if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance ou de lecture */ - /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, - float * /* E/S Borne inf de l'intervalle de lecture */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - float * /* E Borne Sup de l'intervalle de lecture */, - int * /* E/S Pas d'iteration a lire */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - char * /* E Nom de la variable a lire */, - int /* E Nombre max de valeurs a lire */, - int * /* S Nombre de valeurs rellement lues */, - float * /* S Tableau de flottants pour stocker les */ - /* valeurs lues */ -#endif -); - -extern int cp_nldb( -/* ------- */ - -#if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance ou de lecture */ - /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, - double */* E/S Borne inf de l'intervalle de lecture */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - double */* E Borne Sup de l'intervalle de lecture */, - int * /* E/S Pas d'iteration a lire */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - char * /* E Nom de la variable a lire */, - int /* E Nombre max de valeurs a lire */, - int * /* S Nombre de valeurs rellement lues */, - double* /* S Tableau de doubles pour stocker les */ - /* valeurs lues */ -#endif -); - -extern int cp_nlcp( -/* ------- */ -#if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance ou de lecture */ - /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, - float * /* E/S Borne inf de l'intervalle de lecture */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - float * /* E Borne Sup de l'intervalle de lecture */, - int * /* E/S Pas d'iteration lire */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - char * /* E Nom de la variable a lire */, - int /* E Nombre max de valeurs a lire */, - int * /* S Nombre de valeurs rellement lues */, - float * /* S Tableau de flottants pour stocker les */ - /* valeurs lues (dimension = 2 * le nombre */ - /* de valeurs lues) */ -#endif -); - -extern int cp_nllo( -/* ------- */ -#if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance ou de lecture */ - /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, - float * /* E/S Borne inf de l'intervalle de lecture */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - float * /* E Borne Sup de l'intervalle de lecture */, - int * /* E/S Pas d'iteration a lire */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - char * /* E Nom de la variable a lire */, - int /* E Nombre max de valeurs a lire */, - int * /* S Nombre de valeurs rellement lues */, - int * /* S Tableau d 'entier pour stocker les */ - /* valeurs lues (remplace le logiques) */ -#endif -); - -extern int cp_nlch( -/* ------- */ -#if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance ou de lecture */ - /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, - float * /* E/S Borne inf de l'intervalle de lecture */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - float * /* E Borne Sup de l'intervalle de lecture */, - int * /* E/S Pas d'iteration a lire */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - char * /* E Nom de la variable a lire */, - int /* E Nombre max de valeurs a lire */, - int * /* S Nombre de valeurs rellement lues */, - char *[]/* S Tableau de chaines pour stocker les */ - /* valeurs lues (remplace le logiques) */, - int /* E Taille des chaines du tablaeu */ -#endif -); - - - - -/* */ -/* */ -/* Fonctions d'ecriture */ -/* */ -/* */ - -extern int cp_een( -/* ------ */ -#if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance */ - /* CP_TEMPS, CP_ITERATION */, - float /* E Pas de temps a ecrire */, - int /* E Pas d'iteration a ecrire */, - char * /* E Nom de la variable a ecrire */, - int /* E Nombre de valeurs a ecrire */, - int * /* E Tableau d'entiers a ecrire */ +/* */ +/* */ +/* Fonction de deconnexion */ +/* */ +/* */ +extern int cp_fin( +/* ------ */ +#if CPNeedPrototype + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Directive de continuation */ + /* CP_CONT ou CP_ARRET */ +#endif +); + + + +/* */ +/* */ +/* Fonctions de lecture bloquante */ +/* */ +/* */ +extern int cp_len( +/* ------ */ +#if CPNeedPrototype + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance ou de lecture */ + /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, + float * /* E/S Borne inf de l'intervalle de lecture */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + float * /* E Borne Sup de l'intervalle de lecture */, + int * /* E/S Pas d'iteration a lire */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + char * /* E Nom de la variable a lire */, + int /* E Nombre max de valeurs a lire */, + int * /* S Nombre de valeurs rellement lues */, + int * /* S Tableau d'entiers pour stocker les */ + /* valeurs lues */ +#endif +); + +extern int cp_llg( +/* ------ */ +#if CPNeedPrototype + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance ou de lecture */ + /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, + float * /* E/S Borne inf de l'intervalle de lecture */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + float * /* E Borne Sup de l'intervalle de lecture */, + int * /* E/S Pas d'iteration a lire */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + char * /* E Nom de la variable a lire */, + int /* E Nombre max de valeurs a lire */, + int * /* S Nombre de valeurs rellement lues */, + long * /* S Tableau d'entiers pour stocker les */ + /* valeurs lues */ +#endif +); + +extern int cp_lln( +/* ------ */ +#if CPNeedPrototype + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance ou de lecture */ + /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, + float * /* E/S Borne inf de l'intervalle de lecture */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + float * /* E Borne Sup de l'intervalle de lecture */, + int * /* E/S Pas d'iteration a lire */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + char * /* E Nom de la variable a lire */, + int /* E Nombre max de valeurs a lire */, + int * /* S Nombre de valeurs rellement lues */, + long * /* S Tableau d'entiers pour stocker les */ + /* valeurs lues */ +#endif +); + +extern int cp_lre( +/* ------ */ +#if CPNeedPrototype + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance ou de lecture */ + /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, + float * /* E/S Borne inf de l'intervalle de lecture */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + float * /* E Borne Sup de l'intervalle de lecture */, + int * /* E/S Pas d'iteration a lire */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + char * /* E Nom de la variable a lire */, + int /* E Nombre max de valeurs a lire */, + int * /* S Nombre de valeurs rellement lues */, + float * /* S Tableau de flottants pour stocker les */ + /* valeurs lues */ +#endif +); + +extern int cp_ldb( +/* ------ */ +#if CPNeedPrototype + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance ou de lecture */ + /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, + double* /* E/S Borne inf de l'intervalle de lecture */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + double* /* E Borne Sup de l'intervalle de lecture */, + int * /* E/S Pas d'iteration a lire */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + char * /* E Nom de la variable a lire */, + int /* E Nombre max de valeurs a lire */, + int * /* S Nombre de valeurs rellement lues */, + double* /* S Tableau de doubles pour stocker les */ + /* valeurs lues */ +#endif +); + +extern int cp_lcp( +/* ------ */ +#if CPNeedPrototype + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance ou de lecture */ + /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, + float * /* E/S Borne inf de l'intervalle de lecture */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + float * /* E Borne Sup de l'intervalle de lecture */, + int * /* E/S Pas d'iteration lire */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + char * /* E Nom de la variable a lire */, + int /* E Nombre max de valeurs a lire */, + int * /* S Nombre de valeurs rellement lues */, + float * /* S Tableau de flottants pour stocker les */ + /* valeurs lues (dimension = 2 * le nombre */ + /* de valeurs lues) */ +#endif +); + +extern int cp_llo( +/* ------ */ +#if CPNeedPrototype + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance ou de lecture */ + /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, + float * /* E/S Borne inf de l'intervalle de lecture */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + float * /* E Borne Sup de l'intervalle de lecture */, + int * /* E/S Pas d'iteration a lire */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + char * /* E Nom de la variable a lire */, + int /* E Nombre max de valeurs a lire */, + int * /* S Nombre de valeurs rellement lues */, + int * /* S Tableau d 'entier pour stocker les */ + /* valeurs lues (remplace le logiques) */ +#endif +); + +extern int cp_lch( +/* ------ */ +#if CPNeedPrototype + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance ou de lecture */ + /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, + float * /* E/S Borne inf de l'intervalle de lecture */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + float * /* E Borne Sup de l'intervalle de lecture */, + int * /* E/S Pas d'iteration a lire */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + char * /* E Nom de la variable a lire */, + int /* E Nombre max de valeurs a lire */, + int * /* S Nombre de valeurs rellement lues */, + char *[]/* S Tableau de chaines pour stocker les */ + /* valeurs lues (remplace le logiques) */, + int /* E Taille des chaines du tablaeu */ +#endif +); + + + +/* */ +/* */ +/* Fonctions de lecture non bloquantes */ +/* */ +/* */ +extern int cp_nlen( +/* ------- */ +#if CPNeedPrototype + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance ou de lecture */ + /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, + float * /* E/S Borne inf de l'intervalle de lecture */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + float * /* E Borne Sup de l'intervalle de lecture */, + int * /* E/S Pas d'iteration a lire */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + char * /* E Nom de la variable a lire */, + int /* E Nombre max de valeurs a lire */, + int * /* S Nombre de valeurs rellement lues */, + int * /* S Tableau d'entiers pour stocker les */ + /* valeurs lues */ +#endif +); + +extern int cp_nlre( +/* ------- */ +#if CPNeedPrototype + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance ou de lecture */ + /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, + float * /* E/S Borne inf de l'intervalle de lecture */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + float * /* E Borne Sup de l'intervalle de lecture */, + int * /* E/S Pas d'iteration a lire */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + char * /* E Nom de la variable a lire */, + int /* E Nombre max de valeurs a lire */, + int * /* S Nombre de valeurs rellement lues */, + float * /* S Tableau de flottants pour stocker les */ + /* valeurs lues */ +#endif +); + +extern int cp_nldb( +/* ------- */ + +#if CPNeedPrototype + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance ou de lecture */ + /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, + double */* E/S Borne inf de l'intervalle de lecture */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + double */* E Borne Sup de l'intervalle de lecture */, + int * /* E/S Pas d'iteration a lire */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + char * /* E Nom de la variable a lire */, + int /* E Nombre max de valeurs a lire */, + int * /* S Nombre de valeurs rellement lues */, + double* /* S Tableau de doubles pour stocker les */ + /* valeurs lues */ +#endif +); + +extern int cp_nlcp( +/* ------- */ +#if CPNeedPrototype + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance ou de lecture */ + /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, + float * /* E/S Borne inf de l'intervalle de lecture */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + float * /* E Borne Sup de l'intervalle de lecture */, + int * /* E/S Pas d'iteration lire */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + char * /* E Nom de la variable a lire */, + int /* E Nombre max de valeurs a lire */, + int * /* S Nombre de valeurs rellement lues */, + float * /* S Tableau de flottants pour stocker les */ + /* valeurs lues (dimension = 2 * le nombre */ + /* de valeurs lues) */ +#endif +); + +extern int cp_nllo( +/* ------- */ +#if CPNeedPrototype + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance ou de lecture */ + /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, + float * /* E/S Borne inf de l'intervalle de lecture */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + float * /* E Borne Sup de l'intervalle de lecture */, + int * /* E/S Pas d'iteration a lire */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + char * /* E Nom de la variable a lire */, + int /* E Nombre max de valeurs a lire */, + int * /* S Nombre de valeurs rellement lues */, + int * /* S Tableau d 'entier pour stocker les */ + /* valeurs lues (remplace le logiques) */ +#endif +); + +extern int cp_nlch( +/* ------- */ +#if CPNeedPrototype + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance ou de lecture */ + /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, + float * /* E/S Borne inf de l'intervalle de lecture */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + float * /* E Borne Sup de l'intervalle de lecture */, + int * /* E/S Pas d'iteration a lire */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + char * /* E Nom de la variable a lire */, + int /* E Nombre max de valeurs a lire */, + int * /* S Nombre de valeurs rellement lues */, + char *[]/* S Tableau de chaines pour stocker les */ + /* valeurs lues (remplace le logiques) */, + int /* E Taille des chaines du tablaeu */ +#endif +); + + + + +/* */ +/* */ +/* Fonctions d'ecriture */ +/* */ +/* */ + +extern int cp_een( +/* ------ */ +#if CPNeedPrototype + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance */ + /* CP_TEMPS, CP_ITERATION */, + float /* E Pas de temps a ecrire */, + int /* E Pas d'iteration a ecrire */, + char * /* E Nom de la variable a ecrire */, + int /* E Nombre de valeurs a ecrire */, + int * /* E Tableau d'entiers a ecrire */ +#endif +); + +extern int cp_elg( +/* ------ */ +#if CPNeedPrototype + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance */ + /* CP_TEMPS, CP_ITERATION */, + float /* E Pas de temps a ecrire */, + int /* E Pas d'iteration a ecrire */, + char * /* E Nom de la variable a ecrire */, + int /* E Nombre de valeurs a ecrire */, + long * /* E Tableau d'entiers a ecrire */ +#endif +); + +extern int cp_eln( +/* ------ */ +#if CPNeedPrototype + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance */ + /* CP_TEMPS, CP_ITERATION */, + float /* E Pas de temps a ecrire */, + int /* E Pas d'iteration a ecrire */, + char * /* E Nom de la variable a ecrire */, + int /* E Nombre de valeurs a ecrire */, + long * /* E Tableau d'entiers a ecrire */ #endif ); -extern int cp_ere( -/* ------ */ +extern int cp_ere( +/* ------ */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance */ - /* CP_TEMPS, CP_ITERATION */, - float /* E Pas de temps a ecrire */, - int /* E Pas d'iteration a ecrire */, - char * /* E Nom de la variable a ecrire */, - int /* E Nombre de valeurs a ecrire */, - float * /* E Tableau de flottants a ecrire */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance */ + /* CP_TEMPS, CP_ITERATION */, + float /* E Pas de temps a ecrire */, + int /* E Pas d'iteration a ecrire */, + char * /* E Nom de la variable a ecrire */, + int /* E Nombre de valeurs a ecrire */, + float * /* E Tableau de flottants a ecrire */ #endif ); -extern int cp_edb( -/* ------ */ +extern int cp_edb( +/* ------ */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance */ - /* CP_TEMPS, CP_ITERATION */, - double /* E Pas de temps a ecrire */, - int /* E Pas d'iteration a ecrire */, - char * /* E Nom de la variable a ecrire */, - int /* E Nombre de valeurs a ecrire */, - double* /* E Tableau de doubles a ecrire */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance */ + /* CP_TEMPS, CP_ITERATION */, + double /* E Pas de temps a ecrire */, + int /* E Pas d'iteration a ecrire */, + char * /* E Nom de la variable a ecrire */, + int /* E Nombre de valeurs a ecrire */, + double* /* E Tableau de doubles a ecrire */ #endif ); -extern int cp_ecp( -/* ------ */ +extern int cp_ecp( +/* ------ */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance */ - /* CP_TEMPS, CP_ITERATION */, - float /* E Pas de temps a ecrire */, - int /* E Pas d'iteration a ecrire */, - char * /* E Nom de la variable a ecrire */, - int /* E Nombre de valeurs a ecrire */, - float * /* E Tableau de flottants a ecrire */ - /* (dimension = 2 * le nombre de valeurs */ - /* a ecrire */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance */ + /* CP_TEMPS, CP_ITERATION */, + float /* E Pas de temps a ecrire */, + int /* E Pas d'iteration a ecrire */, + char * /* E Nom de la variable a ecrire */, + int /* E Nombre de valeurs a ecrire */, + float * /* E Tableau de flottants a ecrire */ + /* (dimension = 2 * le nombre de valeurs */ + /* a ecrire */ #endif ); -extern int cp_elo( -/* ------ */ +extern int cp_elo( +/* ------ */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance */ - /* CP_TEMPS, CP_ITERATION */, - float /* E Pas de temps a ecrire */, - int /* E Pas d'iteration a ecrire */, - char * /* E Nom de la variable a ecrire */, - int /* E Nombre de valeurs a ecrire */, - int * /* E Tableau d'entiers a ecrire */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance */ + /* CP_TEMPS, CP_ITERATION */, + float /* E Pas de temps a ecrire */, + int /* E Pas d'iteration a ecrire */, + char * /* E Nom de la variable a ecrire */, + int /* E Nombre de valeurs a ecrire */, + int * /* E Tableau d'entiers a ecrire */ #endif ); -extern int cp_ech( -/* ------ */ +extern int cp_ech( +/* ------ */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance */ - /* CP_TEMPS, CP_ITERATION */, - float /* E Pas de temps a ecrire */, - int /* E Pas d'iteration a ecrire */, - char * /* E Nom de la variable a ecrire */, - int /* E Nombre de valeurs a ecrire */, - char *[]/* E Tableau de chaines a ecrire */, - int /* E Taille des chaines a ecrire */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance */ + /* CP_TEMPS, CP_ITERATION */, + float /* E Pas de temps a ecrire */, + int /* E Pas d'iteration a ecrire */, + char * /* E Nom de la variable a ecrire */, + int /* E Nombre de valeurs a ecrire */, + char *[]/* E Tableau de chaines a ecrire */, + int /* E Taille des chaines a ecrire */ #endif ); -/* */ -/* */ -/* Fonctions de fin de pas */ -/* */ -/* */ -extern int cp_aufp( -/* ------- */ +/* */ +/* */ +/* Fonctions de fin de pas */ +/* */ +/* */ +extern int cp_aufp( +/* ------- */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */ #endif ); -extern int cp_infp( -/* ------- */ +extern int cp_infp( +/* ------- */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */ #endif ); -extern int cp_fini( -/* ------- */ +extern int cp_fini( +/* ------- */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Tous les pas <= a cette valeur */ - /* seront oublies par le coupleur */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + char * /* E Nom de la variable (not in original CALCIUM API) */, + int /* E Tous les pas <= a cette valeur */ + /* seront oublies par le coupleur */ #endif ); -extern int cp_fint( -/* ------- */ +extern int cp_fint( +/* ------- */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - float /* E Tous les pas <= a cette valeur */ - /* seront oublies par le coupleur */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + char * /* E Nom de la variable (not in original CALCIUM API) */, + float /* E Tous les pas <= a cette valeur */ + /* seront oublies par le coupleur */ #endif ); -/* */ -/* */ -/* Fonctions d'effacement */ -/* */ -/* */ -extern int cp_effi( -/* ------- */ +/* */ +/* */ +/* Fonctions d'effacement */ +/* */ +/* */ +extern int cp_effi( +/* ------- */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - char * /* E Nom de la variable a effacer */, - int /* E Tous les pas >= a cette valeurt */ - /* seront effaces par le coupleur */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + char * /* E Nom de la variable a effacer */, + int /* E Tous les pas >= a cette valeurt */ + /* seront effaces par le coupleur */ #endif ); -extern int cp_efft( -/* ------- */ +extern int cp_efft( +/* ------- */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - char * /* E Nom de la variable a effacer */, - float /* E Tous les pas >= a cette valeur */ - /* seront effaces par le coupleur */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + char * /* E Nom de la variable a effacer */, + float /* E Tous les pas >= a cette valeur */ + /* seront effaces par le coupleur */ #endif ); -/* */ -/* */ -/* Fonctions de mode d'execution */ -/* */ -/* */ -extern int cp_pause( -/* -------- */ +/* */ +/* */ +/* Fonctions de mode d'execution */ +/* */ +/* */ +extern int cp_pause( +/* -------- */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */ #endif ); -extern int cp_run( -/* ------ */ +extern int cp_run( +/* ------ */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */ #endif ); -extern int cp_npas( -/* ------- */ +extern int cp_npas( +/* ------- */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Nombre de pas a executer */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Nombre de pas a executer */ #endif ); -/* */ -/* */ -/* Fonctions de configuration dynamique */ -/* */ -/* */ -extern int cp_dfcode( -/* -------- */ +/* */ +/* */ +/* Fonctions de configuration dynamique */ +/* */ +/* */ +extern int cp_dfcode( +/* -------- */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - char * /* E Declaration du code */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + char * /* E Declaration du code */ #endif ); -extern int cp_dfinst( -/* -------- */ +extern int cp_dfinst( +/* -------- */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - char * /* E Declaration de l'instance */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + char * /* E Declaration de l'instance */ #endif ); -extern int cp_dflien( -/* -------- */ +extern int cp_dflien( +/* -------- */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - char * /* E Declaration du lien */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + char * /* E Declaration du lien */ #endif ); -/* */ -/* */ -/* Fonctions d'interrogation */ -/* */ -/* */ -extern int cp_ivers( -/* -------- */ +/* */ +/* */ +/* Fonctions d'interrogation */ +/* */ +/* */ +extern int cp_ivers( +/* -------- */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - char * /* S Repertoire ACCC */, - char * /* S Repertoire ACCC */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + char * /* S Repertoire ACCC */, + char * /* S Repertoire ACCC */ #endif ); -extern int cp_icd( -/* ------ */ +extern int cp_icd( +/* ------ */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Longueur du tableau passe en parametre */, - int * /* S Nombre de codes retournes */, - char *[]/* S Tableau contenant les noms des codes */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Longueur du tableau passe en parametre */, + int * /* S Nombre de codes retournes */, + char *[]/* S Tableau contenant les noms des codes */ #endif ); -extern int cp_iincd( -/* -------- */ +extern int cp_iincd( +/* -------- */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - char * /* E Nom du code dont on veut les instances */, - int /* E Longueur du tableau passe en parametre */, - int * /* S Nombre d'instances retournees */, - char *[]/* S Tableau contenant les noms des instances */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + char * /* E Nom du code dont on veut les instances */, + int /* E Longueur du tableau passe en parametre */, + int * /* S Nombre d'instances retournees */, + char *[]/* S Tableau contenant les noms des instances */ #endif ); -extern int cp_ivr( -/* ------ */ +extern int cp_ivr( +/* ------ */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Longueur des tableaux passes en parametre */, - int * /* S Nombre de variables retournees */, - char *[]/* S Tableau contenant les noms des instances */, - char *[]/* S Tableau contenant les noms des variables */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Longueur des tableaux passes en parametre */, + int * /* S Nombre de variables retournees */, + char *[]/* S Tableau contenant les noms des instances */, + char *[]/* S Tableau contenant les noms des variables */ #endif ); -extern int cp_ivrcd( -/* -------- */ +extern int cp_ivrcd( +/* -------- */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - char * /* E Nom du code dont on veut les variables */, - int /* E Longueur des tableaux passes en parametre */, - int * /* S Nombre de variables retournees */, - char *[]/* S Tableau contenant les noms des variables */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + char * /* E Nom du code dont on veut les variables */, + int /* E Longueur des tableaux passes en parametre */, + int * /* S Nombre de variables retournees */, + char *[]/* S Tableau contenant les noms des variables */ #endif ); -extern int cp_ivrin( -/* -------- */ +extern int cp_ivrin( +/* -------- */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - char * /* E Nom de l'instance dont on veut la liste */ - /* des variables */, - char * /* S Nom du code pere de l'instance */, - int /* E Longueur du tableau pour les variables */ - /* entrantes */, - int /* E Longueur du tableau pour les variables */ - /* sortantes */, - int * /* S Nombre de variables entrantes retournees */, - int * /* S Nombre de variables sortantes retournees */, - char *[]/* S Tableau contenant les noms des variables */ - /* entrantes */, - char *[]/* S Tableau contenant les noms des variables */ - /* sortantes */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + char * /* E Nom de l'instance dont on veut la liste */ + /* des variables */, + char * /* S Nom du code pere de l'instance */, + int /* E Longueur du tableau pour les variables */ + /* entrantes */, + int /* E Longueur du tableau pour les variables */ + /* sortantes */, + int * /* S Nombre de variables entrantes retournees */, + int * /* S Nombre de variables sortantes retournees */, + char *[]/* S Tableau contenant les noms des variables */ + /* entrantes */, + char *[]/* S Tableau contenant les noms des variables */ + /* sortantes */ #endif ); -extern int cp_icavr( -/* -------- */ +extern int cp_icavr( +/* -------- */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - char * /* E Nom de l'instance contenant la variable */, - char * /* E Nom local de la variable */, - int * /* S Sens de la variable */, - int * /* S Dependance de la variable */, - int * /* S Type de la variable */, - int /* E Longueur des tableaux permettant de */ - /* recueillir les pas de temps et d'iteration*/, - int * /* S Nombre de codes retournes */, - float * /* S Tableau contenant les pas de temps */, - int * /* S Tableau contenant les pas d'iterations */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + char * /* E Nom de l'instance contenant la variable */, + char * /* E Nom local de la variable */, + int * /* S Sens de la variable */, + int * /* S Dependance de la variable */, + int * /* S Type de la variable */, + int /* E Longueur des tableaux permettant de */ + /* recueillir les pas de temps et d'iteration*/, + int * /* S Nombre de codes retournes */, + float * /* S Tableau contenant les pas de temps */, + int * /* S Tableau contenant les pas d'iterations */ #endif ); -extern int cp_ilien( -/* -------- */ +extern int cp_ilien( +/* -------- */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - char * /* E Nom global de la variable */, - int /* E Longueur des tableaux pour les noms des */ - /* instances et des variables */, - int * /* S Nombre de variables participant au lien */, - char *[]/* S Tableau contenant les noms des instances */, - char *[]/* S Tableau contenant les noms des variables */, - int * /* S Type du lien */, - int * /* S Niveau du lien */, - int * /* S Tableau des parametres d'interpolation */ - /* des variables entrantes */, - float * /* S Tableau des valeurs de delta utilisees */ - /* pour les variables entrantes */, - int * /* S Tableau des parametres d'extrapolation */ - /* des variables entrantes */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + char * /* E Nom global de la variable */, + int /* E Longueur des tableaux pour les noms des */ + /* instances et des variables */, + int * /* S Nombre de variables participant au lien */, + char *[]/* S Tableau contenant les noms des instances */, + char *[]/* S Tableau contenant les noms des variables */, + int * /* S Type du lien */, + int * /* S Niveau du lien */, + int * /* S Tableau des parametres d'interpolation */ + /* des variables entrantes */, + float * /* S Tableau des valeurs de delta utilisees */ + /* pour les variables entrantes */, + int * /* S Tableau des parametres d'extrapolation */ + /* des variables entrantes */ #endif ); -/* */ -/* */ -/* Fonctions de manipulation d'options */ -/* */ -/* */ -extern int cp_setopt( -/* --------- */ +/* */ +/* */ +/* Fonctions de manipulation d'options */ +/* */ +/* */ +extern int cp_setopt( +/* --------- */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Numero identifiant l'option a modifier */, - int /* E Valeur a donner a l'option */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Numero identifiant l'option a modifier */, + int /* E Valeur a donner a l'option */ #endif ); -extern int cp_getopt( -/* --------- */ +extern int cp_getopt( +/* --------- */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Numero identifiant l'option a consulter */, - int * /* S Valeur recupereee de l'option */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Numero identifiant l'option a consulter */, + int * /* S Valeur recupereee de l'option */ #endif ); diff --git a/src/DSC/DSC_User/Datastream/Calcium/calcium.hf b/src/DSC/DSC_User/Datastream/Calcium/calcium.hf index 9fa430e00..64209b92f 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/calcium.hf +++ b/src/DSC/DSC_User/Datastream/Calcium/calcium.hf @@ -1,24 +1,25 @@ -C Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +C Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE C -C Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -C CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +C Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +C CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS C -C This library is free software; you can redistribute it and/or -C modify it under the terms of the GNU Lesser General Public -C License as published by the Free Software Foundation; either -C version 2.1 of the License. +C This library is free software; you can redistribute it and/or +C modify it under the terms of the GNU Lesser General Public +C License as published by the Free Software Foundation; either +C version 2.1 of the License. C -C This library is distributed in the hope that it will be useful, -C but WITHOUT ANY WARRANTY; without even the implied warranty of -C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -C Lesser General Public License for more details. +C This library is distributed in the hope that it will be useful, +C but WITHOUT ANY WARRANTY; without even the implied warranty of +C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +C Lesser General Public License for more details. C -C You should have received a copy of the GNU Lesser General Public -C License along with this library; if not, write to the Free Software -C Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +C You should have received a copy of the GNU Lesser General Public +C License along with this library; if not, write to the Free Software +C Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA C -C See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +C See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com C + C File : version.h C Author : Eric Fayolle (EDF) C Module : KERNEL diff --git a/src/DSC/DSC_User/Datastream/Calcium/calciumE.h b/src/DSC/DSC_User/Datastream/Calcium/calciumE.h index 4be7c286d..ddc660352 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/calciumE.h +++ b/src/DSC/DSC_User/Datastream/Calcium/calciumE.h @@ -1,28 +1,26 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : calcium.h // Author : Eric Fayolle (EDF) // Module : KERNEL - +// /* Outils d'Aide au Couplage de Code de Calcul : $Id$ */ #ifndef __CALCIUM_E_H @@ -31,9 +29,9 @@ #include "calciumP.h" #if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus) -#define CPNeedPrototype 1 +#define CPNeedPrototype 1 #else -#define CPNeedPrototype 0 +#define CPNeedPrototype 0 #endif @@ -41,352 +39,352 @@ extern "C" { #endif -/* */ -/* */ -/* Fonctions de connexion */ -/* */ -/* */ -extern int ecp_cd( -/* ----- */ +/* */ +/* */ +/* Fonctions de connexion */ +/* */ +/* */ +extern int ecp_cd( +/* ----- */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, char * /* S Nom de l instance appelante*/ #endif ); -/* */ -/* */ -/* Fonction de deconnexion */ -/* */ -/* */ -extern int ecp_fin( -/* ------ */ +/* */ +/* */ +/* Fonction de deconnexion */ +/* */ +/* */ +extern int ecp_fin( +/* ------ */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Directive de continuation */ - /* CP_CONT ou CP_ARRET */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Directive de continuation */ + /* CP_CONT ou CP_ARRET */ #endif ); -/* */ -/* */ -/* Fonctions de libération du buffer 0 copy */ -/* */ +/* */ +/* */ +/* Fonctions de libération du buffer 0 copy */ +/* */ extern void ecp_len_free( #if CPNeedPrototype - int * + int * #endif - ); + ); extern void ecp_lre_free( #if CPNeedPrototype - float * + float * #endif - ); + ); extern void ecp_ldb_free( #if CPNeedPrototype - double * + double * #endif - ); + ); extern void ecp_llo_free( #if CPNeedPrototype - int * + int * #endif - ); + ); extern void ecp_lcp_free( #if CPNeedPrototype - float * + float * #endif - ); + ); extern void ecp_lch_free( #if CPNeedPrototype - char ** + char ** #endif - ); + ); -/* */ -/* */ -/* Fonctions de lecture bloquante 0 copy */ -/* */ -/* */ -extern int ecp_len( -/* ------ */ +/* */ +/* */ +/* Fonctions de lecture bloquante 0 copy */ +/* */ +/* */ +extern int ecp_len( +/* ------ */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance ou de lecture */ - /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, - float * /* E/S Borne inf de l'intervalle de lecture */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - float * /* E Borne Sup de l'intervalle de lecture */, - int * /* E/S Pas d'iteration a lire */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - char * /* E Nom de la variable a lire */, - int /* E Nombre max de valeurs a lire */, - int * /* S Nombre de valeurs rellement lues */, - int ** /* E/S Tableau d'entiers pour stocker les */ - /* valeurs lues */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance ou de lecture */ + /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, + float * /* E/S Borne inf de l'intervalle de lecture */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + float * /* E Borne Sup de l'intervalle de lecture */, + int * /* E/S Pas d'iteration a lire */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + char * /* E Nom de la variable a lire */, + int /* E Nombre max de valeurs a lire */, + int * /* S Nombre de valeurs rellement lues */, + int ** /* E/S Tableau d'entiers pour stocker les */ + /* valeurs lues */ #endif ); -extern int ecp_lre( -/* ------ */ +extern int ecp_lre( +/* ------ */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance ou de lecture */ - /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, - float * /* E/S Borne inf de l'intervalle de lecture */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - float * /* E Borne Sup de l'intervalle de lecture */, - int * /* E/S Pas d'iteration a lire */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - char * /* E Nom de la variable a lire */, - int /* E Nombre max de valeurs a lire */, - int * /* S Nombre de valeurs rellement lues */, - float **/* E/S Tableau de flottants pour stocker les */ - /* valeurs lues */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance ou de lecture */ + /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, + float * /* E/S Borne inf de l'intervalle de lecture */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + float * /* E Borne Sup de l'intervalle de lecture */, + int * /* E/S Pas d'iteration a lire */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + char * /* E Nom de la variable a lire */, + int /* E Nombre max de valeurs a lire */, + int * /* S Nombre de valeurs rellement lues */, + float **/* E/S Tableau de flottants pour stocker les */ + /* valeurs lues */ #endif ); -extern int ecp_ldb( -/* ------ */ +extern int ecp_ldb( +/* ------ */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance ou de lecture */ - /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, - double* /* E/S Borne inf de l'intervalle de lecture */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - double* /* E Borne Sup de l'intervalle de lecture */, - int * /* E/S Pas d'iteration a lire */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - char * /* E Nom de la variable a lire */, - int /* E Nombre max de valeurs a lire */, - int * /* S Nombre de valeurs rellement lues */, - double**/* E/S Tableau de doubles pour stocker les */ - /* valeurs lues */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance ou de lecture */ + /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, + double* /* E/S Borne inf de l'intervalle de lecture */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + double* /* E Borne Sup de l'intervalle de lecture */, + int * /* E/S Pas d'iteration a lire */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + char * /* E Nom de la variable a lire */, + int /* E Nombre max de valeurs a lire */, + int * /* S Nombre de valeurs rellement lues */, + double**/* E/S Tableau de doubles pour stocker les */ + /* valeurs lues */ #endif ); -extern int ecp_lcp( -/* ------ */ +extern int ecp_lcp( +/* ------ */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance ou de lecture */ - /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, - float * /* E/S Borne inf de l'intervalle de lecture */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - float * /* E Borne Sup de l'intervalle de lecture */, - int * /* E/S Pas d'iteration lire */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - char * /* E Nom de la variable a lire */, - int /* E Nombre max de valeurs a lire */, - int * /* S Nombre de valeurs rellement lues */, - float **/* E/S Tableau de flottants pour stocker les */ - /* valeurs lues (dimension = 2 * le nombre */ - /* de valeurs lues) */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance ou de lecture */ + /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, + float * /* E/S Borne inf de l'intervalle de lecture */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + float * /* E Borne Sup de l'intervalle de lecture */, + int * /* E/S Pas d'iteration lire */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + char * /* E Nom de la variable a lire */, + int /* E Nombre max de valeurs a lire */, + int * /* S Nombre de valeurs rellement lues */, + float **/* E/S Tableau de flottants pour stocker les */ + /* valeurs lues (dimension = 2 * le nombre */ + /* de valeurs lues) */ #endif ); -extern int ecp_llo( -/* ------ */ +extern int ecp_llo( +/* ------ */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance ou de lecture */ - /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, - float * /* E/S Borne inf de l'intervalle de lecture */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - float * /* E Borne Sup de l'intervalle de lecture */, - int * /* E/S Pas d'iteration a lire */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - char * /* E Nom de la variable a lire */, - int /* E Nombre max de valeurs a lire */, - int * /* S Nombre de valeurs rellement lues */, - int ** /* E/S Tableau d 'entier pour stocker les */ - /* valeurs lues (remplace le logiques) */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance ou de lecture */ + /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, + float * /* E/S Borne inf de l'intervalle de lecture */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + float * /* E Borne Sup de l'intervalle de lecture */, + int * /* E/S Pas d'iteration a lire */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + char * /* E Nom de la variable a lire */, + int /* E Nombre max de valeurs a lire */, + int * /* S Nombre de valeurs rellement lues */, + int ** /* E/S Tableau d 'entier pour stocker les */ + /* valeurs lues (remplace le logiques) */ #endif ); -extern int ecp_lch( -/* ------ */ +extern int ecp_lch( +/* ------ */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance ou de lecture */ - /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, - float * /* E/S Borne inf de l'intervalle de lecture */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - float * /* E Borne Sup de l'intervalle de lecture */, - int * /* E/S Pas d'iteration a lire */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - char * /* E Nom de la variable a lire */, - int /* E Nombre max de valeurs a lire */, - int * /* S Nombre de valeurs rellement lues */, - char **[]/*E/S Tableau de chaines pour stocker les */ - /* valeurs lues (remplace le logiques) */, - int /* E Taille des chaines du tablaeu */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance ou de lecture */ + /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, + float * /* E/S Borne inf de l'intervalle de lecture */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + float * /* E Borne Sup de l'intervalle de lecture */, + int * /* E/S Pas d'iteration a lire */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + char * /* E Nom de la variable a lire */, + int /* E Nombre max de valeurs a lire */, + int * /* S Nombre de valeurs rellement lues */, + char **[]/*E/S Tableau de chaines pour stocker les */ + /* valeurs lues (remplace le logiques) */, + int /* E Taille des chaines du tablaeu */ #endif ); -/* */ -/* */ -/* Fonctions de lecture non bloquantes */ -/* */ -/* */ -extern int ecp_nlen( -/* ------- */ +/* */ +/* */ +/* Fonctions de lecture non bloquantes */ +/* */ +/* */ +extern int ecp_nlen( +/* ------- */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance ou de lecture */ - /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, - float * /* E/S Borne inf de l'intervalle de lecture */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - float * /* E Borne Sup de l'intervalle de lecture */, - int * /* E/S Pas d'iteration a lire */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - char * /* E Nom de la variable a lire */, - int /* E Nombre max de valeurs a lire */, - int * /* S Nombre de valeurs rellement lues */, - int ** /* E/S Tableau d'entiers pour stocker les */ - /* valeurs lues */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance ou de lecture */ + /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, + float * /* E/S Borne inf de l'intervalle de lecture */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + float * /* E Borne Sup de l'intervalle de lecture */, + int * /* E/S Pas d'iteration a lire */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + char * /* E Nom de la variable a lire */, + int /* E Nombre max de valeurs a lire */, + int * /* S Nombre de valeurs rellement lues */, + int ** /* E/S Tableau d'entiers pour stocker les */ + /* valeurs lues */ #endif ); -extern int ecp_nlre( -/* ------- */ +extern int ecp_nlre( +/* ------- */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance ou de lecture */ - /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, - float * /* E/S Borne inf de l'intervalle de lecture */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - float * /* E Borne Sup de l'intervalle de lecture */, - int * /* E/S Pas d'iteration a lire */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - char * /* E Nom de la variable a lire */, - int /* E Nombre max de valeurs a lire */, - int * /* S Nombre de valeurs rellement lues */, - float **/* E/S Tableau de flottants pour stocker les */ - /* valeurs lues */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance ou de lecture */ + /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, + float * /* E/S Borne inf de l'intervalle de lecture */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + float * /* E Borne Sup de l'intervalle de lecture */, + int * /* E/S Pas d'iteration a lire */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + char * /* E Nom de la variable a lire */, + int /* E Nombre max de valeurs a lire */, + int * /* S Nombre de valeurs rellement lues */, + float **/* E/S Tableau de flottants pour stocker les */ + /* valeurs lues */ #endif ); -extern int ecp_nldb( -/* ------- */ +extern int ecp_nldb( +/* ------- */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance ou de lecture */ - /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, - double */* E/S Borne inf de l'intervalle de lecture */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - double */* E Borne Sup de l'intervalle de lecture */, - int * /* E/S Pas d'iteration a lire */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - char * /* E Nom de la variable a lire */, - int /* E Nombre max de valeurs a lire */, - int * /* S Nombre de valeurs rellement lues */, - double**/* E/S Tableau de doubles pour stocker les */ - /* valeurs lues */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance ou de lecture */ + /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, + double */* E/S Borne inf de l'intervalle de lecture */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + double */* E Borne Sup de l'intervalle de lecture */, + int * /* E/S Pas d'iteration a lire */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + char * /* E Nom de la variable a lire */, + int /* E Nombre max de valeurs a lire */, + int * /* S Nombre de valeurs rellement lues */, + double**/* E/S Tableau de doubles pour stocker les */ + /* valeurs lues */ #endif ); -extern int ecp_nlcp( -/* ------- */ +extern int ecp_nlcp( +/* ------- */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance ou de lecture */ - /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, - float * /* E/S Borne inf de l'intervalle de lecture */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - float * /* E Borne Sup de l'intervalle de lecture */, - int * /* E/S Pas d'iteration lire */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - char * /* E Nom de la variable a lire */, - int /* E Nombre max de valeurs a lire */, - int * /* S Nombre de valeurs rellement lues */, - float **/* E/S Tableau de flottants pour stocker les */ - /* valeurs lues (dimension = 2 * le nombre */ - /* de valeurs lues) */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance ou de lecture */ + /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, + float * /* E/S Borne inf de l'intervalle de lecture */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + float * /* E Borne Sup de l'intervalle de lecture */, + int * /* E/S Pas d'iteration lire */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + char * /* E Nom de la variable a lire */, + int /* E Nombre max de valeurs a lire */, + int * /* S Nombre de valeurs rellement lues */, + float **/* E/S Tableau de flottants pour stocker les */ + /* valeurs lues (dimension = 2 * le nombre */ + /* de valeurs lues) */ #endif ); -extern int ecp_nllo( -/* ------- */ +extern int ecp_nllo( +/* ------- */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance ou de lecture */ - /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, - float * /* E/S Borne inf de l'intervalle de lecture */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - float * /* E Borne Sup de l'intervalle de lecture */, - int * /* E/S Pas d'iteration a lire */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - char * /* E Nom de la variable a lire */, - int /* E Nombre max de valeurs a lire */, - int * /* S Nombre de valeurs rellement lues */, - int **/* E/S Tableau d 'entier pour stocker les */ - /* valeurs lues (remplace le logiques) */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance ou de lecture */ + /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, + float * /* E/S Borne inf de l'intervalle de lecture */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + float * /* E Borne Sup de l'intervalle de lecture */, + int * /* E/S Pas d'iteration a lire */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + char * /* E Nom de la variable a lire */, + int /* E Nombre max de valeurs a lire */, + int * /* S Nombre de valeurs rellement lues */, + int **/* E/S Tableau d 'entier pour stocker les */ + /* valeurs lues (remplace le logiques) */ #endif ); -extern int ecp_nlch( -/* ------- */ +extern int ecp_nlch( +/* ------- */ #if CPNeedPrototype - void * component /* Pointeur de type Superv_Component_i* sur le */ - /* composant SALOME Supervisable */, - int /* E Type de dependance ou de lecture */ - /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, - float * /* E/S Borne inf de l'intervalle de lecture */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - float * /* E Borne Sup de l'intervalle de lecture */, - int * /* E/S Pas d'iteration a lire */ - /* Retourne le pas lu dans le cas de */ - /* lecture sequentielle */, - char * /* E Nom de la variable a lire */, - int /* E Nombre max de valeurs a lire */, - int * /* S Nombre de valeurs rellement lues */, - char **[]/* E/S Tableau de chaines pour stocker les */ - /* valeurs lues (remplace le logiques) */, - int /* E Taille des chaines du tablaeu */ + void * component /* Pointeur de type Superv_Component_i* sur le */ + /* composant SALOME Supervisable */, + int /* E Type de dependance ou de lecture */ + /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */, + float * /* E/S Borne inf de l'intervalle de lecture */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + float * /* E Borne Sup de l'intervalle de lecture */, + int * /* E/S Pas d'iteration a lire */ + /* Retourne le pas lu dans le cas de */ + /* lecture sequentielle */, + char * /* E Nom de la variable a lire */, + int /* E Nombre max de valeurs a lire */, + int * /* S Nombre de valeurs rellement lues */, + char **[]/* E/S Tableau de chaines pour stocker les */ + /* valeurs lues (remplace le logiques) */, + int /* E Taille des chaines du tablaeu */ #endif ); diff --git a/src/DSC/DSC_User/Datastream/Calcium/calciumP.h b/src/DSC/DSC_User/Datastream/Calcium/calciumP.h index e64fbd99a..825ab6cfc 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/calciumP.h +++ b/src/DSC/DSC_User/Datastream/Calcium/calciumP.h @@ -1,203 +1,204 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : calciumP.h // Author : Eric Fayolle (EDF) // Module : KERNEL - +// /* Outils d'Aide au Couplage de Code de Calcul : $Id$ */ #ifndef __CONST_H #define __CONST_H -#ifndef TrueOrFalse -#define TrueOrFalse int -#define TRUE 1 -#define FALSE 0 +#ifndef TrueOrFalse +#define TrueOrFalse int +#define TRUE 1 +#define FALSE 0 #endif -/* Definition d'un type de donnes pour le stockage du */ -/* des pas de temps */ +/* Definition d'un type de donnes pour le stockage du */ +/* des pas de temps */ #ifdef CRAY -#define Temps float -#define FORMAT_TEMPS "%lf" +#define Temps float +#define FORMAT_TEMPS "%lf" #else -#define Temps double -#define FORMAT_TEMPS "%lg" +#define Temps double +#define FORMAT_TEMPS "%lg" #endif /* Precision relative pour tests d'egalite sur les temps */ #define EPSILON 1.e-6 -/* Tailles utilisees lors des transmissions des noms */ -#define VERSION_LEN 144 -#define CODE_LEN 72 -#define VARIABLE_LEN 144 -#define INSTANCE_LEN 72 -#define DRIVER_LEN 72 - - -/* Tailles maximums */ -#define ARCHI_LEN 64 -#define ENV_VAR_LEN 256 -#define ACCC_LEN 256 -#define PVM_LEN 256 -#define USER_LEN 256 -#define MACHINE_LEN 256 -#define COMMAND_LEN 256 -#define MAX_LEN 256 -#define FICHIER_LEN 256 - -/* Nombre de lignes dans une page du fichier erreur * - * de trace */ -#define NB_LIGNE_ERREUR 45 -#define NB_LIGNE_TRACE 45 - - - -/* Type d'arret d'une instance */ -#define CP_NORMALE 10 -#define CP_ANORMALE 11 - -/* Directive de continuation d'une instance */ -#define CP_CONT 20 -#define CP_ARRET 21 - -/* Etat d'une instance */ -#define CP_INITIAL 22 -#define CP_NON_CONNECTE 23 -#define CP_ATTENTE 24 -#define CP_EXECUTION 25 -#define CP_DECONNECTE 26 -#define CP_TERMINE 27 - -/* Type de variables */ -#define CP_ENTIER 30 -#define CP_REEL 31 -#define CP_DREEL 32 -#define CP_COMPLEXE 33 -#define CP_LOGIQUE 34 -#define CP_CHAINE 35 - -/* Type de dependance des variables */ -#define CP_TEMPS 40 -#define CP_ITERATION 41 -#define CP_SEQUENTIEL 42 - -/* Send des variables */ -#define CP_IN 50 -#define CP_OUT 51 - -/* Type des instances */ -#define CP_NORMAL 60 -#define CP_ESPION 62 - -/* Niveaux */ -#define CP_ILLIMITE -70 -#define CP_AUTESP -71 - -/* Mode de trace */ -#define CP_SANS 80 -#define CP_SUCCINCT 81 -#define CP_DETAILLE 82 - - -/* Mode d'execution */ -/* La valeur CP_NORMAL definie pour les types */ -/* est aussi utilisee */ -#define CP_PAUSE 91 - - -/* Type d'interpolation */ -#define CP_LINEAIRE 100 -#define CP_ESCALIER 101 - - -/* Repere dans cycle de temps */ -#define TI 110 -#define TF 111 - -/* Mode de nettoyage des donnees d'un lien */ -#define CP_TOUTES 120 -#define CP_AUCUNE 121 -#define CP_PAS 122 - -/* Options configurables */ -#define CP_ROUTE 131 -#define CP_ERREURS 132 - -/* Valeurs pour l'option CP_ROUTE */ -#define CP_ROUTE_NORMAL 133 -#define CP_ROUTE_DIRECT 134 - -/* Valeurs pour l'option Comportement en cas d'erreur */ -#define CP_AUTO 135 -#define CP_BLOCAGE 136 -#define CP_MANUEL 137 - -/* Type de requete de lecture */ -/* La valeur CP_ATTENTE define pour l'etat d'une */ -/* instance est aussi utilisee */ -#define CP_IMMEDIATE 141 - -/* Definition des types de lien */ -#define CPLVAV 151 -#define CPLVAF 152 -#define CPLVAS 153 -#define CPLCAV 154 -#define CPLFAV 155 - -/* Codes des entetes des messages (Evenemet *) */ -#define ERREUR 1000 -#define CONNEXION 1001 -#define EMISSION 1002 -#define DECONNEXION 1003 -#define LECTURE_VARIABLE 1004 -#define ECRITURE_VARIABLE 1005 -#define FIN_DE_PAS 1006 -#define AUIN_FIN_DE_PAS 1007 -#define EFFACEMENT 1008 -#define MODE_EXEC 1009 -#define RUN_N_PAS 1010 -#define DEF_CODE 1011 -#define DEF_INSTANCE 1012 -#define DEF_LIEN 1013 -#define DEM_VERSION 1014 -#define SET_OPTION 1015 -#define DEM_OPTION 1016 -#define DEM_CODES 1017 -#define DEM_INSTS_DE_CODE 1018 -#define DEM_VARIABLES 1019 -#define DEM_VARS_DE_CODE 1020 -#define DEM_VARS_DE_INST 1021 -#define DEM_CARS_DE_VARIABLE 1022 -#define DEM_CARS_DE_LIEN 1023 -#define ENV_VALEURS_VARIABLE 1024 -#define ENV_OPTION 1025 -#define ENV_CODES 1026 -#define ENV_INSTS_DE_CODE 1027 -#define ENV_VARIABLES 1028 -#define ENV_VARS_DE_CODE 1029 -#define ENV_VARS_DE_INST 1030 -#define ENV_CARS_DE_VARIABLE 1031 -#define ENV_CARS_DE_LIEN 1032 +/* Tailles utilisees lors des transmissions des noms */ +#define VERSION_LEN 144 +#define CODE_LEN 72 +#define VARIABLE_LEN 144 +#define INSTANCE_LEN 72 +#define DRIVER_LEN 72 + + +/* Tailles maximums */ +#define ARCHI_LEN 64 +#define ENV_VAR_LEN 256 +#define ACCC_LEN 256 +#define PVM_LEN 256 +#define USER_LEN 256 +#define MACHINE_LEN 256 +#define COMMAND_LEN 256 +#define MAX_LEN 256 +#define FICHIER_LEN 256 + +/* Nombre de lignes dans une page du fichier erreur * + * de trace */ +#define NB_LIGNE_ERREUR 45 +#define NB_LIGNE_TRACE 45 + + + +/* Type d'arret d'une instance */ +#define CP_NORMALE 10 +#define CP_ANORMALE 11 + +/* Directive de continuation d'une instance */ +#define CP_CONT 20 +#define CP_ARRET 21 + +/* Etat d'une instance */ +#define CP_INITIAL 22 +#define CP_NON_CONNECTE 23 +#define CP_ATTENTE 24 +#define CP_EXECUTION 25 +#define CP_DECONNECTE 26 +#define CP_TERMINE 27 + +/* Type de variables */ +#define CP_ENTIER 30 +#define CP_REEL 31 +#define CP_DREEL 32 +#define CP_COMPLEXE 33 +#define CP_LOGIQUE 34 +#define CP_CHAINE 35 + +/* Type de dependance des variables */ +#define CP_TEMPS 40 +#define CP_ITERATION 41 +#define CP_SEQUENTIEL 42 + +/* Send des variables */ +#define CP_IN 50 +#define CP_OUT 51 + +/* Type des instances */ +#define CP_NORMAL 60 +#define CP_ESPION 62 + +/* Niveaux */ +#define CP_ILLIMITE -70 +#define CP_AUTESP -71 + +/* Mode de trace */ +#define CP_SANS 80 +#define CP_SUCCINCT 81 +#define CP_DETAILLE 82 + + +/* Mode d'execution */ +/* La valeur CP_NORMAL definie pour les types */ +/* est aussi utilisee */ +#define CP_PAUSE 91 + + +/* Type d'interpolation */ +#define CP_LINEAIRE 100 +#define CP_ESCALIER 101 + + +/* Repere dans cycle de temps */ +#define TI 110 +#define TF 111 + +/* Mode de nettoyage des donnees d'un lien */ +#define CP_TOUTES 120 +#define CP_AUCUNE 121 +#define CP_PAS 122 + +/* Options configurables */ +#define CP_ROUTE 131 +#define CP_ERREURS 132 + +/* Valeurs pour l'option CP_ROUTE */ +#define CP_ROUTE_NORMAL 133 +#define CP_ROUTE_DIRECT 134 + +/* Valeurs pour l'option Comportement en cas d'erreur */ +#define CP_AUTO 135 +#define CP_BLOCAGE 136 +#define CP_MANUEL 137 + +/* Type de requete de lecture */ +/* La valeur CP_ATTENTE define pour l'etat d'une */ +/* instance est aussi utilisee */ +#define CP_IMMEDIATE 141 + +/* Definition des types de lien */ +#define CPLVAV 151 +#define CPLVAF 152 +#define CPLVAS 153 +#define CPLCAV 154 +#define CPLFAV 155 + +/* Codes des entetes des messages (Evenemet *) */ +#define ERREUR 1000 +#define CONNEXION 1001 +#define EMISSION 1002 +#define DECONNEXION 1003 +#define LECTURE_VARIABLE 1004 +#define ECRITURE_VARIABLE 1005 +#define FIN_DE_PAS 1006 +#define AUIN_FIN_DE_PAS 1007 +#define EFFACEMENT 1008 +#define MODE_EXEC 1009 +#define RUN_N_PAS 1010 +#define DEF_CODE 1011 +#define DEF_INSTANCE 1012 +#define DEF_LIEN 1013 +#define DEM_VERSION 1014 +#define SET_OPTION 1015 +#define DEM_OPTION 1016 +#define DEM_CODES 1017 +#define DEM_INSTS_DE_CODE 1018 +#define DEM_VARIABLES 1019 +#define DEM_VARS_DE_CODE 1020 +#define DEM_VARS_DE_INST 1021 +#define DEM_CARS_DE_VARIABLE 1022 +#define DEM_CARS_DE_LIEN 1023 +#define ENV_VALEURS_VARIABLE 1024 +#define ENV_OPTION 1025 +#define ENV_CODES 1026 +#define ENV_INSTS_DE_CODE 1027 +#define ENV_VARIABLES 1028 +#define ENV_VARS_DE_CODE 1029 +#define ENV_VARS_DE_INST 1030 +#define ENV_CARS_DE_VARIABLE 1031 +#define ENV_CARS_DE_LIEN 1032 #define ENV_TOPOLOGY 1033 #define R_ENV_TOPOLOGY 1034 #define ENV_MACHINE 1035 @@ -223,323 +224,323 @@ -/* Message PVM */ -#define P_HOST_DELETE 2000 -#define P_TASK_EXIT 2001 +/* Message PVM */ +#define P_HOST_DELETE 2000 +#define P_TASK_EXIT 2001 -/* Codes d'erreur */ +/* Codes d'erreur */ -/* Pas d'erreur */ -#define CPOK 0 +/* Pas d'erreur */ +#define CPOK 0 -/* Emetteur inconnu */ -#define CPERIU 1 +/* Emetteur inconnu */ +#define CPERIU 1 -/* Nom de variable inconnu */ -#define CPNMVR 2 +/* Nom de variable inconnu */ +#define CPNMVR 2 -/* Type entree/sortie incompatible */ -#define CPIOVR 3 +/* Type entree/sortie incompatible */ +#define CPIOVR 3 -/* Type inconnu */ -#define CPTP 4 +/* Type inconnu */ +#define CPTP 4 -/* Type de variable incompatible */ -#define CPTPVR 5 +/* Type de variable incompatible */ +#define CPTPVR 5 -/* Mode de dependance inconnu */ -#define CPIT 6 +/* Mode de dependance inconnu */ +#define CPIT 6 -/* Mode dependance incompatible */ -#define CPITVR 7 +/* Mode dependance incompatible */ +#define CPITVR 7 -/* Requete non autorisee */ -#define CPRENA 8 +/* Requete non autorisee */ +#define CPRENA 8 -/* Type de deconnexion incorrect */ -#define CPDNTP 9 +/* Type de deconnexion incorrect */ +#define CPDNTP 9 -/* Directive de deconnexion incorrecte */ -#define CPDNDI 10 +/* Directive de deconnexion incorrecte */ +#define CPDNDI 10 -/* Nom de code inconnu */ -#define CPNMCD 11 +/* Nom de code inconnu */ +#define CPNMCD 11 -/* Nom d'instance inconnu */ -#define CPNMIN 12 +/* Nom d'instance inconnu */ +#define CPNMIN 12 -/* Attente */ -#define CPATTENTE 13 +/* Attente */ +#define CPATTENTE 13 -/* Blocage */ -#define CPBLOC 14 +/* Blocage */ +#define CPBLOC 14 -/* Nombre de valeurs transmises egal a zero */ -#define CPNTNULL 15 +/* Nombre de valeurs transmises egal a zero */ +#define CPNTNULL 15 -/* Longueur de variable insuffisante */ -#define CPLGVR 16 +/* Longueur de variable insuffisante */ +#define CPLGVR 16 -/* L'instance doit s'arreter */ -#define CPSTOP 17 +/* L'instance doit s'arreter */ +#define CPSTOP 17 -/* Arret anormal */ -#define CPATAL 18 +/* Arret anormal */ +#define CPATAL 18 -/* Coupleur abscent */ -#define CPNOCP 19 +/* Coupleur abscent */ +#define CPNOCP 19 -/* Variable sortante non connectee */ -#define CPCTVR 20 +/* Variable sortante non connectee */ +#define CPCTVR 20 -/* Nombre de pas a executer egal a zero */ -#define CPPASNULL 21 +/* Nombre de pas a executer egal a zero */ +#define CPPASNULL 21 -/* Machine inconnue */ -#define CPMACHINE 22 +/* Machine inconnue */ +#define CPMACHINE 22 -/* COUPLAGE_GROUPE non positionnee */ -#define CPGRNU 23 +/* COUPLAGE_GROUPE non positionnee */ +#define CPGRNU 23 -/* Groupe d'instances incorrect */ -#define CPGRIN 24 +/* Groupe d'instances incorrect */ +#define CPGRIN 24 -/* Fin du fichier d'entree */ -#define CPFINFICH 25 +/* Fin du fichier d'entree */ +#define CPFINFICH 25 -/* Erreur de format dans un fichier */ -#define CPERRFICH 26 +/* Erreur de format dans un fichier */ +#define CPERRFICH 26 -/* Requete d'avance de n pas annullee */ -/* par passage en mode NORMAL */ -#define CPNORERR 27 +/* Requete d'avance de n pas annullee */ +/* par passage en mode NORMAL */ +#define CPNORERR 27 -/* Coupleur en mode NORMAL pour une */ -/* requete RUN_N_PAS ou DEF_* */ -#define CPRUNERR 28 +/* Coupleur en mode NORMAL pour une */ +/* requete RUN_N_PAS ou DEF_* */ +#define CPRUNERR 28 -/* Option inconnue */ -#define CPOPT 29 +/* Option inconnue */ +#define CPOPT 29 -/* Valeur d'option inconnue */ -#define CPVALOPT 30 +/* Valeur d'option inconnue */ +#define CPVALOPT 30 -/* Ecriture impossible par effacement */ -#define CPECREFF 31 +/* Ecriture impossible par effacement */ +#define CPECREFF 31 -/* Lecture d'une variable non connectee */ -/* ou n'appartenant pas a un lien VAS */ -/* ou VAV s'il s'agit d'une sortante */ -#define CPLIEN 32 +/* Lecture d'une variable non connectee */ +/* ou n'appartenant pas a un lien VAS */ +/* ou VAV s'il s'agit d'une sortante */ +#define CPLIEN 32 /* Lecture d'une variable d'une instance*/ -/* deconnectee avec directive CP_ARRET */ -#define CPINARRET 33 +/* deconnectee avec directive CP_ARRET */ +#define CPINARRET 33 -/* Les lectures sequentielles ne pourront plus */ -/* etre satisfaites : instance productrice arretee */ -#define CPSTOPSEQ 34 +/* Les lectures sequentielles ne pourront plus */ +/* etre satisfaites : instance productrice arretee */ +#define CPSTOPSEQ 34 -/* Erreur dans la chaine de declaration */ -#define CPDECL 35 +/* Erreur dans la chaine de declaration */ +#define CPDECL 35 /* Erreur dans l'execution de l'instance ajoutee */ -#define CPINEXEC 36 +#define CPINEXEC 36 -/* Erreur PVM */ -#define CPPVM 37 +/* Erreur PVM */ +#define CPPVM 37 -/* Erreur detectee au niveau de l'interface de couplage */ -#define CPERRINST 38 +/* Erreur detectee au niveau de l'interface de couplage */ +#define CPERRINST 38 /* IDM : les deux define suivants ont ete rajoutes a la main*/ /* Erreur de mode d'execution non defini */ -#define CPMODE 39 +#define CPMODE 39 /* Erreur d'instance deconnectee */ -#define CPINSTDEC 40 +#define CPINSTDEC 40 -/* Codes des evenements pour le fichier de trace */ +/* Codes des evenements pour le fichier de trace */ -/* Debut du couplage */ -#define DEBUT_COUPLAGE 0 +/* Debut du couplage */ +#define DEBUT_COUPLAGE 0 -/* Fin du couplage */ -#define FIN_COUPLAGE 1 +/* Fin du couplage */ +#define FIN_COUPLAGE 1 -/* Execution d'une instance par Oacc */ -#define EXEC 2 +/* Execution d'une instance par Oacc */ +#define EXEC 2 -/* Connexion d'une instance */ -#define CPCD 3 +/* Connexion d'une instance */ +#define CPCD 3 -/* Permission d'emettre accordee a l'instance */ -#define CPALLOW 4 +/* Permission d'emettre accordee a l'instance */ +#define CPALLOW 4 -/* Requete d'ecriture */ -#define CPECRI 5 +/* Requete d'ecriture */ +#define CPECRI 5 -/* Requete de lecture */ -#define DEB_LECT 6 +/* Requete de lecture */ +#define DEB_LECT 6 -/* Envoi des donnees suite a une requete de lecture */ -#define FIN_LECT 7 +/* Envoi des donnees suite a une requete de lecture */ +#define FIN_LECT 7 -/* Deconnexion d'une instance */ -#define CPFIN 8 +/* Deconnexion d'une instance */ +#define CPFIN 8 -/* Requete de fin de pas */ -#define CPFINP 9 +/* Requete de fin de pas */ +#define CPFINP 9 -/* Requete d'autorisation de fin de pas */ -#define CPAUFP 10 +/* Requete d'autorisation de fin de pas */ +#define CPAUFP 10 -/* Requete d'interdiction de fin de pas */ -#define CPINFP 11 +/* Requete d'interdiction de fin de pas */ +#define CPINFP 11 -/* Requete d'effacement */ -#define CPEFF 12 +/* Requete d'effacement */ +#define CPEFF 12 -/* Signal d'arret d'une instance */ -#define STOP 13 +/* Signal d'arret d'une instance */ +#define STOP 13 -/* Avis de blocage suite a une requete de lecture */ -#define BLOCAGE 14 +/* Avis de blocage suite a une requete de lecture */ +#define BLOCAGE 14 -/* Requete de passage en mode pause */ -#define CPPAUSE 15 +/* Requete de passage en mode pause */ +#define CPPAUSE 15 -/* Requete de passage en mode normal */ -#define CPNORMAL 16 +/* Requete de passage en mode normal */ +#define CPNORMAL 16 -/* Requete d'execution de n pas */ -#define CPNPAS 17 +/* Requete d'execution de n pas */ +#define CPNPAS 17 -/* Requete de definition d'un code */ -#define CPADCD 18 +/* Requete de definition d'un code */ +#define CPADCD 18 -/* Requete de definition d'une instance */ -#define CPADINCD 19 +/* Requete de definition d'une instance */ +#define CPADINCD 19 -/* Requete de definition d'un lien */ -#define CPADLN 20 +/* Requete de definition d'un lien */ +#define CPADLN 20 -/* Requete d'identification de version */ -#define CPIVERS 21 +/* Requete d'identification de version */ +#define CPIVERS 21 -/* Requete de demande de la liste des codes */ -#define CPICD 22 +/* Requete de demande de la liste des codes */ +#define CPICD 22 -/* Requete de demande des instances d'un code */ -#define CPIINCD 23 +/* Requete de demande des instances d'un code */ +#define CPIINCD 23 /* Requete de demande de la liste des variables globales*/ -#define CPIVR 24 +#define CPIVR 24 -/* Requete de demande des variables d'un code */ -#define CPIVRCD 25 +/* Requete de demande des variables d'un code */ +#define CPIVRCD 25 -/* Requete de demande des variables d'une instance */ -#define CPIVRIN 26 +/* Requete de demande des variables d'une instance */ +#define CPIVRIN 26 -/* Requete de demande d'info sur une variable globale */ -#define CPICAVR 27 +/* Requete de demande d'info sur une variable globale */ +#define CPICAVR 27 -/* Requete de demande des caracteristiques d'un lien */ -#define CPIILIEN 28 +/* Requete de demande des caracteristiques d'un lien */ +#define CPIILIEN 28 -/* Requete de modification d'une option */ -#define CPSETOPT 29 +/* Requete de modification d'une option */ +#define CPSETOPT 29 -/* Requete de consultation d'une option */ -#define CPGETOPT 30 +/* Requete de consultation d'une option */ +#define CPGETOPT 30 -/* Terminaison d'une tache PVM */ -#define TASK_EXIT 31 +/* Terminaison d'une tache PVM */ +#define TASK_EXIT 31 -/* Deconnexion d'une machine */ -#define HOST_DELETE 32 +/* Deconnexion d'une machine */ +#define HOST_DELETE 32 #ifdef PRG_MAIN -/* Fichier principal de la bibliotheque de couplage */ - - -char * CPMESSAGE[] = { - "Pas d'erreur", - "Emetteur inconnu", - "Nom de la variable inconnu", - "Code entree/sortie differents dans le coupleur et dans le code", - "Type de variable inconnu", - "Types de variable differents dans le coupleur et dans le code", - "Mode de dependance inconnu", - "Modes de dependance differents dans le coupleur et dans le code", - "Requete non autorisee", - "Type de deconnexion incorrect", - "Directive de deconnexion incorrecte", - "Nom de code inconnu", - "Nom d'instance inconnu", - "Requete en attente", - "Cas de blocage", - "Nombre de valeurs transmises egal a zero", - "Longueur de variable insuffisante", - "L'instance doit s'arreter", - "Arret anormal d'une instance", - "Coupleur abscent, execution manuelle", - "Variable sortante non connectee", - "Nombre de pas a executer egal a zero", - "Machine non declaree", - "La variable d'environnement COUPLAGE_GROUPE n'est pas positionnee", - "Le groupe d'instances indique par COUPLAGE_GROUPE est incorrect", - "Fin du fichier d'entree", - "Erreur de format dans le fichier d'entree", - "Requete annulee a cause du passage en mode NORMAL", - "Le coupleur est en mode d'execution normal", - "Option inconnue", - "Valeur d'option incorrecte", - "Ecriture impossible a cause d'une requete d'effacement", - "Lecture d'une variable incorrectement connectee", - "Lecture d'une variable d'une instance deconnectee avec CP_ARRET", - "Lectures sequentielles plus satisfaites", - "Erreur dans la chaine de declaration", - "Erreur dans le lancement de l'instance ajoutee", - "Erreur PVM", - "Erreur detectee au niveau de l'instance", - }; +/* Fichier principal de la bibliotheque de couplage */ + const char * CPMESSAGE[] = { + "", + "Emitter unknown", + "Variable name unknown", + "Different input/output codes in code and supervisor", + "Variable type unknown", + "Different variable types in code and supervisor", + "Dependency mode unknown", + "Different dependency modes in code and supervisor", + "Unauthorized request", + "Unauthorized disconnection request type", + "Unauthorized disconnection directive", + "Code name unknown", + "Instance name unknown", + "Waiting request", + "Blocking", + "Zero value number", + "Insufficient variable length", + "Instance is going to stop", + "Unexpected instance stop", + "Manuel execution", + "Output variable not connected", + "Number of steps to execute is nul", + "Non declared computer", + "Environment variable COUPLAGE_GROUPE is not set", + "Instance group given by COUPLAGE_GROUPE is wrong", + "End of input file", + "Format error in input file", + "Request ignored because of switching to NORMAL mode", + "Supervisor is in normal execution mode", + "Unknown option", + "Option value is wrong", + "Impossible to write because of an erasing request", + "Reading of a variable wrongly connected", + "Reading of a variable of an instance disconnected with CP_ARRET", + "Sequential reading no more possible", + "Error in declaration", + "Error in instance launching", + "Communication error", + "Error in the instance", + "Environnement variable CAL_MODE is not set", + "Disconnected instance", + }; #else -extern char * CPMESSAGE[]; +extern const char * CPMESSAGE[]; #endif -/* Type de variables */ -#define ENTIER 30 -#define REEL 31 -#define DREEL 32 -#define COMPLEXE 33 -#define LOGIQUE 34 -#define CHAINE 35 +/* Type de variables */ +#define ENTIER 30 +#define REEL 31 +#define DREEL 32 +#define COMPLEXE 33 +#define LOGIQUE 34 +#define CHAINE 35 /* Macro minuscule majuscule */ -#define TOUPPER(string) \ +#define TOUPPER(string) \ {\ int i, number = strlen(string);\ for (i = 0; i < number; i++) string[i] = toupper(string[i]); \ } /* Macro inferieur */ -#define INF(a,b) (a <= b ? a : b) +#define INF(a,b) (a <= b ? a : b) /* Macro superieur */ -#define SUP(a,b) (a >= b ? a : b) +#define SUP(a,b) (a >= b ? a : b) #endif diff --git a/src/DSC/DSC_User/Datastream/Calcium/calcium_complex_port_uses.hxx b/src/DSC/DSC_User/Datastream/Calcium/calcium_complex_port_uses.hxx index 5a1d2600e..57f6e7755 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/calcium_complex_port_uses.hxx +++ b/src/DSC/DSC_User/Datastream/Calcium/calcium_complex_port_uses.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : calcium_complex_port_uses.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -36,10 +37,10 @@ extern char _repository_Calcium_Complex_Port_name[]; class calcium_complex_port_uses : public virtual CalciumGenericUsesPort< seq_u_manipulation, - Ports::Calcium_Ports::Calcium_Complex_Port, - _repository_Calcium_Complex_Port_name - > + CORBA::Float >, + Ports::Calcium_Ports::Calcium_Complex_Port, + _repository_Calcium_Complex_Port_name + > { public : diff --git a/src/DSC/DSC_User/Datastream/Calcium/calcium_destructors_port_uses.cxx b/src/DSC/DSC_User/Datastream/Calcium/calcium_destructors_port_uses.cxx index e212303ff..4be63cfb8 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/calcium_destructors_port_uses.cxx +++ b/src/DSC/DSC_User/Datastream/Calcium/calcium_destructors_port_uses.cxx @@ -1,29 +1,32 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : calcium_destructors_port_uses.cxx // Author : Eric Fayolle (EDF) // Module : KERNEL // #include "calcium_integer_port_uses.hxx" +#include "calcium_long_port_uses.hxx" +#include "calcium_intc_port_uses.hxx" #include "calcium_real_port_uses.hxx" #include "calcium_double_port_uses.hxx" #include "calcium_string_port_uses.hxx" @@ -33,6 +36,8 @@ calcium_real_port_uses::~calcium_real_port_uses(void) {}; calcium_double_port_uses::~calcium_double_port_uses(void) {}; calcium_integer_port_uses::~calcium_integer_port_uses(void) {}; +calcium_long_port_uses::~calcium_long_port_uses(void) {}; +calcium_intc_port_uses::~calcium_intc_port_uses(void) {}; calcium_logical_port_uses::~calcium_logical_port_uses(void) {}; calcium_complex_port_uses::~calcium_complex_port_uses(void) {}; calcium_string_port_uses::~calcium_string_port_uses(void) {}; diff --git a/src/DSC/DSC_User/Datastream/Calcium/calcium_double_port_uses.hxx b/src/DSC/DSC_User/Datastream/Calcium/calcium_double_port_uses.hxx index 3a82d9e28..57414a6dc 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/calcium_double_port_uses.hxx +++ b/src/DSC/DSC_User/Datastream/Calcium/calcium_double_port_uses.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : calcium_double_port_uses.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -36,10 +37,10 @@ extern char _repository_Calcium_Double_Port_name[]; class calcium_double_port_uses : public virtual CalciumGenericUsesPort< seq_u_manipulation, - Ports::Calcium_Ports::Calcium_Double_Port, - _repository_Calcium_Double_Port_name - > + CORBA::Double >, + Ports::Calcium_Ports::Calcium_Double_Port, + _repository_Calcium_Double_Port_name + > { public : diff --git a/src/DSC/DSC_User/Datastream/Calcium/calcium_intc_port_uses.hxx b/src/DSC/DSC_User/Datastream/Calcium/calcium_intc_port_uses.hxx new file mode 100644 index 000000000..bc8d1e27e --- /dev/null +++ b/src/DSC/DSC_User/Datastream/Calcium/calcium_intc_port_uses.hxx @@ -0,0 +1,50 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +// File : calcium_int_port_uses.hxx +// Author : Eric Fayolle (EDF) +// Module : KERNEL +// Modified by : $LastChangedBy$ +// Date : $LastChangedDate: 2007-02-28 15:26:32 +0100 (mer, 28 fév 2007) $ +// Id : $Id$ +// +#ifndef _CALCIUM_INTC_PORT_USES_HXX_ +#define _CALCIUM_INTC_PORT_USES_HXX_ + +#include + +#include "Calcium_Ports.hh" +#include "CalciumGenericUsesPort.hxx" + +extern char _repository_Calcium_Intc_Port_name[]; + +class calcium_intc_port_uses : + public virtual CalciumGenericUsesPort< seq_u_manipulation, + Ports::Calcium_Ports::Calcium_Intc_Port, + _repository_Calcium_Intc_Port_name + > +{ + public : + + virtual ~calcium_intc_port_uses(); + +}; + +#endif diff --git a/src/DSC/DSC_User/Datastream/Calcium/calcium_integer_port_uses.hxx b/src/DSC/DSC_User/Datastream/Calcium/calcium_integer_port_uses.hxx deleted file mode 100644 index a19dab7cc..000000000 --- a/src/DSC/DSC_User/Datastream/Calcium/calcium_integer_port_uses.hxx +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -// File : calcium_integer_port_uses.hxx -// Author : Eric Fayolle (EDF) -// Module : KERNEL -// Modified by : $LastChangedBy$ -// Date : $LastChangedDate: 2007-02-28 15:26:32 +0100 (mer, 28 fév 2007) $ -// Id : $Id$ -// -#ifndef _CALCIUM_INTEGER_PORT_USES_HXX_ -#define _CALCIUM_INTEGER_PORT_USES_HXX_ - -#include - -#include "Calcium_Ports.hh" -#include "CalciumGenericUsesPort.hxx" - -extern char _repository_Calcium_Integer_Port_name[]; - -class calcium_integer_port_uses : - public virtual CalciumGenericUsesPort< seq_u_manipulation, - Ports::Calcium_Ports::Calcium_Integer_Port, - _repository_Calcium_Integer_Port_name - > -{ - public : - - virtual ~calcium_integer_port_uses(); - -}; - -#endif diff --git a/src/DSC/DSC_User/Datastream/Calcium/calcium_integer_port_uses.hxx.in b/src/DSC/DSC_User/Datastream/Calcium/calcium_integer_port_uses.hxx.in new file mode 100644 index 000000000..8276aed12 --- /dev/null +++ b/src/DSC/DSC_User/Datastream/Calcium/calcium_integer_port_uses.hxx.in @@ -0,0 +1,50 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +// File : calcium_integer_port_uses.hxx +// Author : Eric Fayolle (EDF) +// Module : KERNEL +// Modified by : $LastChangedBy$ +// Date : $LastChangedDate: 2007-02-28 15:26:32 +0100 (mer, 28 fév 2007) $ +// Id : $Id$ +// +#ifndef _CALCIUM_INTEGER_PORT_USES_HXX_ +#define _CALCIUM_INTEGER_PORT_USES_HXX_ + +#include + +#include "Calcium_Ports.hh" +#include "CalciumGenericUsesPort.hxx" + +extern char _repository_Calcium_Integer_Port_name[]; + +class calcium_integer_port_uses : + public virtual CalciumGenericUsesPort< seq_u_manipulation, + Ports::Calcium_Ports::Calcium_Integer_Port, + _repository_Calcium_Integer_Port_name + > +{ + public : + + virtual ~calcium_integer_port_uses(); + +}; + +#endif diff --git a/src/DSC/DSC_User/Datastream/Calcium/calcium_logical_port_uses.hxx b/src/DSC/DSC_User/Datastream/Calcium/calcium_logical_port_uses.hxx index 9e9721ea3..173624afc 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/calcium_logical_port_uses.hxx +++ b/src/DSC/DSC_User/Datastream/Calcium/calcium_logical_port_uses.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : calcium_logical_port_uses.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -36,10 +37,10 @@ extern char _repository_Calcium_Logical_Port_name[]; class calcium_logical_port_uses : public virtual CalciumGenericUsesPort< seq_u_manipulation, - Ports::Calcium_Ports::Calcium_Logical_Port, - _repository_Calcium_Logical_Port_name - > + CORBA::Boolean >, + Ports::Calcium_Ports::Calcium_Logical_Port, + _repository_Calcium_Logical_Port_name + > { public : diff --git a/src/DSC/DSC_User/Datastream/Calcium/calcium_long_port_uses.hxx b/src/DSC/DSC_User/Datastream/Calcium/calcium_long_port_uses.hxx new file mode 100644 index 000000000..02091bf07 --- /dev/null +++ b/src/DSC/DSC_User/Datastream/Calcium/calcium_long_port_uses.hxx @@ -0,0 +1,50 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +// File : calcium_long_port_uses.hxx +// Author : Eric Fayolle (EDF) +// Module : KERNEL +// Modified by : $LastChangedBy$ +// Date : $LastChangedDate: 2007-02-28 15:26:32 +0100 (mer, 28 fév 2007) $ +// Id : $Id$ +// +#ifndef _CALCIUM_LONG_PORT_USES_HXX_ +#define _CALCIUM_LONG_PORT_USES_HXX_ + +#include + +#include "Calcium_Ports.hh" +#include "CalciumGenericUsesPort.hxx" + +extern char _repository_Calcium_Long_Port_name[]; + +class calcium_long_port_uses : + public virtual CalciumGenericUsesPort< seq_u_manipulation, + Ports::Calcium_Ports::Calcium_Long_Port, + _repository_Calcium_Long_Port_name + > +{ + public : + + virtual ~calcium_long_port_uses(); + +}; + +#endif diff --git a/src/DSC/DSC_User/Datastream/Calcium/calcium_port_factory.cxx b/src/DSC/DSC_User/Datastream/Calcium/calcium_port_factory.cxx index a99ec947f..694219087 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/calcium_port_factory.cxx +++ b/src/DSC/DSC_User/Datastream/Calcium/calcium_port_factory.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : calcium_port_factory.cxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -29,7 +30,6 @@ #include "calcium_port_factory.hxx" #include "Superv_Component_i.hxx" -using namespace std; calcium_port_factory::calcium_port_factory() { Superv_Component_i::register_factory("CALCIUM",this); @@ -38,11 +38,15 @@ calcium_port_factory::calcium_port_factory() { calcium_port_factory::~calcium_port_factory() {} provides_port * -calcium_port_factory::create_data_servant(string type) { +calcium_port_factory::create_data_servant(std::string type) { provides_port * rtn_port = NULL; if ( type == "integer") rtn_port = new calcium_integer_port_provides(); + if ( type == "long") + rtn_port = new calcium_long_port_provides(); + if ( type == "intc") + rtn_port = new calcium_intc_port_provides(); if ( type == "real") rtn_port = new calcium_real_port_provides(); if ( type == "double") @@ -58,11 +62,15 @@ calcium_port_factory::create_data_servant(string type) { } uses_port * -calcium_port_factory::create_data_proxy(string type) { +calcium_port_factory::create_data_proxy(std::string type) { uses_port * rtn_port = NULL; if ( type == "integer") rtn_port = new calcium_integer_port_uses(); + if ( type == "long") + rtn_port = new calcium_long_port_uses(); + if ( type == "intc") + rtn_port = new calcium_intc_port_uses(); if ( type == "real") rtn_port = new calcium_real_port_uses(); if ( type == "double") diff --git a/src/DSC/DSC_User/Datastream/Calcium/calcium_port_factory.hxx b/src/DSC/DSC_User/Datastream/Calcium/calcium_port_factory.hxx index cd019e80a..07cd77e32 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/calcium_port_factory.hxx +++ b/src/DSC/DSC_User/Datastream/Calcium/calcium_port_factory.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : calcium_port_factory.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -37,6 +38,8 @@ #include "CalciumProvidesPort.hxx" #include "calcium_integer_port_uses.hxx" +#include "calcium_long_port_uses.hxx" +#include "calcium_intc_port_uses.hxx" #include "calcium_real_port_uses.hxx" #include "calcium_double_port_uses.hxx" #include "calcium_string_port_uses.hxx" diff --git a/src/DSC/DSC_User/Datastream/Calcium/calcium_provides_port.cxx b/src/DSC/DSC_User/Datastream/Calcium/calcium_provides_port.cxx index 120bcadc8..a0013b914 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/calcium_provides_port.cxx +++ b/src/DSC/DSC_User/Datastream/Calcium/calcium_provides_port.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // Modified by : $LastChangedBy$ // Date : $LastChangedDate: 2007-02-28 15:26:32 +0100 (Wed, 28 Feb 2007) $ // Id : $Id$ diff --git a/src/DSC/DSC_User/Datastream/Calcium/calcium_provides_port.hxx b/src/DSC/DSC_User/Datastream/Calcium/calcium_provides_port.hxx index abb0e8303..cdd01257d 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/calcium_provides_port.hxx +++ b/src/DSC/DSC_User/Datastream/Calcium/calcium_provides_port.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // Modified by : $LastChangedBy$ // Date : $LastChangedDate: 2007-02-28 15:26:32 +0100 (Wed, 28 Feb 2007) $ // Id : $Id$ @@ -62,6 +63,7 @@ public : virtual InterpolationSchem getInterpolationSchem () const =0; virtual ExtrapolationSchem getExtrapolationSchem () const =0; + virtual void calcium_erase (float t,long i, bool before) {}; }; #endif diff --git a/src/DSC/DSC_User/Datastream/Calcium/calcium_real_port_uses.hxx b/src/DSC/DSC_User/Datastream/Calcium/calcium_real_port_uses.hxx index d0ca3be95..1e30373dd 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/calcium_real_port_uses.hxx +++ b/src/DSC/DSC_User/Datastream/Calcium/calcium_real_port_uses.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : calcium_real_port_uses.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -37,10 +38,10 @@ extern char _repository_Calcium_Real_Port_name[]; class calcium_real_port_uses : public virtual CalciumGenericUsesPort< seq_u_manipulation, - Ports::Calcium_Ports::Calcium_Real_Port, - _repository_Calcium_Real_Port_name - > + CORBA::Float >, + Ports::Calcium_Ports::Calcium_Real_Port, + _repository_Calcium_Real_Port_name + > { public : diff --git a/src/DSC/DSC_User/Datastream/Calcium/calcium_repository_types.cxx b/src/DSC/DSC_User/Datastream/Calcium/calcium_repository_types.cxx index 89852ed1f..dfc5451bd 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/calcium_repository_types.cxx +++ b/src/DSC/DSC_User/Datastream/Calcium/calcium_repository_types.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : calcium_repository_types.cxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -27,6 +28,8 @@ // Id : $Id$ // #include "calcium_integer_port_uses.hxx" +#include "calcium_long_port_uses.hxx" +#include "calcium_intc_port_uses.hxx" #include "calcium_real_port_uses.hxx" #include "calcium_double_port_uses.hxx" #include "calcium_complex_port_uses.hxx" @@ -34,6 +37,8 @@ #include "calcium_string_port_uses.hxx" char _repository_Calcium_Integer_Port_name[]="IDL:Ports/Calcium_Ports/Calcium_Integer_Port:1.0"; +char _repository_Calcium_Long_Port_name[]="IDL:Ports/Calcium_Ports/Calcium_Long_Port:1.0"; +char _repository_Calcium_Intc_Port_name[]="IDL:Ports/Calcium_Ports/Calcium_Intc_Port:1.0"; char _repository_Calcium_Real_Port_name[]="IDL:Ports/Calcium_Ports/Calcium_Real_Port:1.0"; char _repository_Calcium_Double_Port_name[]="IDL:Ports/Calcium_Ports/Calcium_Double_Port:1.0"; char _repository_Calcium_Complex_Port_name[]="IDL:Ports/Calcium_Ports/Calcium_Complex_Port:1.0"; diff --git a/src/DSC/DSC_User/Datastream/Calcium/calcium_string_port_uses.hxx b/src/DSC/DSC_User/Datastream/Calcium/calcium_string_port_uses.hxx index 157da4bcb..1bf99f121 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/calcium_string_port_uses.hxx +++ b/src/DSC/DSC_User/Datastream/Calcium/calcium_string_port_uses.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : calcium_string_port_uses.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -36,10 +37,10 @@ extern char _repository_Calcium_String_Port_name[]; class calcium_string_port_uses : public virtual CalciumGenericUsesPort< seq_u_manipulation, - Ports::Calcium_Ports::Calcium_String_Port, - _repository_Calcium_String_Port_name - > + char * >, + Ports::Calcium_Ports::Calcium_String_Port, + _repository_Calcium_String_Port_name + > { public : diff --git a/src/DSC/DSC_User/Datastream/Calcium/calcium_uses_port.cxx b/src/DSC/DSC_User/Datastream/Calcium/calcium_uses_port.cxx index fe4d78e28..54b035c74 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/calcium_uses_port.cxx +++ b/src/DSC/DSC_User/Datastream/Calcium/calcium_uses_port.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : calcium_uses_port.cxx // Author : Eric Fayolle (EDF) // Module : KERNEL diff --git a/src/DSC/DSC_User/Datastream/Calcium/calcium_uses_port.hxx b/src/DSC/DSC_User/Datastream/Calcium/calcium_uses_port.hxx index 830612605..def7072f1 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/calcium_uses_port.hxx +++ b/src/DSC/DSC_User/Datastream/Calcium/calcium_uses_port.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : calcium_uses_port.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL diff --git a/src/DSC/DSC_User/Datastream/Calcium/calciumf.c b/src/DSC/DSC_User/Datastream/Calcium/calciumf.c index bbf7f06a7..5b63bb3e2 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/calciumf.c +++ b/src/DSC/DSC_User/Datastream/Calcium/calciumf.c @@ -1,49 +1,48 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include #include -#include -#include +#include "fortoc.h" +#include "calcium.h" +#include "calciumf.h" +#include "CalciumFortranInt.h" #include -static void* COMPO=0; - #ifdef __cplusplus extern "C" { #endif -static void fstrtocstr(char *cstr, char *fstr,int fstr_len) + +static void fstrtocstr(char *cstr, char *fstr,cal_int fstr_len) { - int i,iend; - for (iend = fstr_len-1; iend >= 0; iend--) + cal_int i,iend; + for (iend = fstr_len-1; iend >= 0; iend--) if (fstr[iend] != ' ') break; for (i = 0; i <= iend; i++) cstr[i] = fstr[i]; cstr[i] = '\0'; } -static void cstrtofstr(char *cstr, char *fstr,int fstr_len) +static void cstrtofstr(char *cstr, char *fstr,cal_int fstr_len) { - int i, len; + cal_int i, len; len = strlen(cstr); if (len > fstr_len) len = fstr_len; for (i = 0; i < len; i++) @@ -52,19 +51,44 @@ static void cstrtofstr(char *cstr, char *fstr,int fstr_len) fstr[i++] = ' '; } -static char * fstr1(char *nom,int nnom) +static char * fstr1(char *nom,cal_int nnom) { char * cnom=(char*)malloc((nnom+1)*sizeof(char)); fstrtocstr(cnom,nom,nnom); return cnom; } -static char * free_str1(char *nom) +static void free_str1(char *nom) { free(nom); } -void F_FUNC(cpcd,CPCD)(long *compo,STR_PSTR(nom),int *info STR_PLEN(nom)) +#define FLOAT_OK 0 +#define POS_INFINITY 1 +#define NEG_INFINITY 2 +#define QUIET_NAN 3 +#define SIGNALING_NAN 4 + +int CheckFloat(float* value) +{ + unsigned long L1 = *(unsigned long*)value; + unsigned long L2 = L1 & 0x7fffffff; + if (L2 < 0x7f800000) return (FLOAT_OK); // Short circuit for most values + if (L1 == 0x7f800000) return (POS_INFINITY); + else if (L1 == 0xff800000) return (NEG_INFINITY); + else if (L2 >= 0x7fc00000) return (QUIET_NAN); + else if ((L2 >= 0x7f800001) && (L2 <= 0x7fbfffff)) return (SIGNALING_NAN); + else return (FLOAT_OK); +} + +/**********************************************/ +/* INTERFACES DE DÉBUT ET DE FIN DE COUPLAGE */ +/**********************************************/ + +void F_FUNC(cpcd,CPCD)(long *compo,STR_PSTR(nom),cal_int *info STR_PLEN(nom)); +void F_FUNC(cpfin,CPFIN)(long *compo,cal_int *dep,cal_int *err); + +void F_FUNC(cpcd,CPCD)(long *compo,STR_PSTR(nom),cal_int *info STR_PLEN(nom)) { /* nom is OUT argument */ cp_cd((void *)*compo,STR_PTR(nom)); @@ -72,166 +96,335 @@ void F_FUNC(cpcd,CPCD)(long *compo,STR_PSTR(nom),int *info STR_PLEN(nom)) cstrtofstr(STR_PTR(nom),STR_PTR(nom),STR_LEN(nom)); } -void F_FUNC(cplen,CPLEN)(long *compo,int *dep,float *ti,float *tf,int *iter,STR_PSTR(nom), - int *max,int *n, int *tab,int *err STR_PLEN(nom)) +void F_FUNC(cpfin,CPFIN)(long *compo,cal_int *dep,cal_int *err) +{ + *err=cp_fin((void *)*compo,(int)*dep); +} + +/**************************************/ +/* ERASE INTERFACE */ +/**************************************/ +void F_FUNC(cpfini,CPFINI)(long *compo,STR_PSTR(nom),cal_int *i, cal_int *err STR_PLEN(nom)); +void F_FUNC(cpfint,CPFINT)(long *compo,STR_PSTR(nom),float *t, cal_int *err STR_PLEN(nom)); +void F_FUNC(cpeffi,CPEFFI)(long *compo,STR_PSTR(nom),cal_int *i, cal_int *err STR_PLEN(nom)); +void F_FUNC(cpefft,CPEFFT)(long *compo,STR_PSTR(nom),float *t, cal_int *err STR_PLEN(nom)); + +void F_FUNC(cpfini,CPFINI)(long *compo,STR_PSTR(nom),cal_int *i, cal_int *err STR_PLEN(nom)) { char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom)); - fprintf(stderr,"CPLEN: %s %f %f\n",cnom,*ti,*tf); - *err=cp_len((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tab); - fprintf(stderr,"End of CPLEN: %s \n",cnom); + *err=cp_fini((void *)*compo,cnom,*i); free_str1(cnom); } -void F_FUNC(cpllo,CPLLO)(long *compo,int *dep,float *ti,float *tf,int *iter,STR_PSTR(nom), - int *max,int *n, int *tab,int *err STR_PLEN(nom)) +void F_FUNC(cpfint,CPFINT)(long *compo,STR_PSTR(nom),float *t, cal_int *err STR_PLEN(nom)) { char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom)); - fprintf(stderr,"CPLLO: %s %f %f\n",cnom,*ti,*tf); - *err=cp_llo((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tab); - fprintf(stderr,"End of CPLLO: %s \n",cnom); + *err=cp_fint((void *)*compo,cnom,*t); free_str1(cnom); } -void F_FUNC(cpldb,CPLDB)(long *compo,int *dep,double *ti,double *tf,int *iter,STR_PSTR(nom), - int *max,int *n, double *tab,int *err STR_PLEN(nom)) +void F_FUNC(cpeffi,CPEFFI)(long *compo,STR_PSTR(nom),cal_int *i, cal_int *err STR_PLEN(nom)) { char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom)); - fprintf(stderr,"CPLDB: %s %f %f \n",cnom, *ti,*tf); - *err=cp_ldb((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tab); - fprintf(stderr,"End of CPLDB: %s %f %f \n",cnom,*ti,*tf); + *err=cp_effi((void *)*compo,cnom,*i); free_str1(cnom); } -void F_FUNC(cplre,CPLRE)(long *compo,int *dep,float *ti,float *tf,int *iter,STR_PSTR(nom), - int *max,int *n, float *tab,int *err STR_PLEN(nom)) +void F_FUNC(cpefft,CPEFFT)(long *compo,STR_PSTR(nom),float *t, cal_int *err STR_PLEN(nom)) { char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom)); - fprintf(stderr,"CPLRE: %s %f %f \n",cnom, *ti,*tf); - *err=cp_lre((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tab); - fprintf(stderr,"End of CPLRE: %s %f %f \n",cnom,*ti,*tf); + *err=cp_efft((void *)*compo,cnom,*t); free_str1(cnom); } -void F_FUNC(cplcp,CPLCP)(long *compo,int *dep,float *ti,float *tf,int *iter,STR_PSTR(nom), - int *max,int *n, float *tab,int *err STR_PLEN(nom)) +/**************************************/ +/* INTERFACES DE LECTURE */ +/**************************************/ + +void F_FUNC(cplin,CPLIN)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom), + cal_int *max,cal_int *n, int *tab,cal_int *err STR_PLEN(nom)); +void F_FUNC(cpllg,CPLLG)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom), + cal_int *max,cal_int *n, long *tab,cal_int *err STR_PLEN(nom)); +void F_FUNC(cplln,CPLLN)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom), + cal_int *max,cal_int *n, long *tab,cal_int *err STR_PLEN(nom)); +void F_FUNC(cplen,CPLEN)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom), + cal_int *max,cal_int *n, cal_int *tab,cal_int *err STR_PLEN(nom)); +void F_FUNC(cpllo,CPLLO)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom), + cal_int *max,cal_int *n, int *tab,cal_int *err STR_PLEN(nom)); +void F_FUNC(cpldb,CPLDB)(long *compo,cal_int *dep,double *ti,double *tf,cal_int *iter,STR_PSTR(nom), + cal_int *max,cal_int *n, double *tab,cal_int *err STR_PLEN(nom)); +void F_FUNC(cplre,CPLRE)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom), + cal_int *max,cal_int *n, float *tab,cal_int *err STR_PLEN(nom)); +void F_FUNC(cplcp,CPLCP)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom), + cal_int *max,cal_int *n, float *tab,cal_int *err STR_PLEN(nom)); +void F_FUNC(cplch,CPLCH)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom), + cal_int *max,cal_int *n, char *tab,cal_int *err STR_PLEN(nom) STR_PLEN(tab) ); + + +void F_FUNC(cplin,CPLIN)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom), + cal_int *max,cal_int *n, int *tab,cal_int *err STR_PLEN(nom)) { char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom)); - fprintf(stderr,"CPLCP: %s %f %f \n",cnom, *ti,*tf); - *err=cp_lcp((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tab); - fprintf(stderr,"End of CPLCP: %s %f %f \n",cnom,*ti,*tf); + +#if !SIZEOF_INT +#error "The macro SIZEOF_INT must be defined." +#elif SIZEOF_INT == 4 + *err=cp_lin_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tab); +#else + fprintf(stderr,"End of CPLIN: %s : Can't use fortran INTEGER*4 because int C is not 32bits long on this machine.\n", + cnom); +#endif free_str1(cnom); } -void F_FUNC(cplch,CPLCH)(long *compo,int *dep,float *ti,float *tf,int *iter,STR_PSTR(nom), - int *max,int *n, char *tab,int *err STR_PLEN(nom) STR_PLEN(tab) ) +void F_FUNC(cpllg,CPLLG)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom), + cal_int *max,cal_int *n, long *tab,cal_int *err STR_PLEN(nom)) { - char **tabChaine=NULL; - int index=0; - char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom)); - fprintf(stderr,"CPLCH: %s %f %f \n",cnom, *ti,*tf); + char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom)); +#if !SIZEOF_LONG +#error "The macro SIZEOF_LONG must be defined." +#elif SIZEOF_LONG == 8 + *err=cp_llg_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tab); +#else + fprintf(stderr,"End of CPLLG: %s : Can't use fortran INTEGER*8 because long C is not 64bits long on this machine.\n", + cnom); +#endif + free_str1(cnom); +} + +void F_FUNC(cplln,CPLLN)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom), + cal_int *max,cal_int *n, long *tab,cal_int *err STR_PLEN(nom)) +{ + char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom)); +#if !SIZEOF_LONG +#error "The macro SIZEOF_LONG must be defined." +#elif SIZEOF_LONG == 8 + *err=cp_lln_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tab); +#else + fprintf(stderr,"End of CPLLN: %s : Can't use fortran INTEGER*8 because long C is not 64bits long on this machine.\n", + cnom); +#endif + free_str1(cnom); +} + + +void F_FUNC(cplen,CPLEN)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom), + cal_int *max,cal_int *n, cal_int *tab,cal_int *err STR_PLEN(nom)) +{ + char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom)); + *err=cp_len_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tab); + free_str1(cnom); +} + + +void F_FUNC(cpllo,CPLLO)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom), + cal_int *max,cal_int *n, int *tab,cal_int *err STR_PLEN(nom)) +{ + char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom)); + *err=cp_llo_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tab); + free_str1(cnom); +} + +void F_FUNC(cpldb,CPLDB)(long *compo,cal_int *dep,double *ti,double *tf,cal_int *iter,STR_PSTR(nom), + cal_int *max,cal_int *n, double *tab,cal_int *err STR_PLEN(nom)) +{ + char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom)); + *err=cp_ldb_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tab); + free_str1(cnom); +} + +void F_FUNC(cplre,CPLRE)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom), + cal_int *max,cal_int *n, float *tab,cal_int *err STR_PLEN(nom)) +{ + char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom)); + *err=cp_lre_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tab); + free_str1(cnom); +} + +void F_FUNC(cplcp,CPLCP)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom), + cal_int *max,cal_int *n, float *tab,cal_int *err STR_PLEN(nom)) +{ + char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom)); + *err=cp_lcp_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tab); + free_str1(cnom); +} + +void F_FUNC(cplch,CPLCH)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom), + cal_int *max,cal_int *n, char *tab,cal_int *err STR_PLEN(nom) STR_PLEN(tab) ) +{ + char **tabChaine = NULL; + cal_int index = 0; + char* cnom = fstr1(STR_PTR(nom),STR_LEN(nom)); tabChaine = (char **) malloc(sizeof(char *) * (*max)); for (index = 0; index < *max; index++) tabChaine[index] = (char *) malloc(sizeof(char) * (STR_LEN(tab)+1)); - *err=cp_lch((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tabChaine,STR_LEN(tab)); + *err=cp_lch_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,tabChaine,STR_LEN(tab)); - for (index = 0; index < *n; index++) - strncpy(&tab[index * STR_LEN(tab)], tabChaine[index], strlen(tabChaine[index])); + if (*err == CPOK ) + { + for (index = 0; index < *n; index++) + { + strncpy(&tab[index * STR_LEN(tab)], tabChaine[index], strlen(tabChaine[index])); + if(STR_LEN(tab) > strlen(tabChaine[index])) + memset(&tab[index * STR_LEN(tab)+strlen(tabChaine[index])],' ',STR_LEN(tab)-strlen(tabChaine[index])); + } + } - fprintf(stderr,"End of CPLCH: %s %f %f \n",cnom,*ti,*tf); - if (tabChaine != (char **) NULL) { - for (index = 0; index < *n; index++) - free(tabChaine[index]); - free(tabChaine); - } + if (tabChaine != (char **) NULL) + { + for (index = 0; index < *max; index++) + free(tabChaine[index]); + free(tabChaine); + } free_str1(cnom); } -void F_FUNC(cpech,CPECH)(long *compo,int *dep,float *ti,int *iter,STR_PSTR(nom),int *n, char *tab,int *err - STR_PLEN(nom) STR_PLEN(tab)) + +/***************************/ +/* INTERFACES D'ECRITURE */ +/***************************/ +void F_FUNC(cpech,CPECH)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, char *tab,cal_int *err + STR_PLEN(nom) STR_PLEN(tab)); +void F_FUNC(cpedb,CPEDB)(long *compo,cal_int *dep,double *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, double *tab,cal_int *err STR_PLEN(nom)); +void F_FUNC(cpere,CPERE)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, float *tab,cal_int *err STR_PLEN(nom)); +void F_FUNC(cpecp,CPECP)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, float *tab,cal_int *err STR_PLEN(nom)); +void F_FUNC(cpein,CPEIN)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, int *tab,cal_int *err STR_PLEN(nom)); +void F_FUNC(cpelg,CPELG)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, long *tab,cal_int *err STR_PLEN(nom)); +void F_FUNC(cpeln,CPELN)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, long *tab,cal_int *err STR_PLEN(nom)); +void F_FUNC(cpeen,CPEEN)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, cal_int *tab,cal_int *err STR_PLEN(nom)); +void F_FUNC(cpelo,CPELO)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, int *tab,cal_int *err STR_PLEN(nom)); + +void F_FUNC(cpech,CPECH)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, char *tab,cal_int *err + STR_PLEN(nom) STR_PLEN(tab)) { char ** tabChaine=NULL; - int index=0,index2=0; + cal_int index=0,index2=0; char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom)); - fprintf(stderr,"CPECH: %s %f \n",cnom, *ti); + float tti=0.; + if(*dep == CP_TEMPS)tti=*ti; tabChaine = (char **) malloc(sizeof(char *) * *n); - for (index = 0; index < *n; index++) { - - tabChaine[index] = (char *) malloc(sizeof(char) * (STR_LEN(tab) + 1)); - strncpy(tabChaine[index],&tab[STR_LEN(tab) * index],STR_LEN(tab)); - tabChaine[index][STR_LEN(tab)]='\0'; - for (index2 = STR_LEN(tab) - 1; index2 >= 0; index2--) { - if ( tabChaine[index][index2] == ' ' || - tabChaine[index][index2] == '\0' ) - tabChaine[index][index2]='\0'; + for (index = 0; index < *n; index++) + { + tabChaine[index] = (char *) malloc(sizeof(char) * (STR_LEN(tab) + 1)); + strncpy(tabChaine[index],&tab[STR_LEN(tab) * index],STR_LEN(tab)); + tabChaine[index][STR_LEN(tab)]='\0'; + for (index2 = STR_LEN(tab) - 1; index2 >= 0; index2--) + { + if ( tabChaine[index][index2] == ' ' || tabChaine[index][index2] == '\0' ) + tabChaine[index][index2]='\0'; + } } - } - *err=cp_ech((void *)*compo,*dep,*ti,*iter,cnom,*n,tabChaine,STR_LEN(tab) ); + *err=cp_ech_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,tabChaine,STR_LEN(tab) ); + + if (tabChaine != (char **) NULL) + { + for (index = 0; index < *n; index++) + free(tabChaine[index]); + free(tabChaine); + } + free_str1(cnom); +} - fprintf(stderr,"End of CPECH: %s %f \n",cnom, *ti); - if (tabChaine != (char **) NULL) { - for (index = 0; index < *n; index++) - free(tabChaine[index]); +void F_FUNC(cpedb,CPEDB)(long *compo,cal_int *dep,double *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, double *tab,cal_int *err STR_PLEN(nom)) +{ + double tti=0.; + if(*dep == CP_TEMPS)tti=*ti; + char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom)); + *err=cp_edb_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,tab); + free_str1(cnom); +} - free(tabChaine); - } +void F_FUNC(cpere,CPERE)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, float *tab,cal_int *err STR_PLEN(nom)) +{ + float tti=0.; + if(*dep == CP_TEMPS)tti=*ti; + char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom)); + *err=cp_ere_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,tab); free_str1(cnom); } -void F_FUNC(cpedb,CPEDB)(long *compo,int *dep,double *ti,int *iter,STR_PSTR(nom),int *n, double *tab,int *err STR_PLEN(nom)) +void F_FUNC(cpecp,CPECP)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, float *tab,cal_int *err STR_PLEN(nom)) { + float tti=0.; + if(*dep == CP_TEMPS)tti=*ti; char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom)); - fprintf(stderr,"CPEDB: %s %f \n",cnom, *ti); - *err=cp_edb((void *)*compo,*dep,*ti,*iter,cnom,*n,tab); - fprintf(stderr,"End of CPEDB: %s %f \n",cnom, *ti); + *err=cp_ecp_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,tab); free_str1(cnom); } -void F_FUNC(cpere,CPERE)(long *compo,int *dep,float *ti,int *iter,STR_PSTR(nom),int *n, float *tab,int *err STR_PLEN(nom)) + +void F_FUNC(cpein,CPEIN)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, int *tab,cal_int *err STR_PLEN(nom)) { + float tti=0.; + if(*dep == CP_TEMPS)tti=*ti; char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom)); - fprintf(stderr,"CPERE: %s %f \n",cnom, *ti); - *err=cp_ere((void *)*compo,*dep,*ti,*iter,cnom,*n,tab); - fprintf(stderr,"End of CPERE: %s %f \n",cnom, *ti); +#if !SIZEOF_INT +#error "The macro SIZEOF_INT must be defined." +#elif SIZEOF_INT == 4 + *err=cp_ein_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,tab); +#else + fprintf(stderr,"CPEIN: %s %f %d : Can't use fortran INTEGER*4 because int C is not 32bits long on this machine.\n", + cnom, *ti,*iter); +#endif free_str1(cnom); } -void F_FUNC(cpecp,CPECP)(long *compo,int *dep,float *ti,int *iter,STR_PSTR(nom),int *n, float *tab,int *err STR_PLEN(nom)) +void F_FUNC(cpelg,CPELG)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, long *tab,cal_int *err STR_PLEN(nom)) { + float tti=0.; + if(*dep == CP_TEMPS)tti=*ti; char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom)); - fprintf(stderr,"CPECP: %s %f \n",cnom, *ti); - *err=cp_ecp((void *)*compo,*dep,*ti,*iter,cnom,*n,tab); - fprintf(stderr,"End of CPECP: %s %f \n",cnom, *ti); +#if !SIZEOF_LONG +#error "The macro SIZEOF_LONG must be defined." +#elif SIZEOF_LONG == 8 + *err=cp_elg_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,tab); +#else + fprintf(stderr,"CPELG: %s %f %d : Can't use fortran INTEGER*8 because long C is not 64bits long on this machine.\n", + cnom, *ti,*iter); +#endif free_str1(cnom); } -void F_FUNC(cpeen,CPEEN)(long *compo,int *dep,float *ti,int *iter,STR_PSTR(nom),int *n, int *tab,int *err STR_PLEN(nom)) +void F_FUNC(cpeln,CPELN)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, long *tab,cal_int *err STR_PLEN(nom)) { + float tti=0.; + if(*dep == CP_TEMPS)tti=*ti; char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom)); - fprintf(stderr,"CPEEN: %s %f %d\n",cnom, *ti,*iter); - *err=cp_een((void *)*compo,*dep,*ti,*iter,cnom,*n,tab); - fprintf(stderr,"End of CPEEN: %s %f \n",cnom,*ti); +#if !SIZEOF_LONG +#error "The macro SIZEOF_LONG must be defined." +#elif SIZEOF_LONG == 8 + *err=cp_eln_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,tab); +#else + fprintf(stderr,"CPELN: %s %f %d : Can't use fortran INTEGER*8 because long C is not 64bits long on this machine.\n", + cnom, *ti,*iter); +#endif free_str1(cnom); } -void F_FUNC(cpelo,CPELO)(long *compo,int *dep,float *ti,int *iter,STR_PSTR(nom),int *n, int *tab,int *err STR_PLEN(nom)) + +void F_FUNC(cpeen,CPEEN)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, cal_int *tab,cal_int *err STR_PLEN(nom)) { + float tti=0.; + if(*dep == CP_TEMPS)tti=*ti; char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom)); - fprintf(stderr,"CPELO: %s %f %d\n",cnom, *ti,*iter); - *err=cp_elo((void *)*compo,*dep,*ti,*iter,cnom,*n,tab); - fprintf(stderr,"End of CPELO: %s %f \n",cnom,*ti); + *err=cp_een_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,tab); free_str1(cnom); } -void F_FUNC(cpfin,CPFIN)(long *compo,int *dep,int *err) +void F_FUNC(cpelo,CPELO)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, int *tab,cal_int *err STR_PLEN(nom)) { - fprintf(stderr,"CPFIN: \n"); - *err=cp_fin((void *)*compo,*dep); + float tti=0.; + if(*dep == CP_TEMPS)tti=*ti; + char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom)); + *err=cp_elo_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,tab); + free_str1(cnom); } + #ifdef __cplusplus } #endif diff --git a/src/DSC/DSC_User/Datastream/Calcium/calciumf.h b/src/DSC/DSC_User/Datastream/Calcium/calciumf.h new file mode 100644 index 000000000..da9574643 --- /dev/null +++ b/src/DSC/DSC_User/Datastream/Calcium/calciumf.h @@ -0,0 +1,79 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +// File : calcium.h +// Author : Eric Fayolle (EDF) +// Module : KERNEL +// +/* Outils d'Aide au Couplage de Code de Calcul : $Id$ */ + +#ifndef __CALCIUMF_H +#define __CALCIUMF_H + +#include "CalciumFortranInt.h" + +/*TODO CPCD... */ + +#define STAR * +#define LCH_LAST_PARAM ,int strsize + + +#define CALCIUM_ECR_INTERFACE_C_H(_name,_timeType,_calInt,_type,_typeName,_qual,lastarg) \ + extern _calInt cp_##_name (void * component, _calInt mode, \ + _timeType t, _calInt i, \ + char * nomvar, _calInt nbelem, \ + _type _qual * data \ + lastarg ) ; \ + + +CALCIUM_ECR_INTERFACE_C_H(een_fort_,float ,cal_int,cal_int,integer,,); +CALCIUM_ECR_INTERFACE_C_H(elg_fort_,float ,cal_int,long ,long2integer,,); +CALCIUM_ECR_INTERFACE_C_H(eln_fort_,float ,cal_int,long ,long,,); +CALCIUM_ECR_INTERFACE_C_H(ein_fort_,float ,cal_int,int ,int2integer,,); +CALCIUM_ECR_INTERFACE_C_H(ere_fort_,float ,cal_int,float ,float,,); +CALCIUM_ECR_INTERFACE_C_H(edb_fort_,double,cal_int,double,double,,); +CALCIUM_ECR_INTERFACE_C_H(elo_fort_,float ,cal_int,int ,bool,,); /*int pour bool ou cal_int */ +CALCIUM_ECR_INTERFACE_C_H(ecp_fort_,float ,cal_int,float ,cplx,,); +CALCIUM_ECR_INTERFACE_C_H(ech_fort_,float ,cal_int,char ,str,STAR,LCH_LAST_PARAM ); + + + +#define CALCIUM_LECT_INTERFACE_C_H(_name,_timeType,_calInt,_type,_typeName,_qual,lastarg) \ + extern void cp_##_name##_free ( _type _qual * data); \ + extern _calInt cp_##_name (void * component, _calInt mode, \ + _timeType * ti, _timeType * tf, _calInt * i, \ + char * nomvar, _calInt bufferLength, \ + _calInt * nRead, _type _qual * data \ + lastarg ) ; \ + \ + + +CALCIUM_LECT_INTERFACE_C_H(len_fort_,float ,cal_int,cal_int ,integer,,); +CALCIUM_LECT_INTERFACE_C_H(llg_fort_,float ,cal_int,long ,long2integer,,); +CALCIUM_LECT_INTERFACE_C_H(lln_fort_,float ,cal_int,long ,long,,); +CALCIUM_LECT_INTERFACE_C_H(lin_fort_,float ,cal_int,int ,int2integer,,); +CALCIUM_LECT_INTERFACE_C_H(lre_fort_,float ,cal_int,float ,float,,); +CALCIUM_LECT_INTERFACE_C_H(ldb_fort_,double,cal_int,double ,double,,); +CALCIUM_LECT_INTERFACE_C_H(llo_fort_,float ,cal_int,int ,bool,,); /*int pour bool ou cal_int */ +CALCIUM_LECT_INTERFACE_C_H(lcp_fort_,float ,cal_int,float ,cplx,,); +CALCIUM_LECT_INTERFACE_C_H(lch_fort_,float ,cal_int,char ,str,STAR, LCH_LAST_PARAM ); + + + +#endif diff --git a/src/DSC/DSC_User/Datastream/Calcium/fortoc.h b/src/DSC/DSC_User/Datastream/Calcium/fortoc.h index 2b1eae5c7..479048ada 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/fortoc.h +++ b/src/DSC/DSC_User/Datastream/Calcium/fortoc.h @@ -1,24 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef FORTRAN_H #define FORTRAN_H diff --git a/src/DSC/DSC_User/Datastream/Calcium/testInterpolation.cxx b/src/DSC/DSC_User/Datastream/Calcium/testInterpolation.cxx index 8da37a287..5e2bf7ca3 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/testInterpolation.cxx +++ b/src/DSC/DSC_User/Datastream/Calcium/testInterpolation.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : testInterpolation.cxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -39,7 +40,7 @@ struct MyRand { static const double MAXVALUE = 150.0; MyRand() { srand(getpid()); } int operator()() const { - return 1+(int) ( MAXVALUE *rand()/(RAND_MAX +1.0)); + return 1+(int) ( MAXVALUE *rand()/(RAND_MAX +1.0)); } }; @@ -89,17 +90,17 @@ int main() { //Calcul sans Lambda // ERREUR : il faut produire une binary pas avec compose2 // std::transform(InIt1,InIt1+dataSize3,InIt2,OutIt2, - // //std::minus(), - // __gnu_cxx::compose2(std::minus(), - // // __gnu_cxx::identity(), - // std::bind2nd( std::multiplies(), 1. ), - // std::bind2nd( std::multiplies(), 1.1 ) ) - // ); + // //std::minus(), + // __gnu_cxx::compose2(std::minus(), + // // __gnu_cxx::identity(), + // std::bind2nd( std::multiplies(), 1. ), + // std::bind2nd( std::multiplies(), 1.1 ) ) + // ); // InIt2 =vect2.begin(); // OutIt2=vect4.begin(); // std::transform(InIt2,InIt2+dataSize3,OutIt2,OutIt2, - // std::plus() ); + // std::plus() ); // Calcul direct InIt1=vect1.begin(); InIt2=vect2.begin();OutIt2=vect4.begin(); diff --git a/src/DSC/DSC_User/Datastream/Calcium/test_CalciumInterface.cxx b/src/DSC/DSC_User/Datastream/Calcium/test_CalciumInterface.cxx index 09ae068cc..c31e82756 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/test_CalciumInterface.cxx +++ b/src/DSC/DSC_User/Datastream/Calcium/test_CalciumInterface.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : test_CalciumInterface.cxx // Author : Eric Fayolle (EDF) // Module : KERNEL diff --git a/src/DSC/DSC_User/Datastream/Calcium/test_DataIdContainer.cxx b/src/DSC/DSC_User/Datastream/Calcium/test_DataIdContainer.cxx index 35743c54f..c5b263147 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/test_DataIdContainer.cxx +++ b/src/DSC/DSC_User/Datastream/Calcium/test_DataIdContainer.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : test_DataIdContainer.cxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -51,10 +52,10 @@ public: DataIdContainer::iterator dataIdIt = dataIds.begin(); if (!dataIds.empty()) - for (;dataIdIt != dataIds.end();++dataIdIt) { - std::cout << "(*dataIdIt) must be equal to given dataId parameter : " << *dataIdIt; - std::cout << " == " << dataId << " : " << (ret = (*dataIdIt == dataId)) << std::endl; - } + for (;dataIdIt != dataIds.end();++dataIdIt) { + std::cout << "(*dataIdIt) must be equal to given dataId parameter : " << *dataIdIt; + std::cout << " == " << dataId << " : " << (ret = (*dataIdIt == dataId)) << std::endl; + } } catch(const CalciumException & ex) { ret=1; std::cout << ex.what() << std::endl; @@ -69,7 +70,7 @@ public: int ret; TEST2() { - // Doit filtrer le mode de dépendance temporel car le mode est + // Doit filtrer le mode de dépendance temporel car le mode est // défini itératif ret=0; @@ -86,8 +87,8 @@ public: if (!dataIds.empty()) for (;dataIdIt != dataIds.end();++dataIdIt) { - std::cout << "(*dataIdIt) must be equal to given dataId parameter : " << *dataIdIt ; - std::cout << " == " << DataId(0,tag) << " : " << (ret = (*dataIdIt == DataId(0,tag))) << std::endl; + std::cout << "(*dataIdIt) must be equal to given dataId parameter : " << *dataIdIt ; + std::cout << " == " << DataId(0,tag) << " : " << (ret = (*dataIdIt == DataId(0,tag))) << std::endl; } } @@ -100,7 +101,7 @@ public: TEST3() { - // Doit filtrer le mode de dépendance temporel car le mode est + // Doit filtrer le mode de dépendance temporel car le mode est // défini itératif ret=0; @@ -117,8 +118,8 @@ public: if (!dataIds.empty()) for (;dataIdIt != dataIds.end();++dataIdIt) { - std::cout << "(*dataIdIt) must be equal to given dataId parameter : " << *dataIdIt ; - std::cout << " == " << DataId(time,0) << " : " << (ret = (*dataIdIt == DataId(time,0))) << std::endl; + std::cout << "(*dataIdIt) must be equal to given dataId parameter : " << *dataIdIt ; + std::cout << " == " << DataId(time,0) << " : " << (ret = (*dataIdIt == DataId(time,0))) << std::endl; } } diff --git a/src/DSC/DSC_User/Datastream/Calcium/version.h b/src/DSC/DSC_User/Datastream/Calcium/version.h index 5252619aa..fa3510ff5 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/version.h +++ b/src/DSC/DSC_User/Datastream/Calcium/version.h @@ -1,38 +1,39 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : version.h // Author : Eric Fayolle (EDF) // Module : KERNEL - +// /* Outils d'Aide au Couplage de Code de Calcul : $Id$ */ #ifndef __VERSION_H #define __VERSION_H -/* Constantes servant a memoriser les repertoires des versions */ -/* de CALCIUM et de PVM ayant servi a la generation d'un */ -/* executable */ +/* Constantes servant a memoriser les repertoires des versions */ +/* de CALCIUM et de PVM ayant servi a la generation d'un */ +/* executable */ -#define ACCC_REP "/home/fayolle/CALCIUM3.0" -#define PVM_REP "/home/fayolle/pvm3" +#define ACCC_REP "/home/fayolle/CALCIUM3.0" +#define PVM_REP "/home/fayolle/pvm3" #endif diff --git a/src/DSC/DSC_User/Datastream/ConstTraits.hxx b/src/DSC/DSC_User/Datastream/ConstTraits.hxx index 4dac1ea6f..3765d5b30 100644 --- a/src/DSC/DSC_User/Datastream/ConstTraits.hxx +++ b/src/DSC/DSC_User/Datastream/ConstTraits.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : ConstTraits.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL diff --git a/src/DSC/DSC_User/Datastream/CorbaTypeManipulator.hxx b/src/DSC/DSC_User/Datastream/CorbaTypeManipulator.hxx index 7cf7501c2..b7364cd5b 100644 --- a/src/DSC/DSC_User/Datastream/CorbaTypeManipulator.hxx +++ b/src/DSC/DSC_User/Datastream/CorbaTypeManipulator.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : CorbaTypeManipulator.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -33,6 +34,7 @@ #include #include +//#define MYDEBUG // Classes manipulation // ------------------- @@ -167,7 +169,7 @@ public: // Operation de création // static inline Type create(size_t size=1,InnerType * data=NULL, -// bool giveOwnerShip=false) { +// bool giveOwnerShip=false) { // Type dummy; // if (dataPtr) // return *data; @@ -227,7 +229,7 @@ public: // En non collocalisé on recrée une séquence avec le buffer de la première dont on // a demandé la propriété. -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "----seq_u_manipulation::get_data(..)-- MARK 1 ------------------" << std::endl; #endif if ( data.release() ) { @@ -236,13 +238,13 @@ public: // Crée une nouvelle sequence propriétaire des données du buffer (pas de recopie) // Les données de la nouvelle séquence seront automatiquement désallouées // par appel à la méthode freebuf dans le destructeur de la séquence (cf delete_data). -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "----seq_u_manipulation::get_data(..)-- MARK 1(0 copy) bis ------"<< p_data <<"------------" << std::endl; #endif return new seq_T (max, len, p_data, true); } -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "----seq_u_manipulation::get_data(..)-- MARK 1(recopie) bis ------"<< &data <<"------------" << std::endl; #endif // Crée une nouvelle sequence propriétaire des données du buffer (avec recopie) @@ -305,7 +307,7 @@ public: // (généralement pas de recopie qlq soit l'ownership ) // data doit avoir été alloué par allocPointer si giveOwnerShip = true static inline Type create(size_t size, InnerType * const data = NULL, - bool giveOwnerShip = false ) { + bool giveOwnerShip = false ) { Type tmp; if (!data) { tmp = new seq_T(); @@ -397,12 +399,12 @@ public: // Crée une nouvelle sequence propriétaire des données du buffer (généralement pas de recopie) // Les données seront automatiquement désallouées par appel interne à la méthode freebuf // lors de la destruction de l'objet par appel à delete_data. -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "----seq_u_manipulation::get_data(..)-- MARK 1bis Pas de Duplication -----------" << std::endl; #endif return new seq_T (len, p_data, true); } -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "----seq_u_manipulation::get_data(..)-- MARK 1bis Duplication pour en devenir propriétaire -----------" << std::endl; #endif // Crée une nouvelle sequence propriétaire des données du buffer (avec recopie) @@ -463,7 +465,7 @@ public: // (généralement pas de recopie qlq soit l'ownership ) // data doit avoir été alloué par allocPointer si giveOwnerShip = true static inline Type create(size_t size, InnerType * const data = NULL, - bool giveOwnerShip = false ) { + bool giveOwnerShip = false ) { Type tmp; if (!data) { tmp = new seq_T(); diff --git a/src/DSC/DSC_User/Datastream/CouplingPolicy.hxx b/src/DSC/DSC_User/Datastream/CouplingPolicy.hxx index b7f980c2c..3e380fd3e 100644 --- a/src/DSC/DSC_User/Datastream/CouplingPolicy.hxx +++ b/src/DSC/DSC_User/Datastream/CouplingPolicy.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : CouplingPolicy.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -74,9 +75,9 @@ public: // wDataIt1->first < wdataId < (wDataIt1+1)->first template < typename Container > bool isDataIdConveniant(Container & storedDatas, - const typename Container::key_type & expectedDataId, - bool & isEqual , bool & isBounded, - typename Container::iterator & wDataIt1 ) const { + const typename Container::key_type & expectedDataId, + bool & isEqual , bool & isBounded, + typename Container::iterator & wDataIt1 ) const { typedef typename Container::key_type key_type; typedef typename Container::value_type value_type; typedef typename Container::iterator iterator; @@ -98,8 +99,8 @@ public: BoundedDataIdProcessor(const CouplingPolicy & couplingPolicy) {}; template < typename Iterator, typename DataId > void inline apply(typename iterator_t::value_type & data, - const DataId & dataId, - const Iterator & it1) const { + const DataId & dataId, + const Iterator & it1) const { typedef typename iterator_t::value_type value_type; std::cout << "-------- Generic BoundedDataIdProcessor.apply() called " << std::endl; @@ -118,7 +119,7 @@ public: template < typename Container > void apply(Container & storedDatas, - typename Container::iterator & wDataIt1 ) const { + typename Container::iterator & wDataIt1 ) const { typedef typename Container::key_type key_type; typedef typename Container::value_type value_type; typedef typename Container::iterator iterator; @@ -139,8 +140,8 @@ public: template < typename Container, typename DataId > bool apply(Container & storedDatas, - const DataId & expectedDataId, - typename Container::iterator & wDataIt1 ) const { + const DataId & expectedDataId, + typename Container::iterator & wDataIt1 ) const { typedef typename Container::key_type key_type; typedef typename Container::value_type value_type; typedef typename Container::iterator iterator; @@ -150,6 +151,20 @@ public: } }; + // Remove all DataId from a container before a given time or tag + template + struct EraseDataIdBeforeOrAfterTagProcessor { + + EraseDataIdBeforeOrAfterTagProcessor(CouplingPolicy couplingPolicy) {}; + + template < typename Container , typename TimeType , typename TagType > + void apply(Container & storedDatas, TimeType time, TagType tag, bool before ) const { + typedef typename Container::key_type key_type; + typedef typename Container::value_type value_type; + typedef typename Container::iterator iterator; + } + }; + // Permet de réveiller les méthodes d'un GenericPort en attente // depuis une CouplingPolicy virtual void wakeupWaiting(){}; diff --git a/src/DSC/DSC_User/Datastream/DataIdFilter.hxx b/src/DSC/DSC_User/Datastream/DataIdFilter.hxx index 393f1a9ec..3ef5f46ba 100644 --- a/src/DSC/DSC_User/Datastream/DataIdFilter.hxx +++ b/src/DSC/DSC_User/Datastream/DataIdFilter.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : DataIdFilter.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -299,55 +300,55 @@ T filtre_conversion::applique_filtre_conversion (T valeur_initiale, std::vector< // Si la longueur du filtre est 1 if ((*i).filtre.len == 1) { - // Si la valeur initiale correspond à la valeur du filtre - if ((*i).filtre.debut == valeur_initiale) - si_passe_filtre = true; + // Si la valeur initiale correspond à la valeur du filtre + if ((*i).filtre.debut == valeur_initiale) + si_passe_filtre = true; } else { - // Si la valeur initiale est dans la séquence des valeurs du filtre - // la valeur est comprise dans les bornes [debut,fin] - // et sa distance du début de la séquence est modulo le pas - if ( ((*i).filtre.fin - valeur_initiale >= 0) == (valeur_initiale - (*i).filtre.debut >= 0) + // Si la valeur initiale est dans la séquence des valeurs du filtre + // la valeur est comprise dans les bornes [debut,fin] + // et sa distance du début de la séquence est modulo le pas + if ( ((*i).filtre.fin - valeur_initiale >= 0) == (valeur_initiale - (*i).filtre.debut >= 0) && (valeur_initiale - (*i).filtre.debut) % (*i).filtre.pas == 0 ) { - si_passe_filtre = true; - } + si_passe_filtre = true; + } } // Si la valeur initiale passe le filtre if (si_passe_filtre) { - // cout << "config: filtre passe " << endl; + // cout << "config: filtre passe " << endl; - // Si il y a une conversion à effectuer - if ((*i).p_convers != NULL) { + // Si il y a une conversion à effectuer + if ((*i).p_convers != NULL) { - // Si la longueur du filtre est 1 - if ((*i).filtre.len == 1) { + // Si la longueur du filtre est 1 + if ((*i).filtre.len == 1) { - // Si la longueur des paramètres de conversion est aussi 1 - if ((*i).p_convers->len == 1) { - // Ajoute la valeur de conversion à la liste des valeurs après conversion - liste_conversions.push_back ((*i).p_convers->debut); - } else { - // Ajoute la séquence de conversion à la liste des valeurs après conversion - for (int s = (*i).p_convers->debut; s != (*i).p_convers->fin; s += (*i).p_convers->pas) { - liste_conversions.push_back (s); - } - liste_conversions.push_back ((*i).p_convers->fin); - } + // Si la longueur des paramètres de conversion est aussi 1 + if ((*i).p_convers->len == 1) { + // Ajoute la valeur de conversion à la liste des valeurs après conversion + liste_conversions.push_back ((*i).p_convers->debut); + } else { + // Ajoute la séquence de conversion à la liste des valeurs après conversion + for (int s = (*i).p_convers->debut; s != (*i).p_convers->fin; s += (*i).p_convers->pas) { + liste_conversions.push_back (s); + } + liste_conversions.push_back ((*i).p_convers->fin); + } - } else { - // Le filtre est une séquence qui est convertie en une autre séquence de même longueur - // Choisit la valeur au rang désiré dans la séquence de conversion - int rang = (valeur_initiale - (*i).filtre.debut) / (*i).filtre.pas; + } else { + // Le filtre est une séquence qui est convertie en une autre séquence de même longueur + // Choisit la valeur au rang désiré dans la séquence de conversion + int rang = (valeur_initiale - (*i).filtre.debut) / (*i).filtre.pas; - int valeur_convertie = (*i).p_convers->debut + rang * (*i).p_convers->pas; + int valeur_convertie = (*i).p_convers->debut + rang * (*i).p_convers->pas; - // Ajoute cette valeur à la liste des valeurs après conversion - liste_conversions.push_back (valeur_convertie); - } - } else { - // Ajoute la valeur initiale telle-quelle à la liste des valeurs après conversion - liste_conversions.push_back (valeur_initiale); - } + // Ajoute cette valeur à la liste des valeurs après conversion + liste_conversions.push_back (valeur_convertie); + } + } else { + // Ajoute la valeur initiale telle-quelle à la liste des valeurs après conversion + liste_conversions.push_back (valeur_initiale); + } } } diff --git a/src/DSC/DSC_User/Datastream/DisplayPair.hxx b/src/DSC/DSC_User/Datastream/DisplayPair.hxx index e53af59b6..982df19e9 100644 --- a/src/DSC/DSC_User/Datastream/DisplayPair.hxx +++ b/src/DSC/DSC_User/Datastream/DisplayPair.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : DisplayPair.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL diff --git a/src/DSC/DSC_User/Datastream/FindKeyPredicate.hxx b/src/DSC/DSC_User/Datastream/FindKeyPredicate.hxx index 244f10020..dab6ecea2 100644 --- a/src/DSC/DSC_User/Datastream/FindKeyPredicate.hxx +++ b/src/DSC/DSC_User/Datastream/FindKeyPredicate.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : FindKeyPredicate.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -48,14 +49,14 @@ struct FindKeyPredicate : public std::unary_function < T, bool > // template // struct FindKeyPredicate< std::pair, T3 > > : // public std::binary_function < std::pair, T3 >, -// std::pair, T3 >, bool > +// std::pair, T3 >, bool > // { // std::pair _value; // FindKeyPredicate(const std::pair & value):_value(value){ // std::cout << "1-Initializing with value " << _value << std::endl; // } // bool operator()( const std::pair, T3 > & v1, -// const std::pair, T3 > v2) const { +// const std::pair, T3 > v2) const { // std::cout << "1-> :" << v1 << "," << v2 << " " << std::endl; // return (v1.first <= _value ) && (_value < v2.first) ; // } diff --git a/src/DSC/DSC_User/Datastream/GenericPort.hxx b/src/DSC/DSC_User/Datastream/GenericPort.hxx index ac7e29411..d56323152 100644 --- a/src/DSC/DSC_User/Datastream/GenericPort.hxx +++ b/src/DSC/DSC_User/Datastream/GenericPort.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : GenericPort.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -31,10 +32,13 @@ #include "CorbaTypeManipulator.hxx" +#include "Superv_Component_i.hxx" // SALOME CORBA Exception #include "Utils_CorbaException.hxx" // SALOME C++ Exception #include "Utils_SALOME_Exception.hxx" +#include "DSC_Exception.hxx" +#include "utilities.h" #include #include @@ -43,6 +47,8 @@ #include #include +//#define MYDEBUG + // Classe GenericPort // -------------------------------- // @@ -64,10 +70,11 @@ public: template void put(CorbaInDataType data, TimeType time, TagType tag); template DataType get(TimeType time, TagType tag); - template DataType get(TimeType ti, TimeType tf, TagType tag = 0); + template DataType get(TimeType& ti, TimeType tf, TagType tag = 0); template DataType next(TimeType &t, TagType &tag ); void close (PortableServer::POA_var poa, PortableServer::ObjectId_var id); void wakeupWaiting(); + template void erase(TimeType time, TagType tag, bool before ); private: @@ -104,7 +111,7 @@ template < typename DataManipulator, typename COUPLING_POLICY> GenericPort::~GenericPort() { typename DataTable::iterator it; for (it=storedDatas.begin(); it!=storedDatas.end(); ++it) { -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cerr << "~GenericPort() : destruction de la donnnée associée au DataId :"<< (*it).first << std::endl; #endif DataManipulator::delete_data( (*it).second ); @@ -113,7 +120,7 @@ GenericPort::~GenericPort() { template < typename DataManipulator, typename COUPLING_POLICY> void GenericPort::close (PortableServer::POA_var poa, - PortableServer::ObjectId_var id) { + PortableServer::ObjectId_var id) { // Ferme le port en supprimant le servant // La desactivation du servant du POA provoque sa suppression poa->deactivate_object (id); @@ -122,12 +129,12 @@ GenericPort::close (PortableServer::POA_var po template < typename DataManipulator, typename COUPLING_POLICY> void GenericPort::wakeupWaiting() { -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- wakeupWaiting ------------------" << std::endl; #endif storedDatas_mutex.lock(); if (waitingForAnyDataId || waitingForConvenientDataId) { -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- wakeupWaiting:signal --------" << std::endl; std::cout << std::flush; #endif @@ -145,12 +152,12 @@ GenericPort::wakeupWaiting() template < typename DataManipulator, typename COUPLING_POLICY> template < typename TimeType,typename TagType> void GenericPort::put(CorbaInDataType dataParam, - TimeType time, - TagType tag) { + TimeType time, + TagType tag) { fflush(stdout); fflush(stderr); try { -#ifdef _DEBUG_ +#ifdef MYDEBUG // Affichage des donnees pour DEBUGging std::cerr << "parametres emis: " << time << ", " << tag << std::endl; DataManipulator::dump(dataParam); @@ -173,11 +180,11 @@ void GenericPort::put(CorbaInDataType dataPara bool expectedDataReceived = false; -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- Put : MARK 1 ------------------" << std::endl; #endif if ( dataIds.empty() ) return; -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- Put : MARK 1bis ------------------" << std::endl; #endif @@ -188,7 +195,7 @@ void GenericPort::put(CorbaInDataType dataPara int nbOfIter = 0; -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- Put : MARK 2 ------ "<< (dataIdIt == dataIds.end()) << "------------" << std::endl; std::cout << "-------- Put : MARK 2bis "<< (*dataIdIt) <<"------------------" << std::endl; #endif @@ -196,18 +203,18 @@ void GenericPort::put(CorbaInDataType dataPara for (;dataIdIt != dataIds.end();++dataIdIt) { -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- Put : MARK 3 ------------------" << std::endl; #endif // Duplique l'instance de donnée pour les autres dataIds if (nbOfIter > 0) data = DataManipulator::clone(data); -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- Put : MARK 3bis -----"<< dataIdIt.operator*() <<"------------" << std::endl; #endif DataId currentDataId=*dataIdIt; -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cerr << "processing dataId : "<< currentDataId << std::endl; std::cout << "-------- Put : MARK 4 ------------------" << std::endl; @@ -221,39 +228,39 @@ void GenericPort::put(CorbaInDataType dataPara // <=> premier emplacement où l'on pourrait insérer notre DataId // <=> en général équivaux à (*wDataIt).first >= currentDataId typename DataTable::iterator wDataIt = storedDatas.lower_bound(currentDataId); -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- Put : MARK 5 ------------------" << std::endl; #endif // On n'a pas trouvé de dataId supérieur au notre ou - // on a trouvé une clé > à cet Id + // on a trouvé une clé > à cet Id if (wDataIt == storedDatas.end() || storedDatas.key_comp()(currentDataId,(*wDataIt).first) ) { -#ifdef _DEBUG_ - std::cout << "-------- Put : MARK 6 ------------------" << std::endl; +#ifdef MYDEBUG + std::cout << "-------- Put : MARK 6 ------------------" << std::endl; #endif - // Ajoute la donnee dans la table - wDataIt = storedDatas.insert(wDataIt, make_pair (currentDataId, data)); + // Ajoute la donnee dans la table + wDataIt = storedDatas.insert(wDataIt, make_pair (currentDataId, data)); } else { - // Si on n'est pas en fin de liste et qu'il n'y a pas de relation d'ordre strict - // entre notre dataId et le DataId pointé c'est qu'ils sont identiques -#ifdef _DEBUG_ - std::cout << "-------- Put : MARK 7 ------------------" << std::endl; -#endif - // Les données sont remplacées par les nouvelles valeurs - // lorsque que le dataId existe déjà - DataType old_data = (*wDataIt).second; - (*wDataIt).second = data; - // Detruit la vieille donnee - DataManipulator::delete_data (old_data); + // Si on n'est pas en fin de liste et qu'il n'y a pas de relation d'ordre strict + // entre notre dataId et le DataId pointé c'est qu'ils sont identiques +#ifdef MYDEBUG + std::cout << "-------- Put : MARK 7 ------------------" << std::endl; +#endif + // Les données sont remplacées par les nouvelles valeurs + // lorsque que le dataId existe déjà + DataType old_data = (*wDataIt).second; + (*wDataIt).second = data; + // Detruit la vieille donnee + DataManipulator::delete_data (old_data); } -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- Put : MARK 8 ------------------" << std::endl; #endif // Compte le nombre de dataIds à traiter ++nbOfIter; -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- Put : waitingForConvenientDataId : " << waitingForConvenientDataId <<"---" << std::endl; std::cout << "-------- Put : waitingForAnyDataId : " << waitingForAnyDataId <<"---" << std::endl; std::cout << "-------- Put : currentDataId : " << currentDataId <<"---" << std::endl; @@ -275,27 +282,27 @@ void GenericPort::put(CorbaInDataType dataPara // sur les dataIds (à cause du lock utilisé dans la méthode put et les méthodes get ) // rem : Utilisation de l'évaluation gauche droite du logical C or if ( waitingForAnyDataId || - ( waitingForConvenientDataId && - isDataIdConveniant(storedDatas, expectedDataId, dummy1, dummy2, dummy3) ) - ) { -#ifdef _DEBUG_ - std::cout << "-------- Put : MARK 10 ------------------" << std::endl; -#endif - //Doit pouvoir réveiller le get ici (a vérifier) - expectedDataReceived = true; + ( waitingForConvenientDataId && + this->isDataIdConveniant(storedDatas, expectedDataId, dummy1, dummy2, dummy3) ) + ) { +#ifdef MYDEBUG + std::cout << "-------- Put : MARK 10 ------------------" << std::endl; +#endif + //Doit pouvoir réveiller le get ici (a vérifier) + expectedDataReceived = true; } } if (expectedDataReceived) { -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- Put : MARK 11 ------------------" << std::endl; #endif // si waitingForAnyDataId était positionné, c'est forcément lui qui a activer // expectedDataReceived à true if (waitingForAnyDataId) - waitingForAnyDataId = false; + waitingForAnyDataId = false; else - waitingForConvenientDataId = false; + waitingForConvenientDataId = false; // Reveille le thread du destinataire (stoppe son attente) // Ne faudrait-il pas réveiller plutôt tous les threads ? // Celui réveillé ne correspond pas forcément à celui qui demande @@ -305,20 +312,20 @@ void GenericPort::put(CorbaInDataType dataPara // Pb2 : également si deux attentes de DataIds même différents car on n'en stocke qu'un ! // Conclusion : Pour l'instant on ne gère pas un service multithreadé qui effectue // des lectures simultanées sur le même port ! -#ifdef _DEBUG_ - std::cout << "-------- Put : new datas available ------------------" << std::endl; +#ifdef MYDEBUG + std::cerr << "-------- Put : new datas available ------------------" << std::endl; #endif fflush(stdout);fflush(stderr); cond_instance.signal(); } -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- Put : MARK 12 ------------------" << std::endl; #endif // Deverouille l'acces a la table : On peut remonter l'appel au dessus de expected... storedDatas_mutex.unlock(); -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- Put : MARK 13 ------------------" << std::endl; #endif fflush(stdout); @@ -333,6 +340,15 @@ void GenericPort::put(CorbaInDataType dataPara } +// erase data before time or tag +template < typename DataManipulator, typename COUPLING_POLICY > +template +void +GenericPort::erase(TimeType time, TagType tag, bool before) +{ + typename COUPLING_POLICY::template EraseDataIdBeforeOrAfterTagProcessor processEraseDataId(*this); + processEraseDataId.apply(storedDatas,time,tag,before); +} // Version du Get en 0 copy // ( n'effectue pas de recopie de la donnée trouvée dans storedDatas ) @@ -345,7 +361,7 @@ template < typename DataManipulator, typename COUPLING_POLICY > template < typename TimeType,typename TagType> typename DataManipulator::Type GenericPort::get(TimeType time, - TagType tag) + TagType tag) // REM : Laisse passer toutes les exceptions // En particulier les SALOME_Exceptions qui viennent de la COUPLING_POLICY // Pour déclarer le throw avec l'exception spécifique il faut que je vérifie @@ -357,11 +373,11 @@ GenericPort::get(TimeType time, bool isEqual, isBounded; typedef typename DataManipulator::InnerType InnerType; -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- Get : MARK 1 ------------------" << std::endl; #endif expectedDataId = DataId(time,tag); -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- Get : MARK 2 ------------------" << std::endl; #endif @@ -378,45 +394,45 @@ GenericPort::get(TimeType time, // que la politique gére ce cas de figure // - l'itérateur wDataIt1 est tel que wDataIt1->first < wdataId < (wDataIt1+1)->first // Méthode provenant de la COUPLING_POLICY - isDataIdConveniant(storedDatas,expectedDataId,isEqual,isBounded,wDataIt1); -#ifdef _DEBUG_ + this->isDataIdConveniant(storedDatas,expectedDataId,isEqual,isBounded,wDataIt1); +#ifdef MYDEBUG std::cout << "-------- Get : MARK 3 ------------------" << std::endl; #endif // L'ordre des différents tests est important if ( isEqual ) { -#ifdef _DEBUG_ - std::cout << "-------- Get : MARK 4 ------------------" << std::endl; -#endif - // La propriété de la données N'EST PAS transmise à l'utilisateur en mode CALCIUM. - // Si l'utilisateur supprime la donnée, storedDataIds devient incohérent - // C'est EraseDataId qui choisi ou non de supprimer la donnée - // Du coup interaction potentielle entre le 0 copy et gestion de l'historique - dataToTransmit = (*wDataIt1).second; - -#ifdef _DEBUG_ - std::cout << "-------- Get : MARK 5 ------------------" << std::endl; - std::cout << "-------- Get : Données trouvées à t : " << std::endl; - typename DataManipulator::InnerType const * const InIt1 = DataManipulator::getPointer(dataToTransmit); - size_t N = DataManipulator::size(dataToTransmit); - std::copy(InIt1, InIt1 + N, - std::ostream_iterator< InnerType > (std::cout," ")); - std::cout << std::endl; -#endif - - // Décide de la suppression de certaines instances de données - // La donnée contenu dans la structure CORBA et son dataId sont désallouées - // Méthode provenant de la COUPLING_POLICY - typename COUPLING_POLICY::template EraseDataIdProcessor processEraseDataId(*this); - processEraseDataId.apply(storedDatas,wDataIt1); -#ifdef _DEBUG_ - std::cout << "-------- Get : MARK 6 ------------------" << std::endl; -#endif - break; +#ifdef MYDEBUG + std::cout << "-------- Get : MARK 4 ------------------" << std::endl; +#endif + // La propriété de la données N'EST PAS transmise à l'utilisateur en mode CALCIUM. + // Si l'utilisateur supprime la donnée, storedDataIds devient incohérent + // C'est EraseDataId qui choisi ou non de supprimer la donnée + // Du coup interaction potentielle entre le 0 copy et gestion de l'historique + dataToTransmit = (*wDataIt1).second; + +#ifdef MYDEBUG + std::cout << "-------- Get : MARK 5 ------------------" << std::endl; + std::cout << "-------- Get : Données trouvées à t : " << std::endl; + typename DataManipulator::InnerType const * const InIt1 = DataManipulator::getPointer(dataToTransmit); + size_t N = DataManipulator::size(dataToTransmit); + std::copy(InIt1, InIt1 + N, + std::ostream_iterator< InnerType > (std::cout," ")); + std::cout << std::endl; +#endif + + // Décide de la suppression de certaines instances de données + // La donnée contenu dans la structure CORBA et son dataId sont désallouées + // Méthode provenant de la COUPLING_POLICY + typename COUPLING_POLICY::template EraseDataIdProcessor processEraseDataId(*this); + processEraseDataId.apply(storedDatas,wDataIt1); +#ifdef MYDEBUG + std::cout << "-------- Get : MARK 6 ------------------" << std::endl; +#endif + break; } -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- Get : MARK 7 ------------------" << std::endl; #endif @@ -424,45 +440,45 @@ GenericPort::get(TimeType time, // Le DataId demandé n'est pas trouvé mais est encadré ET la politique de couplage // implémente une méthode processBoundedDataId capable de générer les données à retourner if ( isBounded ) { - // Pour être cohérent avec la politique du bloc précédent - // on stocke la paire (dataId,données interpolées ). - // CALCIUM ne stockait pas les données interpolées. - // Cependant comme les données sont censées être produites - // par ordre croissant de DataId, de nouvelles données ne devrait pas améliorer - // l'interpolation. -#ifdef _DEBUG_ - std::cout << "-------- Get : MARK 8 ------------------" << std::endl; -#endif - - typedef typename COUPLING_POLICY::template BoundedDataIdProcessor BDI; - BDI processBoundedDataId(*this); - // typename COUPLING_POLICY::template BoundedDataIdProcessor processBoundedDataId(*this); - //si static BDIP::apply(dataToTransmit,expectedDataId,wDataIt1); - //ancienne version template processBoundedDataId(dataToTransmit,expectedDataId,wDataIt1); - //BDIP processBoundedDataId; - processBoundedDataId.apply(dataToTransmit,expectedDataId,wDataIt1); + // Pour être cohérent avec la politique du bloc précédent + // on stocke la paire (dataId,données interpolées ). + // CALCIUM ne stockait pas les données interpolées. + // Cependant comme les données sont censées être produites + // par ordre croissant de DataId, de nouvelles données ne devrait pas améliorer + // l'interpolation. +#ifdef MYDEBUG + std::cout << "-------- Get : MARK 8 ------------------" << std::endl; +#endif + + typedef typename COUPLING_POLICY::template BoundedDataIdProcessor BDI; + BDI processBoundedDataId(*this); + // typename COUPLING_POLICY::template BoundedDataIdProcessor processBoundedDataId(*this); + //si static BDIP::apply(dataToTransmit,expectedDataId,wDataIt1); + //ancienne version template processBoundedDataId(dataToTransmit,expectedDataId,wDataIt1); + //BDIP processBoundedDataId; + processBoundedDataId.apply(dataToTransmit,expectedDataId,wDataIt1); - // Il ne peut pas y avoir déjà une clé expectedDataId dans storedDatas (utilisation de la notation [] ) - // La nouvelle donnée produite est stockée, ce n'était pas le cas dans CALCIUM - // Cette opération n'a peut être pas un caractère générique. - // A déplacer en paramètre de la méthode précédente ? ou déléguer ce choix au mode de couplage ? - storedDatas[expectedDataId]=dataToTransmit; - -#ifdef _DEBUG_ - std::cout << "-------- Get : Données calculées à t : " << std::endl; - typename DataManipulator::InnerType const * const InIt1 = DataManipulator::getPointer(dataToTransmit); - size_t N = DataManipulator::size(dataToTransmit); + // Il ne peut pas y avoir déjà une clé expectedDataId dans storedDatas (utilisation de la notation [] ) + // La nouvelle donnée produite est stockée, ce n'était pas le cas dans CALCIUM + // Cette opération n'a peut être pas un caractère générique. + // A déplacer en paramètre de la méthode précédente ? ou déléguer ce choix au mode de couplage ? + storedDatas[expectedDataId]=dataToTransmit; + +#ifdef MYDEBUG + std::cout << "-------- Get : Données calculées à t : " << std::endl; + typename DataManipulator::InnerType const * const InIt1 = DataManipulator::getPointer(dataToTransmit); + size_t N = DataManipulator::size(dataToTransmit); - std::copy(InIt1, InIt1 + N, - std::ostream_iterator< InnerType > (std::cout," ")); - std::cout << std::endl; - std::cout << "-------- Get : MARK 9 ------------------" << std::endl; + std::copy(InIt1, InIt1 + N, + std::ostream_iterator< InnerType > (std::cout," ")); + std::cout << std::endl; + std::cout << "-------- Get : MARK 9 ------------------" << std::endl; #endif - typename COUPLING_POLICY::template EraseDataIdProcessor processEraseDataId(*this); - processEraseDataId.apply(storedDatas,wDataIt1); + typename COUPLING_POLICY::template EraseDataIdProcessor processEraseDataId(*this); + processEraseDataId.apply(storedDatas,wDataIt1); - break; + break; } // Délègue au mode de couplage la gestion d'une demande de donnée non disponible @@ -472,21 +488,38 @@ GenericPort::get(TimeType time, // Réception bloquante sur le dataId demandé // Si l'instance de donnée n'est pas trouvee -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- Get : MARK 10 ------------------" << std::endl; #endif //Positionné à faux dans la méthode put waitingForConvenientDataId = true; -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- Get : MARK 11 ------------------" << std::endl; // Ici on attend que la méthode put recoive la donnée std::cout << "-------- Get : waiting datas ------------------" << std::endl; #endif fflush(stdout);fflush(stderr); - cond_instance.wait(); - -#ifdef _DEBUG_ + unsigned long ts, tns,rs=Superv_Component_i::dscTimeOut; + if(rs==0) + cond_instance.wait(); + else + { + //Timed wait on omni condition + omni_thread::get_time(&ts,&tns, rs,0); + int success=cond_instance.timedwait(ts,tns); + if(!success) + { + // Waiting too long probably blocking + std::stringstream msg; + msg<<"Timeout ("<::get(TimeType time, // Deverouille l'acces a la table storedDatas_mutex.unlock(); -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- Get : MARK 13 ------------------" << std::endl; #endif @@ -514,11 +547,11 @@ GenericPort::get(TimeType time, template < typename DataManipulator, typename COUPLING_POLICY > template < typename TimeType,typename TagType> typename DataManipulator::Type -GenericPort::get(TimeType ti, - TimeType tf, - TagType tag ) { - TimeType t = COUPLING_POLICY::getEffectiveTime(ti,tf); - return get(t,tag); +GenericPort::get(TimeType& ti, + TimeType tf, + TagType tag ) { + ti = COUPLING_POLICY::getEffectiveTime(ti,tf); + return get(ti,tag); } @@ -528,7 +561,7 @@ template < typename DataManipulator, typename COUPLING_POLICY > template < typename TimeType,typename TagType> typename DataManipulator::Type GenericPort::next(TimeType &t, - TagType &tag ) { + TagType &tag ) { typedef typename COUPLING_POLICY::DataId DataId; @@ -538,7 +571,7 @@ GenericPort::next(TimeType &t, try { storedDatas_mutex.lock();// Gérer les Exceptions ds le corps de la méthode -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- Next : MARK 1 ---lastDataIdSet ("<::next(TimeType &t, // Délègue au mode de couplage la gestion d'une demande de donnée non disponible // si le port est deconnecté if ( processDisconnect.apply(storedDatas, lastDataId, wDataIt1) ) { - waitingForAnyDataId = false; break; + waitingForAnyDataId = false; break; } -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- Next : MARK 2 ------------------" << std::endl; #endif //Positionné à faux dans la méthode put waitingForAnyDataId = true; -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- Next : MARK 3 ------------------" << std::endl; // Ici on attend que la méthode put recoive la donnée std::cout << "-------- Next : waiting datas ------------------" << std::endl; #endif fflush(stdout);fflush(stderr); - cond_instance.wait(); + unsigned long ts, tns,rs=Superv_Component_i::dscTimeOut; + if(rs==0) + cond_instance.wait(); + else + { + //Timed wait on omni condition + omni_thread::get_time(&ts,&tns, rs,0); + int success=cond_instance.timedwait(ts,tns); + if(!success) + { + // Waiting too long probably blocking + std::stringstream msg; + msg<<"Timeout ("<getTime( (*wDataIt1).first ); + tag = this->getTag ( (*wDataIt1).first ); dataToTransmit = (*wDataIt1).second; -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- Next : MARK 7 ------------------" << std::endl; #endif lastDataId = (*wDataIt1).first; @@ -614,11 +663,11 @@ GenericPort::next(TimeType &t, typename COUPLING_POLICY::template EraseDataIdProcessor processEraseDataId(*this); processEraseDataId.apply(storedDatas, wDataIt1); -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- Next : MARK 8 ------------------" << std::endl; #endif } catch (...) { -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- Next : MARK 8bis ------------------" << std::endl; #endif waitingForAnyDataId = false; @@ -627,7 +676,7 @@ GenericPort::next(TimeType &t, } storedDatas_mutex.unlock(); -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "-------- Next : MARK 9 ------------------" << std::endl; #endif diff --git a/src/DSC/DSC_User/Datastream/GenericProvidesPort.hxx b/src/DSC/DSC_User/Datastream/GenericProvidesPort.hxx index 1005be51e..230c02fdc 100644 --- a/src/DSC/DSC_User/Datastream/GenericProvidesPort.hxx +++ b/src/DSC/DSC_User/Datastream/GenericProvidesPort.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // Modified by : $LastChangedBy$ // Date : $LastChangedDate: 2007-02-28 15:26:32 +0100 (Wed, 28 Feb 2007) $ // Id : $Id$ @@ -32,7 +33,7 @@ template class GenericProvidesPort : public ProvidesPort, - public GenericPort< DataManipulator , CouplingPolicy > { + public GenericPort< DataManipulator , CouplingPolicy > { public : // Type de données manipulés typedef typename DataManipulator::Type DataType; diff --git a/src/DSC/DSC_User/Datastream/GenericUsesPort.hxx b/src/DSC/DSC_User/Datastream/GenericUsesPort.hxx index 0d397e172..5a8870fa7 100644 --- a/src/DSC/DSC_User/Datastream/GenericUsesPort.hxx +++ b/src/DSC/DSC_User/Datastream/GenericUsesPort.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : GenericUsesPort.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -36,14 +37,14 @@ #include "DSC_Exception.hxx" -// #define GENERATE_USES_PORT(dataManip,portType,portName) \ +// #define GENERATE_USES_PORT(dataManip,portType,portName) \ // const char * _repository_##portType##_name_ = "IDL:Ports/##portType##:1.0"; \ // GenericUsesPort< dataManip, portType, _repository_##portType##_name_ > portName; //ex : GENERATE_USES_PORT(Ports::Data_Short_Port,data_short_port); template + typename UsesPort=uses_port > class GenericUsesPort : public UsesPort { public : @@ -59,7 +60,7 @@ public : void put(CorbaInDataType data, TimeType time, TagType tag); virtual void uses_port_changed(Engines::DSC::uses_port * new_uses_port, - const Engines::DSC::Message message); + const Engines::DSC::Message message); protected : Engines::DSC::uses_port * _my_ports; @@ -88,8 +89,8 @@ template void GenericUsesPort< DataManipulator,CorbaPortType, repositoryName, UsesPort >::put( CorbaInDataType data, - TimeType time, - TagType tag) { + TimeType time, + TagType tag) { typedef typename CorbaPortType::_var_type CorbaPortTypeVar; if (!_my_ports) throw DSC_Exception(LOC("There is no connected provides port to communicate with.")); @@ -107,8 +108,8 @@ GenericUsesPort< DataManipulator,CorbaPortType, repositoryName, UsesPort >::put CorbaPortTypeVar port = CorbaPortType::_narrow((*_my_ports)[i]); //if (i) { PB1 //OLD : copyOfData = DataManipulator::clone(data); -#ifdef _DEBUG_ - std::cout << "-------- GenericUsesPort::put -------- " << std::endl; +#ifdef MYDEBUG + std::cerr << "-------- GenericUsesPort::put -------- " << std::endl; #endif //} PB1 try { @@ -116,8 +117,8 @@ GenericUsesPort< DataManipulator,CorbaPortType, repositoryName, UsesPort >::put // OLD : port->put(*copyOfData,time,tag); } catch(const CORBA::SystemException& ex) { //OLD : DataManipulator::delete_data(copyOfData); - throw DSC_Exception(LOC(OSS() << "Impossible d'invoquer la méthode put sur le port n°" - << i << "( i>= 0)")); + throw DSC_Exception(LOC(OSS() << "Can't invoke put method on port number " + << i << "( i>= 0)")); } //if (i) PB1 @@ -132,12 +133,12 @@ GenericUsesPort< DataManipulator,CorbaPortType, repositoryName, UsesPort >::put template void GenericUsesPort< DataManipulator, CorbaPortType, repositoryName, UsesPort - >::uses_port_changed(Engines::DSC::uses_port * new_uses_port, - const Engines::DSC::Message message) + >::uses_port_changed(Engines::DSC::uses_port * new_uses_port, + const Engines::DSC::Message message) { if (_my_ports) delete _my_ports; -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cerr << "GenericUsesPort::uses_port_changed" << std::endl; #endif _my_ports = new_uses_port; diff --git a/src/DSC/DSC_User/Datastream/IteratorTraits.hxx b/src/DSC/DSC_User/Datastream/IteratorTraits.hxx index 26452ad9c..c4430554b 100644 --- a/src/DSC/DSC_User/Datastream/IteratorTraits.hxx +++ b/src/DSC/DSC_User/Datastream/IteratorTraits.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : IteratorTraits.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL diff --git a/src/DSC/DSC_User/Datastream/Makefile.am b/src/DSC/DSC_User/Datastream/Makefile.am index 9c7742f39..13525cce1 100644 --- a/src/DSC/DSC_User/Datastream/Makefile.am +++ b/src/DSC/DSC_User/Datastream/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : Makefile.am # Author : André RIBES (EDF), Eric Fayolle (EDF) # Module : KERNEL diff --git a/src/DSC/DSC_User/Datastream/Palm/Makefile.am b/src/DSC/DSC_User/Datastream/Palm/Makefile.am index 8d663d52d..6e243e998 100644 --- a/src/DSC/DSC_User/Datastream/Palm/Makefile.am +++ b/src/DSC/DSC_User/Datastream/Palm/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : Makefile.am # Author : André RIBES (EDF), Eric Fayolle (EDF) # Module : KERNEL @@ -47,11 +48,11 @@ COMMON_CPPFLAGS= -I$(top_srcdir)/src/DSC/DSC_User \ -I$(top_srcdir)/src/DSC/DSC_User/Datastream \ -I$(top_srcdir)/src/DSC/DSC_Basic \ -I$(top_srcdir)/src/Container \ + -I$(top_srcdir)/src/GenericObj \ -I$(top_srcdir)/src/Notification \ -I$(top_srcdir)/src/SALOMELocalTrace \ -I$(top_srcdir)/src/Basics \ -I$(top_srcdir)/src/Utils \ - -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ diff --git a/src/DSC/DSC_User/Datastream/Palm/PalmCouplingPolicy.hxx b/src/DSC/DSC_User/Datastream/Palm/PalmCouplingPolicy.hxx index b07aea778..f41fc138b 100644 --- a/src/DSC/DSC_User/Datastream/Palm/PalmCouplingPolicy.hxx +++ b/src/DSC/DSC_User/Datastream/Palm/PalmCouplingPolicy.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : PalmCouplingPolicy.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -88,11 +89,11 @@ public: policy.filtre_convert_TIME.applique_filtre_conversion(dataId.first, _lTime); int c=0; for(std::vector::iterator i=_lTime.begin();i!=_lTime.end();++i) - std::cout << "_lTime["<< c++ << "] : " << *i << std::endl; + std::cout << "_lTime["<< c++ << "] : " << *i << std::endl; policy.filtre_convert_TAG.applique_filtre_conversion(dataId.second, _lTag); c=0; for(std::vector::iterator i=_lTag.begin();i!=_lTag.end();++i) - std::cout << "_lTag["<< c++ << "] : " << *i << std::endl; + std::cout << "_lTag["<< c++ << "] : " << *i << std::endl; } // Pas encore testé @@ -138,51 +139,51 @@ public: // Pas encore testé DataIdIterator(const InternalDataIdContainer & pc): - _pc(pc),_itTime(pc._lTime.begin()),_itTag(pc._lTag.begin()) {} + _pc(pc),_itTime(pc._lTime.begin()),_itTag(pc._lTag.begin()) {} DataIdIterator(const InternalDataIdContainer & pc, ItTime itTime, ItTag itTag): - _pc(pc),_itTime(itTime),_itTag(itTag) {} + _pc(pc),_itTime(itTime),_itTag(itTag) {} // Pas encore testé DataIdIterator(const DataIdIterator & dIt): - _pc(dIt._pc),_itTime(dIt._itTime),_itTag(dIt._itTag) {} + _pc(dIt._pc),_itTime(dIt._itTime),_itTag(dIt._itTag) {} ~DataIdIterator() {} // Pas encore testé DataIdIterator & operator=(const DataIdIterator & dIt) { - if (this != &dIt) { - _pc=dIt._pc;_itTime=dIt._itTime;_itTag=dIt._itTag; - } - return *this; + if (this != &dIt) { + _pc=dIt._pc;_itTime=dIt._itTime;_itTag=dIt._itTag; + } + return *this; } DataId operator*() const { - std::cout << "-------- operator*(), *_itTime : " << *_itTime << " *_itTag " << *_itTag <, - PalmCouplingPolicy > + PalmCouplingPolicy > { typedef Ports::Palm_Ports::seq_short CorbaDataType; typedef seq_u_manipulation DataManipulator; diff --git a/src/DSC/DSC_User/Datastream/Palm/palm_data_short_port_provides.hxx b/src/DSC/DSC_User/Datastream/Palm/palm_data_short_port_provides.hxx index fb2d923f4..76888d320 100644 --- a/src/DSC/DSC_User/Datastream/Palm/palm_data_short_port_provides.hxx +++ b/src/DSC/DSC_User/Datastream/Palm/palm_data_short_port_provides.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : palm_data_short_port_provides.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL diff --git a/src/DSC/DSC_User/Datastream/Palm/palm_port_factory.cxx b/src/DSC/DSC_User/Datastream/Palm/palm_port_factory.cxx index 18656bfff..f0ed8331f 100644 --- a/src/DSC/DSC_User/Datastream/Palm/palm_port_factory.cxx +++ b/src/DSC/DSC_User/Datastream/Palm/palm_port_factory.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : palm_port_factory.cxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -29,8 +30,6 @@ #include "palm_port_factory.hxx" #include "Superv_Component_i.hxx" -using namespace std; - palm_port_factory::palm_port_factory() { Superv_Component_i::register_factory("PALM",this); } @@ -38,7 +37,7 @@ palm_port_factory::palm_port_factory() { palm_port_factory::~palm_port_factory() {} provides_port * -palm_port_factory::create_data_servant(string type) { +palm_port_factory::create_data_servant(std::string type) { provides_port * rtn_port = NULL; if (type == "short") { rtn_port = new palm_data_short_port_provides(); @@ -50,7 +49,7 @@ palm_port_factory::create_data_servant(string type) { } uses_port * -palm_port_factory::create_data_proxy(string type) { +palm_port_factory::create_data_proxy(std::string type) { uses_port * rtn_port = NULL; return rtn_port; } diff --git a/src/DSC/DSC_User/Datastream/Palm/palm_port_factory.hxx b/src/DSC/DSC_User/Datastream/Palm/palm_port_factory.hxx index 1d72f369a..73ca607bc 100644 --- a/src/DSC/DSC_User/Datastream/Palm/palm_port_factory.hxx +++ b/src/DSC/DSC_User/Datastream/Palm/palm_port_factory.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : palm_port_factory.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL diff --git a/src/DSC/DSC_User/Datastream/Palm/test_DataIdContainer.cxx b/src/DSC/DSC_User/Datastream/Palm/test_DataIdContainer.cxx index fe4f4a0cf..be381b162 100644 --- a/src/DSC/DSC_User/Datastream/Palm/test_DataIdContainer.cxx +++ b/src/DSC/DSC_User/Datastream/Palm/test_DataIdContainer.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : test_DataIdContainer.cxx // Author : Eric Fayolle (EDF) // Module : KERNEL diff --git a/src/DSC/DSC_User/Datastream/ProcessTimeIntervalTraits.hxx b/src/DSC/DSC_User/Datastream/ProcessTimeIntervalTraits.hxx index f33d3fa68..d305dcf8a 100644 --- a/src/DSC/DSC_User/Datastream/ProcessTimeIntervalTraits.hxx +++ b/src/DSC/DSC_User/Datastream/ProcessTimeIntervalTraits.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : ProcessTimeIntervalTraits.hxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -50,7 +51,7 @@ template struct ProcessTimeIntervalTraits { // template < typename Iterator > // typename iterator_t::value_type // CalciumCoulpingPolicy::processTimeInterval (DataId & dataId, -// Iterator & it1, Iterator & it2); +// Iterator & it1, Iterator & it2); #include "CalciumCouplingPolicy.hxx" template <> struct ProcessTimeIntervalTraits { diff --git a/src/DSC/DSC_User/Datastream/fake.cc b/src/DSC/DSC_User/Datastream/fake.cc index a660c3d6f..93e82ab77 100644 --- a/src/DSC/DSC_User/Datastream/fake.cc +++ b/src/DSC/DSC_User/Datastream/fake.cc @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : fake.cc // Author : Eric Fayolle (EDF) // Module : KERNEL diff --git a/src/DSC/DSC_User/Datastream/testAdjacentFunctor.cxx b/src/DSC/DSC_User/Datastream/testAdjacentFunctor.cxx index bbb645a7a..3df87a4e8 100644 --- a/src/DSC/DSC_User/Datastream/testAdjacentFunctor.cxx +++ b/src/DSC/DSC_User/Datastream/testAdjacentFunctor.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : testAdjacentFunctor.cxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -45,7 +46,7 @@ struct MyRand { static const double MAXVALUE = 150.0; MyRand() { srand(getpid()); } int operator()() const { - return 1+(int) ( MAXVALUE *rand()/(RAND_MAX +1.0)); + return 1+(int) ( MAXVALUE *rand()/(RAND_MAX +1.0)); } }; @@ -93,7 +94,7 @@ int main() { - + // if ( it == vect.end() ) { // std::cout << " Je n'ai pas trouvé la valeur " << valueToFind << std::endl; // } else { @@ -102,7 +103,7 @@ int main() { // Type min,max; // if ( ap.getBounds(min,max) ) { // it2=it;it2--; -// std::cout << "La valeur : " << valueToFind << " est encadrée par (*it) :" << (*it) << " et valeur de *(it-1) :" << (*it2) << std::endl; +// std::cout << "La valeur : " << valueToFind << " est encadrée par (*it) :" << (*it) << " et valeur de *(it-1) :" << (*it2) << std::endl; // } // } // } @@ -122,7 +123,7 @@ int main() { // AdjacentFunctor apMap(valueToFind); // for (itM1 = myMap.begin(); itM1 != myMap.end(); ++itM1) // if ( apMap(itM1->first) ) break; - + // if ( itM1 == myMap.end() ) { // std::cout << " Je n'est pas trouvé la valeur " << valueToFind << std::endl; // } else { @@ -131,7 +132,7 @@ int main() { // Type min,max; // if ( apMap.getBounds(min,max) ) { // itM2=itM1;itM2--; -// std::cout << "La valeur " << valueToFind << " est encadrée par (itM1->first) :" << (itM1->first) << " et valeur de (it-1)->first :" << (itM2->first) << std::endl; +// std::cout << "La valeur " << valueToFind << " est encadrée par (itM1->first) :" << (itM1->first) << " et valeur de (it-1)->first :" << (itM2->first) << std::endl; // } // } // } @@ -163,7 +164,7 @@ int main() { // MapIntDouble_Double::key_type min,max; // if ( apMapP.getBounds(min,max) ) { // itMP2=itMP1;itMP2--; -// std::cout << "La valeur " << valuePToFind << " est encadrée par (itMP1->first) :" << (itMP1->first) << " et valeur de (it-1)->first :" << (itMP2->first) << std::endl; +// std::cout << "La valeur " << valuePToFind << " est encadrée par (itMP1->first) :" << (itMP1->first) << " et valeur de (it-1)->first :" << (itMP2->first) << std::endl; // } // } // } diff --git a/src/DSC/DSC_User/Datastream/testAdjacentPredicate.cxx b/src/DSC/DSC_User/Datastream/testAdjacentPredicate.cxx index f6a14bee0..f1db5c454 100644 --- a/src/DSC/DSC_User/Datastream/testAdjacentPredicate.cxx +++ b/src/DSC/DSC_User/Datastream/testAdjacentPredicate.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : testAdjacentPredicate.cxx // Author : Eric Fayolle (EDF) // Module : KERNEL @@ -44,7 +45,7 @@ struct MyRand { static const double MAXVALUE = 150.0; MyRand() { srand(getpid()); } int operator()() const { - return 1+(int) ( MAXVALUE *rand()/(RAND_MAX +1.0)); + return 1+(int) ( MAXVALUE *rand()/(RAND_MAX +1.0)); } }; @@ -54,7 +55,7 @@ typedef std::pair< TimeType , TagType > DataId; template < typename DataType > DataType processTimeInterval (DataId & dataId, - typename std::map::const_iterator const & it1) { + typename std::map::const_iterator const & it1) { return (*it1).second; }; diff --git a/src/DSC/DSC_User/Makefile.am b/src/DSC/DSC_User/Makefile.am index 9c6f39364..e6b3af4d2 100644 --- a/src/DSC/DSC_User/Makefile.am +++ b/src/DSC/DSC_User/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : Makefile.am # Author : André RIBES (EDF) # Module : KERNEL @@ -47,12 +48,12 @@ salomeinclude_HEADERS = base_port.hxx \ # This local variable defines the list of CPPFLAGS common to all target in this package. COMMON_CPPFLAGS= \ -I$(top_srcdir)/src/Container \ + -I$(top_srcdir)/src/GenericObj \ -I$(top_srcdir)/src/Notification \ -I$(top_srcdir)/src/DSC/DSC_Basic \ -I$(top_srcdir)/src/SALOMELocalTrace \ -I$(top_srcdir)/src/Basics \ -I$(top_srcdir)/src/Utils \ - -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ @BOOST_CPPFLAGS@ @@ -89,6 +90,7 @@ test_DSC_Exception_SOURCES = test_DSC_Exception.cxx test_DSC_Exception_CXXFLAGS = $(COMMON_CPPFLAGS) test_DSC_Exception_LDADD = $(top_builddir)/src/Utils/libOpUtil.la \ + $(top_builddir)/src/SALOMELocalTrace/libSALOMELocalTrace.la \ $(CORBA_LIBS) SUBDIRS = . Basic Datastream diff --git a/src/DSC/DSC_User/Superv_Component_i.cxx b/src/DSC/DSC_User/Superv_Component_i.cxx index 15bb1894f..3ba2a7d82 100644 --- a/src/DSC/DSC_User/Superv_Component_i.cxx +++ b/src/DSC/DSC_User/Superv_Component_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : Superv_Component_i.cxx // Author : André RIBES (EDF), Eric Fayolle (EDF) // Module : KERNEL @@ -36,31 +37,35 @@ DSC_EXCEPTION_CXX(Superv_Component_i,NilPort); DSC_EXCEPTION_CXX(Superv_Component_i,BadProperty); std::map Superv_Component_i::_factory_map; +long Superv_Component_i::dscTimeOut=0; + Superv_Component_i::Superv_Component_i(CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName, - bool notif) : + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName, + bool notif) : Engines_DSC_i(orb, poa, contId, instanceName, interfaceName) { -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cerr << "--Superv_Component_i : MARK 1 ---- " << instanceName << "----" << std::endl; #endif + setTimeOut(); } Superv_Component_i::Superv_Component_i(CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - Engines::Container_ptr container, - const char *instanceName, - const char *interfaceName, - bool notif, + PortableServer::POA_ptr poa, + Engines::Container_ptr container, + const char *instanceName, + const char *interfaceName, + bool notif, bool regist) : Engines_DSC_i(orb, poa, container, instanceName, interfaceName,notif,regist) { -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cerr << "--Superv_Component_i : MARK 1 ---- " << instanceName << "----" << std::endl; #endif + setTimeOut(); } @@ -73,7 +78,7 @@ Superv_Component_i::~Superv_Component_i() void Superv_Component_i::register_factory(const std::string & factory_name, - port_factory * factory_ptr) + port_factory * factory_ptr) { factory_map_t::iterator it = _factory_map.find(factory_name); @@ -116,8 +121,8 @@ Superv_Component_i::create_provides_data_port(const std::string& port_fab_type) } if (rtn_port == NULL) - throw BadFabType( LOC(OSS()<< "Impossible d'accéder à la fabrique " - <get_port_properties(); Ports::Port_var portref=port->get_port_ref(); Engines_DSC_interface::add_provides_port(portref, - provides_port_name, - portproperties); + provides_port_name, + portproperties); superv_port_t * new_superv_port = new superv_port_t(); new_superv_port->p_ref = port; @@ -200,20 +205,20 @@ Superv_Component_i::add_port(provides_port * port, } catch (const Engines::DSC::PortAlreadyDefined&) { - throw PortAlreadyDefined( LOC(OSS()<< "Le port provides " - << provides_port_name <<" existe déjà.")); + throw PortAlreadyDefined( LOC(OSS()<< "provides port " + << provides_port_name <<" already exist.")); } catch (const Engines::DSC::NilPort&) { - throw NilPort( LOC(OSS()<< "Le pointeur sur port provides est nul.")); + throw NilPort( LOC(OSS()<< "provides port pointer is nul.")); } catch (const Engines::DSC::BadProperty&) { - throw BadProperty( LOC(OSS()<< "La propriété est mal définie")); + throw BadProperty( LOC(OSS()<< "Property is not well defined")); } } void Superv_Component_i::add_port(uses_port * port, - const char* uses_port_name) + const char* uses_port_name) throw (PortAlreadyDefined, NilPort, BadProperty) { assert(port); @@ -222,27 +227,27 @@ Superv_Component_i::add_port(uses_port * port, try { Ports::PortProperties_var portproperties=port->get_port_properties(); Engines_DSC_interface::add_uses_port(port->get_repository_id(), - uses_port_name, - portproperties); + uses_port_name, + portproperties); superv_port_t * new_superv_port = new superv_port_t(); new_superv_port->u_ref = port; my_superv_ports[uses_port_name] = new_superv_port; } catch (const Engines::DSC::PortAlreadyDefined&) { - throw PortAlreadyDefined( LOC(OSS()<< "Le port uses " - << uses_port_name <<" existe déjà.")); + throw PortAlreadyDefined( LOC(OSS()<< "uses port " + << uses_port_name <<" already exists.")); } catch (const Engines::DSC::NilPort&) { - throw NilPort( LOC(OSS()<< "Le pointeur sur port uses est nul.")); + throw NilPort( LOC(OSS()<< "uses port pointer is nul.")); } catch (const Engines::DSC::BadProperty&) { - throw BadProperty( LOC(OSS()<< "La propriété est mal définie")); + throw BadProperty( LOC(OSS()<< "Property is not well defined")); } } void Superv_Component_i::get_port(provides_port *& port, - const char * provides_port_name) + const char * provides_port_name) throw (PortNotDefined,PortNotConnected) { assert(provides_port_name); @@ -251,17 +256,17 @@ Superv_Component_i::get_port(provides_port *& port, Ports::Port_var portref=Engines_DSC_interface::get_provides_port(provides_port_name, false); port = my_superv_ports[provides_port_name]->p_ref; } catch (const Engines::DSC::PortNotDefined&) { - throw PortNotDefined( LOC(OSS()<< "Le port provides " - << provides_port_name <<" n'existe pas.")); + throw PortNotDefined( LOC(OSS()<< "provides port " + << provides_port_name <<" does not exist.")); } catch (const Engines::DSC::PortNotConnected&) { - throw PortNotConnected( LOC(OSS()<< "Le port provides " << provides_port_name - << " n'est pas connecté.")); + throw PortNotConnected( LOC(OSS()<< "provides port " << provides_port_name + << " is not connected.")); } } void Superv_Component_i::get_port(uses_port *& port, - const char * uses_port_name) + const char * uses_port_name) throw (PortNotDefined, PortNotConnected) { assert(uses_port_name); @@ -271,11 +276,11 @@ Superv_Component_i::get_port(uses_port *& port, delete portseq; port = my_superv_ports[uses_port_name]->u_ref; } catch (const Engines::DSC::PortNotDefined&) { - throw PortNotDefined( LOC(OSS()<< "Le port uses " - << uses_port_name <<" n'existe pas.")); + throw PortNotDefined( LOC(OSS()<< "uses port " + << uses_port_name <<" does not exist.")); } catch (const Engines::DSC::PortNotConnected&) { - throw PortNotConnected( LOC(OSS()<< "Le port uses " << uses_port_name - << " n'est pas connecté.")); + throw PortNotConnected( LOC(OSS()<< "uses port " << uses_port_name + << " is not connected.")); } } @@ -283,24 +288,24 @@ Superv_Component_i::get_port(uses_port *& port, void Superv_Component_i::provides_port_changed(const char* provides_port_name, - int connection_nbr, - const Engines::DSC::Message message) + int connection_nbr, + const Engines::DSC::Message message) { my_superv_ports_it = my_superv_ports.find(provides_port_name); if (my_superv_ports_it != my_superv_ports.end()) my_superv_ports[provides_port_name]->p_ref->provides_port_changed(connection_nbr, - message); + message); } void Superv_Component_i::uses_port_changed(const char* uses_port_name, - Engines::DSC::uses_port * new_uses_port, - const Engines::DSC::Message message) + Engines::DSC::uses_port * new_uses_port, + const Engines::DSC::Message message) { my_superv_ports_it = my_superv_ports.find(uses_port_name); if (my_superv_ports_it != my_superv_ports.end()) my_superv_ports[uses_port_name]->u_ref->uses_port_changed(new Engines::DSC::uses_port(*new_uses_port), - message); + message); //delete the copy made by the caller delete new_uses_port; } @@ -309,7 +314,7 @@ Superv_Component_i::uses_port_changed(const char* uses_port_name, void Superv_Component_i::get_uses_port_names(std::vector & port_names, - const std::string servicename) const { + const std::string servicename) const { port_names.reserve(my_superv_ports.size()); @@ -318,3 +323,22 @@ Superv_Component_i::get_uses_port_names(std::vector & port_names, for (it=my_superv_ports.begin(); it!=my_superv_ports.end();++it) if( (*it).second->p_ref == NULL ) port_names.push_back((*it).first); } + +void Superv_Component_i::setTimeOut() +{ + char* valenv=getenv("DSC_TIMEOUT"); + if(valenv) + { + std::istringstream iss(valenv); + long temp; + if (iss >> temp) + if(temp >=0) + Superv_Component_i::dscTimeOut=temp; + } +} + +void Superv_Component_i::beginService(const char *serviceName) +{ + Engines_DSC_i::beginService(serviceName); + setTimeOut(); +} diff --git a/src/DSC/DSC_User/Superv_Component_i.hxx b/src/DSC/DSC_User/Superv_Component_i.hxx index ec6d8abcb..2d0e227c6 100644 --- a/src/DSC/DSC_User/Superv_Component_i.hxx +++ b/src/DSC/DSC_User/Superv_Component_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : Superv_Component_i.hxx // Author : André RIBES (EDF), Eric Fayolle (EDF) // Module : KERNEL @@ -35,6 +36,7 @@ #include "DSC_Exception.hxx" #include +//#define MYDEBUG /*! \class Superv_Component_i * \brief This class implements DSC_User component. @@ -43,7 +45,7 @@ * a programming level for service's developpers who want to use DSC ports. * * This class has two level for using and declare ports. The higher level proposes - * operations to add ports that are provided by default by Salomé like Calcium ports. + * operations to add ports that are provided by default by SALOME like Calcium ports. * It provides too some methods to add their own DSC_User ports. * * \note This class doesn't implement the init_service CORBA operation. @@ -54,17 +56,17 @@ class Superv_Component_i : { public: Superv_Component_i(CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName, - bool notif = false); + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName, + bool notif = false); Superv_Component_i(CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - Engines::Container_ptr container, - const char *instanceName, - const char *interfaceName, - bool notif = false, + PortableServer::POA_ptr poa, + Engines::Container_ptr container, + const char *instanceName, + const char *interfaceName, + bool notif = false, bool regist = true ); virtual ~Superv_Component_i(); @@ -141,8 +143,8 @@ public: * \param port_name the name of the port in the component. */ virtual void add_port(const char * port_fab_type, - const char * port_type, - const char * port_name) + const char * port_type, + const char * port_name) throw (PortAlreadyDefined, BadFabType, BadType, BadProperty); /*! @@ -156,8 +158,8 @@ public: */ template < typename SpecificPortType > SpecificPortType * add_port(const char * port_fab_type, - const char * port_type, - const char * port_name) + const char * port_type, + const char * port_name) throw (PortAlreadyDefined, BadFabType, BadType, BadCast, BadProperty); /*! @@ -167,7 +169,7 @@ public: * \param provides_port_name the name of the port in the component. */ virtual void add_port(provides_port * port, - const char* provides_port_name) + const char* provides_port_name) throw (PortAlreadyDefined, NilPort, BadProperty); /*! @@ -177,7 +179,7 @@ public: * \param uses_port_name the name of the port in the component. */ virtual void add_port(uses_port * port, - const char* uses_port_name) + const char* uses_port_name) throw (PortAlreadyDefined, NilPort, BadProperty); /*! @@ -187,7 +189,7 @@ public: * \param provides_port_name the name of the port. */ virtual void get_port(provides_port *& port, - const char* provides_port_name) + const char* provides_port_name) throw (PortNotDefined, PortNotConnected); /*! @@ -197,7 +199,7 @@ public: * \param uses_port_name the name of the port. */ virtual void get_port(uses_port *& port, - const char* uses_port_name) + const char* uses_port_name) throw (PortNotDefined, PortNotConnected); /*! @@ -209,7 +211,7 @@ public: * \param servicename service's name. */ virtual void get_uses_port_names(std::vector & port_names, - const std::string servicename="") const; + const std::string servicename="") const; /*! * Gets a port already added in the component. @@ -225,15 +227,15 @@ public: * \see DSC_Callbacks::provides_port_changed */ virtual void provides_port_changed(const char* provides_port_name, - int connection_nbr, - const Engines::DSC::Message message); + int connection_nbr, + const Engines::DSC::Message message); /*! * \see DSC_Callbacks::uses_port_changed */ virtual void uses_port_changed(const char* uses_port_name, - Engines::DSC::uses_port * new_uses_port, - const Engines::DSC::Message message); + Engines::DSC::uses_port * new_uses_port, + const Engines::DSC::Message message); /*! @@ -245,7 +247,7 @@ public: * \param factory_ptr factory pointer (destroyed by the component) */ static void register_factory(const std::string & factory_name, - port_factory * factory_ptr); + port_factory * factory_ptr); /*! * Get a factory from the component. @@ -255,7 +257,22 @@ public: */ virtual port_factory * get_factory(const std::string & factory_name); -private: + /*! + */ + static long dscTimeOut; + static void setTimeOut(); + void beginService(const char *serviceName); + + + // This method is implemented by default since it is a very specific usage. + // It also permits to not break compatibility with older components. + virtual CORBA::Boolean init_service_with_multiple(const char* service_name, + const Engines::Superv_Component::seq_multiple_param & params) + { + return true; + } + +private: // Factory map typedef std::map factory_map_t; static factory_map_t _factory_map; @@ -267,7 +284,18 @@ private: ~superv_port_t() { if(u_ref)delete u_ref; - if(p_ref)delete p_ref; + if(p_ref) + { + // do not delete CORBA servant : deactivate it and then call _remove_ref or delete + PortableServer::ServantBase* servant=dynamic_cast(p_ref); + if(servant) + { + PortableServer::POA_var poa =servant->_default_POA(); + PortableServer::ObjectId_var oid = poa->servant_to_id(servant); + poa->deactivate_object(oid); + servant->_remove_ref(); + } + } }; // For uses ports. uses_port * u_ref; @@ -288,8 +316,8 @@ private: template < typename SpecificPortType > SpecificPortType * Superv_Component_i::add_port(const char * port_fab_type, - const char * port_type, - const char * port_name) + const char * port_type, + const char * port_name) throw (PortAlreadyDefined, BadFabType, BadType, BadCast, BadProperty) { assert(port_fab_type); @@ -297,7 +325,7 @@ Superv_Component_i::add_port(const char * port_fab_type, assert(port_name); SpecificPortType * retPort; -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "---- Superv_Component_i::add_port : Mark 0 ---- " << port_name << "----" << std::endl; #endif @@ -307,27 +335,27 @@ Superv_Component_i::add_port(const char * port_fab_type, add_port(port, port_name); retPort = dynamic_cast(port); if ( retPort == NULL ) { delete port; - throw BadCast( LOC("La conversion vers le type de port demandé n'est pas possible " )); + throw BadCast( LOC("Can't cast to asked port type " )); } } else if (s_port_type == "uses") { uses_port * port = create_uses_data_port(port_fab_type); add_port(port, port_name); -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "---- Superv_Component_i::add_port : Mark 1 ---- " << port << "----" << std::endl; std::cout << "---- Superv_Component_i::add_port : Mark 1 ---- get_repository_id()" << port->get_repository_id() << std::endl; #endif retPort = dynamic_cast(port); -#ifdef _DEBUG_ +#ifdef MYDEBUG std::cout << "---- Superv_Component_i::add_port : Mark 2 ---- " << retPort << "----" << std::endl; #endif if ( retPort == NULL ) { delete port; - throw BadCast( LOC("La conversion vers le type de port demandé n'est pas possible " )); + throw BadCast( LOC("Can't cast to asked port type " )); } } else - throw BadType(LOC(OSS()<< "Le port_type doit être soit 'provides' soit 'uses' not " - << port_type)); + throw BadType(LOC(OSS()<< "port_type must be either 'provides' either 'uses' not " + << port_type)); return retPort; }; @@ -363,17 +391,16 @@ Superv_Component_i::get_port( const char * port_name) } } catch (const Engines::DSC::PortNotDefined&) { - throw PortNotDefined( LOC(OSS()<< "Le port " - << port_name <<" n'existe pas.")); + throw PortNotDefined( LOC(OSS()<< "port " + << port_name <<" does not exist.")); } catch (const Engines::DSC::PortNotConnected&) { - throw PortNotConnected( LOC(OSS()<< "Le port " << port_name - << " n'est pas connecté.")); + throw PortNotConnected( LOC(OSS()<< "port " << port_name + << " is not connected.")); } retPort = dynamic_cast(port); if ( retPort == NULL ) { - delete port; - throw BadCast( LOC("La conversion vers le type de port demandé n'est pas possible " )); + throw BadCast( LOC("Can't cast to required port type " )); } return retPort; diff --git a/src/DSC/DSC_User/base_port.cxx b/src/DSC/DSC_User/base_port.cxx index 791a3a208..1c29b0f43 100644 --- a/src/DSC/DSC_User/base_port.cxx +++ b/src/DSC/DSC_User/base_port.cxx @@ -1,25 +1,27 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "base_port.hxx" +#include base_port::base_port() @@ -29,7 +31,11 @@ base_port::base_port() base_port::~base_port() { - delete default_properties; + //do not call delete on corba servant: deactivate it and then call _remove_ref or delete + PortableServer::POA_var poa =default_properties->_default_POA(); + PortableServer::ObjectId_var oid = poa->servant_to_id(default_properties); + poa->deactivate_object(oid); + default_properties->_remove_ref(); } Ports::PortProperties_ptr diff --git a/src/DSC/DSC_User/base_port.hxx b/src/DSC/DSC_User/base_port.hxx index 8b679aa36..1a44ea3a3 100644 --- a/src/DSC/DSC_User/base_port.hxx +++ b/src/DSC/DSC_User/base_port.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : base_port.hxx // Author : Eric Fayolle (EDF), André RIBES (EDF) // Module : KERNEL diff --git a/src/DSC/DSC_User/port_factory.hxx b/src/DSC/DSC_User/port_factory.hxx index faecb7750..a28e76538 100644 --- a/src/DSC/DSC_User/port_factory.hxx +++ b/src/DSC/DSC_User/port_factory.hxx @@ -1,24 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : port_factory.hxx // Author : André RIBES (EDF) // Module : KERNEL diff --git a/src/DSC/DSC_User/provides_port.cxx b/src/DSC/DSC_User/provides_port.cxx index 3fc89de15..18cb8029d 100644 --- a/src/DSC/DSC_User/provides_port.cxx +++ b/src/DSC/DSC_User/provides_port.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : provides_port.cxx // Author : André RIBES (EDF) // Module : KERNEL diff --git a/src/DSC/DSC_User/provides_port.hxx b/src/DSC/DSC_User/provides_port.hxx index 2227ed9cf..31001582e 100644 --- a/src/DSC/DSC_User/provides_port.hxx +++ b/src/DSC/DSC_User/provides_port.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : provides_port.hxx // Author : André RIBES (EDF) // Module : KERNEL @@ -57,7 +58,7 @@ class provides_port : public base_port * \param message message associated with this connection. */ virtual void provides_port_changed(int connection_nbr, - const Engines::DSC::Message message) {} + const Engines::DSC::Message message) {} }; diff --git a/src/DSC/DSC_User/test_DSC_Exception.cxx b/src/DSC/DSC_User/test_DSC_Exception.cxx index 68041b0c9..a479cb014 100644 --- a/src/DSC/DSC_User/test_DSC_Exception.cxx +++ b/src/DSC/DSC_User/test_DSC_Exception.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : test_DSC_Exception.cxx // Author : Eric Fayolle (EDF) // Module : KERNEL diff --git a/src/DSC/DSC_User/uses_port.cxx b/src/DSC/DSC_User/uses_port.cxx index 1e396f72e..5a3f6ea57 100644 --- a/src/DSC/DSC_User/uses_port.cxx +++ b/src/DSC/DSC_User/uses_port.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "uses_port.hxx" uses_port::uses_port() diff --git a/src/DSC/DSC_User/uses_port.hxx b/src/DSC/DSC_User/uses_port.hxx index 121996b18..9009b14ad 100644 --- a/src/DSC/DSC_User/uses_port.hxx +++ b/src/DSC/DSC_User/uses_port.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : uses_port.hxx // Author : André RIBES (EDF) // Module : KERNEL @@ -63,7 +64,7 @@ class uses_port : public base_port * \param message message associated with this modification. */ virtual void uses_port_changed(Engines::DSC::uses_port * new_uses_port, - const Engines::DSC::Message message) = 0; + const Engines::DSC::Message message) = 0; }; diff --git a/src/DSC/Makefile.am b/src/DSC/Makefile.am index 46a9e4106..e182b2dc8 100644 --- a/src/DSC/Makefile.am +++ b/src/DSC/Makefile.am @@ -1,32 +1,41 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : Makefile.am # Author : André RIBES (EDF) # Module : KERNEL # +SUBDIRS_COMMON = DSC_Basic + +if !WINDOWS + SUBDIRS_ADD = DSC_User DSC_Python +endif + if WITH_PACO_PARALLEL -SUBDIR_PAR = ParallelDSC + SUBDIR_PAR = ParallelDSC endif -SUBDIRS = DSC_Basic DSC_User $(SUBDIR_PAR) DSC_Python +SUBDIRS = $(SUBDIRS_COMMON) $(SUBDIRS_ADD) $(SUBDIR_PAR) EXTRA_DIST= DSC.dox + +DIST_SUBDIRS = DSC_Basic DSC_User DSC_Python ParallelDSC diff --git a/src/DSC/ParallelDSC/Makefile.am b/src/DSC/ParallelDSC/Makefile.am index b25c20235..66a52a1b6 100644 --- a/src/DSC/ParallelDSC/Makefile.am +++ b/src/DSC/ParallelDSC/Makefile.am @@ -1,24 +1,22 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# 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 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. # -# 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 # -# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : Makefile.am # Author : André RIBES (EDF) # Module : KERNEL @@ -31,7 +29,9 @@ include $(top_srcdir)/salome_adm/unix/make_common_starter.am # =============================================================== # # header files -salomeinclude_HEADERS = ParallelDSC_i.hxx +salomeinclude_HEADERS = ParallelDSC_i.hxx \ + Param_Double_Port_provides_i.hxx \ + Param_Double_Port_uses_i.hxx # # =============================================================== @@ -48,12 +48,12 @@ COMMON_CPPFLAGS= -I$(top_srcdir)/src/Container \ -I$(top_srcdir)/src/NamingService \ -I$(top_srcdir)/src/Utils \ -I$(top_srcdir)/src/DSC/DSC_Basic \ - -I$(top_builddir)/salome_adm/unix \ + -I$(top_srcdir)/src/GenericObj \ -I$(top_builddir)/idl \ -I$(top_srcdir)/src/Registry \ -I$(top_srcdir)/src/Utils \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ \ - @PACO_INCLUDES@ + @PACO_INCLUDES@ @MPI_INCLUDES@ # This local variable defines the list of dependant libraries common to all target in this package. COMMON_LIBS = @@ -65,7 +65,9 @@ COMMON_LIBS = # lib_LTLIBRARIES = libSalomeParallelDSCContainer.la -libSalomeParallelDSCContainer_la_SOURCES = ParallelDSC_i.cxx +libSalomeParallelDSCContainer_la_SOURCES = ParallelDSC_i.cxx \ + Param_Double_Port_provides_i.cxx \ + Param_Double_Port_uses_i.cxx libSalomeParallelDSCContainer_la_CXXFLAGS = $(COMMON_CPPFLAGS) diff --git a/src/DSC/ParallelDSC/ParallelDSC_i.cxx b/src/DSC/ParallelDSC/ParallelDSC_i.cxx index 7fb691aa2..04ac59a70 100644 --- a/src/DSC/ParallelDSC/ParallelDSC_i.cxx +++ b/src/DSC/ParallelDSC/ParallelDSC_i.cxx @@ -1,24 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : ParallelDSC_i.cxx // Author : André RIBES (EDF) // Module : KERNEL @@ -26,19 +24,24 @@ #include "ParallelDSC_i.hxx" Engines_ParallelDSC_i::Engines_ParallelDSC_i(CORBA::ORB_ptr orb, - char * ior, - int rank, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName, - bool notif) : + char * ior, + int rank, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName, + bool notif) : Engines_Parallel_Component_i(orb, ior, rank, poa, contId, instanceName, interfaceName, notif), Engines::Parallel_DSC_serv(orb, ior, rank), + Engines::Parallel_DSC_base_serv(orb, ior, rank), Engines::DSC_serv(orb, ior, rank), + Engines::DSC_base_serv(orb, ior, rank), Engines::Superv_Component_serv(orb, ior, rank), - Engines::Component_serv(orb, ior, rank), + Engines::Superv_Component_base_serv(orb, ior, rank), + Engines::EngineComponent_serv(orb, ior, rank), + Engines::EngineComponent_base_serv(orb, ior, rank), Engines::Parallel_Component_serv(orb, ior, rank), + Engines::Parallel_Component_base_serv(orb, ior, rank), InterfaceParallel_impl(orb, ior, rank) { } @@ -52,12 +55,12 @@ Engines_ParallelDSC_i::~Engines_ParallelDSC_i() {} void Engines_ParallelDSC_i::set_paco_proxy(const CORBA::Object_ptr ref, - const char* provides_port_name, - Ports::PortProperties_ptr port_prop) { + const char* provides_port_name, + Ports::PortProperties_ptr port_prop) { assert(provides_port_name); Engines_DSC_interface::add_provides_port(Ports::Port::_narrow(ref), - provides_port_name, - port_prop); + provides_port_name, + port_prop); // Waiting that all the nodes have the proxy _my_com->paco_barrier(); cerr << "set_paco_proxy node fin" << endl; @@ -67,7 +70,7 @@ const char * Engines_ParallelDSC_i::get_proxy(const char* provides_port_name) { char * rtn_char = NULL; Ports::Port_ptr proxy = Engines_DSC_interface::get_provides_port(provides_port_name, - 0); + 0); if (!CORBA::is_nil(proxy)) rtn_char = (char *) _orb->object_to_string(proxy); return rtn_char; @@ -75,8 +78,8 @@ Engines_ParallelDSC_i::get_proxy(const char* provides_port_name) { CORBA::Boolean Engines_ParallelDSC_i::add_parallel_provides_proxy_port(const CORBA::Object_ptr ref, - const char * provides_port_name, - Ports::PortProperties_ptr port_prop) + const char * provides_port_name, + Ports::PortProperties_ptr port_prop) { assert(provides_port_name); CORBA::Boolean rtn_bool = false; @@ -100,7 +103,7 @@ Engines_ParallelDSC_i::add_parallel_provides_proxy_wait(const char * provides_po { sleep(1); try { - proxy = (char *) get_proxy(provides_port_name); + proxy = (char *) get_proxy(provides_port_name); } catch(...) {} } @@ -110,7 +113,7 @@ Engines_ParallelDSC_i::add_parallel_provides_proxy_wait(const char * provides_po CORBA::Boolean Engines_ParallelDSC_i::add_parallel_provides_node_port(Ports::Port_PaCO_ptr ref, - const char* provides_port_name) + const char* provides_port_name) { CORBA::Boolean rtn_bool = false; PaCO::InterfaceParallel_var node = PaCO::InterfaceParallel::_narrow(ref); diff --git a/src/DSC/ParallelDSC/ParallelDSC_i.hxx b/src/DSC/ParallelDSC/ParallelDSC_i.hxx index e745a1cb3..0b36d0dc0 100644 --- a/src/DSC/ParallelDSC/ParallelDSC_i.hxx +++ b/src/DSC/ParallelDSC/ParallelDSC_i.hxx @@ -1,24 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : ParallelDSC_i.hxx // Author : André RIBES (EDF) // Module : KERNEL @@ -29,10 +27,12 @@ #include #include -#include "DSC_EnginesPaCO_Engines_Parallel_DSC_server.h" #include "DSC_interface.hxx" #include "SALOME_ParallelComponent_i.hxx" +#include "SALOME_PACOExtensionPaCO_Engines_Parallel_DSC_server.hxx" +#include "SALOME_PortsPaCO.hxx" + class Engines_ParallelDSC_i: public virtual Engines_Parallel_Component_i, public virtual Engines::Parallel_DSC_serv, @@ -40,13 +40,13 @@ class Engines_ParallelDSC_i: { public: Engines_ParallelDSC_i(CORBA::ORB_ptr orb, - char * ior, - int rank, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName, - bool notif = false); + char * ior, + int rank, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName, + bool notif = false); virtual ~Engines_ParallelDSC_i(); @@ -55,38 +55,38 @@ public: * \see Engines::DSC::add_provides_port */ virtual void add_provides_port(Ports::Port_ptr ref, - const char* provides_port_name, - Ports::PortProperties_ptr port_prop) + const char* provides_port_name, + Ports::PortProperties_ptr port_prop) throw (Engines::DSC::PortAlreadyDefined, - Engines::DSC::NilPort, - Engines::DSC::BadProperty) { + Engines::DSC::NilPort, + Engines::DSC::BadProperty) { Engines_DSC_interface::add_provides_port(ref, - provides_port_name, - port_prop); + provides_port_name, + port_prop); } /*! * \see Engines::DSC::add_uses_port */ virtual void add_uses_port(const char* repository_id, - const char* uses_port_name, - Ports::PortProperties_ptr port_prop) + const char* uses_port_name, + Ports::PortProperties_ptr port_prop) throw (Engines::DSC::PortAlreadyDefined, - Engines::DSC::BadProperty) { + Engines::DSC::BadProperty) { Engines_DSC_interface::add_uses_port(repository_id, - uses_port_name, - port_prop); + uses_port_name, + port_prop); } /*! * \see Engines::DSC::get_provides_port */ virtual Ports::Port_ptr get_provides_port(const char* provides_port_name, - const CORBA::Boolean connection_error) + const CORBA::Boolean connection_error) throw (Engines::DSC::PortNotDefined, - Engines::DSC::PortNotConnected) { + Engines::DSC::PortNotConnected) { return Engines_DSC_interface::get_provides_port(provides_port_name, - connection_error); + connection_error); } /*! @@ -94,7 +94,7 @@ public: */ virtual Engines::DSC::uses_port * get_uses_port(const char* uses_port_name) throw (Engines::DSC::PortNotDefined, - Engines::DSC::PortNotConnected) { + Engines::DSC::PortNotConnected) { return Engines_DSC_interface::get_uses_port(uses_port_name); } @@ -110,12 +110,12 @@ public: * \see Engines::DSC::connect_uses_port */ virtual void connect_uses_port(const char* uses_port_name, - Ports::Port_ptr provides_port_ref) + Ports::Port_ptr provides_port_ref) throw (Engines::DSC::PortNotDefined, - Engines::DSC::BadPortType, - Engines::DSC::NilPort) { + Engines::DSC::BadPortType, + Engines::DSC::NilPort) { Engines_DSC_interface::connect_uses_port(uses_port_name, - provides_port_ref); + provides_port_ref); } /*! @@ -130,25 +130,25 @@ public: * \see Engines::DSC::disconnect_provides_port */ virtual void disconnect_provides_port(const char* provides_port_name, - const Engines::DSC::Message message) + const Engines::DSC::Message message) throw (Engines::DSC::PortNotDefined, - Engines::DSC::PortNotConnected) { + Engines::DSC::PortNotConnected) { Engines_DSC_interface::disconnect_provides_port(provides_port_name, - message); + message); } /*! * \see Engines::DSC::disconnect_uses_port */ virtual void disconnect_uses_port(const char* uses_port_name, - Ports::Port_ptr provides_port_ref, - const Engines::DSC::Message message) + Ports::Port_ptr provides_port_ref, + const Engines::DSC::Message message) throw (Engines::DSC::PortNotDefined, - Engines::DSC::PortNotConnected, - Engines::DSC::BadPortReference) { + Engines::DSC::PortNotConnected, + Engines::DSC::BadPortReference) { Engines_DSC_interface::disconnect_uses_port(uses_port_name, - provides_port_ref, - message); + provides_port_ref, + message); } virtual Ports::PortProperties_ptr get_port_properties(const char* port_name) @@ -165,8 +165,8 @@ public: * \param port_prop port properties. */ virtual void set_paco_proxy(CORBA::Object_ptr ref, - const char* provides_port_name, - Ports::PortProperties_ptr port_prop); + const char* provides_port_name, + Ports::PortProperties_ptr port_prop); /*! * This method is used by the node that want to add the parallel proxy port. @@ -177,8 +177,8 @@ public: * \return true if the proxy is correctly added. */ virtual CORBA::Boolean add_parallel_provides_proxy_port(const CORBA::Object_ptr ref, - const char * provides_port_name, - Ports::PortProperties_ptr port_prop); + const char * provides_port_name, + Ports::PortProperties_ptr port_prop); /*! * This method by the nodes that do not add the proxy to wait is reference. @@ -198,7 +198,7 @@ public: * \return true if the node is correctly added. */ virtual CORBA::Boolean add_parallel_provides_node_port(Ports::Port_PaCO_ptr ref, - const char* provides_port_name); + const char* provides_port_name); /*! * Used to get the proxy of the parallel port. diff --git a/src/DSC/ParallelDSC/Param_Double_Port_provides_i.cxx b/src/DSC/ParallelDSC/Param_Double_Port_provides_i.cxx new file mode 100644 index 000000000..27770c192 --- /dev/null +++ b/src/DSC/ParallelDSC/Param_Double_Port_provides_i.cxx @@ -0,0 +1,343 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +// File : param_double_port_provides.cxx +// Author : André RIBES (EDF) +// Module : KERNEL +// +#include +#include +#include + +#include "Param_Double_Port_provides_i.hxx" + +#include +#include +#include +#include +#include +#include + +Param_Double_Port_provides_i::Param_Double_Port_provides_i(CORBA::ORB_ptr orb, char * ior, int rank) : + Ports::Param_Double_Port_serv(orb,ior,rank), + Ports::Param_Double_Port_base_serv(orb,ior,rank), + Ports::Data_Port_serv(orb,ior,rank), + Ports::Data_Port_base_serv(orb,ior,rank), + Ports::Port_serv(orb,ior,rank), + Ports::Port_base_serv(orb,ior,rank), + InterfaceParallel_impl(orb,ior,rank) +{ + _seq_data = NULL; + + seq_data_termine = false; + seq_data_mutex = new pthread_mutex_t(); + pthread_mutex_init(seq_data_mutex, NULL); + seq_data_condition = new pthread_cond_t(); + pthread_cond_init(seq_data_condition, NULL); + seq_data_termine_cp = true; + seq_data_mutex_cp = new pthread_mutex_t(); + pthread_mutex_init(seq_data_mutex_cp, NULL); + seq_data_condition_cp = new pthread_cond_t(); + pthread_cond_init(seq_data_condition_cp, NULL); + + _seq_results = NULL; + + seq_results_termine = false; + seq_results_mutex = new pthread_mutex_t(); + pthread_mutex_init(seq_results_mutex, NULL); + seq_results_condition = new pthread_cond_t(); + pthread_cond_init(seq_results_condition, NULL); + seq_results_termine_cp = true; + seq_results_mutex_cp = new pthread_mutex_t(); + pthread_mutex_init(seq_results_mutex_cp, NULL); + seq_results_condition_cp = new pthread_cond_t(); + pthread_cond_init(seq_results_condition_cp, NULL); +} + +Param_Double_Port_provides_i::~Param_Double_Port_provides_i() +{ + if (_seq_data) + delete _seq_data; + + pthread_mutex_destroy(seq_data_mutex); + delete seq_data_mutex; + pthread_cond_destroy(seq_data_condition); + delete seq_data_condition; + pthread_mutex_destroy(seq_data_mutex_cp); + delete seq_data_mutex_cp; + pthread_cond_destroy(seq_data_condition_cp); + delete seq_data_condition_cp; + + if (_seq_results) + delete _seq_results; + + pthread_mutex_destroy(seq_results_mutex); + delete seq_results_mutex; + pthread_cond_destroy(seq_results_condition); + delete seq_results_condition; + pthread_mutex_destroy(seq_results_mutex_cp); + delete seq_results_mutex_cp; + pthread_cond_destroy(seq_results_condition_cp); + delete seq_results_condition_cp; +} + +Param_Double_Port_provides_i * +Param_Double_Port_provides_i::init_port(Engines_ParallelDSC_i * par_compo, + std::string port_name, + CORBA::ORB_ptr orb) +{ + int rank = par_compo->getMyRank(); + int totalNode = par_compo->getTotalNode(); + paco_com * com = par_compo->getCom(); + + MESSAGE("Configuration of Param_Double_Port_provides: rank = " << rank << " totalNode = " << totalNode); + + // DOIT ETRE DEJA FAIT AVANT !!!??? + paco_fabrique_manager* pfm = paco_getFabriqueManager(); + pfm->register_com("pdp_dummy", new paco_dummy_fabrique()); + pfm->register_thread("pdp_thread", new paco_omni_fabrique()); + pfm->register_comScheduling("pdp_direct", new paco_direct_fabrique()); + pfm->register_distribution("pdp_GaBro", new GaBro_fab()); + pfm->register_distribution("pdp_BasicBC", new BasicBC_fab()); + + Param_Double_Port_provides_i * port = NULL; + Ports::Param_Double_Port_proxy_impl * proxy_node = NULL; + + std::cerr << "Creating Proxy" << std::endl; + if (rank == 0) { + // On commence par créer le proxy + // Il est enregistré dans le composant et sera détruit automatiquement + // lorsque le composant sera détruit + proxy_node = + new Ports::Param_Double_Port_proxy_impl(CORBA::ORB::_duplicate(orb), + pfm->get_thread("pdp_thread")); + proxy_node->setLibCom("pdp_dummy", proxy_node); + proxy_node->setLibThread("pdp_thread"); + PaCO::PacoTopology_t serveur_topo; + serveur_topo.total = totalNode; + proxy_node->setTopology(serveur_topo); + + // Création de la propriété + PortProperties_i * proxy_node_properties = new PortProperties_i(); + + // Enregistrement du proxy + par_compo->add_parallel_provides_proxy_port(proxy_node->_this(), + port_name.c_str(), + proxy_node_properties->_this()); + proxy_node->_remove_ref(); + proxy_node_properties->_remove_ref(); + } + else { + par_compo->add_parallel_provides_proxy_wait(port_name.c_str()); + } + + std::cerr << "Getting proxy" << std::endl; + char * proxy_ior = (char * ) par_compo->get_proxy(port_name.c_str()); + std::cerr << "Proxy ior is : " << proxy_ior << std::endl; + + port = new Param_Double_Port_provides_i(CORBA::ORB::_duplicate(orb), proxy_ior, rank); + port->copyClientGlobalContext(par_compo); + + // Il faut maintenant configurer les bibliothèques + // de redistributions de la fonction put + ParallelMethodContext * method_ptr = port->getParallelMethodContext("put"); + method_ptr->setLibComScheduling("pdp_direct"); + method_ptr->setDistLibArg("param_data", "pdp_BasicBC", "in"); + BasicBC * dislib = (BasicBC *) method_ptr->getDistLibArg("param_data", "in"); + dislib->setEltSize(sizeof(CORBA::Double)); + + // Il faut maintenant configurer les bibliothèques + // de redistributions de la fonction get_results + method_ptr = port->getParallelMethodContext("get_results"); + method_ptr->setLibComScheduling("pdp_direct"); + method_ptr->setDistLibArg("param_results", "pdp_GaBro", "out"); + GaBro * dislib_gabro = (GaBro *) method_ptr->getDistLibArg("param_results", "out"); + dislib_gabro->setEltSize(sizeof(CORBA::Double)); + + // Enregistement du port + for (int i = 0; i < totalNode; i++) + { + std::ostringstream node_number; + node_number << i; + std::string event_name("AddNode"); + event_name += node_number.str(); + std::string tag_name = proxy_ior; + + if (i == rank) { + std::cerr << "Adding node of processor : " << i << std::endl; + par_compo->add_parallel_provides_node_port(Ports::Port_PaCO::_narrow(port->_this()), port_name.c_str()); + port->_remove_ref(); + par_compo->InterfaceParallel_impl::_proxy->send_event(event_name.c_str(), tag_name.c_str()); + } + + par_compo->wait_event(event_name.c_str(), tag_name.c_str()); + } + + // On démarre l'objet parallèle + std::string event_name("StartingProxy"); + std::string tag_name = proxy_ior; + if (rank == 0) + { + proxy_node->start(); + par_compo->InterfaceParallel_impl::_proxy->send_event(event_name.c_str(), tag_name.c_str()); + } + + CORBA::string_free(proxy_ior); + return port; +} + +void +Param_Double_Port_provides_i::wait_init_port(Engines_ParallelDSC_i * par_compo, + std::string port_name, + CORBA::ORB_ptr orb) +{ + int rank = par_compo->getMyRank(); + int totalNode = par_compo->getTotalNode(); + // Enregistement du port + for (int i = 0; i < totalNode; i++) + { + std::ostringstream node_number; + node_number << i; + std::string event_name("WaitingNode"); + event_name += node_number.str(); + char * proxy_ior = (char * ) par_compo->get_proxy(port_name.c_str()); + std::string tag_name(proxy_ior); + CORBA::string_free(proxy_ior); + if (i == rank) + par_compo->InterfaceParallel_impl::_proxy->send_event(event_name.c_str(), tag_name.c_str()); + par_compo->wait_event(event_name.c_str(), tag_name.c_str()); + } +} + +void +Param_Double_Port_provides_i::put(const Ports::Param_Double_Port::seq_double & param_data) +{ + + // On attend que le get soit fait + // Au départ seq_data_termine_cp = TRUE + pthread_mutex_lock(seq_data_mutex_cp); + while (seq_data_termine_cp == false) + { + pthread_cond_wait(seq_data_condition_cp, seq_data_mutex_cp); + } + seq_data_termine_cp = false; + pthread_mutex_unlock(seq_data_mutex_cp); + + pthread_mutex_lock(seq_data_mutex); + + // Création d'une nouvelle séquence + // Elle prend le buffer sans le copier + Ports::Param_Double_Port::seq_double * n_param_data = (Ports::Param_Double_Port::seq_double *) ¶m_data; + _seq_data = new Ports::Param_Double_Port::seq_double(n_param_data->length(), n_param_data->length(), n_param_data->get_buffer(1), 1); + + seq_data_termine = true; + pthread_cond_signal(seq_data_condition); + pthread_mutex_unlock(seq_data_mutex); +} + +void +Param_Double_Port_provides_i::get_results(Ports::Param_Double_Port::seq_double_out param_results) +{ + pthread_mutex_lock(seq_results_mutex); + while (seq_results_termine == false) + { + pthread_cond_wait(seq_results_condition, seq_results_mutex); + } + + // Création d'une nouvelle séquence + // Elle prend le buffer sans le copier + param_results = new Ports::Param_Double_Port::seq_double(_seq_results->length(), _seq_results->length(), _seq_results->get_buffer(1), 1); + delete _seq_results; + _seq_results = NULL; + + seq_results_termine = false; + pthread_mutex_unlock(seq_results_mutex); + + // On indique que l'on a copié la valeur + // Et donc que l'on peut recevoir une nouvelle valeur + pthread_mutex_lock(seq_results_mutex_cp); + seq_results_termine_cp = true; + pthread_cond_signal(seq_results_condition_cp); + pthread_mutex_unlock(seq_results_mutex_cp); +} + +Ports::Param_Double_Port::seq_double * +Param_Double_Port_provides_i::get_data() +{ + Ports::Param_Double_Port::seq_double * result = NULL; + + pthread_mutex_lock(seq_data_mutex); + while (seq_data_termine == false) + { + pthread_cond_wait(seq_data_condition, seq_data_mutex); + } + + // Création d'une nouvelle séquence + // Elle prend le buffer sans le copier + result = new Ports::Param_Double_Port::seq_double(_seq_data->length(), _seq_data->length(), _seq_data->get_buffer(1), 1); + delete _seq_data; + _seq_data = NULL; + + seq_data_termine = false; + pthread_mutex_unlock(seq_data_mutex); + + // On indique que l'on a copié la valeur + // Et donc que l'on peut recevoir une nouvelle valeur + pthread_mutex_lock(seq_data_mutex_cp); + seq_data_termine_cp = true; + pthread_cond_signal(seq_data_condition_cp); + pthread_mutex_unlock(seq_data_mutex_cp); + return result; +} + +void +Param_Double_Port_provides_i::set_data(Ports::Param_Double_Port::seq_double * results) +{ + // On attend que le get soit fait + // Au départ seq_results_termine_cp = TRUE + pthread_mutex_lock(seq_results_mutex_cp); + while (seq_results_termine_cp == false) + { + pthread_cond_wait(seq_results_condition_cp, seq_results_mutex_cp); + } + seq_results_termine_cp = false; + pthread_mutex_unlock(seq_results_mutex_cp); + + pthread_mutex_lock(seq_results_mutex); + + // Création d'une nouvelle séquence + // Elle prend le buffer sans le copier + _seq_results = new Ports::Param_Double_Port::seq_double(results->length(), results->length(), results->get_buffer(1), 1); + + seq_results_termine = true; + pthread_cond_signal(seq_results_condition); + pthread_mutex_unlock(seq_results_mutex); +} + +void +Param_Double_Port_provides_i::configure_set_data(int data_length, int totalNbElt, int BeginEltPos) +{ + // Configuration de la biblothèque de redistribution + // pour les données actuelles + ParallelMethodContext * method_ptr = getParallelMethodContext("get_results"); + GaBro * dislib = (GaBro *) method_ptr->getDistLibArg("param_results", "out"); + dislib->setNodeNbElt(data_length); + dislib->setTotalNbElt(totalNbElt); + dislib->setNodePos(BeginEltPos); +} diff --git a/src/DSC/ParallelDSC/Param_Double_Port_provides_i.hxx b/src/DSC/ParallelDSC/Param_Double_Port_provides_i.hxx new file mode 100644 index 000000000..5afe3b5ce --- /dev/null +++ b/src/DSC/ParallelDSC/Param_Double_Port_provides_i.hxx @@ -0,0 +1,79 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +// File : param_double_port_provides.hxx +// Author : André RIBES (EDF) +// Module : KERNEL +// +#ifndef _PARAM_DOUBLE_PORT_PROVIDES_HXX_ +#define _PARAM_DOUBLE_PORT_PROVIDES_HXX_ + +#include "SALOME_ParamPortsPaCO_Ports_Param_Double_Port_server.hxx" + +#include "ParallelDSC_i.hxx" +#include "PortProperties_i.hxx" + +class Param_Double_Port_provides_i : + public virtual Ports::Param_Double_Port_serv +{ + public : + Param_Double_Port_provides_i(CORBA::ORB_ptr orb, char * ior, int rank); + virtual ~Param_Double_Port_provides_i(); + + void put(const Ports::Param_Double_Port::seq_double & param_data); + void get_results(Ports::Param_Double_Port::seq_double_out param_results); + + // local methods + Ports::Param_Double_Port::seq_double * get_data(); + void set_data(Ports::Param_Double_Port::seq_double * results); + void configure_set_data(int data_length, + int totalNbElt, + int BeginEltPos); + + // Aide à la création du port + static Param_Double_Port_provides_i * init_port(Engines_ParallelDSC_i * par_compo, + std::string port_name, + CORBA::ORB_ptr orb); + + // Méthode temporaire en attendant d'avoir des méthodes parallèles bien synchronisé + static void wait_init_port(Engines_ParallelDSC_i * par_compo, + std::string port_name, + CORBA::ORB_ptr orb); + private: + // Buffers pour la réception et l'envoi + Ports::Param_Double_Port::seq_double * _seq_data; + Ports::Param_Double_Port::seq_double * _seq_results; + + // Variable pour la gestion du buffer de réception + pthread_mutex_t * seq_data_mutex; + pthread_cond_t * seq_data_condition; + bool seq_data_termine; + pthread_mutex_t * seq_data_mutex_cp; + pthread_cond_t * seq_data_condition_cp; + bool seq_data_termine_cp; + + // Variable pour la gestion du buffer d'envoi + pthread_mutex_t * seq_results_mutex; + pthread_cond_t * seq_results_condition; + bool seq_results_termine; + pthread_mutex_t * seq_results_mutex_cp; + pthread_cond_t * seq_results_condition_cp; + bool seq_results_termine_cp; +}; +#endif diff --git a/src/DSC/ParallelDSC/Param_Double_Port_uses_i.cxx b/src/DSC/ParallelDSC/Param_Double_Port_uses_i.cxx new file mode 100644 index 000000000..87d0b1426 --- /dev/null +++ b/src/DSC/ParallelDSC/Param_Double_Port_uses_i.cxx @@ -0,0 +1,113 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +// File : param_double_port_uses.cxx +// Author : André RIBES (EDF) +// Module : KERNEL +// +#include "Param_Double_Port_uses_i.hxx" + +Param_Double_Port_uses_i::Param_Double_Port_uses_i(Engines_ParallelDSC_i * par_compo, + std::string port_name, + CORBA::ORB_ptr orb) +{ + _orb = CORBA::ORB::_duplicate(orb); + _fake_properties = new PortProperties_i(); + _fake_prop_ref = _fake_properties->_this(); + _fake_properties->_remove_ref(); + + _par_compo = par_compo; + _port_name = port_name; + _provides_port = NULL; + + paco_fabrique_manager * pfm = paco_getFabriqueManager(); + pfm->register_comScheduling("Param_Double_Port_uses_i_direct", new paco_direct_fabrique()); + pfm->register_distribution("Param_Double_Port_uses_i_GaBro", new GaBro_fab()); + pfm->register_distribution("Param_Double_Port_uses_i_BasicBC", new BasicBC_fab()); +} + +Param_Double_Port_uses_i::~Param_Double_Port_uses_i() +{ + if (_provides_port) + { + _provides_port->stop(); + delete _provides_port; + } +} + +void +Param_Double_Port_uses_i::add_port_to_component() +{ + _par_compo->add_uses_port("IDL:Ports/Param_Double_Port:1.0", + _port_name.c_str(), + _fake_prop_ref); +} + +void +Param_Double_Port_uses_i::start_port() +{ + Engines::DSC::uses_port * uport = _par_compo->get_uses_port(_port_name.c_str()); + _proxy_port = Ports::Param_Double_Port::_narrow((*uport)[0]); + _provides_port = Ports::PaCO_Param_Double_Port::PaCO_narrow(_proxy_port, _orb); + _provides_port->copyClientGlobalContext(_par_compo); + _provides_port->init(_par_compo->getMyRank(), _par_compo->getTotalNode()); + + // Il faut maintenant configurer les bibliothèques + // de redistributions de la fonction put + ParallelMethodContext * method_ptr; + method_ptr = _provides_port->getParallelMethodContext("put"); + method_ptr->setLibComScheduling("Param_Double_Port_uses_i_direct"); + method_ptr->setDistLibArg("param_data", "Param_Double_Port_uses_i_BasicBC", "in"); + BasicBC * dislib = (BasicBC *) method_ptr->getDistLibArg("param_data", "in"); + dislib->setEltSize(sizeof(CORBA::Double)); + dislib->setBlocSize(0); // BLOC + dislib->setNodeRank(_par_compo->getMyRank()); + + // Il faut maintenant configurer les bibliothèques + // de redistributions de la fonction get_results + method_ptr = _provides_port->getParallelMethodContext("get_results"); + method_ptr->setLibComScheduling("Param_Double_Port_uses_i_direct"); + method_ptr->setDistLibArg("param_results", "Param_Double_Port_uses_i_GaBro", "out"); + GaBro * dislib_gabro = (GaBro *) method_ptr->getDistLibArg("param_results", "out"); + dislib_gabro->setEltSize(sizeof(CORBA::Double)); + + _provides_port->start(); + delete uport; +} + +void +Param_Double_Port_uses_i::configure_port_method_put(int totalNbElt) +{ + ParallelMethodContext * method_ptr; + method_ptr = _provides_port->getParallelMethodContext("put"); + BasicBC * dislib = (BasicBC *) method_ptr->getDistLibArg("param_data", "in"); + dislib->setTotalNbElt(totalNbElt); +} + +void +Param_Double_Port_uses_i::put(const Ports::Param_Double_Port::seq_double & param_data) +{ + _provides_port->put(param_data); +} + +void +Param_Double_Port_uses_i::get_results(Ports::Param_Double_Port::seq_double_out param_results) +{ + _provides_port->get_results(param_results); +} diff --git a/src/DSC/ParallelDSC/Param_Double_Port_uses_i.hxx b/src/DSC/ParallelDSC/Param_Double_Port_uses_i.hxx new file mode 100644 index 000000000..455a31e11 --- /dev/null +++ b/src/DSC/ParallelDSC/Param_Double_Port_uses_i.hxx @@ -0,0 +1,63 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +// File : param_double_port_uses.hxx +// Author : André RIBES (EDF) +// Module : KERNEL +// +#ifndef _PARAM_DOUBLE_PORT_USES_HXX_ +#define _PARAM_DOUBLE_PORT_USES_HXX_ + +#include "SALOME_ParamPortsPaCO_Ports_Param_Double_Port_client.hxx" + +#include "ParallelDSC_i.hxx" +#include "PortProperties_i.hxx" + +#include +#include +#include + +class Param_Double_Port_uses_i +{ + public : + Param_Double_Port_uses_i(Engines_ParallelDSC_i * par_compo, + std::string port_name, + CORBA::ORB_ptr orb); + virtual ~Param_Double_Port_uses_i(); + + // Port local init methods + virtual void add_port_to_component(); + virtual void start_port(); + void configure_port_method_put(int totalNbElt); + + // Port methods + void put(const Ports::Param_Double_Port::seq_double & param_data); + void get_results(Ports::Param_Double_Port::seq_double_out param_results); + + private : + CORBA::ORB_var _orb; + std::string _port_name; + Engines_ParallelDSC_i * _par_compo; + Ports::Param_Double_Port_var _proxy_port; + PortProperties_i * _fake_properties; + Ports::PortProperties_var _fake_prop_ref; + Ports::PaCO_Param_Double_Port * _provides_port; +}; +#endif + diff --git a/src/GenericObj/Makefile.am b/src/GenericObj/Makefile.am index 115e2b722..438bdea2a 100644 --- a/src/GenericObj/Makefile.am +++ b/src/GenericObj/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : Makefile.am # Author : Guillaume Boulant (CSSI) # Module : KERNEL @@ -39,7 +40,6 @@ libSalomeGenericObj_la_LDFLAGS = -no-undefined -version-info=0:0:0 libSalomeGenericObj_la_CPPFLAGS = \ -I$(srcdir)/../Basics \ -I$(srcdir)/../SALOMELocalTrace \ - -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ libSalomeGenericObj_la_LIBADD = \ diff --git a/src/GenericObj/SALOME_GenericObj_i.cc b/src/GenericObj/SALOME_GenericObj_i.cc index bee7e62cf..bdb830cc7 100644 --- a/src/GenericObj/SALOME_GenericObj_i.cc +++ b/src/GenericObj/SALOME_GenericObj_i.cc @@ -1,29 +1,28 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SALOME_GenericObj_i_CC + // File : SALOME_GenericObj_i.cc -// Author : Alexey PETROV -// Module : SALOME -// +// Author : Alexey PETROV, Open CASCADE S.A.S. (alexey.petrov@opencascade.com) + #include "SALOME_GenericObj_i.hh" #include "utilities.h" @@ -33,42 +32,97 @@ static int MYDEBUG = 0; static int MYDEBUG = 0; #endif -using namespace SALOME; -using namespace std; +namespace SALOME +{ + + /*! + \class SALOME::GenericObj_i + \brief Implementation of the base servant for SALOME objects with reference counter. + + This class can be used to implement data entities with life-cycle management based on + the reference counting. + + The object is initially created with the reference counter equal to 1. + The function Register() can be used to incrfement the reference counter. + Function UnRegister() should be used to decrement reference counter. + As soon as reference counter goes to zero, the object is automatically deactivated in POA + (and, eventually its destructor is automatically called). + */ + + /*! + \brief Constructor. + Creates an object with the reference counter initially set to 1. + + The default POA for the servant can be passed as a parameter \a thePOA. + By default, root POA is used. -GenericObj_i::GenericObj_i(PortableServer::POA_ptr thePOA): myRefCounter(1){ - if(MYDEBUG) - MESSAGE("GenericObj_i::GenericObj_i() - this = "<GetId()); + +} + + +HDFarray::~HDFarray() +{ + if(_dim ) + delete [] _dim; +} + +hdf_type HDFarray::GetDataType() { + if (_datatype == HDF_NONE) + if ((_datatype = HDFarrayGetType(_id)) == HDF_NONE ) + throw HDFexception("Can't determine the type of array data"); + return _datatype; +} + + +void HDFarray::CreateOnDisk() { + if( (_id = HDFarrayCreate(_datatype,_ndim, _dim)) < 0 ) + throw HDFexception("Can't create HDF array"); +} + +void HDFarray::CloseOnDisk() { + if( HDFarrayClose(_id) < 0 ) + throw HDFexception("Can't close HDF array"); +} + +int HDFarray::nDim() { + if (_ndim == -1) + if ((_ndim = HDFarrayGetnDim(_id)) < 0) + throw HDFexception("Can't determine the array dimensions number"); + + return _ndim; + +} + + +void HDFarray::GetDim(hdf_size dim[]) { + int i; + int ndim; + hdf_err ret; + + if (_dim == 0) + { + if (_ndim == -1) + ndim = HDFdatasetGetnDim(_id); + else + ndim = _ndim; + _dim = new hdf_size[ndim]; + if ((ret = HDFarrayGetDim(_id,_dim)) < 0) + throw HDFexception("Can't determine the size dimensions of the array "); + } + + for (i=0;i<_ndim;i++) + dim[i] = _dim[i]; +} + + +hdf_object_type HDFarray::GetObjectType() { + return HDF_ARRAY_TYPE; +} diff --git a/src/HDFPersist/HDFarray.hxx b/src/HDFPersist/HDFarray.hxx new file mode 100644 index 000000000..eb9d363d7 --- /dev/null +++ b/src/HDFPersist/HDFarray.hxx @@ -0,0 +1,59 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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 +// + +// SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) +// File : HDFarray.hxx +// Module : SALOME +// +#ifndef HDFARRAY_HXX +#define HDFARRAY_HXX + +#include "HDFobject.hxx" +#include "HDFexport.hxx" + +class HDFPERSIST_EXPORT HDFarray : public HDFobject { +protected: + HDFobject* _father; + hdf_type _datatype; + hdf_size* _dim; + int _ndim; + +public : + HDFarray( HDFobject* father, hdf_type dataType, int ndim, hdf_size *dim); + + HDFarray( HDFobject* father); + + virtual ~HDFarray(); + + virtual hdf_type GetDataType(); + + virtual hdf_object_type GetObjectType(); + + void CreateOnDisk(); + void CloseOnDisk(); + + int nDim(); + void GetDim(hdf_size dim[]); +}; + +#endif /* HDFARRAY_HXX */ + diff --git a/src/HDFPersist/HDFarrayClose.c b/src/HDFPersist/HDFarrayClose.c new file mode 100644 index 000000000..b1ef4b81b --- /dev/null +++ b/src/HDFPersist/HDFarrayClose.c @@ -0,0 +1,50 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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 +// + +/*---------------------------------------------------------------------------- + SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) + File : HDFarrayClose.c + Module : SALOME +----------------------------------------------------------------------------*/ + +#include "hdfi.h" + +/* + * - Name : HDFarrayClose + * - Description : close a HDF array + * - Parameters : + * - id (IN) : array ID + * - Result : + * - if success : returns 0 + * - if failure : returns -1 + */ + +hdf_err +HDFarrayClose(hdf_idt id) +{ + hdf_err ret; + + if ((ret = H5Tclose(id)) < 0) + return -1; + + return 0; +} diff --git a/src/HDFPersist/HDFarrayCreate.c b/src/HDFPersist/HDFarrayCreate.c new file mode 100644 index 000000000..16da48719 --- /dev/null +++ b/src/HDFPersist/HDFarrayCreate.c @@ -0,0 +1,76 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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 +// + +/*---------------------------------------------------------------------------- +SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) + File : HDFarrayCreate.c + Module : SALOME +----------------------------------------------------------------------------*/ + +#include "hdfi.h" + +/* + * - Name : HDFarrayCreate + * - Description : creates a HDF array + * - Parameters : + * - dataType (IN) : type of the data in the array (HDF_INT32, HDF_INT64, HDF_FLOAT64, HDF_CHAR). + * - ndim (IN) : is the number of dimensions and the size of each dimension is specified in the array dims. + * - dim (IN) : size of each array dimension. + * - Result : + * - if success : returns array ID + * - if failure : -1 + */ + +hdf_idt HDFarrayCreate(hdf_type dataType, int ndim, hdf_size *dim) +{ + hdf_idt type_hdf; + switch(dataType) + { + case HDF_FLOAT64 : +#if defined (PCLINUX) || defined (PCLINUX64) + type_hdf = H5T_IEEE_F64BE; +#else + type_hdf = H5T_IEEE_F64LE; +#endif + break; + + case HDF_INT32 : +#if defined (PCLINUX) || defined (PCLINUX64) + type_hdf = H5T_STD_I32BE; +#else + type_hdf = H5T_NATIVE_INT; +#endif + break; + + case HDF_INT64 : + type_hdf = H5T_NATIVE_LONG; + break; + case HDF_CHAR : + type_hdf = H5T_NATIVE_CHAR; + break; + default: + return -1; + break; + } + + return H5Tarray_create2( type_hdf, ndim, dim ); +} diff --git a/src/HDFPersist/HDFarrayGetDim.c b/src/HDFPersist/HDFarrayGetDim.c new file mode 100644 index 000000000..a476755aa --- /dev/null +++ b/src/HDFPersist/HDFarrayGetDim.c @@ -0,0 +1,53 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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 +// + +/*---------------------------------------------------------------------------- + SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) + File : HDFarrayGetDim.c + Module : SALOME +----------------------------------------------------------------------------*/ + +#include +#include "hdfi.h" +#include + +hdf_err +HDFarrayGetDim(hdf_idt id,hdf_size dim[]) +{ + hdf_err ret = 0; + hdf_size *tmp; + int ndim, i; + + if ( (ndim = H5Tget_array_ndims(id)) < 0 ) + return -1; + + tmp = (hdf_size *) malloc(sizeof(hdf_size)*ndim); + + ret = H5Tget_array_dims2(id, tmp); + + for( i=0 ; i < ndim ; i++) + dim[i] = tmp[i]; + + free (tmp); + + return ret; +} diff --git a/src/HDFPersist/HDFarrayGetType.c b/src/HDFPersist/HDFarrayGetType.c new file mode 100644 index 000000000..254d79453 --- /dev/null +++ b/src/HDFPersist/HDFarrayGetType.c @@ -0,0 +1,71 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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 +// + +/*---------------------------------------------------------------------------- + SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) + File : HDFarrayGetType.c + Module : SALOME +----------------------------------------------------------------------------*/ + +#include "hdfi.h" +#include + +hdf_type +HDFarrayGetType(hdf_idt type_id) +{ + hdf_idt super; + hdf_type type; + hdf_size_type size; + + if(type_id < 0 ) + return HDF_NONE; + + if((super = H5Tget_super(type_id)) < 0 ) + return HDF_NONE; + + switch (H5Tget_class(super)) + { + case H5T_INTEGER : + size = H5Tget_size(super); + if(size == 1) + type = HDF_CHAR; + else if (size == 4) + type = HDF_INT32; + else + type = HDF_INT64; + break; + + case H5T_FLOAT : + type = HDF_FLOAT64; + break; + + case H5T_STRING : + type = HDF_STRING; + break; + + default : + type = HDF_NONE; + } + + H5Tclose(super); + return type; +} diff --git a/src/HDFPersist/HDFarrayGetTypeId.c b/src/HDFPersist/HDFarrayGetTypeId.c new file mode 100644 index 000000000..d6503adcf --- /dev/null +++ b/src/HDFPersist/HDFarrayGetTypeId.c @@ -0,0 +1,35 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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 +// + +/*---------------------------------------------------------------------------- + SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) + File : HDFarrayGetTypeId.c + Module : SALOME +----------------------------------------------------------------------------*/ + +#include "hdfi.h" +#include + +hdf_idt +HDFarrayGetTypeId(hdf_idt id) { + return H5Dget_type(id); +} diff --git a/src/HDFPersist/HDFarrayGetnDim.c b/src/HDFPersist/HDFarrayGetnDim.c new file mode 100644 index 000000000..19c582f3c --- /dev/null +++ b/src/HDFPersist/HDFarrayGetnDim.c @@ -0,0 +1,41 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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 +// + +/*---------------------------------------------------------------------------- + SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) + File : HDFarrayGetnDim.c + Module : SALOME +----------------------------------------------------------------------------*/ + +#include "hdfi.h" +#include + +int +HDFarrayGetnDim(hdf_idt id) +{ + int ndim; + + if ((ndim = H5Tget_array_ndims(id)) < 0) + return -1; + + return ndim; +} diff --git a/src/HDFPersist/HDFascii.cc b/src/HDFPersist/HDFascii.cc index 2498319d6..cc08ea933 100644 --- a/src/HDFPersist/HDFascii.cc +++ b/src/HDFPersist/HDFascii.cc @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_Tool.cxx // Created : Mon Oct 21 16:24:34 2002 // Author : Sergey RUIN @@ -37,15 +38,16 @@ #include #include #include +#define open _open +#define read _read +#define close _close #define dir_separator '\\' #else #define dir_separator '/' #endif -using namespace std; - -void Move(const string& fName, const string& fNameDst); -bool Exists(const string thePath); +void Move(const std::string& fName, const std::string& fNameDst); +bool Exists(const std::string thePath); bool CreateAttributeFromASCII(HDFinternalObject *father, FILE* fp); bool CreateDatasetFromASCII(HDFcontainerObject *father, FILE *fp); bool CreateGroupFromASCII(HDFcontainerObject *father, FILE *fp); @@ -54,12 +56,14 @@ void SaveAttributeInASCIIfile(HDFattribute *hdf_attribute, FILE* fp, int ident); void SaveGroupInASCIIfile(HDFgroup *hdf_group, FILE* fp, int ident); void SaveDatasetInASCIIfile(HDFdataset *hdf_dataset, FILE* fp, int ident); -string GetTmpDir(); +std::string GetTmpDir(); char* makeName(char* name); char* restoreName(char* name); void write_float64(FILE* fp, hdf_float64* value); void read_float64(FILE* fp, hdf_float64* value); +void WriteSimpleData( FILE* fp, HDFdataset *hdf_dataset, hdf_type type, long size ); + #define MAX_STRING_SIZE 65535 #define MAX_ID_SIZE 20 #define NB_FLOAT_IN_ROW 3 @@ -106,13 +110,13 @@ char* HDFascii::ConvertFromHDFToASCII(const char* thePath, bool isReplace, const char* theExtension) { - string aPath(thePath); + std::string aPath(thePath); if(!isReplace) { if(theExtension == NULL) aPath += ".asc"; else aPath += (char*)theExtension; } - string aFileName(aPath); + std::string aFileName(aPath); if(isReplace) aFileName=aPath+".ascii_tmp"; HDFfile *hdf_file = new HDFfile((char*)thePath); @@ -121,11 +125,11 @@ char* HDFascii::ConvertFromHDFToASCII(const char* thePath, char name[HDF_NAME_MAX_LEN+1]; int nbsons = hdf_file->nInternalObjects(), nbAttr = hdf_file->nAttributes(); - FILE* fp = fopen(aFileName.c_str(), "w"); + FILE* fp = fopen(aFileName.c_str(), "wb"); fprintf(fp, "%s\n", ASCIIHDF_ID); fprintf(fp, "%i\n", nbsons+nbAttr); - for(unsigned j=0; jGetAttributeName(j); HDFattribute *hdf_attribute = new HDFattribute(attr_name, hdf_file); delete attr_name; @@ -187,12 +191,12 @@ void SaveGroupInASCIIfile(HDFgroup *hdf_group, FILE* fp, int ident) char* name = makeName(hdf_group->GetName()); fprintf(fp, "%s %i\n", name, nbsons+nbAttr); - delete name; + delete [] name; - for(unsigned j=0; jGetAttributeName(j); HDFattribute *hdf_attribute = new HDFattribute(name, hdf_group); - delete name; + delete [] name; SaveAttributeInASCIIfile(hdf_attribute, fp, ident+1); hdf_attribute = 0; } @@ -230,7 +234,7 @@ void SaveDatasetInASCIIfile(HDFdataset *hdf_dataset, FILE* fp, int ident) { hdf_dataset->OpenOnDisk(); - long size = hdf_dataset->GetSize(); + long size = (long) hdf_dataset->GetSize(); long ndim = hdf_dataset->nDim(); //Get number of dimesions hdf_size *dim = new hdf_size[ndim]; hdf_type type = hdf_dataset->GetType(); @@ -241,7 +245,7 @@ void SaveDatasetInASCIIfile(HDFdataset *hdf_dataset, FILE* fp, int ident) fprintf(fp, "%s\n", DATASET_ID); fprintf(fp, "%s %i %i\n", name, type, nbAttr); - delete name; + delete [] name; hdf_dataset->GetDim(dim); fprintf(fp, " %i\n", ndim); @@ -251,61 +255,38 @@ void SaveDatasetInASCIIfile(HDFdataset *hdf_dataset, FILE* fp, int ident) } fprintf(fp, "\n"); - delete dim; + delete [] dim; fprintf(fp, "%li %i:", size, order); - - if (type == HDF_STRING) { - char* val = new char[size]; - hdf_dataset->ReadFromDisk(val); - fwrite(val, 1, size, fp); - delete val; - } else if (type == HDF_FLOAT64) { - hdf_float64* val = new hdf_float64[size]; - hdf_dataset->ReadFromDisk(val); - fprintf(fp, "\n"); - for (int i = 0, j = 0; i < size; i++) { - write_float64(fp, &val[i]); - if(++j == NB_FLOAT_IN_ROW) { - fprintf(fp, "\n"); - j = 0; - } - else fprintf(fp," "); - } - delete val; - } else if(type == HDF_INT64) { - hdf_int64* val = new hdf_int64[size]; - hdf_dataset->ReadFromDisk(val); - fprintf(fp, "\n"); - for (int i = 0, j = 0; i < size; i++) { - fprintf(fp, " %li", val[i]); - if(++j == NB_INTEGER_IN_ROW) { - fprintf(fp, "\n"); - j = 0; - } - } - delete val; - } else if(type == HDF_INT32) { - hdf_int32* val = new hdf_int32[size]; - hdf_dataset->ReadFromDisk(val); - fprintf(fp, "\n"); - for (int i = 0, j = 0; i < size; i++) { - fprintf(fp, " %i", val[i]); - if(++j == NB_INTEGER_IN_ROW) { - fprintf(fp, "\n"); - j = 0; - } + if( type == HDF_ARRAY ) { + HDFarray *array = new HDFarray(hdf_dataset); + hdf_type data_type = array->GetDataType(); + fprintf(fp, "\n" ); + fprintf(fp, " %i\n", data_type ); //Write array data type + + //Write nDim of the array + int arr_ndim = array->nDim(); + fprintf(fp, " %i\n", arr_ndim); + hdf_size *arr_dim = new hdf_size[arr_ndim]; + array->GetDim(arr_dim); + + for( int i = 0;i < arr_ndim; i++ ) { + fprintf(fp, " %i", arr_dim[i]); } - delete val; + + //And write the data array + WriteSimpleData( fp, hdf_dataset, data_type, size); + } else { + WriteSimpleData( fp, hdf_dataset, type, size); } fprintf(fp, "\n"); - for ( unsigned j=0; jGetAttributeName(j); HDFattribute *hdf_attribute = new HDFattribute(name, hdf_dataset); - delete name; + delete [] name; SaveAttributeInASCIIfile(hdf_attribute, fp, ident+1); hdf_attribute = 0; } @@ -332,7 +313,7 @@ void SaveAttributeInASCIIfile(HDFattribute *hdf_attribute, FILE* fp, int ident) fprintf(fp, "%s\n", ATTRIBUTE_ID); fprintf(fp, "%s %i %i\n", name, type, size); - delete name; + delete [] name; if (type == HDF_STRING) { char* val = new char[size+1]; @@ -340,7 +321,7 @@ void SaveAttributeInASCIIfile(HDFattribute *hdf_attribute, FILE* fp, int ident) fprintf(fp, ":"); fwrite(val, 1, size, fp); fprintf(fp, "\n"); - delete val; + delete [] val; } else if (type == HDF_FLOAT64) { hdf_float64 val; hdf_attribute->ReadFromDisk(&val); @@ -369,19 +350,27 @@ void SaveAttributeInASCIIfile(HDFattribute *hdf_attribute, FILE* fp, int ident) // Returns a name of directory where a created HDF file is placed // The created file is named "hdf_from_ascii.hdf" //============================================================================ -char* HDFascii::ConvertFromASCIIToHDF(const char* thePath) +char* HDFascii::ConvertFromASCIIToHDF(const char* thePath, + bool isReplace) { - // Get a temporary directory to store a file - string aTmpDir = GetTmpDir(), aFileName("hdf_from_ascii.hdf"); - // Build a full file name of temporary file - string aFullName = aTmpDir + aFileName; + std::string aTmpDir, aFullName; + if(!isReplace) { + // Get a temporary directory to store a file + aTmpDir = GetTmpDir(); + // Build a full file name of temporary file + aFullName = aTmpDir + "hdf_from_ascii.hdf"; + } + else { + aTmpDir = thePath; + aFullName = std::string(thePath)+".ascii_tmp"; + } + + FILE *fp = fopen(thePath, "rb"); + if(!fp) return NULL; HDFfile *hdf_file = new HDFfile((char*)aFullName.c_str()); hdf_file->CreateOnDisk(); - FILE *fp = fopen(thePath, "r"); - if(!fp) return NULL; - char type[9]; int nbsons, i; fscanf(fp, "%s", type); @@ -395,40 +384,49 @@ char* HDFascii::ConvertFromASCIIToHDF(const char* thePath) if(strcmp(id_of_begin, GROUP_ID) == 0) { if(!CreateGroupFromASCII(hdf_file, fp)) { - cout << "ConvertFromASCIIToHDF : Can not create group number " << i << endl; + std::cout << "ConvertFromASCIIToHDF : Can not create group number " << i << std::endl; return NULL; } } else if(strcmp(id_of_begin, DATASET_ID) == 0) { if(!CreateDatasetFromASCII(hdf_file, fp)) { - cout << "ConvertFromASCIIToHDF :Can not create dataset number " << i << endl; + std::cout << "ConvertFromASCIIToHDF :Can not create dataset number " << i << std::endl; return NULL; } } else if(strcmp(id_of_begin, ATTRIBUTE_ID) == 0) { if(!CreateAttributeFromASCII(hdf_file, fp)) { - cout << "ConvertFromASCIIToHDF :Can not create attribute number " << i << endl; + std::cout << "ConvertFromASCIIToHDF :Can not create attribute number " << i << std::endl; return NULL; } } else - cout << "ConvertFromASCIIToHDF : Unrecognized type " << id_of_begin << endl; + std::cout << "ConvertFromASCIIToHDF : Unrecognized type " << id_of_begin << std::endl; } char id_of_end[MAX_ID_SIZE]; fscanf(fp, "%s", id_of_end); if(strcmp(id_of_end, ASCIIHDF_ID_END) != 0) { - cout << "ConvertFromASCIIToHDF : Can not find the end ASCII token " << endl; + std::cout << "ConvertFromASCIIToHDF : Can not find the end ASCII token " << std::endl; return false; } hdf_file->CloseOnDisk(); delete hdf_file; + if(isReplace) { + if(Exists(aFullName)) + Move(aFullName, thePath); + else + return NULL; + } + int length = strlen(aTmpDir.c_str()); char *new_str = new char[ 1+length ]; strcpy(new_str , aTmpDir.c_str()) ; + fclose(fp); + return new_str; } @@ -447,7 +445,7 @@ bool CreateGroupFromASCII(HDFcontainerObject *father, FILE *fp) HDFgroup* hdf_group = new HDFgroup(new_name, father); - delete new_name; + delete [] new_name; hdf_group->CreateOnDisk(); @@ -457,24 +455,24 @@ bool CreateGroupFromASCII(HDFcontainerObject *father, FILE *fp) if(strcmp(id_of_begin, GROUP_ID) == 0) { if(!CreateGroupFromASCII(hdf_group, fp)) { - cout << "Can not create subgroup " << i << " for group " << name << endl; + std::cout << "Can not create subgroup " << i << " for group " << name << std::endl; return false; } } else if(strcmp(id_of_begin, DATASET_ID) == 0) { if(!CreateDatasetFromASCII(hdf_group, fp)) { - cout << "Can not create dataset " << i << " for group " << name << endl; + std::cout << "Can not create dataset " << i << " for group " << name << std::endl; return false; } } else if(strcmp(id_of_begin, ATTRIBUTE_ID) == 0) { if(!CreateAttributeFromASCII(hdf_group, fp)) { - cout << "Can not create attribute " << i << " for group " << name << endl; + std::cout << "Can not create attribute " << i << " for group " << name << std::endl; return false; } } else - cout << "CreateGroupFromASCII : Unrecognized type " << id_of_begin << endl; + std::cout << "CreateGroupFromASCII : Unrecognized type " << id_of_begin << std::endl; } hdf_group->CloseOnDisk(); @@ -483,7 +481,7 @@ bool CreateGroupFromASCII(HDFcontainerObject *father, FILE *fp) char id_of_end[MAX_ID_SIZE]; fscanf(fp, "%s\n", id_of_end); if(strcmp(id_of_end, GROUP_ID_END) != 0) { - cout << "CreateGroupFromASCII : Invalid end token : " << id_of_end << endl; + std::cout << "CreateGroupFromASCII : Invalid end token : " << id_of_end << std::endl; return false; } @@ -515,7 +513,7 @@ bool CreateDatasetFromASCII(HDFcontainerObject *father, FILE *fp) sizeArray[i] = dim; } - // order (2-d member) was not written in earlier versions + // order (2-d member) was not written in earlier versions char tmp; int nbRead = fscanf(fp, "%li %i%c", &size, &order, &tmp); if ( nbRead < 2 ) { // fscanf stops before ":" @@ -525,9 +523,36 @@ bool CreateDatasetFromASCII(HDFcontainerObject *father, FILE *fp) if ( type != HDF_FLOAT64 ) // use order only for FLOAT64 order = H5T_ORDER_NONE; - HDFdataset* hdf_dataset = new HDFdataset(new_name, father,type, sizeArray, nbDim, order); - delete new_name; - delete sizeArray; + + HDFarray* anArray = 0; + if( type == HDF_ARRAY ){ + //Get array information + hdf_type arr_data_type; + int arr_ndim; + fscanf(fp, "%c", &tmp); + fscanf(fp, " %i\n", &arr_data_type ); //Get array data type + fscanf(fp, " %i\n", &arr_ndim ); //Get array nDim + hdf_size *arr_dim = new hdf_size[arr_ndim]; + + int tdim = 0; + for( int i = 0;i < arr_ndim; i++ ) { + fscanf(fp, " %i", &tdim); + arr_dim[i] = tdim; + } + anArray = new HDFarray(0, arr_data_type, arr_ndim, arr_dim); + anArray->CreateOnDisk(); + + type = arr_data_type; + delete [] arr_dim; + } + + HDFdataset* hdf_dataset = new HDFdataset(new_name, father, anArray ? HDF_ARRAY : type, sizeArray, nbDim, order); + + if(anArray) + hdf_dataset->SetArrayId(anArray->GetId()); + + delete [] new_name; + delete [] sizeArray; hdf_dataset->CreateOnDisk(); @@ -535,28 +560,35 @@ bool CreateDatasetFromASCII(HDFcontainerObject *father, FILE *fp) char *val = new char[size+1]; fread(val, 1, size, fp); hdf_dataset->WriteOnDisk(val); - delete val; + delete [] val; } else if (type == HDF_FLOAT64) { hdf_float64* val = new hdf_float64[size]; for(i=0; iWriteOnDisk(val); - delete val; + delete [] val; } else if(type == HDF_INT64) { hdf_int64* val = new hdf_int64[size]; for(i=0; iWriteOnDisk(val); - delete val; + delete [] val; } else if(type == HDF_INT32) { hdf_int32* val = new hdf_int32[size]; for(i=0; iWriteOnDisk(val); - delete val; + delete [] val; + } else if(type == HDF_CHAR) { + hdf_char* val = new hdf_char[size]; + for(i=0; iWriteOnDisk(val); + delete [] val; } char token[MAX_ID_SIZE]; @@ -566,25 +598,30 @@ bool CreateDatasetFromASCII(HDFcontainerObject *father, FILE *fp) if(strcmp(token, ATTRIBUTE_ID) == 0) { if(!CreateAttributeFromASCII(hdf_dataset, fp)) { - cout << "Can not create attribute " << i << " for dataset " << name << endl; + std::cout << "Can not create attribute " << i << " for dataset " << name << std::endl; return false; } } else { - cout << "CreateGroupFromASCII : Unrecognized type " << token << endl; + std::cout << "CreateGroupFromASCII : Unrecognized type " << token << std::endl; return false; } } fscanf(fp, "%s\n", token); if(strcmp(token, DATASET_ID_END) != 0) { - cout << "CreateDatasetFromASCII : Invalid end token : " << token << endl; + std::cout << "CreateDatasetFromASCII : Invalid end token : " << token << std::endl; return false; } hdf_dataset->CloseOnDisk(); hdf_dataset = 0; //will be deleted by father destructor + if(anArray) { + anArray->CloseOnDisk(); + anArray = 0; //will be deleted by father destructor + } + return true; } @@ -605,7 +642,7 @@ bool CreateAttributeFromASCII(HDFinternalObject *father, FILE* fp) hdf_attribute->CreateOnDisk(); - delete new_name; + delete [] new_name; if (type == HDF_STRING) { char tmp; @@ -614,7 +651,7 @@ bool CreateAttributeFromASCII(HDFinternalObject *father, FILE* fp) val[size] = (char)0; fread(val, 1, size, fp); hdf_attribute->WriteOnDisk(val); - delete val; + delete [] val; } else if (type == HDF_FLOAT64) { hdf_float64 val; read_float64(fp, &val); @@ -636,7 +673,7 @@ bool CreateAttributeFromASCII(HDFinternalObject *father, FILE* fp) char id_of_end[MAX_ID_SIZE]; fscanf(fp, "%s\n", id_of_end); if(strcmp(id_of_end, ATTRIBUTE_ID_END) != 0) { - cout << "CreateAttributeFromASCII : Invalid end token : " << id_of_end << endl; + std::cout << "CreateAttributeFromASCII : Invalid end token : " << id_of_end << std::endl; return false; } @@ -648,28 +685,20 @@ bool CreateAttributeFromASCII(HDFinternalObject *father, FILE* fp) // function : GetTempDir // purpose : Return a temp directory to store created files like "/tmp/sub_dir/" //============================================================================ -string GetTmpDir() +std::string GetTmpDir() { - //Find a temporary directory to store a file - - string aTmpDir; - + std::string aTmpDir; char *Tmp_dir = getenv("SALOME_TMP_DIR"); if(Tmp_dir != NULL) { - aTmpDir = string(Tmp_dir); + aTmpDir = std::string(Tmp_dir); if(aTmpDir[aTmpDir.size()-1] != dir_separator) aTmpDir+=dir_separator; -/*#ifdef WIN32 - if(aTmpDir[aTmpDir.size()-1] != '\\') aTmpDir+='\\'; -#else - if(aTmpDir[aTmpDir.size()-1] != '/') aTmpDir+='/'; -#endif*/ } else { #ifdef WIN32 - aTmpDir = string("C:\\"); + aTmpDir = std::string("C:\\"); #else - aTmpDir = string("/tmp/"); + aTmpDir = std::string("/tmp/"); #endif } @@ -677,22 +706,15 @@ string GetTmpDir() int aRND = 999 + (int)(100000.0*rand()/(RAND_MAX+1.0)); //Get a random number to present a name of a sub directory char buffer[127]; sprintf(buffer, "%d", aRND); - string aSubDir(buffer); - if(aSubDir.size() <= 1) aSubDir = string("123409876"); + std:: string aSubDir(buffer); + if(aSubDir.size() <= 1) aSubDir = std::string("123409876"); aTmpDir += aSubDir; //Get RND sub directory if(aTmpDir[aTmpDir.size()-1] != dir_separator) aTmpDir+=dir_separator; -/* -#ifdef WIN32 - if(aTmpDir[aTmpDir.size()-1] != '\\') aTmpDir+='\\'; -#else - if(aTmpDir[aTmpDir.size()-1] != '/') aTmpDir+='/'; -#endif - */ - string aDir = aTmpDir; - + std::string aDir = aTmpDir; + for(aRND = 0; Exists(aDir); aRND++) { sprintf(buffer, "%d", aRND); aDir = aTmpDir+buffer; //Build a unique directory name @@ -711,7 +733,7 @@ string GetTmpDir() char* makeName(char* name) { - string aName(name), aNewName; + std::string aName(name), aNewName; int i, length = aName.size(); char replace = (char)19; @@ -728,7 +750,7 @@ char* makeName(char* name) char* restoreName(char* name) { - string aName(name), aNewName; + std::string aName(name), aNewName; int i, length = aName.size(); char replace = (char)19; @@ -762,13 +784,13 @@ void read_float64(FILE* fp, hdf_float64* value) } } -bool Exists(const string thePath) +bool Exists(const std::string thePath) { #ifdef WIN32 - if ( GetFileAttributes ( thePath.c_str() ) == 0xFFFFFFFF ) { - if ( GetLastError () != ERROR_FILE_NOT_FOUND ) { + if ( GetFileAttributes ( thePath.c_str() ) == 0xFFFFFFFF ) { + DWORD errorId = GetLastError (); + if ( errorId == ERROR_FILE_NOT_FOUND || errorId == ERROR_PATH_NOT_FOUND ) return false; - } } #else int status = access ( thePath.c_str() , F_OK ); @@ -777,7 +799,7 @@ bool Exists(const string thePath) return true; } -void Move(const string& fName, const string& fNameDst) +void Move(const std::string& fName, const std::string& fNameDst) { #ifdef WIN32 MoveFileEx (fName.c_str(), fNameDst.c_str(),MOVEFILE_REPLACE_EXISTING | MOVEFILE_COPY_ALLOWED); @@ -786,3 +808,60 @@ void Move(const string& fName, const string& fNameDst) #endif } +void WriteSimpleData( FILE* fp, HDFdataset *hdf_dataset, hdf_type type, long size ) { + if (type == HDF_STRING) { + char* val = new char[size]; + hdf_dataset->ReadFromDisk(val); + fwrite(val, 1, size, fp); + delete [] val; + } else if (type == HDF_FLOAT64) { + hdf_float64* val = new hdf_float64[size]; + hdf_dataset->ReadFromDisk(val); + fprintf(fp, "\n"); + for (int i = 0, j = 0; i < size; i++) { + write_float64(fp, &val[i]); + if(++j == NB_FLOAT_IN_ROW) { + fprintf(fp, "\n"); + j = 0; + } + else fprintf(fp," "); + } + delete [] val; + } else if(type == HDF_INT64) { + hdf_int64* val = new hdf_int64[size]; + hdf_dataset->ReadFromDisk(val); + fprintf(fp, "\n"); + for (int i = 0, j = 0; i < size; i++) { + fprintf(fp, " %li", val[i]); + if(++j == NB_INTEGER_IN_ROW) { + fprintf(fp, "\n"); + j = 0; + } + } + delete [] val; + } else if(type == HDF_INT32) { + hdf_int32* val = new hdf_int32[size]; + hdf_dataset->ReadFromDisk(val); + fprintf(fp, "\n"); + for (int i = 0, j = 0; i < size; i++) { + fprintf(fp, " %i", val[i]); + if(++j == NB_INTEGER_IN_ROW) { + fprintf(fp, "\n"); + j = 0; + } + } + delete [] val; + }else if(type == HDF_CHAR) { + hdf_char* val = new hdf_char[size]; + hdf_dataset->ReadFromDisk(val); + fprintf(fp, "\n"); + for (int i = 0, j = 0; i < size; i++) { + fprintf(fp, " %i", val[i]); + if(++j == NB_INTEGER_IN_ROW) { + fprintf(fp, "\n"); + j = 0; + } + } + delete [] val; + } +} diff --git a/src/HDFPersist/HDFascii.hxx b/src/HDFPersist/HDFascii.hxx index 8dc4d405a..44ae02952 100644 --- a/src/HDFPersist/HDFascii.hxx +++ b/src/HDFPersist/HDFascii.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : HDFascii.hxx // Created : Mon Jun 10 16:24:50 2003 // Author : Sergey RUIN @@ -36,10 +37,11 @@ class HDFPERSIST_EXPORT HDFascii public: static char* ConvertFromHDFToASCII(const char* thePath, - bool isReplaced = true, - const char* theExtension = NULL); - - static char* ConvertFromASCIIToHDF(const char* thePath); + bool isReplaced = true, + const char* theExtension = NULL); + + static char* ConvertFromASCIIToHDF(const char* thePath, + bool isReplaced = false); static bool isASCII(const char* thePath); }; diff --git a/src/HDFPersist/HDFattrClose.c b/src/HDFPersist/HDFattrClose.c index aab4ac3e0..c5a7ca17f 100644 --- a/src/HDFPersist/HDFattrClose.c +++ b/src/HDFPersist/HDFattrClose.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) diff --git a/src/HDFPersist/HDFattrCreate.c b/src/HDFPersist/HDFattrCreate.c index 51bdd16e1..93bb5f5c2 100644 --- a/src/HDFPersist/HDFattrCreate.c +++ b/src/HDFPersist/HDFattrCreate.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : HDFattrCreate.c diff --git a/src/HDFPersist/HDFattrGetSize.c b/src/HDFPersist/HDFattrGetSize.c index 82f49a34d..e27001d92 100644 --- a/src/HDFPersist/HDFattrGetSize.c +++ b/src/HDFPersist/HDFattrGetSize.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : HDFattrGetSize.c diff --git a/src/HDFPersist/HDFattrGetType.c b/src/HDFPersist/HDFattrGetType.c index 671558867..b5375e86e 100644 --- a/src/HDFPersist/HDFattrGetType.c +++ b/src/HDFPersist/HDFattrGetType.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : HDFattrGetType.c @@ -46,9 +47,9 @@ HDFattrGetType(hdf_idt id) case H5T_INTEGER : size = H5Tget_size(type_id); if (size == 4) - type = HDF_INT32; + type = HDF_INT32; else - type = HDF_INT64; + type = HDF_INT64; break; case H5T_FLOAT : diff --git a/src/HDFPersist/HDFattrOpen.c b/src/HDFPersist/HDFattrOpen.c index b5545f983..800992a11 100644 --- a/src/HDFPersist/HDFattrOpen.c +++ b/src/HDFPersist/HDFattrOpen.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- File : HDFattrOpen.c Module : SALOME diff --git a/src/HDFPersist/HDFattrRead.c b/src/HDFPersist/HDFattrRead.c index 8e43c46b7..5c6648a3e 100644 --- a/src/HDFPersist/HDFattrRead.c +++ b/src/HDFPersist/HDFattrRead.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : HDFattrRead.c diff --git a/src/HDFPersist/HDFattrWrite.c b/src/HDFPersist/HDFattrWrite.c index ebadb5a78..90ba842f1 100644 --- a/src/HDFPersist/HDFattrWrite.c +++ b/src/HDFPersist/HDFattrWrite.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : HDFattrWrite.c @@ -51,7 +52,7 @@ hdf_err HDFattrWrite(hdf_idt id, void *val) #if defined (PCLINUX) || defined (PCLINUX64) if((H5Tget_class(type_id) == H5T_INTEGER) && (H5Tget_size(type_id) == 4)) { isI32BE = 1; /* See HDFattrCreate */ - if (H5Tconvert(H5T_NATIVE_INT,H5T_STD_I32BE,1,(void *)val,NULL,(hid_t)NULL) < 0) + if (H5Tconvert(H5T_NATIVE_INT,H5T_STD_I32BE,1,(void *)val,NULL,(hid_t)0) < 0) return -1; } #endif @@ -60,7 +61,7 @@ hdf_err HDFattrWrite(hdf_idt id, void *val) #if defined (PCLINUX) || defined (PCLINUX64) - if (isI32BE && (H5Tconvert(H5T_STD_I32BE,H5T_NATIVE_INT,1,(void *)val,NULL,(hid_t)NULL) < 0)) + if (isI32BE && (H5Tconvert(H5T_STD_I32BE,H5T_NATIVE_INT,1,(void *)val,NULL,(hid_t)0) < 0)) return -1; #endif diff --git a/src/HDFPersist/HDFattribute.cc b/src/HDFPersist/HDFattribute.cc index 0126e8788..525426bdb 100644 --- a/src/HDFPersist/HDFattribute.cc +++ b/src/HDFPersist/HDFattribute.cc @@ -1,36 +1,33 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) // File : HDFattribute.cc // Module : SALOME // -extern "C" -{ #include "hdfi.h" -} #include "HDFexception.hxx" #include "HDFattribute.hxx" #include "HDFinternalObject.hxx" -using namespace std; HDFattribute::HDFattribute(char *name,HDFinternalObject *father,hdf_type type, size_t size) : HDFobject(name) diff --git a/src/HDFPersist/HDFattribute.hxx b/src/HDFPersist/HDFattribute.hxx index 9249de1b9..2b355c2b8 100644 --- a/src/HDFPersist/HDFattribute.hxx +++ b/src/HDFPersist/HDFattribute.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) // File : HDFattribute.hxx // Module : SALOME @@ -26,10 +27,7 @@ #ifndef HDFATTRIBUTE_HXX #define HDFATTRIBUTE_HXX -extern "C" -{ #include "HDFtypes.h" -} #include "HDFinternalObject.hxx" #include "HDFcontainerObject.hxx" diff --git a/src/HDFPersist/HDFcontainerObject.cc b/src/HDFPersist/HDFcontainerObject.cc index faf2c6191..e2c36bd7f 100644 --- a/src/HDFPersist/HDFcontainerObject.cc +++ b/src/HDFPersist/HDFcontainerObject.cc @@ -1,35 +1,32 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) // File : HDFcontainerObject.cc // Module : SALOME // -extern "C" -{ #include "hdfi.h" -} #include "HDFcontainerObject.hxx" #include "HDFexception.hxx" -using namespace std; HDFcontainerObject::HDFcontainerObject(const char *name) : HDFinternalObject(name) diff --git a/src/HDFPersist/HDFcontainerObject.hxx b/src/HDFPersist/HDFcontainerObject.hxx index 6f8a84923..6b80525be 100644 --- a/src/HDFPersist/HDFcontainerObject.hxx +++ b/src/HDFPersist/HDFcontainerObject.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) // File : HDFcontainerObject.hxx // Module : SALOME @@ -26,10 +27,7 @@ #ifndef HDFCONTAINEROBJECT_HXX #define HDFCONTAINEROBJECT_HXX -extern "C" -{ #include "HDFtypes.h" -} #include "HDFobject.hxx" #include "HDFinternalObject.hxx" #include "HDFexport.hxx" diff --git a/src/HDFPersist/HDFconvert.cc b/src/HDFPersist/HDFconvert.cc index 7fe03f887..8c35c5ff0 100644 --- a/src/HDFPersist/HDFconvert.cc +++ b/src/HDFPersist/HDFconvert.cc @@ -1,37 +1,39 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) // File : HDFconvert.cc // Module : SALOME // #include "HDFconvert.hxx" -using namespace std; #ifdef WIN32 #include #include +#define open _open +#define close _close #endif -int HDFConvert::FromAscii(const string& file, const HDFcontainerObject & hdf_container, const string& nomdataset) +int HDFConvert::FromAscii(const std::string& file, const HDFcontainerObject & hdf_container, const std::string& nomdataset) { HDFdataset * hdf_dataset; diff --git a/src/HDFPersist/HDFconvert.hxx b/src/HDFPersist/HDFconvert.hxx index fe8d6af64..1c63ad904 100644 --- a/src/HDFPersist/HDFconvert.hxx +++ b/src/HDFPersist/HDFconvert.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) // File : HDFconvert.hxx // Module : SALOME @@ -26,8 +27,6 @@ #ifndef HDFCONVERT_HXX #define HDFCONVERT_HXX -extern "C" -{ #include "HDFtypes.h" #ifndef WIN32 #include @@ -39,7 +38,6 @@ extern "C" #include #include #include -} #include "HDFexport.hxx" #include "HDFcontainerObject.hxx" #include "HDFdataset.hxx" diff --git a/src/HDFPersist/HDFdataset.cc b/src/HDFPersist/HDFdataset.cc index 627609a29..1d6a698ff 100644 --- a/src/HDFPersist/HDFdataset.cc +++ b/src/HDFPersist/HDFdataset.cc @@ -1,39 +1,36 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) // File : HDFdataset.cc // Module : SALOME // -extern "C" -{ #include "hdfi.h" #include -} #include "HDFdataset.hxx" #include "HDFcontainerObject.hxx" #include "HDFexception.hxx" #include -using namespace std; herr_t dataset_attr(hid_t loc_id, const char *attr_name, void *operator_data) { @@ -62,6 +59,7 @@ HDFdataset::HDFdataset(const char *name, HDFcontainerObject *father,hdf_type typ _dim[i] = dim[i]; _size = _size * _dim[i]; } + _arrayId = -1; } @@ -77,6 +75,7 @@ HDFdataset::HDFdataset(const char *name,HDFcontainerObject *father) _byte_order = H5T_ORDER_ERROR; _size = -1; _attribute = NULL; + _arrayId = -1; } HDFdataset::~HDFdataset() @@ -86,7 +85,7 @@ HDFdataset::~HDFdataset() void HDFdataset::CreateOnDisk() { - if ((_id = HDFdatasetCreate(_fid,_name,_type,_dim,_ndim,_byte_order)) < 0) + if ((_id = HDFdatasetCreate(_fid,_name,_type,_dim,_ndim,_byte_order,_arrayId)) < 0) throw HDFexception("Can't create dataset"); } @@ -166,7 +165,7 @@ void HDFdataset::GetDim(hdf_size dim[]) dim[i] = _dim[i]; } -int HDFdataset::GetSize() +hdf_size HDFdataset::GetSize() { int size_type; @@ -229,3 +228,6 @@ char* HDFdataset::GetAttributeName(unsigned idx) return _attribute; } +void HDFdataset::SetArrayId(hdf_idt arrayId) { + _arrayId = arrayId; +} diff --git a/src/HDFPersist/HDFdataset.hxx b/src/HDFPersist/HDFdataset.hxx index 53db3a70f..8cb21b4d5 100644 --- a/src/HDFPersist/HDFdataset.hxx +++ b/src/HDFPersist/HDFdataset.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) // File : HDFdataset.hxx // Module : SALOME @@ -26,10 +27,7 @@ #ifndef HDFDATASET_HXX #define HDFDATASET_HXX -extern "C" -{ #include "HDFtypes.h" -} #include "HDFinternalObject.hxx" #include "HDFcontainerObject.hxx" #include "HDFexport.hxx" @@ -42,13 +40,14 @@ private : hdf_type _type; hdf_size *_dim; hdf_byte_order _byte_order; - int _size; + hdf_size _size; int _ndim; char* _attribute; + hdf_idt _arrayId; public: HDFdataset(const char *name, HDFcontainerObject *father,hdf_type type, - hdf_size dim[],int dimsize, hdf_byte_order order = H5T_ORDER_NONE); + hdf_size dim[],int dimsize, hdf_byte_order order = H5T_ORDER_NONE); HDFdataset(const char *name,HDFcontainerObject *father); virtual ~HDFdataset(); @@ -64,10 +63,12 @@ public: hdf_type GetType(); int nDim(); void GetDim(hdf_size dim[]); - int GetSize(); + hdf_size GetSize(); hdf_object_type GetObjectType(); hdf_byte_order GetOrder(); + void SetArrayId(hdf_idt arrayId); + int nAttributes(); char* GetAttributeName(unsigned idx); }; diff --git a/src/HDFPersist/HDFdatasetClose.c b/src/HDFPersist/HDFdatasetClose.c index 2b6587afb..2bedf299d 100644 --- a/src/HDFPersist/HDFdatasetClose.c +++ b/src/HDFPersist/HDFdatasetClose.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : HDFdatasetClose.c diff --git a/src/HDFPersist/HDFdatasetCreate.c b/src/HDFPersist/HDFdatasetCreate.c index 12e8e79be..a71eed682 100644 --- a/src/HDFPersist/HDFdatasetCreate.c +++ b/src/HDFPersist/HDFdatasetCreate.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : HDFdatasetCreate.c @@ -42,7 +43,7 @@ SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) */ hdf_idt HDFdatasetCreate(hdf_idt pid,char *name,hdf_type type, - hdf_size *dimd, int ndim, hdf_byte_order order) + hdf_size *dimd, int ndim, hdf_byte_order order, hdf_idt arrayId) { hdf_idt dataset, dataspace = 0; hdf_err ret; @@ -72,11 +73,15 @@ hdf_idt HDFdatasetCreate(hdf_idt pid,char *name,hdf_type type, case HDF_STRING : if((new_type_hdf = H5Tcopy(H5T_C_S1)) < 0) - return -1; + return -1; if((ret = H5Tset_size(new_type_hdf,1)) < 0) - return -1; - break; + return -1; + break; + case HDF_ARRAY : + type_hdf = arrayId; + break; + default : return -1; } @@ -94,12 +99,12 @@ hdf_idt HDFdatasetCreate(hdf_idt pid,char *name,hdf_type type, if ((dataset = H5Dopen(pid,name)) < 0) { - if ((dataspace = H5Screate_simple(ndim, dimd, NULL)) < 0) - return -1; + if ((dataspace = H5Screate_simple(ndim, dimd, NULL)) < 0) + return -1; if ((dataset = H5Dcreate(pid,name, new_type_hdf < 0 ? type_hdf : new_type_hdf, dataspace, H5P_DEFAULT)) < 0) - return -1; + return -1; } else return -1; diff --git a/src/HDFPersist/HDFdatasetGetDim.c b/src/HDFPersist/HDFdatasetGetDim.c index b3a504585..cc808b89f 100644 --- a/src/HDFPersist/HDFdatasetGetDim.c +++ b/src/HDFPersist/HDFdatasetGetDim.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : HDFdatasetGetDim.c @@ -52,4 +53,4 @@ HDFdatasetGetDim(hdf_idt id,hdf_size dim[]) return ret; } - + diff --git a/src/HDFPersist/HDFdatasetGetOrder.c b/src/HDFPersist/HDFdatasetGetOrder.c index 01441ad19..7b4b1463b 100644 --- a/src/HDFPersist/HDFdatasetGetOrder.c +++ b/src/HDFPersist/HDFdatasetGetOrder.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : HDFdatasetGetOrder.c diff --git a/src/HDFPersist/HDFdatasetGetSize.c b/src/HDFPersist/HDFdatasetGetSize.c index 49e9b89e4..db2cc36ee 100644 --- a/src/HDFPersist/HDFdatasetGetSize.c +++ b/src/HDFPersist/HDFdatasetGetSize.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : HDFdatasetGetSize.c diff --git a/src/HDFPersist/HDFdatasetGetType.c b/src/HDFPersist/HDFdatasetGetType.c index 93e2570f1..bb7972a38 100644 --- a/src/HDFPersist/HDFdatasetGetType.c +++ b/src/HDFPersist/HDFdatasetGetType.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : HDFdatasetGetType.c @@ -43,9 +44,9 @@ HDFdatasetGetType(hdf_idt id) case H5T_INTEGER : size = H5Tget_size(type_id); if (size == 4) - type = HDF_INT32; + type = HDF_INT32; else - type = HDF_INT64; + type = HDF_INT64; break; case H5T_FLOAT : @@ -55,6 +56,10 @@ HDFdatasetGetType(hdf_idt id) case H5T_STRING : type = HDF_STRING; break; + + case H5T_ARRAY : + type = HDF_ARRAY; + break; default : type = HDF_NONE; diff --git a/src/HDFPersist/HDFdatasetGetnDim.c b/src/HDFPersist/HDFdatasetGetnDim.c index 8726c02fe..bfc78b3e4 100644 --- a/src/HDFPersist/HDFdatasetGetnDim.c +++ b/src/HDFPersist/HDFdatasetGetnDim.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : HDFdatasetGetnDim.c diff --git a/src/HDFPersist/HDFdatasetOpen.c b/src/HDFPersist/HDFdatasetOpen.c index f0502a8de..f2f29197c 100644 --- a/src/HDFPersist/HDFdatasetOpen.c +++ b/src/HDFPersist/HDFdatasetOpen.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : HDFdatasetOpen.c diff --git a/src/HDFPersist/HDFdatasetRead.c b/src/HDFPersist/HDFdatasetRead.c index 4d370347f..d4cbd7bf0 100644 --- a/src/HDFPersist/HDFdatasetRead.c +++ b/src/HDFPersist/HDFdatasetRead.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : HDFdatasetRead.c @@ -45,10 +46,10 @@ hdf_err HDFdatasetRead(hdf_idt id, void *val) if ((datatype = H5Dget_type(id)) < 0) return -1; -#if defined (PCLINUX) || defined (PCLINUX64) +//#if defined (PCLINUX) || defined (PCLINUX64) if ((H5Tget_class(datatype) == H5T_INTEGER) && (H5Tget_size(datatype) == 4)) datatype = H5T_NATIVE_INT; -#endif +//#endif if ((ret = H5Dread(id,datatype,H5S_ALL,H5S_ALL,H5P_DEFAULT, val)) < 0) return -1; diff --git a/src/HDFPersist/HDFdatasetWrite.c b/src/HDFPersist/HDFdatasetWrite.c index 1d7052b83..5a3e87185 100644 --- a/src/HDFPersist/HDFdatasetWrite.c +++ b/src/HDFPersist/HDFdatasetWrite.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : HDFdatasetWrite.c @@ -60,7 +61,7 @@ hdf_err HDFdatasetWrite(hdf_idt id, void *val) hdf_size *dim = (hdf_size *) malloc(sizeof(hdf_size)*ndim); if ((ret = HDFdatasetGetDim(id, dim)) < 0) return -1; - + for(i=0; i #else #include #define F_OK 0 +#define access _access #endif #include -} #include #include "HDFfile.hxx" #include "HDFexception.hxx" -using namespace std; herr_t file_attr(hid_t loc_id, const char *attr_name, void *operator_data) { diff --git a/src/HDFPersist/HDFfile.hxx b/src/HDFPersist/HDFfile.hxx index 2e0dbc71c..47eb83127 100644 --- a/src/HDFPersist/HDFfile.hxx +++ b/src/HDFPersist/HDFfile.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) // File : HDFfile.hxx // Module : SALOME @@ -26,10 +27,7 @@ #ifndef HDFFILE_HXX #define HDFFILE_HXX -extern "C" -{ #include "HDFtypes.h" -} #include "HDFcontainerObject.hxx" #include "HDFexport.hxx" diff --git a/src/HDFPersist/HDFfileClose.c b/src/HDFPersist/HDFfileClose.c index 1d7e84045..a92248f43 100644 --- a/src/HDFPersist/HDFfileClose.c +++ b/src/HDFPersist/HDFfileClose.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : HDFfileClose.c diff --git a/src/HDFPersist/HDFfileCreate.c b/src/HDFPersist/HDFfileCreate.c index 091cead26..a52104a44 100644 --- a/src/HDFPersist/HDFfileCreate.c +++ b/src/HDFPersist/HDFfileCreate.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : HDFfileCreate.c @@ -41,7 +42,7 @@ hdf_idt HDFfileCreate(char *name) hdf_idt fid; if ((fid = H5Fcreate(name,H5F_ACC_TRUNC, - H5P_DEFAULT,H5P_DEFAULT)) < 0) + H5P_DEFAULT,H5P_DEFAULT)) < 0) return -1; return fid; diff --git a/src/HDFPersist/HDFfileMount.c b/src/HDFPersist/HDFfileMount.c index 47f6d6710..dd973d764 100644 --- a/src/HDFPersist/HDFfileMount.c +++ b/src/HDFPersist/HDFfileMount.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : HDFfileMount.c diff --git a/src/HDFPersist/HDFfileOpen.c b/src/HDFPersist/HDFfileOpen.c index b2a90793c..87e87e07c 100644 --- a/src/HDFPersist/HDFfileOpen.c +++ b/src/HDFPersist/HDFfileOpen.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : HDFfileOpen.c diff --git a/src/HDFPersist/HDFfileUmount.c b/src/HDFPersist/HDFfileUmount.c index c79dd3853..2807321f2 100644 --- a/src/HDFPersist/HDFfileUmount.c +++ b/src/HDFPersist/HDFfileUmount.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : HDFfileUmount.c diff --git a/src/HDFPersist/HDFgroup.cc b/src/HDFPersist/HDFgroup.cc index 8081645c2..2a4e1c63e 100644 --- a/src/HDFPersist/HDFgroup.cc +++ b/src/HDFPersist/HDFgroup.cc @@ -1,36 +1,33 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) // File : HDFgroup.cc // Module : SALOME // -extern "C" -{ #include "hdfi.h" #include -} #include "HDFgroup.hxx" #include "HDFexception.hxx" -using namespace std; herr_t group_attr(hid_t loc_id, const char *attr_name, void *operator_data) { diff --git a/src/HDFPersist/HDFgroup.hxx b/src/HDFPersist/HDFgroup.hxx index 879c2f99b..49990aee0 100644 --- a/src/HDFPersist/HDFgroup.hxx +++ b/src/HDFPersist/HDFgroup.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) // File : HDFgroup.hxx // Module : SALOME @@ -26,10 +27,7 @@ #ifndef HDFGROUP_HXX #define HDFGROUP_HXX -extern "C" -{ #include "HDFtypes.h" -} #include "HDFcontainerObject.hxx" #include "HDFexport.hxx" diff --git a/src/HDFPersist/HDFgroupClose.c b/src/HDFPersist/HDFgroupClose.c index 72d3fdbac..b7efe89d8 100644 --- a/src/HDFPersist/HDFgroupClose.c +++ b/src/HDFPersist/HDFgroupClose.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : HDFgroupClose.c diff --git a/src/HDFPersist/HDFgroupCreate.c b/src/HDFPersist/HDFgroupCreate.c index cca9398a0..639ade2dd 100644 --- a/src/HDFPersist/HDFgroupCreate.c +++ b/src/HDFPersist/HDFgroupCreate.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : HDFgroupCreate.c diff --git a/src/HDFPersist/HDFgroupOpen.c b/src/HDFPersist/HDFgroupOpen.c index c90e60140..08cac19b3 100644 --- a/src/HDFPersist/HDFgroupOpen.c +++ b/src/HDFPersist/HDFgroupOpen.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : HDFgroupOpen.c diff --git a/src/HDFPersist/HDFinternalObject.cc b/src/HDFPersist/HDFinternalObject.cc index dcff96d5d..8f5e4c584 100644 --- a/src/HDFPersist/HDFinternalObject.cc +++ b/src/HDFPersist/HDFinternalObject.cc @@ -1,32 +1,30 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) // File : HDFinternalObject.cc // Module : SALOME // -extern "C" -{ #include "hdfi.h" -} #include "HDFinternalObject.hxx" HDFinternalObject::HDFinternalObject(const char *name) diff --git a/src/HDFPersist/HDFinternalObject.hxx b/src/HDFPersist/HDFinternalObject.hxx index c27945b24..28360b66f 100644 --- a/src/HDFPersist/HDFinternalObject.hxx +++ b/src/HDFPersist/HDFinternalObject.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) // File : HDFinternalObject.hxx // Module : SALOME @@ -26,10 +27,7 @@ #ifndef HDFINTERNALOBJECT_HXX #define HDFINTERNALOBJECT_HXX -extern "C" -{ #include "HDFtypes.h" -} #include "HDFobject.hxx" #include "HDFexport.hxx" diff --git a/src/HDFPersist/HDFnObjects.c b/src/HDFPersist/HDFnObjects.c index 5f79fc030..96e849d51 100644 --- a/src/HDFPersist/HDFnObjects.c +++ b/src/HDFPersist/HDFnObjects.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : HDFnObjects.c diff --git a/src/HDFPersist/HDFobject.cc b/src/HDFPersist/HDFobject.cc index 0686a6c73..a989beba2 100644 --- a/src/HDFPersist/HDFobject.cc +++ b/src/HDFPersist/HDFobject.cc @@ -1,37 +1,38 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) // File : HDFobject.cc // Module : SALOME // #include "HDFobject.hxx" -extern "C" -{ #include "hdfi.h" -} #include #include -using namespace std; + +#ifdef WNT +#define strdup _strdup +#endif HDFobject::HDFobject(const char *name) { diff --git a/src/HDFPersist/HDFobject.hxx b/src/HDFPersist/HDFobject.hxx index 9a40fe800..269373f13 100644 --- a/src/HDFPersist/HDFobject.hxx +++ b/src/HDFPersist/HDFobject.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) // File : HDFobject.hxx // Module : SALOME @@ -26,10 +27,7 @@ #ifndef HDFOBJECT_HXX #define HDFOBJECT_HXX -extern "C" -{ #include "HDFtypes.h" -} #include "HDFexport.hxx" class HDFPERSIST_EXPORT HDFobject { diff --git a/src/HDFPersist/HDFobjectIdentify.c b/src/HDFPersist/HDFobjectIdentify.c index 5ec213de8..8646fe2d8 100644 --- a/src/HDFPersist/HDFobjectIdentify.c +++ b/src/HDFPersist/HDFobjectIdentify.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : HDFobjectIdentify.c @@ -26,6 +27,7 @@ SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) ----------------------------------------------------------------------------*/ #include "hdfi.h" +#include /* * - Name: HDFobjectIdentify @@ -48,7 +50,7 @@ hdf_err HDFobjectIdentify(hdf_idt fid,const char *path,int i,char *name) int idx; if ((idx = H5Giterate(fid,path,&i,RankInfo, - name)) < 0) + name)) < 0) return -1; return 0; diff --git a/src/HDFPersist/HDFobjectType.c b/src/HDFPersist/HDFobjectType.c index 2cc439aad..6b58fb2d0 100644 --- a/src/HDFPersist/HDFobjectType.c +++ b/src/HDFPersist/HDFobjectType.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : HDFobjectType.c diff --git a/src/HDFPersist/HDFtypes.h b/src/HDFPersist/HDFtypes.h index f1252b1cc..6906908e7 100644 --- a/src/HDFPersist/HDFtypes.h +++ b/src/HDFPersist/HDFtypes.h @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : HDFtypes.h @@ -42,6 +43,7 @@ typedef herr_t hdf_err; typedef hbool_t hdf_bool; typedef H5T_order_t hdf_byte_order; +typedef char hdf_char; typedef int hdf_int32; typedef long hdf_int64; typedef double hdf_float64; @@ -50,15 +52,16 @@ typedef double hdf_float64; typedef enum {HDF_RDONLY,HDF_RDWR} hdf_access_mode; /* Values types for HDF datasets and attributes */ -typedef enum {HDF_NONE,HDF_STRING, HDF_INT32, HDF_INT64, HDF_FLOAT64} hdf_type; +typedef enum {HDF_NONE,HDF_STRING, HDF_INT32, HDF_INT64, HDF_FLOAT64, HDF_CHAR, HDF_ARRAY} hdf_type; /* - HDF_STRING : C string - HDF_INT32 : 32 bits integer - HDF_INT64 : 64 bits integer - HDF_FLOAT64 : IEEE 64 bits float + - HDF_ARRAY : Array */ /* HDF object types */ typedef enum {HDF_OBJECT,HDF_FILE,HDF_GROUP,HDF_DATASET, - HDF_ATTRIBUTE} hdf_object_type; + HDF_ATTRIBUTE, HDF_ARRAY_TYPE } hdf_object_type; #endif /* HDFTYPES_H */ diff --git a/src/HDFPersist/Makefile.am b/src/HDFPersist/Makefile.am index 0213e73e7..dd302fb1d 100644 --- a/src/HDFPersist/Makefile.am +++ b/src/HDFPersist/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) # File : Makefile.in # Author : Paul RASCLE, EDF @@ -37,6 +38,7 @@ salomeinclude_HEADERS = \ HDFgroup.hxx \ HDFinternalObject.hxx \ HDFobject.hxx \ + HDFarray.hxx \ HDFOI.hxx \ HDFtypes.h \ HDFconvert.hxx \ @@ -65,6 +67,12 @@ libSalomeHDFPersist_la_SOURCES =\ HDFdatasetGetType.c \ HDFdatasetGetnDim.c \ HDFdatasetGetOrder.c \ + HDFarrayGetType.c \ + HDFarrayGetTypeId.c \ + HDFarrayCreate.c \ + HDFarrayClose.c \ + HDFarrayGetnDim.c \ + HDFarrayGetDim.c \ HDFattrOpen.c \ HDFattrClose.c \ HDFattrWrite.c \ @@ -77,6 +85,7 @@ libSalomeHDFPersist_la_SOURCES =\ HDFobjectIdentify.c \ HDFobjectType.c \ HDFobject.cc \ + HDFarray.cc \ HDFinternalObject.cc \ HDFattribute.cc \ HDFcontainerObject.cc \ diff --git a/src/HDFPersist/hdfi.h b/src/HDFPersist/hdfi.h index e01def41a..704dccade 100644 --- a/src/HDFPersist/hdfi.h +++ b/src/HDFPersist/hdfi.h @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : hdfi.h @@ -32,6 +33,9 @@ /* HDF C INTERFACE */ +#ifdef __cplusplus +extern "C" { +#endif /* File Interface */ extern hdf_idt HDFfileCreate(char *name); @@ -66,8 +70,8 @@ extern hdf_err HDFdatasetClose(hdf_idt id); extern -hdf_idt HDFdatasetCreate(hdf_idt pid,char *name,hdf_type type, - hdf_size *dimd, int ndim, hdf_byte_order order); +hdf_idt HDFdatasetCreate(hdf_idt pid,char *name, hdf_type type, + hdf_size *dimd, int ndim, hdf_byte_order order, hdf_idt arrayId); extern hdf_err HDFdatasetWrite(hdf_idt id, void *val); @@ -78,6 +82,25 @@ hdf_err HDFdatasetRead(hdf_idt id, void *val); extern hdf_type HDFdatasetGetType(hdf_idt id); +extern +hdf_type HDFarrayGetType(hdf_idt id); + +extern +hdf_idt HDFarrayGetTypeId(hdf_idt type_id); + +extern +hdf_err HDFarrayClose(hdf_idt id); + +extern +int HDFarrayGetnDim(hdf_idt id); + +extern +hdf_err HDFarrayGetDim(hdf_idt id, hdf_size dim[]); + + +extern +hdf_idt HDFarrayCreate(hdf_type dataType,int ndim,hdf_size *dim); + extern int HDFdatasetGetnDim(hdf_idt id); @@ -125,5 +148,8 @@ hdf_err HDFobjectIdentify(hdf_idt fid,const char *path,int i,char *name); extern hdf_err HDFobjectType(hdf_idt id, char *name, hdf_object_type *type); +#ifdef __cplusplus +} +#endif #endif /* HDFI_H */ diff --git a/src/HDFPersist/test1.c b/src/HDFPersist/test1.c index 3825a8492..1ae3bc8e8 100644 --- a/src/HDFPersist/test1.c +++ b/src/HDFPersist/test1.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : test1.c diff --git a/src/HDFPersist/test2.c b/src/HDFPersist/test2.c index a68821346..409a6ddb1 100644 --- a/src/HDFPersist/test2.c +++ b/src/HDFPersist/test2.c @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) File : test2.c diff --git a/src/HDFPersist/test3.cxx b/src/HDFPersist/test3.cxx index b7d89b103..03331cd29 100644 --- a/src/HDFPersist/test3.cxx +++ b/src/HDFPersist/test3.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) // File : test3.cxx // Module : SALOME @@ -26,7 +27,6 @@ #include #include "HDFOI.hxx" #include -using namespace std; int main() @@ -122,52 +122,52 @@ int main() MESSAGE( ">> File Exploration " ); for (explorer->Init();explorer->More();explorer->Next()) - { - object = explorer->Value(); - MESSAGE( "--> Name of the object : " << object->GetName() ); - switch (object->GetObjectType()) - { - case HDF_FILE : - MESSAGE( "--> Type of the object : HDF_FILE : " ); - break; - - case HDF_GROUP : - MESSAGE( "--> Type of the object : HDF_GROUP : " ); - break; - - case HDF_DATASET : - MESSAGE( "--> Type of the object : HDF_DATASET : " ); - break; - - default : - MESSAGE( "--> PANIC !!! : " ); - } - } + { + object = explorer->Value(); + MESSAGE( "--> Name of the object : " << object->GetName() ); + switch (object->GetObjectType()) + { + case HDF_FILE : + MESSAGE( "--> Type of the object : HDF_FILE : " ); + break; + + case HDF_GROUP : + MESSAGE( "--> Type of the object : HDF_GROUP : " ); + break; + + case HDF_DATASET : + MESSAGE( "--> Type of the object : HDF_DATASET : " ); + break; + + default : + MESSAGE( "--> PANIC !!! : " ); + } + } MESSAGE( ">> Group exploration" ); explorer->Reset(hdf_group); for (explorer->Init();explorer->More();explorer->Next()) - { - object = explorer->Value(); - MESSAGE( "--> Name of the object : " << object->GetName() ); - switch (object->GetObjectType()) - { - case HDF_FILE : - MESSAGE( "--> Type of the object : HDF_FILE : " ); - break; - - case HDF_GROUP : - MESSAGE( "--> Type of the object : HDF_GROUP : " ); - break; - - case HDF_DATASET : - MESSAGE( "--> Type of the object : HDF_DATASET : " ); - break; - - default : - MESSAGE( "--> !!! PANIC !!! : " ); - } - } + { + object = explorer->Value(); + MESSAGE( "--> Name of the object : " << object->GetName() ); + switch (object->GetObjectType()) + { + case HDF_FILE : + MESSAGE( "--> Type of the object : HDF_FILE : " ); + break; + + case HDF_GROUP : + MESSAGE( "--> Type of the object : HDF_GROUP : " ); + break; + + case HDF_DATASET : + MESSAGE( "--> Type of the object : HDF_DATASET : " ); + break; + + default : + MESSAGE( "--> !!! PANIC !!! : " ); + } + } // memory clean MESSAGE( ">> MEMORY CLEAN " ); diff --git a/src/HDFPersist/test4.cxx b/src/HDFPersist/test4.cxx index 80d4072ec..b4c90f185 100644 --- a/src/HDFPersist/test4.cxx +++ b/src/HDFPersist/test4.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) // File : test4.cxx // Module : SALOME @@ -26,7 +27,6 @@ #include #include "HDFOI.hxx" #include -using namespace std; int main() @@ -54,30 +54,30 @@ int main() // It is possible to read the name of all (objects) sons in the file n = hdf_file->nInternalObjects(); for (i=0;iInternalObjectIndentify(i,name); - MESSAGE( "--> First Level Internal Object Name : " << name ); - } + { + hdf_file->InternalObjectIndentify(i,name); + MESSAGE( "--> First Level Internal Object Name : " << name ); + } // Or it is possible to ask if an object is in the file if (hdf_file->ExistInternalObject("MESH")) - MESSAGE( "--> The object naming 'MESH' is in the file " ); + MESSAGE( "--> The object naming 'MESH' is in the file " ); // it is possible to determine the type of an object type = hdf_file->InternalObjectType("MESH"); switch (type) - { - case HDF_GROUP : - MESSAGE( "--> Its type is HDF_GROUP" ); - break; - - case HDF_DATASET : - MESSAGE( "--> Its type is HDF_DATASET" ); - break; - - default : - MESSAGE( "--> !!!! PANIC !!!" ); - } + { + case HDF_GROUP : + MESSAGE( "--> Its type is HDF_GROUP" ); + break; + + case HDF_DATASET : + MESSAGE( "--> Its type is HDF_DATASET" ); + break; + + default : + MESSAGE( "--> !!!! PANIC !!!" ); + } hdf_group = new HDFgroup(name,hdf_file); MESSAGE( ">> A new HDF group object " << name << " is created in memory") @@ -89,24 +89,24 @@ int main() n = hdf_group->nInternalObjects(); MESSAGE( ">> There are " << n << " objects in this group " ); for (i=0;iInternalObjectIndentify(i,name); - type = hdf_group->InternalObjectType(name); - MESSAGE( "--> First Level Internal Object Name : " << name ); - switch (type) - { - case HDF_GROUP : - MESSAGE( "--> Its type is HDF_GROUP" ); - break; - - case HDF_DATASET : - MESSAGE( "--> Its type is HDF_DATASET" ); - break; - - default : - MESSAGE( "--> !!!! PANIC !!!" ); - } - } + { + hdf_group->InternalObjectIndentify(i,name); + type = hdf_group->InternalObjectType(name); + MESSAGE( "--> First Level Internal Object Name : " << name ); + switch (type) + { + case HDF_GROUP : + MESSAGE( "--> Its type is HDF_GROUP" ); + break; + + case HDF_DATASET : + MESSAGE( "--> Its type is HDF_DATASET" ); + break; + + default : + MESSAGE( "--> !!!! PANIC !!!" ); + } + } // The first dataset object 'COORDINATES' hdf_dataset1 = new HDFdataset("COORDINATES",hdf_group); @@ -117,19 +117,19 @@ int main() data_type = hdf_dataset1->GetType(); switch(data_type) - { - case HDF_INT32 : - MESSAGE( "--> Type of data : HDF_INT32 " ); - break; - case HDF_INT64 : - MESSAGE( "--> Type of data : HDF_INT64 " ); - break; - case HDF_FLOAT64 : - MESSAGE( "--> Type of data : HDF_FLOAT64 " ); - break; - default : - MESSAGE( "--> Type of data : HDF_STRING " ); - } + { + case HDF_INT32 : + MESSAGE( "--> Type of data : HDF_INT32 " ); + break; + case HDF_INT64 : + MESSAGE( "--> Type of data : HDF_INT64 " ); + break; + case HDF_FLOAT64 : + MESSAGE( "--> Type of data : HDF_FLOAT64 " ); + break; + default : + MESSAGE( "--> Type of data : HDF_STRING " ); + } ndim = hdf_dataset1->nDim(); MESSAGE( "--> Number of dimensions : " << ndim ); @@ -137,7 +137,7 @@ int main() dim = new hdf_size[ndim]; hdf_dataset1->GetDim(dim); for (i=0;i Dimension " << i+1 << " of size : " << dim[i] ); + MESSAGE( "--> Dimension " << i+1 << " of size : " << dim[i] ); delete dim; size = hdf_dataset1->GetSize(); @@ -145,7 +145,7 @@ int main() hdf_dataset1->ReadFromDisk(val1); MESSAGE( "--> The values are : "); for (i=0;iGetType(); switch(data_type) - { - case HDF_INT32 : - MESSAGE( "--> Type of data : HDF_INT32 " ); - break; - case HDF_INT64 : - MESSAGE( "--> Type of data : HDF_INT64 " ); - break; - case HDF_FLOAT64 : - MESSAGE( "--> Type of data : HDF_FLOAT64 " ); - break; - default : - MESSAGE( "--> Type of data : HDF_STRING " ); - } + { + case HDF_INT32 : + MESSAGE( "--> Type of data : HDF_INT32 " ); + break; + case HDF_INT64 : + MESSAGE( "--> Type of data : HDF_INT64 " ); + break; + case HDF_FLOAT64 : + MESSAGE( "--> Type of data : HDF_FLOAT64 " ); + break; + default : + MESSAGE( "--> Type of data : HDF_STRING " ); + } ndim = hdf_dataset2->nDim(); MESSAGE( "--> Number of dimensions : " << ndim ); @@ -181,7 +181,7 @@ int main() dim = new hdf_size[ndim]; hdf_dataset2->GetDim(dim); for (i=0;i Dimension " << i+1 << " of size : " << dim[i] ); + MESSAGE( "--> Dimension " << i+1 << " of size : " << dim[i] ); delete dim; size = hdf_dataset2->GetSize(); @@ -189,7 +189,7 @@ int main() hdf_dataset2->ReadFromDisk(val2); MESSAGE( "--> The values are : "); for (i=0;i #include "HDFOI.hxx" #include -using namespace std; int main() diff --git a/src/HDFPersist/test6.cxx b/src/HDFPersist/test6.cxx index dc80791c5..5ec952c52 100644 --- a/src/HDFPersist/test6.cxx +++ b/src/HDFPersist/test6.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) // File : test6.cxx // Module : SALOME @@ -26,7 +27,6 @@ #include #include "HDFOI.hxx" #include -using namespace std; int main() { @@ -60,10 +60,10 @@ int main() MESSAGE( "--> There are " << m << " objects in the group" ); for (i=0;iInternalObjectIndentify(i,name); - MESSAGE( "--> First Level Internal Object Name : " << name ); - } + { + geom->InternalObjectIndentify(i,name); + MESSAGE( "--> First Level Internal Object Name : " << name ); + } geom1 = new HDFgroup("GEOM_1",geom); MESSAGE( ">> The HDF group object is created for 'GEOM_1' with 'GEOM' as father" ); @@ -116,7 +116,7 @@ int main() MESSAGE( ">> The same operations have been done for the file 'mesh.hdf'" ) MESSAGE( " and the groups MESH_1 and MESH_2" ) MESSAGE( "--> This file has been mounted on the group 'MESH' of the file 'study.hdf' ") - + study->CloseOnDisk(); MESSAGE( ">> The study.hdf file is closed" ); diff --git a/src/HDFPersist/test7.cxx b/src/HDFPersist/test7.cxx index fd1f9f5c5..241a26e54 100644 --- a/src/HDFPersist/test7.cxx +++ b/src/HDFPersist/test7.cxx @@ -1,31 +1,32 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) // File : test7.cxx // Module : SALOME // #include "HDFIO.hxx" #include -using namespace std; + int main() { diff --git a/src/HDFPersist/test8.cxx b/src/HDFPersist/test8.cxx index 4eda080e1..16c5ea679 100644 --- a/src/HDFPersist/test8.cxx +++ b/src/HDFPersist/test8.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) // File : test8.cxx // Module : SALOME @@ -26,7 +27,6 @@ #include #include "HDFOI.hxx" #include -using namespace std; int main() diff --git a/src/HDFPersist/test9.cxx b/src/HDFPersist/test9.cxx index 8dd59436c..59199e37a 100644 --- a/src/HDFPersist/test9.cxx +++ b/src/HDFPersist/test9.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) // File : test9.cxx // Module : SALOME @@ -26,7 +27,6 @@ #include #include "HDFOI.hxx" #include -using namespace std; int main() diff --git a/src/KERNEL_PY/Help.py b/src/KERNEL_PY/Help.py index 9087a8191..7c11abb4d 100755 --- a/src/KERNEL_PY/Help.py +++ b/src/KERNEL_PY/Help.py @@ -1,24 +1,26 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : Help.py # Author : Paul RASCLE, EDF # Module : SALOME diff --git a/src/KERNEL_PY/Makefile.am b/src/KERNEL_PY/Makefile.am index 8ac181d98..b165045dd 100755 --- a/src/KERNEL_PY/Makefile.am +++ b/src/KERNEL_PY/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : Makefile.am # Author : Guillaume Boulant (CSSI) # Module : KERNEL @@ -27,21 +28,32 @@ include $(top_srcdir)/salome_adm/unix/make_common_starter.am # Scripts to be installed (salomepython is an automake keyword for python targets) salomepython_PYTHON = \ - Help.py \ - PyInterp.py \ - salome.py \ salome_shared_modules.py \ - batchmode_salome.py \ import_hook.py \ - salome_test.py \ - salome_kernel.py \ - salome_study.py \ - salome_iapp.py \ - salome_ComponentGUI.py \ - omnipatch.py \ - iparameters.py \ - salome_version.py \ - salome_notebook.py + omnipatch.py -sharedpkgpython_PYTHON = kernel_shared_modules.py +if CORBA_GEN + salomepython_PYTHON += \ + Help.py \ + PyInterp.py \ + batchmode_salome.py \ + salome_test.py \ + salome_kernel.py \ + salome_study.py \ + salome_iapp.py \ + salome_ComponentGUI.py \ + iparameters.py \ + salome_version.py \ + salome_notebook.py \ + salome_pynode.py \ + salome_genericobj.py +endif +# _GBO_SALOME_PYTHON_PACKAGING_ +# Note that the salome.py should not be installed any more +# Special extention to create a python packaging +SUBDIRS= kernel +salomepypkg_PYTHON= \ + __init__.py + +sharedpkgpython_PYTHON = kernel_shared_modules.py diff --git a/src/KERNEL_PY/PyInterp.py b/src/KERNEL_PY/PyInterp.py index 8b6bf075a..77fcafc3c 100755 --- a/src/KERNEL_PY/PyInterp.py +++ b/src/KERNEL_PY/PyInterp.py @@ -1,24 +1,26 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : PyInterp.py # Author : Paul RASCLE, EDF # Module : SALOME diff --git a/src/KERNEL_PY/__init__.py b/src/KERNEL_PY/__init__.py new file mode 100644 index 000000000..d3cc1bdd6 --- /dev/null +++ b/src/KERNEL_PY/__init__.py @@ -0,0 +1,243 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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 +# + +# File : salome.py renamed as __init__.py for python packaging (gboulant) +# Author : Paul RASCLE, EDF +# Module : SALOME +# +""" +Module salome gives access to Salome ressources. + +variables: + + - salome.orb : CORBA + - salome.naming_service : instance of naming Service class + - methods: + - Resolve(name) : find a CORBA object (ior) by its pathname + - Register(name) : register a CORBA object under a pathname + + - salome.lcc : instance of lifeCycleCORBA class + - methods: + - FindOrLoadComponent(server,name) : + obtain an Engine (CORBA object) + or launch the Engine if not found, + with a Server name and an Engine name + + - salome.sg : salome object to communicate with the graphical user interface (if any) + - methods: + - updateObjBrowser(bool): + - getActiveStudyId(): + - getActiveStudyName(): + + - SelectedCount(): returns number of selected objects + - getSelected(i): returns entry of selected object number i + - getAllSelected(): returns list of entry of selected objects + - AddIObject(Entry): select an existing Interactive object + - RemoveIObject(Entry): remove object from selection + - ClearIObjects(): clear selection + + - Display(*Entry): + - DisplayOnly(Entry): + - Erase(Entry): + - DisplayAll(): + - EraseAll(): + + - IDToObject(Entry): returns CORBA reference from entry + + - salome.myStudyName : active Study Name + - salome.myStudyId : active Study Id + - salome.myStudy : the active Study itself (CORBA ior) + - methods : defined in SALOMEDS.idl + +""" +## @package salome +# Module salome gives access to Salome ressources. +# +# \param salome.orb : CORBA orb object +# \param salome.naming_service : instance of naming Service class (SALOME_NamingServicePy::SALOME_NamingServicePy_i) +# \param salome.lcc : instance of lifeCycleCORBA class (SALOME_LifeCycleCORBA) +# \param salome.sg : Salome object to communicate with the graphical user interface, if running (see interface in salome_iapp::SalomeOutsideGUI) +# \param salome.myStudyName : active Study Name +# \param salome.myStudyId : active Study Id +# \param salome.myStudy : the active Study (interface SALOMEDS::Study) + +# +# ========================================================================== +# +# The function extend_path is used here to aggregate in a single +# virtual python package all the python sub-packages embedded in each +# SALOME modules (python "namespace" pattern). +# +ROOT_PYTHONPACKAGE_NAME="salome" +# +# This root package name is expected to be found as a directory in +# some paths of the sys.path variable, especially the paths +# /lib/pythonX.Y/site-packages/salome where are +# installed the python files. These paths are theorically appended by +# the SALOME main runner and should be in the sys.path at this point +# of the application. The extend_path is looking then for directories +# of the type: +# +# /lib/pythonX.Y/site-packages/salome/ +# +# And append them to the sys.path. These directories are supposed to +# be the pieces to be aggregated as a single virtual python package. +# +import os, sys +from salome_utils import verbose + +MATCH_ENDING_PATTERN="site-packages" + os.path.sep + "salome" + +def extend_path(pname): + for dir in sys.path: + if not isinstance(dir, basestring) or not os.path.isdir(dir) or not dir.endswith(MATCH_ENDING_PATTERN): + continue + subdir = os.path.join(dir, pname) + # XXX This may still add duplicate entries to path on + # case-insensitive filesystems + if os.path.isdir(subdir) and subdir not in __path__: + if verbose(): print "INFO - The directory %s is appended to sys.path" % subdir + __path__.append(subdir) + +extend_path(ROOT_PYTHONPACKAGE_NAME) +# ========================================================================== +# + +from salome_kernel import * +from salome_study import * +from salome_iapp import * +import salome_study + +# +# The next block is workaround for the problem of shared symbols loading for the extension modules (e.g. SWIG-generated) +# that causes RTTI unavailable in some cases. To solve this problem, sys.setdlopenflags() function is used. +# Depending on the Python version and platform, the dlopen flags can be defined in the dl, DLFUN or ctypes module. +# +import sys +flags = None +if not flags: + try: + # dl module can be unavailable + import dl + flags = dl.RTLD_NOW | dl.RTLD_GLOBAL + except: + pass + pass +if not flags: + try: + # DLFCN module can be unavailable + import DLFCN + flags = DLFCN.RTLD_NOW | DLFCN.RTLD_GLOBAL + except: + pass + pass +if not flags: + try: + # ctypes module can be unavailable + import ctypes + flags = ctypes.RTLD_GLOBAL + except: + pass + pass + +# Disable -> bug with scipy, seems very dangerous to do that +#if flags: +# sys.setdlopenflags(flags) +# pass + +orb, lcc, naming_service, cm,sg=None,None,None,None,None +myStudyManager, myStudyId, myStudy, myStudyName=None,None,None,None + +def setCurrentStudy(theStudy): + """ + Change current study : an existing one given by a study object. + + :param theStudy: the study CORBA object to set as current study + """ + global myStudyId, myStudy, myStudyName + myStudyId, myStudy, myStudyName =salome_study.setCurrentStudy(theStudy) + +def setCurrentStudyId(theStudyId=0): + """ + Change current study : an existing or new one given by Id. + + :param theStudyId: the study Id (optional argument) + 0 : create a new study (default). + n (>0) : try connection to study with Id = n, or create a new one + if study not found. + """ + global myStudyId, myStudy, myStudyName + myStudyId, myStudy, myStudyName =salome_study.setCurrentStudyId(theStudyId) + +salome_initial=1 +def salome_init(theStudyId=0,embedded=0): + """ + Performs only once SALOME general purpose intialisation for scripts. + optional argument : theStudyId + When in embedded interpreter inside IAPP, theStudyId is not used + When used without GUI (external interpreter) + 0 : create a new study (default). + n (>0) : try connection to study with Id = n, or create a new one + if study not found. + If study creation, its Id may be different from theStudyId ! + Provides: + orb reference to CORBA + lcc a LifeCycleCorba instance + naming_service a naming service instance + cm reference to the container manager + sg access to SALOME GUI (when linked with IAPP GUI) + myStudyManager the study manager + myStudyId active study identifier + myStudy active study itself (CORBA reference) + myStudyName active study name + """ + global salome_initial + global orb, lcc, naming_service, cm + global sg + global myStudyManager, myStudyId, myStudy, myStudyName + + try: + if salome_initial: + salome_initial=0 + sg = salome_iapp_init(embedded) + orb, lcc, naming_service, cm = salome_kernel_init() + myStudyManager, myStudyId, myStudy, myStudyName =salome_study_init(theStudyId) + pass + pass + except RuntimeError, inst: + # wait a little to avoid trace mix + import time + time.sleep(0.2) + x = inst + print "salome.salome_init():", x + print """ + ============================================ + May be there is no running SALOME session + salome.salome_init() is intented to be used + within an already running session + ============================================ + """ + raise + +#to expose all objects to pydoc +__all__=dir() diff --git a/src/KERNEL_PY/batchmode_salome.py b/src/KERNEL_PY/batchmode_salome.py index d4aeb6c43..669c172c8 100755 --- a/src/KERNEL_PY/batchmode_salome.py +++ b/src/KERNEL_PY/batchmode_salome.py @@ -1,24 +1,26 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : batchmode_salome.py # Module : SALOME #import salome_shared_modules @@ -51,8 +53,8 @@ def SalomeGUIgetAllSelected(self): #-------------------------------------------------------------------------- def generateName(prefix = None): - import whrandom; - int = whrandom.randint(1,1000); + import random; + int = random.randint(1,1000); if prefix is None: return "Study" + str(int) else : diff --git a/src/KERNEL_PY/import_hook.py b/src/KERNEL_PY/import_hook.py index e1a48d354..04daaf25b 100755 --- a/src/KERNEL_PY/import_hook.py +++ b/src/KERNEL_PY/import_hook.py @@ -1,24 +1,26 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + """ This module replaces the standard import mechanism with one that filters some imports that can't be done more than once. @@ -117,6 +119,7 @@ def import_module(partname, fqname, parent): """ Try to import module fqname It's parent is module parent and has name partname """ + #print "import_module",partname, fqname, parent try: m = sys.modules[fqname] except KeyError: @@ -127,6 +130,7 @@ def import_module(partname, fqname, parent): def ensure_fromlist(m, fromlist, recursive=0): """ Return the real modules list to be imported """ + #print "ensure_fromlist",m, fromlist, recursive l=[] for sub in fromlist: if sub == "*": @@ -137,26 +141,38 @@ def ensure_fromlist(m, fromlist, recursive=0): pass else: l.extend(ensure_fromlist(m, all, 1)) - elif hasattr(m,sub): - submod=getattr(m,sub) + else: + #try to find if sub is an attribute (eventually dotted) of m + components=sub.split('.') + has_submod=True + submod=m + for comp in components: + if hasattr(submod,comp): + submod=getattr(submod, comp) + else: + has_submod=False + break + + if has_submod: + #the attribute has been found if type(submod) == type(sys): l.append(("%s.%s" % (m.__name__, sub),submod)) - else: + else: subname="%s.%s" % (m.__name__, sub) submod = import_module(sub, subname, m) - if not submod: - raise ImportError, "No module named " + subname - l.append((subname,submod)) + #if not found ignore it + if submod: + l.append((subname,submod)) return l -def import_hook(name, globals=None, locals=None, fromlist=None): +def import_hook(name, globals=None, locals=None, fromlist=None, *args, **kwds): """ Import replacement for sharing modules among multiple interpreters Mostly update sys.modules before doing real import """ #print "import_hook",name,fromlist m=get_shared_imported(name,fromlist) - module= original_import(name, globals, locals, fromlist) + module= original_import(name, globals, locals, fromlist, *args, **kwds) if fromlist: #when fromlist is specified, module is the real module diff --git a/src/KERNEL_PY/iparameters.py b/src/KERNEL_PY/iparameters.py index e3d77df2b..ee643500f 100755 --- a/src/KERNEL_PY/iparameters.py +++ b/src/KERNEL_PY/iparameters.py @@ -1,24 +1,26 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + import salome import string import SALOME @@ -74,13 +76,18 @@ class IParameters: Note: Methods not mentioned above are private and is not supposed to be used - by module's developers. + by module's developers. """ - def __init__(self, attributeParameter): - """Initializes the instance""" + def __init__(self, attributeParameter, clr=False): + """Initializes the instance. If clr parameter is True, all IAPP attribute values are cleared.""" self._ap = attributeParameter + if ( clr ): self.clear() pass + + def clear(self): + """Clear parameters""" + self._ap.Clear() def append(self, listName, value): """Appends a value to the named list""" diff --git a/src/KERNEL_PY/kernel/Makefile.am b/src/KERNEL_PY/kernel/Makefile.am new file mode 100644 index 000000000..6164f2abb --- /dev/null +++ b/src/KERNEL_PY/kernel/Makefile.am @@ -0,0 +1,52 @@ +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 +# + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +mypkgpythondir =$(salomepypkgdir)/kernel + +# This first set of modules could be used in any context, you just +# have to get a python environement. +mypkgpython_PYTHON = \ + __init__.py \ + deprecation.py \ + logger.py \ + termcolor.py \ + unittester.py \ + pyunittester.py \ + enumerate.py \ + uiexception.py \ + datamodeler.py \ + testdata.py \ + diclookup.py \ + threadhelper.py \ + syshelper.py + +nodist_mypkgpython_PYTHON = \ + logconfig.py + +# This set of modules required a running SALOME application. +mypkgpython_PYTHON += \ + studyedit.py \ + services.py + +bin_SCRIPTS=\ + kernelpy_autotest.sh + +SUBDIRS = parametric diff --git a/src/KERNEL_PY/kernel/__init__.py b/src/KERNEL_PY/kernel/__init__.py new file mode 100644 index 000000000..40c941dd8 --- /dev/null +++ b/src/KERNEL_PY/kernel/__init__.py @@ -0,0 +1,89 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 +# + +__all__ = [ "deprecation", "logger", "termcolor", "logconfig" ] + +# WARN: This file SHOULD NOT import salome stuff so that modules of the +# package could be used outside of a SALOME session context when +# possible. For example logger.py, datamodeler.py, enumerate.py, +# diclookup.py, ... does not need a SALOME running application. + +# +# ============================================================================== +# Generic serialization functions for the module datamodeler +# ============================================================================== +# +import pickle + +def serialize(dataToSerialize): + """ + Creates a string description of the specified data. + .. attribute:: dataToSerialize + a data object to serialize + """ + serialstring = pickle.dumps(dataToSerialize) + return serialstring + +def unserialize(stringToUnserialize): + """ + Creates a data object from its string description. The string description + is supposed to be obtained by a call to serialize. + .. attribute:: stringToUnserialize + a string description of the object + """ + data = pickle.loads(stringToUnserialize) + return data + +class Callable: + """ + This class is used to create class-method (see MetaData) + """ + def __init__(self, anycallable): + self.__call__ = anycallable +# +# ============================================================================== +# Basic use cases and unit tests +# ============================================================================== +# + +def TEST_serialization(): + from testdata import TestData + ref_name = "my study case" + studyData = TestData() + studyData.setName(ref_name) + + print "serialize data ..." + serialString = serialize(studyData) + print "unserialize data ..." + unserialData = unserialize(serialString) + + res_name = unserialData.getName() + print res_name + if ( ref_name != res_name ): + return False + + unserialData.log() + unserialData.setName("an other name") + + return True + +if __name__ == "__main__": + import unittester + unittester.run("salome/kernel/__init__","TEST_serialization") diff --git a/src/KERNEL_PY/kernel/datamodeler.py b/src/KERNEL_PY/kernel/datamodeler.py new file mode 100644 index 000000000..5ab222aee --- /dev/null +++ b/src/KERNEL_PY/kernel/datamodeler.py @@ -0,0 +1,336 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2010-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 +# + +__author__="gboulant" +__date__ ="$15 avr. 2010 19:44:17$" + +from uiexception import DevelException + +# Most usable class types +TypeString= "".__class__ +__ref_integer = 0 +TypeInteger = __ref_integer.__class__ +__ref_double = 0.0 +TypeDouble = __ref_double.__class__ +__ref_list = [] +TypeList = __ref_list.__class__ +__ref_dict = {} +TypeDictionnary = __ref_dict.__class__ + +# There is no control to do for these attributes. They are attributes for the +# class management and not data of the model. +UNCHECKED_ATTRIBUTES = [ + "_typemap", + "_rangemap", + "_defaultmap", + "_voidmap" +] + +class DataModeler: + """ + This class is a placeholder for modeling data. An object based on this class + (particular instance or specialized derived class) can defined attributes with + the following properties: + + - a type : the class or the type of the attribute. Setting an attribute to + a value whose type is not the specified type raises an exception. + - a range : a list of the possible values for the attribute. Setting an + attribute to a value not in the range raises an exception + - a default: the default value of an attribute when an instance is created + - a void flag: the attribute can be authorized to be None or not using this + flag. Setting an attribute to a None value while the flag is not set to + True raises an exception. By default, a None value is not allowed. + + These properties are dictionnaries mapping the attribute name to its + associated value for the property. + + A typical usage is to derived this class in a specialized form where the + attributes names and there properties are defined in the constructor. See + use cases at the end of this file. + + """ + def __init__(self, typemap=None, rangemap=None, defaultmap=None, voidmap=None): + self._typemap = {} + self._rangemap = {} # possible values + self._defaultmap = {} # defaults values + self._voidmap = {} # None values are allowed + + if typemap is not None: + self._typemap.update(typemap) + if rangemap is not None: + self._rangemap.update(rangemap) + if voidmap is not None: + self._voidmap.update(voidmap) + + # Default initialization (if any) + if defaultmap is not None: + self._defaultmap.update(defaultmap) + for name in self._defaultmap.keys(): + self.__setattr__(name,self._defaultmap[name]) + + def addAttribute(self, name, type=None, range=None, default=None, void=None): + """ + A None argument means that no entry is created in the associated maps. + """ + self._typemap[name] = type + + if range is not None: + self._rangemap[name] = range + + if void is not None: + self._voidmap[name] = void + + if (not void) and (default is None): + return + + self.__setattr__(name,default) + + def __setattr__(self, name, val): + if name in UNCHECKED_ATTRIBUTES: + self.__dict__[name] = val + return + + #__GBO_DEBUG_ + if name == "_typemap": + print "WARNING WARNING WARNING : changing value of _typemap by ",val + + if name not in self._typemap.keys(): + raise DevelException("The class "+str(self.__class__)+" has no attribute "+str(name)) + + if val is None: + if not self.__isVoidAllowed(name): + raise DevelException("The attribute "+str(name)+" can't be None") + else: + # We can stop here and set the value to None + self.__dict__[name] = None + return + + if self.__isNotValidType(name,val): + raise DevelException("The attribute "+str(name)+" must be an instance of "+str(self._typemap[name])) + + if self.__isNotValidRange(name,val): + raise DevelException("The attribute "+str(name)+" must be a value in :"+str(self._rangemap[name])) + + self.__dict__[name] = val + + def __getattribute__(self, name): + if name in UNCHECKED_ATTRIBUTES: + return self.__dict__[name] + + if name not in self._typemap.keys(): + raise DevelException("The class "+str(self.__class__)+" has no attribute "+str(name)) + # The attribute coulb be requested while it has not been created yet (for + # example if we did't call the setter before). + if not self.__dict__.has_key(name): + return None + + return self.__dict__[name] + + def __isNotValidType(self, name, val): + isNotValid = ( + ( self._typemap[name] is not None) and + ( not isinstance(val,self._typemap[name]) ) ) + + return isNotValid + + def __isNotValidRange(self, name, val): + isNotValid = ( + ( self._rangemap is not None) and + ( self._rangemap.has_key(name) ) and + ( self._rangemap[name] is not None ) and + ( val not in self._rangemap[name] ) ) + + return isNotValid + + def __isVoidAllowed(self,name): + isVoidAllowed = ( + ( self._voidmap is not None) and + ( self._voidmap.has_key(name) ) and + ( self._voidmap[name] is True ) ) + + return isVoidAllowed + + def log(self): + print "DATAMODELER ["+str(self.__class__)+"]: self._typemap.keys() = "+str(self._typemap.keys()) + + + + +# +# ============================================================================== +# Basic use cases and unit tests +# ============================================================================== +# +def TEST_usecase(): + typemap={} + typemap["stringdata"] = TypeString + typemap["integerdata"] = TypeInteger + typemap["anydata"] = None # can be anything + + data = DataModeler(typemap) + + sdata = "toto" + idata = 3 + data.stringdata = sdata + data.integerdata = idata + + data.anydata = 5.3 + data.anydata = "any value" + data.anydata = True + + print data.integerdata + return True + +def TEST_addAttribute(): + typemap={} + typemap["stringdata"] = TypeString + typemap["integerdata"] = TypeInteger + data = DataModeler(typemap) + data.stringdata = "a string value" + + ref_value = 1.3 + data.addAttribute( + name = "myAttr", + type = TypeDouble, + range = None, + default = ref_value, + void = False) + + try: + if data.myAttr != ref_value: + return False + data.myAttr = 5.3 + #data.myAttr = 5 + except Exception, e: + print e + return False + + try: + data.myAttr = "bad type value" + return False + except Exception, e: + print e + return True + +def TEST_badAttributeName(): + map={} + map["stringdata"] = TypeString + map["integerdata"] = TypeInteger + + data = DataModeler(map) + + # this should raise an exception + try: + data.myatt = 3 + return False + except Exception, e: + print "OK : "+str(e) + return True + +def TEST_badAttributeType(): + map={} + map["stringdata"] = TypeString + map["integerdata"] = TypeInteger + + data = DataModeler(map) + # this should raise an exception + try: + data.stringdata = 2 + return False + except Exception, e: + print "OK : "+str(e) + return True + +def TEST_badAttributeRange(): + map={} + map["stringdata"] = TypeString + map["integerdata"] = TypeInteger + + range={} + ref_integervalue = 3 + range["integerdata"] = [1,ref_integervalue,7] + + data = DataModeler(map,range) + # this should not raise an exception + try: + data.integerdata = ref_integervalue + data.stringdata = "anything (no restriction has been defined)" + except Exception, e: + print e + return False + + # this should raise an exception + try: + data.integerdata = 9999 # a value not in the range + return False + except Exception, e: + print e + return True + +def TEST_voidAttributeAllowed(): + map={} + map["stringdata"] = TypeString + map["integerdata"] = TypeInteger + + voidmap={} + voidmap["stringdata"] = True + + data = DataModeler(typemap=map,voidmap=voidmap) + try: + # this should not raise an exception + data.stringdata = None + print data.stringdata + except Exception, e: + print e + return False + + try: + # this should raise an exception + data.integerdata = None + return False + except Exception, e: + print e + return True + +def TEST_defaultValues(): + typemap={} + typemap["stringdata"] = TypeString + typemap["integerdata"] = TypeInteger + + ref_value = "my initial value" + defaultmap={} + defaultmap["stringdata"] = ref_value + + data = DataModeler(typemap=typemap,defaultmap=defaultmap) + print data.stringdata + if data.stringdata != ref_value: + return False + else: + return True + +if __name__ == "__main__": + from unittester import run + run("salome/kernel/datamodeler","TEST_usecase") + run("salome/kernel/datamodeler","TEST_addAttribute") + run("salome/kernel/datamodeler","TEST_badAttributeName") + run("salome/kernel/datamodeler","TEST_badAttributeType") + run("salome/kernel/datamodeler","TEST_badAttributeRange") + run("salome/kernel/datamodeler","TEST_voidAttributeAllowed") + run("salome/kernel/datamodeler","TEST_defaultValues") diff --git a/src/KERNEL_PY/kernel/deprecation.py b/src/KERNEL_PY/kernel/deprecation.py new file mode 100644 index 000000000..5b9d4871e --- /dev/null +++ b/src/KERNEL_PY/kernel/deprecation.py @@ -0,0 +1,129 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 +# +""" +This module provides several functions to indicate the deprecation of a +module, a method or a function. + +Example:: + + from salome.kernel.deprecation import deprecated + + @deprecated("Deprecated since version 6.3.0. Consider replacement with " + "newFunction()") + def oldFunction(): + ... + +""" + +import sys +import warnings +import inspect +import os + +from salome.kernel import termcolor + +msg_seedoc = "See documentation for possible replacements." + +def __deprecated_with_msg(func, msg): + + def new_func(*args, **kwargs): + if len(inspect.stack()) > 1: + callingfunc = inspect.stack()[1][3] + else: + callingfunc = "CORBA middleware" + warnings.warn( + ("Call to deprecated function %(funcname)s of module " + + "%(modname)s (called from %(callingfunc)s).\n %(msg)s") % { + 'funcname': func.__name__, + 'modname': func.__module__, + 'callingfunc': callingfunc, + 'msg': msg, + }, + category = DeprecationWarning, + stacklevel = 2 + ) + return func(*args, **kwargs) + return new_func + +def deprecated(msg = msg_seedoc): + """ + This is a decorator which can be used to mark functions + as deprecated. It will result in a warning being emitted + when the function is used. The message in parameter will + be displayed and should indicate how this function can be + replaced. If the terminal can display colors, the warning + messages will appear in blue. + """ + def make_dep(f): + if is_called_by_sphinx(): + return f + else: + g = __deprecated_with_msg(f, msg) + g.__name__ = f.__name__ + g.__doc__ = f.__doc__ + g.__dict__.update(f.__dict__) + return g + return make_dep + +def deprecated_module(msg = msg_seedoc): + """ + This function can be used to mark a module as deprecated. + It must be called explicitly at the beginning of the deprecated + module. It will result in a warning being emitted. The message + in parameter will be displayed and should indicate how this + module can be replaced. If the terminal can display colors, + the warning messages will appear in blue. + """ + if not is_called_by_sphinx(): + warnings.warn( + "Importation of deprecated module %(modname)s.\n %(msg)s" % { + 'modname': inspect.getmodulename(inspect.stack()[1][1]), + 'msg': msg, + }, + category = DeprecationWarning, + stacklevel = 5 + ) + +def is_called_by_sphinx(): + """ + Determine if the calling code is ultimately called by sphinx to generate + documentation. The result can be used to conditionally inhibit the + decorators or some Salome-related imports that fail when called outside + Salome. + """ + calling_file = inspect.stack()[len(inspect.stack())-1][1] + basename = os.path.basename(calling_file) + return (basename == "sphinx-build") + + +def __show_colored_warning(message, category, filename, + lineno, file = sys.stderr, line = None): + str = warnings.formatwarning(message, category, filename, lineno, line) + if category == DeprecationWarning and termcolor.canDisplayColor(file): + file.write(termcolor.makeColoredMessage(str, termcolor.BLUE)) + else: + file.write(str) + +# Enable warnings for deprecated functions and modules (in Python 2.7, they +# are disabled by default) +warnings.filterwarnings("always", "Call to *", DeprecationWarning) +warnings.filterwarnings("always", "Importation of *", DeprecationWarning) +warnings.showwarning = __show_colored_warning diff --git a/src/KERNEL_PY/kernel/diclookup.py b/src/KERNEL_PY/kernel/diclookup.py new file mode 100644 index 000000000..6716f608c --- /dev/null +++ b/src/KERNEL_PY/kernel/diclookup.py @@ -0,0 +1,119 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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 +# + +__author__="gboulant" +__date__ ="$21 mai 2010 18:00:23$" + + +# search a dictionary for key or value +# using named functions or a class +# tested with Python25 by Ene Uran 01/19/2008 + +def find_key(dic, val): + """return the key of dictionary dic given the value""" + return [k for k, v in dic.iteritems() if v == val][0] + +def find_value(dic, key): + """return the value of dictionary dic given the key""" + return dic[key] + +class Lookup(dict): + """ + a dictionary which can lookup value by key, or keys by value + """ + def __init__(self, items=[]): + """items can be a list of pair_lists or a dictionary""" + dict.__init__(self, items) + + def get_keys(self, value): + """find the key(s) as a list given a value""" + return [item[0] for item in self.items() if item[1] == value] + + def get_key(self, value): + """ + find the key associated to the given a value. If several keys exist, + only the first is given. To get the whole list, use get_keys instead. + """ + list = self.get_keys(value) + if len(list) == 0: + return None + return list[0] + + def get_value(self, key): + """find the value given a key""" + return self[key] + +# +# ============================================================================== +# Use cases and unit tests +# ============================================================================== +# +def TEST_getTestDictionnary(): + # dictionary of chemical symbols + symbol_dic = { + 'C': 'carbon', + 'H': 'hydrogen', + 'N': 'nitrogen', + 'Li': 'lithium', + 'Be': 'beryllium', + 'B': 'boron' + } + return symbol_dic + +def TEST_find_value(): + symbol_dic = TEST_getTestDictionnary() + print find_key(symbol_dic, 'boron') # B + print find_value(symbol_dic, 'B') # boron + print find_value(symbol_dic, 'H') # hydrogen + if find_key(symbol_dic, 'nitrogen') != 'N': + return False + return True + +def TEST_lookup(): + symbol_dic = TEST_getTestDictionnary() + + name = 'lithium' + symbol = 'Li' + # use a dictionary as initialization argument + look = Lookup(symbol_dic) + print look.get_key(name) # [Li'] + if look.get_key(name) != symbol: + print "get "+str(look.get_key(name))+" while "+str(symbol)+" was expected" + return False + print look.get_value(symbol) # lithium + + # use a list of pairs instead of a dictionary as initialization argument + # (will be converted to a dictionary by the class internally) + age_list = [['Fred', 23], ['Larry', 28], ['Ene', 23]] + look2 = Lookup(age_list) + print look2.get_keys(23) # ['Ene', 'Fred'] + if look2.get_keys(23)[0] != 'Ene' or look2.get_keys(23)[1] != 'Fred': + print "get "+str(look2.get_keys(23))+" while ['Ene', 'Fred'] was expected" + return False + print look2.get_value('Fred') # 23 + return True + +if __name__ == '__main__': + import unittester + unittester.run("diclookup", "TEST_find_value") + unittester.run("diclookup", "TEST_lookup") diff --git a/src/KERNEL_PY/kernel/enumerate.py b/src/KERNEL_PY/kernel/enumerate.py new file mode 100644 index 000000000..dc445740a --- /dev/null +++ b/src/KERNEL_PY/kernel/enumerate.py @@ -0,0 +1,212 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2010-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 +# + +__author__ = "gboulant" +__date__ = "$1 avr. 2010 09:08:02$" + +class Enumerate(object): + """ + This class emulates a C-like enum for python. It is initialized with a list + of strings to be used as the enum symbolic keys. The enum values are automatically + generated as sequencing integer starting at the specified offset value. + """ + def __init__(self, keys, offset=0): + """ + Canonical constructor + @keys a list of string to be used as the enum symbolic keys. The enum values + are automatically generated as a sequence of integers starting at the specified + offset value. + """ + self._dict_keynumbers = {} + for number, key in enumerate(keys): + value = offset + number + setattr(self, key, value) + self._dict_keynumbers[key] = value + + def contains(self, key): + """ + Return true if this enumerate contains the specified key string + @key a key string to test + """ + return (key in self._dict_keynumbers.keys()) + + def isValid(self, value): + """ + Returns true if the specified integer value is defined as an identifier + in this enumarate. + @value a value to test + """ + return (value in self._dict_keynumbers.values()) + + def listkeys(self): + """ + Returns the list of keys in this enumerate. + """ + list = self._dict_keynumbers.keys() + list.sort() + return list + + def listvalues(self): + """ + Returns the list of values specified to initiate this enumerate. + """ + list = self._dict_keynumbers.values() + list.sort() + return list + + def keyOf(self, value): + """ + Returns the symbolic key string associated to the specified identifier + value. + @param value : an integer value whose associated key string is requested. + """ + if not self.isValid(value): + return None + # _MEM_ We assume here that the keys and associated values are in the + # same order in their list. + return self._dict_keynumbers.keys()[self._dict_keynumbers.values().index(value)] + + # If not, weshould use a longer implementation such that: + #for key in self._dict_keynumbers.keys(): + # if self._dict_keynumbers[key] == value: + # return key + +# +# ============================================================================== +# Basic use cases and unit test functions +# ============================================================================== +# + +def TEST_simple(): + TYPES_LIST = Enumerate([ + 'SEP', + 'OTHER' + ]) + print TYPES_LIST.listvalues() + return True + +def TEST_createFromList(): + codes = Enumerate([ + 'KERNEL', # This should take the value 0 + 'GUI', # This should take the value 1 + 'GEOM', # ... + 'MED', + 'SMESH']) + + print codes.KERNEL + print codes.GEOM + if (codes.KERNEL == 0 and codes.GEOM == 2): + return True + else: + return False + +def TEST_createFromString(): + aList = "KERNEL GUI GEOM MED" + + codes = Enumerate(aList.split()) + + print codes.KERNEL + print codes.GEOM + if (codes.KERNEL == 0 and codes.GEOM == 2): + return True + else: + return False + +def TEST_contains(): + codes = Enumerate([ + 'KERNEL', # This should take the value 0 + 'GUI', # This should take the value 1 + 'GEOM', # ... + 'MED', + 'SMESH']) + + print "VISU in enumerate?", codes.contains("VISU") + if (not codes.contains("VISU")): + return True + else: + return False + +def TEST_isValid(): + codes = Enumerate([ + 'KERNEL', # This should take the value 0 + 'GUI', # This should take the value 1 + 'GEOM', # ... + 'MED', + 'SMESH']) + + if (not codes.isValid(23)): + return True + else: + return False + +def TEST_offset(): + codes = Enumerate([ + 'KERNEL', # This should take the value 0 + 'GUI', # This should take the value 1 + 'GEOM', # ... + 'MED', + 'SMESH'], offset=20) + + print codes.KERNEL + print codes.GEOM + if (codes.KERNEL == 20 and codes.GEOM == 22): + return True + else: + return False + +def TEST_listvalues(): + codes = Enumerate([ + 'KERNEL', # This should take the value 0 + 'GUI', # This should take the value 1 + 'GEOM', # ... + 'MED', + 'SMESH'], offset=20) + + print codes.listvalues() + if codes.listvalues() != [20, 21, 22, 23, 24]: + return False + return True + +def TEST_keyOf(): + codes = Enumerate([ + 'KERNEL', # This should take the value 0 + 'GUI', # This should take the value 1 + 'GEOM', # ... + 'MED', + 'SMESH']) + + if ( codes.keyOf(codes.KERNEL) != 'KERNEL' or + codes.keyOf(codes.GUI) != 'GUI' or + codes.keyOf(codes.GEOM) != 'GEOM' or + codes.keyOf(codes.MED) != 'MED' or + codes.keyOf(codes.SMESH) != 'SMESH'): + return False + return True + +if __name__ == "__main__": + import unittester + unittester.run("enumerate", "TEST_simple") + unittester.run("enumerate", "TEST_createFromList") + unittester.run("enumerate", "TEST_createFromString") + unittester.run("enumerate", "TEST_contains") + unittester.run("enumerate", "TEST_isValid") + unittester.run("enumerate", "TEST_offset") + unittester.run("enumerate", "TEST_listvalues") + unittester.run("enumerate", "TEST_keyOf") diff --git a/src/KERNEL_PY/kernel/kernelpy_autotest.sh.in b/src/KERNEL_PY/kernel/kernelpy_autotest.sh.in new file mode 100644 index 000000000..779ba332c --- /dev/null +++ b/src/KERNEL_PY/kernel/kernelpy_autotest.sh.in @@ -0,0 +1,76 @@ +#!/bin/sh +# Copyright (C) 2010-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 +# +# Author : Guillaume Boulant (EDF) +# + +# +# This script runs the unit tests embedded in each of the python +# modules of the package salome.kernel. +# +# This script should be executed in a SALOME shell session, +# for example the shell obtained from the command runSession +# provided by the SALOME application. +# + +# This first list does not need a SALOME application. Only the +# environnement is required (for example, run these script in a +# session obtained with runSession +listfiles="\ + unittester.py \ + enumerate.py \ + uiexception.py \ + datamodeler.py \ + testdata.py \ + diclookup.py \ + syshelper.py \ + pyunittester.py \ + __init__.py" + +# This files should be add to the list +#listfiles=$listfiles"\ +# deprecation.py \ +# logger.py \ +# termcolor.py \ +# logconfig.py" + +# This list REQUIRES a running SALOME application +listfiles=$listfiles"\ + services.py \ + studyedit.py" + +# This files are not used yet (but we test them) +#listfiles=$listfiles"\ +# salome/kernel/threadhelper.py" + +MODULE_ROOT_DIR=@prefix@ +MODULE_PYTHON_DIR=$MODULE_ROOT_DIR/lib/python@PYTHON_VERSION@/site-packages/salome +PYTHONPATH=$MODULE_PYTHON_DIR:$PYTHONPATH +export PYTHONPATH + +here=$(pwd) +package_path="salome/kernel" +cd $MODULE_PYTHON_DIR +for file in $listfiles; do + # Uncomment this line (and comment the next one) to display + # the start line of a test and not only the result: + #python $package_path/$file | grep '^\[TEST' + python $package_path/$file | grep '^\[TEST' | grep -v 'test in progress' +done +cd $here diff --git a/src/KERNEL_PY/kernel/logconfig.py.in b/src/KERNEL_PY/kernel/logconfig.py.in new file mode 100755 index 000000000..d2bad878e --- /dev/null +++ b/src/KERNEL_PY/kernel/logconfig.py.in @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 +# +""" +This module defines a variable to indicate which traces should be logged. +""" + +import logging + +loggingLevel = logging.@PYLOGLEVEL@ diff --git a/src/KERNEL_PY/kernel/logger.py b/src/KERNEL_PY/kernel/logger.py new file mode 100644 index 000000000..5f45bb9bf --- /dev/null +++ b/src/KERNEL_PY/kernel/logger.py @@ -0,0 +1,230 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 +# + +#============================================================================= +# Author : Guillaume Boulant (CSSI) +# Rewritten by Renaud Barate (EDF R&D) +# Project : SALOME +# Copyright : EDF 2001-2009 +# $Header$ +#============================================================================= +""" +This module defines a class which provides logging facility in Salome: +""" + +import sys, os +import logging + +from salome.kernel.deprecation import deprecated +from salome.kernel import termcolor +import salome.kernel.logconfig + +class Logger(logging.Logger): + """ + This class formats and displays log messages in Salome environment. It + inherits :class:`Logger` class defined in :mod:`logging` + module from Python library, so all methods from :class:`logging.Logger` + can be used here. The format of the traces is: + + LEVEL [keyword] : Message + + where `LEVEL` is the level of the message (`DEBUG`, `INFO`, etc.), + `keyword` is the name of the logger, and `Message` is the message to log. + + When creating a new Logger object, the parameter `keyword` defines the + name of the logger, `level` defines the logging level (default is + :const:`logging.DEBUG` if KERNEL module is configured with --enable-debug + option or :const:`logging.WARNING` otherwise), and `color` defines the color + of the log messages for this logger (log messages will appear in color + only when displayed on color-capable ASCII terminals). See module + :mod:`salome.kernel.termcolor` for the color constants. + + By default, log messages will be displayed only on standard output. They + can also be recorded in a file (see method :meth:`setLogFile`). For now, + the CORBA-based logging facility can not be used through this class. + + A source filename `sourceFileName` can be defined. If this argument is + specified, then the `keyword` is modified to the basename of the `sourceFileName` + + Basic usage:: + + from salome.kernel.logger import Logger + log = Logger("Test") + log.debug("Debug message") + log.info("Information message") + log.warning("Warning message") + log.error("Error message") + log.critical("Fatal error message") + + """ + + def __init__(self, keyword = "KEY", level = salome.kernel.logconfig.loggingLevel, + color = None, sourceFileName=None): + + if sourceFileName is not None: + keyword = os.path.basename(sourceFileName).split('.')[0] + logging.Logger.__init__(self, keyword, level) + self._baseFormatString = "%(levelname)-8s [%(name)s] : %(message)s" + self._baseFormatter = logging.Formatter(self._baseFormatString) + if hasattr(sys.stdout, "flush"): + self._stdoutStream = sys.stdout + else: + self._stdoutStream = _UnFlushableLogStream(sys.stdout) + self._stdoutHandler = logging.StreamHandler(self._stdoutStream) + self._stdoutHandler.setLevel(logging.DEBUG) + self.setColor(color) + self.addHandler(self._stdoutHandler) + self._fileHandler = None + + def showDebug(self): + """ + Log all messages, including DEBUG level messages (equivalent to + ``setLevel(logging.DEBUG)``). + """ + self.setLevel(logging.DEBUG) + + def setLogFile(self, logFilename): + """ + Define a log file to record the log messages (in addition to the + standard output). + """ + self.closeLogFile() + self._fileHandler = logging.FileHandler(logFilename, 'w') + self._fileHandler.setLevel(logging.DEBUG) + self._fileHandler.setFormatter(self._baseFormatter) + self.addHandler(self._fileHandler) + + def setColor(self, color): + """ + Set the color of log messages on color-capable terminals. If `color` + is :const:`None`, the default color will be used. + """ + if color is None or not termcolor.canDisplayColor(self._stdoutStream): + stdoutFormatter = self._baseFormatter + else: + format = ("%s%s%s" % + (termcolor.getControlSequence(color), + self._baseFormatString, + termcolor.getControlSequence(termcolor.DEFAULT))) + stdoutFormatter = logging.Formatter(format) + self._stdoutHandler.setFormatter(stdoutFormatter) + + def closeLogFile(self): + """Close the log file.""" + if self._fileHandler is not None: + self.removeHandler(self._fileHandler) + self._fileHandler.close() + self._fileHandler = None + + def hideDebug(self): + """ + Hide DEBUG level messages (equivalent to ``setLevel(logging.INFO)``). + """ + self.setLevel(logging.INFO) + + @deprecated("Deprecated since version 5.1.5. Please replace with " + "Logger.critical(message)") + def fatal(self, message): + """ + Log a message with CRITICAL level. This method only exists for + backward compatibility and is equivalent to ``critical(message)``. + """ + self.critical(message) + + +class _UnFlushableLogStream: + """ + This utility class allows to log messages to a stream with no `flush` + method. This is useful to send log messages to `PyOut` objects. + """ + + def __init__(self, stream): + self._stream = stream + + def write(self, msg): + self._stream.write(msg) + + def flush(self): + pass + + +class ExtLogger(Logger): + """ + This class extends :class:`Logger` class and adds exception information + when DEBUG messages are recorded. It exists mainly for backward + compatibility, as the same thing can be done by calling + ``Logger.debug(message, exc_info = True)``. + """ + + @deprecated("Class ExtLogger is deprecated since version 5.1.5. See " + "documentation for replacement.") + def __init__(self, keyword = "KEY", + level = salome.kernel.logconfig.loggingLevel, + color = None, sourceFileName=None): + Logger.__init__(self, keyword, level, color, sourceFileName) + + def debug( self, message ): + """ + Log a DEBUG message with exception information (equivalent to + ``Logger.debug(message, exc_info = True)``). + """ + Logger.debug(self, message, exc_info = True) + + +def TEST_Logger(): + """Test function for logger module""" + log = Logger("TST") + + # Base methods + log.info("Information message") + log.debug("Debug message") + log.fatal("Fatal error message") + + # Message building + data = 12 + log.info("This message displays data = " + str(data)) + + data = {} + data["KERNEL"] = "V1" + data["GEOM"] = "V2" + log.info("This message displays data = " + str(data)) + + # Test with a non-string parameter + log.info(data) + + # Test with a default instance + log = Logger() + log.info("Default logger") + + # Test showDebug method + log.setLogFile("test.log") + log.debug("Debug trace") + log.hideDebug() + log.debug("This trace should NOT be displayed") + log.showDebug() + log.debug("This trace should be displayed") + log.closeLogFile() + log.info("After closing the log file") + + +# Main function only used to test the module +if __name__ == "__main__": + TEST_Logger() diff --git a/src/KERNEL_PY/kernel/parametric/Makefile.am b/src/KERNEL_PY/kernel/parametric/Makefile.am new file mode 100644 index 000000000..41ac996e0 --- /dev/null +++ b/src/KERNEL_PY/kernel/parametric/Makefile.am @@ -0,0 +1,28 @@ +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 +# + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +mypkgpythondir =$(salomepypkgdir)/kernel/parametric + +mypkgpython_PYTHON = \ + __init__.py \ + study_exchange_vars.py \ + compo_utils.py \ + pyscript_utils.py diff --git a/src/KERNEL_PY/kernel/parametric/__init__.py b/src/KERNEL_PY/kernel/parametric/__init__.py new file mode 100644 index 000000000..652c9363f --- /dev/null +++ b/src/KERNEL_PY/kernel/parametric/__init__.py @@ -0,0 +1,19 @@ +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 +# + diff --git a/src/KERNEL_PY/kernel/parametric/compo_utils.py b/src/KERNEL_PY/kernel/parametric/compo_utils.py new file mode 100644 index 000000000..028284afd --- /dev/null +++ b/src/KERNEL_PY/kernel/parametric/compo_utils.py @@ -0,0 +1,97 @@ +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 +# + +""" +This module provides utility functions for the computation codes intended for +use in parametric studies. The computation codes must be implemented as SALOME +components to use these functions. If the computation code is implemented as a +Python script or function, use module +:mod:`salome.kernel.parametric.pyscript_utils` instead. +""" + +import SALOME_TYPES + +def create_input_dict(deterministic_dict, parametric_input): + """ + This function returns a dictionary containing the input values to be used + in the computation code. + + :type deterministic_dict: dict + :param deterministic_dict: dictionary containing the fixed values (i.e. + non-parametric). This dictionary can be empty + if all variables are parametric. + + :type parametric_input: SALOME_TYPES/ParametricInput + :param parametric_input: structure containing the description and values + of the parametric variables. + + :return: a dictionary containing the input values for the computation code. + """ + # Simply get the first point from input (no time series, single observation) + input_point = parametric_input.inputValues[0][0] + + if len(input_point) != len(parametric_input.inputVarList): + raise Exception("Size mismatch between inputVarList and point to evaluate") + + input_dict = deterministic_dict.copy() + for i in range(len(input_point)): + input_dict[parametric_input.inputVarList[i]] = input_point[i][0] + + return input_dict + +def create_normal_parametric_output(output_dict, parametric_input): + """ + This function returns a structure describing the output of the computation + code in parametric studies. + + :type output_dict: dict + :param output_dict: dictionary containing the output values of the + computation code (the keys are the variable names, the + values are the variable values). + + :type parametric_input: SALOME_TYPES/ParametricInput + :param parametric_input: structure containing the description and values + of the parametric variables. + + :return: a structure of type SALOME_TYPES/ParametricOutput containing the + output of the computation code. + """ + output_values = [[[]]] + for output_var in parametric_input.outputVarList: + output_values[0][0].append([output_dict[output_var]]) + return SALOME_TYPES.ParametricOutput(outputValues = output_values, + specificOutputInfos = [], + returnCode = 0, + errorMessage = "") + +def create_error_parametric_output(error_message): + """ + This function returns a structure describing the output of the computation + code in parametric studies in case of error. + + :type error_message: string + :param error_message: the error message. + + :return: a structure of type SALOME_TYPES/ParametricOutput describing the + error. + """ + return SALOME_TYPES.ParametricOutput(outputValues = [], + specificOutputInfos = [], + returnCode = 1, + errorMessage = error_message) diff --git a/src/KERNEL_PY/kernel/parametric/pyscript_utils.py b/src/KERNEL_PY/kernel/parametric/pyscript_utils.py new file mode 100644 index 000000000..1e4b6d1b6 --- /dev/null +++ b/src/KERNEL_PY/kernel/parametric/pyscript_utils.py @@ -0,0 +1,94 @@ +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 +# + +""" +This module provides utility functions for the computation codes intended for +use in parametric studies. The computation codes must be implemented as a +Python script or function to use these functions. If the computation code is +implemented as a SALOME component, use module +:mod:`salome.kernel.parametric.compo_utils` instead. +""" + +def create_input_dict(deterministic_dict, parametric_input): + """ + This function returns a dictionary containing the input values to be used + in the computation code. + + :type deterministic_dict: dict + :param deterministic_dict: dictionary containing the fixed values (i.e. + non-parametric). This dictionary can be empty + if all variables are parametric. + + :type parametric_input: dict + :param parametric_input: dictionary containing the description and values + of the parametric variables. + + :return: a dictionary containing the input values for the computation code. + """ + # Simply get the first point from input (no time series, single observation) + input_point = parametric_input["inputValues"][0][0] + + if len(input_point) != len(parametric_input["inputVarList"]): + raise Exception("Size mismatch between inputVarList and point to evaluate") + + input_dict = deterministic_dict.copy() + for i in range(len(input_point)): + input_dict[parametric_input["inputVarList"][i]] = input_point[i][0] + + return input_dict + +def create_normal_parametric_output(output_dict, parametric_input): + """ + This function returns a dictionary describing the output of the + computation code in parametric studies. + + :type output_dict: dict + :param output_dict: dictionary containing the output values of the + computation code (the keys are the variable names, the + values are the variable values). + + :type parametric_input: dict + :param parametric_input: dictionary containing the description and values + of the parametric variables. + + :return: a dictionary containing the representation of the output of the + computation code. + """ + output_values = [[[]]] + for output_var in parametric_input["outputVarList"]: + output_values[0][0].append([output_dict[output_var]]) + return {"outputValues" : output_values, + "specificOutputInfos" : [], + "returnCode" : 0, + "errorMessage" : ""} + +def create_error_parametric_output(error_message): + """ + This function returns a dictionary describing the output of the + computation code in parametric studies in case of error. + + :type error_message: string + :param error_message: the error message. + + :return: a dictionary describing the error. + """ + return {"outputValues" : [], + "specificOutputInfos" : [], + "returnCode" : 1, + "errorMessage" : error_message} diff --git a/src/KERNEL_PY/kernel/parametric/study_exchange_vars.py b/src/KERNEL_PY/kernel/parametric/study_exchange_vars.py new file mode 100644 index 000000000..91e9ebcf8 --- /dev/null +++ b/src/KERNEL_PY/kernel/parametric/study_exchange_vars.py @@ -0,0 +1,217 @@ +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 +# + +""" +This module provides classes and functions to handle "Exchange Variables", +i.e. description of variables to be exchanged between a supervision code and a +computation code. These Exchange Variables can be stored in a SObject in +Salome study. +""" + +from xml.dom.minidom import getDOMImplementation, parse +from salome.kernel.studyedit import getStudyEditor + +DEFAULT_NAME = "Variables" +INPUT_VAR_NAMES = "ExchangeVariables.InputVarNames" +OUTPUT_VAR_NAMES = "ExchangeVariables.OutputVarNames" +REF_ENTRY = "ExchangeVariables.RefEntry" + +class Variable: + """ + This class describes a single variable. For now, it is only described by + its name. Other attributes are reserved for future use. + """ + + def __init__(self, name, dimension = [], minValue = None, maxValue = None, + initialValue = None): + self.name = name + + # Reserved for future use + self.dimension = dimension + self.minValue = minValue + self.maxValue = maxValue + self.initialValue = initialValue + + +class ExchangeVariables: + """ + This class describes "Exchange Variables", i.e. a structure containing all + the necessary information to exchange variables between a supervision code + and a computation code. + + .. attribute:: inputVarList + + This instance attribute is a list of :class:`Variable` objects, + describing the input variables for the computation code. + + .. attribute:: outputVarList + + This instance attribute is a list of :class:`Variable` objects, + describing the output variables for the computation code. + + .. attribute:: refEntry + + This instance attribute is optional and can be used to store a + reference to a Salome entry containing an "Exchange Variable" SObject + that was used to build this one (when the current object has been built + by selecting variables of interest in a list of potential variables). + + """ + + def __init__(self, inputVarList = [], outputVarList = [], + refEntry = None): + self.inputVarList = inputVarList + self.outputVarList = outputVarList + self.refEntry = refEntry + + def saveToXmlFile(self, filepath): + """ + Save this object to an XML file. + + :type filepath: string + :param filepath: path of the XML file. + + """ + doc = getDOMImplementation().createDocument(None, "variables", None) + top_el = doc.documentElement + top_el.setAttribute("version", "6.4") + input_variables_el = doc.createElement("input_variables") + top_el.appendChild(input_variables_el) + output_variables_el = doc.createElement("output_variables") + top_el.appendChild(output_variables_el) + for input_var in self.inputVarList: + input_var_el = doc.createElement("variable") + input_var_el.setAttribute("name", input_var.name) + input_variables_el.appendChild(input_var_el) + for output_var in self.outputVarList: + output_var_el = doc.createElement("variable") + output_var_el.setAttribute("name", output_var.name) + output_variables_el.appendChild(output_var_el) + f = open(filepath, "w") + f.write(doc.toprettyxml(indent = " ")) + f.close() + +def createSObjectForExchangeVariables(fatherSobj, exchangeVariables, + name = DEFAULT_NAME, + icon = None, typeId = None): + """ + Create a SObject to store an :class:`ExchangeVariables` instance. + + :type fatherSobj: SObject + :param fatherSobj: parent of the SObject to create. + + :type exchangeVariables: :class:`ExchangeVariables` + :param exchangeVariables: :class:`ExchangeVariables` instance to store in + Salome study. + + :type name: string + :param name: name of the SObject to create. + + :type icon: string + :param icon: icon of the SObject to create. + + :type typeId: integer + :param typeId: type of the SObject to create. + + :return: the newly created SObject. + + """ + studyId = fatherSobj.GetStudy()._get_StudyId() + editor = getStudyEditor(studyId) + sobj = editor.createItem(fatherSobj, + name = name, + icon = icon, + typeId = typeId) + _setSObjectForExchangeVariables(editor, sobj, exchangeVariables) + +def updateSObjectForExchangeVariables(sobj, exchangeVariables, + name = DEFAULT_NAME, + icon = None, typeId = None): + """ + Update an existing SObject storing an :class:`ExchangeVariables` instance. + + :type sobj: SObject + :param sobj: the SObject to update. + + See :func:`createSObjectForExchangeVariables` for the description of the + other parameters. + + """ + studyId = sobj.GetStudy()._get_StudyId() + editor = getStudyEditor(studyId) + editor.setItem(sobj, name = name, icon = icon, typeId = typeId) + editor.builder.RemoveAttribute(sobj, "AttributeParameter") + _setSObjectForExchangeVariables(editor, sobj, exchangeVariables) + +def _setSObjectForExchangeVariables(editor, sobj, exchangeVariables): + attr = editor.builder.FindOrCreateAttribute(sobj, "AttributeParameter") + attr.SetStrArray(INPUT_VAR_NAMES, + [x.name for x in exchangeVariables.inputVarList]) + attr.SetStrArray(OUTPUT_VAR_NAMES, + [x.name for x in exchangeVariables.outputVarList]) + if exchangeVariables.refEntry is not None: + attr.SetString(REF_ENTRY, exchangeVariables.refEntry) + +def getExchangeVariablesFromSObject(sobj): + """ + Get an :class:`ExchangeVariables` instance from a SObject that stores it. + + :type sobj: SObject + :param sobj: the SObject from which to read the :class:`ExchangeVariables` + instance. + + :return: the newly created :class:`ExchangeVariables` instance. + + """ + (found, attr) = sobj.FindAttribute("AttributeParameter") + if not found: + return None + refEntry = None + if attr.IsSet(REF_ENTRY, 3): + refEntry = attr.GetString(REF_ENTRY) + return ExchangeVariables( + [Variable(name) for name in attr.GetStrArray(INPUT_VAR_NAMES)], + [Variable(name) for name in attr.GetStrArray(OUTPUT_VAR_NAMES)], + refEntry) + +def loadExchangeVariablesFromXmlFile(filepath): + """ + Load an :class:`ExchangeVariables` instance from an XML file. + + :type filepath: string + :param filepath: path of the XML file to load. + + :return: the newly created :class:`ExchangeVariables` instance. + + """ + doc = parse(filepath) + top_el = doc.documentElement + # Check version + version = top_el.getAttribute("version") + if version != "6.4": + raise Exception(self.tr("Unsupported version: %s" % version)) + input_variables_el = top_el.getElementsByTagName("input_variables")[0] + input_var_list = [Variable(input_var_el.getAttribute("name")) + for input_var_el + in input_variables_el.getElementsByTagName("variable")] + output_variables_el = top_el.getElementsByTagName("output_variables")[0] + output_var_list = [Variable(output_var_el.getAttribute("name")) + for output_var_el + in output_variables_el.getElementsByTagName("variable")] + return ExchangeVariables(input_var_list, output_var_list) diff --git a/src/KERNEL_PY/kernel/pyunittester.py b/src/KERNEL_PY/kernel/pyunittester.py new file mode 100644 index 000000000..63e7846a1 --- /dev/null +++ b/src/KERNEL_PY/kernel/pyunittester.py @@ -0,0 +1,171 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 sys +from salome.kernel import termcolor +def printfile(filename): + stream = open(filename,'r') + lines = stream.readlines() + stream.close() + for line in lines: + if not termcolor.canDisplayColor(sys.stdout): + msg = line.split('\n')[0] + else: + msg = termcolor.makeColoredMessage(line.split('\n')[0], termcolor.BLUE) + print msg + +import os +import unittest +from unittest import TestCase +from uiexception import DevelException + +class PyUnitTester(): + ''' + This class is a simple wrapper of the pyunit framework. + ''' + def __init__(self): + self.__listTestSuite=[] + self.setLogFilename("testlog.txt") + + def addTestCase(self,testCaseClass): + # We test some attributes to validate that the argument + # corresponds to a unittest.TestCase class (WARN: it's not an + # instance but a class keyword) + if "assertTrue" not in dir(testCaseClass): + raise DevelException("Not a pyunit test case") + + suite = unittest.TestLoader().loadTestsFromTestCase(testCaseClass) + self.__listTestSuite.append(suite) + + def setLogFilename(self, filename): + self.__logfilename = filename + + def run(self): + # We first open the output stream + if os.path.exists(self.__logfilename): + os.remove(self.__logfilename) + logfile = open(self.__logfilename,'w') + + # Then, define and execute the runner to play the test suites + runner = unittest.TextTestRunner(stream=logfile,verbosity=2) + for suite in self.__listTestSuite: + runner.run(suite) + + # Finally close the ouput stream and print the report + logfile.close() + self.printreport() + + def printreport(self): + printfile(self.__logfilename) + +def execAndConvertExceptionToBoolean(function): + """ + This can be used to just execute a test function that is + considered as OK simply if no exception is raised (can be test by + an assertTrue). + """ + try: + result = function() + if result is None: + return True + return result + except Exception, e: + print e + return False + +# Simple helper function for most cases where there is only one +# TestCase classe. +def run(testCaseClass): + """ + Run the test suite provided by the specified TestCase class. + """ + tester = PyUnitTester() + tester.addTestCase(testCaseClass) + tester.run() + +# +# ============================================================================== +# Simple use cases +# ============================================================================== +# +class MyTestCase(unittest.TestCase): + def test_myTestOk_01(self): + r=True + print "myTestOk_01: should be OK" + self.assertTrue(r) + + def test_myTestOk_02(self): + r=True + print "myTestOk_02: should be OK" + self.assertTrue(r) + + def test_myTestNotOk(self): + r=False + print "myTestNotOk: should be NOT OK" + self.assertTrue(r) + +def functionRaisingAnException(): + raise Exception("An error occurs") + +def functionReturningFalse(): + return False + +def functionReturningTrue(): + return True + +def functionReturningNothing(): + print "functionReturningNothing" + +class MyTestCase2(unittest.TestCase): + def test_myTest_01(self): + r=execAndConvertExceptionToBoolean(functionRaisingAnException) + print "test 01: this test should be NOT OK" + self.assertTrue(r) + + def test_myTest_02(self): + r=execAndConvertExceptionToBoolean(functionReturningFalse) + print "test 02: this test should be NOT OK" + self.assertTrue(r) + + def test_myTest_03(self): + r=execAndConvertExceptionToBoolean(functionReturningTrue) + print "test 03: this test should be OK" + self.assertTrue(r) + + def test_myTest_04(self): + r=execAndConvertExceptionToBoolean(functionReturningNothing) + print "test 04: this test should be OK" + self.assertTrue(r) + + def test_myTest_05(self): + r=True + print "test 05: this test should be OK" + self.assertTrue(r) + + +def TEST_basic_usecase(): + tester = PyUnitTester() + # Note that the class keywords must be passed + tester.addTestCase(MyTestCase) + tester.addTestCase(MyTestCase2) + tester.run() + +if __name__ == "__main__": + TEST_basic_usecase() diff --git a/src/KERNEL_PY/kernel/services.py b/src/KERNEL_PY/kernel/services.py new file mode 100644 index 000000000..08328d5a3 --- /dev/null +++ b/src/KERNEL_PY/kernel/services.py @@ -0,0 +1,254 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 +# + +# Author: Guillaume Boulant (EDF/R&D) + +# +# WARNING: development notes +# +# This python module is aimed to be a (yet another?) end user +# interface to manipulate the KERNEL SALOME services. Note that it +# does not replace the salome module (i.e. what you get when typing +# "import salome", actually implemented in the file __init__.py of the +# salome python package). It provides instead functions that help to +# use the salome module in a end user context (development of domain +# specific tools by programmers that are not ten years experienced in +# SALOME development). + +import salome +from deprecation import is_called_by_sphinx +if not is_called_by_sphinx() and salome.lcc is None: + try: + salome.salome_init() + except Exception, e: + print e + +# Note that the salome module provides you with standard SALOME +# objects: CORBA broker (orb): salome.orb lyfe cycle (lcc) : +# salome.lcc naming service : salome.naming_service study manager : +# salome.myStudyManager The default study : salome.myStudy +# +# Alternatively, you may obtain these objects directly with the +# following instructions: +# +# from omniORB import CORBA +# from LifeCycleCORBA import LifeCycleCORBA +# orb = CORBA.ORB_init( [''], CORBA.ORB_ID ) +# lcc = LifeCycleCORBA( orb ) +# +# from SALOME_NamingServicePy import SALOME_NamingServicePy_i +# naming_service = SALOME_NamingServicePy_i( orb ) +# +# (See salome.py page in the KERNEL documentation) + +# +# ============================================================================== +# Helper functions for SALOME components +# ============================================================================== +# + +# +# componentName is the name of the component as declared in the XML +# SALOME catalog. A loadable library with name libEngine.so +# is supposed to be reachable. This library is supposed to provide a +# factory function with the prototype: +# +# PortableServer::ObjectId * Engine_factory( +# CORBA::ORB_ptr orb, +# PortableServer::POA_ptr poa, +# PortableServer::ObjectId * contId, +# const char *instanceName, +# const char *interfaceName); +# +# corbaModule is the name of the IDL module that contains the +# definition of the interface of the component. This name corresponds +# to the namespace of the servant classes. +# +# containerType specified the container in which the servants are +# executed. +# +def getComponent(componentName = "SalomeTestComponent", + corbaModule = "Engines", + containerType = "FactoryServer"): + """ + Get a SALOME CORBA component from its name + """ + print "INF: getting component %s from CORBA module %s ..."%(componentName,corbaModule) + __import__(corbaModule) + component=salome.lcc.FindOrLoadComponent(containerType,componentName) + if component is None: + print "ERR: the SALOME component "+componentName+" can't be reached" + print "INF: component %s obtained from CORBA module %s"%(componentName,corbaModule) + return component + +# Note that an alternative (and maybe better) method to get a component +# is to use the module catalog. Here, we just use the catalog to get +# the list of components defined in the current session. +import SALOME_ModuleCatalog +def getComponentList(): + """ + Get the list of names of all SALOME componenents register in + the catalog. + """ + obj = salome.naming_service.Resolve('Kernel/ModulCatalog') + catalog = obj._narrow(SALOME_ModuleCatalog.ModuleCatalog) + if not catalog: + raise RuntimeError, "Can't accesss module catalog" + return catalog.GetComponentList() + +def getStudyManager(): + """Get a study manager to create and manage SALOME studies""" + return salome.myStudyManager + +import SALOMEDS +def __getStudyManager_demo(): + """ + Get a study manager to create and manage SALOME studies. WARN: you + should use instead the variable salome.myStudyManager. This + function is given for illustration of usage of the naming service + """ + naming_service = SALOME_NamingServicePy_i( orb ) + obj = naming_service.Resolve( '/myStudyManager' ) + studyManager = obj._narrow( SALOMEDS.StudyManager) + return studyManager + + +# +# ============================================================================== +# Helper functions for manipulating objects, sobjects and entry +# ============================================================================== +# + +# - the SObject is an item in a study (Study Object). +# - the entry is the identifier of an item. +# - the ID is the entry +# - the object (geom object or smesh object) is a CORBA servant +# embedded in the SALOME component container and with a reference in +# the SALOME study, so that it can be retrieved. + +# __GBO__ WARN: theses functions are already defined in +# salome_study.py, but without the possibility to specify the +# underlying study (in salome_study.py, the study is the default study +# binded to the salome.myStudy attribute). TODO: see if it can be +# extends to the prototype (with the study as an argument) below and +# resorb the functions below. + +def IDToObject(id, study=None): + myObj = None + if study is None: + myStudy = salome.myStudy + else: + myStudy = study + mySO = myStudy.FindObjectID(id); + if mySO is not None: + ok, anAttr = mySO.FindAttribute("AttributeIOR") + if ok: + AtIOR = anAttr._narrow(SALOMEDS.AttributeIOR) + if AtIOR.Value() != "": + myObj = salome.orb.string_to_object(AtIOR.Value()) + return myObj + +def ObjectToSObject(obj, study=None): + mySO = None + + if study is None: + myStudy = salome.myStudy + else: + myStudy = study + + if obj is not None: + ior = salome.orb.object_to_string(obj) + if ior != "": + mySO = myStudy.FindObjectIOR(ior) + return mySO + +def ObjectToID(obj, study=None): + mySO = ObjectToSObject(obj,study) + if mySO: + return mySO.GetID() + return "" + +def IDToSObject(id, study=None): + if study is None: + myStudy = salome.myStudy + else: + myStudy = study + + mySO = myStudy.FindObjectID(id); + return mySO + +def SObjectToID(sobject): + if sobject is None: return None + return sobject.GetID() + + +# +# ============================================================================== +# Basic use cases and unit tests +# ============================================================================== +# + +def TEST_getComponent(): + component=getComponent(componentName = "SalomeTestComponent") + + ref_string = 'TestComponent_i : L = 3' + res_string = component.Coucou(3) + if ref_string != ref_string: + return False + return True + +def TEST_getComponentList(): + componentList=getComponentList() + if 'SalomeTestComponent' not in componentList: + return False + return True + +def TEST_createObject(): + """ + WARNING: for this test, we need GEOM (used to create an object + """ + import geompy + geompy.init_geom(salome.myStudy) + box = geompy.MakeBoxDXDYDZ(200, 200, 200) + id = geompy.addToStudy( box, 'box' ) + return id + +def TEST_objectsManipulation(): + myEntry = TEST_createObject() + + mySObject = IDToSObject(myEntry) + entry = SObjectToID(mySObject) + + if str(entry) != str(myEntry): + return False + + + myObject = IDToObject(myEntry) + print myObject + if myObject is None: + return False + + return True + +if __name__ == "__main__": + import unittester + unittester.run("services","TEST_getComponent") + unittester.run("services","TEST_getComponentList") + unittester.run("services","TEST_objectsManipulation") diff --git a/src/KERNEL_PY/kernel/studyedit.py b/src/KERNEL_PY/kernel/studyedit.py new file mode 100644 index 000000000..9559a7772 --- /dev/null +++ b/src/KERNEL_PY/kernel/studyedit.py @@ -0,0 +1,501 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 +# +""" +This module provides a new class :class:`StudyEditor` to complement +:class:`Study` and :class:`StudyBuilder` classes. +""" + +import re + +import salome +from salome.kernel.logger import Logger +from salome.kernel import termcolor +logger = Logger("salome.kernel.studyedit", color = termcolor.PURPLE) + +_editors = {} +_DEFAULT_CONTAINER = "FactoryServer" + +def getActiveStudyId(): + """ + Return the ID of the active study. In GUI mode, this function is equivalent + to ``salome.sg.getActiveStudyId()``. Outside GUI, it returns + ``salome.myStudyId`` variable. + """ + salome.salome_init() + # Warning: we don't use salome.getActiveStudy() here because it doesn't + # work properly when called from Salome modules (multi-study interpreter + # issue) + if salome.hasDesktop(): + return salome.sg.getActiveStudyId() + else: + return salome.myStudyId + +def getActiveStudy(): + return getStudyFromStudyId(getActiveStudyId()) + +def getStudyFromStudyId(studyId): + salome.salome_init() + study = salome.myStudyManager.GetStudyByID(studyId) + return study + +def getStudyIdFromStudy(study): + studyId = study._get_StudyId() + return studyId + +def getStudyEditor(studyId = None): + """ + Return a :class:`StudyEditor` instance to edit the study with ID + `studyId`. If `studyId` is :const:`None`, return an editor for the current + study. + """ + if studyId is None: + studyId = getActiveStudyId() + if not _editors.has_key(studyId): + _editors[studyId] = StudyEditor(studyId) + return _editors[studyId] + +class StudyEditor: + """ + This class provides utility methods to complement :class:`Study` and + :class:`StudyBuilder` classes. Those methods may be moved in those classes + in the future. The parameter `studyId` defines the ID of the study to + edit. If it is :const:`None`, the edited study will be the current study. + The preferred way to get a StudyEditor object is through the method + :meth:`getStudyEditor` which allows to reuse existing instances. + + .. attribute:: studyId + + This instance attribute contains the ID of the edited study. This + attribute should not be modified. + + .. attribute:: study + + This instance attribute contains the underlying :class:`Study` object. + It can be used to access the study but the attribute itself should not + be modified. + + .. attribute:: builder + + This instance attribute contains the underlying :class:`StudyBuilder` + object. It can be used to edit the study but the attribute itself + should not be modified. + + """ + def __init__(self, studyId = None): + salome.salome_init() + if studyId is None: + studyId = getActiveStudyId() + self.studyId = studyId + self.study = salome.myStudyManager.GetStudyByID(studyId) + if self.study is None: + raise Exception("Can't create StudyEditor object: " + "Study %d doesn't exist" % studyId) + self.builder = self.study.NewBuilder() + + def findOrCreateComponent(self, moduleName, componentName = None, + icon = None, containerName = _DEFAULT_CONTAINER): + """ + Find a component corresponding to the Salome module `moduleName` in + the study. If none is found, create a new component and associate it + with the corresponding engine (i.e. the engine named `moduleName`). + Note that in Salome 5, the module name and engine name must be + identical (every module must provide an engine with the same name). + In Salome 6 it will be possible to define a different name for the + engine. + + :type moduleName: string + :param moduleName: name of the module corresponding to the component + (the module name is the string value in the + attribute "AttributeComment" of the component) + + :type componentName: string + :param componentName: name of the new component if created. If + :const:`None`, use `moduleName` instead. + + :type icon: string + :param icon: icon for the new component (attribute "AttributePixMap"). + + :type containerName: string + :param containerName: name of the container in which the engine should be + loaded. + + :return: the SComponent found or created. + + """ + sComponent = self.study.FindComponent(moduleName) + if sComponent is None: + sComponent = self.builder.NewComponent(moduleName) + # Note that the NewComponent method set the "comment" attribute to the + # value of its argument (moduleName here) + if componentName is None: + componentName = moduleName + self.builder.SetName(sComponent, componentName) + if icon is not None: + # _MEM_ : This will be effective if and only if "moduleName" + # really corresponds to the module name (as specified in the + # SalomeApp.xml) + self.setIcon(sComponent, icon) + + # This part will stay inactive until Salome 6. In Salome 6, the + # engine name will be stored separately from the module name. + # An internal convention (in this class) is to store the name of the + # associated engine in the parameter attribute of the scomponent (so that + # it could be retrieved in a future usage of this scomponent, for example, + # for the need of the function loadComponentEngine). The comment attribute + # SHOULD NOT be used for this purpose because it's used by the SALOME + # resources manager to identify the SALOME module and then localized + # the resource files + #attr = self.builder.FindOrCreateAttribute( sComponent, "AttributeParameter" ) + #attr.SetString( "ENGINE_NAME", engineName ) + + engine = salome.lcc.FindOrLoadComponent(containerName, moduleName) + if engine is None: + raise Exception("Cannot load engine %s in container %s. See " + "logs of container %s for more details." % + (moduleName, containerName, containerName)) + self.builder.DefineComponentInstance(sComponent, engine) + + return sComponent + + def loadComponentEngine(self, sComponent, + containerName = _DEFAULT_CONTAINER): + """ + Load the engine corresponding to `sComponent` in the container + `containerName`, associate the engine with the component and load the + CORBA objects of this component in the study. + """ + # This part will stay inactive until Salome 6. In Salome 6, the + # engine name will be stored separately from the module name. + #attr = self.builder.FindOrCreateAttribute( sComponent, "AttributeParameter" ) + #engineName = attr.GetString( "ENGINE_NAME" ) + engine = salome.lcc.FindOrLoadComponent(containerName, + sComponent.GetComment()) + if engine is None: + raise Exception("Cannot load component %s in container %s. See " + "logs of container %s for more details." % + (sComponent.GetComment(), containerName, + containerName)) + self.builder.LoadWith(sComponent, engine) + + def getOrLoadObject(self, item): + """ + Get the CORBA object associated with the SObject `item`, eventually by + first loading it with the corresponding engine. + """ + object = item.GetObject() + if object is None: # the engine has not been loaded yet + sComponent = item.GetFatherComponent() + self.loadComponentEngine(sComponent) + object = item.GetObject() + return object + + def findOrCreateItem(self, fatherItem, name, fileType = None, + fileName = None, comment = None, icon = None, + IOR = None, typeId = None): + """ + Find an object under `fatherItem` in the study with the given + attributes. Return the first one found if at least one exists, + otherwise create a new one with the given attributes and return it. + + See :meth:`setItem` for the description of the parameters. + """ + sObject = self.findItem(fatherItem, name, fileType, fileName, comment, + icon, IOR, typeId) + if sObject is None: + sObject = self.createItem(fatherItem, name, fileType, fileName, + comment, icon, IOR, typeId) + return sObject + + def findItem(self, fatherItem, name = None, fileType = None, + fileName = None, comment = None, icon = None, IOR = None, + typeId = None): + """ + Find an item with given attributes under `fatherItem` in the study. If + none is found, return :const:`None`. If several items correspond to + the parameters, only the first one is returned. The search is made + only on given parameters (i.e. not :const:`None`). To look explicitly + for an empty attribute, use an empty string in the corresponding + parameter. + + See :meth:`setItem` for the description of the parameters. + """ + foundItem = None; + childIterator = self.study.NewChildIterator(fatherItem) + while childIterator.More() and foundItem is None: + childItem = childIterator.Value() + if childItem and \ + (name is None or childItem.GetName() == name) and \ + (fileType is None or \ + self.getFileType(childItem) == fileType) and \ + (fileName is None or \ + self.getFileName(childItem) == fileName) and \ + (comment is None or childItem.GetComment() == comment) and \ + (icon is None or \ + self.getIcon(childItem) == icon) and \ + (IOR is None or childItem.GetIOR() == IOR) and \ + (typeId is None or \ + self.getTypeId(childItem) == typeId): + foundItem = childItem + childIterator.Next() + return foundItem + + def createItem(self, fatherItem, name, fileType = None, fileName = None, + comment = None, icon = None, IOR = None, typeId = None): + """ + Create a new object named `name` under `fatherItem` in the study, with + the given attributes. If an object named `name` already exists under + the father object, the new object is created with a new name `name_X` + where X is the first available index. + + :type fatherItem: SObject + :param fatherItem: item under which the new item will be added. + + :return: new SObject created in the study + + See :meth:`setItem` for the description of the other parameters. + """ + aSObject = self.builder.NewObject(fatherItem) + + aChildIterator = self.study.NewChildIterator(fatherItem) + aMaxId = -1 + aLength = len(name) + aDelim = "_" + anIdRE = re.compile("^" + aDelim + "[0-9]+") + aNameRE = re.compile("^" + name) + while aChildIterator.More(): + aSObj = aChildIterator.Value() + aChildIterator.Next() + aName = aSObj.GetName() + if re.match(aNameRE,aName): + aTmp = aName[aLength:] + if re.match(anIdRE,aTmp): + import string + anId = string.atol(aTmp[1:]) + if aMaxId < anId: + aMaxId = anId + pass + pass + elif aMaxId < 0: + aMaxId = 0 + pass + pass + pass + + aMaxId = aMaxId + 1 + aName = name + if aMaxId > 0: + aName = aName + aDelim + str(aMaxId) + pass + + self.setItem(aSObject, aName, fileType, fileName, comment, icon, + IOR, typeId) + + return aSObject + + def setItem(self, item, name = None, fileType = None, fileName = None, + comment = None, icon = None, IOR = None, typeId = None): + """ + Modify the attributes of an item in the study. Unspecified attributes + (i.e. those set to :const:`None`) are left unchanged. + + :type item: SObject + :param item: item to modify. + + :type name: string + :param name: item name (attribute 'AttributeName'). + + :type fileType: string + :param fileType: item file type (attribute 'AttributeFileType'). + + :type fileName: string + :param fileName: item file name (attribute + 'AttributeExternalFileDef'). + + :type comment: string + :param comment: item comment (attribute 'AttributeComment'). Note that + this attribute will appear in the 'Value' column in + the object browser. + + :type icon: string + :param icon: item icon name (attribute 'AttributePixMap'). + + :type IOR: string + :param IOR: IOR of a CORBA object associated with the item + (attribute 'AttributeIOR'). + + :type typeId: integer + :param typeId: item type (attribute 'AttributeLocalID'). + """ + logger.debug("setItem (ID=%s): name=%s, fileType=%s, fileName=%s, " + "comment=%s, icon=%s, IOR=%s" % + (item.GetID(), name, fileType, fileName, comment, + icon, IOR)) + # Explicit cast is necessary for unicode to string conversion + if name is not None: + self.builder.SetName(item, str(name)) + if fileType is not None: + self.setFileType(item, fileType) + if fileName is not None: + self.setFileName(item, fileName) + if comment is not None: + self.builder.SetComment(item, str(comment)) + if icon is not None: + self.setIcon(item, icon) + if IOR is not None: + self.builder.SetIOR(item, str(IOR)) + if typeId is not None: + self.setTypeId(item, typeId) + + def removeItem(self, item, withChildren = False ): + """ + Remove the given item from the study. Note that the items are never + really deleted. They just don't appear in the study anymore. + + :type item: SObject + :param item: the item to be removed + + :type withChildren: boolean + :param withChildren: if :const:`True`, also remove the children of + `item` + + :return: :const:`True` if the item was removed successfully, or + :const:`False` if an error happened. + """ + ok = False + try: + if withChildren: + self.builder.RemoveObjectWithChildren(item) + else: + self.builder.RemoveObject(item) + ok = True + except: + ok = False + return ok + + def setItemAtTag(self, fatherItem, tag, name = None, fileType = None, + fileName = None, comment = None, icon = None, IOR = None, + typeId = None): + """ + Find an item tagged `tag` under `fatherItem` in the study tree or + create it if there is none, then set its attributes. + + :type fatherItem: SObject + :param fatherItem: item under which the tagged item will be looked for + and eventually created. + + :type tag: integer + :param tag: tag of the item to look for. + + :return: the SObject at `tag` if found or created successfully, or + :const:`None` if an error happened. + + See :meth:`setItem` for the description of the other parameters. + """ + found, sObj = fatherItem.FindSubObject(tag) + if not found: + sObj = self.builder.NewObjectToTag(fatherItem, tag) + self.setItem(sObj, name, fileType, fileName, comment, icon, + IOR, typeId) + return sObj + + def getAttributeValue(self, sObject, attributeName, default = None): + """ + Return the value of the attribute named `attributeName` on the object + `sObject`, or `default` if the attribute doesn't exist. + """ + value = default + found, attr = self.builder.FindAttribute(sObject, attributeName) + if found: + value = attr.Value() + return value + + def setAttributeValue(self, sObject, attributeName, attributeValue): + """ + Set the value of the attribute named `attributeName` on the object + `sObject` to the value `attributeValue`. + """ + attr = self.builder.FindOrCreateAttribute(sObject, attributeName) + attr.SetValue(attributeValue) + + def getTypeId(self, sObject): + """ + Return the value of the attribute "AttributeLocalID" of the object + `sObject`, or :const:`None` if it is not set. + """ + return self.getAttributeValue(sObject, "AttributeLocalID") + + def setTypeId(self, sObject, value): + """ + Set the attribute "AttributeLocalID" of the object `sObject` to the + value `value`. + """ + self.setAttributeValue(sObject, "AttributeLocalID", value) + + def getFileType(self, sObject): + """ + Return the value of the attribute "AttributeFileType" of the object + `sObject`, or an empty string if it is not set. + """ + return self.getAttributeValue(sObject, "AttributeFileType", "") + + def setFileType(self, sObject, value): + """ + Set the attribute "AttributeFileType" of the object `sObject` to the + value `value`. + """ + # Explicit cast is necessary for unicode to string conversion + self.setAttributeValue(sObject, "AttributeFileType", str(value)) + + def getFileName(self, sObject): + """ + Return the value of the attribute "AttributeExternalFileDef" of the + object `sObject`, or an empty string if it is not set. + """ + return self.getAttributeValue(sObject, "AttributeExternalFileDef", "") + + def setFileName(self, sObject, value): + """ + Set the attribute "AttributeExternalFileDef" of the object `sObject` + to the value `value`. + """ + # Explicit cast is necessary for unicode to string conversion + self.setAttributeValue(sObject, "AttributeExternalFileDef", + str(value)) + + def getIcon(self, sObject): + """ + Return the value of the attribute "AttributePixMap" of the object + `sObject`, or an empty string if it is not set. + """ + value = "" + found, attr = self.builder.FindAttribute(sObject, "AttributePixMap") + if found and attr.HasPixMap(): + value = attr.GetPixMap() + return value + + def setIcon(self, sObject, value): + """ + Set the attribute "AttributePixMap" of the object `sObject` to the + value `value`. + """ + attr = self.builder.FindOrCreateAttribute(sObject, "AttributePixMap") + # Explicit cast is necessary for unicode to string conversion + attr.SetPixMap(str(value)) diff --git a/src/KERNEL_PY/kernel/syshelper.py b/src/KERNEL_PY/kernel/syshelper.py new file mode 100644 index 000000000..a51da6bb0 --- /dev/null +++ b/src/KERNEL_PY/kernel/syshelper.py @@ -0,0 +1,114 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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 +# + +__author__="gboulant" +__date__ ="$21 mai 2010 18:00:23$" + + +def findFiles(rootpath, excludes=[]): + """ + This looks after files recursively from the specified rootpath, + but without visiting directories whose basename is in the list + @param excludes. + """ + if not os.path.exists(rootpath): + raise RuntimeError("the path %s does not exists"%rootpath) + + exclude_options="" + for excludepath in excludes: + exclude_options+="-e %s "%excludepath + + listfiles=[] + stream=os.popen("find %s -type f | grep -v -e '\.svn' %s 2>/dev/null"%(rootpath,exclude_options)) + for line in stream.readlines(): + listfiles.append(line.split('\n')[0]) + + return listfiles + +import sys +from stat import ST_MODE, S_ISDIR, S_ISREG +def walktree(rootpath, callback, **kwargs): + ''' + This recursively descends the directory tree rooted at rootpath, + calling the callback function for each regular file + ''' + for f in os.listdir(rootpath): + pathname = os.path.join(rootpath, f) + try: + mode = os.stat(pathname)[ST_MODE] + except OSError, e: + # It probably means that the file is a broken inode + mode = -1 + if S_ISDIR(mode): + # It's a directory, recurse into it + walktree(pathname, callback, **kwargs) + elif S_ISREG(mode): + # It's a file, call the callback function + callback(pathname, **kwargs) + else: + # Unknown file type, print a message + print 'Skipping %s' % pathname + + +# +# ============================================================= +# Use cases and unit test functions +# ============================================================= +# +import os +try: + TESTDOCDIR=os.path.join(os.environ["KERNEL_ROOT_DIR"],"share") +except KeyError: + TESTDOCDIR="/tmp" + +def TEST_findFiles(): + print "########## find 1" + rootpath=TESTDOCDIR + listfiles=findFiles(rootpath) + for filename in listfiles: + print filename + + print "########## find 2" + excludes=[os.path.join(TESTDOCDIR,"doc")] + listfiles=findFiles(rootpath,excludes) + for filename in listfiles: + print filename + + return True + +# This is the test callback function +def visitfile_withargs(file, rootid): + print 'visiting file %s (rootid=%s)'%(file,str(rootid)) + +def visitfile_withoutargs(file): + print 'visiting file %s'%(file) + +def TEST_walktree(): + #walktree(TESTDOCDIR, visitfile_withargs, rootid=2) + walktree(TESTDOCDIR, visitfile_withoutargs) + return True + +if __name__ == "__main__": + import unittester + unittester.run("syshelper", "TEST_findFiles") + unittester.run("syshelper", "TEST_walktree") diff --git a/src/KERNEL_PY/kernel/termcolor.py b/src/KERNEL_PY/kernel/termcolor.py new file mode 100644 index 000000000..0c184c763 --- /dev/null +++ b/src/KERNEL_PY/kernel/termcolor.py @@ -0,0 +1,150 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 +# +# Author : Renaud Barate (EDF R&D) +# Date : August 2009 +# +""" +This module provides utility functions to display colored text in the +terminal. It is based on ISO 6429 standard that defines control codes to +change characters representation in color-capable ASCII terminals. + +In this module, colors are represented as lists of codes, so they can be added +to obtain special effects (e.g. RED + GREEN_BG to display red text on green +background). Several constants are defined for the most usual codes to +facilitate the use of colors, but it is also possible to define colors +directly from the corresponding code from ISO 6429 standard. In fact it is +even necessary for less usual codes that don't have an associated constant +(e.g. PURPLE + ['09'] can be used to display a crossed-out purple text). + +Example:: + + import sys + from salome.kernel import termcolor + if termcolor.canDisplayColor(sys.stdout): + print termcolor.makeColoredMessage("Hello world!", termcolor.BLUE) + else: + print "Hello world!" + +""" + +# Constants for color codes +DEFAULT = ['00'] +"""Default color for the terminal""" +BOLD = ['01'] +"""Bold text and brighter colors""" +UNDERLINED = ['04'] +"""Underlined text""" +BLACK_FG = ['30'] +"""Black foreground""" +RED_FG = ['31'] +"""Red foreground""" +GREEN_FG = ['32'] +"""Green foreground""" +YELLOW_FG = ['33'] +"""Yellow foreground""" +BLUE_FG = ['34'] +"""Blue foreground""" +PURPLE_FG = ['35'] +"""Purple foreground""" +CYAN_FG = ['36'] +"""Cyan foreground""" +WHITE_FG = ['37'] +"""White foreground""" +BLACK_BG = ['40'] +"""Black background""" +RED_BG = ['41'] +"""Red background""" +GREEN_BG = ['42'] +"""Green background""" +YELLOW_BG = ['43'] +"""Yellow background""" +BLUE_BG = ['44'] +"""Blue background""" +PURPLE_BG = ['45'] +"""Purple background""" +CYAN_BG = ['46'] +"""Cyan background""" +WHITE_BG = ['47'] +"""White background""" + +# Constants for common colored text +BLACK = BLACK_FG +"""Black text (equivalent to BLACK_FG)""" +RED = BOLD + RED_FG +"""Red text (equivalent to BOLD + RED_FG)""" +GREEN = BOLD + GREEN_FG +"""Green text (equivalent to BOLD + GREEN_FG)""" +YELLOW = BOLD + YELLOW_FG +"""Yellow text (equivalent to BOLD + YELLOW_FG)""" +BLUE = BOLD + BLUE_FG +"""Blue text (equivalent to BOLD + BLUE_FG)""" +PURPLE = BOLD + PURPLE_FG +"""Purple text (equivalent to BOLD + PURPLE_FG)""" +CYAN = BOLD + CYAN_FG +"""Cyan text (equivalent to BOLD + CYAN_FG)""" +WHITE = WHITE_FG +"""White text (equivalent to WHITE_FG)""" + + +def canDisplayColor(stream): + """ + Return True if the stream can display colored text, False otherwise. + """ + return hasattr(stream, "isatty") and stream.isatty() + +def getControlSequence(color): + """ + Return the control sequence for the color in parameter, i.e. the string + telling the terminal to display the following text in the given color. + """ + seq = "\x1b[" + for i in range(len(color)): + seq += color[i] + if i < len(color)-1: + seq += ";" + seq += "m" + return seq + +def makeColoredMessage(message, color): + """ + Return a string that can be used to display the message in parameter with + the given color. + """ + return (getControlSequence(color) + + str(message) + + getControlSequence(DEFAULT)) + +def TEST_termcolor(): + """Test function for termcolor module.""" + import sys + if not canDisplayColor(sys.stdout): + print "Standard output does not support colors." + return + print makeColoredMessage("This message must appear in blue.", BLUE) + print makeColoredMessage("This message must appear in red on green " + + "background.", RED + GREEN_BG) + print makeColoredMessage("This message must appear in magenta and " + + "crossed-out.", PURPLE + ['09']) + + +# Main function only used to test the module +if __name__ == "__main__": + TEST_termcolor() diff --git a/src/KERNEL_PY/kernel/testdata.py b/src/KERNEL_PY/kernel/testdata.py new file mode 100644 index 000000000..aff6f9301 --- /dev/null +++ b/src/KERNEL_PY/kernel/testdata.py @@ -0,0 +1,159 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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 +# + +__author__="gboulant" +__date__ ="$17 avr. 2010 19:44:36$" + +from enumerate import Enumerate +from datamodeler import DataModeler, TypeString, TypeInteger +from salome.kernel import Callable + +class TestData(DataModeler): + """ + This class is the placeholder for meta data associated to a study case. + The meta-data are used for organisation and indexing purposes + """ + TYPES_LIST=Enumerate([ + 'SEP', + 'OTHER' + ]) + + def __init__(self): + DataModeler.__init__(self) + self.addAttribute( + name = "NAME", + type = TypeString, + range = None + ) + self.addAttribute( + name = "TYPE", + type = TypeInteger, + range = self.TYPES_LIST.listvalues() + ) + + def setName(self, value): + self.NAME = value + + def getName(self): + return self.NAME + + def setType(self, value): + self.TYPE = value + + def getType(self): + return self.TYPE + + def getDefault(): + """ + Create a default instance of TestData + @class-method + """ + testdata = TestData() + testdata.NAME = "my case" + testdata.TYPE = TestData.TYPES_LIST.SEP + return testdata + + getDefault = Callable(getDefault) +# +# ============================================================================== +# Basic use cases and unit tests +# ============================================================================== +# +from uiexception import UiException + +def TEST_getName(): + testdata = TestData() + testdata.setName("Sous-epaisseur") + testdata.setType(TestData.TYPES_LIST.SEP) + if ( testdata.NAME != "Sous-epaisseur" ): + return False + return True + + +def TEST_useBadKey(): + testdata = TestData() + try: + testdata.unknown = "unknown" + # This should not arrive here + return False + except UiException, err: + print err + return True + +def TEST_useBadType(): + testdata = TestData() + try: + testdata.TYPE = "unknown" + # This should not arrive here + return False + except UiException, err: + print err + return True + +def TEST_useBadRange(): + testdata = TestData() + + try: + testdata.TYPE = TestData.TYPES_LIST.SEP + testdata.setType(TestData.TYPES_LIST.SEP) + # This should arrive here + except UiException, err: + # And not here + print err + return False + + try: + testdata.TYPE = 9999 # a type that does not exist in the range + # This should not arrive here + return False + except UiException, err: + print err + return True + +def TEST_serialize(): + import salome.kernel + ref_testdata = TestData() + ref_testdata.setName("The firts name") + res_testdata = salome.kernel.unserialize(salome.kernel.serialize(ref_testdata)) + + print res_testdata.getName() + + if res_testdata.getName() != ref_testdata.getName(): + return False + + # Is the unserialized data still functional? + try: + res_testdata.setName("An other name") + print res_testdata.getName() + except: + print e + return False + return True + +if __name__ == "__main__": + from unittester import run + run("salome/kernel/testdata","TEST_getName") + run("salome/kernel/testdata","TEST_useBadKey") + run("salome/kernel/testdata","TEST_useBadType") + run("salome/kernel/testdata","TEST_useBadRange") + run("salome/kernel/testdata","TEST_serialize") diff --git a/src/KERNEL_PY/kernel/threadhelper.py b/src/KERNEL_PY/kernel/threadhelper.py new file mode 100644 index 000000000..d1fa76a69 --- /dev/null +++ b/src/KERNEL_PY/kernel/threadhelper.py @@ -0,0 +1,385 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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 +# + +__author__="gboulant" +__date__ ="$1 avr. 2010 18:12:38$" + +import time +import threading + +# =========================================================================== +class Runner(threading.Thread): + """ + This class provides a tool to run and drive a function in a dedicated thread. + """ + def __init__(self, functionToRun=None,*argv): + threading.Thread.__init__( self ) + self._stopevent = threading.Event() + self.setFunction(functionToRun) + self.setArguments(*argv) + self._exception = None + self._return = None + self._observer = None + self._callbackFunction = None + # We create an id from the name and the time date in milliseconds + self._id = functionToRun.__name__ +"/"+ str(time.time()) + + def setFunction(self,functionToRun): + """ + Positionne la fonction � ex�cuter. La fonction peut �tre la + m�thode d'un objet pass�e sous la forme 'monobjet.mamethode'. + """ + self.clear() + self._function = functionToRun + + def setArguments(self,*argv): + """ + Positionne les arguments � passer � la fonction + """ + self.clear() + self._argv = argv + + def getReturn(self): + """ + Retourne le resultat de la fonction. En cas d'erreur, on + r�cup�rera l'exception lev�e au moyen de la m�thode + getException(). + """ + return self._return + + def setCallbackFunction(self, callbackFunction): + self._callbackFunction = callbackFunction + + def setObserver(self, observerToNotify): + """ + Permet de sp�cifier un observateur � notifier en fin + d'ex�cution. L'observateur est suppos� �tre un objet qui + impl�mente une m�thode processNotification() + """ + try: + observerToNotify.processNotification + except AttributeError: + raise DevelException("The observer should implement the method processNotification()") + + self._observer = observerToNotify + + def run(self): + """ + Ex�cution de la fonction. Impl�mentation de la m�thode run + d�clench�e par l'appel � Thread.start(). + """ + print "##################### threadhelper.run" + if self._function is None: return + try: + self._return = self._function(*self._argv) + except Exception, e: + print e + self._exception = e + self._stopevent.set() + self.notifyObserver() + self.callback() + # _GBO_ Maybe it's no use to have both observers and a callback function. + # One of the two mechanism should be sufficient + + def notifyObserver(self): + if self._observer is None: + # Aucune notification pr�vue + return + try: + self._observer.processNotification() + except AttributeError, att: + if str(att) == "processNotification": + print "L'observateur n'impl�mente pas la m�thode processNotification()" + else: + print "La fonction processNotification() a lev� une exception:" + print att + except Exception, e: + print "La fonction processNotification() a lev� une exception:" + print e + + def callback(self): + if self._callbackFunction is None: return + self._callbackFunction() + + def isEnded(self): + """ + Retourne true si la fonction s'est termin�e naturellement + (correctement ou en erreur). Utile pour les client qui + pratique le pooling (interrogation r�p�t�e � intervalle + r�gulier. + """ + return self._stopevent.isSet() + # _GBO_ On n'utilise pas isAlive() pour pouvoir ma�triser + # l'indicateur de stop (exemple de la fonction kill) + # return not self.isAlive() + + def getException(self): + return self._exception + + def getId(self): + return self._id + + def wait(self,timeout=None): + """ + Met fin au thread apr�s timeout seconde s'il est encore en + ex�cution. + Si le compte-�-rebours est atteind sans que la fonction + functionToRun soit termin�e, alors le runner est laiss� dans + l'�tat 'not Ended', c'est-�-dire que isEnded retourne + false. On peut ainsi distinguer l'arr�t normal de l'arr�t � + l'issue du timeout. + """ + threading.Thread.join(self, timeout) + + + def kill(self,message="Arr�t demand�"): + """ + Cette m�thode doit �tre appeler pour interrombre le + thread. Cet appel d�clare le thread comme en erreur (exception + mise � disposition par la m�thode getException(). + """ + # On cr�e un exception indiquant la demande d'interruption + self._exception = Exception(message) + self._stopevent.set() + # _GBO_ ATTENTION + # Un thread python ne peut pas en r�alit� �tre int�rrompu. + # La fonction reste donc en ex�cution m�me si on a rejoint le + # thread appelant. + + def clear(self): + self._stopevent.clear() + self._exception = None + self._return = None + +# =========================================================================== +CONTINUE=1 +STOP=0 + +class PeriodicTimer( threading.Thread ): + """ + Cette classe permet d'amorcer un compte-�-rebours p�riodique pour + op�rer un m�canisme de pooling. On d�finit la fonction appell�e + p�riodiquement et la fonction terminale. + """ + def __init__( self, loopdelay, initdelay=0, + periodic_action=None, + ended_action=None, + *ended_argv ): + + if periodic_action is None: + self._periodic_action = self.defaultPeriodicAction + else: + self._periodic_action = periodic_action + self._ended_action = ended_action + self._loopdelay = loopdelay + self._initdelay = initdelay + self._running = CONTINUE + self._ended_argv = ended_argv + threading.Thread.__init__( self ) + + def defaultPeriodicAction(): + """ + Les fonctions 'periodicAction' retournent CONTINU ou STOP + apr�s avoir ex�cut� l'action de fin de boucle. Si STOP est + retourn�, le cycle est interrompu. + """ + return CONTINU + + def run( self ): + if self._initdelay: + time.sleep( self._initdelay ) + self._runtime = time.time() + while self._running == CONTINUE: + start = time.time() + self._running = self._periodic_action() + self._runtime += self._loopdelay + time.sleep( max( 0, self._runtime - start ) ) + if self._ended_action is not None: + self._ended_action( *self._ended_argv ) + + def stop( self ): + self._running = STOP + + + +# +# ====================================================== +# Fonctions de test unitaire +# ====================================================== +# + +# ====================================================== +import os +testfilename="/tmp/threadhelperTestFile" +def testIfContinue(): + print "On examine la pr�sence du fichier ", testfilename + if os.path.exists(testfilename): + return STOP + else: + return CONTINUE + +def endedAction(): + print "FINI" + +def TEST_PeriodicTimer(): + periodicTimer=PeriodicTimer(1,0,testIfContinue, endedAction) + periodicTimer.start() + + +# ====================================================== +def function_ok(nbsteps=5): + """ + Fonction qui se termine correctement + """ + print "D�but" + cnt=0 + while ( cnt < nbsteps ): + print "Etape ", cnt + time.sleep(0.6) + cnt+=1 + + print "Fin" + +def function_with_exception(): + """ + Fonction qui aboutie � une lev�e d'exception + """ + print "D�but" + cnt=0 + while ( cnt < 5 ): + print "Etape ", cnt + time.sleep(1) + cnt+=1 + + raise Exception("erreur d'ex�cution de la fonction") + print "Fin" + +def infinite_function(): + """ + fonction de dur�e infinie (tant qu'il y a du courant �l�ctrique) pour + le test du timeout. + """ + print "D�but" + cnt=0 + while ( 1 ): + print "Etape ", cnt + time.sleep(1) + cnt+=1 + + raise Exception("erreur") + print "Fin" + + +def runWithRunner(functionToRun): + """ + Ex�cute la fonction avec le runner. On illustre ici la modalit� + d'utilisation du Runner. + """ + print "###########" + runner = Runner(functionToRun) + runner.start() + + while ( not runner.isEnded() ): + print "La fonction est en cours" + time.sleep(0.2) + e = runner.getException() + if e is not None: + print "La fonction s'est termin�e en erreur" + print e + # On peut en fait la relancer + # raise e + else: + print "La fonction s'est termin�e correctement" + + +def runWithTimeout(functionToRun, timeout=10): + """ + Ex�cute la fonction avec le runner. On illustre ici la modalit� + d'utilisation du Runner. + """ + print "runWithTimeout : DEBUT" + runner = Runner(functionToRun) + runner.start() + + # On se fixe un temps au del� duquel on consid�re que la fonction + # est en erreur => on tue le thread (timeout) + runner.wait(timeout) + print "Apr�s runner.timeout(timeout)" + if not runner.isEnded(): + runner.kill() + e = runner.getException() + if e is not None: + print "La fonction s'est termin�e en erreur" + print e + # On peut en fait la relancer + # raise e + else: + print "La fonction s'est termin�e correctement" + + print "runWithTimeout : FIN" + import sys + sys.exit(0) + + +def TEST_Timeout(): + #runWithTimeout(function_ok) + #runWithTimeout(function_ok,2) + runWithTimeout(function_with_exception) + + +def TEST_Runner(): + runWithRunner(function_ok) + runWithRunner(function_with_exception) + #runWithRunner(infinite_function) + + +def myCallbackFunction(): + print "myCallbackFunction: the job is ended" + + +def TEST_runWithCallback(): + runner = Runner(function_ok,8) + runner.setCallbackFunction(myCallbackFunction) + runner.start() + + if runner.getException() is not None: + return False + + runnerId = runner.getId() + print "A runner has been started with id="+str(runnerId) + cpt = 0 + while ( not runner.isEnded() ): + print "Waiting notification from process "+str(runner.getId())+", step n°"+str(cpt) + time.sleep(0.2) + cpt+=1 + + return True + +if __name__ == "__main__": + import unittester + #TEST_PeriodicTimer() + #TEST_Runner() + #TEST_Timeout() + unittester.run("threadhelper","TEST_runWithCallback") + + diff --git a/src/KERNEL_PY/kernel/uiexception.py b/src/KERNEL_PY/kernel/uiexception.py new file mode 100644 index 000000000..e6256f3e9 --- /dev/null +++ b/src/KERNEL_PY/kernel/uiexception.py @@ -0,0 +1,106 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2010-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 +# +__author__="gboulant" +__date__ ="$31 mars 2010 11:59:33$" + +from enumerate import Enumerate + +class UiException(Exception): + + TYPES = Enumerate([ + 'USER', # This type should be displayed to end user using a dialog box + 'ADMIN', # This type should be displayed to admin user in console log + 'DEVEL' # This type should be displayed to developer only + ]) + + _UImessage = "An error occurs" + _type = TYPES.USER + + """ + This exception should be used for functionnal error management, at least in the GUI + part of the application, for example to set user oriented messages at point + of exception raise. + WARN: The exception should NOT be used to hide defaults in the algorithm, but + only predicted error in the specified use case. + """ + def __init__(self, message, type=TYPES.USER): + """Canonical constructor""" + Exception.__init__(self,message) + self.setUIMessage(message) + self.setType(type) + + def setUIMessage(self, UImessage): + self._UImessage = UImessage + + def getUIMessage(self): + return self._UImessage + + def setType(self, type): + """Specify the type of this exception. To be choosen in the TYPES list.""" + if not self.TYPES.isValid(type): + raise UiException("The exception type "+str(type)+" can't be used",self.TYPES.DEVEL) + self._type = type + + def getType(self): + return self._type + + def __str__(self): + return self.getUIMessage() + + +def UserException(msg): + return UiException(msg,UiException.TYPES.USER) + +def AdminException(msg): + return UiException(msg,UiException.TYPES.ADMIN) + +def DevelException(msg): + return UiException(msg,UiException.TYPES.DEVEL) + +# +# ============================================================================== +# Basic use cases and unit test functions +# ============================================================================== +# +def somethingGoesWrong(): + raise UiException("Something goes wrong") + +def TEST_uimessage(): + try: + somethingGoesWrong() + return False + except UiException, err: + print 'ERROR: %s' % str(err) + if ( str(err) == "Something goes wrong" ): + return True + else: + return False + +def TEST_specificException(): + print DevelException("err") + print AdminException("err") + print UserException("err") + return True + +if __name__ == "__main__": + import unittester + unittester.run("uiexception","TEST_uimessage") + unittester.run("uiexception","TEST_specificException") + diff --git a/src/KERNEL_PY/kernel/unittester.py b/src/KERNEL_PY/kernel/unittester.py new file mode 100644 index 000000000..b0cf81be4 --- /dev/null +++ b/src/KERNEL_PY/kernel/unittester.py @@ -0,0 +1,72 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2010-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 +# +__author__="gboulant" +__date__ ="$1 avr. 2010 09:45:21$" + +import sys + +def run(modulePath, functionName): + """ + This function should be used for very basic unit tests and only for a + rapid development. A better way should be the pyunit framework. + The function functionName is supposed here to return a boolean value + indicating if the test is OK (True) or NOT OK (False) + """ + moduleName = modulePath.replace('/','.') + __import__ (moduleName) + module=sys.modules[moduleName] + func = getattr(module,functionName) + tabsize = 70-len(moduleName)-len(functionName) + print "[TEST] %s.%s %s test in progress" % (moduleName, functionName,"."*tabsize) + ok = func() + if ( ok ): + print "[TEST] %s.%s %s OK" % (moduleName, functionName,"."*tabsize) + else: + print "[TEST] %s.%s %s NOT OK" % (moduleName, functionName,"."*tabsize) + +def tryfunction(function,*argv): + """ + This function is for debug only. It executes the specified function with the + specified arguments in a try/except bloc so that to display the exception in + the case where an exception is raised (usefull to debug server side of a CORBA + process). + """ + print "[TEST] trying the function %s" % function + try: + return function(*argv) + except Exception, e: + print e + raise e + + +# +# ============================================================================== +# Simple use cases +# ============================================================================== +# +def TEST_myTestIsOk(): + return True + +def TEST_myTestIsNotOk(): + return False + +if __name__ == "__main__": + run("salome/kernel/unittester","TEST_myTestIsOk") + run("salome/kernel/unittester","TEST_myTestIsNotOk") diff --git a/src/KERNEL_PY/kernel_shared_modules.py b/src/KERNEL_PY/kernel_shared_modules.py index 74ddf9587..cdec0a590 100755 --- a/src/KERNEL_PY/kernel_shared_modules.py +++ b/src/KERNEL_PY/kernel_shared_modules.py @@ -1,24 +1,26 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + """ """ diff --git a/src/KERNEL_PY/omnipatch.py b/src/KERNEL_PY/omnipatch.py index e1534408e..9ced59f8a 100644 --- a/src/KERNEL_PY/omnipatch.py +++ b/src/KERNEL_PY/omnipatch.py @@ -1,24 +1,26 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + """ This patch of omniORB is made to make it work with multiple interpreters and to correct the problem of incomplete import of CORBA packages diff --git a/src/KERNEL_PY/salome.py b/src/KERNEL_PY/salome.py index 4756cd580..ea45e9bca 100755 --- a/src/KERNEL_PY/salome.py +++ b/src/KERNEL_PY/salome.py @@ -1,77 +1,137 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + +# ================================================================================ +# WARNING: this file is deprecated and should not be used any more. It has been +# replaced by the file __init__.py of the python package named "salome". +# To prevent any error, a warning is raised in the case where this file is imported +raise RuntimeError("WRN - the file salome.py is deprecated. It should NOT be used any more.") +# ================================================================================ + + # File : salome.py # Author : Paul RASCLE, EDF # Module : SALOME # $Header$ # -""" +""" Module salome gives access to Salome ressources. variables: - salome.orb : CORBA - salome.naming_service : instance of naming Service class - methods: - Resolve(name) : find a CORBA object (ior) by its pathname - Register(name) : register a CORBA object under a pathname - salome.lcc : instance of lifeCycleCORBA class - methods: - FindOrLoadComponent(server,name) : + - salome.orb : CORBA + - salome.naming_service : instance of naming Service class + - methods: + - Resolve(name) : find a CORBA object (ior) by its pathname + - Register(name) : register a CORBA object under a pathname + + - salome.lcc : instance of lifeCycleCORBA class + - methods: + - FindOrLoadComponent(server,name) : obtain an Engine (CORBA object) or launch the Engine if not found, with a Server name and an Engine name - salome.sg - methods: - updateObjBrowser(bool): - getActiveStudyId(): - getActiveStudyName(): - - SelectedCount(): returns number of selected objects - getSelected(i): returns entry of selected object number i - getAllSelected(): returns list of entry of selected objects - AddIObject(Entry): select an existing Interactive object - RemoveIObject(Entry): remove object from selection - ClearIObjects(): clear selection - - Display(*Entry): - DisplayOnly(Entry): - Erase(Entry): - DisplayAll(): - EraseAll(): - - IDToObject(Entry): returns CORBA reference from entry - - salome.myStudyName : active Study Name - salome.myStudyId : active Study Id - salome.myStudy : the active Study itself (CORBA ior) - methods : defined in SALOMEDS.idl + + - salome.sg : salome object to communicate with the graphical user interface (if any) + - methods: + - updateObjBrowser(bool): + - getActiveStudyId(): + - getActiveStudyName(): + + - SelectedCount(): returns number of selected objects + - getSelected(i): returns entry of selected object number i + - getAllSelected(): returns list of entry of selected objects + - AddIObject(Entry): select an existing Interactive object + - RemoveIObject(Entry): remove object from selection + - ClearIObjects(): clear selection + + - Display(*Entry): + - DisplayOnly(Entry): + - Erase(Entry): + - DisplayAll(): + - EraseAll(): + + - IDToObject(Entry): returns CORBA reference from entry + + - salome.myStudyName : active Study Name + - salome.myStudyId : active Study Id + - salome.myStudy : the active Study itself (CORBA ior) + - methods : defined in SALOMEDS.idl """ +## @package salome +# Module salome gives access to Salome ressources. +# +# \param salome.orb : CORBA orb object +# \param salome.naming_service : instance of naming Service class (SALOME_NamingServicePy::SALOME_NamingServicePy_i) +# \param salome.lcc : instance of lifeCycleCORBA class (SALOME_LifeCycleCORBA) +# \param salome.sg : Salome object to communicate with the graphical user interface, if running (see interface in salome_iapp::SalomeOutsideGUI) +# \param salome.myStudyName : active Study Name +# \param salome.myStudyId : active Study Id +# \param salome.myStudy : the active Study (interface SALOMEDS::Study) +# from salome_kernel import * from salome_study import * from salome_iapp import * + +# +# The next block is workaround for the problem of shared symbols loading for the extension modules (e.g. SWIG-generated) +# that causes RTTI unavailable in some cases. To solve this problem, sys.setdlopenflags() function is used. +# Depending on the Python version and platform, the dlopen flags can be defined in the dl, DLFUN or ctypes module. +# +import sys +flags = None +if not flags: + try: + # dl module can be unavailable + import dl + flags = dl.RTLD_NOW | dl.RTLD_GLOBAL + except: + pass + pass +if not flags: + try: + # DLFCN module can be unavailable + import DLFCN + flags = DLFCN.RTLD_NOW | DLFCN.RTLD_GLOBAL + except: + pass + pass +if not flags: + try: + # ctypes module can be unavailable + import ctypes + flags = ctypes.RTLD_GLOBAL + except: + pass + pass + +if flags: + sys.setdlopenflags(flags) + pass + orb, lcc, naming_service, cm,sg=None,None,None,None,None myStudyManager, myStudyId, myStudy, myStudyName=None,None,None,None diff --git a/src/KERNEL_PY/salome_ComponentGUI.py b/src/KERNEL_PY/salome_ComponentGUI.py index a2b0f42de..6cb692dcb 100644 --- a/src/KERNEL_PY/salome_ComponentGUI.py +++ b/src/KERNEL_PY/salome_ComponentGUI.py @@ -1,24 +1,26 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : salome.py # Author : Paul RASCLE, EDF # Module : SALOME @@ -37,6 +39,16 @@ def getShapeTypeString(aSubId): #-------------------------------------------------------------------------- +def createAndDisplayGO( *args, **kwargs ): + pass + + #-------------------------------------------------------------------------- + +def UpdateViewer(): + pass + + #-------------------------------------------------------------------------- + # --- From SMESHGUI_SWIG #-------------------------------------------------------------------------- diff --git a/src/KERNEL_PY/salome_genericobj.py b/src/KERNEL_PY/salome_genericobj.py new file mode 100644 index 000000000..9a54c87f5 --- /dev/null +++ b/src/KERNEL_PY/salome_genericobj.py @@ -0,0 +1,44 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 +# + +""" + When imported this module adds to CORBA objref from GenericObj type + automatic management of reference count + The reference count is incremented when the local proxy is created (assignment of __omni_obj attribute) + and is decremented when the local proxy is deleted (call of __del__) + + The GenericObj class for proxy is modified by adding two methods : __del__ and __setattr__ + The module must be imported before any other import of SALOME CORBA module +""" +import omniORB +import SALOME + +def mydel(self): + self.UnRegister() + omniORB.CORBA.Object.__del__(self) + +def mysetattr(self,attr,value): + self.__dict__[attr]=value + if attr == "__omni_obj": + self.Register() + +SALOME._objref_GenericObj.__del__=mydel +SALOME._objref_GenericObj.__setattr__=mysetattr + diff --git a/src/KERNEL_PY/salome_iapp.py b/src/KERNEL_PY/salome_iapp.py index 323a079e3..2301ff681 100644 --- a/src/KERNEL_PY/salome_iapp.py +++ b/src/KERNEL_PY/salome_iapp.py @@ -1,28 +1,32 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : salome_iapp.py # Author : Paul RASCLE, EDF # Module : SALOME # $Header$ +## @package salome_iapp +# Module salome gives access to Salome GUI ressources (if GUI has been launched). # import salome_ComponentGUI @@ -70,69 +74,86 @@ class SalomeOutsideGUI(object): global myStudyId, myStudyName def hasDesktop(self): + """Indicate if GUI is running""" return False def updateObjBrowser(self, bid): + """update the GUI object browser""" print "SalomeOutsideGUI: no objectBrowser update outside GUI" pass def getActiveStudyId(self): + """Get the active study id""" print "SalomeOutsideGUI.getActiveStudyId: avoid use outside GUI" return myStudyId def getActiveStudyName(self): + """Get the active study name""" print "SalomeOutsideGUI.getActiveStudyName: avoid use outside GUI" return myStudyName def SelectedCount(self): + """Get the number of active selections""" print "SalomeOutsideGUI: no selection mecanism available outside GUI" return 0 def getSelected(self, i): + """Get the selection number i """ print "SalomeOutsideGUI: no selection mecanism available outside GUI" return none def AddIObject(self, Entry): + """Add an entry""" print "SalomeOutsideGUI.AddIOObject: not available outside GUI" pass def RemoveIObject(self, Entry): + """Remove an entry""" print "SalomeOutsideGUI.REmoveIOObject: not available outside GUI" pass def ClearIObjects(self): + """Clear entries""" print "SalomeOutsideGUI.ClearIOObject: not available outside GUI" pass def Display(self, Entry): + """Display an entry""" print "SalomeOutsideGUI.Display: not available outside GUI" pass def DisplayOnly(self, Entry): + """Display only an entry""" print "SalomeOutsideGUI.DisplayOnly: not available outside GUI" pass def Erase(self, Entry): + """Erase en entry""" print "SalomeOutsideGUI.Erase: not available outside GUI" pass def DisplayAll(self): + """Display all""" print "SalomeOutsideGUI.Erase: not available outside GUI" pass def EraseAll(self): + """Erase all""" print "SalomeOutsideGUI.EraseAll: not available outside GUI" pass def IsInCurrentView(self, Entry): + """Indicate if an entry is in current view""" print "SalomeOutsideGUI.IsIncurentView: not available outside GUI" return False def getComponentName(self, ComponentUserName ): + """Get component name from component user name""" print "SalomeOutsideGUI.getComponentName: not available outside GUI" return "" def getComponentUserName( self, ComponentName ): + """Get component user name from component name""" print "SalomeOutsideGUI.getComponentUserName: not available outside GUI" return "" diff --git a/src/KERNEL_PY/salome_kernel.py b/src/KERNEL_PY/salome_kernel.py index 162ab6cd1..f9ce52e92 100644 --- a/src/KERNEL_PY/salome_kernel.py +++ b/src/KERNEL_PY/salome_kernel.py @@ -1,24 +1,26 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : salome_kernel.py # Author : Paul RASCLE, EDF # Module : SALOME diff --git a/src/KERNEL_PY/salome_notebook.py b/src/KERNEL_PY/salome_notebook.py index cdc5a5ad1..682402faa 100644 --- a/src/KERNEL_PY/salome_notebook.py +++ b/src/KERNEL_PY/salome_notebook.py @@ -1,44 +1,82 @@ -# Copyright (C) 2008 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# 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 +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 # + # File : salome_notebook.py # Author : Roman NIKOLAEV, Open CASCADE S.A.S. # Module : SALOME # $Header: +# """ Module salome_notebook gives access to Salome Notebook. """ import salome +class PseudoStudyForNoteBook(object): + + def __init__(self, **kwargs): + self.kwargs = kwargs + pass + + def GetVariableNames(self): + return self.kwargs.keys() + + def IsVariable(self, variableName): + return variableName in self.kwargs + + def IsReal(self, variableName): + val = self.kwargs[variableName] + try: + float(val) + return True + except: + pass + return False + + IsInteger = IsReal + IsBoolean = IsReal + + def IsString(self, variableName): + return not self.IsReal(variableName) + + def GetString(self, variableName): + return self.kwargs[variableName] + + def GetReal(self, variableName): + return float(self.kwargs[variableName]) + + GetInteger = GetReal + GetBoolean = GetReal + + pass + class NoteBook: def __init__(self, Study): self.myStudy = Study def set(self, variableName, variable): - """ - Create (or modify) variable with name "variableName" - and value equal "theValue". - """ + """ + Create (or modify) variable with name "variableName" + and value equal "theValue". + """ if type(variable) == float: self.myStudy.SetReal(variableName, variable) @@ -48,10 +86,13 @@ class NoteBook: elif type(variable) == bool: self.myStudy.SetBoolean(variableName, variable) + elif type(variable) == str: + self.myStudy.SetString(variableName, variable) + def get(self, variableName): - """ - Return value of the variable with name "variableName". - """ + """ + Return value of the variable with name "variableName". + """ aResult = None if self.myStudy.IsVariable(variableName): @@ -63,14 +104,76 @@ class NoteBook: elif self.myStudy.IsBoolean(variableName): aResult = self.myStudy.GetBoolean(variableName) + + elif self.myStudy.IsString(variableName): + aResult = self.myStudy.GetString(variableName) + aResult_orig = aResult + l = self.myStudy.GetVariableNames() + l.remove(variableName) + # -- + # To avoid the smallest strings to be replaced first, + # the list is sorted by decreasing lengths + # -- + l.sort(key=str.__len__) + l.reverse() + for name in l: + if aResult.find(name) >= 0: + val = self.get(name) + aResult = aResult.replace(name, "%s"%(val)) + pass + pass + try: + aResult = eval(aResult) + except Exception, e: + msg = str(e) + msg += "\n" + msg += "A problem occurs while parsing " + msg += "the variable %s "%(variableName.__repr__()) + msg += "with value %s ..."%(aResult_orig.__repr__()) + msg += "\n" + msg += "Please, check your notebook !" + raise Exception(msg) + pass return aResult def isVariable(self, variableName): - """ - Return true if variable with name "variableName" - exists in the study, otherwise return false. - """ + """ + Return true if variable with name "variableName" + exists in the study, otherwise return false. + """ return self.myStudy.IsVariable(variableName) - -notebook = NoteBook(salome.myStudy) \ No newline at end of file + + def setAs(self, variableName, typ): + value = self.get(variableName) + value = float(typ(value)) + self.myStudy.SetStringAsDouble(variableName, value) + return + + def setAsReal(self, variableName): + self.setAs(variableName, float) + return + + def setAsInteger(self, variableName): + self.setAs(variableName, int) + return + + def setAsBool(self, variableName): + self.setAs(variableName, bool) + return + + def check(self): + for variableName in self.myStudy.GetVariableNames(): + self.get(variableName) + pass + return + + pass + +def checkThisNoteBook(**kwargs): + study = PseudoStudyForNoteBook(**kwargs) + note_book = NoteBook(study) + note_book.check() + return + +notebook = NoteBook(salome.myStudy) diff --git a/src/KERNEL_PY/salome_pynode.py b/src/KERNEL_PY/salome_pynode.py new file mode 100644 index 000000000..178505d1a --- /dev/null +++ b/src/KERNEL_PY/salome_pynode.py @@ -0,0 +1,74 @@ +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 +# + +# File : salome_pynode.py +# Author : Christian CAREMOLI, EDF +# Module : SALOME +# $Header$ +# +""" + When imported this module adds to CORBA proxy (from PyNode type) automatic pickle and unpickle + of arguments and results when calling execute method. It also converts the SALOME exception into a standard python + exception +""" +import omniORB +import cPickle +import SALOME +import Engines + +class SmartPyNode(Engines._objref_PyNode): + def __init__(self): + Engines._objref_PyNode.__init__(self) + + def execute(self,functionName,*args,**kws): + try: + args=cPickle.dumps((args,kws),-1) + results=Engines._objref_PyNode.execute(self,functionName,args) + x=cPickle.loads(results) + return x + except SALOME.SALOME_Exception, e: + raise ValueError(e.details.text) + + def __getattr__(self,name): + """ a trick to be able to call directly a remote method by its name : no need to use execute""" + if name[0]== '_': + raise AttributeError, name + def afunc(*args,**kws): + return self.execute(name,*args,**kws) + return afunc + +class SmartPyScriptNode(Engines._objref_PyScriptNode): + def __init__(self): + Engines._objref_PyScriptNode.__init__(self) + + def execute(self,outargsname,*args,**kws): + #the tuple args are ignored + try: + args=cPickle.dumps(((),kws),-1) + results=Engines._objref_PyScriptNode.execute(self,outargsname,args) + x=cPickle.loads(results) + return x + except SALOME.SALOME_Exception, e: + raise ValueError(e.details.text) + +#Register the new proxy for PyNode +omniORB.registerObjref(Engines._objref_PyNode._NP_RepositoryId, SmartPyNode) +#Register the new proxy for PyScriptNode +omniORB.registerObjref(Engines._objref_PyScriptNode._NP_RepositoryId, SmartPyScriptNode) + diff --git a/src/KERNEL_PY/salome_shared_modules.py b/src/KERNEL_PY/salome_shared_modules.py index 57c128cc6..7cba8b833 100755 --- a/src/KERNEL_PY/salome_shared_modules.py +++ b/src/KERNEL_PY/salome_shared_modules.py @@ -1,24 +1,26 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : salome_shared_modules.py # Module : SALOME # diff --git a/src/KERNEL_PY/salome_study.py b/src/KERNEL_PY/salome_study.py index a6352447c..5de40bc3a 100644 --- a/src/KERNEL_PY/salome_study.py +++ b/src/KERNEL_PY/salome_study.py @@ -1,24 +1,26 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : salome_study.py # Author : Paul RASCLE, EDF # Module : SALOME @@ -108,8 +110,8 @@ def IDToSObject(id): #-------------------------------------------------------------------------- def generateName(prefix = None): - import whrandom; - int = whrandom.randint(1,1000); + import random; + int = random.randint(1,1000); if prefix is None: return "Study" + str(int) else : @@ -248,7 +250,7 @@ salome_study_ID = -1 def getActiveStudy(theStudyId=0): global salome_study_ID - + if verbose(): print "getActiveStudy" if salome_study_ID == -1: if salome_iapp.hasDesktop(): @@ -265,7 +267,42 @@ def getActiveStudy(theStudyId=0): salome_study_ID = createNewStudy() if verbose(): print"--- Study Id ", salome_study_ID return salome_study_ID - + + #-------------------------------------------------------------------------- + +def setCurrentStudy(theStudy): + """ + Change current study : an existing one given by a study object. + + :param theStudy: the study CORBA object to set as current study + """ + global myStudyId, myStudy, myStudyName + global salome_study_ID + myStudy=theStudy + myStudyId=theStudy._get_StudyId() + myStudyName=theStudy._get_Name() + return myStudyId, myStudy, myStudyName + + #-------------------------------------------------------------------------- + +def setCurrentStudyId(theStudyId=0): + """ + Change current study : an existing or new one. + optional argument : theStudyId + 0 : create a new study (default). + n (>0) : try connection to study with Id = n, or create a new one + if study not found. + """ + global myStudyId, myStudy, myStudyName + global salome_study_ID + salome_study_ID = -1 + myStudyId = getActiveStudy(theStudyId) + if verbose(): print "myStudyId",myStudyId + myStudy = myStudyManager.GetStudyByID(myStudyId) + myStudyName = myStudy._get_Name() + + return myStudyId, myStudy, myStudyName + #-------------------------------------------------------------------------- def createNewStudy(): @@ -301,16 +338,16 @@ def salome_study_init(theStudyId=0): n (>0) : try connection to study with Id = n, or create a new one if study not found. """ - + global salome_study_initial global myStudyManager, myStudyId, myStudy, myStudyName global orb, lcc, naming_service, cm - + if salome_study_initial: salome_study_initial = 0 - + orb, lcc, naming_service, cm = salome_kernel.salome_kernel_init() - + # get Study Manager reference if verbose(): print "looking for studyManager ..." obj = naming_service.Resolve('myStudyManager') diff --git a/src/KERNEL_PY/salome_test.py b/src/KERNEL_PY/salome_test.py index 23d7d4a1a..4db899619 100755 --- a/src/KERNEL_PY/salome_test.py +++ b/src/KERNEL_PY/salome_test.py @@ -1,112 +1,136 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -# SALOME SALOME_SWIG : binding of C++ implementation and Python -# File : salome_test.py -# Module : SALOME -# -print "Test the application loading GEOM, SMESH, VISU, MED, components and doing some" -print "operation within the components." + +print +print "Perform quick test of the application by loading of the GEOM, SMESH, VISU, MED" +print "components and doing some operation within the components." +print import salome -from salome import sg +import SALOME import SALOMEDS import os import sys - import SALOME_ModuleCatalog +step = 1 + print "======================================================================" -print " Check, that there is no data of MED component in the Study " +print " %d. Initialize study " % step; step+=1 print "======================================================================" -MedComp = salome.myStudy.FindComponent("MED") -if MedComp is not None: - print "" - print "This script cannot work properly, because there are" - print "some MED component data already exists in the study." - print "Execution aborted." - print "" - raise RuntimeError, "Please, run this script only in a new empty study." +# initialize study +salome.salome_init() +# get study builder +builder = salome.myStudy.NewBuilder() +print "OK" + +print print "======================================================================" -print " Get Catalog " +print " %d. Retrieve module catalog " % step; step+=1 print "======================================================================" + obj = salome.naming_service.Resolve('Kernel/ModulCatalog') catalog = obj._narrow(SALOME_ModuleCatalog.ModuleCatalog) +if not catalog: + raise RuntimeError, "Can't accesss module catalog" +print "OK" + +print print "======================================================================" -print " Create Study " +print " %d. Check modules availability in the module catalog " % step; step+=1 print "======================================================================" +print +print "--- Check GEOM ..." comp = catalog.GetComponent("GEOM") -if comp is None: - raise RuntimeError,"Component GEOM not found in Module Catalog." - -import geompy +if not comp: + raise RuntimeError, "Component GEOM is not found in Module Catalog." +print "OK" -print "=================================" -print " create AttributeReal " -print "=================================" -A = geompy.myBuilder.FindOrCreateAttribute(geompy.father, "AttributeReal") -if A == None : - raise RuntimeError, "Can't create AttributeReal attribute" -A = A._narrow(SALOMEDS.AttributeReal) -A.SetValue(0.0001) -if A.Value() != 0.0001: - raise RuntimeError, "Error : wrong value of AttributeReal" +print +print "--- Check SMESH ..." +comp = catalog.GetComponent("SMESH") +if not comp: + raise RuntimeError, "Component SMESH is not found in Module Catalog." +print "OK" print -print " =========== Test Geometry ==========================" +print "--- Check MED ..." +comp = catalog.GetComponent("MED") +if not comp: + raise RuntimeError, "Component MED is not found in Module Catalog." +print "OK" + print +print "--- Check VISU ..." +comp = catalog.GetComponent("VISU") +if not comp: + raise RuntimeError, "Component VISU is not found in Module Catalog." +print "OK" -print "===================================" -print " define a box" -print "===================================" +print -box = geompy.MakeBox(0., 0., 0., 100., 200., 300.) -idbox = geompy.addToStudy(box,"box") +print "======================================================================" +print " %d. Test Data Server " % step; step+=1 +print "======================================================================" print -print "============= Test SMESH =============================" -print +print "--- Create new component ..." +comp = builder.NewComponent("TEST") +if not comp: + raise RuntimeError, "Can't create new component" +print "OK" -import StdMeshers - -comp = catalog.GetComponent("SMESH") -if comp is None: - raise RuntimeError,"Component SMESH not found in Module Catalog." +print +print "--- Create AttributeName ..." +A = builder.FindOrCreateAttribute(comp, "AttributeName") +if not A: + raise RuntimeError, "Can't create AttributeName attribute" +A.SetValue("TEST") +if A.Value() != "TEST": + raise RuntimeError, "Error : wrong value of AttributeName" +print "OK" -comp = catalog.GetComponent("MED") -if comp is None: - raise RuntimeError,"Component MED not found in Module Catalog." +print +print "--- Create AttributeReal ..." +A = builder.FindOrCreateAttribute(comp, "AttributeReal") +if not A: + raise RuntimeError, "Can't create AttributeReal attribute" +A.SetValue(0.0001) +if A.Value() != 0.0001: + raise RuntimeError, "Error : wrong value of AttributeReal" +print "OK" -import SMESH +print -geom = salome.lcc.FindOrLoadComponent("FactoryServer", "GEOM") -myBuilder = salome.myStudy.NewBuilder() +print "======================================================================" +print " %d. Test Geometry " % step; step+=1 +print "======================================================================" -smesh = salome.lcc.FindOrLoadComponent("FactoryServer", "SMESH") -smeshgui = salome.ImportComponentGUI("SMESH") -smeshgui.Init(salome.myStudyId); +import geompy ShapeTypeCompSolid = 1 ShapeTypeSolid = 2 @@ -116,422 +140,305 @@ ShapeTypeWire = 5 ShapeTypeEdge = 6 ShapeTypeVertex = 7 -# ---- define a box - +print +print "--- Create a box ..." box = geompy.MakeBox(0., 0., 0., 100., 200., 300.) -idbox = geompy.addToStudy(box,"box") +idbox = geompy.addToStudy(box, "box") +box_obj = salome.myStudy.FindObjectByPath("/Geometry/box") +if not box_obj: + raise RuntimeError, "Error : wrong value of AttributeReal" +print "OK" + +# ---- add shell from box in study +print +print "--- Extract shell ..." +subShellList = geompy.SubShapeAll(box, ShapeTypeShell) +shell = subShellList[0] +name = geompy.SubShapeName(shell, box) +idshell = geompy.addToStudyInFather(box, shell, name) +print name +print "OK" # ---- add first face of box in study - -subShapeList=geompy.SubShapeAll(box,ShapeTypeFace) -face=subShapeList[0] +print +print "--- Extract face ..." +subShapeList = geompy.SubShapeAll(box, ShapeTypeFace) +face = subShapeList[0] name = geompy.SubShapeName(face, box) +idface = geompy.addToStudyInFather(box, face, name) print name -idface=geompy.addToStudyInFather(box,face,name) - -# ---- add shell from box in study - -subShellList=geompy.SubShapeAll(box,ShapeTypeShell) -shell = subShellList[0] -name = geompy.SubShapeName(shell, box) -print name -idshell=geompy.addToStudyInFather(box,shell,name) +print "OK" # ---- add first edge of face in study - -edgeList = geompy.SubShapeAll(face,ShapeTypeEdge) -edge=edgeList[0]; +print +print "--- Extract edge ..." +edgeList = geompy.SubShapeAll(face, ShapeTypeEdge) +edge = edgeList[0]; name = geompy.SubShapeName(edge, face) +idedge = geompy.addToStudyInFather(face, edge, name) print name -idedge=geompy.addToStudyInFather(face,edge,name) +print "OK" +# ---- update object browser +if salome.hasDesktop(): + salome.sg.updateObjBrowser(1); -# ---- SMESH +print -# ---- create Hypothesis +print "======================================================================" +print " %d. Test Mesh " % step; step+=1 +print "======================================================================" + +import StdMeshers +import SMESH + +smesh = salome.lcc.FindOrLoadComponent("FactoryServer", "SMESH") +if salome.hasDesktop(): + smeshgui = salome.ImportComponentGUI("SMESH") + smeshgui.Init(salome.myStudyId); +else: + smesh.SetCurrentStudy(salome.myStudy) + +# ---- create hypotheses if sys.platform == "win32": stdMeshersEngine = "StdMeshersEngine" else: stdMeshersEngine = "libStdMeshersEngine.so" -print "-------------------------- create Hypothesis" -print "-------------------------- LocalLength" +print +print "--- Create hypotheses ..." + +print +print "------ LocalLength ..." hypLen1 = smesh.CreateHypothesis( "LocalLength", stdMeshersEngine ) hypLen1.SetLength(100) print hypLen1.GetName() print hypLen1.GetId() print hypLen1.GetLength() +if salome.hasDesktop(): + smeshgui.SetName(salome.ObjectToID(hypLen1), "Local_Length_100") +print "OK" -smeshgui.SetName(salome.ObjectToID(hypLen1), "Local_Length_100") - -print "-------------------------- NumberOfSegments" +print +print "------ NumberOfSegments ..." hypNbSeg1= smesh.CreateHypothesis( "NumberOfSegments", stdMeshersEngine ) hypNbSeg1.SetNumberOfSegments(7) print hypNbSeg1.GetName() print hypNbSeg1.GetId() print hypNbSeg1.GetNumberOfSegments() +if salome.hasDesktop(): + smeshgui.SetName(salome.ObjectToID(hypNbSeg1), "NumberOfSegments_7") +print "OK" -smeshgui.SetName(salome.ObjectToID(hypNbSeg1), "NumberOfSegments_7") - -print "-------------------------- MaxElementArea" +print +print "------ MaxElementArea [1] ..." hypArea1 = smesh.CreateHypothesis( "MaxElementArea", stdMeshersEngine ) hypArea1.SetMaxElementArea(2500) print hypArea1.GetName() print hypArea1.GetId() print hypArea1.GetMaxElementArea() +if salome.hasDesktop(): + smeshgui.SetName(salome.ObjectToID(hypArea1), "MaxElementArea_2500") +print "OK" -smeshgui.SetName(salome.ObjectToID(hypArea1), "MaxElementArea_2500") - -print "-------------------------- MaxElementArea" +print +print "------ MaxElementArea [2] ..." hypArea2 = smesh.CreateHypothesis( "MaxElementArea", stdMeshersEngine ) hypArea2.SetMaxElementArea(500) print hypArea2.GetName() print hypArea2.GetId() print hypArea2.GetMaxElementArea() +if salome.hasDesktop(): + smeshgui.SetName(salome.ObjectToID(hypArea2), "MaxElementArea_500") +print "OK" + +# ---- create algorithms -smeshgui.SetName(salome.ObjectToID(hypArea2), "MaxElementArea_500") +print +print "--- Create algorithms ..." -print "-------------------------- Regular_1D" +print +print "------ Regular_1D ..." algoReg = smesh.CreateHypothesis( "Regular_1D", stdMeshersEngine ) -listHyp=algoReg.GetCompatibleHypothesis() +listHyp = algoReg.GetCompatibleHypothesis() for hyp in listHyp: print hyp print algoReg.GetName() print algoReg.GetId() +if salome.hasDesktop(): + smeshgui.SetName(salome.ObjectToID(algoReg), "Regular_1D" ) +print "OK" -smeshgui.SetName(salome.ObjectToID(algoReg), "Regular_1D" ) - -print "-------------------------- MEFISTO_2D" +print +print "------ MEFISTO_2D ..." algoMef = smesh.CreateHypothesis( "MEFISTO_2D", stdMeshersEngine ) listHyp=algoMef.GetCompatibleHypothesis() for hyp in listHyp: print hyp print algoMef.GetName() print algoMef.GetId() +if salome.hasDesktop(): + smeshgui.SetName(salome.ObjectToID(algoMef), "MEFISTO_2D" ) +print "OK" -smeshgui.SetName(salome.ObjectToID(algoMef), "MEFISTO_2D" ) +# ---- create mesh on the box, apply hypotheses / algorithms -# ---- add hypothesis to box - -print "-------------------------- add hypothesis to box" -box=salome.IDToObject(idbox) +print +print "--- Create mesh on the box ..." mesh = smesh.CreateMesh(box) +if salome.hasDesktop(): + smeshgui.SetName( salome.ObjectToID(mesh), "MeshBox" ); +ret = mesh.AddHypothesis(box, algoReg) +ret = mesh.AddHypothesis(box, algoMef) +ret = mesh.AddHypothesis(box, hypNbSeg1) +ret = mesh.AddHypothesis(box, hypArea1) +print "OK" -smeshgui.SetName( salome.ObjectToID(mesh), "MeshBox" ); +# ---- create submesh on the edge, add hypothesis -ret=mesh.AddHypothesis(box,algoReg) -print ret -ret=mesh.AddHypothesis(box,algoMef) -print ret +print +print "--- Add 1D sub-mesh on the edge ..." +submesh = mesh.GetSubMesh(edge, "SubMeshEdge") +ret = mesh.AddHypothesis(edge, algoReg) +ret = mesh.AddHypothesis(edge, hypLen1) +print "OK" +# ---- create submesh on the edge, add hypothesis -ret=mesh.AddHypothesis(box,hypNbSeg1) -print ret -ret=mesh.AddHypothesis(box,hypArea1) -print ret +print +print "--- Add 2D sub-mesh on the face ..." +submesh = mesh.GetSubMesh(face, "SubMeshFace") +ret = mesh.AddHypothesis(face, hypArea2) +print "OK" +# ---- compute mesh +print +print "--- Compute mesh ..." +smesh.Compute(mesh, box) +print "OK" -# ---- add hypothesis to edge +# ---- update object browser +if salome.hasDesktop(): + salome.sg.updateObjBrowser(1); -print "-------------------------- add hypothesis to edge" -edge=salome.IDToObject(idedge) -submesh=mesh.GetSubMesh(edge, "SubMeshEdge") +print -ret=mesh.AddHypothesis(edge,algoReg) -print ret -ret=mesh.AddHypothesis(edge,hypLen1) -print ret +print "======================================================================" +print " %d. Test Med " % step; step+=1 +print "======================================================================" -print "-------------------------- add hypothesis to face" -face=salome.IDToObject(idface) -submesh = mesh.GetSubMesh(face, "SubMeshFace") +import SALOME_MED -ret=mesh.AddHypothesis(face,hypArea2) -print ret +medFileName = "pointe.med" +medFile = os.path.join(os.getenv('DATA_DIR'), 'MedFiles', medFileName) -smesh.Compute(mesh, box) -sg.updateObjBrowser(1); - -# SUPERVISOR module is not available since SALOME 5.0 version -defineSuperV = 0 - -if (defineSuperV != 0) & (sys.platform != "win32"): - print - print "============= Test Supervisor =============================" - print - - comp = catalog.GetComponent("SUPERV") - if comp is None: - raise RuntimeError,"Component SUPERV not found in Module Catalog." - - from SuperV import * - import SALOMEDS - myStudy = salome.myStudy - myBuilder = myStudy.NewBuilder() - - SuperVision = lcc.FindOrLoadComponent("SuperVisionContainer","SUPERV") - father = myStudy.FindComponent("SUPERV") - if father is None: - father = myBuilder.NewComponent("SUPERV") - A1 = myBuilder.FindOrCreateAttribute(father, "AttributeName"); - FName = A1._narrow(SALOMEDS.AttributeName) - FName.SetValue( salome.sg.getComponentUserName("SUPERV") ) - A2 = myBuilder.FindOrCreateAttribute(father, "AttributePixMap"); - aPixmap = A2._narrow(SALOMEDS.AttributePixMap); - aPixmap.SetPixMap( "ICON_OBJBROWSER_Supervision" ); - myBuilder.DefineComponentInstance(father,SuperVision) - - def addStudy(ior): - dataflow = SuperVision.getStreamGraph(ior) - name=dataflow.Name() - itr = myStudy.NewChildIterator(father) - while itr.More(): - item=itr.Value() - res,A=item.FindAttribute("AttributeName") - if res: - aName = A._narrow(SALOMEDS.AttributeName) - if aName.Value() == name : - print myBuilder.FindOrCreateAttribute(item, "AttributeIOR") - A = myBuilder.FindOrCreateAttribute(item, "AttributeIOR") - print "A = ", A - if A is not None : - #res,A = myBuilder.FindOrCreateAttribute(item, "AttributeIOR") - anIOR = A._narrow(SALOMEDS.AttributeIOR); - print "anIOR.SetValue(dataflow.getIOR())" - anIOR.SetValue(dataflow.getIOR()) - return - itr.Next() - obj = myBuilder.NewObject(father) - A=myBuilder.FindOrCreateAttribute(obj, "AttributeName") - aName=A._narrow(SALOMEDS.AttributeName) - aName.SetValue(name) - A=myBuilder.FindOrCreateAttribute(obj, "AttributeIOR") - anIOR = A._narrow(SALOMEDS.AttributeIOR) - anIOR.SetValue(dataflow.getIOR()) - - import os - dir= os.getenv("DATA_DIR") - if dir == None: - raise RuntimeError, "DATA_DIR is not defined" - xmlfile = dir + "/Superv/Graphs/GraphGeomEssaiGates.xml" - print "Load dataflow from the file : " - print xmlfile - print - - myGraph = StreamGraph ( xmlfile ) - - # This DataFlow is "valid" : no loop, correct links between Nodes etc... - print "myGraph.IsValid() = ", myGraph.IsValid() - - # Get Nodes - myGraph.PrintNodes() - - # This DataFlow is "executable" : all pending Ports are defined with Datas - print myGraph.IsExecutable() - - # Starts only execution of that DataFlow and gets control immediatly - print myGraph.Run() - - # That DataFlow is running ==> 0 (false) - print myGraph.IsDone() - - # Events of execution : - aStatus,aNode,anEvent,aState = myGraph.Event() - while aStatus : - print aNode.Thread(),aNode.SubGraph(),aNode.Name(),anEvent,aState - aStatus,aNode,anEvent,aState = myGraph.Event() - print "myGraph.IsDone() = ",myGraph.IsDone() - - # Wait for Completion (but it is already done after event loop ...) - print "Done : ",myGraph.DoneW() - - print " " - #print "Type : print myGraph.IsDone()" - #print " If execution is finished ==> 1 (true)" - res=myGraph.IsDone() - if res != 1: - raise RuntimeError, "myGraph.Run() is not done" - - print " " - print "Type : myGraph.PrintPorts()" - print " to see input and output values of the graph" - myGraph.PrintPorts() - - # Export will create newsupervisionexample.xml and the corresponding .py file - tmpdir=os.getenv("TmpDir") - if tmpdir is None: - tmpdir="/tmp" - file = tmpdir + "/newsupervisionexample" - print "--------------\n"+file+"\n--------------\n" - myGraph.Export(file) - - ior = salome.orb.object_to_string(myGraph.G) - addStudy(ior) - - GraphName = myGraph.Name() - print "Befor save ", - #nodes = myGraph.Nodes() - nodes = myGraph.G.Nodes().FNodes - length_bs = len(nodes) - print "ListOfNodes length = ", length_bs - names=[] - for node in nodes: - names.append(node.Name()) - print names - - # Graph creation - GraphInLines = StreamGraph( 'GraphInLines' ) - GraphInLines.SetName( 'GraphInLines' ) - GraphInLines.SetAuthor( '' ) - GraphInLines.SetComment( '' ) - GraphInLines.Coords( 0 , 0 ) - - # Creation of InLine Nodes - PyAdd = [] - PyAdd.append( 'def Add(a,b) : ' ) - PyAdd.append( ' return a+b ' ) - PyAdd.append( '' ) - Add = GraphInLines.INode( 'Add' , PyAdd ) - Add.InPort( 'a' , 'long' ) - Add.InPort( 'b' , 'long' ) - Add.OutPort( 'f' , 'long' ) - Add.SetName( 'Add' ) - Add.SetAuthor( '' ) - Add.SetComment( 'Python function' ) - Add.Coords( 351 , 77 ) - PySub = [] - PySub.append( 'def Sub(a,b) : ' ) - PySub.append( ' return a-b ' ) - PySub.append( '' ) - Sub = GraphInLines.INode( 'Sub' , PySub ) - Sub.InPort( 'a' , 'long' ) - Sub.InPort( 'b' , 'long' ) - Sub.OutPort( 'f' , 'long' ) - Sub.SetName( 'Sub' ) - Sub.SetAuthor( '' ) - Sub.SetComment( 'Python function' ) - Sub.Coords( 86 , 333 ) - PyMul = [] - PyMul.append( 'def Mul(a,b) : ' ) - PyMul.append( ' return a*b ' ) - Mul = GraphInLines.INode( 'Mul' , PyMul ) - Mul.InPort( 'a' , 'long' ) - Mul.InPort( 'b' , 'long' ) - Mul.OutPort( 'Result' , 'long' ) - Mul.SetName( 'Mul' ) - Mul.SetAuthor( '' ) - Mul.SetComment( 'Python function' ) - Mul.Coords( 616 , 247 ) - - # Creation of intermediate Output variables and of Control Links - Addf = Add.Port( 'f' ) - Mula = GraphInLines.Link( Addf , Mul.Port( 'a' ) ) - Mula.AddCoord( 1 , 570 , 356 ) - Mula.AddCoord( 2 , 570 , 186 ) - Subf = Sub.Port( 'f' ) - Mulb = GraphInLines.Link( Subf , Mul.Port( 'b' ) ) - Mulb.AddCoord( 1 , 282 , 376 ) - Mulb.AddCoord( 2 , 282 , 442 ) - Addb = GraphInLines.Link( Subf , Add.Port( 'b' ) ) - Addb.AddCoord( 1 , 283 , 209 ) - Addb.AddCoord( 2 , 283 , 374 ) - Addb.AddCoord( 3 , 283 , 442 ) - - # Creation of Input datas - Adda = Add.Input( 'a' , 1) - Suba = Sub.Input( 'a' , 3) - Subb = Sub.Input( 'b' , 4) - - # Creation of Output variables - MulResult = Mul.Port( 'Result' ) - - GraphInLines.Run() - - GraphInLines.DoneW() - - GraphInLines.PrintPorts() - - sg.updateObjBrowser(1); - - pass +med_comp = salome.myStudy.FindComponent("MED") + +if not med_comp: + med = salome.lcc.FindOrLoadComponent("FactoryServer", "MED") + + print + print "--- Read med file structure from %s ..." % medFile + med.readStructFileWithFieldType(medFile, salome.myStudyName) + print "OK" + pass +else: + print + print "This script cannot work properly, because there is" + print "some MED component data already existing in the study." + print "Execution aborted." + print + print "Skipping test for MED..." + pass -print -print "============= Test VISU and MED =============================" print -comp = catalog.GetComponent("VISU") -if comp is None: - raise RuntimeError,"Component VISU not found in Module Catalog." +print "======================================================================" +print " %d. Test Post-Pro " % step; step+=1 +print "======================================================================" -import sys -import SALOMEDS -import SALOME -import SALOME_MED import VISU -import visu_gui - -medFileName = "pointe.med" -medFile = os.getenv('DATA_DIR') + '/MedFiles/' + medFileName -print "Load ", medFile - -studyCurrent = salome.myStudyName - -med_comp = salome.lcc.FindOrLoadComponent("FactoryServer", "MED") -myVisu = salome.lcc.FindOrLoadComponent("FactoryServer", "VISU") - -try: - if os.access(medFile, os.R_OK) : - if not os.access(medFile, os.W_OK) : - import random - if sys.platform != "win32": - tmpDir = "/tmp/" - else: - tmpDir = os.getenv('TEMP') + '/' - medFileNew = tmpDir + str(random.randint(0,1000000)) + "_" + medFileName - print " -- Copy " + medFile + " to " + medFileNew - - if sys.platform != "win32": - copyCommand = "cp" - else: - copyCommand = "copy /Y" - os.system(copyCommand + " " + medFile + " " + medFileNew) - - medFile = medFileNew - os.system("chmod 755 " + medFile) - - if os.access(medFile, os.W_OK) : - med_comp.readStructFileWithFieldType(medFile,studyCurrent) - med_obj = visu_gui.visu.getMedObjectFromStudy() - print "med_obj - ", med_obj - - myField1 = visu_gui.visu.getFieldObjectFromStudy(2,1) - aMeshName = "maa1" - anEntity = VISU.NODE - aTimeStampId = -1 - - myResult1 = myVisu.ImportMedField(myField1) - aMesh1 = myVisu.MeshOnEntity(myResult1, aMeshName, anEntity); - - aScalarMap1= myVisu.ScalarMapOnField(myResult1, aMeshName, anEntity, myField1.getName(), aTimeStampId) - - myResult2 = myVisu.ImportFile(medFile); - aMesh2 = myVisu.MeshOnEntity(myResult2, aMeshName, anEntity); - - aTimeStampId = 3 - aScalarMap2= myVisu.ScalarMapOnField(myResult2, aMeshName, anEntity, myField1.getName(), aTimeStampId) - - sg.updateObjBrowser(0) - else : print "We have no permission to rewrite medFile, so readStructFileWithFieldType can't open this file"; - else : print "We have no permission to read medFile, it will not be opened"; - -except: - if sys.exc_type == SALOME.SALOME_Exception : - print "There is no permission to read " + medFile - else : - print sys.exc_type - print sys.exc_value - print sys.exc_traceback - -sg.updateObjBrowser(1); +aMeshName = "maa1" +anEntity = VISU.NODE +field_name = "fieldnodedouble" + +if salome.hasDesktop(): # in gui mode + + import visu_gui + visu = salome.lcc.FindOrLoadComponent("FactoryServer", "VISU") + + if not med_comp: + + print + print "--- Get med object from study ..." + med_obj = visu_gui.visu.getMedObjectFromStudy() + if not med_obj: + raise RuntimeError, "Med object is not found in the study" + print "OK" + + print + print "--- Get field from study ..." + field = visu_gui.visu.getFieldObjectFromStudy(3,1) + if not field: + raise RuntimeError, "Field object is not found in the study" + print "OK" + + print + print "--- Import field to the VISU ..." + aTimeStampId = -1 + result1 = visu.ImportMedField(field) + if not result1: + raise RuntimeError, "Can't import field" + print "OK" + + print + print "--- Create mesh presentation ..." + mesh1 = visu.MeshOnEntity(result1, aMeshName, anEntity); + if not mesh1: + raise RuntimeError, "Can't create mesh presentation" + print "OK" + + print + print "--- Create scalar map ..." + scalarMap1 = visu.ScalarMapOnField(result1, aMeshName, anEntity, field_name, aTimeStampId) + if not scalarMap1: + raise RuntimeError, "Can't create scalar map" + print "OK" + + pass # if not med_comp + + print + print "--- Import med file %s to the VISU ..." % medFile + result2 = visu.ImportFile(medFile); + if not result2: + raise RuntimeError, "Can't import file" + print "OK" + + print + print "--- Create mesh presentation ..." + mesh2 = visu.MeshOnEntity(result2, aMeshName, anEntity); + if not mesh2: + raise RuntimeError, "Can't create mesh presentation" + print "OK" + + print + print "--- Create scalar map ..." + scalarMap2 = visu.ScalarMapOnField(result2, aMeshName, anEntity, field_name, 3) + if not scalarMap2: + raise RuntimeError, "Can't create scalar map" + print "OK" + pass + +else: # not in gui mode, visu can not be tested + + print + print "VISU module requires SALOME to be running in GUI mode." + print + print "Skipping test for VISU..." + pass + +# ---- update object browser +if salome.hasDesktop(): + salome.sg.updateObjBrowser(1); diff --git a/src/KERNEL_PY/salome_version.py b/src/KERNEL_PY/salome_version.py index 2c95b4219..3f448ec33 100644 --- a/src/KERNEL_PY/salome_version.py +++ b/src/KERNEL_PY/salome_version.py @@ -1,39 +1,56 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : salome_version.py # Author : Vadim SANDLER # Module : SALOME # +__ALL__ = [ + "getVersion", + "getVersionMajor", + "getVersionMinor", + "getVersionRelease", + "getVersions", + "getXVersion", + "isDevelopmentVersion", + ] + _salome_versions = {} -def getVersion( mod = "KERNEL" ): +def getVersion( mod = "KERNEL", full = False ): """ Get SALOME module version number + Parameters: + - mod : SALOME module name, default is 'KERNEL' + - full : take into account development marker (in this case 'dev' is added + to the end of version value for development version), False by default Returns: version number string or None if VERSION file is not found """ global _salome_versions mod = mod.upper() + dev_flag = { True : "dev", False : "" } if not _salome_versions.has_key( mod ): - _salome_versions[ mod ] = None + _salome_versions[ mod ] = [ None, "" ] import os root_dir = os.getenv( "%s_ROOT_DIR" % mod ) if root_dir: @@ -41,17 +58,30 @@ def getVersion( mod = "KERNEL" ): filename = root_dir + "/bin/salome/VERSION" if not os.path.exists( filename ): filename = root_dir + "/bin/VERSION" - file = open( filename ) - ver = file.readline() - file.close() - _salome_versions[ mod ] = ver.split( ":" )[ -1 ].strip() + f = open( filename ) + data = f.readlines() + f.close() + for l in data: + if l.strip().startswith("#") or ":" not in l: continue + key = ":".join( l.split( ":" )[ :-1 ] ).strip() + val = l.split( ":" )[ -1 ].strip() + if "development" in key.lower(): + _salome_versions[ mod ][ 1 ] = dev_flag[ val == "1" ] + elif "version" in key.lower() or mod in key: + _salome_versions[ mod ][ 0 ] = val + pass except: pass - return _salome_versions[ mod ] + v = _salome_versions[ mod ][ 0 ] + if full and v is not None: + v += _salome_versions[ mod ][ 1 ] + return v def getVersionMajor( mod = "KERNEL" ): """ Get SALOME module major version number + Parameters: + - mod : SALOME module name, default is 'KERNEL' Returns: version major number string or None if VERSION file is not found """ ver = getVersion( mod ) @@ -64,6 +94,8 @@ def getVersionMajor( mod = "KERNEL" ): def getVersionMinor( mod = "KERNEL" ): """ Get SALOME module minor version number + Parameters: + - mod : SALOME module name, default is 'KERNEL' Returns: version minor number string or None if VERSION file is not found """ ver = getVersion( mod ) @@ -76,6 +108,8 @@ def getVersionMinor( mod = "KERNEL" ): def getVersionRelease( mod = "KERNEL" ): """ Get SALOME module release version number + Parameters: + - mod : SALOME module name, default is 'KERNEL' Returns: version release number string or None if VERSION file is not found """ ver = getVersion( mod ) @@ -84,3 +118,47 @@ def getVersionRelease( mod = "KERNEL" ): except: pass return None + +def getVersions( mod = "KERNEL" ): + """ + Get SALOME module version as list of [major, minor, release] numbers + Parameters: + - mod : SALOME module name, default is 'KERNEL' + Returns: version numbers list + """ + try: + major = int( getVersionMajor( mod ) ) + except: + major = 0 + pass + try: + minor = int( getVersionMinor( mod ) ) + except: + minor = 0 + pass + try: + rel = int( getVersionRelease( mod ) ) + except: + rel = 0 + pass + return [ major, minor, rel ] + +def getXVersion( mod = "KERNEL" ): + """ + Get SALOME module version as list of [major, minor, release] numbers + Parameters: + - mod : SALOME module name, default is 'KERNEL' + Returns: version numbers list + """ + major, minor, rel = getVersions( mod ) + return hex( (major<<16) + (minor<<8) + rel ) + +def isDevelopmentVersion( mod = "KERNEL" ): + """ + Checks if the version of SALOME module is marked as development one + Parameters: + - mod : SALOME module name, default is 'KERNEL' + Returns: Return True for delopment version of module or False otherwise + """ + ver = getVersion( mod, True ) + return ver.endswith( "dev" ) diff --git a/src/KernelHelpers/KernelHelpers.hxx b/src/KernelHelpers/KernelHelpers.hxx new file mode 100755 index 000000000..fe52dbfd3 --- /dev/null +++ b/src/KernelHelpers/KernelHelpers.hxx @@ -0,0 +1,39 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +// File : SALOME_Basics.hxx +// Author : Roman NIKOLAEV +// Module : SALOME +// $Header$ +// +#ifndef _SALOME_KERNEL_HELPERS_HXX_ +#define _SALOME_KERNEL_HELPERS_HXX_ + + +#ifdef WIN32 +# if defined KERNELHELPERS_EXPORTS || defined SalomeKernelHelpers_EXPORTS +# define KERNELHELPERS_EXPORT __declspec( dllexport ) +# else +# define KERNELHELPERS_EXPORT __declspec( dllimport ) +# endif +#else +# define KERNELHELPERS_EXPORT +#endif + +#endif //_SALOME_KERNEL_HELPERS_HXX_ diff --git a/src/KernelHelpers/KernelHelpersUseCases.cxx b/src/KernelHelpers/KernelHelpersUseCases.cxx new file mode 100644 index 000000000..c4d07fe21 --- /dev/null +++ b/src/KernelHelpers/KernelHelpersUseCases.cxx @@ -0,0 +1,120 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// +// Author: Guillaume Boulant (EDF/R&D) + +#include "SALOME_KernelServices.hxx" +#include "Basics_Utils.hxx" + +#include +#include CORBA_CLIENT_HEADER(SALOME_TestComponent) + +bool TEST_corba() { + CORBA::ORB_var orb = KERNEL::getORB(); + if ( CORBA::is_nil(orb) ) { + LOG("TEST_Corba: orb ERROR"); + return false; + } + SALOME_NamingService * ns = KERNEL::getNamingService(); + if ( ns == NULL ) { + LOG("TEST_Corba: ns ERROR"); + return false; + + } + SALOME_LifeCycleCORBA * lcc = KERNEL::getLifeCycleCORBA(); + if ( lcc == NULL ) { + LOG("TEST_Corba: lcc ERROR"); + return false; + } + LOG("TEST_Corba: OK"); + return true; +} + +#include +bool TEST_getLifeCycleCORBA() { + Engines::EngineComponent_var component = + KERNEL::getLifeCycleCORBA()->FindOrLoad_Component( "FactoryServer","SalomeTestComponent" ); + + Engines::TestComponent_var engine = Engines::TestComponent::_narrow(component); + char * coucou_res = engine->Coucou(123.); + const char * coucou_ref = "L = 123"; + LOG(coucou_res); + if ( strcmp(coucou_res, coucou_ref) == 0 ) { + return false; + } + return true; +} + +bool TEST_getStudyManager() { + SALOMEDS::Study_ptr myTestStudy = KERNEL::getStudyManager()->NewStudy("kerneltest"); + if ( CORBA::is_nil(myTestStudy) ) { + return false; + } + + // One can use the study to store some general properties + myTestStudy->SetString("material","wood"); + myTestStudy->SetReal("volume",3.23); + + // The study is characterized by an ID + int myTestStudyId = myTestStudy->StudyId(); + LOG("TestComponentImpl::testkernel: study id = "<getPID(); + LOG("["< +#include "SALOMEDS_DriverDefaultImpl.hxx" + + +//=========================================================================== + SALOMEDS_DriverDefaultImpl::SALOMEDS_DriverDefaultImpl(CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName) +// :Engines_Component_i(orb, poa, contId, instanceName, interfaceName) + { + MESSAGE("SALOMEDS_DriverDefaultImpl::SALOMEDS_DriverDefaultImpl : "); + }; + +//=========================================================================== + SALOMEDS_DriverDefaultImpl::~SALOMEDS_DriverDefaultImpl() + { + MESSAGE("SALOMEDS_DriverDefaultImpl::~SALOMEDS_DriverDefaultImpl"); + }; + +//=========================================================================== + CORBA::Boolean SALOMEDS_DriverDefaultImpl::Load(SALOMEDS::SComponent_ptr theComponent, + const SALOMEDS::TMPFile & theStream, + const char* theURL, + bool isMultiFile) + { + MESSAGE("--------------------------------------"); + MESSAGE("--------------------------------------"); + MESSAGE("--------------------------------------"); + MESSAGE("SALOMEDS_DriverDefaultImpl::Load"); + MESSAGE("Should be implemented"); + MESSAGE("--------------------------------------"); + MESSAGE("--------------------------------------"); + MESSAGE("--------------------------------------"); + return false; + }; + +//=========================================================================== + CORBA::Boolean SALOMEDS_DriverDefaultImpl::LoadASCII(SALOMEDS::SComponent_ptr theComponent, + const SALOMEDS::TMPFile & theStream, + const char* theURL, + bool isMultiFile) + { + MESSAGE("--------------------------------------"); + MESSAGE("--------------------------------------"); + MESSAGE("--------------------------------------"); + MESSAGE("SALOMEDS_DriverDefaultImpl::LoadASCII"); + MESSAGE("Should be implemented"); + MESSAGE("--------------------------------------"); + MESSAGE("--------------------------------------"); + MESSAGE("--------------------------------------"); + return false; + }; + +//=========================================================================== + char* SALOMEDS_DriverDefaultImpl::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject, + const char* aLocalPersistentID, + CORBA::Boolean isMultiFile, + CORBA::Boolean isASCII) + { + MESSAGE("--------------------------------------"); + MESSAGE("--------------------------------------"); + MESSAGE("--------------------------------------"); + MESSAGE("SALOMEDS_DriverDefaultImpl::LocalPersistentIDToIOR"); + MESSAGE("Should be implemented"); + MESSAGE("--------------------------------------"); + MESSAGE("--------------------------------------"); + MESSAGE("--------------------------------------"); + CORBA::String_var aString(""); + return aString._retn(); + }; + +//=========================================================================== + SALOMEDS::TMPFile* SALOMEDS_DriverDefaultImpl::Save(SALOMEDS::SComponent_ptr theComponent, + const char* theURL, + bool isMultiFile) + { + MESSAGE("--------------------------------------"); + MESSAGE("--------------------------------------"); + MESSAGE("--------------------------------------"); + MESSAGE("SALOMEDS_DriverDefaultImpl::Save"); + MESSAGE("Should be implemented"); + MESSAGE("--------------------------------------"); + MESSAGE("--------------------------------------"); + MESSAGE("--------------------------------------"); + SALOMEDS::TMPFile_var aStreamFile = new SALOMEDS::TMPFile(0); + return aStreamFile._retn(); + }; + +//=========================================================================== + SALOMEDS::TMPFile* SALOMEDS_DriverDefaultImpl::SaveASCII(SALOMEDS::SComponent_ptr theComponent, + const char* theURL, + bool isMultiFile) + { + MESSAGE("--------------------------------------"); + MESSAGE("--------------------------------------"); + MESSAGE("--------------------------------------"); + MESSAGE("SALOMEDS_DriverDefaultImpl::SaveASCII"); + MESSAGE("Should be implemented"); + MESSAGE("--------------------------------------"); + MESSAGE("--------------------------------------"); + MESSAGE("--------------------------------------"); + SALOMEDS::TMPFile_var aStreamFile = new SALOMEDS::TMPFile(0); + return aStreamFile._retn(); + }; + +//=========================================================================== + char* SALOMEDS_DriverDefaultImpl::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject, + const char* IORString, + CORBA::Boolean isMultiFile, + CORBA::Boolean isASCII) + { + MESSAGE("-----------------------------------------"); + MESSAGE("-----------------------------------------"); + MESSAGE("-----------------------------------------"); + MESSAGE("SALOMEDS_DriverDefaultImpl::IORToLocalPersistentID"); + MESSAGE("Should be implemented"); + MESSAGE("-----------------------------------------"); + MESSAGE("-----------------------------------------"); + MESSAGE("-----------------------------------------"); + CORBA::String_var aString(""); + return aString._retn(); + }; + + +//=========================================================================== + void SALOMEDS_DriverDefaultImpl::Close(SALOMEDS::SComponent_ptr theComponent) + { + MESSAGE("------------------------"); + MESSAGE("SALOMEDS_DriverDefaultImpl::Close"); + MESSAGE("------------------------"); + }; + +//=========================================================================== + char* SALOMEDS_DriverDefaultImpl::ComponentDataType() + { + MESSAGE("-----------------------------------------"); + MESSAGE("-----------------------------------------"); + MESSAGE("-----------------------------------------"); + MESSAGE("SALOMEDS_DriverDefaultImpl::ComponentDataType"); + MESSAGE("Should be implemented"); + MESSAGE("-----------------------------------------"); + MESSAGE("-----------------------------------------"); + MESSAGE("-----------------------------------------"); + return CORBA::string_dup("J aurais du nommer mon type prefere"); + }; + +//=========================================================================== + bool SALOMEDS_DriverDefaultImpl::CanPublishInStudy(CORBA::Object_ptr theIOR) + { + MESSAGE("-----------------------------------------"); + MESSAGE("-----------------------------------------"); + MESSAGE("-----------------------------------------"); + MESSAGE("SALOMEDS_DriverDefaultImpl::CanPublishInStudy"); + MESSAGE("Should be implemented"); + MESSAGE("-----------------------------------------"); + MESSAGE("-----------------------------------------"); + MESSAGE("-----------------------------------------"); + return false; + }; + +//=========================================================================== + SALOMEDS::SObject_ptr SALOMEDS_DriverDefaultImpl::PublishInStudy(SALOMEDS::Study_ptr theStudy, + SALOMEDS::SObject_ptr theSObject, + CORBA::Object_ptr theObject, + const char* theName) + throw (SALOME::SALOME_Exception) + { + MESSAGE("-----------------------------------------"); + MESSAGE("-----------------------------------------"); + MESSAGE("-----------------------------------------"); + MESSAGE("SALOMEDS_DriverDefaultImpl::PublishInStudy"); + MESSAGE("Should be implemented"); + MESSAGE("-----------------------------------------"); + MESSAGE("-----------------------------------------"); + MESSAGE("-----------------------------------------"); + SALOMEDS::SObject_var aResultSO; + return aResultSO._retn(); + }; + +//=========================================================================== + CORBA::Boolean SALOMEDS_DriverDefaultImpl::CanCopy(SALOMEDS::SObject_ptr theObject) + { + MESSAGE("-----------------------------------------"); + MESSAGE("-----------------------------------------"); + MESSAGE("-----------------------------------------"); + MESSAGE("SALOMEDS_DriverDefaultImpl::CanCopy"); + MESSAGE("Should be implemented"); + MESSAGE("-----------------------------------------"); + MESSAGE("-----------------------------------------"); + MESSAGE("-----------------------------------------"); + //return false; + return true; + }; + +//=========================================================================== + SALOMEDS::TMPFile* SALOMEDS_DriverDefaultImpl::CopyFrom(SALOMEDS::SObject_ptr theObject, + CORBA::Long& theObjectID) +{ + MESSAGE("--------------------------------------"); + MESSAGE("--------------------------------------"); + MESSAGE("--------------------------------------"); + MESSAGE("SALOMEDS_DriverDefaultImpl::CopyFrom"); + MESSAGE("Should be implemented"); + MESSAGE("--------------------------------------"); + MESSAGE("--------------------------------------"); + MESSAGE("--------------------------------------"); + SALOMEDS::TMPFile_var aStreamFile = new SALOMEDS::TMPFile(0); + return aStreamFile._retn(); +}; + +//=========================================================================== + SALOMEDS::SObject_ptr SALOMEDS_DriverDefaultImpl::PasteInto( const SALOMEDS::TMPFile & theStream, + CORBA::Long theObjectID, + SALOMEDS::SObject_ptr theSObject) + { + MESSAGE("-----------------------------------------"); + MESSAGE("-----------------------------------------"); + MESSAGE("-----------------------------------------"); + MESSAGE("SALOMEDS_DriverDefaultImpl::PasteInto"); + MESSAGE("Should be implemented"); + MESSAGE("-----------------------------------------"); + MESSAGE("-----------------------------------------"); + MESSAGE("-----------------------------------------"); + SALOMEDS::SObject_var aResultSO; + return aResultSO._retn(); + }; + +//=========================================================================== + CORBA::Boolean SALOMEDS_DriverDefaultImpl::CanPaste ( const char *theComponentName, + CORBA::Long theObjectID) + { + MESSAGE("-----------------------------------------"); + MESSAGE("-----------------------------------------"); + MESSAGE("-----------------------------------------"); + MESSAGE("SALOMEDS_DriverDefaultImpl::CanPaste"); + MESSAGE("Should be implemented"); + MESSAGE("-----------------------------------------"); + MESSAGE("-----------------------------------------"); + MESSAGE("-----------------------------------------"); + return false; + }; + + diff --git a/src/KernelHelpers/SALOMEDS_DriverDefaultImpl.hxx b/src/KernelHelpers/SALOMEDS_DriverDefaultImpl.hxx new file mode 100644 index 000000000..c0b6635a6 --- /dev/null +++ b/src/KernelHelpers/SALOMEDS_DriverDefaultImpl.hxx @@ -0,0 +1,109 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// +// Author: Guillaume Boulant (EDF/R&D) + +#ifndef __SALOMEDS_DRIVER_DEFAULT_IMPL_H__ +#define __SALOMEDS_DRIVER_DEFAULT_IMPL_H__ + +#include "KernelHelpers.hxx" + +#include "SALOME_Component_i.hxx" +#include "SALOME_NamingService.hxx" + +#include CORBA_CLIENT_HEADER(SALOMEDS) + + +//--------------------------------------------------------- + +class KERNELHELPERS_EXPORT SALOMEDS_DriverDefaultImpl: + public virtual POA_SALOMEDS::Driver +//--------------------------------------------------------- + { + + + SALOMEDS_DriverDefaultImpl(); + public: + SALOMEDS_DriverDefaultImpl(CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName); + + + virtual ~SALOMEDS_DriverDefaultImpl(); + + //--------------------------------------------- + // inherited methods from SALOMEDS::Driver + //--------------------------------------------- + + //virtual SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent, + SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent, + const char* theURL, + bool isMultiFile); + + virtual SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent, + const char* theURL, + bool isMultiFile); + + virtual bool Load(SALOMEDS::SComponent_ptr, + const SALOMEDS::TMPFile &, + const char* theURL, + bool isMultiFile); + + virtual bool LoadASCII(SALOMEDS::SComponent_ptr, + const SALOMEDS::TMPFile &, + const char* theURL, + bool isMultiFile); + + virtual void Close(SALOMEDS::SComponent_ptr IORSComponent); + + virtual char* ComponentDataType(); + + virtual char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject, + const char* IORString, + CORBA::Boolean isMultiFile, + CORBA::Boolean isASCII); + + virtual char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject, + const char* aLocalPersistentID, + CORBA::Boolean isMultiFile, + CORBA::Boolean isASCII); + + virtual bool CanPublishInStudy(CORBA::Object_ptr theIOR); + + virtual SALOMEDS::SObject_ptr PublishInStudy + (SALOMEDS::Study_ptr theStudy, + SALOMEDS::SObject_ptr theSObject, + CORBA::Object_ptr theObject, + const char* theName) + throw (SALOME::SALOME_Exception); + + virtual CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject); + + virtual SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, + CORBA::Long& theObjectID); + + virtual CORBA::Boolean CanPaste(const char* theComponentName, + CORBA::Long theObjectID); + + virtual SALOMEDS::SObject_ptr PasteInto(const SALOMEDS::TMPFile& theStream, + CORBA::Long theObjectID, + SALOMEDS::SObject_ptr theObject); + }; +#endif diff --git a/src/KernelHelpers/SALOME_KernelServices.cxx b/src/KernelHelpers/SALOME_KernelServices.cxx new file mode 100644 index 000000000..552de7368 --- /dev/null +++ b/src/KernelHelpers/SALOME_KernelServices.cxx @@ -0,0 +1,185 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// +// Author: Guillaume Boulant (EDF/R&D) + +#include "SALOME_KernelServices.hxx" + +namespace KERNEL { + + /** + * This function returns a static reference to the orb. The orb can + * be used for example to initialize CORBA variables or to serialize + * and unserialize the CORBA objet to/from an IOR string. + */ + CORBA::ORB_ptr getORB() { + static CORBA::ORB_ptr orb; + if(CORBA::is_nil(orb)){ + int argc=0; + orb = CORBA::ORB_init(argc,0); + } + return orb; + } + + /** + * This function returns a static reference to the SALOME naming service. + */ + SALOME_NamingService * getNamingService() { + static SALOME_NamingService * namingService; + if ( namingService == NULL ) { + namingService = new SALOME_NamingService(getORB()); + } + return namingService; + } + + /** + * This function returns a static reference to the SALOME life cycle CORBA. + */ + SALOME_LifeCycleCORBA * getLifeCycleCORBA() { + static SALOME_LifeCycleCORBA * lifeCycleCORBA; + if ( lifeCycleCORBA == NULL ) { + SALOME_NamingService *aNamingService = getNamingService(); + lifeCycleCORBA = new SALOME_LifeCycleCORBA(aNamingService); + } + return lifeCycleCORBA; + } + + + /** + * This returns a static reference to the SALOME study manager. The + * study manager can be used to retrieve a study or to get + * informations about a study. + */ + SALOMEDS::StudyManager_ptr getStudyManager() { + static SALOMEDS::StudyManager_ptr aStudyManager; + if(CORBA::is_nil(aStudyManager)){ + SALOME_NamingService *aNamingService = getNamingService(); + CORBA::Object_ptr anObject = aNamingService->Resolve("/myStudyManager"); + aStudyManager = SALOMEDS::StudyManager::_narrow(anObject); + } + return aStudyManager; + } + + /** + * This returns a static reference to the SALOME session. The + * SALOME session can be used to retrieve some objects of the + * current session, as the SALOME study. + */ + SALOME::Session_ptr getSalomeSession() { + static SALOME::Session_ptr salomeSession; + if(CORBA::is_nil(salomeSession)){ + SALOME_NamingService *aNamingService = getNamingService(); + CORBA::Object_ptr obj = aNamingService->Resolve("/Kernel/Session"); + salomeSession = SALOME::Session::_narrow(obj); + } + return salomeSession; + } + + /** + * This returns a static reference to the SALOME launcher. The + * SALOME launcher can be used to schedule jobs, local or remote, + * using a batch system or not (see SALOME documentation). + */ + Engines::SalomeLauncher_ptr getSalomeLauncher() { + //LOG("KERNEL_services::getSalomeLauncher()"); + static Engines::SalomeLauncher_ptr salomeLauncher; + if(CORBA::is_nil(salomeLauncher)){ + //LOG("KERNEL_services::getSalomeLauncher(): creating the static instance"); + SALOME_NamingService *aNamingService = getNamingService(); + CORBA::Object_ptr obj = aNamingService->Resolve("/SalomeLauncher"); + salomeLauncher = Engines::SalomeLauncher::_narrow(obj); + } + return salomeLauncher; + } + + Engines::ResourcesManager_ptr getResourcesManager() { + static Engines::ResourcesManager_ptr resourcesManager; + if(CORBA::is_nil(resourcesManager)){ + SALOME_NamingService *aNamingService = getNamingService(); + CORBA::Object_ptr obj = aNamingService->Resolve("/ResourcesManager"); + resourcesManager = Engines::ResourcesManager::_narrow(obj); + } + return resourcesManager; + } + + /** + * This returns the study with the specified id if it's defined in + * the SALOME study manager. Returns null otherwise. + * Please not that it is just a shortcut, and you may prefer use + * directly the study manager: + * KERNEL::getStudyManager()->GetStudyByID(aStudyId) + */ + SALOMEDS::Study_ptr getStudyById(int aStudyId) { + if ( aStudyId < 0 ) { + INFOS("ERR: trying to get a study with ID<0"); + return SALOMEDS::Study::_nil(); + } + return getStudyManager()->GetStudyByID(aStudyId); + } + + int getStudyId(SALOMEDS::Study_ptr study) { + if( CORBA::is_nil(study) ) return -1; + return study->StudyId(); + } + + + /** + * This function retrieve the CORBA object reference from the study + * object wrapping it. + */ + CORBA::Object_ptr SObjectToObject(SALOMEDS::SObject_ptr theSObject) { + + SALOMEDS::GenericAttribute_var anAttr; + CORBA::Object_var anObject; + if(CORBA::is_nil(theSObject)) + return anObject; + try{ + if(theSObject->FindAttribute(anAttr, "AttributeIOR")){ + SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); + CORBA::String_var aValue = anIOR->Value(); + CORBA::ORB_ptr anORB = getORB(); + if(strcmp(aValue,"") != 0) + anObject = anORB->string_to_object(aValue); + } + }catch(...){ + INFOS("SObjectToObject - Unknown exception was occured!!!"); + } + return anObject._retn(); + } + + /*! + * This function provides a CORBA pointer to a servant from its IOR + * given as a string of characters. + */ + CORBA::Object_ptr IORToObject(char * IOR) { + return getORB()->string_to_object(IOR); + } + + // + // __GBO__ See the file ./src/SMESHGUI/SMESHGUI_Utils.h of SMESH_SRC + // for other helper functions + // + + SALOME::SALOME_Exception createSalomeException(const char * text) { + SALOME::ExceptionStruct es; + es.type = SALOME::INTERNAL_ERROR; + es.text = CORBA::string_dup(text); + return SALOME::SALOME_Exception(es); + } + +} diff --git a/src/KernelHelpers/SALOME_KernelServices.hxx b/src/KernelHelpers/SALOME_KernelServices.hxx new file mode 100644 index 000000000..4970858cf --- /dev/null +++ b/src/KernelHelpers/SALOME_KernelServices.hxx @@ -0,0 +1,118 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// +// Author: Guillaume Boulant (EDF/R&D) + +#ifndef __KERNEL_SERVICES_H__ +#define __KERNEL_SERVICES_H__ + +#include "KernelHelpers.hxx" + +#include "SALOMEconfig.h" +#include CORBA_SERVER_HEADER(SALOMEDS) +#include CORBA_SERVER_HEADER(SALOMEDS_Attributes) +#include CORBA_SERVER_HEADER(SALOME_ContainerManager) +#include CORBA_CLIENT_HEADER(SALOME_Session) +#include CORBA_SERVER_HEADER(SALOME_Exception) + +#include "SALOME_NamingService.hxx" +#include "SALOME_LifeCycleCORBA.hxx" + +namespace KERNEL { + + // --------------------------------------------- + // SALOME KERNEL main services + KERNELHELPERS_EXPORT CORBA::ORB_ptr getORB(); + KERNELHELPERS_EXPORT SALOME_NamingService * getNamingService(); + KERNELHELPERS_EXPORT SALOME_LifeCycleCORBA * getLifeCycleCORBA(); + KERNELHELPERS_EXPORT SALOME::Session_ptr getSalomeSession(); + KERNELHELPERS_EXPORT SALOMEDS::StudyManager_ptr getStudyManager(); + KERNELHELPERS_EXPORT Engines::SalomeLauncher_ptr getSalomeLauncher(); + KERNELHELPERS_EXPORT Engines::ResourcesManager_ptr getResourcesManager(); + + // --------------------------------------------- + // SALOME KERNEL services to deal with a SALOME study, SObject and + // SComponent. + // + KERNELHELPERS_EXPORT SALOMEDS::Study_ptr getStudyById(int aStudyId); + KERNELHELPERS_EXPORT int getStudyId(SALOMEDS::Study_ptr study); + KERNELHELPERS_EXPORT CORBA::Object_ptr IORToObject(char * IOR); + KERNELHELPERS_EXPORT CORBA::Object_ptr SObjectToObject(SALOMEDS::SObject_ptr); + + + + /*! + * This template function provides you with the servant (CORBA + * object narrowed to its interface) corresponding to the specified + * CORBA object (naked CORBA pointer). + */ + template typename TInterface::_var_type + ObjectToInterface(CORBA::Object_ptr object) { + if(!CORBA::is_nil(object)) + return TInterface::_narrow(object); + return TInterface::_nil(); + } + + template typename TInterface::_var_type + SObjectToInterface(SALOMEDS::SObject_ptr sobject) { + CORBA::Object_ptr object = SObjectToObject(sobject); + return ObjectToInterface(object); + } + + // _MEM_: note that template functions have to be declared AND + // implemented in the header because they are not compiled in this + // library but in every client library that includes this header + // file. The effective compilation depends on the particular class + // used for TInterface. + + // --------------------------------------------- + // To create a standard SALOME exception embedding a simple text + KERNELHELPERS_EXPORT SALOME::SALOME_Exception createSalomeException(const char * text); +} + + +// +// ============================================================= +// SALOME Logger macros +// ============================================================= +// +// We can use the macros defined by SALOMELocalTrace/utilities.h +#include "utilities.h" +#define SALOMELOG(msg) {MESS_BEGIN("[XSALOME]") << msg << MESS_END} +#define LOG SALOMELOG + +// This can help to LOG (or use in stream) the CORBA exceptions +// Ex: LOG("An exception occurs: "< +#include +static std::ostream & +operator<<(std::ostream & os, const CORBA::Exception & e) +{ + CORBA::Any tmp; + tmp <<=e ; + CORBA::TypeCode_var tc = tmp.type(); + const char * p = tc->name (); + if (*p != '\0') + os << p; + else + os << tc->id(); + return os; +} + + +#endif // KERNEL_SERVICES diff --git a/src/KernelHelpers/SALOME_StudyEditor.cxx b/src/KernelHelpers/SALOME_StudyEditor.cxx new file mode 100644 index 000000000..6a249af46 --- /dev/null +++ b/src/KernelHelpers/SALOME_StudyEditor.cxx @@ -0,0 +1,164 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// +// Author: Guillaume Boulant (EDF/R&D) + +#include "SALOME_StudyEditor.hxx" +#include "SALOME_KernelServices.hxx" + +/** Canonic constructor. The object can't be used without a setStudy() */ +SALOME_StudyEditor::SALOME_StudyEditor() { +} + +void SALOME_StudyEditor::setStudy(SALOMEDS::Study_ptr study) { + _study = study; + _sbuilder = _study->NewBuilder(); +} + +void SALOME_StudyEditor::setStudyById(int studyId) { + this->setStudy(KERNEL::getStudyManager()->GetStudyByID(studyId)); +} + +int SALOME_StudyEditor::getStudyId() { + if ( _study->_is_nil() ) return UNDEFINED; + return _study->StudyId(); +} + +SALOME_StudyEditor::SALOME_StudyEditor(int studyId) { + this->setStudyById(studyId); +} +SALOME_StudyEditor::SALOME_StudyEditor(SALOMEDS::Study_ptr study) { + this->setStudy(study); +} + +SALOMEDS::SObject_ptr SALOME_StudyEditor::newObject(SALOMEDS::SObject_ptr parent) { + return _sbuilder->NewObject(parent); +} + +SALOMEDS::SObject_ptr SALOME_StudyEditor::findObject(const char * entry) { + SALOMEDS::SObject_var sobject = _study->FindObjectID(entry); + return sobject._retn(); +} + +SALOMEDS::SComponent_ptr SALOME_StudyEditor::newRoot(const char * moduleName) { + SALOMEDS::SComponent_var sroot = findRoot(moduleName); + if ( sroot->_is_nil() ) { + sroot = _sbuilder->NewComponent(moduleName); + _sbuilder->SetName(sroot,moduleName); + } + return sroot._retn(); +} + +bool SALOME_StudyEditor::bindEngine(SALOMEDS::SComponent_var studyRoot, + Engines::EngineComponent_var engine) +{ + // WARN: The engine should be associated to the SComponent IF + // AND ONLY IF it is a SALOMEDS::Driver. Otherwise, there is no + // need to do that, and it could even lead to exception + // raising (eh, you work on SALOME isn't it?) + SALOMEDS::Driver_var driver = SALOMEDS::Driver::_narrow(engine); + if ( driver->_is_nil() || studyRoot->_is_nil() ) return false; + _sbuilder->DefineComponentInstance(studyRoot, engine); + return true; +} + +SALOMEDS::SComponent_ptr SALOME_StudyEditor::findRoot(const char * moduleName) { + return _study->FindComponent(moduleName); +} + +void SALOME_StudyEditor::setName(SALOMEDS::SObject_var sobject, const char * value) { + _sbuilder->SetName(sobject,value); +} +const char * SALOME_StudyEditor::getName(SALOMEDS::SObject_var sobject) { + if (sobject->_is_nil()) return NULL; + return sobject->GetName(); +} + +/** + * This function specifies which resource file is to be used to + * associate an icon to the specified object. Note that even if the + * icon as no sens outside the GUI context, it can be defined here + * because only the resource name is provided. The effective rendering + * is done in the object browser of course, and use this string + * attribute. WARN: note that the resource name is supposed to be the + * base name of a file managed by the SALOME resource manager (i.e. a + * file located in the directory specified in the SalomeApp.xml). + */ +void SALOME_StudyEditor::setIcon(SALOMEDS::SObject_var sobject, const char * resourcename) { + SALOMEDS::GenericAttribute_var anAttr; + SALOMEDS::AttributePixMap_var aPixmap; + anAttr = _sbuilder->FindOrCreateAttribute(sobject, "AttributePixMap"); + aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr); + aPixmap->SetPixMap(resourcename); +} + +// +// MEM: AttributeParameter +// Note that the AttributeParameter is a multitype dictionnary whose +// keys are the names specified when setting the value +// + +/** + * Add a parameter attribute of type integer or simply set its value + * if it already exists. + */ +void SALOME_StudyEditor::setParameterInt(SALOMEDS::SObject_var sobject, const char * name, int value) { + SALOMEDS::GenericAttribute_var anAttr; + SALOMEDS::AttributeParameter_var aParam; + anAttr = _sbuilder->FindOrCreateAttribute(sobject, "AttributeParameter"); + aParam = SALOMEDS::AttributeParameter::_narrow(anAttr); + aParam->SetInt(name,value); +} + +int SALOME_StudyEditor::getParameterInt(SALOMEDS::SObject_var sobject, const char * name) { + if (sobject->_is_nil()) return UNDEFINED; + + SALOMEDS::GenericAttribute_var anAttr; + SALOMEDS::AttributeParameter_var aParam; + if ( sobject->FindAttribute(anAttr,"AttributeParameter") ) { + aParam = SALOMEDS::AttributeParameter::_narrow(anAttr); + return aParam->GetInt(name); + } + return UNDEFINED; +} + +/** + * Add a parameter attribute of type boolean or simply set its value + * if it already exists. + */ +void SALOME_StudyEditor::setParameterBool(SALOMEDS::SObject_var sobject, const char * name, bool value) { + SALOMEDS::GenericAttribute_var anAttr; + SALOMEDS::AttributeParameter_var aParam; + anAttr = _sbuilder->FindOrCreateAttribute(sobject, "AttributeParameter"); + aParam = SALOMEDS::AttributeParameter::_narrow(anAttr); + aParam->SetBool(name,value); +} + +bool SALOME_StudyEditor::getParameterBool(SALOMEDS::SObject_var sobject, const char * name) { + if (sobject->_is_nil()) return false; + // _GBO_ Q: Maybe it's better in this case to raise an exception? + + SALOMEDS::GenericAttribute_var anAttr; + SALOMEDS::AttributeParameter_var aParam; + if ( sobject->FindAttribute(anAttr,"AttributeParameter") ) { + aParam = SALOMEDS::AttributeParameter::_narrow(anAttr); + return aParam->GetBool(name); + } + return false; + +} diff --git a/src/KernelHelpers/SALOME_StudyEditor.hxx b/src/KernelHelpers/SALOME_StudyEditor.hxx new file mode 100644 index 000000000..4f3ec598d --- /dev/null +++ b/src/KernelHelpers/SALOME_StudyEditor.hxx @@ -0,0 +1,70 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// +// Author: Guillaume Boulant (EDF/R&D) + +#ifndef __STUDY_EDITOR_HXX__ +#define __STUDY_EDITOR_HXX__ + +#include "KernelHelpers.hxx" + +#include +#include CORBA_CLIENT_HEADER(SALOMEDS) +#include CORBA_SERVER_HEADER(SALOME_Component) + +#include + +class KERNELHELPERS_EXPORT SALOME_StudyEditor { + +public: + SALOME_StudyEditor(int studyId); + SALOME_StudyEditor(SALOMEDS::Study_ptr study); + + typedef std::vector SObjectList; + + SALOMEDS::SComponent_ptr newRoot(const char * moduleName); + SALOMEDS::SComponent_ptr findRoot(const char * moduleName); + bool bindEngine(SALOMEDS::SComponent_var studyRoot,Engines::EngineComponent_var engine); + + SALOMEDS::SObject_ptr newObject(SALOMEDS::SObject_ptr parent); + SALOMEDS::SObject_ptr findObject(const char * entry); + void setName(SALOMEDS::SObject_var sobject, const char * value); + const char * getName(SALOMEDS::SObject_var sobject); + + void setIcon(SALOMEDS::SObject_var sobject, const char * resourcename); + + void setParameterInt(SALOMEDS::SObject_var sobject, const char * name, int value); + int getParameterInt(SALOMEDS::SObject_var sobject, const char * name); + void setParameterBool(SALOMEDS::SObject_var sobject, const char * name, bool value); + bool getParameterBool(SALOMEDS::SObject_var sobject, const char * name); + + static const int UNDEFINED = -1; + +protected: + SALOME_StudyEditor(); + void setStudy(SALOMEDS::Study_ptr study); + void setStudyById(int studyId); + int getStudyId(); + + SALOMEDS::Study_var _study; + +private: + SALOMEDS::StudyBuilder_var _sbuilder; +}; + +#endif // __STUDY_EDITOR_HXX__ diff --git a/src/KernelHelpers/Test/KernelHelpersUnitTests.cxx b/src/KernelHelpers/Test/KernelHelpersUnitTests.cxx new file mode 100644 index 000000000..224b3375b --- /dev/null +++ b/src/KernelHelpers/Test/KernelHelpersUnitTests.cxx @@ -0,0 +1,112 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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 +// + +#include "KernelHelpersUnitTests.hxx" + +#include "SALOME_KernelServices.hxx" +#include "Basics_Utils.hxx" + +#include +#include CORBA_CLIENT_HEADER(SALOME_TestComponent) + +// ============================================================================ +/*! + * Set up the environment + */ +// ============================================================================ + +void KernelHelpersUnitTests::setUp() +{ +} + +// ============================================================================ +/*! + * - delete + */ +// ============================================================================ + +void KernelHelpersUnitTests::tearDown() +{ +} + +// ============================================================================ +/*! + * Check SalomeApp functionality + */ +// ============================================================================ +void KernelHelpersUnitTests::TEST_corba() +{ + CORBA::ORB_var orb = KERNEL::getORB(); + CPPUNIT_ASSERT(!CORBA::is_nil(orb)); + + + SALOME_NamingService * ns = KERNEL::getNamingService(); + CPPUNIT_ASSERT(ns!=NULL); + + SALOME_LifeCycleCORBA * lcc = KERNEL::getLifeCycleCORBA(); + CPPUNIT_ASSERT(lcc!=NULL); +} + +void KernelHelpersUnitTests::TEST_getLifeCycleCORBA() { + Engines::EngineComponent_var component = + KERNEL::getLifeCycleCORBA()->FindOrLoad_Component( "FactoryServer","SalomeTestComponent" ); + + Engines::TestComponent_var engine = Engines::TestComponent::_narrow(component); + char * coucou_res = engine->Coucou(123.); + const char * coucou_ref = "TestComponent_i : L = 123"; + LOG(coucou_res); + CPPUNIT_ASSERT( strcmp(coucou_res, coucou_ref) == 0 ); +} + +void KernelHelpersUnitTests::TEST_getStudyManager() { + SALOMEDS::Study_ptr myTestStudy = KERNEL::getStudyManager()->NewStudy("kerneltest"); + CPPUNIT_ASSERT(!CORBA::is_nil(myTestStudy)); + + // One can use the study to store some general properties + myTestStudy->SetString("material","wood"); + myTestStudy->SetReal("volume",3.23); + + // The study is characterized by an ID + int myTestStudyId = myTestStudy->StudyId(); + LOG("TestComponentImpl::testkernel: study id = "<getPID(); + LOG("SALOME launcher PID = " << pid); + } + catch (const SALOME::SALOME_Exception & ex) { + LOG("SALOME Exception in createJob !" < + +class KernelHelpersUnitTests : public CppUnit::TestFixture +{ + CPPUNIT_TEST_SUITE( KernelHelpersUnitTests ); + CPPUNIT_TEST( TEST_corba ); + CPPUNIT_TEST( TEST_getLifeCycleCORBA ); + CPPUNIT_TEST( TEST_getStudyManager ); + CPPUNIT_TEST( TEST_getSalomeLauncher ); + CPPUNIT_TEST_SUITE_END(); + +public: + + void setUp(); + void tearDown(); + + void TEST_corba(); + void TEST_getLifeCycleCORBA(); + void TEST_getStudyManager(); + void TEST_getSalomeLauncher(); +}; + +#endif diff --git a/src/KernelHelpers/Test/Makefile.am b/src/KernelHelpers/Test/Makefile.am new file mode 100644 index 000000000..705244727 --- /dev/null +++ b/src/KernelHelpers/Test/Makefile.am @@ -0,0 +1,75 @@ +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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 +# + +# Author: Guillaume Boulant (EDF/R&D) + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +lib_LTLIBRARIES = libSalomeKernelHelpersTest.la + +salomeinclude_HEADERS = KernelHelpersUnitTests.hxx + +dist_libSalomeKernelHelpersTest_la_SOURCES = KernelHelpersUnitTests.cxx + +OMNIORB_CXXFLAGS=@OMNIORB_CXXFLAGS@ @OMNIORB_INCLUDES@ +OMNIORB_LIBS=@OMNIORB_LIBS@ + +libSalomeKernelHelpersTest_la_CXXFLAGS = \ + @CPPUNIT_INCLUDES@ \ + $(OMNIORB_CXXFLAGS) \ + -I$(top_srcdir)/src/Basics/Test \ + -I$(srcdir)/.. \ + -I$(top_srcdir)/src/NamingService \ + -I$(top_srcdir)/src/SALOMELocalTrace \ + -I$(top_srcdir)/src/Basics \ + -I$(top_srcdir)/src/Utils \ + -I$(top_srcdir)/src/LifeCycleCORBA \ + -I$(top_srcdir)/src/Container \ + -I$(top_srcdir)/src/Notification \ + -I$(top_srcdir)/src/GenericObj \ + -I$(top_builddir)/idl + + +libSalomeKernelHelpersTest_la_LIBADD = \ + @CPPUNIT_LIBS@ \ + ../libSalomeKernelHelpers.la \ + $(OMNIORB_LIBS) \ + $(top_builddir)/src/NamingService/libSalomeNS.la \ + $(top_builddir)/src/SALOMELocalTrace/libSALOMELocalTrace.la \ + $(top_builddir)/src/Basics/libSALOMEBasics.la \ + $(top_builddir)/src/Utils/libOpUtil.la \ + $(top_builddir)/src/LifeCycleCORBA/libSalomeLifeCycleCORBA.la \ + $(top_builddir)/src/Container/libSalomeContainer.la \ + $(top_builddir)/src/Notification/libSalomeNotification.la \ + $(top_builddir)/src/GenericObj/libSalomeGenericObj.la \ + $(top_builddir)/idl/libSalomeIDLKernel.la + + +bin_PROGRAMS = TestKernelHelpers + +TestKernelHelpers_SOURCES = TestKernelHelpers.cxx + +TestKernelHelpers_CXXFLAGS = $(libSalomeKernelHelpersTest_la_CXXFLAGS) +TestKernelHelpers_LDADD = $(libSalomeKernelHelpersTest_la_LIBADD) libSalomeKernelHelpersTest.la + +dist_salomescript_PYTHON = TestKernelHelpers.py +UNIT_TEST_PROG = TestKernelHelpers diff --git a/src/KernelHelpers/Test/TestKernelHelpers.cxx b/src/KernelHelpers/Test/TestKernelHelpers.cxx new file mode 100644 index 000000000..87fba1fc5 --- /dev/null +++ b/src/KernelHelpers/Test/TestKernelHelpers.cxx @@ -0,0 +1,31 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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 +// + +#include "KernelHelpersUnitTests.hxx" + +// --- Registers the fixture into the 'registry' + +CPPUNIT_TEST_SUITE_REGISTRATION( KernelHelpersUnitTests ); + +// --- generic Main program from Basic/Test + +#include "BasicMainTest.hxx" diff --git a/src/KernelHelpers/Test/TestKernelHelpers.py b/src/KernelHelpers/Test/TestKernelHelpers.py new file mode 100644 index 000000000..d319cd830 --- /dev/null +++ b/src/KernelHelpers/Test/TestKernelHelpers.py @@ -0,0 +1,51 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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 sys, os,signal,string,commands +import runSalome +import orbmodule +import TestKiller + +# get SALOME environment : + +args, modules_list, modules_root_dir = runSalome.get_config() +runSalome.set_env(args, modules_list, modules_root_dir) + +# launch CORBA naming server + +clt=orbmodule.client() + +# launch CORBA logger server + +myServer=runSalome.LoggerServer(args) +myServer.run() +clt.waitLogger("Logger") + +# execute Unit Test + +command = ['TestKernelHelpers'] +ret = os.spawnvp(os.P_WAIT, command[0], command) + +# kill Test process + +TestKiller.killProcess(runSalome.process_id) diff --git a/src/Launcher/BatchTest.cxx b/src/Launcher/BatchTest.cxx index a320ecedc..37076b0fb 100644 --- a/src/Launcher/BatchTest.cxx +++ b/src/Launcher/BatchTest.cxx @@ -1,28 +1,33 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "BatchTest.hxx" +#include "Launcher.hxx" + +#ifdef WITH_LIBBATCH +#include +#include +#endif -#include "Batch_Date.hxx" -#include "MpiImpl.hxx" #include "utilities.h" #include @@ -31,8 +36,9 @@ #ifdef WIN32 # include #endif -BatchTest::BatchTest(const Engines::MachineParameters& batch_descr) +BatchTest::BatchTest(const Engines::ResourceDefinition& batch_descr) { +#ifdef WITH_LIBBATCH _batch_descr = batch_descr; // Getting date @@ -52,8 +58,9 @@ BatchTest::BatchTest(const Engines::MachineParameters& batch_descr) // Creating test temporary file _test_filename = "/tmp/"; _test_filename += _date + "_test_cluster_file_"; - _test_filename += _batch_descr.alias.in(); - _base_filename = _date + "_test_cluster_file_" + _batch_descr.alias.in(); + _test_filename += _batch_descr.hostname.in(); + _base_filename = _date + "_test_cluster_file_" + _batch_descr.hostname.in(); +#endif } BatchTest::~BatchTest() {} @@ -63,14 +70,14 @@ BatchTest::test() { bool rtn = false; INFOS(std::endl - << "--- Testing batch Machine :" << std::endl - << "--- Name : " << _batch_descr.hostname << std::endl - << "--- Alias : " << _batch_descr.alias << std::endl - << "--- Protocol : " << _batch_descr.protocol << std::endl - << "--- User Name : " << _batch_descr.username << std::endl - << "--- Batch Type : " << _batch_descr.batch << std::endl - << "--- MPI Impl : " << _batch_descr.mpiImpl << std::endl - << "--- Appli Path : " << _batch_descr.applipath << std::endl + << "--- Testing batch Machine :" << std::endl + << "--- Name : " << _batch_descr.hostname << std::endl + << "--- hostname : " << _batch_descr.hostname << std::endl + << "--- Protocol : " << _batch_descr.protocol << std::endl + << "--- User Name : " << _batch_descr.username << std::endl + << "--- Batch Type : " << _batch_descr.batch << std::endl + << "--- MPI Impl : " << _batch_descr.mpiImpl << std::endl + << "--- Appli Path : " << _batch_descr.applipath << std::endl ); std::string result_connection("Not Tested"); @@ -88,13 +95,13 @@ BatchTest::test() result_appli = test_appli(); INFOS(std::endl - << "--- Test results" << std::endl - << "--- Connection : " << result_connection << std::endl - << "--- File copy : " << result_filecopy << std::endl - << "--- Get results : " << result_getresult << std::endl - << "--- Submit simple job : " << result_jobsubmit_simple << std::endl - << "--- Submit mpi job : " << result_jobsubmit_mpi << std::endl - << "--- Application : " << result_appli << std::endl + << "--- Test results" << std::endl + << "--- Connection : " << result_connection << std::endl + << "--- File copy : " << result_filecopy << std::endl + << "--- Get results : " << result_getresult << std::endl + << "--- Submit simple job : " << result_jobsubmit_simple << std::endl + << "--- Submit mpi job : " << result_jobsubmit_mpi << std::endl + << "--- Application : " << result_appli << std::endl ); if (result_connection == "OK" && @@ -108,21 +115,21 @@ BatchTest::test() return rtn; } -// For this test we use : alias, protocol, username +// For this test we use : hostname, protocol, username std::string BatchTest::test_connection() { int status; std::string command; std::string result("Failed : "); - std::string alias = _batch_descr.alias.in(); + std::string hostname = _batch_descr.hostname.in(); std::string username = _batch_descr.username.in(); std::string protocol = _batch_descr.protocol.in(); // Basic tests - if(alias == "") + if(hostname == "") { - result += "alias is empty !"; + result += "hostname is empty !"; return result; } if(username == "") @@ -138,8 +145,8 @@ BatchTest::test_connection() // Build command command += protocol - + " " - + username + "@" + alias; + + " " + + username + "@" + hostname; // Test status = system(command.c_str()); @@ -155,7 +162,7 @@ BatchTest::test_connection() return result; } -// For this test we use : alias, protocol, username +// For this test we use : hostname, protocol, username std::string BatchTest::test_filecopy() { @@ -163,7 +170,7 @@ BatchTest::test_filecopy() std::string home; std::string command; std::string result("Failed : "); - std::string alias = _batch_descr.alias.in(); + std::string hostname = _batch_descr.hostname.in(); std::string username = _batch_descr.username.in(); std::string protocol = _batch_descr.protocol.in(); @@ -190,7 +197,7 @@ BatchTest::test_filecopy() if(protocol == "rsh") command = "rcp"; command += " " + _test_filename + " " - + username + "@" + alias + ":" + home; + + username + "@" + hostname + ":" + home; // Test status = system(command.c_str()); @@ -206,7 +213,7 @@ BatchTest::test_filecopy() return result; } -// For this test we use : alias, protocol, username +// For this test we use : hostname, protocol, username std::string BatchTest::test_getresult() { @@ -214,7 +221,7 @@ BatchTest::test_getresult() std::string home; std::string command; std::string result("Failed : "); - std::string alias = _batch_descr.alias.in(); + std::string hostname = _batch_descr.hostname.in(); std::string username = _batch_descr.username.in(); std::string protocol = _batch_descr.protocol.in(); @@ -229,8 +236,8 @@ BatchTest::test_getresult() command = "scp"; if(protocol == "rsh") command = "rcp"; - command += " " + username + "@" + alias + ":" + home - + "/" + _base_filename + " " + _test_filename + "_copy"; + command += " " + username + "@" + hostname + ":" + home + + "/" + _base_filename + " " + _test_filename + "_copy"; // Test status = system(command.c_str()); @@ -279,7 +286,7 @@ BatchTest::test_jobsubmit_simple() std::string home; std::string command; std::string result("Failed : "); - std::string alias = _batch_descr.alias.in(); + std::string hostname = _batch_descr.hostname.in(); std::string username = _batch_descr.username.in(); std::string protocol = _batch_descr.protocol.in(); std::string batch_type = _batch_descr.batch.in(); @@ -291,6 +298,18 @@ BatchTest::test_jobsubmit_simple() result = "OK"; return result; } + if (batch_type == "ccc") + { + INFOS("test_jobsubmit_simple not yet implemented for ccc... return OK"); + result = "OK"; + return result; + } + if (batch_type == "slurm") + { + INFOS("test_jobsubmit_simple not yet implemented for slurm... return OK"); + result = "OK"; + return result; + } if (batch_type == "sge") { INFOS("test_jobsubmit_simple not yet implemented for sge... return OK"); @@ -330,7 +349,7 @@ BatchTest::test_jobsubmit_simple() if(protocol == "rsh") command = "rcp"; command += " " + _test_file_simple + " " - + username + "@" + alias + ":" + home; + + username + "@" + hostname + ":" + home; status = system(command.c_str()); if(status) { std::ostringstream oss; @@ -342,7 +361,7 @@ BatchTest::test_jobsubmit_simple() // Build command for submit job std::string file_job_name = _test_filename + "_jobid"; - command = protocol + " " + username + "@" + alias + " qsub " + _base_filename + "_simple > " + file_job_name; + command = protocol + " " + username + "@" + hostname + " qsub " + _base_filename + "_simple > " + file_job_name; status = system(command.c_str()); if(status) { std::ostringstream oss; @@ -362,7 +381,7 @@ BatchTest::test_jobsubmit_simple() file_job.close(); // Wait the end of the job - command = protocol + " " + username + "@" + alias + " qstat -f " + jobid + " > " + file_job_name; + command = protocol + " " + username + "@" + hostname + " qstat -f " + jobid + " > " + file_job_name; bool stop = false; while (!stop) { @@ -390,7 +409,7 @@ BatchTest::test_jobsubmit_simple() if(protocol == "rsh") command = "rcp"; command += " " - + username + "@" + alias + ":" + home + "/" + _date + "_simple* /tmp"; + + username + "@" + hostname + ":" + home + "/" + _date + "_simple* /tmp"; status = system(command.c_str()); if(status) { std::ostringstream oss; @@ -438,12 +457,13 @@ BatchTest::test_jobsubmit_simple() std::string BatchTest::test_jobsubmit_mpi() { +#ifdef WITH_LIBBATCH int status; std::string home; std::string command; MpiImpl * mpiImpl; std::string result("Failed : "); - std::string alias = _batch_descr.alias.in(); + std::string hostname = _batch_descr.hostname.in(); std::string username = _batch_descr.username.in(); std::string protocol = _batch_descr.protocol.in(); std::string batch_type = _batch_descr.batch.in(); @@ -458,7 +478,7 @@ BatchTest::test_jobsubmit_mpi() mpiImpl = new MpiImpl_MPICH2(); else if(mpi_type == "openmpi") mpiImpl = new MpiImpl_OPENMPI(); - else if(mpi_type == "slurm") + else if(mpi_type == "slurmmpi") mpiImpl = new MpiImpl_SLURM(); else { @@ -474,6 +494,20 @@ BatchTest::test_jobsubmit_mpi() return result; } + if (batch_type == "ccc") + { + INFOS("test_jobsubmit_simple not yet implemented for ccc... return OK"); + result = "OK"; + return result; + } + + if (batch_type == "slurm") + { + INFOS("test_jobsubmit_simple not yet implemented for slurm... return OK"); + result = "OK"; + return result; + } + if (batch_type == "sge") { INFOS("test_jobsubmit_simple not yet implemented for sge... return OK"); @@ -493,7 +527,7 @@ BatchTest::test_jobsubmit_mpi() std::ofstream file_script; file_script.open(_test_file_script.c_str(), std::ofstream::out); file_script << "#!/bin/bash\n" - << "echo HELLO MPI\n"; + << "echo HELLO MPI\n"; file_script.flush(); file_script.close(); #ifdef WIN32 @@ -507,13 +541,13 @@ BatchTest::test_jobsubmit_mpi() std::ofstream file_mpi; file_mpi.open(_test_file_mpi.c_str(), std::ofstream::out); file_mpi << "#!/bin/bash\n" - << "#PBS -l nodes=1\n" - << "#PBS -l walltime=00:01:00\n" - << "#PBS -o " << home << "/" << _date << "_mpi_output.log\n" - << "#PBS -e " << home << "/" << _date << "_mpi_error.log\n" - << mpiImpl->boot("${PBS_NODEFILE}", 1) - << mpiImpl->run("${PBS_NODEFILE}", 1, _base_filename + "_script") - << mpiImpl->halt(); + << "#PBS -l nodes=1\n" + << "#PBS -l walltime=00:01:00\n" + << "#PBS -o " << home << "/" << _date << "_mpi_output.log\n" + << "#PBS -e " << home << "/" << _date << "_mpi_error.log\n" + << mpiImpl->boot("${PBS_NODEFILE}", 1) + << mpiImpl->run("${PBS_NODEFILE}", 1, _base_filename + "_script") + << mpiImpl->halt(); file_mpi.flush(); file_mpi.close(); @@ -523,7 +557,7 @@ BatchTest::test_jobsubmit_mpi() if(protocol == "rsh") command = "rcp"; command += " " + _test_file_script + " " - + username + "@" + alias + ":" + home; + + username + "@" + hostname + ":" + home; status = system(command.c_str()); if(status) { std::ostringstream oss; @@ -536,7 +570,7 @@ BatchTest::test_jobsubmit_mpi() if(protocol == "rsh") command = "rcp"; command += " " + _test_file_mpi + " " - + username + "@" + alias + ":" + home; + + username + "@" + hostname + ":" + home; status = system(command.c_str()); if(status) { std::ostringstream oss; @@ -548,7 +582,7 @@ BatchTest::test_jobsubmit_mpi() // Build command for submit job std::string file_job_name = _test_filename + "_jobid"; - command = protocol + " " + username + "@" + alias + " qsub " + _base_filename + "_mpi > " + file_job_name; + command = protocol + " " + username + "@" + hostname + " qsub " + _base_filename + "_mpi > " + file_job_name; status = system(command.c_str()); if(status) { std::ostringstream oss; @@ -568,7 +602,7 @@ BatchTest::test_jobsubmit_mpi() file_job.close(); // Wait the end of the job - command = protocol + " " + username + "@" + alias + " qstat -f " + jobid + " > " + file_job_name; + command = protocol + " " + username + "@" + hostname + " qstat -f " + jobid + " > " + file_job_name; bool stop = false; while (!stop) { @@ -596,7 +630,7 @@ BatchTest::test_jobsubmit_mpi() if(protocol == "rsh") command = "rcp"; command += " " - + username + "@" + alias + ":" + home + "/" + _date + "_mpi* /tmp"; + + username + "@" + hostname + ":" + home + "/" + _date + "_mpi* /tmp"; status = system(command.c_str()); if(status) { std::ostringstream oss; @@ -629,6 +663,10 @@ BatchTest::test_jobsubmit_mpi() } result = "OK"; return result; +#else + throw LauncherException("Method BatchTest::test_jobsubmit_mpi is not available " + "(libBatch was not present at compilation time)"); +#endif } std::string @@ -638,7 +676,7 @@ BatchTest::test_appli() std::string home; std::string command; std::string result("Failed : "); - std::string alias = _batch_descr.alias.in(); + std::string hostname = _batch_descr.hostname.in(); std::string username = _batch_descr.username.in(); std::string protocol = _batch_descr.protocol.in(); std::string applipath = _batch_descr.applipath.in(); @@ -654,12 +692,12 @@ BatchTest::test_appli() std::ofstream file_appli; file_appli.open(_test_file_appli.c_str(), std::ofstream::out); file_appli << "#!/bin/bash\n" - << "if [ -f " << applipath << "/runAppli ]\n" - << "then\n" - << " echo OK\n" - << "else\n" - << " echo NOK\n" - << "fi\n"; + << "if [ -f " << applipath << "/runAppli ]\n" + << "then\n" + << " echo OK\n" + << "else\n" + << " echo NOK\n" + << "fi\n"; file_appli.flush(); file_appli.close(); @@ -668,7 +706,7 @@ BatchTest::test_appli() if(protocol == "rsh") command = "rcp"; command += " " + _test_file_appli + " " - + username + "@" + alias + ":" + home; + + username + "@" + hostname + ":" + home; status = system(command.c_str()); if(status) { std::ostringstream oss; @@ -679,9 +717,9 @@ BatchTest::test_appli() } // Launch test - command = protocol + " " + username + "@" + alias - + " sh " + home + "/" + _base_filename + "_appli_test > " - + _test_filename + "_appli_test_result"; + command = protocol + " " + username + "@" + hostname + + " sh " + home + "/" + _base_filename + "_appli_test > " + + _test_filename + "_appli_test_result"; status = system(command.c_str()); if(status) { @@ -721,12 +759,12 @@ BatchTest::get_home(std::string * home) int status; std::string result = ""; std::string command; - std::string alias = _batch_descr.alias.in(); + std::string hostname = _batch_descr.hostname.in(); std::string username = _batch_descr.username.in(); std::string protocol = _batch_descr.protocol.in(); std::string file_home_name = _test_filename + "_home"; - command = protocol + " " + username + "@" + alias + " 'echo $HOME' > " + file_home_name; + command = protocol + " " + username + "@" + hostname + " 'echo $HOME' > " + file_home_name; status = system(command.c_str()); if(status) { std::ostringstream oss; diff --git a/src/Launcher/BatchTest.hxx b/src/Launcher/BatchTest.hxx index 8ccd5a550..17d825c95 100644 --- a/src/Launcher/BatchTest.hxx +++ b/src/Launcher/BatchTest.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef __BatchTest_HXX__ #define __BatchTest_HXX__ @@ -32,7 +33,7 @@ class SALOMELAUNCHER_EXPORT BatchTest { public: - BatchTest(const Engines::MachineParameters& batch_descr); + BatchTest(const Engines::ResourceDefinition& batch_descr); virtual ~BatchTest(); bool test(); @@ -48,7 +49,7 @@ class SALOMELAUNCHER_EXPORT BatchTest std::string get_home(std::string * home); private: - Engines::MachineParameters _batch_descr; + Engines::ResourceDefinition _batch_descr; std::string _test_filename; std::string _base_filename; std::string _date; diff --git a/src/Launcher/Launcher.cxx b/src/Launcher/Launcher.cxx index 6dd80e189..62bfe647b 100644 --- a/src/Launcher/Launcher.cxx +++ b/src/Launcher/Launcher.cxx @@ -1,40 +1,42 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#include "Launcher.hxx" -#include "Batch_Date.hxx" -#include "Batch_FactBatchManager_eLSF.hxx" -#include "Batch_FactBatchManager_ePBS.hxx" -#include "Batch_BatchManager_eClient.hxx" -#include "Batch_FactBatchManager_eSGE.hxx" +#ifdef WITH_LIBBATCH +#include +#include +#include +#include +#endif + +#include "Basics_Utils.hxx" +#include "Basics_DirUtils.hxx" #include "SALOME_Launcher_Handler.hxx" #include "Launcher.hxx" +#include "Launcher_Job_Command.hxx" #include #include #include #include -using namespace std; - //============================================================================= /*! * Constructor @@ -43,12 +45,12 @@ using namespace std; * with non thread-safe usage like Change_Directory in SALOME naming service */ //============================================================================= - Launcher_cpp::Launcher_cpp() { -#if defined(_DEBUG_) || defined(_DEBUG) - cerr << "Launcher_cpp constructor" << endl; -#endif + LAUNCHER_MESSAGE("Launcher_cpp constructor"); + _job_cpt = 0; + _job_cpt_mutex = new pthread_mutex_t(); + pthread_mutex_init(_job_cpt_mutex, NULL); } //============================================================================= @@ -56,357 +58,307 @@ Launcher_cpp::Launcher_cpp() * destructor */ //============================================================================= - Launcher_cpp::~Launcher_cpp() { -#if defined(_DEBUG_) || defined(_DEBUG) - cerr << "Launcher_cpp destructor" << endl; -#endif - std::map < string, Batch::BatchManager_eClient * >::const_iterator it1; + LAUNCHER_MESSAGE("Launcher_cpp destructor"); +#ifdef WITH_LIBBATCH + std::map::const_iterator it_job; + for(it_job = _launcher_job_map.begin(); it_job != _launcher_job_map.end(); it_job++) + delete it_job->second; + std::map ::const_iterator it1; for(it1=_batchmap.begin();it1!=_batchmap.end();it1++) delete it1->second; - std::map < std::pair , Batch::Job* >::const_iterator it2; - for(it2=_jobmap.begin();it2!=_jobmap.end();it2++) - delete it2->second; +#endif + + pthread_mutex_destroy(_job_cpt_mutex); + delete _job_cpt_mutex; } +#ifdef WITH_LIBBATCH + //============================================================================= -/*! CORBA Method: - * Submit a batch job on a cluster and returns the JobId - * \param xmlExecuteFile : to define the execution on the batch cluster - * \param clusterName : name of the batch cluster - */ +/*! + * Add a job into the launcher - check resource and choose one + */ //============================================================================= -long Launcher_cpp::submitJob( const std::string xmlExecuteFile, - const std::string clusterName) throw(LauncherException) +void +Launcher_cpp::createJob(Launcher::Job * new_job) { -#if defined(_DEBUG_) || defined(_DEBUG) - cout << "BEGIN OF Launcher_cpp::submitJob" << endl; -#endif - long jobId; - vector aMachineList; - - if(!_ResManager) - throw LauncherException("You must set Resources Manager to Launcher!!"); - - // verify if cluster is in resources catalog - machineParams params; - params.hostname = clusterName; - vector aCompoList ; - try{ - aMachineList = _ResManager->GetFittingResources(params, aCompoList); + LAUNCHER_MESSAGE("Creating a new job"); + // Add job to the jobs map + pthread_mutex_lock(_job_cpt_mutex); + new_job->setNumber(_job_cpt); + _job_cpt++; + pthread_mutex_unlock(_job_cpt_mutex); + std::map::const_iterator it_job = _launcher_job_map.find(new_job->getNumber()); + if (it_job == _launcher_job_map.end()) + _launcher_job_map[new_job->getNumber()] = new_job; + else + { + LAUNCHER_INFOS("A job as already the same id: " << new_job->getNumber()); + delete new_job; + throw LauncherException("A job as already the same id - job is not created !"); } - catch(const ResourcesException &ex){ - throw LauncherException(ex.msg.c_str()); + LAUNCHER_MESSAGE("New Job created"); +} + +//============================================================================= +/*! + * Launch a job + */ +//============================================================================= +void +Launcher_cpp::launchJob(int job_id) +{ + LAUNCHER_MESSAGE("Launch a job"); + + // Check if job exist + std::map::const_iterator it_job = _launcher_job_map.find(job_id); + if (it_job == _launcher_job_map.end()) + { + LAUNCHER_INFOS("Cannot find the job, is it created ? job number: " << job_id); + throw LauncherException("Cannot find the job, is it created ?"); } - if (aMachineList.size() == 0) - throw LauncherException("This cluster is not in resources catalog"); - // Parsing xml file - ParseXmlFile(xmlExecuteFile); + Launcher::Job * job = it_job->second; - // verify if clustername is in xml file - map::const_iterator it1 = _launch.MachinesList.find(clusterName); - if(it1 == _launch.MachinesList.end()) - throw LauncherException("This cluster is not in xml file"); + // Check job state (cannot launch a job already launched...) + if (job->getState() != "CREATED") + { + LAUNCHER_INFOS("Bad state of the job: " << job->getState()); + throw LauncherException("Bad state of the job: " + job->getState()); + } - ParserResourcesType p = _ResManager->GetResourcesList(aMachineList[0]); - string cname(p.Alias); -#if defined(_DEBUG_) || defined(_DEBUG) - cout << "Choose cluster: " << cname << endl; + // Third step search batch manager for the job into the map -> instanciate one if does not exist +#ifdef WITH_LIBBATCH + std::map::const_iterator it = _batchmap.find(job_id); + if(it == _batchmap.end()) + { + createBatchManagerForJob(job); + } #endif - // search batch manager for that cluster in map or instanciate one - map < string, Batch::BatchManager_eClient * >::const_iterator it2 = _batchmap.find(cname); - if(it2 == _batchmap.end()) - { - _batchmap[cname] = FactoryBatchManager(p); - // TODO: Add a test for the cluster ! - } - - try{ - - // directory on cluster to put files to execute - string remotedir = _launch.MachinesList[clusterName].WorkDirectory; - // local directory to get files to execute and to put results - string localdir = _launch.RefDirectory; - - int idx1 = xmlExecuteFile.find_last_of("/"); - if(idx1 == string::npos) idx1 = -1; - int idx2 = xmlExecuteFile.find(".xml"); - string logfile = xmlExecuteFile.substr(idx1+1,idx2-idx1-1); - string ologfile = logfile + ".output.log"; - string elogfile = logfile + ".error.log"; - - // create and submit job on cluster - Batch::Parametre param; - param[USER] = p.UserName; - param[EXECUTABLE] = ""; - for(int i=0; i<_launch.InputFile.size();i++) - param[INFILE] += Batch::Couple( localdir + "/" + _launch.InputFile[i], remotedir + "/" + _launch.InputFile[i] ); - for(int i=0; i<_launch.OutputFile.size();i++) - param[OUTFILE] += Batch::Couple( localdir + "/" + _launch.OutputFile[i], remotedir + "/" + _launch.OutputFile[i] ); - param[OUTFILE] += Batch::Couple( localdir + "/" + ologfile, remotedir + "/" + ologfile ); - param[OUTFILE] += Batch::Couple( localdir + "/" + elogfile, remotedir + "/" + elogfile ); - param[NBPROC] = _launch.NbOfProcesses; - param[WORKDIR] = remotedir; - param[TMPDIR] = remotedir; - param[MAXWALLTIME] = getWallTime(""); - param[MAXRAMSIZE] = getRamSize(""); - param[HOMEDIR] = ""; - - Batch::Environnement env; - env["COMMAND"] = _launch.Command; - env["SOURCEFILE"] = _launch.MachinesList[clusterName].EnvFile; - env["LOGFILE"] = logfile; - - Batch::Job* job = new Batch::Job(param,env); - - // submit job on cluster - Batch::JobId jid = _batchmap[cname]->submitJob(*job); - - // get job id in long - istringstream iss(jid.getReference()); - iss >> jobId; - - _jobmap[ pair(cname,jobId) ] = job; - } - catch(const Batch::EmulationException &ex){ - throw LauncherException(ex.msg.c_str()); + try { + Batch::JobId batch_manager_job_id = _batchmap[job_id]->submitJob(*(job->getBatchJob())); + job->setBatchManagerJobId(batch_manager_job_id); + job->setState("QUEUED"); } - - return jobId; + catch(const Batch::EmulationException &ex) + { + LAUNCHER_INFOS("Job is not launched, exception in submitJob: " << ex.message); + throw LauncherException(ex.message.c_str()); + } + LAUNCHER_MESSAGE("Job launched"); } //============================================================================= -/*! CORBA Method: - * Submit a batch job on a cluster and returns the JobId - * \param fileToExecute : .py/.exe/.sh/... to execute on the batch cluster - * \param filesToExport : to export on the batch cluster - * \param NumberOfProcessors : Number of processors needed on the batch cluster - * \param params : Constraints for the choice of the batch cluster - */ +/*! + * Get job state + */ //============================================================================= -long Launcher_cpp::submitSalomeJob( const string fileToExecute , - const vector& filesToExport , - const vector& filesToImport , - const batchParams& batch_params, - const machineParams& params) throw(LauncherException) +const char * +Launcher_cpp::getJobState(int job_id) { -#if defined(_DEBUG_) || defined(_DEBUG) - cerr << "BEGIN OF Launcher_cpp::submitSalomeJob" << endl; -#endif - long jobId; - vector aMachineList; - - if(!_ResManager) - throw LauncherException("You must set Resources Manager to Launcher!!"); + LAUNCHER_MESSAGE("Get job state"); + + // Check if job exist + std::map::const_iterator it_job = _launcher_job_map.find(job_id); + if (it_job == _launcher_job_map.end()) + { + LAUNCHER_INFOS("Cannot find the job, is it created ? job number: " << job_id); + throw LauncherException("Cannot find the job, is it created ?"); + } - // check batch params - if ( !check(batch_params) ) - throw LauncherException("Batch parameters are bad (see informations above)"); + Launcher::Job * job = it_job->second; - // find a cluster matching the structure params - vector aCompoList ; - try{ - aMachineList = _ResManager->GetFittingResources(params, aCompoList); + std::string state; + try + { + state = job->updateJobState(); } - catch(const ResourcesException &ex){ - throw LauncherException(ex.msg.c_str()); + catch(const Batch::EmulationException &ex) + { + LAUNCHER_INFOS("getJobState failed, exception: " << ex.message); + throw LauncherException(ex.message.c_str()); } - if (aMachineList.size() == 0) - throw LauncherException("No resources have been found with your parameters"); - - ParserResourcesType p = _ResManager->GetResourcesList(aMachineList[0]); - string clustername(p.Alias); -#if defined(_DEBUG_) || defined(_DEBUG) - cerr << "Choose cluster: " << clustername << endl; -#endif - - // search batch manager for that cluster in map or instanciate one - map < string, Batch::BatchManager_eClient * >::const_iterator it = _batchmap.find(clustername); - if(it == _batchmap.end()) - { - _batchmap[clustername] = FactoryBatchManager(p); - // TODO: Add a test for the cluster ! - } - - try{ - // tmp directory on cluster to put files to execute - string tmpdir = getTmpDirForBatchFiles(); - - // create and submit job on cluster - Batch::Parametre param; - param[USER] = p.UserName; - param[EXECUTABLE] = buildSalomeCouplingScript(fileToExecute,tmpdir,p); - param[INFILE] = Batch::Couple( fileToExecute, getRemoteFile(tmpdir,fileToExecute) ); - for(int i=0;isubmitJob(*job); - - // get job id in long - istringstream iss(jid.getReference()); - iss >> jobId; - - _jobmap[ pair(clustername,jobId) ] = job; - } - catch(const Batch::EmulationException &ex){ - throw LauncherException(ex.msg.c_str()); + catch(const Batch::RunTimeException &ex) + { + LAUNCHER_INFOS("getJobState failed, exception: " << ex.message); + throw LauncherException(ex.message.c_str()); } - return jobId; + return state.c_str(); } //============================================================================= -/*! CORBA Method: - * Query a batch job on a cluster and returns the status of job - * \param jobId : identification of Salome job - * \param params : Constraints for the choice of the batch cluster - */ +/*! + * Get Job result - the result directory could be changed + */ //============================================================================= -string Launcher_cpp::queryJob( long id, - const machineParams& params) throw(LauncherException) +void +Launcher_cpp::getJobResults(int job_id, std::string directory) { - if(!_ResManager) - throw LauncherException("You must set Resources Manager to Launcher!!"); - - // find a cluster matching params structure - vector aCompoList ; - vector aMachineList = _ResManager->GetFittingResources( params , aCompoList ) ; - ParserResourcesType p = _ResManager->GetResourcesList(aMachineList[0]); - string clustername(p.Alias); - - // search batch manager for that cluster in map - std::map < string, Batch::BatchManager_eClient * >::const_iterator it = _batchmap.find(clustername); - if(it == _batchmap.end()) - throw LauncherException("no batchmanager for that cluster"); - - Batch::Parametre par; - try{ - ostringstream oss; - oss << id; - Batch::JobId jobId( _batchmap[clustername], oss.str() ); - - Batch::JobInfo jinfo = jobId.queryJob(); - par = jinfo.getParametre(); - } - catch(const Batch::EmulationException &ex){ - throw LauncherException(ex.msg.c_str()); + LAUNCHER_MESSAGE("Get Job results"); + + // Check if job exist + std::map::const_iterator it_job = _launcher_job_map.find(job_id); + if (it_job == _launcher_job_map.end()) + { + LAUNCHER_INFOS("Cannot find the job, is it created ? job number: " << job_id); + throw LauncherException("Cannot find the job, is it created ?"); } - return par[STATE]; + Launcher::Job * job = it_job->second; + std::string resource_name = job->getResourceDefinition().Name; + try + { + if (directory != "") + _batchmap[job_id]->importOutputFiles(*(job->getBatchJob()), directory); + else + _batchmap[job_id]->importOutputFiles(*(job->getBatchJob()), job->getResultDirectory()); + } + catch(const Batch::EmulationException &ex) + { + LAUNCHER_INFOS("getJobResult is maybe incomplete, exception: " << ex.message); + throw LauncherException(ex.message.c_str()); + } + LAUNCHER_MESSAGE("getJobResult ended"); } -string Launcher_cpp::queryJob( long id, - const std::string clusterName) +//============================================================================= +/*! + * Get Job dump state - the result directory could be changed + */ +//============================================================================= +bool +Launcher_cpp::getJobDumpState(int job_id, std::string directory) { - machineParams params; - params.hostname = clusterName; - return queryJob(id,params); + bool rtn; + LAUNCHER_MESSAGE("Get Job dump state"); + + // Check if job exist + std::map::const_iterator it_job = _launcher_job_map.find(job_id); + if (it_job == _launcher_job_map.end()) + { + LAUNCHER_INFOS("Cannot find the job, is it created ? job number: " << job_id); + throw LauncherException("Cannot find the job, is it created ?"); + } + + Launcher::Job * job = it_job->second; + std::string resource_name = job->getResourceDefinition().Name; + try + { + if (directory != "") + rtn = _batchmap[job_id]->importDumpStateFile(*(job->getBatchJob()), directory); + else + rtn = _batchmap[job_id]->importDumpStateFile(*(job->getBatchJob()), job->getResultDirectory()); + } + catch(const Batch::EmulationException &ex) + { + LAUNCHER_INFOS("getJobResult is maybe incomplete, exception: " << ex.message); + throw LauncherException(ex.message.c_str()); + } + LAUNCHER_MESSAGE("getJobResult ended"); + return rtn; } //============================================================================= -/*! CORBA Method: - * Delete a batch job on a cluster - * \param jobId : identification of Salome job - * \param params : Constraints for the choice of the batch cluster - */ +/*! + * Remove the job - into the Launcher and its batch manager + */ //============================================================================= -void Launcher_cpp::deleteJob( const long id, - const machineParams& params) throw(LauncherException) +void +Launcher_cpp::removeJob(int job_id) { - if(!_ResManager) - throw LauncherException("You must set Resources Manager to Launcher!!"); - - // find a cluster matching params structure - vector aCompoList ; - vector aMachineList = _ResManager->GetFittingResources( params , aCompoList ) ; - ParserResourcesType p = _ResManager->GetResourcesList(aMachineList[0]); - string clustername(p.Alias); - - // search batch manager for that cluster in map - map < string, Batch::BatchManager_eClient * >::const_iterator it = _batchmap.find(clustername); - if(it == _batchmap.end()) - throw LauncherException("no batchmanager for that cluster"); - - ostringstream oss; - oss << id; - Batch::JobId jobId( _batchmap[clustername], oss.str() ); + LAUNCHER_MESSAGE("Remove Job"); + + // Check if job exist + std::map::iterator it_job = _launcher_job_map.find(job_id); + if (it_job == _launcher_job_map.end()) + { + LAUNCHER_INFOS("Cannot find the job, is it created ? job number: " << job_id); + throw LauncherException("Cannot find the job, is it created ?"); + } - jobId.deleteJob(); + it_job->second->removeJob(); + delete it_job->second; + _launcher_job_map.erase(it_job); } -void Launcher_cpp::deleteJob( long id, - const std::string clusterName) +//============================================================================= +/*! + * stop the job + */ +//============================================================================= +void +Launcher_cpp::stopJob(int job_id) { - machineParams params; - params.hostname = clusterName; - deleteJob(id,params); + LAUNCHER_MESSAGE("Stop Job"); + + // Check if job exist + std::map::iterator it_job = _launcher_job_map.find(job_id); + if (it_job == _launcher_job_map.end()) + { + LAUNCHER_INFOS("Cannot find the job, is it created ? job number: " << job_id); + throw LauncherException("Cannot find the job, is it created ?"); + } + + it_job->second->stopJob(); } //============================================================================= -/*! CORBA Method: - * Get result files of job on a cluster - * \param jobId : identification of Salome job - * \param params : Constraints for the choice of the batch cluster +/*! + * create a launcher job based on a file + * \param xmlExecuteFile : to define the execution on the batch cluster */ //============================================================================= -void Launcher_cpp::getResultsJob( const string directory, - const long id, - const machineParams& params) throw(LauncherException) +long +Launcher_cpp::createJobWithFile(const std::string xmlExecuteFile, + const std::string clusterName) { - if(!_ResManager) - throw LauncherException("You must set Resources Manager to Launcher!!"); - - vector aCompoList ; - vector aMachineList = _ResManager->GetFittingResources( params , aCompoList ) ; - ParserResourcesType p = _ResManager->GetResourcesList(aMachineList[0]); - string clustername(p.Alias); - - // search batch manager for that cluster in map - map < string, Batch::BatchManager_eClient * >::const_iterator it = _batchmap.find(clustername); - if(it == _batchmap.end()) - throw LauncherException("no batchmanager for that cluster"); - - Batch::Job* job = _jobmap[ pair(clustername,id) ]; + LAUNCHER_MESSAGE("Begin of Launcher_cpp::createJobWithFile"); - _batchmap[clustername]->importOutputFiles( *job, directory ); -} + // Parsing xml file + ParserLauncherType job_params = ParseXmlFile(xmlExecuteFile); -void Launcher_cpp::getResultsJob( const std::string directory, - long id, - const std::string clusterName) -{ - machineParams params; - params.hostname = clusterName; - getResultsJob(directory,id,params); + // Creating a new job + Launcher::Job_Command * new_job = new Launcher::Job_Command(); + + std::string cmdFile = Kernel_Utils::GetTmpFileName(); +#ifndef WIN32 + cmdFile += ".sh"; +#else + cmdFile += ".bat"; +#endif + std::ofstream os; + os.open(cmdFile.c_str(), std::ofstream::out ); + os << "#! /bin/sh" << std::endl; + os << job_params.Command; + os.close(); + + new_job->setJobFile(cmdFile); + new_job->setLocalDirectory(job_params.RefDirectory); + new_job->setWorkDirectory(job_params.MachinesList[clusterName].WorkDirectory); + new_job->setEnvFile(job_params.MachinesList[clusterName].EnvFile); + + for(int i=0; i < job_params.InputFile.size(); i++) + new_job->add_in_file(job_params.InputFile[i]); + for(int i=0; i < job_params.OutputFile.size();i++) + new_job->add_out_file(job_params.OutputFile[i]); + + resourceParams p; + p.hostname = clusterName; + p.name = ""; + p.OS = ""; + p.nb_proc = job_params.NbOfProcesses; + p.nb_node = 0; + p.nb_proc_per_node = 0; + p.cpu_clock = 0; + p.mem_mb = 0; + new_job->setResourceRequiredParams(p); + + createJob(new_job); + return new_job->getNumber(); } //============================================================================= @@ -414,458 +366,318 @@ void Launcher_cpp::getResultsJob( const std::string directory, * Factory to instanciate the good batch manager for choosen cluster. */ //============================================================================= - -Batch::BatchManager_eClient *Launcher_cpp::FactoryBatchManager( const ParserResourcesType& params ) throw(LauncherException) +Batch::BatchManager_eClient * +Launcher_cpp::FactoryBatchManager(ParserResourcesType& params) { - - std::string hostname, protocol, mpi; + std::string mpi; + Batch::CommunicationProtocolType protocol; Batch::FactBatchManager_eClient* fact; - hostname = params.Alias; - switch(params.Protocol){ - case rsh: - protocol = "rsh"; - break; - case ssh: - protocol = "ssh"; - break; - default: - throw LauncherException("unknown protocol"); - break; - } - switch(params.mpi){ - case lam: - mpi = "lam"; - break; - case mpich1: - mpi = "mpich1"; - break; - case mpich2: - mpi = "mpich2"; - break; - case openmpi: - mpi = "openmpi"; - break; - case slurm: - mpi = "slurm"; - break; - case prun: - mpi = "prun"; - break; - case nompi: - throw LauncherException("you must specified an mpi implementation for batch manager"); - break; - default: - throw LauncherException("unknown mpi implementation"); - break; - } -#if defined(_DEBUG_) || defined(_DEBUG) - cerr << "Instanciation of batch manager" << endl; -#endif - switch( params.Batch ){ - case pbs: -#if defined(_DEBUG_) || defined(_DEBUG) - cerr << "Instantiation of PBS batch manager" << endl; -#endif - fact = new Batch::FactBatchManager_ePBS; - break; - case lsf: -#if defined(_DEBUG_) || defined(_DEBUG) - cerr << "Instantiation of LSF batch manager" << endl; -#endif - fact = new Batch::FactBatchManager_eLSF; - break; - case sge: -#if defined(_DEBUG_) || defined(_DEBUG) - cout << "Instantiation of SGE batch manager" << endl; -#endif - fact = new Batch::FactBatchManager_eSGE; - break; - default: -#if defined(_DEBUG_) || defined(_DEBUG) - cerr << "BATCH = " << params.Batch << endl; -#endif - throw LauncherException("no batchmanager for that cluster"); + int nb_proc_per_node = params.DataForSort._nbOfProcPerNode; + std::string hostname = params.HostName; + + switch(params.Protocol) + { + case rsh: + protocol = Batch::RSH; + break; + case ssh: + protocol = Batch::SSH; + break; + default: + throw LauncherException("Unknown protocol for this resource"); + break; } - return (*fact)(hostname.c_str(),protocol.c_str(),mpi.c_str()); -} -string Launcher_cpp::buildSalomeCouplingScript(const string fileToExecute, const string dirForTmpFiles, const ParserResourcesType& params) -{ -#ifndef WIN32 //TODO: need for porting on Windows - int idx = dirForTmpFiles.find("Batch/"); - std::string filelogtemp = dirForTmpFiles.substr(idx+6, dirForTmpFiles.length()); - - string::size_type p1 = fileToExecute.find_last_of("/"); - string::size_type p2 = fileToExecute.find_last_of("."); - std::string fileNameToExecute = fileToExecute.substr(p1+1,p2-p1-1); - std::string TmpFileName = "/tmp/runSalome_" + fileNameToExecute + ".sh"; - - MpiImpl* mpiImpl = FactoryMpiImpl(params.mpi); - - ofstream tempOutputFile; - tempOutputFile.open(TmpFileName.c_str(), ofstream::out ); - - // Begin - tempOutputFile << "#! /bin/sh -f" << endl ; - tempOutputFile << "cd " ; - tempOutputFile << params.AppliPath << endl ; - tempOutputFile << "export SALOME_BATCH=1\n"; - tempOutputFile << "export PYTHONPATH=~/" ; - tempOutputFile << dirForTmpFiles ; - tempOutputFile << ":$PYTHONPATH" << endl ; - - // Adding user script - std::string script = params.userCommands; - if (script != "") - tempOutputFile << script << endl; - // Test node rank - tempOutputFile << "if test \"" ; - tempOutputFile << mpiImpl->rank() ; - tempOutputFile << "\" = \"0\"; then" << endl ; - - // ----------------------------------------------- - // Code for rank 0 : launch runAppli and a container - // RunAppli - if(params.ModulesList.size()>0) - tempOutputFile << " ./runAppli --terminal --modules=" ; - else - tempOutputFile << " ./runAppli --terminal "; - for ( int i = 0 ; i < params.ModulesList.size() ; i++ ) { - tempOutputFile << params.ModulesList[i] ; - if ( i != params.ModulesList.size()-1 ) - tempOutputFile << "," ; - } - tempOutputFile << " --standalone=registry,study,moduleCatalog --ns-port-log=" - << filelogtemp - << " &\n"; - - // Wait NamingService - tempOutputFile << " current=0\n" - << " stop=20\n" - << " while ! test -f " << filelogtemp << "\n" - << " do\n" - << " sleep 2\n" - << " let current=current+1\n" - << " if [ \"$current\" -eq \"$stop\" ] ; then\n" - << " echo Error Naming Service failed ! >&2" - << " exit\n" - << " fi\n" - << " done\n" - << " port=`cat " << filelogtemp << "`\n"; - - // Wait other containers - tempOutputFile << " for ((ip=1; ip < "; - tempOutputFile << mpiImpl->size(); - tempOutputFile << " ; ip++))" << endl; - tempOutputFile << " do" << endl ; - tempOutputFile << " arglist=\"$arglist YACS_Server_\"$ip" << endl ; - tempOutputFile << " done" << endl ; - tempOutputFile << " sleep 5" << endl ; - tempOutputFile << " ./runSession waitContainers.py $arglist" << endl ; - - // Launch user script - tempOutputFile << " ./runSession python ~/" << dirForTmpFiles << "/" << fileNameToExecute << ".py" << endl; - - // Stop application - tempOutputFile << " rm " << filelogtemp << "\n" - << " ./runSession shutdownSalome.py" << endl; - - // ------------------------------------- - // Other nodes launch a container - tempOutputFile << "else" << endl ; - - // Wait NamingService - tempOutputFile << " current=0\n" - << " stop=20\n" - << " while ! test -f " << filelogtemp << "\n" - << " do\n" - << " sleep 2\n" - << " let current=current+1\n" - << " if [ \"$current\" -eq \"$stop\" ] ; then\n" - << " echo Error Naming Service failed ! >&2" - << " exit\n" - << " fi\n" - << " done\n" - << " port=`cat " << filelogtemp << "`\n"; - - // Launching container - tempOutputFile << " ./runSession SALOME_Container YACS_Server_"; - tempOutputFile << mpiImpl->rank() - << " > ~/" << dirForTmpFiles << "/YACS_Server_" - << mpiImpl->rank() << "_container_log." << filelogtemp - << " 2>&1\n"; - tempOutputFile << "fi" << endl ; - tempOutputFile.flush(); - tempOutputFile.close(); - chmod(TmpFileName.c_str(), 0x1ED); -#if defined(_DEBUG_) || defined(_DEBUG) - cerr << TmpFileName.c_str() << endl; -#endif + switch(params.mpi) + { + case lam: + mpi = "lam"; + break; + case mpich1: + mpi = "mpich1"; + break; + case mpich2: + mpi = "mpich2"; + break; + case openmpi: + mpi = "openmpi"; + break; + case slurmmpi: + mpi = "slurmmpi"; + break; + case prun: + mpi = "prun"; + break; + default: + mpi = "nompi"; + } - delete mpiImpl; + const char * bmType; + switch( params.Batch ) + { + case pbs: + bmType = "ePBS"; + break; + case lsf: + bmType = "eLSF"; + break; + case sge: + bmType = "eSGE"; + break; + case ccc: + bmType = "eCCC"; + break; + case slurm: + bmType = "eSLURM"; + break; + case ssh_batch: + bmType = "eSSH"; + break; + case ll: + bmType = "eLL"; + break; + case vishnu: + bmType = "eVISHNU"; + break; + default: + LAUNCHER_MESSAGE("Bad batch description of the resource: Batch = " << params.Batch); + throw LauncherException("No batchmanager for that cluster - Bad batch description of the resource"); + } + Batch::BatchManagerCatalog & cata = Batch::BatchManagerCatalog::getInstance(); + fact = dynamic_cast(cata(bmType)); + if (fact == NULL) { + LAUNCHER_MESSAGE("Cannot find batch manager factory for " << bmType << ". Check your version of libBatch."); + throw LauncherException("Cannot find batch manager factory"); + } + LAUNCHER_MESSAGE("Instanciation of batch manager of type: " << bmType); + Batch::BatchManager_eClient * batch_client = (*fact)(hostname.c_str(), params.UserName.c_str(), + protocol, mpi.c_str(), nb_proc_per_node); + return batch_client; +} - return TmpFileName; +//---------------------------------------------------------- +// Without LIBBATCH - Launcher_cpp do nothing... +//---------------------------------------------------------- #else - return ""; -#endif - + +void +Launcher_cpp::createJob(Launcher::Job * new_job) +{ + LAUNCHER_INFOS("Launcher compiled without LIBBATCH - cannot create a job !!!"); + delete new_job; + throw LauncherException("Method Launcher_cpp::createJob is not available " + "(libBatch was not present at compilation time)"); } -MpiImpl *Launcher_cpp::FactoryMpiImpl(MpiImplType mpi) throw(LauncherException) +void +Launcher_cpp::launchJob(int job_id) { - switch(mpi){ - case lam: - return new MpiImpl_LAM(); - case mpich1: - return new MpiImpl_MPICH1(); - case mpich2: - return new MpiImpl_MPICH2(); - case openmpi: - return new MpiImpl_OPENMPI(); - case slurm: - return new MpiImpl_SLURM(); - case prun: - return new MpiImpl_PRUN(); - case nompi: - throw LauncherException("you must specify an mpi implementation for batch manager"); - default: - ostringstream oss; - oss << mpi << " : not yet implemented"; - throw LauncherException(oss.str().c_str()); - } + LAUNCHER_INFOS("Launcher compiled without LIBBATCH - cannot launch a job !!!"); + throw LauncherException("Method Launcher_cpp::launchJob is not available " + "(libBatch was not present at compilation time)"); +} +const char * +Launcher_cpp::getJobState(int job_id) +{ + LAUNCHER_INFOS("Launcher compiled without LIBBATCH - cannot get job state!!!"); + throw LauncherException("Method Launcher_cpp::getJobState is not available " + "(libBatch was not present at compilation time)"); } -string Launcher_cpp::getTmpDirForBatchFiles() +void +Launcher_cpp::getJobResults(int job_id, std::string directory) { - string ret; - string thedate; - - // Adding date to the directory name - Batch::Date date = Batch::Date(time(0)); - thedate = date.str(); - int lend = thedate.size() ; - int i = 0 ; - while ( i < lend ) { - if ( thedate[i] == '/' || thedate[i] == '-' || thedate[i] == ':' ) { - thedate[i] = '_' ; - } - i++ ; - } + LAUNCHER_INFOS("Launcher compiled without LIBBATCH - cannot get job results!!!"); + throw LauncherException("Method Launcher_cpp::getJobResults is not available " + "(libBatch was not present at compilation time)"); +} - ret = string("Batch/"); - ret += thedate; - return ret; +bool +Launcher_cpp::getJobDumpState(int job_id, std::string directory) +{ + LAUNCHER_INFOS("Launcher compiled without LIBBATCH - cannot get job dump state!!!"); + throw LauncherException("Method Launcher_cpp::getJobDumpState is not available " + "(libBatch was not present at compilation time)"); } -string Launcher_cpp::getRemoteFile( std::string remoteDir, std::string localFile ) +void +Launcher_cpp::removeJob(int job_id) { - string::size_type pos = localFile.find_last_of("/") + 1; - int ln = localFile.length() - pos; - string remoteFile = remoteDir + "/" + localFile.substr(pos,ln); - return remoteFile; + LAUNCHER_INFOS("Launcher compiled without LIBBATCH - cannot remove job!!!"); + throw LauncherException("Method Launcher_cpp::removeJob is not available " + "(libBatch was not present at compilation time)"); } -bool Launcher_cpp::check(const batchParams& batch_params) +void +Launcher_cpp::stopJob(int job_id) { - bool rtn = true; -#if defined(_DEBUG_) || defined(_DEBUG) - cerr << "Job parameters are :" << endl; - cerr << "Directory : $HOME/Batch/$date" << endl; -#endif + throw LauncherException("Method Launcher_cpp::stopJob is not available " + "(libBatch was not present at compilation time)"); +} - // check expected_during_time (check the format) - std::string edt_info = batch_params.expected_during_time; - std::string edt_value = batch_params.expected_during_time; - if (edt_value != "") { - std::string begin_edt_value = edt_value.substr(0, 2); - std::string mid_edt_value = edt_value.substr(2, 1); - std::string end_edt_value = edt_value.substr(3); - - long value; - std::istringstream iss(begin_edt_value); - if (!(iss >> value)) { - edt_info = "Error on definition ! : " + edt_value; - rtn = false; - } - else if (value < 0) { - edt_info = "Error on definition time is negative ! : " + value; - rtn = false; - } - std::istringstream iss_2(end_edt_value); - if (!(iss_2 >> value)) { - edt_info = "Error on definition ! : " + edt_value; - rtn = false; - } - else if (value < 0) { - edt_info = "Error on definition time is negative ! : " + value; - rtn = false; - } - if (mid_edt_value != ":") { - edt_info = "Error on definition ! :" + edt_value; - rtn = false; - } - } - else { - edt_info = "No value given"; - } -#if defined(_DEBUG_) || defined(_DEBUG) - cerr << "Expected during time : " << edt_info << endl;; -#endif +long +Launcher_cpp::createJobWithFile( const std::string xmlExecuteFile, std::string clusterName) +{ + throw LauncherException("Method Launcher_cpp::createJobWithFile is not available " + "(libBatch was not present at compilation time)"); + return 0; +} - // check memory (check the format) - std::string mem_info; - std::string mem_value = batch_params.mem; - if (mem_value != "") { - std::string begin_mem_value = mem_value.substr(0, mem_value.length()-2); - long re_mem_value; - std::istringstream iss(begin_mem_value); - if (!(iss >> re_mem_value)) { - mem_info = "Error on definition ! : " + mem_value; - rtn = false; - } - else if (re_mem_value <= 0) { - mem_info = "Error on definition memory is negative ! : " + mem_value; - rtn = false; - } - std::string end_mem_value = mem_value.substr(mem_value.length()-2); - if (end_mem_value != "gb" && end_mem_value != "mb") { - mem_info = "Error on definition, type is bad ! " + mem_value; - rtn = false; - } - } - else { - mem_info = "No value given"; - } -#if defined(_DEBUG_) || defined(_DEBUG) - cerr << "Memory : " << mem_info << endl; #endif - // check nb_proc - std::string nb_proc_info; - ostringstream nb_proc_value; - nb_proc_value << batch_params.nb_proc; - if(batch_params.nb_proc <= 0) { - nb_proc_info = "Bad value ! nb_proc = "; - nb_proc_info += nb_proc_value.str(); - rtn = false; +ParserLauncherType +Launcher_cpp::ParseXmlFile(std::string xmlExecuteFile) +{ + ParserLauncherType job_params; + SALOME_Launcher_Handler * handler = new SALOME_Launcher_Handler(job_params); + + const char* aFilePath = xmlExecuteFile.c_str(); + FILE* aFile = fopen(aFilePath, "r"); + if (aFile != NULL) + { + xmlDocPtr aDoc = xmlReadFile(aFilePath, NULL, 0); + if (aDoc != NULL) + handler->ProcessXmlDocument(aDoc); + else + { + std::string message = "ResourcesManager_cpp: could not parse file: " + xmlExecuteFile; + LAUNCHER_MESSAGE(message); + delete handler; + throw LauncherException(message); + } + // Free the document + xmlFreeDoc(aDoc); + fclose(aFile); } - else { - nb_proc_info = nb_proc_value.str(); + else + { + std::string message = "ResourcesManager_cpp: file is not readable: " + xmlExecuteFile; + LAUNCHER_MESSAGE(message); + delete handler; + throw LauncherException(message); } -#if defined(_DEBUG_) || defined(_DEBUG) - cerr << "Nb of processors : " << nb_proc_info << endl; -#endif - return rtn; + // Return + delete handler; + return job_params; } -long Launcher_cpp::getWallTime(std::string edt) +std::map +Launcher_cpp::getJobs() { - long hh, mm, ret; - - if( edt.size() == 0 ) - return 0; - - string::size_type pos = edt.find(":"); - string h = edt.substr(0,pos); - string m = edt.substr(pos+1,edt.size()-pos+1); - istringstream issh(h); - issh >> hh; - istringstream issm(m); - issm >> mm; - ret = hh*60 + mm; - return ret; + return _launcher_job_map; } -long Launcher_cpp::getRamSize(std::string mem) +void +Launcher_cpp::createBatchManagerForJob(Launcher::Job * job) { - long mv; - - if( mem.size() == 0 ) - return 0; - - string ram = mem.substr(0,mem.size()-2); - istringstream iss(ram); - iss >> mv; - string unity = mem.substr(mem.size()-2,2); - if( (unity.find("gb") != string::npos) || (unity.find("GB") != string::npos) ) - return mv*1024; - else if( (unity.find("mb") != string::npos) || (unity.find("MB") != string::npos) ) - return mv; - else if( (unity.find("kb") != string::npos) || (unity.find("KB") != string::npos) ) - return mv/1024; - else if( (unity.find("b") != string::npos) || (unity.find("B") != string::npos) ) - return mv/(1024*1024); - else - return 0; -} + int job_id = job->getNumber(); + + // Select a ressource for the job + std::vector ResourceList; + resourceParams params = job->getResourceRequiredParams(); + try + { + ResourceList = _ResManager->GetFittingResources(params); + } + catch(const ResourcesException &ex) + { + throw LauncherException(ex.msg.c_str()); + } + if (ResourceList.size() == 0) + { + LAUNCHER_INFOS("No adequate resource found for the job, number " << job->getNumber()); + job->setState("ERROR"); + throw LauncherException("No resource found the job"); + } -void Launcher_cpp::ParseXmlFile(string xmlExecuteFile) -{ - SALOME_Launcher_Handler* handler = new SALOME_Launcher_Handler(_launch); + // Configure the job with the resource selected - the first of the list + ParserResourcesType resource_definition = _ResManager->GetResourcesDescr(ResourceList[0]); - const char* aFilePath = xmlExecuteFile.c_str(); - FILE* aFile = fopen(aFilePath, "r"); - - if (aFile != NULL) - { - xmlDocPtr aDoc = xmlReadFile(aFilePath, NULL, 0); - - if (aDoc != NULL) - handler->ProcessXmlDocument(aDoc); - else{ -#if defined(_DEBUG_) || defined(_DEBUG) - cout << "ResourcesManager_cpp: could not parse file "<< aFilePath << endl; -#endif - } - - // Free the document - xmlFreeDoc(aDoc); + // Set resource definition to the job + // The job will check if the definitions needed + try + { + job->setResourceDefinition(resource_definition); + } + catch(const LauncherException &ex) + { + LAUNCHER_INFOS("Error in the definition of the resource, mess: " << ex.msg); + job->setState("ERROR"); + throw ex; + } - fclose(aFile); + // Step 2: We can now add a Factory if the resource is correctly define +#ifdef WITH_LIBBATCH + std::map::const_iterator it = _batchmap.find(job_id); + if(it == _batchmap.end()) + { + try + { + // Warning cannot write on one line like this, because map object is constructed before + // the method is called... + //_batchmap[job_id] = FactoryBatchManager(resource_definition); + Batch::BatchManager_eClient * batch_client = FactoryBatchManager(resource_definition); + _batchmap[job_id] = batch_client; + } + catch(const LauncherException &ex) + { + LAUNCHER_INFOS("Error during creation of the batch manager of the job, mess: " << ex.msg); + throw ex; + } + catch(const Batch::EmulationException &ex) + { + LAUNCHER_INFOS("Error during creation of the batch manager of the job, mess: " << ex.message); + throw LauncherException(ex.message); + } + catch(const Batch::InvalidArgumentException &ex) + { + LAUNCHER_INFOS("Error during creation of the batch manager of the job, mess: " << ex.message); + throw LauncherException(ex.message); } - else{ -#if defined(_DEBUG_) || defined(_DEBUG) - cout << "Launcher_cpp: file "<setNumber(job_id); + pthread_mutex_unlock(_job_cpt_mutex); + + // Step 1: check if resource is already in the map + createBatchManagerForJob(new_job); + + // Step 2: add the job to the batch manager +#ifdef WITH_LIBBATCH + try + { + Batch::JobId batch_manager_job_id = _batchmap[job_id]->addJob(*(new_job->getBatchJob()), + job_reference); + new_job->setBatchManagerJobId(batch_manager_job_id); + } + catch(const Batch::EmulationException &ex) + { + LAUNCHER_INFOS("Job cannot be added, exception in addJob: " << ex.message); + throw LauncherException(ex.message.c_str()); + } + + // Step 3: add job to launcher map + std::map::const_iterator it_job = _launcher_job_map.find(new_job->getNumber()); + if (it_job == _launcher_job_map.end()) + _launcher_job_map[new_job->getNumber()] = new_job; else - throw LauncherException("Unknown protocol"); - if (p.UserName != ""){ - command += p.UserName; - command += "@"; - } - command += p.Alias; - command += " 'echo $HOME' > "; - command += filelogtemp; -#if defined(_DEBUG_) || defined(_DEBUG) - std::cerr << command.c_str() << std::endl; + { + LAUNCHER_INFOS("A job as already the same id: " << new_job->getNumber()); + delete new_job; + throw LauncherException("A job as already the same id - job is not created !"); + } + LAUNCHER_MESSAGE("New job added"); #endif - int status = system(command.c_str()); - if(status) - throw LauncherException("Error of launching home command on remote host"); - - std::ifstream file_home(filelogtemp.c_str()); - std::getline(file_home, home); - file_home.close(); - return home; } diff --git a/src/Launcher/Launcher.hxx b/src/Launcher/Launcher.hxx index d9153543e..f459fca2c 100644 --- a/src/Launcher/Launcher.hxx +++ b/src/Launcher/Launcher.hxx @@ -1,44 +1,41 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef __LAUNCHER_HXX__ #define __LAUNCHER_HXX__ -#ifdef WIN32 -# ifdef LAUNCHER_EXPORTS -# define LAUNCHER_EXPORT __declspec(dllexport) -# else -# define LAUNCHER_EXPORT __declspec(dllimport) -# endif -#else -# define LAUNCHER_EXPORT -#endif +#include "Launcher_Utils.hxx" +#include "Launcher_Job.hxx" -#include #include "ResourcesManager.hxx" +#include + #include "SALOME_Launcher_Parser.hxx" #include #include +#include + class MpiImpl; namespace Batch{ @@ -53,59 +50,47 @@ struct batchParams{ unsigned long nb_proc; }; -class LAUNCHER_EXPORT LauncherException -{ -public: - const std::string msg; - - LauncherException(const std::string m) : msg(m) {} -}; - class LAUNCHER_EXPORT Launcher_cpp { public: Launcher_cpp(); - ~Launcher_cpp(); - - long submitJob(const std::string xmlExecuteFile, - const std::string clusterName) throw(LauncherException); - - long submitSalomeJob(const std::string fileToExecute , - const std::vector& filesToExport , - const std::vector& filesToImport , - const batchParams& batch_params, - const machineParams& params) throw(LauncherException); - - std::string queryJob( const long jobId, const machineParams& params) throw(LauncherException); - std::string queryJob( const long jobId, const std::string clusterName); - void deleteJob( const long jobId, const machineParams& params) throw(LauncherException); - void deleteJob( const long jobId, const std::string clusterName); - void getResultsJob( const std::string directory, const long jobId, const machineParams& params ) throw(LauncherException); - void getResultsJob( const std::string directory, const long jobId, const std::string clusterName ); - - void SetResourcesManager( ResourcesManager_cpp* rm ) { _ResManager = rm; } - + virtual ~Launcher_cpp(); + + // Main interface + void createJob(Launcher::Job * new_job); + void launchJob(int job_id); + const char * getJobState(int job_id); + void getJobResults(int job_id, std::string directory); + bool getJobDumpState(int job_id, std::string directory); + void stopJob(int job_id); + void removeJob(int job_id); + + // Useful methods + long createJobWithFile(std::string xmlExecuteFile, std::string clusterName); + std::map getJobs(); + void createBatchManagerForJob(Launcher::Job * job); + void addJobDirectlyToMap(Launcher::Job * new_job, const std::string job_reference); + + // Lib methods + void SetResourcesManager( ResourcesManager_cpp* rm ) {_ResManager = rm;} + + // Used by SALOME_Launcher + ResourcesManager_cpp *_ResManager; protected: - std::string buildSalomeCouplingScript(const std::string fileToExecute, const std::string dirForTmpFiles, const ParserResourcesType& params); - MpiImpl *FactoryMpiImpl(MpiImplType mpiImpl) throw(LauncherException); - Batch::BatchManager_eClient *FactoryBatchManager( const ParserResourcesType& params ) throw(LauncherException); - std::string getTmpDirForBatchFiles(); - std::string getRemoteFile( std::string remoteDir, std::string localFile ); - std::string getHomeDir(const ParserResourcesType& p, const std::string & tmpdir); + virtual void notifyObservers(const std::string & event_name, const std::string & event_data) {} - std::map _batchmap; - std::map < std::pair , Batch::Job* > _jobmap; - ResourcesManager_cpp *_ResManager; - bool check(const batchParams& batch_params); - long getWallTime(std::string edt); - long getRamSize(std::string mem); - void ParseXmlFile(std::string xmlExecuteFile); - - //! will contain the informations on the data type catalog(after parsing) - ParserLauncherType _launch; + // Methods used by user interface methods +#ifdef WITH_LIBBATCH + Batch::BatchManager_eClient *FactoryBatchManager(ParserResourcesType& params); + std::map _batchmap; +#endif + ParserLauncherType ParseXmlFile(std::string xmlExecuteFile); + std::map _launcher_job_map; + int _job_cpt; // job number counter + pthread_mutex_t * _job_cpt_mutex; // mutex for job counter }; #endif diff --git a/src/Launcher/Launcher_Job.cxx b/src/Launcher/Launcher_Job.cxx new file mode 100644 index 000000000..1307fbf22 --- /dev/null +++ b/src/Launcher/Launcher_Job.cxx @@ -0,0 +1,654 @@ +// Copyright (C) 2009-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +// Author: André RIBES - EDF R&D +// +#include "Launcher_Job.hxx" +#include "Launcher.hxx" + +#ifdef WITH_LIBBATCH +#include +#endif + +Launcher::Job::Job() +{ + _number = -1; + _state = "CREATED"; + _launch_date = getLaunchDate(); + + _env_file = ""; + _job_name = ""; + _job_file = ""; + _job_file_name = ""; + _job_file_name_complete = ""; + _work_directory = ""; + _local_directory = ""; + _result_directory = ""; + _maximum_duration = ""; + _maximum_duration_in_second = -1; + _resource_required_params.name = ""; + _resource_required_params.hostname = ""; + _resource_required_params.OS = ""; + _resource_required_params.nb_proc = -1; + _resource_required_params.nb_node = -1; + _resource_required_params.nb_proc_per_node = -1; + _resource_required_params.cpu_clock = -1; + _resource_required_params.mem_mb = -1; + _queue = ""; + _job_type = ""; + +#ifdef WITH_LIBBATCH + _batch_job = new Batch::Job(); +#endif +} + +Launcher::Job::~Job() +{ + LAUNCHER_MESSAGE("Deleting job number: " << _number); +#ifdef WITH_LIBBATCH + if (_batch_job) + delete _batch_job; +#endif +} + +void +Launcher::Job::stopJob() +{ + LAUNCHER_MESSAGE("Stop resquested for job number: " << _number); + setState("FAILED"); +#ifdef WITH_LIBBATCH + if (_batch_job_id.getReference() != "undefined") + { + try + { + _batch_job_id.deleteJob(); + } + catch (const Batch::EmulationException &ex) + { + LAUNCHER_INFOS("WARNING: exception when stopping the job: " << ex.message); + } + } +#endif +} + + +void +Launcher::Job::removeJob() +{ + LAUNCHER_MESSAGE("Removing job number: " << _number); +#ifdef WITH_LIBBATCH + if (_batch_job_id.getReference() != "undefined") + { + try + { + _batch_job_id.deleteJob(); + } + catch (const Batch::EmulationException &ex) + { + LAUNCHER_INFOS("WARNING: exception when removing the job: " << ex.message); + } + } +#endif +} + +std::string +Launcher::Job::getJobType() +{ + return _job_type; +} + +void +Launcher::Job::setJobName(const std::string & job_name) +{ + _job_name = job_name; +} + +std::string +Launcher::Job::getJobName() +{ + return _job_name; +} + +void +Launcher::Job::setState(const std::string & state) +{ + // State of a Job: CREATED, QUEUED, RUNNING, FINISHED, FAILED + if (state != "CREATED" && + state != "IN_PROCESS" && + state != "QUEUED" && + state != "RUNNING" && + state != "PAUSED" && + state != "FINISHED" && + state != "FAILED" && + state != "ERROR") + { + throw LauncherException("Bad state, this state does not exist: " + state); + } + _state = state; +} + +std::string +Launcher::Job::getState() +{ + return _state; +} + +void +Launcher::Job::setNumber(const int & number) +{ + if (_number != -1) + std::cerr << "Launcher::Job::setNumber -- Job number was already defined, before: " << _number << " now: " << number << std::endl; + _number = number; +} + +int +Launcher::Job::getNumber() +{ + return _number; +} + +void +Launcher::Job::setResourceDefinition(const ParserResourcesType & resource_definition) +{ + // Check machine_definition + std::string user_name = ""; + if (resource_definition.UserName == "") + { + user_name = getenv("USER"); + if (user_name == "") + { + std::string mess = "You must define a user name: into your resource description or with env variable USER"; + throw LauncherException(mess); + } + } + else + user_name = resource_definition.UserName; + + _resource_definition = resource_definition; + _resource_definition.UserName = user_name; +} + +ParserResourcesType +Launcher::Job::getResourceDefinition() +{ + return _resource_definition; +} + +void +Launcher::Job::setJobFile(const std::string & job_file) +{ + // Check job file + if (job_file == "") + { + std::string mess = "Empty Job File is forbidden !"; + throw LauncherException(mess); + } + + _job_file = job_file; + std::string::size_type p1 = _job_file.find_last_of("/"); + std::string::size_type p2 = _job_file.find_last_of("."); + _job_file_name_complete = _job_file.substr(p1+1); + _job_file_name = _job_file.substr(p1+1,p2-p1-1); +} + +std::string +Launcher::Job::getJobFile() +{ + return _job_file; +} +void +Launcher::Job::setEnvFile(const std::string & env_file) +{ + _env_file = env_file; +} + +std::string +Launcher::Job::getEnvFile() +{ + return _env_file; +} + +void +Launcher::Job::setWorkDirectory(const std::string & work_directory) +{ + _work_directory = work_directory; +} + +void +Launcher::Job::setLocalDirectory(const std::string & local_directory) +{ + _local_directory = local_directory; +} + +void +Launcher::Job::setResultDirectory(const std::string & result_directory) +{ + _result_directory = result_directory; +} + +void +Launcher::Job::add_in_file(const std::string & file) +{ + std::list::iterator it = std::find(_in_files.begin(), _in_files.end(), file); + if (it == _in_files.end()) + _in_files.push_back(file); + else + std::cerr << "Launcher::Job::add_in_file -- Warning file was already entered in in_files: " << file << std::endl; +} + +void +Launcher::Job::add_out_file(const std::string & file) +{ + std::list::iterator it = std::find(_out_files.begin(), _out_files.end(), file); + if (it == _out_files.end()) + _out_files.push_back(file); + else + std::cerr << "Launcher::Job::add_out_file -- Warning file was already entered in out_files: " << file << std::endl; +} + +void +Launcher::Job::setMaximumDuration(const std::string & maximum_duration) +{ + checkMaximumDuration(maximum_duration); + _maximum_duration_in_second = convertMaximumDuration(maximum_duration); + _maximum_duration = maximum_duration; +} + +void +Launcher::Job::setResourceRequiredParams(const resourceParams & resource_required_params) +{ + checkResourceRequiredParams(resource_required_params); + _resource_required_params = resource_required_params; +} + +void +Launcher::Job::setQueue(const std::string & queue) +{ + _queue = queue; +} + +std::string +Launcher::Job::getWorkDirectory() +{ + return _work_directory; +} + +std::string +Launcher::Job::getLocalDirectory() +{ + return _local_directory; +} + +std::string +Launcher::Job::getResultDirectory() +{ + return _result_directory; +} + +const std::list & +Launcher::Job::get_in_files() +{ + return _in_files; +} + +const std::list & +Launcher::Job::get_out_files() +{ + return _out_files; +} + +std::string +Launcher::Job::getMaximumDuration() +{ + return _maximum_duration; +} + +resourceParams +Launcher::Job::getResourceRequiredParams() +{ + return _resource_required_params; +} + +std::string +Launcher::Job::getQueue() +{ + return _queue; +} + +void +Launcher::Job::checkMaximumDuration(const std::string & maximum_duration) +{ + std::string result(""); + std::string edt_value = maximum_duration; + std::size_t pos = edt_value.find(":"); + + if (edt_value != "") { + if (pos == edt_value.npos) { + throw LauncherException("[Launcher::Job::checkMaximumDuration] Error on definition: " + edt_value); + } + std::string begin_edt_value = edt_value.substr(0, pos); + std::string mid_edt_value = edt_value.substr(pos, 1); + std::string end_edt_value = edt_value.substr(pos + 1, edt_value.npos); + + long value; + std::istringstream iss(begin_edt_value); + if (!(iss >> value)) { + result = "[Launcher::Job::checkExpectedDuration] Error on definition ! : " + edt_value; + } + else if (value < 0) { + result = "[Launcher::Job::checkExpectedDuration] Error on definition time is negative ! : " + value; + } + std::istringstream iss_2(end_edt_value); + if (!(iss_2 >> value)) { + result = "[Launcher::Job::checkExpectedDuration] Error on definition ! : " + edt_value; + } + else if (value < 0) { + result = "[Launcher::Job::checkExpectedDuration] Error on definition time is negative ! : " + value; + } + if (mid_edt_value != ":") { + result = "[Launcher::Job::checkExpectedDuration] Error on definition ! :" + edt_value; + } + } + if (result != "") + throw LauncherException(result); +} + +void +Launcher::Job::checkResourceRequiredParams(const resourceParams & resource_required_params) +{ + // nb_proc has be to > 0 + if (resource_required_params.nb_proc <= 0) + { + std::string message("[Launcher::Job::checkResourceRequiredParams] proc number is not > 0 ! "); + throw LauncherException(message); + } +} + +long +Launcher::Job::convertMaximumDuration(const std::string & edt) +{ + long hh, mm, ret; + + if( edt.size() == 0 ) + return -1; + + std::string::size_type pos = edt.find(":"); + std::string h = edt.substr(0,pos); + std::string m = edt.substr(pos+1,edt.size()-pos+1); + std::istringstream issh(h); + issh >> hh; + std::istringstream issm(m); + issm >> mm; + ret = hh*60 + mm; + ret = ret * 60; + + return ret; +} + +std::string +Launcher::Job::getLaunchDate() +{ + time_t rawtime; + time(&rawtime); + std::string launch_date = ctime(&rawtime); + int i = 0 ; + for (;i < launch_date.size(); i++) + if (launch_date[i] == '/' || + launch_date[i] == '-' || + launch_date[i] == ':' || + launch_date[i] == ' ') + launch_date[i] = '_'; + launch_date.erase(--launch_date.end()); // Last caracter is a \n + + return launch_date; +} + +std::string +Launcher::Job::updateJobState() +{ + + if (_state != "FINISHED" && + _state != "ERROR" && + _state != "FAILED") + { +#ifdef WITH_LIBBATCH + if (_batch_job_id.getReference() != "undefined") + { + // A batch manager has been affected to the job + Batch::JobInfo job_info = _batch_job_id.queryJob(); + Batch::Parametre par = job_info.getParametre(); + _state = par[Batch::STATE].str(); + LAUNCHER_MESSAGE("State received is: " << par[Batch::STATE].str()); + } +#endif + } + return _state; +} + +#ifdef WITH_LIBBATCH +Batch::Job * +Launcher::Job::getBatchJob() +{ + update_job(); + return _batch_job; +} + +Batch::Parametre +Launcher::Job::common_job_params() +{ + Batch::Parametre params; + + params[Batch::NAME] = getJobName(); + params[Batch::USER] = _resource_definition.UserName; + params[Batch::NBPROC] = _resource_required_params.nb_proc; + + // Memory in megabytes + if (_resource_required_params.mem_mb > 0) + { + params[Batch::MAXRAMSIZE] = _resource_required_params.mem_mb; + } + + // We define a default directory based on user time + if (_work_directory == "") + { + std::string thedate; + Batch::Date date = Batch::Date(time(0)); + thedate = date.str(); + int lend = thedate.size() ; + int i = 0 ; + while ( i < lend ) { + if ( thedate[i] == '/' || thedate[i] == '-' || thedate[i] == ':' ) { + thedate[i] = '_' ; + } + i++ ; + } + _work_directory = std::string("$HOME/Batch/"); + _work_directory += thedate; + } + params[Batch::WORKDIR] = _work_directory; + params[Batch::TMPDIR] = _work_directory; // To Compatibility -- remove ??? TODO + + // If result_directory is not defined, we use HOME environnement + if (_result_directory == "") + _result_directory = getenv("HOME"); + + // _in_files + std::list in_files(_in_files); + in_files.push_back(_job_file); + if (_env_file != "") + in_files.push_back(_env_file); + for(std::list::iterator it = in_files.begin(); it != in_files.end(); it++) + { + std::string file = *it; + + // local file -> If file is not an absolute path, we apply _local_directory + std::string local_file; + if (file.substr(0, 1) == std::string("/")) + local_file = file; + else +#ifndef WIN32 + local_file = _local_directory + "/" + file; +#else + local_file = file; +#endif + + // remote file -> get only file name from in_files + size_t found = file.find_last_of("/"); + std::string remote_file = _work_directory + "/" + file.substr(found+1); + + params[Batch::INFILE] += Batch::Couple(local_file, remote_file); + } + + // _out_files + for(std::list::iterator it = _out_files.begin(); it != _out_files.end(); it++) + { + std::string file = *it; + + // local file + size_t found = file.find_last_of("/"); + std::string local_file = _result_directory + "/" + file.substr(found+1); + + // remote file -> If file is not an absolute path, we apply _work_directory + std::string remote_file; + if (file.substr(0, 1) == std::string("/")) + remote_file = file; + else + remote_file = _work_directory + "/" + file; + + params[Batch::OUTFILE] += Batch::Couple(local_file, remote_file); + } + + // Time + if (_maximum_duration_in_second != -1) + params[Batch::MAXWALLTIME] = _maximum_duration_in_second / 60; + + // Queue + if (_queue != "") + params[Batch::QUEUE] = _queue; + + // Specific parameters + std::map::iterator it = _specific_parameters.find("LoalLevelerJobType"); + if (it != _specific_parameters.end()) + params["LL_JOBTYPE"] = it->second; + return params; +} + +void +Launcher::Job::setBatchManagerJobId(Batch::JobId batch_manager_job_id) +{ + _batch_job_id = batch_manager_job_id; +} + +Batch::JobId +Launcher::Job::getBatchManagerJobId() +{ + return _batch_job_id; +} +#endif + +void +Launcher::Job::addToXmlDocument(xmlNodePtr root_node) +{ + // Begin job + xmlNodePtr job_node = xmlNewChild(root_node, NULL, xmlCharStrdup("job"), NULL); + xmlNewProp(job_node, xmlCharStrdup("type"), xmlCharStrdup(getJobType().c_str())); + xmlNewProp(job_node, xmlCharStrdup("name"), xmlCharStrdup(getJobName().c_str())); + + // Add user part + xmlNodePtr node = xmlNewChild(job_node, NULL, xmlCharStrdup("user_part"), NULL); + + xmlNewChild(node, NULL, xmlCharStrdup("job_file"), xmlCharStrdup(getJobFile().c_str())); + xmlNewChild(node, NULL, xmlCharStrdup("env_file"), xmlCharStrdup(getEnvFile().c_str())); + xmlNewChild(node, NULL, xmlCharStrdup("work_directory"), xmlCharStrdup(getWorkDirectory().c_str())); + xmlNewChild(node, NULL, xmlCharStrdup("local_directory"), xmlCharStrdup(getLocalDirectory().c_str())); + xmlNewChild(node, NULL, xmlCharStrdup("result_directory"), xmlCharStrdup(getResultDirectory().c_str())); + + // Files + xmlNodePtr files_node = xmlNewChild(node, NULL, xmlCharStrdup("files"), NULL); + std::list in_files = get_in_files(); + std::list out_files = get_out_files(); + for(std::list::iterator it = in_files.begin(); it != in_files.end(); it++) + xmlNewChild(files_node, NULL, xmlCharStrdup("in_file"), xmlCharStrdup((*it).c_str())); + for(std::list::iterator it = out_files.begin(); it != out_files.end(); it++) + xmlNewChild(files_node, NULL, xmlCharStrdup("out_file"), xmlCharStrdup((*it).c_str())); + + // Resource part + resourceParams resource_params = getResourceRequiredParams(); + xmlNodePtr res_node = xmlNewChild(node, NULL, xmlCharStrdup("resource_params"), NULL); + xmlNewChild(res_node, NULL, xmlCharStrdup("name"), xmlCharStrdup(resource_params.name.c_str())); + xmlNewChild(res_node, NULL, xmlCharStrdup("hostname"), xmlCharStrdup(resource_params.hostname.c_str())); + xmlNewChild(res_node, NULL, xmlCharStrdup("OS"), xmlCharStrdup(resource_params.OS.c_str())); + std::ostringstream nb_proc_stream; + std::ostringstream nb_node_stream; + std::ostringstream nb_proc_per_node_stream; + std::ostringstream cpu_clock_stream; + std::ostringstream mem_mb_stream; + nb_proc_stream << resource_params.nb_proc; + nb_node_stream << resource_params.nb_node; + nb_proc_per_node_stream << resource_params.nb_proc_per_node; + cpu_clock_stream << resource_params.cpu_clock; + mem_mb_stream << resource_params.mem_mb; + xmlNewChild(res_node, NULL, xmlCharStrdup("nb_proc"), xmlCharStrdup(nb_proc_stream.str().c_str())); + xmlNewChild(res_node, NULL, xmlCharStrdup("nb_node"), xmlCharStrdup(nb_node_stream.str().c_str())); + xmlNewChild(res_node, NULL, xmlCharStrdup("nb_proc_per_node"), xmlCharStrdup(nb_proc_per_node_stream.str().c_str())); + xmlNewChild(res_node, NULL, xmlCharStrdup("cpu_clock"), xmlCharStrdup(cpu_clock_stream.str().c_str())); + xmlNewChild(res_node, NULL, xmlCharStrdup("mem_mb"), xmlCharStrdup(mem_mb_stream.str().c_str())); + + xmlNewChild(node, NULL, xmlCharStrdup("maximum_duration"), xmlCharStrdup(getMaximumDuration().c_str())); + xmlNewChild(node, NULL, xmlCharStrdup("queue"), xmlCharStrdup(getQueue().c_str())); + + // Specific parameters part + xmlNodePtr specific_parameters_node = xmlNewChild(node, NULL, xmlCharStrdup("specific_parameters"), NULL); + std::map specific_parameters = getSpecificParameters(); + for(std::map::iterator it = specific_parameters.begin(); it != specific_parameters.end(); it++) + { + xmlNodePtr specific_parameter_node = xmlNewChild(specific_parameters_node, NULL, xmlCharStrdup("specific_parameter"), NULL); + xmlNewChild(specific_parameter_node, NULL, xmlCharStrdup("name"), xmlCharStrdup((it->first).c_str())); + xmlNewChild(specific_parameter_node, NULL, xmlCharStrdup("value"), xmlCharStrdup((it->second).c_str())); + } + + // Run part + xmlNodePtr run_node = xmlNewChild(job_node, NULL, xmlCharStrdup("run_part"), NULL); + xmlNewChild(run_node, NULL, xmlCharStrdup("job_state"), xmlCharStrdup(getState().c_str())); + ParserResourcesType resource_definition = getResourceDefinition(); + xmlNewChild(run_node, NULL, xmlCharStrdup("resource_choosed_name"), xmlCharStrdup(resource_definition.Name.c_str())); + +#ifdef WITH_LIBBATCH + Batch::JobId job_id = getBatchManagerJobId(); + xmlNewChild(run_node, NULL, xmlCharStrdup("job_reference"), xmlCharStrdup(job_id.getReference().c_str())); +#endif +} + +void +Launcher::Job::addSpecificParameter(const std::string & name, + const std::string & value) +{ + _specific_parameters[name] = value; +} + +const std::map & +Launcher::Job::getSpecificParameters() +{ + return _specific_parameters; +} + +void +Launcher::Job::checkSpecificParameters() +{ +} diff --git a/src/Launcher/Launcher_Job.hxx b/src/Launcher/Launcher_Job.hxx new file mode 100644 index 000000000..bbff80f54 --- /dev/null +++ b/src/Launcher/Launcher_Job.hxx @@ -0,0 +1,161 @@ +// Copyright (C) 2009-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +// Author: André RIBES - EDF R&D +// +#ifndef _LAUNCHER_JOB_HXX_ +#define _LAUNCHER_JOB_HXX_ + +#include "Launcher_Utils.hxx" +#include "ResourcesManager.hxx" + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#ifdef WITH_LIBBATCH +#include +#include +#include +#include +#endif + +#include + +namespace Launcher +{ + class LAUNCHER_EXPORT Job + { + public: + Job(); + virtual ~Job(); + + // Launcher managing parameters + // State of a Job: CREATED, IN_PROCESS, QUEUED, RUNNING, PAUSED, FINISHED, ERROR + void setState(const std::string & state); + std::string getState(); + + void setNumber(const int & number); + int getNumber(); + + virtual void setResourceDefinition(const ParserResourcesType & resource_definition); + ParserResourcesType getResourceDefinition(); + + // Common parameters + void setJobName(const std::string & job_name); + virtual void setJobFile(const std::string & job_file); + void setWorkDirectory(const std::string & work_directory); + void setLocalDirectory(const std::string & local_directory); + void setResultDirectory(const std::string & result_directory); + void add_in_file(const std::string & file); + void add_out_file(const std::string & file); + void setMaximumDuration(const std::string & maximum_duration); + void setResourceRequiredParams(const resourceParams & resource_required_params); + void setQueue(const std::string & queue); + void setEnvFile(const std::string & env_file); + + std::string getJobName(); + std::string getJobFile(); + std::string getWorkDirectory(); + std::string getLocalDirectory(); + std::string getResultDirectory(); + const std::list & get_in_files(); + const std::list & get_out_files(); + std::string getMaximumDuration(); + resourceParams getResourceRequiredParams(); + std::string getQueue(); + std::string getEnvFile(); + std::string getJobType(); + + std::string updateJobState(); + + void addSpecificParameter(const std::string & name, + const std::string & value); + const std::map & getSpecificParameters(); + virtual void checkSpecificParameters(); + + // Checks + void checkMaximumDuration(const std::string & maximum_duration); + void checkResourceRequiredParams(const resourceParams & resource_required_params); + + // Helps + long convertMaximumDuration(const std::string & maximum_duration); + std::string getLaunchDate(); + + // Xml method + void addToXmlDocument(xmlNodePtr root_node); + + void stopJob(); + void removeJob(); + + // Abstract class + virtual void update_job() = 0; + + protected: + int _number; + + std::string _job_type; + + std::string _state; + std::string _launch_date; + std::string _env_file; + + ParserResourcesType _resource_definition; + + std::string _job_name; + std::string _job_file; + std::string _job_file_name; + std::string _job_file_name_complete; + + std::string _work_directory; + std::string _local_directory; + std::string _result_directory; + std::list _in_files; + std::list _out_files; + std::map _specific_parameters; + std::string _maximum_duration; + long _maximum_duration_in_second; + resourceParams _resource_required_params; + std::string _queue; + +#ifdef WITH_LIBBATCH + // Connection with LIBBATCH + public: + Batch::Job * getBatchJob(); + Batch::Parametre common_job_params(); + void setBatchManagerJobId(Batch::JobId batch_manager_job_id); + Batch::JobId getBatchManagerJobId(); + + protected: + Batch::Job * _batch_job; + Batch::JobId _batch_job_id; +#endif + }; +} + +#endif + diff --git a/src/Launcher/Launcher_Job_Command.cxx b/src/Launcher/Launcher_Job_Command.cxx new file mode 100644 index 000000000..f325898ed --- /dev/null +++ b/src/Launcher/Launcher_Job_Command.cxx @@ -0,0 +1,80 @@ +// Copyright (C) 2009-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +// Author: André RIBES - EDF R&D +// +#include "Launcher_Job_Command.hxx" + +#ifdef WITH_LIBBATCH +#include +#endif + +#ifdef WNT +#include +#define _chmod chmod +#endif + +Launcher::Job_Command::Job_Command() {_job_type = "command";} + +Launcher::Job_Command::~Job_Command() {} + +void +Launcher::Job_Command::update_job() +{ +#ifdef WITH_LIBBATCH + Batch::Parametre params = common_job_params(); + params[Batch::EXECUTABLE] = buildCommandScript(params, _launch_date); + params[Batch::EXCLUSIVE] = false; + _batch_job->setParametre(params); +#endif +} + +#ifdef WITH_LIBBATCH +std::string +Launcher::Job_Command::buildCommandScript(Batch::Parametre params, std::string launch_date) +{ + // parameters + std::string work_directory = params[Batch::WORKDIR].str(); + + // File name + std::string launch_date_port_file = launch_date; + std::string launch_script = "/tmp/runCommand_" + _job_file_name + "_" + launch_date + ".sh"; + std::ofstream launch_script_stream; + launch_script_stream.open(launch_script.c_str(), std::ofstream::out); + + // Script + launch_script_stream << "#! /bin/bash -f" << std::endl; + launch_script_stream << "cd " << work_directory << std::endl; + launch_script_stream << "export PYTHONPATH=" << work_directory << ":$PYTHONPATH" << std::endl; + launch_script_stream << "export PATH=" << work_directory << ":$PATH" << std::endl; + if (_env_file != "") + { + std::string::size_type last = _env_file.find_last_of("/"); + launch_script_stream << "source ./" << _env_file.substr(last+1) << std::endl; + } + launch_script_stream << "./" << _job_file_name_complete << " > " << work_directory <<"/logs/command_" << launch_date << ".log 2>&1" << std::endl; + + // Return + launch_script_stream.flush(); + launch_script_stream.close(); + chmod(launch_script.c_str(), 0x1ED); + chmod(_job_file.c_str(), 0x1ED); + return launch_script; +} +#endif diff --git a/src/Launcher/Launcher_Job_Command.hxx b/src/Launcher/Launcher_Job_Command.hxx new file mode 100644 index 000000000..ead4fb5b2 --- /dev/null +++ b/src/Launcher/Launcher_Job_Command.hxx @@ -0,0 +1,50 @@ +// Copyright (C) 2009-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +// Author: André RIBES - EDF R&D +// +#ifndef _LAUNCHER_JOB_COMMAND_HXX_ +#define _LAUNCHER_JOB_COMMAND_HXX_ + +#include "Launcher_Job.hxx" +#include "Launcher.hxx" + +#ifdef WITH_LIBBATCH +#include +#endif + +namespace Launcher +{ + class LAUNCHER_EXPORT Job_Command : virtual public Launcher::Job + { + public: + Job_Command(); + virtual ~Job_Command(); + + virtual void update_job(); + +#ifdef WITH_LIBBATCH + protected: + std::string buildCommandScript(Batch::Parametre params, std::string launch_date); +#endif + }; +} + +#endif + diff --git a/src/Launcher/Launcher_Job_PythonSALOME.cxx b/src/Launcher/Launcher_Job_PythonSALOME.cxx new file mode 100644 index 000000000..4cc4fca72 --- /dev/null +++ b/src/Launcher/Launcher_Job_PythonSALOME.cxx @@ -0,0 +1,39 @@ +// Copyright (C) 2009-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +// Author: André RIBES - EDF R&D +// +#include "Launcher_Job_PythonSALOME.hxx" + + +Launcher::Job_PythonSALOME::Job_PythonSALOME() {_job_type = "python_salome";} + +Launcher::Job_PythonSALOME::~Job_PythonSALOME() {} + +void +Launcher::Job_PythonSALOME::setJobFile(const std::string & job_file) +{ + Launcher::Job::setJobFile(job_file); +} + +void +Launcher::Job_PythonSALOME::addJobTypeSpecificScript(std::ofstream & launch_script_stream) +{ + launch_script_stream << _resource_definition.AppliPath << "/runSession -p $appli_port python " << _job_file_name_complete << " > logs/python_" << _launch_date << ".log 2>&1" << std::endl; +} diff --git a/src/Launcher/Launcher_Job_PythonSALOME.hxx b/src/Launcher/Launcher_Job_PythonSALOME.hxx new file mode 100644 index 000000000..3be977127 --- /dev/null +++ b/src/Launcher/Launcher_Job_PythonSALOME.hxx @@ -0,0 +1,42 @@ +// Copyright (C) 2009-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +// Author: André RIBES - EDF R&D +// +#ifndef _LAUNCHER_JOB_PYTHONSALOME_HXX_ +#define _LAUNCHER_JOB_PYTHONSALOME_HXX_ + +#include "Launcher_Job_SALOME.hxx" + +namespace Launcher +{ + class LAUNCHER_EXPORT Job_PythonSALOME : virtual public Launcher::Job_SALOME + { + public: + Job_PythonSALOME(); + virtual ~Job_PythonSALOME(); + + virtual void setJobFile(const std::string & job_file); + virtual void addJobTypeSpecificScript(std::ofstream & launch_script_stream); + }; +} + +#endif + + diff --git a/src/Launcher/Launcher_Job_SALOME.cxx b/src/Launcher/Launcher_Job_SALOME.cxx new file mode 100644 index 000000000..b0c70f5b5 --- /dev/null +++ b/src/Launcher/Launcher_Job_SALOME.cxx @@ -0,0 +1,144 @@ +// Copyright (C) 2009-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +// Author: André RIBES - EDF R&D +// +#include "Launcher_Job_SALOME.hxx" + +#ifdef WITH_LIBBATCH +#include +#endif + +#ifdef WNT +#include +#define _chmod chmod +#endif + +Launcher::Job_SALOME::Job_SALOME() {} + +Launcher::Job_SALOME::~Job_SALOME() {} + +void +Launcher::Job_SALOME::setResourceDefinition(const ParserResourcesType & resource_definition) +{ + // Check resource_definition + if (resource_definition.AppliPath == "") + { + std::string mess = "Resource definition must define an application path !, resource name is: " + resource_definition.Name; + throw LauncherException(mess); + } + Launcher::Job::setResourceDefinition(resource_definition); +} + +void +Launcher::Job_SALOME::update_job() +{ +#ifdef WITH_LIBBATCH + Batch::Parametre params = common_job_params(); + params[Batch::EXECUTABLE] = buildSalomeScript(params); + params[Batch::EXCLUSIVE] = true; + _batch_job->setParametre(params); +#endif +} + +#ifdef WITH_LIBBATCH +std::string +Launcher::Job_SALOME::buildSalomeScript(Batch::Parametre params) +{ + // parameters + std::string work_directory = params[Batch::WORKDIR].str(); + + std::string launch_script = "/tmp/runSalome_" + _job_file_name + "_" + _launch_date + ".sh"; + std::ofstream launch_script_stream; + launch_script_stream.open(launch_script.c_str(), + std::ofstream::out +#ifdef WIN32 + | std::ofstream::binary //rnv: to avoid CL+RF end of line on windows +#endif + ); + + // Begin of script + launch_script_stream << "#!/bin/sh -f" << std::endl; + launch_script_stream << "cd " << work_directory << std::endl; + launch_script_stream << "export PYTHONPATH=" << work_directory << ":$PYTHONPATH" << std::endl; + launch_script_stream << "export PATH=" << work_directory << ":$PATH" << std::endl; + if (_env_file != "") + { + std::string::size_type last = _env_file.find_last_of("/"); + launch_script_stream << ". " << _env_file.substr(last+1) << std::endl; + } + launch_script_stream << "export SALOME_TMP_DIR=" << work_directory << "/logs" << std::endl; + + // -- Generates Catalog Resources + std::string resource_protocol = ParserResourcesType::protocolToString(_resource_definition.ClusterInternalProtocol); + launch_script_stream << "if [ \"x$LIBBATCH_NODEFILE\" != \"x\" ]; then " << std::endl; + launch_script_stream << "CATALOG_FILE=" << "CatalogResources_" << _launch_date << ".xml" << std::endl; + launch_script_stream << "export USER_CATALOG_RESOURCES_FILE=" << "$CATALOG_FILE" << std::endl; + launch_script_stream << "echo '' > $CATALOG_FILE" << std::endl; + launch_script_stream << "echo '' >> $CATALOG_FILE" << std::endl; + launch_script_stream << "cat $LIBBATCH_NODEFILE | sort | uniq -c | while read nbproc host" << std::endl; + launch_script_stream << "do" << std::endl; + launch_script_stream << "echo '> $CATALOG_FILE" << std::endl; + launch_script_stream << "echo ' userName=\"" << _resource_definition.UserName << "\"' >> $CATALOG_FILE" << std::endl; + launch_script_stream << "echo ' appliPath=\"" << _resource_definition.AppliPath << "\"' >> $CATALOG_FILE" << std::endl; + launch_script_stream << "echo ' mpi=\"" << _resource_definition.PrintMpiImplType() << "\"' >> $CATALOG_FILE" << std::endl; + launch_script_stream << "echo ' nbOfNodes='\\\"$nbproc\\\" >> $CATALOG_FILE" << std::endl; + launch_script_stream << "echo ' nbOfProcPerNode=\"1\"' >> $CATALOG_FILE" << std::endl; + launch_script_stream << "echo '/>' >> $CATALOG_FILE" << std::endl; + launch_script_stream << "done" << std::endl; + launch_script_stream << "echo '' >> $CATALOG_FILE" << std::endl; + launch_script_stream << "fi" << std::endl; + + // Create file for ns-port-log + launch_script_stream << "NS_PORT_FILE_PATH=`mktemp " << _resource_definition.AppliPath << "/USERS/nsport_XXXXXX` &&\n"; + launch_script_stream << "NS_PORT_FILE_NAME=`basename $NS_PORT_FILE_PATH` &&\n"; + + // Launch SALOME with an appli + launch_script_stream << _resource_definition.AppliPath << "/runAppli --terminal --ns-port-log=$NS_PORT_FILE_NAME --server-launch-mode=fork "; + launch_script_stream << "> logs/salome_" << _launch_date << ".log 2>&1 &&" << std::endl; + launch_script_stream << "current=0 &&\n" + << "stop=20 &&\n" + << "while ! test -s $NS_PORT_FILE_PATH\n" + << "do\n" + << " sleep 2\n" + << " current=$((current+1))\n" + << " if [ \"$current\" -eq \"$stop\" ] ; then\n" + << " echo Error Naming Service failed ! >&2\n" + << " exit\n" + << " fi\n" + << "done &&\n" + << "appli_port=`cat $NS_PORT_FILE_PATH` &&\n" + << "rm $NS_PORT_FILE_PATH &&\n"; + + // Call real job type + addJobTypeSpecificScript(launch_script_stream); + + // End + launch_script_stream << _resource_definition.AppliPath << "/runSession -p $appli_port shutdownSalome.py" << std::endl; + launch_script_stream << "sleep 10" << std::endl; + + // Return + launch_script_stream.flush(); + launch_script_stream.close(); + chmod(launch_script.c_str(), 0x1ED); + return launch_script; +} +#endif + diff --git a/src/Launcher/Launcher_Job_SALOME.hxx b/src/Launcher/Launcher_Job_SALOME.hxx new file mode 100644 index 000000000..30351b184 --- /dev/null +++ b/src/Launcher/Launcher_Job_SALOME.hxx @@ -0,0 +1,53 @@ +// Copyright (C) 2009-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +// Author: André RIBES - EDF R&D +// +#ifndef _LAUNCHER_JOB_SALOME_HXX_ +#define _LAUNCHER_JOB_SALOME_HXX_ + +#include "Launcher_Job.hxx" +#include "Launcher.hxx" + +#ifdef WITH_LIBBATCH +#include +#endif + +namespace Launcher +{ + class LAUNCHER_EXPORT Job_SALOME : virtual public Launcher::Job + { + public: + Job_SALOME(); + virtual ~Job_SALOME(); + + virtual void setResourceDefinition(const ParserResourcesType & resource_definition); + virtual void update_job(); + +#ifdef WITH_LIBBATCH + public: + std::string buildSalomeScript(Batch::Parametre params); + virtual void addJobTypeSpecificScript(std::ofstream & launch_script_stream) = 0; +#endif + }; +} + +#endif + + diff --git a/src/Launcher/Launcher_Job_YACSFile.cxx b/src/Launcher/Launcher_Job_YACSFile.cxx new file mode 100644 index 000000000..000424ba5 --- /dev/null +++ b/src/Launcher/Launcher_Job_YACSFile.cxx @@ -0,0 +1,62 @@ +// Copyright (C) 2009-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +// Author: André RIBES - EDF R&D +// +#include "Launcher_Job_YACSFile.hxx" +#include + + +Launcher::Job_YACSFile::Job_YACSFile() +{ + _job_type = "yacs_file"; + _dumpState = -1; +} + +Launcher::Job_YACSFile::~Job_YACSFile() {} + +void +Launcher::Job_YACSFile::setJobFile(const std::string & job_file) +{ + Launcher::Job::setJobFile(job_file); +} + +void +Launcher::Job_YACSFile::addJobTypeSpecificScript(std::ofstream & launch_script_stream) +{ + launch_script_stream << _resource_definition.AppliPath << "/runSession -p $appli_port driver -k $appli_port " << _job_file_name_complete; + if (_dumpState > 0) + launch_script_stream << " --dump=" << _dumpState; + launch_script_stream << " > logs/yacs_" << _launch_date << ".log 2>&1" << std::endl; +} + +void +Launcher::Job_YACSFile::checkSpecificParameters() +{ + // Specific parameters + std::map::iterator it = _specific_parameters.find("EnableDumpYACS"); + if (it != _specific_parameters.end()) + { + // Decode info + std::string user_value = it->second; + std::istringstream iss(user_value); + if (!(iss >> _dumpState)) + throw LauncherException("Specific parameter EnableDumpYACS is not correctly defined: it should be an integer. Value given is " + user_value); + } +} diff --git a/src/Launcher/Launcher_Job_YACSFile.hxx b/src/Launcher/Launcher_Job_YACSFile.hxx new file mode 100644 index 000000000..def45d5e5 --- /dev/null +++ b/src/Launcher/Launcher_Job_YACSFile.hxx @@ -0,0 +1,45 @@ +// Copyright (C) 2009-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +// Author: André RIBES - EDF R&D +// +#ifndef _LAUNCHER_JOB_YACSFILE_HXX_ +#define _LAUNCHER_JOB_YACSFILE_HXX_ + +#include "Launcher_Job_SALOME.hxx" + +namespace Launcher +{ + class LAUNCHER_EXPORT Job_YACSFile : virtual public Launcher::Job_SALOME + { + public: + Job_YACSFile(); + virtual ~Job_YACSFile(); + + virtual void setJobFile(const std::string & job_file); + virtual void addJobTypeSpecificScript(std::ofstream & launch_script_stream); + virtual void checkSpecificParameters(); + + protected: + int _dumpState; + }; +} + +#endif + diff --git a/src/Launcher/Launcher_Utils.hxx b/src/Launcher/Launcher_Utils.hxx new file mode 100644 index 000000000..57d2ccb49 --- /dev/null +++ b/src/Launcher/Launcher_Utils.hxx @@ -0,0 +1,58 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +// Author: André RIBES - EDF R&D +// +#ifndef __LAUNCHER_UTILS_HXX__ +#define __LAUNCHER_UTILS_HXX__ + +#include + +#ifdef WIN32 +# if defined LAUNCHER_EXPORTS || defined Launcher_EXPORTS +# define LAUNCHER_EXPORT __declspec(dllexport) +# else +# define LAUNCHER_EXPORT __declspec(dllimport) +# endif +#else +# define LAUNCHER_EXPORT +#endif + +// MESSAGES +#define LAUNCHER_MESS_INIT(deb) std::cerr << deb +#define LAUNCHER_MESS_BEGIN(deb) LAUNCHER_MESS_INIT(deb)<<__FILE__ <<" ["<<__LINE__<<"] : " +#define LAUNCHER_MESS_END std::endl; +#define LAUNCHER_INFOS(msg) {LAUNCHER_MESS_BEGIN("- Trace ") << msg << LAUNCHER_MESS_END} + +#if defined(_DEBUG_) || defined(_DEBUG) +#define LAUNCHER_MESSAGE(msg) {LAUNCHER_MESS_BEGIN("- Trace ") << msg << LAUNCHER_MESS_END} +#else /* ifdef _DEBUG_*/ +#define LAUNCHER_MESSAGE(msg) {} +#endif /* ifdef _DEBUG_*/ + +class LAUNCHER_EXPORT LauncherException +{ +public: + const std::string msg; + + LauncherException(const std::string m) : msg(m) {} +}; + + +#endif diff --git a/src/Launcher/Makefile.am b/src/Launcher/Makefile.am index ab797d703..d6ecf2277 100644 --- a/src/Launcher/Makefile.am +++ b/src/Launcher/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + include $(top_srcdir)/salome_adm/unix/make_common_starter.am # @@ -33,6 +34,12 @@ salomeinclude_HEADERS = \ BatchTest.hxx \ SALOME_Launcher_defs.hxx \ SALOME_Launcher.hxx \ + Launcher_Utils.hxx \ + Launcher_Job.hxx \ + Launcher_Job_Command.hxx \ + Launcher_Job_SALOME.hxx \ + Launcher_Job_PythonSALOME.hxx \ + Launcher_Job_YACSFile.hxx \ Launcher.hxx # Scripts to be installed @@ -52,7 +59,7 @@ COMMON_CPPFLAGS=\ @PYTHON_INCLUDES@ \ @MPI_INCLUDES@ \ @LIBXML_INCLUDES@ \ - -I$(srcdir)/../Batch \ + @LIBBATCH_INCLUDES@ \ -I$(srcdir)/../Basics \ -I$(srcdir)/../SALOMELocalTrace \ -I$(srcdir)/../NamingService \ @@ -61,10 +68,13 @@ COMMON_CPPFLAGS=\ -I$(srcdir)/../Notification \ -I$(srcdir)/../ResourcesManager \ -I$(srcdir)/../Container \ - -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ +if WITH_LIBBATCH + COMMON_CPPFLAGS += -DWITH_LIBBATCH +endif + # This local variable defines the list of dependant libraries common to all target in this package. COMMON_LIBS =\ ../Registry/libRegistry.la \ @@ -75,8 +85,8 @@ COMMON_LIBS =\ ../Utils/libOpUtil.la \ ../SALOMELocalTrace/libSALOMELocalTrace.la \ ../Basics/libSALOMEBasics.la \ - ../Batch/libSalomeBatch.la \ $(top_builddir)/idl/libSalomeIDLKernel.la \ + @LIBBATCH_LIBS@ \ @MPI_LIBS@ \ @CORBA_LIBS@ \ @LIBXML_LIBS@ \ @@ -109,21 +119,32 @@ libSalomeLauncher_la_LIBADD =\ libLauncher_la_SOURCES=\ SALOME_Launcher_Parser.cxx \ SALOME_Launcher_Handler.cxx \ + Launcher_Utils.hxx \ + Launcher_Job.cxx \ + Launcher_Job_Command.cxx \ + Launcher_Job_SALOME.cxx \ + Launcher_Job_PythonSALOME.cxx \ + Launcher_Job_YACSFile.cxx \ Launcher.cxx libLauncher_la_CPPFLAGS =\ - -I$(srcdir)/../Batch \ + -I$(srcdir)/../Basics \ -I$(srcdir)/../ResourcesManager \ + @LIBBATCH_INCLUDES@ \ @MPI_INCLUDES@ \ @LIBXML_INCLUDES@ +if WITH_LIBBATCH + libLauncher_la_CPPFLAGS += -DWITH_LIBBATCH +endif + libLauncher_la_LDFLAGS =\ -no-undefined -version-info=0:0:0 \ @LDEXPDYNFLAGS@ libLauncher_la_LIBADD =\ - ../Batch/libSalomeBatch.la \ - ../ResourcesManager/libSalomeResourcesManager.la \ + ../ResourcesManager/libResourcesManager.la \ + @LIBBATCH_LIBS@ \ @MPI_LIBS@ \ @LIBXML_LIBS@ @@ -133,7 +154,9 @@ libLauncher_la_LIBADD =\ # =============================================================== # if !WITHONLYLAUNCHER - bin_PROGRAMS = SALOME_LauncherServer + bin_PROGRAMS = SALOME_LauncherServer TestLauncher +else + bin_PROGRAMS = TestLauncher endif SALOME_LauncherServer_SOURCES =\ @@ -143,11 +166,27 @@ SALOME_LauncherServer_CPPFLAGS=\ $(COMMON_CPPFLAGS) SALOME_LauncherServer_LDADD =\ + libLauncher.la \ libSalomeLauncher.la \ ../Basics/libSALOMEBasics.la \ - $(MPI_LIBS) \ - $(CORBA_LIBS) \ - $(LIBXML_LIBS) \ - $(PYTHON_LIBS) + ../SALOMELocalTrace/libSALOMELocalTrace.la \ + @LIBBATCH_LIBS@ \ + @MPI_LIBS@ \ + @CORBA_LIBS@ \ + @LIBXML_LIBS@ \ + @PYTHON_LIBS@ + +TestLauncher_SOURCES = TestLauncher.cxx +TestLauncher_CPPFLAGS = @LIBXML_INCLUDES@ -I$(srcdir)/../ResourcesManager @LIBBATCH_INCLUDES@ + +if WITH_LIBBATCH + TestLauncher_CPPFLAGS += -DWITH_LIBBATCH +endif +TestLauncher_LDADD = \ + @LIBXML_LIBS@ \ + ../ResourcesManager/libResourcesManager.la \ + libLauncher.la \ + ../Utils/libOpUtil.la \ + @LIBBATCH_LIBS@ diff --git a/src/Launcher/SALOME_Launcher.cxx b/src/Launcher/SALOME_Launcher.cxx index 00869eec8..433c30b14 100644 --- a/src/Launcher/SALOME_Launcher.cxx +++ b/src/Launcher/SALOME_Launcher.cxx @@ -1,30 +1,36 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "SALOME_Launcher.hxx" #include "BatchTest.hxx" #include "OpUtil.hxx" #include "SALOME_ContainerManager.hxx" #include "Utils_CorbaException.hxx" + +#include "Launcher_Job_Command.hxx" +#include "Launcher_Job_YACSFile.hxx" +#include "Launcher_Job_PythonSALOME.hxx" + #ifdef WIN32 # include #else @@ -33,7 +39,9 @@ #include #include -using namespace std; +#include +#include +#include const char *SALOME_Launcher::_LauncherNameInNS = "/SalomeLauncher"; @@ -41,11 +49,8 @@ const char *SALOME_Launcher::_LauncherNameInNS = "/SalomeLauncher"; /*! * Constructor * \param orb - * Define a CORBA single thread policy for the server, which avoid to deal - * with non thread-safe usage like Change_Directory in SALOME naming service */ //============================================================================= - SALOME_Launcher::SALOME_Launcher(CORBA::ORB_ptr orb, PortableServer::POA_var poa) : _l() { MESSAGE("SALOME_Launcher constructor"); @@ -71,11 +76,279 @@ SALOME_Launcher::SALOME_Launcher(CORBA::ORB_ptr orb, PortableServer::POA_var poa * destructor */ //============================================================================= - SALOME_Launcher::~SALOME_Launcher() { - MESSAGE("destructor"); + MESSAGE("SALOME_Launcher destructor"); delete _NS; + MESSAGE("SALOME_Launcher destructor end"); +} + + +CORBA::Long +SALOME_Launcher::createJob(const Engines::JobParameters & job_parameters) +{ + std::string job_type = job_parameters.job_type.in(); + + if (job_type != "command" && job_type != "yacs_file" && job_type != "python_salome") + { + std::string message("SALOME_Launcher::createJob: bad job type: "); + message += job_type; + THROW_SALOME_CORBA_EXCEPTION(message.c_str(), SALOME::INTERNAL_ERROR); + } + + Launcher::Job * new_job; // It is Launcher_cpp that is going to destroy it + + if (job_type == "command") + new_job = new Launcher::Job_Command(); + else if (job_type == "yacs_file") + new_job = new Launcher::Job_YACSFile(); + else if (job_type == "python_salome") + new_job = new Launcher::Job_PythonSALOME(); + + // Name + new_job->setJobName(job_parameters.job_name.in()); + + // Directories + std::string work_directory = job_parameters.work_directory.in(); + std::string local_directory = job_parameters.local_directory.in(); + std::string result_directory = job_parameters.result_directory.in(); + new_job->setWorkDirectory(work_directory); + new_job->setLocalDirectory(local_directory); + new_job->setResultDirectory(result_directory); + + // Job File + std::string job_file = job_parameters.job_file.in(); + try + { + new_job->setJobFile(job_file); + } + catch(const LauncherException &ex) + { + INFOS(ex.msg.c_str()); + THROW_SALOME_CORBA_EXCEPTION(ex.msg.c_str(),SALOME::INTERNAL_ERROR); + } + + // Files + std::string env_file = job_parameters.env_file.in(); + new_job->setEnvFile(env_file); + for (CORBA::ULong i = 0; i < job_parameters.in_files.length(); i++) + new_job->add_in_file(job_parameters.in_files[i].in()); + for (CORBA::ULong i = 0; i < job_parameters.out_files.length(); i++) + new_job->add_out_file(job_parameters.out_files[i].in()); + + // Expected During Time + try + { + std::string maximum_duration = job_parameters.maximum_duration.in(); + new_job->setMaximumDuration(maximum_duration); + } + catch(const LauncherException &ex){ + INFOS(ex.msg.c_str()); + THROW_SALOME_CORBA_EXCEPTION(ex.msg.c_str(),SALOME::INTERNAL_ERROR); + } + + // Queue + std::string queue = job_parameters.queue.in(); + new_job->setQueue(queue); + + // Resources requirements + try + { + resourceParams p; + p.name = job_parameters.resource_required.name; + p.hostname = job_parameters.resource_required.hostname; + p.OS = job_parameters.resource_required.OS; + p.nb_proc = job_parameters.resource_required.nb_proc; + p.nb_node = job_parameters.resource_required.nb_node; + p.nb_proc_per_node = job_parameters.resource_required.nb_proc_per_node; + p.cpu_clock = job_parameters.resource_required.cpu_clock; + p.mem_mb = job_parameters.resource_required.mem_mb; + new_job->setResourceRequiredParams(p); + } + catch(const LauncherException &ex){ + INFOS(ex.msg.c_str()); + THROW_SALOME_CORBA_EXCEPTION(ex.msg.c_str(),SALOME::INTERNAL_ERROR); + } + + // Adding specific parameters to the job + for (CORBA::ULong i = 0; i < job_parameters.specific_parameters.length(); i++) + new_job->addSpecificParameter(job_parameters.specific_parameters[i].name.in(), + job_parameters.specific_parameters[i].value.in()); + try + { + new_job->checkSpecificParameters(); + } + catch(const LauncherException &ex) + { + INFOS(ex.msg.c_str()); + THROW_SALOME_CORBA_EXCEPTION(ex.msg.c_str(),SALOME::INTERNAL_ERROR); + } + + try + { + _l.createJob(new_job); + std::ostringstream job_id; + job_id << new_job->getNumber(); + notifyObservers("NEW_JOB", job_id.str()); + } + catch(const LauncherException &ex) + { + INFOS(ex.msg.c_str()); + THROW_SALOME_CORBA_EXCEPTION(ex.msg.c_str(),SALOME::BAD_PARAM); + } + return new_job->getNumber(); +} + +void +SALOME_Launcher::launchJob(CORBA::Long job_id) +{ + try + { + _l.launchJob(job_id); + } + catch(const LauncherException &ex) + { + INFOS(ex.msg.c_str()); + THROW_SALOME_CORBA_EXCEPTION(ex.msg.c_str(),SALOME::BAD_PARAM); + } +} + +char * +SALOME_Launcher::getJobState(CORBA::Long job_id) +{ + std::string result; + try + { + result = _l.getJobState(job_id); + } + catch(const LauncherException &ex) + { + INFOS(ex.msg.c_str()); + THROW_SALOME_CORBA_EXCEPTION(ex.msg.c_str(),SALOME::BAD_PARAM); + } + return CORBA::string_dup(result.c_str()); +} + +void +SALOME_Launcher::getJobResults(CORBA::Long job_id, const char * directory) +{ + try + { + _l.getJobResults(job_id, directory); + } + catch(const LauncherException &ex) + { + INFOS(ex.msg.c_str()); + THROW_SALOME_CORBA_EXCEPTION(ex.msg.c_str(),SALOME::BAD_PARAM); + } +} + +CORBA::Boolean +SALOME_Launcher::getJobDumpState(CORBA::Long job_id, const char * directory) +{ + CORBA::Boolean rtn = false; + try + { + rtn = _l.getJobDumpState(job_id, directory); + } + catch(const LauncherException &ex) + { + INFOS(ex.msg.c_str()); + THROW_SALOME_CORBA_EXCEPTION(ex.msg.c_str(),SALOME::BAD_PARAM); + } + return rtn; +} + +void +SALOME_Launcher::removeJob(CORBA::Long job_id) +{ + try + { + _l.removeJob(job_id); + std::ostringstream job_id_str; + job_id_str << job_id; + notifyObservers("REMOVE_JOB", job_id_str.str()); + } + catch(const LauncherException &ex) + { + INFOS(ex.msg.c_str()); + THROW_SALOME_CORBA_EXCEPTION(ex.msg.c_str(),SALOME::BAD_PARAM); + } +} + +void +SALOME_Launcher::stopJob(CORBA::Long job_id) +{ + try + { + _l.stopJob(job_id); + std::ostringstream job_id_str; + job_id_str << job_id; + notifyObservers("UPDATE_JOB_STATE", job_id_str.str()); + } + catch(const LauncherException &ex) + { + INFOS(ex.msg.c_str()); + THROW_SALOME_CORBA_EXCEPTION(ex.msg.c_str(),SALOME::BAD_PARAM); + } +} + +//============================================================================= +/*! CORBA Method: + * Create a job in the launcher with a file + * \param xmlExecuteFile : .xml to parse that contains job description + * \param clusterName : machine choosed + */ +//============================================================================= +CORBA::Long +SALOME_Launcher::createJobWithFile(const char * xmlExecuteFile, + const char * clusterName) +{ + CORBA::Long jobId; + try{ + jobId = _l.createJobWithFile(xmlExecuteFile, clusterName); + } + catch(const LauncherException &ex){ + INFOS(ex.msg.c_str()); + THROW_SALOME_CORBA_EXCEPTION(ex.msg.c_str(),SALOME::INTERNAL_ERROR); + } + + return jobId; +} + +//============================================================================= +/*! CORBA Method: + * the test batch configuration + * \param params : The batch cluster + */ +//============================================================================= +CORBA::Boolean +SALOME_Launcher::testBatch(const Engines::ResourceParameters& params) +{ + MESSAGE("BEGIN OF SALOME_Launcher::testBatch"); + CORBA::Boolean rtn = false; + try + { + // find a cluster matching the structure params + Engines::ResourceList *aMachineList = _ResManager->GetFittingResources(params); + if (aMachineList->length() == 0) + throw SALOME_Exception("No resources have been found with your parameters"); + + const Engines::ResourceDefinition* p = _ResManager->GetResourceDefinition((*aMachineList)[0]); + std::string resource_name(p->name); + INFOS("Choose resource for test: " << resource_name); + + BatchTest t(*p); + if (t.test()) + { + rtn = true; + } + } + catch(const LauncherException &ex){ + INFOS(ex.msg.c_str()); + THROW_SALOME_CORBA_EXCEPTION(ex.msg.c_str(),SALOME::INTERNAL_ERROR); + } + return rtn; } //============================================================================= @@ -83,7 +356,6 @@ SALOME_Launcher::~SALOME_Launcher() * shutdown all the containers, then the ContainerManager servant */ //============================================================================= - void SALOME_Launcher::Shutdown() { MESSAGE("Shutdown"); @@ -92,7 +364,6 @@ void SALOME_Launcher::Shutdown() _ResManager->Shutdown(); PortableServer::ObjectId_var oid = _poa->servant_to_id(this); _poa->deactivate_object(oid); - //_remove_ref(); if(!CORBA::is_nil(_orb)) _orb->shutdown(0); } @@ -110,198 +381,725 @@ CORBA::Long SALOME_Launcher::getPID() #else (CORBA::Long)_getpid(); #endif - } //============================================================================= /*! CORBA Method: - * Submit a batch job on a cluster and returns the JobId - * \param xmlExecuteFile : .xml to parse to execute on the batch cluster - * \param clusterName : cluster name + * Returns current launcher jobs list */ //============================================================================= -CORBA::Long SALOME_Launcher::submitJob(const char * xmlExecuteFile, - const char * clusterName) +Engines::JobsList * +SALOME_Launcher::getJobsList() { - CORBA::Long jobId; + Engines::JobsList_var jobs_list = new Engines::JobsList(); + std::map cpp_jobs = _l.getJobs(); + std::map::const_iterator it_job; + int list_id = 0; + for(it_job = cpp_jobs.begin(); it_job != cpp_jobs.end(); it_job++) + { + int number = it_job->first; + try + { + // Prepare CORBA job description + Engines::JobDescription_var job_descr = new Engines::JobDescription(); + Engines::JobParameters_var job_parameters = getJobParameters(number); + job_descr->job_id = number; + job_descr->job_parameters = job_parameters; - try{ - jobId = _l.submitJob(xmlExecuteFile,clusterName); - } - catch(const LauncherException &ex){ - INFOS(ex.msg.c_str()); - THROW_SALOME_CORBA_EXCEPTION(ex.msg.c_str(),SALOME::INTERNAL_ERROR); + // Add job description to the sequence + jobs_list->length(list_id + 1); + jobs_list[list_id] = job_descr; + list_id++; + } + catch (...) {} } - return jobId; + return jobs_list._retn(); } //============================================================================= /*! CORBA Method: - * Submit a batch job on a cluster and returns the JobId - * \param fileToExecute : .py/.exe/.sh/... to execute on the batch cluster - * \param filesToExport : to export on the batch cluster - * \param NumberOfProcessors : Number of processors needed on the batch cluster - * \param params : Constraints for the choice of the batch cluster + * Returns the job description */ //============================================================================= -CORBA::Long SALOME_Launcher::submitSalomeJob( const char * fileToExecute , - const Engines::FilesList& filesToExport , - const Engines::FilesList& filesToImport , - const Engines::BatchParameters& batch_params, - const Engines::MachineParameters& params) +Engines::JobParameters * +SALOME_Launcher::getJobParameters(CORBA::Long job_id) { - MESSAGE("BEGIN OF SALOME_Launcher::submitSalomeJob"); - CORBA::Long jobId; - - machineParams p; - p.hostname = params.hostname; - p.OS = params.OS; - p.nb_node = params.nb_node; - p.nb_proc_per_node = params.nb_proc_per_node; - p.cpu_clock = params.cpu_clock; - p.mem_mb = params.mem_mb; - - batchParams bp; - bp.batch_directory = batch_params.batch_directory; - bp.expected_during_time = batch_params.expected_during_time; - bp.mem = batch_params.mem; - bp.nb_proc = batch_params.nb_proc; - - vector efl; - for(int i=0;i ifl; - for(int i=0;i cpp_jobs = _l.getJobs(); + std::map::const_iterator it_job = cpp_jobs.find(job_id); + if (it_job == cpp_jobs.end()) + { + INFOS("Cannot find the job, is it created ? job number: " << job_id); + THROW_SALOME_CORBA_EXCEPTION("Job does not exist", SALOME::INTERNAL_ERROR); + } - try{ - jobId = _l.submitSalomeJob(fileToExecute,efl,ifl,bp,p); + Launcher::Job * job = it_job->second; + Engines::JobParameters_var job_parameters = new Engines::JobParameters; + job_parameters->job_name = CORBA::string_dup(job->getJobName().c_str()); + job_parameters->job_type = CORBA::string_dup(job->getJobType().c_str()); + job_parameters->job_file = CORBA::string_dup(job->getJobFile().c_str()); + job_parameters->env_file = CORBA::string_dup(job->getEnvFile().c_str()); + job_parameters->work_directory = CORBA::string_dup(job->getWorkDirectory().c_str()); + job_parameters->local_directory = CORBA::string_dup(job->getLocalDirectory().c_str()); + job_parameters->result_directory = CORBA::string_dup(job->getResultDirectory().c_str()); + + int i = 0; + int j = 0; + std::list in_files = job->get_in_files(); + std::list out_files = job->get_out_files(); + job_parameters->in_files.length(in_files.size()); + for(std::list::iterator it = in_files.begin(); it != in_files.end(); it++) + { + job_parameters->in_files[i] = CORBA::string_dup((*it).c_str()); + i++; } - catch(const LauncherException &ex){ - INFOS(ex.msg.c_str()); - THROW_SALOME_CORBA_EXCEPTION(ex.msg.c_str(),SALOME::INTERNAL_ERROR); + job_parameters->out_files.length(out_files.size()); + for(std::list::iterator it = out_files.begin(); it != out_files.end(); it++) + { + job_parameters->out_files[j] = CORBA::string_dup((*it).c_str()); + j++; } - return jobId; + + job_parameters->maximum_duration = CORBA::string_dup(job->getMaximumDuration().c_str()); + job_parameters->queue = CORBA::string_dup(job->getQueue().c_str()); + + resourceParams resource_params = job->getResourceRequiredParams(); + job_parameters->resource_required.name = CORBA::string_dup(resource_params.name.c_str()); + job_parameters->resource_required.hostname = CORBA::string_dup(resource_params.hostname.c_str()); + job_parameters->resource_required.OS = CORBA::string_dup(resource_params.OS.c_str()); + job_parameters->resource_required.nb_proc = resource_params.nb_proc; + job_parameters->resource_required.nb_node = resource_params.nb_node; + job_parameters->resource_required.nb_proc_per_node = resource_params.nb_proc_per_node; + job_parameters->resource_required.cpu_clock = resource_params.cpu_clock; + job_parameters->resource_required.mem_mb = resource_params.mem_mb; + + std::map specific_parameters = job->getSpecificParameters(); + if (!specific_parameters.empty()) + { + job_parameters->specific_parameters.length(specific_parameters.size()); + std::map::const_iterator it_specific; + CORBA::ULong i = 0; + for (it_specific = specific_parameters.begin() ; it_specific != specific_parameters.end(); it_specific++) + { + Engines::Parameter_var new_param = new Engines::Parameter; + new_param->name = CORBA::string_dup((it_specific->first).c_str()); + new_param->value = CORBA::string_dup((it_specific->second).c_str()); + job_parameters->specific_parameters[i] = new_param; + i++; + } + } + + return job_parameters._retn(); } //============================================================================= /*! CORBA Method: - * the test batch configuration - * \param params : The batch cluster + * Loads jobs saved in jobs_file */ //============================================================================= -CORBA::Boolean -SALOME_Launcher::testBatch(const Engines::MachineParameters& params) +void +SALOME_Launcher::loadJobs(const char* jobs_file) { - MESSAGE("BEGIN OF SALOME_Launcher::testBatch"); - CORBA::Boolean rtn = false; - try + // Step 1: check jobs_file read access + FILE* xml_file = fopen(jobs_file, "r"); + if (xml_file == NULL) { - // find a cluster matching the structure params - Engines::CompoList aCompoList ; - Engines::MachineList *aMachineList = _ResManager->GetFittingResources(params, aCompoList); - if (aMachineList->length() == 0) - throw SALOME_Exception("No resources have been found with your parameters"); + std::string error = "Error opening jobs_file in SALOME_Launcher::loadJobs: " + std::string(jobs_file); + INFOS(error); + THROW_SALOME_CORBA_EXCEPTION(error.c_str(), SALOME::INTERNAL_ERROR); + } - const Engines::MachineParameters* p = _ResManager->GetMachineParameters((*aMachineList)[0]); - string clustername(p->alias); - INFOS("Choose cluster" << clustername); - - BatchTest t(*p); - if (t.test()) + // Step 2: read xml file + xmlDocPtr doc = xmlReadFile(jobs_file, NULL, 0); + if (doc == NULL) + { + std::string error = "Error in xmlReadFile in SALOME_Launcher::loadJobs, could not parse file: " + std::string(jobs_file); + INFOS(error); + fclose(xml_file); + THROW_SALOME_CORBA_EXCEPTION(error.c_str(), SALOME::INTERNAL_ERROR); + } + + // Step 3: Find jobs + xmlNodePtr root_node = xmlDocGetRootElement(doc); + xmlNodePtr xmlCurrentNode = root_node->xmlChildrenNode; + if (!xmlStrcmp(root_node->name, xmlCharStrdup("jobs"))) + { + while(xmlCurrentNode != NULL) { - rtn = true; + if (!xmlStrcmp(xmlCurrentNode->name, xmlCharStrdup("job"))) + { + INFOS("A job is found"); + Launcher::Job * new_job; // It is Launcher_cpp that is going to destroy it + xmlNodePtr job_node = xmlCurrentNode; + + // Begin Job + if (!xmlHasProp(job_node, xmlCharStrdup("type")) || + !xmlHasProp(job_node, xmlCharStrdup("name"))) + { + INFOS("A bad job is found, type or name not found"); + break; + } + xmlChar* type = xmlGetProp(job_node, xmlCharStrdup("type")); + xmlChar* name = xmlGetProp(job_node, xmlCharStrdup("name")); + std::string job_type((const char*) type); + if (job_type == "command") + new_job = new Launcher::Job_Command(); + else if (job_type == "yacs_file") + new_job = new Launcher::Job_YACSFile(); + else if (job_type == "python_salome") + new_job = new Launcher::Job_PythonSALOME(); + new_job->setJobName(std::string((const char *)name)); + xmlFree(type); + xmlFree(name); + + xmlNodePtr user_node = xmlFirstElementChild(job_node); + xmlNodePtr run_node = xmlNextElementSibling(user_node); + if (user_node == NULL || run_node == NULL) + { + INFOS("A bad job is found, user_part or run_part not found"); + delete new_job; + break; + } + if (xmlStrcmp(user_node->name, xmlCharStrdup("user_part")) || + xmlStrcmp(run_node->name, xmlCharStrdup("run_part"))) + { + INFOS("A bad job is found, cannot get a correct user_part or run_part node"); + delete new_job; + break; + } + + // Add user part + + // Get job_file env_file work_directory local_directory result_directory + xmlNodePtr job_file_node = xmlFirstElementChild(user_node); + xmlNodePtr env_file_node = xmlNextElementSibling(job_file_node); + xmlNodePtr work_directory_node = xmlNextElementSibling(env_file_node); + xmlNodePtr local_directory_node = xmlNextElementSibling(work_directory_node); + xmlNodePtr result_directory_node = xmlNextElementSibling(local_directory_node); + if (job_file_node == NULL || + env_file_node == NULL || + work_directory_node == NULL || + local_directory_node == NULL || + result_directory_node == NULL + ) + { + INFOS("A bad job is found, some user_part are not found"); + delete new_job; + break; + } + if (xmlStrcmp(job_file_node->name, xmlCharStrdup("job_file")) || + xmlStrcmp(env_file_node->name, xmlCharStrdup("env_file")) || + xmlStrcmp(work_directory_node->name, xmlCharStrdup("work_directory")) || + xmlStrcmp(local_directory_node->name, xmlCharStrdup("local_directory")) || + xmlStrcmp(result_directory_node->name, xmlCharStrdup("result_directory")) + ) + { + INFOS("A bad job is found, some user part node are not in the rigth or does not have a correct name"); + delete new_job; + break; + } + xmlChar* job_file = xmlNodeGetContent(job_file_node); + try + { + new_job->setJobFile(std::string((const char *)job_file)); + } + catch(const LauncherException &ex) + { + INFOS("Exception receice for job_file, cannot add the job" << ex.msg.c_str()); + delete new_job; + xmlFree(job_file); + break; + } + xmlChar* env_file = xmlNodeGetContent(env_file_node); + xmlChar* work_directory = xmlNodeGetContent(work_directory_node); + xmlChar* local_directory = xmlNodeGetContent(local_directory_node); + xmlChar* result_directory = xmlNodeGetContent(result_directory_node); + new_job->setEnvFile(std::string((const char *)env_file)); + new_job->setWorkDirectory(std::string((const char *)work_directory)); + new_job->setLocalDirectory(std::string((const char *)local_directory)); + new_job->setResultDirectory(std::string((const char *)result_directory)); + xmlFree(job_file); + xmlFree(env_file); + xmlFree(work_directory); + xmlFree(local_directory); + xmlFree(result_directory); + + // Get in and out files + xmlNodePtr files_node = xmlNextElementSibling(result_directory_node); + if (files_node == NULL) + { + INFOS("A bad job is found, user_part files is not found"); + delete new_job; + break; + } + if (xmlStrcmp(files_node->name, xmlCharStrdup("files"))) + { + INFOS("A bad job is found, files node are not in the rigth place or does not have a correct name or does not exist"); + delete new_job; + break; + } + xmlNodePtr file_node = xmlFirstElementChild(files_node); + while (file_node != NULL) + { + if (!xmlStrcmp(file_node->name, xmlCharStrdup("in_file"))) + { + xmlChar* in_file = xmlNodeGetContent(file_node); + new_job->add_in_file(std::string((const char *)in_file)); + xmlFree(in_file); + } + else if (!xmlStrcmp(file_node->name, xmlCharStrdup("out_file"))) + { + xmlChar* out_file = xmlNodeGetContent(file_node); + new_job->add_out_file(std::string((const char *)out_file)); + xmlFree(out_file); + } + file_node = xmlNextElementSibling(file_node); + } + + // Get resource part + xmlNodePtr res_node = xmlNextElementSibling(files_node); + xmlNodePtr maximum_duration_node = xmlNextElementSibling(res_node); + xmlNodePtr queue_node = xmlNextElementSibling(maximum_duration_node); + if (res_node == NULL || + maximum_duration_node == NULL || + queue_node == NULL + ) + { + INFOS("A bad job is found, some user_part are not found"); + delete new_job; + break; + } + if (xmlStrcmp(res_node->name, xmlCharStrdup("resource_params")) || + xmlStrcmp(maximum_duration_node->name, xmlCharStrdup("maximum_duration")) || + xmlStrcmp(queue_node->name, xmlCharStrdup("queue")) + ) + { + INFOS("A bad job is found, some user part node are not in the rigth or does not have a correct name"); + delete new_job; + break; + } + xmlChar* maximum_duration = xmlNodeGetContent(maximum_duration_node); + try + { + new_job->setMaximumDuration(std::string((const char *)maximum_duration)); + } + catch(const LauncherException &ex) + { + INFOS("Exception receice for maximum_duration, cannot add the job" << ex.msg.c_str()); + delete new_job; + xmlFree(maximum_duration); + break; + } + xmlChar* queue = xmlNodeGetContent(queue_node); + new_job->setQueue(std::string((const char *)queue)); + xmlFree(maximum_duration); + xmlFree(queue); + + xmlNodePtr specific_node = xmlNextElementSibling(queue_node); + if (specific_node == NULL) + { + INFOS("A bad job is found, specific_parameters part is not found"); + delete new_job; + break; + } + xmlNodePtr parameter_node = xmlFirstElementChild(specific_node); + while (parameter_node != NULL) + { + if (!xmlStrcmp(parameter_node->name, xmlCharStrdup("specific_parameter"))) + { + xmlNodePtr name_node = xmlFirstElementChild(parameter_node); + xmlNodePtr value_node = xmlNextElementSibling(name_node); + if (name_node == NULL || + value_node == NULL) + { + INFOS("A bad job is found, specific_parameter parts are not found"); + delete new_job; + break; + } + if (xmlStrcmp(name_node->name, xmlCharStrdup("name")) || + xmlStrcmp(value_node->name, xmlCharStrdup("value"))) + { + INFOS("A bad job is found, specific_parameter bad parts are found"); + delete new_job; + break; + } + + xmlChar* name = xmlNodeGetContent(name_node); + xmlChar* value = xmlNodeGetContent(value_node); + try + { + new_job->addSpecificParameter(std::string((const char*)name), std::string((const char*)value)); + xmlFree(name); + xmlFree(value); + } + catch(const LauncherException &ex) + { + INFOS("Exception receice for a specific parameter, cannot add the job" << ex.msg.c_str()); + delete new_job; + xmlFree(name); + xmlFree(value); + break; + } + } + else + { + INFOS("A bad job is found, specific_parameters part is bad, a node that is not a specific parameter is found"); + delete new_job; + break; + } + parameter_node = xmlNextElementSibling(parameter_node); + } + + xmlNodePtr res_name_node = xmlFirstElementChild(res_node); + xmlNodePtr res_hostname_node = xmlNextElementSibling(res_name_node); + xmlNodePtr res_os_node = xmlNextElementSibling(res_hostname_node); + xmlNodePtr res_nb_proc_node = xmlNextElementSibling(res_os_node); + xmlNodePtr res_nb_node_node = xmlNextElementSibling(res_nb_proc_node); + xmlNodePtr res_nb_proc_per_node_node = xmlNextElementSibling(res_nb_node_node); + xmlNodePtr res_cpu_clock_node = xmlNextElementSibling(res_nb_proc_per_node_node); + xmlNodePtr res_mem_mb_node = xmlNextElementSibling(res_cpu_clock_node); + if (res_name_node == NULL || + res_hostname_node == NULL || + res_os_node == NULL || + res_nb_proc_node == NULL || + res_nb_node_node == NULL || + res_nb_proc_per_node_node == NULL || + res_cpu_clock_node == NULL || + res_mem_mb_node == NULL + ) + { + INFOS("A bad job is found, some resource_params user_part are not found"); + delete new_job; + break; + } + if (xmlStrcmp(res_name_node->name, xmlCharStrdup("name")) || + xmlStrcmp(res_hostname_node->name, xmlCharStrdup("hostname")) || + xmlStrcmp(res_os_node->name, xmlCharStrdup("OS")) || + xmlStrcmp(res_nb_proc_node->name, xmlCharStrdup("nb_proc")) || + xmlStrcmp(res_nb_node_node->name, xmlCharStrdup("nb_node")) || + xmlStrcmp(res_nb_proc_per_node_node->name, xmlCharStrdup("nb_proc_per_node")) || + xmlStrcmp(res_cpu_clock_node->name, xmlCharStrdup("cpu_clock")) || + xmlStrcmp(res_mem_mb_node->name, xmlCharStrdup("mem_mb")) + ) + { + INFOS("A bad job is found, some resource_params user_part node are not in the rigth or does not have a correct name"); + delete new_job; + break; + } + xmlChar* res_name = xmlNodeGetContent(res_name_node); + xmlChar* res_hostname = xmlNodeGetContent(res_hostname_node); + xmlChar* res_os = xmlNodeGetContent(res_os_node); + resourceParams p; + p.name = std::string((const char*) res_name); + p.hostname = std::string((const char*) res_hostname); + p.OS = std::string((const char*) res_os); + xmlFree(res_name); + xmlFree(res_hostname); + xmlFree(res_os); + xmlChar* res_nb_proc = xmlNodeGetContent(res_nb_proc_node); + xmlChar* res_nb_node = xmlNodeGetContent(res_nb_node_node); + xmlChar* res_nb_proc_per_node = xmlNodeGetContent(res_nb_proc_per_node_node); + xmlChar* res_cpu_clock = xmlNodeGetContent(res_cpu_clock_node); + xmlChar* res_mem_mb = xmlNodeGetContent(res_mem_mb_node); + bool import_value = true; + std::istringstream nb_proc_stream((const char *) res_nb_proc); + if (!(nb_proc_stream >> p.nb_proc)) + import_value = false; + std::istringstream nb_node_stream((const char *) res_nb_node); + if (!(nb_node_stream >> p.nb_node)) + import_value = false; + std::istringstream nb_proc_per_node_stream((const char *) res_nb_proc_per_node); + if (!(nb_proc_per_node_stream >> p.nb_proc_per_node)) + import_value = false; + std::istringstream cpu_clock_stream((const char *) res_cpu_clock); + if (!(cpu_clock_stream >> p.cpu_clock)) + import_value = false; + std::istringstream mem_mb_stream((const char *) res_mem_mb); + if (!(mem_mb_stream >> p.mem_mb)) + import_value = false; + xmlFree(res_nb_proc); + xmlFree(res_nb_node); + xmlFree(res_nb_proc_per_node); + xmlFree(res_cpu_clock); + xmlFree(res_mem_mb); + if (!import_value) + { + INFOS("A bad job is found, some resource_params value are not correct"); + delete new_job; + break; + } + try + { + new_job->setResourceRequiredParams(p); + } + catch(const LauncherException &ex) + { + INFOS("A bad job is found, an error when inserting resource_params:" << ex.msg.c_str()); + delete new_job; + break; + } + + // We finally get run part to figure out what to do + xmlNodePtr job_state_node = xmlFirstElementChild(run_node); + xmlNodePtr resource_choosed_name_node = xmlNextElementSibling(job_state_node); + xmlNodePtr job_reference_node = xmlNextElementSibling(resource_choosed_name_node); + if (job_state_node == NULL || + resource_choosed_name_node == NULL || + job_reference_node == NULL + ) + { + INFOS("A bad job is found, some run_part are not found"); + delete new_job; + break; + } + if (xmlStrcmp(job_state_node->name, xmlCharStrdup("job_state")) || + xmlStrcmp(resource_choosed_name_node->name, xmlCharStrdup("resource_choosed_name")) || + xmlStrcmp(job_reference_node->name, xmlCharStrdup("job_reference")) + ) + { + INFOS("A bad job is found, some run_part nodes are not in the rigth or does not have a correct name"); + delete new_job; + break; + } + xmlChar* job_state_xml = xmlNodeGetContent(job_state_node); + xmlChar* resource_choosed_name_xml = xmlNodeGetContent(resource_choosed_name_node); + xmlChar* job_reference_xml = xmlNodeGetContent(job_reference_node); + std::string job_state((const char *) job_state_xml); + std::string resource_choosed_name((const char *) resource_choosed_name_xml); + std::string job_reference((const char *) job_reference_xml); + xmlFree(job_state_xml); + xmlFree(resource_choosed_name_xml); + xmlFree(job_reference_xml); + + if (job_state == "CREATED") + { + // In this case, we ignore run_part informations + try + { + _l.createJob(new_job); + std::ostringstream job_id; + job_id << new_job->getNumber(); + notifyObservers("NEW_JOB", job_id.str()); + } + catch(const LauncherException &ex) + { + INFOS("Load failed: " << ex.msg.c_str()); + } + } + else if (job_state == "QUEUED" || + job_state == "RUNNING" || + job_state == "IN_PROCESS" || + job_state == "PAUSED") + { + try + { + new_job->setState(job_state); + _l.addJobDirectlyToMap(new_job, job_reference); + + // Step 4: We check that the BatchManager could resume + // the job +#ifdef WITH_LIBBATCH + if (new_job->getBatchManagerJobId().getReference() != job_reference) + { + INFOS("BatchManager type cannot resume a job - job state is set to ERROR"); + new_job->setState("ERROR"); + } +#endif + std::ostringstream job_id; + job_id << new_job->getNumber(); + notifyObservers("NEW_JOB", job_id.str()); + } + catch(const LauncherException &ex) + { + INFOS("Cannot load the job! Exception: " << ex.msg.c_str()); + delete new_job; + } + } + else if (job_state == "FINISHED" || + job_state == "FAILED" || + job_state == "ERROR") + { + try + { + // Step 2: We add run_part informations + new_job->setState(job_state); + _l.addJobDirectlyToMap(new_job, job_reference); + std::ostringstream job_id; + job_id << new_job->getNumber(); + notifyObservers("NEW_JOB", job_id.str()); + } + catch(const LauncherException &ex) + { + INFOS("Cannot load the job! Exception: " << ex.msg.c_str()); + delete new_job; + } + } + else + { + INFOS("A bad job is found, state unknown " << job_state); + delete new_job; + } + + } + xmlCurrentNode = xmlCurrentNode->next; } } - catch(const LauncherException &ex){ - INFOS(ex.msg.c_str()); - THROW_SALOME_CORBA_EXCEPTION(ex.msg.c_str(),SALOME::INTERNAL_ERROR); + else + { + xmlFreeDoc(doc); + fclose(xml_file); + std::string error = "Error in xml file, could not find root_node named jobs: " + std::string(jobs_file); + INFOS(error); + THROW_SALOME_CORBA_EXCEPTION(error.c_str(), SALOME::INTERNAL_ERROR); } - return rtn; + + // Clean + xmlFreeDoc(doc); + fclose(xml_file); + notifyObservers("LOAD_JOBS", jobs_file); } //============================================================================= /*! CORBA Method: - * Query a batch job on a cluster and returns the status of job - * \param jobId : identification of Salome job - * \param params : Constraints for the choice of the batch cluster + * Save jobs of Launcher (in any steps) in file jobs_file */ //============================================================================= -char* SALOME_Launcher::queryJob( const CORBA::Long jobId, - const Engines::MachineParameters& params) +void +SALOME_Launcher::saveJobs(const char* jobs_file) { - string status; - machineParams p; - p.hostname = params.hostname; - p.OS = params.OS; - p.nb_node = params.nb_node; - p.nb_proc_per_node = params.nb_proc_per_node; - p.cpu_clock = params.cpu_clock; - p.mem_mb = params.mem_mb; - try{ - status = _l.queryJob(jobId,p); + // Step 1: check jobs_file write access + FILE* xml_file = fopen(jobs_file, "w"); + if (xml_file == NULL) + { + std::string error = "Error opening jobs_file in SALOME_Launcher::saveJobs: " + std::string(jobs_file); + INFOS(error); + THROW_SALOME_CORBA_EXCEPTION(error.c_str(), SALOME::INTERNAL_ERROR); } - catch(const LauncherException &ex){ - INFOS(ex.msg.c_str()); - THROW_SALOME_CORBA_EXCEPTION(ex.msg.c_str(),SALOME::BAD_PARAM); + + // Step 2: First lines + xmlKeepBlanksDefault(0); + xmlDocPtr doc = xmlNewDoc(xmlCharStrdup("1.0")); + xmlNodePtr root_node = xmlNewNode(NULL, xmlCharStrdup("jobs")); + xmlDocSetRootElement(doc, root_node); + xmlNodePtr doc_comment = xmlNewDocComment(doc, xmlCharStrdup("SALOME Launcher save jobs file")); + xmlAddPrevSibling(root_node, doc_comment); + + // Step 3: For each job write it on the xml document + // We could put a mutex but are not foing to do that currently + std::map jobs_list = _l.getJobs(); + std::map::const_iterator it_job; + for(it_job = jobs_list.begin(); it_job != jobs_list.end(); it_job++) + { + it_job->second->addToXmlDocument(root_node); + } + + // Final step: write file + int isOk = xmlSaveFormatFile(jobs_file, doc, 1); + if (!isOk) + { + std::string error = "Error during xml file saving in SALOME_Launcher::saveJobs: " + std::string(jobs_file); + INFOS(error); + xmlFreeDoc(doc); + fclose(xml_file); + THROW_SALOME_CORBA_EXCEPTION(error.c_str(), SALOME::INTERNAL_ERROR); } - return CORBA::string_dup(status.c_str()); + + // Clean + xmlFreeDoc(doc); + fclose(xml_file); + MESSAGE("SALOME_Launcher::saveJobs : WRITING DONE!"); + notifyObservers("SAVE_JOBS", jobs_file); } //============================================================================= /*! CORBA Method: - * Delete a batch job on a cluster - * \param jobId : identification of Salome job - * \param params : Constraints for the choice of the batch cluster + * Add a new observer to the launcher */ //============================================================================= -void SALOME_Launcher::deleteJob( const CORBA::Long jobId, - const Engines::MachineParameters& params) +void +SALOME_Launcher::addObserver(Engines::SalomeLauncherObserver_ptr observer) { - machineParams p; - p.hostname = params.hostname; - p.OS = params.OS; - p.nb_node = params.nb_node; - p.nb_proc_per_node = params.nb_proc_per_node; - p.cpu_clock = params.cpu_clock; - p.mem_mb = params.mem_mb; - - try{ - _l.deleteJob(jobId,p); + bool new_observer = true; + std::list::iterator iter = _observers.begin(); + while(iter != _observers.end()) + { + if (std::string(_orb->object_to_string(*iter)) == + std::string(_orb->object_to_string(observer))) + { + new_observer = false; + break; + } + iter++; } - catch(const LauncherException &ex){ - INFOS("Caught exception."); - THROW_SALOME_CORBA_EXCEPTION(ex.msg.c_str(),SALOME::BAD_PARAM); + if (new_observer) + _observers.push_back(Engines::SalomeLauncherObserver::_duplicate(observer)); + + // We notify the new observer with all jobs that are currently in the Launcher + std::map cpp_jobs = _l.getJobs(); + std::map::const_iterator it_job; + for(it_job = cpp_jobs.begin(); it_job != cpp_jobs.end(); it_job++) + { + int number = it_job->first; + std::ostringstream job_id; + job_id << number; + try + { + observer->notify("NEW_JOB", job_id.str().c_str()); + } + catch (...) + { + MESSAGE("Notify Observer, exception catch"); + } + } } //============================================================================= /*! CORBA Method: - * Get result files of job on a cluster - * \param jobId : identification of Salome job - * \param params : Constraints for the choice of the batch cluster + * Add a new observer to the launcher */ //============================================================================= -void SALOME_Launcher::getResultsJob( const char *directory, - const CORBA::Long jobId, - const Engines::MachineParameters& params) +void +SALOME_Launcher::removeObserver(Engines::SalomeLauncherObserver_ptr observer) { - machineParams p; - p.hostname = params.hostname; - p.OS = params.OS; - p.nb_node = params.nb_node; - p.nb_proc_per_node = params.nb_proc_per_node; - p.cpu_clock = params.cpu_clock; - p.mem_mb = params.mem_mb; - - try{ - _l.getResultsJob( directory, jobId, p ); - } - catch(const LauncherException &ex){ - INFOS("Caught exception."); - THROW_SALOME_CORBA_EXCEPTION(ex.msg.c_str(),SALOME::BAD_PARAM); + std::list::iterator iter = _observers.begin(); + while(iter != _observers.end()) + { + if (std::string(_orb->object_to_string(*iter)) == + std::string(_orb->object_to_string(observer))) + { + // Observer found + iter =_observers.erase(iter++); + } + else + { + iter++; + } } } +//============================================================================= +/*! Internal Method: + * Notify observers on a new event + */ +//============================================================================= +void +SALOME_Launcher::notifyObservers(const std::string & event_name, + const std::string & event_data) +{ + std::list::iterator iter = _observers.begin(); + while(iter != _observers.end()) + { + try + { + (*iter)->notify(CORBA::string_dup(event_name.c_str()), + CORBA::string_dup(event_data.c_str())); + } + catch (...) + { + MESSAGE("Notify Observer, exception catch"); + } + iter++; + } + +} diff --git a/src/Launcher/SALOME_Launcher.hxx b/src/Launcher/SALOME_Launcher.hxx index 9263d5c68..f33466fe5 100644 --- a/src/Launcher/SALOME_Launcher.hxx +++ b/src/Launcher/SALOME_Launcher.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef __SALOME_LAUNCHER_HXX__ #define __SALOME_LAUNCHER_HXX__ @@ -29,6 +30,7 @@ #include "Launcher.hxx" #include +#include class SALOME_NamingService; class SALOME_ContainerManager; @@ -41,32 +43,42 @@ class SALOMELAUNCHER_EXPORT SALOME_Launcher: public: SALOME_Launcher(CORBA::ORB_ptr orb, PortableServer::POA_var poa); - ~SALOME_Launcher(); - - CORBA::Long submitJob(const char * xmlExecuteFile, - const char * clusterName); - - CORBA::Long submitSalomeJob(const char * fileToExecute , - const Engines::FilesList& filesToExport , - const Engines::FilesList& filesToImport , - const Engines::BatchParameters& batch_params, - const Engines::MachineParameters& params); + virtual ~SALOME_Launcher(); + + // Main methods + CORBA::Long createJob (const Engines::JobParameters & job_parameters); + void launchJob (CORBA::Long job_id); + char * getJobState (CORBA::Long job_id); + void getJobResults(CORBA::Long job_id, const char * directory); + CORBA::Boolean getJobDumpState(CORBA::Long job_id, const char * directory); + void stopJob (CORBA::Long job_id); + void removeJob (CORBA::Long job_id); + + // Useful methods + CORBA::Long createJobWithFile(const char * xmlExecuteFile, const char * clusterName); + CORBA::Boolean testBatch (const Engines::ResourceParameters& params); + + // SALOME Kernel service methods + void Shutdown(); + CORBA::Long getPID(); - char* querySalomeJob( CORBA::Long jobId, const Engines::MachineParameters& params); - void deleteSalomeJob( CORBA::Long jobId, const Engines::MachineParameters& params); - void getResultSalomeJob( const char * directory, CORBA::Long jobId, const Engines::MachineParameters& params ); - char* queryJob( CORBA::Long jobId, const Engines::MachineParameters& params); - void deleteJob( CORBA::Long jobId, const Engines::MachineParameters& params); - void getResultsJob( const char * directory, CORBA::Long jobId, const Engines::MachineParameters& params ); + // Observer and introspection methods + virtual void addObserver(Engines::SalomeLauncherObserver_ptr observer); + virtual void removeObserver(Engines::SalomeLauncherObserver_ptr observer); + virtual Engines::JobsList * getJobsList(); + virtual Engines::JobParameters * getJobParameters(CORBA::Long job_id); - CORBA::Boolean testBatch(const Engines::MachineParameters& params); + // Save and load methods + virtual void loadJobs(const char* jobs_file); + virtual void saveJobs(const char* jobs_file); - void Shutdown(); - - CORBA::Long getPID(); static const char *_LauncherNameInNS; +protected: + // Internal methods + virtual void notifyObservers(const std::string & event_name, const std::string & event_data); + protected: CORBA::ORB_var _orb; PortableServer::POA_var _poa; @@ -74,6 +86,8 @@ protected: SALOME_ResourcesManager *_ResManager; SALOME_NamingService *_NS; + std::list _observers; + Launcher_cpp _l; }; diff --git a/src/Launcher/SALOME_LauncherServer.cxx b/src/Launcher/SALOME_LauncherServer.cxx index 6ba6164ea..02e10d987 100644 --- a/src/Launcher/SALOME_LauncherServer.cxx +++ b/src/Launcher/SALOME_LauncherServer.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "SALOME_Launcher.hxx" #include "utilities.h" #include @@ -26,7 +27,9 @@ #include #include -using namespace std; +void AttachDebugger(); +void terminateHandler(void); +void unexpectedHandler(void); void AttachDebugger() { @@ -60,8 +63,8 @@ int main(int argc, char* argv[]) if(getenv ("DEBUGGER")) { // setsig(SIGSEGV,&Handler); - set_terminate(&terminateHandler); - set_unexpected(&unexpectedHandler); + std::set_terminate(&terminateHandler); + std::set_unexpected(&unexpectedHandler); } /* Init libxml * To avoid memory leak, need to call xmlInitParser in the main thread diff --git a/src/Launcher/SALOME_Launcher_Handler.cxx b/src/Launcher/SALOME_Launcher_Handler.cxx index 31b4e7ce1..185e58d34 100755 --- a/src/Launcher/SALOME_Launcher_Handler.cxx +++ b/src/Launcher/SALOME_Launcher_Handler.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME ResourcesCatalog : implementation of catalog resources parsing (SALOME_ModuleCatalog.idl) // File : SALOME_Laucher_Handler.cxx // Author : Bernard Secher @@ -29,14 +30,6 @@ #include #include -using namespace std; - -#ifdef _DEBUG_ -static int MYDEBUG = 1; -#else -static int MYDEBUG = 0; -#endif - //============================================================================= /*! * Constructor @@ -108,26 +101,26 @@ void SALOME_Launcher_Handler::ProcessXmlDocument(xmlDocPtr theDoc) if ( !xmlStrcmp(aCurNode->name,(const xmlChar*)test_machine_list) ){ xmlNodePtr aCurNode2 = aCurNode->xmlChildrenNode; while(aCurNode2 != NULL){ - if ( !xmlStrcmp(aCurNode2->name,(const xmlChar*)test_machine) ){ - _machp.Clear(); - xmlChar* name = xmlNodeGetContent(aCurNode2); - string clusterName = (const char*)name; - xmlFree(name); - - if (xmlHasProp(aCurNode2, (const xmlChar*)test_env_file)){ - xmlChar* envfile = xmlGetProp(aCurNode2, (const xmlChar*)test_env_file); - _machp.EnvFile = (const char*)envfile; - xmlFree(envfile); - } - - if (xmlHasProp(aCurNode2, (const xmlChar*)test_work_directory)){ - xmlChar* workdirectory = xmlGetProp(aCurNode2, (const xmlChar*)test_work_directory); - _machp.WorkDirectory = (const char*)workdirectory; - xmlFree(workdirectory); - } - _launch.MachinesList[clusterName]=_machp ; - } - aCurNode2 = aCurNode2->next; + if ( !xmlStrcmp(aCurNode2->name,(const xmlChar*)test_machine) ){ + _machp.Clear(); + xmlChar* name = xmlNodeGetContent(aCurNode2); + std::string clusterName = (const char*)name; + xmlFree(name); + + if (xmlHasProp(aCurNode2, (const xmlChar*)test_env_file)){ + xmlChar* envfile = xmlGetProp(aCurNode2, (const xmlChar*)test_env_file); + _machp.EnvFile = (const char*)envfile; + xmlFree(envfile); + } + + if (xmlHasProp(aCurNode2, (const xmlChar*)test_work_directory)){ + xmlChar* workdirectory = xmlGetProp(aCurNode2, (const xmlChar*)test_work_directory); + _machp.WorkDirectory = (const char*)workdirectory; + xmlFree(workdirectory); + } + _launch.MachinesList[clusterName]=_machp ; + } + aCurNode2 = aCurNode2->next; } } @@ -136,31 +129,31 @@ void SALOME_Launcher_Handler::ProcessXmlDocument(xmlDocPtr theDoc) _launch.RefDirectory = (const char*)refdirectory; xmlFree(refdirectory); } - + if ( !xmlStrcmp(aCurNode->name,(const xmlChar*)test_nb_processes) ){ xmlChar* nbofprocesses = xmlNodeGetContent(aCurNode); _launch.NbOfProcesses = atoi((const char*)nbofprocesses); xmlFree(nbofprocesses); } - + if ( !xmlStrcmp(aCurNode->name,(const xmlChar*)test_input_file) ){ xmlChar* inputfile = xmlNodeGetContent(aCurNode); _launch.InputFile.push_back((const char*)inputfile); xmlFree(inputfile); } - + if ( !xmlStrcmp(aCurNode->name,(const xmlChar*)test_output_file) ){ xmlChar* outputfile = xmlNodeGetContent(aCurNode); _launch.OutputFile.push_back((const char*)outputfile); xmlFree(outputfile); } - + if ( !xmlStrcmp(aCurNode->name,(const xmlChar*)test_command) ){ xmlChar* command = xmlNodeGetContent(aCurNode); _launch.Command = (const char*)command; xmlFree(command); } - + aCurNode = aCurNode->next; } diff --git a/src/Launcher/SALOME_Launcher_Handler.hxx b/src/Launcher/SALOME_Launcher_Handler.hxx index 0e14468ec..1d508e1fd 100755 --- a/src/Launcher/SALOME_Launcher_Handler.hxx +++ b/src/Launcher/SALOME_Launcher_Handler.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME ResourcesCatalog : implementation of catalog resources parsing (SALOME_ModuleCatalog.idl) // File : SALOME_Launcher_Handler.hxx // Author : Bernard SECHER diff --git a/src/Launcher/SALOME_Launcher_Parser.cxx b/src/Launcher/SALOME_Launcher_Parser.cxx index 0636debbc..99e8764cb 100644 --- a/src/Launcher/SALOME_Launcher_Parser.cxx +++ b/src/Launcher/SALOME_Launcher_Parser.cxx @@ -1,32 +1,31 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "SALOME_Launcher_Parser.hxx" #include #include #define NULL_VALUE 0 -using namespace std; - void MachineParameters::Clear() { EnvFile = ""; @@ -35,34 +34,34 @@ void MachineParameters::Clear() void MachineParameters::Print() const { - ostringstream oss; + std::ostringstream oss; oss << " EnvFile: " << EnvFile - << " WorkDirectory: " << WorkDirectory << endl; + << " WorkDirectory: " << WorkDirectory << std::endl; - cout << oss.str(); + std::cout << oss.str(); } void ParserLauncherType::Print() const { - ostringstream oss; - oss << endl << - "RefDirectory: " << RefDirectory << endl << - "NbOfProcesses: " << NbOfProcesses << endl << + std::ostringstream oss; + oss << std::endl << + "RefDirectory: " << RefDirectory << std::endl << + "NbOfProcesses: " << NbOfProcesses << std::endl << "InputFile: "; for(int i=0; i ::const_iterator it; + std::map < std::string, MachineParameters >::const_iterator it; for(it=MachinesList.begin();it!=MachinesList.end();it++){ - cout << " " << it->first; + std::cout << " " << it->first; it->second.Print(); } diff --git a/src/Launcher/SALOME_Launcher_Parser.hxx b/src/Launcher/SALOME_Launcher_Parser.hxx index 4cecce9eb..40deb4a70 100755 --- a/src/Launcher/SALOME_Launcher_Parser.hxx +++ b/src/Launcher/SALOME_Launcher_Parser.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME ResourcesCatalog : implementation of catalog resources parsing (SALOME_ModuleCatalog.idl) // File : SALOME_Launcher_Parser.hxx // Author : Bernard Secher diff --git a/src/Launcher/SALOME_Launcher_defs.hxx b/src/Launcher/SALOME_Launcher_defs.hxx index a321beadf..859843876 100755 --- a/src/Launcher/SALOME_Launcher_defs.hxx +++ b/src/Launcher/SALOME_Launcher_defs.hxx @@ -1,29 +1,27 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef __SALOME_LAUNCHER_DEFS_HXX__ #define __SALOME_LAUNCHER_DEFS_HXX__ #ifdef WIN32 -# ifdef SALOMELAUNCHER_EXPORTS +# if defined SALOMELAUNCHER_EXPORTS || defined SalomeLauncher_EXPORTS # define SALOMELAUNCHER_EXPORT __declspec(dllexport) # else # define SALOMELAUNCHER_EXPORT __declspec(dllimport) diff --git a/src/Launcher/TestLauncher.cxx b/src/Launcher/TestLauncher.cxx new file mode 100755 index 000000000..e836d357a --- /dev/null +++ b/src/Launcher/TestLauncher.cxx @@ -0,0 +1,42 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +#include "Launcher.hxx" + +int main(int argc, char** argv) +{ + + try { + Launcher_cpp *lcpp = new Launcher_cpp(); + ResourcesManager_cpp *rcpp = new ResourcesManager_cpp(); + lcpp->SetResourcesManager(rcpp); + delete lcpp; + delete rcpp; + std::cout << "test OK" << std::endl; + } catch ( const ResourcesException &ex) { + std::cout << ex.msg.c_str() << std::endl; + } + catch ( const LauncherException &ex) { + std::cout << ex.msg.c_str() << std::endl; + } + catch (...){ + std::cout << "test KO" << std::endl; + } + exit(0); +} diff --git a/src/LifeCycleCORBA/LifeCycleCORBA.py b/src/LifeCycleCORBA/LifeCycleCORBA.py deleted file mode 100644 index 371affd1c..000000000 --- a/src/LifeCycleCORBA/LifeCycleCORBA.py +++ /dev/null @@ -1,274 +0,0 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -# -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# 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 -# -# SALOME LifeCycleC RBA : implementation of containers and engines life cycle both in Python and C++ -# File : LifeCycleCORBA.py -# Author : Paul RASCLE, EDF -# Module : SALOME -# $Header$ -# -import os -import sys -import time -import string -from omniORB import CORBA -import CosNaming -import Engines -reload(Engines) -import SALOME_ModuleCatalog - -from SALOME_utilities import * -from Utils_Identity import getShortHostName -import Utils_Identity -import Launchers - -class LifeCycleCORBA: - _orb = None - _rootcontext = None - _containerRootContext = None - _catalog = None - - #------------------------------------------------------------------------- - - def __init__(self, orb): - MESSAGE( "LifeCycleCORBA::__init__" ) - self._orb = orb - - obj = self._orb.resolve_initial_references("NameService") - self._rootContext = obj._narrow(CosNaming.NamingContext) - - if self._rootContext is None: - MESSAGE( "Name Service Reference is invalid" ) - - name = [CosNaming.NameComponent("Containers","dir")] - try: - self._containerRootContext = self._rootContext.bind_new_context(name) - - except CosNaming.NamingContext.AlreadyBound, ex: - MESSAGE( "/Containers.dir Context already exists" ) - obj = self._rootContext.resolve(name) - self._containerRootContext = obj._narrow(CosNaming.NamingContext) - if self._containerRootContext is None: - MESSAGE( "Containers.dir exists but it is not a NamingContext" ) - - name = [CosNaming.NameComponent("Kernel","dir"), - CosNaming.NameComponent("ModulCatalog","object")] - try: - obj = self._rootContext.resolve(name) - except CosNaming.NamingContext.NotFound, ex: - MESSAGE( "/Kernel.dir/ModulCatalog.object not found in Naming Service" ) - - self._catalog = obj._narrow(SALOME_ModuleCatalog.ModuleCatalog) - if self._catalog is None: - MESSAGE( "/Kernel.dir/ModulCatalog.object exists but is not a ModulCatalog" ) - - name = [CosNaming.NameComponent("ContainerManager","object")] - try: - obj = self._rootContext.resolve(name) - except CosNaming.NamingContext.NotFound, ex: - MESSAGE( "ContainerManager.object not found in Naming Service" ) - self._contManager = obj._narrow(Engines.ContainerManager) - if self._contManager is None: - MESSAGE( "ContainerManager.object exists but is not a ContainerManager") - - #------------------------------------------------------------------------- - - def ContainerName(self, containerName): - theComputer = "" - try: - theComputer , theContainer = containerName.split('/') - except: - theComputer = "" - theContainer = containerName - - if theComputer in ("","localhost") : - theComputer = getShortHostName() - - MESSAGE( theComputer + theContainer ) - return theComputer,theContainer - - #------------------------------------------------------------------------- - - def ComputerPath(self, ComputerName ): - try: - #path = self._catalog.GetPathPrefix( ComputerName ) - path = os.getenv("KERNEL_ROOT_DIR") + "/bin/salome/" - except SALOME_ModuleCatalog.NotFound, ex: - path = "" - return path - - #------------------------------------------------------------------------- - - def FindContainer(self, containerName): - theComputer,theContainer = self.ContainerName( containerName ) - name = [CosNaming.NameComponent(theComputer,"dir"), - CosNaming.NameComponent(theContainer,"object")] - obj = None - try: - obj = self._containerRootContext.resolve(name) - MESSAGE( containerName + ".object found in Naming Service" ) - - except CosNaming.NamingContext.NotFound, ex: - MESSAGE( containerName + ".object not found in Naming Service" ) - - if obj is None: - container = None - else: - container = obj._narrow(Engines.Container) - if container is None: - MESSAGE( containerName + ".object exists but is not a Container" ) - return container - - #------------------------------------------------------------------------- - - def FindComponent(self,containerName,componentName,listOfMachines): - if containerName!="": - machinesOK=[] - for i in range(len(listOfMachines)): - currentMachine=listOfMachines[i] - componentNameForNS= [CosNaming.NameComponent(currentMachine,"dir"), - CosNaming.NameComponent(containerName,"dir"), - CosNaming.NameComponent(componentName,"object")] - obj=None - try: - obj = self._containerRootContext.resolve(componentNameForNS) - except CosNaming.NamingContext.NotFound, ex: - MESSAGE( "component " + componentName + " not found on machine " + currentMachine + " , trying to load" ) - pass - if obj is not None: - machinesOK.append(currentMachine) - pass - pass - if len(machinesOK)!=0: - bestMachine=self._contManager.FindFirst(machinesOK) - componentNameForNS= [CosNaming.NameComponent(bestMachine,"dir"), - CosNaming.NameComponent(containerName,"dir"), - CosNaming.NameComponent(componentName,"object")] - obj=None - try: - obj = self._containerRootContext.resolve(componentNameForNS) - except: - pass - if obj is not None: - return obj._narrow(Engines.Component) - else: - MESSAGE( "Big problem !!!") - return None - else: - return None - else: - bestMachine=self._contManager.FindFirst(listOfMachines) - MESSAGE("Not implemented yet ...") - return None - pass - - #------------------------------------------------------------------------- - - def setLauncher(self,name): - """Change default launcher to the launcher identified by name - - See module Launchers.py - """ - Launchers.setLauncher(name) - - #------------------------------------------------------------------------- - - def StartContainer(self, theComputer , theContainer ): - """Start a container on theComputer machine with theContainer name - """ - # Get the Naming Service address - # - addr=self._orb.object_to_string(self._rootContext) - # - # If container name contains "Py" launch a Python Container - # - if theContainer.find('Py') == -1 : - CMD=['SALOME_Container',theContainer,'-ORBInitRef','NameService='+addr] - else: - CMD=['SALOME_ContainerPy.py',theContainer,'-ORBInitRef','NameService='+addr] - if theComputer in ("","localhost"): - theComputer=getShortHostName() - # - # Get the appropriate launcher and ask to launch - # - Launchers.getLauncher(theComputer).launch(theComputer,CMD) - # - # Wait until the container is registered in Naming Service - # - count =5 - aContainer=None - while aContainer is None and count > 0: - time.sleep(1) - count = count - 1 - MESSAGE( str(count) + ". Waiting for " + theComputer + "/" + theContainer ) - aContainer = self.FindContainer( theComputer + "/" + theContainer ) - return aContainer - - #------------------------------------------------------------------------- - - def FindOrStartContainer(self, theComputer , theContainer ): - """Find or Start a container on theComputer machine with theContainer name - """ - if theComputer in ("","localhost"): - theComputer=getShortHostName() - MESSAGE( "FindOrStartContainer: " + theComputer + theContainer ) - aContainer = self.FindContainer( theComputer + "/" + theContainer ) - if aContainer is None : - aContainer= self.StartContainer(theComputer , theContainer ) - return aContainer - - #------------------------------------------------------------------------- - - def LoadComponent(self,containerName,componentName,listOfMachine): - container=self._contManager.FindOrStartContainer(containerName,listOfMachine) - implementation="lib"+componentName+"Engine.so" - try: - component = container.load_impl(componentName, implementation) - MESSAGE( "component " + component._get_instanceName() + " launched !" ) - return component - except: - MESSAGE( "component " + componentName + " NOT launched !" ) - return None - - #------------------------------------------------------------------------- - - - def FindOrLoadComponent(self, containerName, componentName): - sp=containerName.split("/") - if len(sp)==1: - listOfMachine=[] - listOfMachine.append(getShortHostName()) - comp=self.FindComponent(containerName,componentName,listOfMachine) - if comp is None: - return self.LoadComponent(containerName,componentName,listOfMachine) - else: - return comp - pass - else: - params= Engines.MachineParameters(sp[1],sp[0],"LINUX",0,0,0,0) - listOfMachine=self._contManager.GetFittingResources(params,componentName) - ret=self.FindComponent(sp[1],componentName,listOfMachine); - if ret is None: - return self.LoadComponent(sp[1],componentName,listOfMachine) - else: - return ret - pass - diff --git a/src/LifeCycleCORBA/Makefile.am b/src/LifeCycleCORBA/Makefile.am index c24e369f9..d4dc1b4b2 100644 --- a/src/LifeCycleCORBA/Makefile.am +++ b/src/LifeCycleCORBA/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # SALOME LifeCycleCORBA : implementation of containers and engines life cycle both in Python and C++ # File : Makefile.am # Author : Guillaume Boulant @@ -54,9 +55,9 @@ COMMON_CPPFLAGS=\ -I$(srcdir)/../SALOMETraceCollector \ -I$(srcdir)/../NamingService \ -I$(srcdir)/../Utils \ + -I$(srcdir)/../GenericObj \ -I$(srcdir)/../Container \ -I$(srcdir)/../ResourcesManager \ - -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ @LIBXML_INCLUDES@ @@ -68,6 +69,7 @@ COMMON_LIBS =\ ../Utils/libOpUtil.la \ ../SALOMELocalTrace/libSALOMELocalTrace.la \ ../Basics/libSALOMEBasics.la \ + ../GenericObj/libSalomeGenericObj.la \ $(top_builddir)/idl/libSalomeIDLKernel.la # diff --git a/src/LifeCycleCORBA/SALOME_FileTransferCORBA.cxx b/src/LifeCycleCORBA/SALOME_FileTransferCORBA.cxx index b2c653586..fce9c4905 100644 --- a/src/LifeCycleCORBA/SALOME_FileTransferCORBA.cxx +++ b/src/LifeCycleCORBA/SALOME_FileTransferCORBA.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOME_FileTransferCORBA.cxx // Author : Paul RASCLE, EDF // Module : SALOME @@ -28,8 +29,12 @@ #include "SALOME_LifeCycleCORBA.hxx" #include "utilities.h" #include "Basics_Utils.hxx" +#include + +/*! \class SALOME_FileTransferCORBA + \brief A class to manage file transfer in SALOME (CORBA context) -using namespace std; +*/ //============================================================================= /*! @@ -43,35 +48,35 @@ SALOME_FileTransferCORBA::SALOME_FileTransferCORBA() } //============================================================================= -/*! - * Constructor to use when we get a fileRef CORBA object from a component. +/*! \brief Constructor to use when we get a fileRef CORBA object from a component + * * \param aFileRef file reference CORBA object */ //============================================================================= SALOME_FileTransferCORBA::SALOME_FileTransferCORBA(Engines::fileRef_ptr - aFileRef) + aFileRef) { MESSAGE("SALOME_FileTransferCORBA::SALOME_FileTransferCORBA(aFileRef)"); _theFileRef = aFileRef; } //============================================================================= -/*! - * Constructor to use when we have the file name and machine from which to - * copy, plus an optional Container name on the machine. +/*! \brief Constructor to use when we have the file name and machine from which to + * copy, plus an optional Container name on the machine. + * * \param refMachine the machine on which is the file to transfer * \param origFileName abolute file path on refMachine * \param containerName default container name used (FactoryServer) if empty */ //============================================================================= -SALOME_FileTransferCORBA::SALOME_FileTransferCORBA(string refMachine, - string origFileName, - string containerName) +SALOME_FileTransferCORBA::SALOME_FileTransferCORBA(std::string refMachine, + std::string origFileName, + std::string containerName) { MESSAGE("SALOME_FileTransferCORBA::SALOME_FileTransferCORBA" - << refMachine << " " << origFileName << " " << containerName); + << refMachine << " " << origFileName << " " << containerName); _refMachine = refMachine; _origFileName = origFileName; _containerName = containerName; @@ -93,15 +98,16 @@ SALOME_FileTransferCORBA::~SALOME_FileTransferCORBA() } //============================================================================= -/*! - * CORBA method: get a local copy of the reference file. +/*! \brief Get a local copy of the reference file + * + * CORBA method * \param localFile optional absolute path to store the copy * \return the file name (absolute path) of the copy, may be different from * localFile parameter if the copy was already done before the call */ //============================================================================= -string SALOME_FileTransferCORBA::getLocalFile(string localFile) +std::string SALOME_FileTransferCORBA::getLocalFile(std::string localFile) { MESSAGE("SALOME_FileTransferCORBA::getLocalFile " << localFile); @@ -110,10 +116,10 @@ string SALOME_FileTransferCORBA::getLocalFile(string localFile) if (CORBA::is_nil(_theFileRef)) { if (_refMachine.empty() || _origFileName.empty()) - { - INFOS("not enough parameters: machine and file name must be given"); - return ""; - } + { + INFOS("not enough parameters: machine and file name must be given"); + return ""; + } SALOME_LifeCycleCORBA LCC; Engines::ContainerManager_var contManager = LCC.getContainerManager(); @@ -124,85 +130,83 @@ string SALOME_FileTransferCORBA::getLocalFile(string localFile) params.container_name = _containerName.c_str(); params.hostname = _refMachine.c_str(); - Engines::CompoList clist; - Engines::MachineList_var listOfMachines = - resManager->GetFittingResources(params, clist); - - container = contManager->FindOrStartContainer(params, - listOfMachines); + Engines::ContainerParameters new_params; + LCC.convert(params, new_params); + new_params.mode = CORBA::string_dup("findorstart"); + container = contManager->GiveContainer(new_params); if (CORBA::is_nil(container)) - { - INFOS("machine " << _refMachine << " unreachable"); - return ""; - } + { + INFOS("machine " << _refMachine << " unreachable"); + return ""; + } _theFileRef = container->createFileRef(_origFileName.c_str()); if (CORBA::is_nil(_theFileRef)) - { - INFOS("imposssible to create fileRef on " << _refMachine); - return ""; - } + { + INFOS("impossible to create fileRef on " << _refMachine); + return ""; + } } container = _theFileRef->getContainer(); ASSERT(! CORBA::is_nil(container)); - string myMachine = Kernel_Utils::GetHostname(); - string localCopy = _theFileRef->getRef(myMachine.c_str()); + std::string myMachine = Kernel_Utils::GetHostname(); + std::string localCopy = _theFileRef->getRef(myMachine.c_str()); if (localCopy.empty()) // no existing copy available { if (localFile.empty()) // no name provided for local copy - { - char bufName[256]; - localCopy = tmpnam(bufName); - localFile = bufName; - SCRUTE(localFile); - } + { + char bufName[256]; + localCopy = tmpnam(bufName); + localFile = bufName; + SCRUTE(localFile); + } FILE* fp; if ((fp = fopen(localFile.c_str(),"wb")) == NULL) - { - INFOS("file " << localFile << " cannot be open for writing"); - return ""; - } + { + INFOS("file " << localFile << " cannot be open for writing"); + return ""; + } Engines::fileTransfer_var fileTransfer = container->getFileTransfer(); ASSERT(! CORBA::is_nil(fileTransfer)); CORBA::Long fileId = fileTransfer->open(_origFileName.c_str()); if (fileId > 0) - { - Engines::fileBlock* aBlock; - int toFollow = 1; - int ctr=0; - while (toFollow) - { - ctr++; - SCRUTE(ctr); - aBlock = fileTransfer->getBlock(fileId); - toFollow = aBlock->length(); - SCRUTE(toFollow); - CORBA::Octet *buf = aBlock->get_buffer(); + { + Engines::fileBlock* aBlock; + int toFollow = 1; + int ctr=0; + while (toFollow) + { + ctr++; + SCRUTE(ctr); + aBlock = fileTransfer->getBlock(fileId); + toFollow = aBlock->length(); + SCRUTE(toFollow); + CORBA::Octet *buf = aBlock->get_buffer(); #if defined(_DEBUG_) || defined(_DEBUG) - int nbWri = fwrite(buf, sizeof(CORBA::Octet), toFollow, fp); - ASSERT(nbWri == toFollow); + int nbWri = fwrite(buf, sizeof(CORBA::Octet), toFollow, fp); + ASSERT(nbWri == toFollow); #else - fwrite(buf, sizeof(CORBA::Octet), toFollow, fp); + fwrite(buf, sizeof(CORBA::Octet), toFollow, fp); #endif delete aBlock; - } - fclose(fp); - MESSAGE("end of transfer"); - fileTransfer->close(fileId); - _theFileRef->addRef(myMachine.c_str(), localFile.c_str()); - localCopy = localFile; - } + } + fclose(fp); + MESSAGE("end of transfer"); + fileTransfer->close(fileId); + _theFileRef->addRef(myMachine.c_str(), localFile.c_str()); + localCopy = localFile; + } else - { - INFOS("open reference file for copy impossible"); - return ""; - } + { + INFOS("open reference file for copy impossible"); + return ""; + } } SCRUTE(localCopy); diff --git a/src/LifeCycleCORBA/SALOME_FileTransferCORBA.hxx b/src/LifeCycleCORBA/SALOME_FileTransferCORBA.hxx index 522ca0faa..1511de0c8 100644 --- a/src/LifeCycleCORBA/SALOME_FileTransferCORBA.hxx +++ b/src/LifeCycleCORBA/SALOME_FileTransferCORBA.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOME_FileTransferCORBA.hxx // Author : Paul RASCLE, EDF // Module : SALOME @@ -34,9 +35,10 @@ #include CORBA_CLIENT_HEADER(SALOME_Component) #include +#include #ifdef WIN32 -# if defined LIFECYCLECORBA_EXPORTS +# if defined LIFECYCLECORBA_EXPORTS || defined SalomeLifeCycleCORBA_EXPORTS # define LIFECYCLECORBA_EXPORT __declspec( dllexport ) # else # define LIFECYCLECORBA_EXPORT __declspec( dllimport ) @@ -51,8 +53,8 @@ public: SALOME_FileTransferCORBA(); SALOME_FileTransferCORBA(Engines::fileRef_ptr aFileRef); SALOME_FileTransferCORBA(std::string refMachine, - std::string origFileName, - std::string containerName=""); + std::string origFileName, + std::string containerName=""); virtual ~SALOME_FileTransferCORBA(); diff --git a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx index e6e5936e7..2afca3b7f 100644 --- a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx +++ b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx @@ -1,30 +1,30 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME LifeCycleCORBA : implementation of containers and engines life cycle both in Python and C++ // File : SALOME_LifeCycleCORBA.cxx // Author : Paul RASCLE, EDF // Module : SALOME -// $Header$ -// + #include #include #include @@ -33,6 +33,7 @@ #include #ifndef WIN32 #include + #include #endif #include "Basics_Utils.hxx" @@ -51,8 +52,7 @@ #include "SALOME_ContainerManager.hxx" #include "SALOME_Component_i.hxx" #include "SALOME_NamingService.hxx" - -using namespace std; +#include "SALOME_FileTransferCORBA.hxx" IncompatibleComponent::IncompatibleComponent( void ): SALOME_Exception( "IncompatibleComponent" ) @@ -64,6 +64,11 @@ IncompatibleComponent::IncompatibleComponent(const IncompatibleComponent &ex): { } +/*! \class SALOME_LifeCycleCORBA + \brief A class to manage life cycle of SALOME components. + +*/ + //============================================================================= /*! * Constructor @@ -79,9 +84,11 @@ SALOME_LifeCycleCORBA::SALOME_LifeCycleCORBA(SALOME_NamingService *ns) char **argv = &xargv; CORBA::ORB_var orb = CORBA::ORB_init(argc, argv); // LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb); + _NSnew=0; if (!ns) { _NS = new SALOME_NamingService(orb); + _NSnew=_NS; } else _NS = ns; //add try catch @@ -109,43 +116,51 @@ SALOME_LifeCycleCORBA::SALOME_LifeCycleCORBA(SALOME_NamingService *ns) SALOME_LifeCycleCORBA::~SALOME_LifeCycleCORBA() { + if(_NSnew)delete _NSnew; } //============================================================================= -/*! Public - - * Find and aready existing and registered component instance. +/*! \brief Find an already existing and registered component instance. + * * \param params machine parameters like type or name... * \param componentName the name of component class * \param studyId default = 0 : multistudy instance * \return a CORBA reference of the component instance, or _nil if not found */ //============================================================================= - -Engines::Component_ptr +Engines::EngineComponent_ptr SALOME_LifeCycleCORBA::FindComponent(const Engines::MachineParameters& params, - const char *componentName, - int studyId) + const char *componentName, + int studyId) { if (! isKnownComponentClass(componentName)) - return Engines::Component::_nil(); + return Engines::EngineComponent::_nil(); - Engines::CompoList clist; - clist.length(1); - clist[0] = componentName; - Engines::MachineList_var listOfMachines = - _ResManager->GetFittingResources(params, clist); + Engines::ContainerParameters new_params; + convert(params, new_params); + new_params.resource_params.componentList.length(1); + new_params.resource_params.componentList[0] = componentName; + Engines::ResourceList_var listOfResources; + try + { + listOfResources = _ResManager->GetFittingResources(new_params.resource_params); + } + catch( const SALOME::SALOME_Exception& ex ) + { + return Engines::EngineComponent::_nil(); + } - Engines::Component_var compo = _FindComponent(params, - componentName, - studyId, - listOfMachines); + Engines::EngineComponent_var compo = _FindComponent(new_params, + componentName, + studyId, + listOfResources); return compo._retn(); } //============================================================================= -/*! Public - - * Load a component instance on a container defined by machine parameters +/*! \brief Load a component instance on a container defined by machine parameters + * * \param params machine parameters like type or name... * \param componentName the name of component class * \param studyId default = 0 : multistudy instance @@ -153,34 +168,43 @@ SALOME_LifeCycleCORBA::FindComponent(const Engines::MachineParameters& params, */ //============================================================================= -Engines::Component_ptr +Engines::EngineComponent_ptr SALOME_LifeCycleCORBA::LoadComponent(const Engines::MachineParameters& params, - const char *componentName, - int studyId) + const char *componentName, + int studyId) { // --- Check if Component Name is known in ModuleCatalog if (! isKnownComponentClass(componentName)) - return Engines::Component::_nil(); + return Engines::EngineComponent::_nil(); - Engines::CompoList clist; - clist.length(1); - clist[0] = componentName; - Engines::MachineList_var listOfMachines = - _ResManager->GetFittingResources(params, clist); + Engines::ContainerParameters new_params; + convert(params, new_params); + new_params.resource_params.componentList.length(1); + new_params.resource_params.componentList[0] = componentName; - Engines::Component_var compo = _LoadComponent(params, - componentName, - studyId, - listOfMachines); + Engines::ResourceList_var listOfResources; + try + { + listOfResources = _ResManager->GetFittingResources(new_params.resource_params); + } + catch( const SALOME::SALOME_Exception& ex ) + { + return Engines::EngineComponent::_nil(); + } + new_params.resource_params.resList = listOfResources; + + Engines::EngineComponent_var compo = _LoadComponent(new_params, + componentName, + studyId); return compo._retn(); } //============================================================================= -/*! Public - - * Find and aready existing and registered component instance or load a new - * component instance on a container defined by machine parameters. +/*! \brief Find an already existing and registered component instance or load a new + * component instance on a container defined by machine parameters. + * * \param params machine parameters like type or name... * \param componentName the name of component class * \param studyId default = 0 : multistudy instance @@ -188,41 +212,100 @@ SALOME_LifeCycleCORBA::LoadComponent(const Engines::MachineParameters& params, */ //============================================================================= -Engines::Component_ptr +Engines::EngineComponent_ptr SALOME_LifeCycleCORBA:: FindOrLoad_Component(const Engines::MachineParameters& params, - const char *componentName, - int studyId) + const char *componentName, + int studyId) +{ + // --- Check if Component Name is known in ModuleCatalog + + if (! isKnownComponentClass(componentName)) + return Engines::EngineComponent::_nil(); + + Engines::ContainerParameters new_params; + convert(params, new_params); + new_params.resource_params.componentList.length(1); + new_params.resource_params.componentList[0] = componentName; + + // For Compatibility -> if hostname == localhost put name == hostname + if (std::string(new_params.resource_params.hostname.in()) == "localhost") + { + new_params.resource_params.hostname = CORBA::string_dup(Kernel_Utils::GetHostname().c_str()); + new_params.resource_params.name = CORBA::string_dup(Kernel_Utils::GetHostname().c_str()); + } + + Engines::ResourceList_var listOfResources; + try + { + listOfResources = _ResManager->GetFittingResources(new_params.resource_params); + } + catch( const SALOME::SALOME_Exception& ex ) + { + return Engines::EngineComponent::_nil(); + } + + Engines::EngineComponent_var compo = _FindComponent(new_params, + componentName, + studyId, + listOfResources); + + if(CORBA::is_nil(compo)) + { + new_params.resource_params.resList = listOfResources; + compo = _LoadComponent(new_params, + componentName, + studyId); + } + + return compo._retn(); +} + +Engines::EngineComponent_ptr +SALOME_LifeCycleCORBA:: +FindOrLoad_Component(const Engines::ContainerParameters& params, + const char *componentName, + int studyId) { // --- Check if Component Name is known in ModuleCatalog if (! isKnownComponentClass(componentName)) - return Engines::Component::_nil(); + return Engines::EngineComponent::_nil(); + + Engines::ContainerParameters new_params(params); + new_params.resource_params.componentList.length(1); + new_params.resource_params.componentList[0] = componentName; - Engines::CompoList clist; - clist.length(1); - clist[0] = componentName; - Engines::MachineList_var listOfMachines = - _ResManager->GetFittingResources(params,clist); + Engines::ResourceList_var listOfResources; + try + { + listOfResources = _ResManager->GetFittingResources(new_params.resource_params); + } + catch( const SALOME::SALOME_Exception& ex ) + { + return Engines::EngineComponent::_nil(); + } - Engines::Component_var compo = _FindComponent(params, - componentName, - studyId, - listOfMachines); + Engines::EngineComponent_var compo = _FindComponent(new_params, + componentName, + studyId, + listOfResources); if(CORBA::is_nil(compo)) - compo = _LoadComponent(params, - componentName, - studyId, - listOfMachines); + { + new_params.resource_params.resList = listOfResources; + compo = _LoadComponent(new_params, + componentName, + studyId); + } return compo._retn(); } //============================================================================= -/*! Public - - * Find and aready existing and registered component instance or load a new - * component instance on a container defined by name +/*! \brief Find an already existing and registered component instance or load a new + * component instance on a container defined by name + * * \param containerName the name of container, under one of the forms * - 1 aContainer (local container) * - 2 machine/aContainer (container on hostname = machine) @@ -231,69 +314,44 @@ FindOrLoad_Component(const Engines::MachineParameters& params, */ //============================================================================= -Engines::Component_ptr +Engines::EngineComponent_ptr SALOME_LifeCycleCORBA::FindOrLoad_Component(const char *containerName, - const char *componentName) + const char *componentName) { - char *valenv=getenv("SALOME_BATCH"); - if(valenv) - if (strcmp(valenv,"1")==0) - { - MESSAGE("SALOME_LifeCycleCORBA::FindOrLoad_Component BATCH " << containerName << " " << componentName ) ; - _NS->Change_Directory("/Containers"); - CORBA::Object_ptr obj=_NS->Resolve(containerName); - Engines::Container_var cont=Engines::Container::_narrow(obj); - bool isLoadable = cont->load_component_Library(componentName); - if (!isLoadable) return Engines::Component::_nil(); - - Engines::Component_ptr myInstance = - cont->create_component_instance(componentName, 0); - return myInstance; - } MESSAGE("SALOME_LifeCycleCORBA::FindOrLoad_Component INTERACTIF " << containerName << " " << componentName ) ; - //#if 0 - // --- Check if Component Name is known in ModuleCatalog + // --- Check if Component Name is known in ModuleCatalog if (! isKnownComponentClass(componentName)) - return Engines::Component::_nil(); + return Engines::EngineComponent::_nil(); // --- Check if containerName contains machine name (if yes: rg>0) - char *stContainer=strdup(containerName); - string st2Container(stContainer); + std::string st2Container(stContainer); int rg=st2Container.find("/"); Engines::MachineParameters_var params=new Engines::MachineParameters; preSet(params); if (rg<0) - { - // containerName doesn't contain "/" => Local container - params->container_name=CORBA::string_dup(stContainer); - params->hostname=CORBA::string_dup(Kernel_Utils::GetHostname().c_str()); - } + { + // containerName doesn't contain "/" => Local container + params->container_name=CORBA::string_dup(stContainer); + params->hostname=""; + } else - { - stContainer[rg]='\0'; - params->container_name=CORBA::string_dup(stContainer+rg+1); - params->hostname=CORBA::string_dup(stContainer); - } + { + stContainer[rg]='\0'; + params->container_name=CORBA::string_dup(stContainer+rg+1); + params->hostname=CORBA::string_dup(stContainer); + } params->isMPI = false; SCRUTE(params->container_name); -// SCRUTE(params->hostname); -// SCRUTE(params->OS); -// SCRUTE(params->mem_mb); -// SCRUTE(params->cpu_clock); -// SCRUTE(params->nb_proc_per_node); -// SCRUTE(params->nb_node); -// SCRUTE(params->isMPI); free(stContainer); - return FindOrLoad_Component(params,componentName); - //#endif + return FindOrLoad_Component(params, componentName); } //============================================================================= -/*! Public - - * Check if the component class is known in module catalog +/*! \brief Check if the component class is known in module catalog + * * \param componentName the name of component class * \return true if found, false otherwise */ @@ -301,42 +359,40 @@ SALOME_LifeCycleCORBA::FindOrLoad_Component(const char *containerName, bool SALOME_LifeCycleCORBA::isKnownComponentClass(const char *componentName) { - try + { + CORBA::Object_var obj = _NS->Resolve("/Kernel/ModulCatalog"); + SALOME_ModuleCatalog::ModuleCatalog_var Catalog = + SALOME_ModuleCatalog::ModuleCatalog::_narrow(obj) ; + ASSERT(! CORBA::is_nil(Catalog)); + SALOME_ModuleCatalog::Acomponent_var compoInfo = + Catalog->GetComponent(componentName); + if (CORBA::is_nil (compoInfo)) { - CORBA::Object_var obj = _NS->Resolve("/Kernel/ModulCatalog"); - SALOME_ModuleCatalog::ModuleCatalog_var Catalog = - SALOME_ModuleCatalog::ModuleCatalog::_narrow(obj) ; - ASSERT(! CORBA::is_nil(Catalog)); - SALOME_ModuleCatalog::Acomponent_var compoInfo = - Catalog->GetComponent(componentName); - if (CORBA::is_nil (compoInfo)) - { - INFOS("Catalog Error: Component not found in the catalog" ); - INFOS( componentName ); - return false; - } - else return true; + MESSAGE("Catalog Error: Component not found in the catalog " << componentName); + return false; } + else return true; + } catch (ServiceUnreachable&) - { - INFOS("Caught exception: Naming Service Unreachable"); - } + { + INFOS("Caught exception: Naming Service Unreachable"); + } catch (...) - { - INFOS("Caught unknown exception."); - } + { + INFOS("Caught unknown exception."); + } return false; } //============================================================================= -/*! Public - +/*! * Not so complex... useful ? */ //============================================================================= bool -SALOME_LifeCycleCORBA::isMpiContainer(const Engines::MachineParameters& params) +SALOME_LifeCycleCORBA::isMpiContainer(const Engines::ContainerParameters& params) throw(IncompatibleComponent) { if( params.isMPI ) @@ -347,12 +403,12 @@ SALOME_LifeCycleCORBA::isMpiContainer(const Engines::MachineParameters& params) //============================================================================= -/*! Public - - * Pre initialisation of a given Engines::MachineParameters with default - * values. +/*! \brief Initialisation of a given Engines::MachineParameters with default values. + * * - container_name = "" : not relevant * - hostname = "" : not relevant * - OS = "" : not relevant + * - nb_proc = 0 : not relevant * - mem_mb = 0 : not relevant * - cpu_clock = 0 : not relevant * - nb_proc_per_node = 0 : not relevant @@ -361,7 +417,7 @@ SALOME_LifeCycleCORBA::isMpiContainer(const Engines::MachineParameters& params) */ //============================================================================= -void SALOME_LifeCycleCORBA::preSet( Engines::MachineParameters& params) +void SALOME_LifeCycleCORBA::preSet(Engines::MachineParameters& params) { params.container_name = ""; params.hostname = ""; @@ -371,33 +427,85 @@ void SALOME_LifeCycleCORBA::preSet( Engines::MachineParameters& params) params.nb_proc_per_node = 0; params.nb_node = 0; params.isMPI = false; - + params.workingdir = ""; + params.mode = ""; + params.policy = ""; params.parallelLib = ""; params.nb_component_nodes = 0; } +void +SALOME_LifeCycleCORBA::preSet(Engines::ResourceParameters& params) +{ + params.name = ""; + params.hostname = ""; + params.OS = ""; + params.nb_proc = 0; + params.mem_mb = 0; + params.cpu_clock = 0; + params.nb_node = 0; + params.nb_proc_per_node = 0; + params.policy = ""; +} + +void SALOME_LifeCycleCORBA::preSet( Engines::ContainerParameters& params) +{ + params.container_name = ""; + params.mode = ""; + params.workingdir = ""; + params.nb_proc = 0; + params.isMPI = false; + params.parallelLib = ""; + SALOME_LifeCycleCORBA::preSet(params.resource_params); +} + +void +SALOME_LifeCycleCORBA::convert(const Engines::MachineParameters& params_in, + Engines::ContainerParameters& params_out) +{ + SALOME_LifeCycleCORBA::preSet(params_out); + + // Container part + params_out.container_name = params_in.container_name; + params_out.mode = params_in.mode; + params_out.workingdir = params_in.workingdir; + params_out.isMPI = params_in.isMPI; + params_out.parallelLib = params_in.parallelLib; + + // Resource part + params_out.resource_params.hostname = params_in.hostname; + params_out.resource_params.OS = params_in.OS; + params_out.resource_params.mem_mb = params_in.mem_mb; + params_out.resource_params.cpu_clock = params_in.cpu_clock; + params_out.resource_params.nb_node = params_in.nb_node; + params_out.resource_params.nb_proc_per_node = params_in.nb_proc_per_node; + params_out.resource_params.policy = params_in.policy; + params_out.resource_params.componentList = params_in.componentList; + + params_out.resource_params.resList.length(params_in.computerList.length()); + for (CORBA::ULong i = 0; i < params_in.computerList.length(); i++) + params_out.resource_params.resList[i] = params_in.computerList[i]; +} + //============================================================================= -/*! Public - +/*! * \return a number of processors not 0, only for MPI containers */ //============================================================================= -int SALOME_LifeCycleCORBA::NbProc(const Engines::MachineParameters& params) +int SALOME_LifeCycleCORBA::NbProc(const Engines::ContainerParameters& params) { if( !isMpiContainer(params) ) return 0; - else if( (params.nb_node <= 0) && (params.nb_proc_per_node <= 0) ) + else if( params.nb_proc <= 0 ) return 1; - else if( params.nb_node == 0 ) - return params.nb_proc_per_node; - else if( params.nb_proc_per_node == 0 ) - return params.nb_node; else - return params.nb_node * params.nb_proc_per_node; + return params.nb_proc; } //============================================================================= -/*! Public - +/*! \brief Get the container manager + * * \return the container Manager */ //============================================================================= @@ -410,7 +518,8 @@ Engines::ContainerManager_ptr SALOME_LifeCycleCORBA::getContainerManager() } //============================================================================= -/*! Public - +/*! \brief Get the resources manager + * * \return the container Manager */ //============================================================================= @@ -423,8 +532,7 @@ Engines::ResourcesManager_ptr SALOME_LifeCycleCORBA::getResourcesManager() } //============================================================================= -/*! Public - - * shutdown all the SALOME servers except SALOME_Session_Server, omniNames and notifd +/*! \brief shutdown all the SALOME servers except SALOME_Session_Server, omniNames and notifd */ //============================================================================= @@ -437,48 +545,118 @@ void SALOME_LifeCycleCORBA::shutdownServers() CORBA::Long pid = 0; CORBA::Object_var objS = _NS->Resolve("/Kernel/Session"); if (!CORBA::is_nil(objS)) + { + session = SALOME::Session::_narrow(objS); + if (!CORBA::is_nil(session)) { - session = SALOME::Session::_narrow(objS); - if (!CORBA::is_nil(session)) - { - pid = session->getPID(); - session->ping(); - } + pid = session->getPID(); } + } - string hostname = Kernel_Utils::GetHostname(); - - // 1) SalomeLauncher - CORBA::Object_var objSL = _NS->Resolve("/SalomeLauncher"); - Engines::SalomeLauncher_var launcher = Engines::SalomeLauncher::_narrow(objSL); - if (!CORBA::is_nil(launcher) && (pid != launcher->getPID())) - launcher->Shutdown(); - - // 2) ConnectionManager - CORBA::Object_var objCnM=_NS->Resolve("/ConnectionManager"); - Engines::ConnectionManager_var connMan=Engines::ConnectionManager::_narrow(objCnM); - if ( !CORBA::is_nil(connMan) && ( pid != connMan->getPID() ) ) - connMan->ShutdownWithExit(); - - // 3) SALOMEDS - CORBA::Object_var objSDS = _NS->Resolve("/myStudyManager"); - SALOMEDS::StudyManager_var studyManager = SALOMEDS::StudyManager::_narrow(objSDS) ; - if ( !CORBA::is_nil(studyManager) && ( pid != studyManager->getPID() ) ) - studyManager->Shutdown(); + std::string hostname = Kernel_Utils::GetHostname(); - // 4) ModuleCatalog - CORBA::Object_var objMC=_NS->Resolve("/Kernel/ModulCatalog"); - SALOME_ModuleCatalog::ModuleCatalog_var catalog = SALOME_ModuleCatalog::ModuleCatalog::_narrow(objMC); - if ( !CORBA::is_nil(catalog) && ( pid != catalog->getPID() ) ) - catalog->shutdown(); + // 1) ConnectionManager + try + { + CORBA::Object_var objCnM=_NS->Resolve("/ConnectionManager"); + Engines::ConnectionManager_var connMan=Engines::ConnectionManager::_narrow(objCnM); + if ( !CORBA::is_nil(connMan) && ( pid != connMan->getPID() ) ) + connMan->ShutdownWithExit(); + } + catch(const CORBA::Exception& e) + { + // ignore and continue + } + + timespec ts_req; + ts_req.tv_nsec=100000000; + ts_req.tv_sec=0; + +//Wait some time so that ConnectionManager be completely shutdown +#ifndef WIN32 + nanosleep(&ts_req,0); +#endif + + // 2) SALOMEDS + try + { + CORBA::Object_var objSDS = _NS->Resolve("/myStudyManager"); + SALOMEDS::StudyManager_var studyManager = SALOMEDS::StudyManager::_narrow(objSDS) ; + if ( !CORBA::is_nil(studyManager) && ( pid != studyManager->getPID() ) ) + studyManager->Shutdown(); + } + catch(const CORBA::Exception& e) + { + // ignore and continue + } + +//Wait some time so that study be completely shutdown +#ifndef WIN32 + nanosleep(&ts_req,0); +#endif + + // 3) ModuleCatalog + try + { + CORBA::Object_var objMC=_NS->Resolve("/Kernel/ModulCatalog"); + SALOME_ModuleCatalog::ModuleCatalog_var catalog = SALOME_ModuleCatalog::ModuleCatalog::_narrow(objMC); + if ( !CORBA::is_nil(catalog) && ( pid != catalog->getPID() ) ) + catalog->shutdown(); + } + catch(const CORBA::Exception& e) + { + // ignore and continue + } + +//Wait some time so that ModulCatalog be completely shutdown +#ifndef WIN32 + nanosleep(&ts_req,0); +#endif + + // 4) SalomeLauncher + try + { + CORBA::Object_var objSL = _NS->Resolve("/SalomeLauncher"); + Engines::SalomeLauncher_var launcher = Engines::SalomeLauncher::_narrow(objSL); + if (!CORBA::is_nil(launcher) && (pid != launcher->getPID())) + launcher->Shutdown(); + } + catch(const CORBA::Exception& e) + { + // ignore and continue + } +//Wait some time so that launcher be completely shutdown +#ifndef WIN32 + nanosleep(&ts_req,0); +#endif + // 5) Registry - CORBA::Object_var objR = _NS->Resolve("/Registry"); - Registry::Components_var registry = Registry::Components::_narrow(objR); - if ( !CORBA::is_nil(registry) && ( pid != registry->getPID() ) ) - registry->Shutdown(); + try + { + CORBA::Object_var objR = _NS->Resolve("/Registry"); + Registry::Components_var registry = Registry::Components::_narrow(objR); + if ( !CORBA::is_nil(registry) && ( pid != registry->getPID() ) ) + registry->Shutdown(); + } + catch(const CORBA::Exception& e) + { + // ignore and continue + } + + // 6) Session + if ( !CORBA::is_nil( session ) ) { + try + { + session->Shutdown(); + } + catch(const CORBA::Exception& e) + { + // ignore and continue + } + } - // 6) Logger + // 7) Logger int argc = 0; char *xargv = (char*)""; char **argv = &xargv; @@ -492,162 +670,176 @@ void SALOME_LifeCycleCORBA::shutdownServers() name.length(1); name[0].id = CORBA::string_dup(stdname.c_str()); try - { - if(!CORBA::is_nil(orb)) - theObj = orb->resolve_initial_references("NameService"); - if (!CORBA::is_nil(theObj)) - inc = CosNaming::NamingContext::_narrow(theObj); - } + { + if(!CORBA::is_nil(orb)) + theObj = orb->resolve_initial_references("NameService"); + if (!CORBA::is_nil(theObj)) + inc = CosNaming::NamingContext::_narrow(theObj); + } catch(...) + { + } + if(!CORBA::is_nil(inc)) + { + try { + objLog = inc->resolve(name); + SALOME_Logger::Logger_var logger = SALOME_Logger::Logger::_narrow(objLog); + if ( !CORBA::is_nil(logger) ) + logger->shutdown(); } - if(!CORBA::is_nil(inc)) { - try - { - objLog = inc->resolve(name); - SALOME_Logger::Logger_var logger = SALOME_Logger::Logger::_narrow(objLog); - if ( !CORBA::is_nil(logger) ) - logger->shutdown(); - } catch(...) - { - } + { + } } } //============================================================================= -/*! Public - - * shutdown omniNames and notifd +/*! \brief shutdown omniNames and notifd */ //============================================================================= void SALOME_LifeCycleCORBA::killOmniNames() { - string portNumber (::getenv ("NSPORT") ); + std::string portNumber (::getenv ("NSPORT") ); if ( !portNumber.empty() ) - { - string cmd ; - cmd = string( "ps -eo pid,command | grep -v grep | grep -E \"omniNames.*") - + portNumber - + string("\" | awk '{cmd=sprintf(\"kill -9 %s\",$1); system(cmd)}'" ); - MESSAGE(cmd); - try { - system ( cmd.c_str() ); - } - catch ( ... ) { - } + { +#ifdef WNT +#else + std::string cmd ; + cmd = std::string( "ps -eo pid,command | grep -v grep | grep -E \"omniNames.*") + + portNumber + + std::string("\" | awk '{cmd=sprintf(\"kill -9 %s\",$1); system(cmd)}'" ); + MESSAGE(cmd); + try { + system ( cmd.c_str() ); + } + catch ( ... ) { } +#endif + } // NPAL 18309 (Kill Notifd) if ( !portNumber.empty() ) - { - string cmd = ("from killSalomeWithPort import killNotifdAndClean; "); - cmd += string("killNotifdAndClean(") + portNumber + "); "; - cmd = string("python -c \"") + cmd +"\" >& /dev/null"; - MESSAGE(cmd); - system( cmd.c_str() ); - } + { + std::string cmd = ("from killSalomeWithPort import killNotifdAndClean; "); + cmd += std::string("killNotifdAndClean(") + portNumber + "); "; + cmd = std::string("python -c \"") + cmd +"\" > /dev/null 2> /dev/null"; + MESSAGE(cmd); + system( cmd.c_str() ); + } } //============================================================================= -/*! Protected - - * Find and aready existing and registered component instance. +/*! \brief Find an already existing and registered component instance. + * + * - build a list of machines on which an instance of the component is running, + * - find the best machine among the list + * * \param params machine parameters like type or name... * \param componentName the name of component class * \param studyId default = 0 : multistudy instance * \param listOfMachines list of machine address * \return a CORBA reference of the component instance, or _nil if not found - * - build a list of machines on which an instance of the component is running, - * - find the best machine among the list */ //============================================================================= -Engines::Component_ptr +Engines::EngineComponent_ptr SALOME_LifeCycleCORBA:: -_FindComponent(const Engines::MachineParameters& params, - const char *componentName, - int studyId, - const Engines::MachineList& listOfMachines) +_FindComponent(const Engines::ContainerParameters& params, + const char *componentName, + int studyId, + const Engines::ResourceList& listOfResources) { // --- build the list of machines on which the component is already running - const char *containerName = params.container_name; int nbproc = NbProc(params); -// MESSAGE("_FindComponent, required " << containerName << -// " " << componentName << " " << nbproc); - Engines::MachineList_var machinesOK = new Engines::MachineList; + Engines::ResourceList_var resourcesOK = new Engines::ResourceList; - unsigned int lghtOfmachinesOK = 0; - machinesOK->length(listOfMachines.length()); + unsigned int lghtOfresourcesOK = 0; + resourcesOK->length(listOfResources.length()); - for(unsigned int i=0; iResolveComponent(currentMachine, - containerName, - componentName, - nbproc); - if (!CORBA::is_nil(obj)) - machinesOK[lghtOfmachinesOK++] = CORBA::string_dup(currentMachine); - } + for(unsigned int i=0; i < listOfResources.length(); i++) + { + const char * currentResource = listOfResources[i]; + CORBA::Object_var obj = _NS->ResolveComponent(currentResource, + containerName, + componentName, + nbproc); + if (!CORBA::is_nil(obj)) + resourcesOK[lghtOfresourcesOK++] = CORBA::string_dup(currentResource); + } // --- find the best machine among the list - - if(lghtOfmachinesOK != 0) - { - machinesOK->length(lghtOfmachinesOK); - CORBA::String_var bestMachine = _ResManager->FindFirst(machinesOK); - CORBA::Object_var obj = _NS->ResolveComponent(bestMachine, - containerName, - componentName, - nbproc); - return Engines::Component::_narrow(obj); - } + if(lghtOfresourcesOK != 0) + { + resourcesOK->length(lghtOfresourcesOK); + CORBA::String_var bestResource = _ResManager->FindFirst(resourcesOK); + CORBA::Object_var obj = _NS->ResolveComponent(bestResource, + containerName, + componentName, + nbproc); + return Engines::EngineComponent::_narrow(obj); + } else - return Engines::Component::_nil(); + return Engines::EngineComponent::_nil(); } //============================================================================= -/*! Protected - - * Load a component instance. +/*! \brief Load a component instance. + * + * - Finds a container in the list of machine or start one. + * - Try to load the component library in the container, + * - then create an instance of the component. + * * \param params machine parameters like type or name... * \param componentName the name of component class * \param studyId default = 0 : multistudy instance - * \param listOfMachines list of machine address * \return a CORBA reference of the component instance, or _nil if problem - * - Finds a container in the list of machine or start one. - * - Try to load the component library in the container, - * - then create an instance of the component. */ //============================================================================= -Engines::Component_ptr +Engines::EngineComponent_ptr SALOME_LifeCycleCORBA:: -_LoadComponent(const Engines::MachineParameters& params, - const char *componentName, - int studyId, - const Engines::MachineList& listOfMachines) +_LoadComponent(const Engines::ContainerParameters& params, + const char *componentName, + int studyId) { MESSAGE("_LoadComponent, required " << params.container_name << - " " << componentName << " " << NbProc(params)); + " " << componentName << " " << NbProc(params)); - Engines::Container_var cont = - _ContManager->FindOrStartContainer(params, - listOfMachines); - if (CORBA::is_nil(cont)) return Engines::Component::_nil(); + Engines::ContainerParameters local_params(params); + local_params.mode = CORBA::string_dup("findorstart"); + Engines::Container_var cont = _ContManager->GiveContainer(local_params); + if (CORBA::is_nil(cont)) return Engines::EngineComponent::_nil(); - bool isLoadable = cont->load_component_Library(componentName); - if (!isLoadable) return Engines::Component::_nil(); + char* reason; + bool isLoadable = cont->load_component_Library(componentName,reason); + if (!isLoadable) + { + //std::cerr << reason << std::endl; + CORBA::string_free(reason); + return Engines::EngineComponent::_nil(); + } + CORBA::string_free(reason); - Engines::Component_var myInstance = + Engines::EngineComponent_var myInstance = cont->create_component_instance(componentName, studyId); return myInstance._retn(); } -Engines::Component_ptr -SALOME_LifeCycleCORBA::Load_ParallelComponent(const Engines::MachineParameters& params, +//============================================================================= +/*! \brief Load a parallel component instance. + * + * \param params machine parameters like type or name... + * \param componentName the name of component class + * \param studyId default = 0 : multistudy instance + * \return a CORBA reference of the parallel component instance, or _nil if problem + */ +//============================================================================= +Engines::EngineComponent_ptr +SALOME_LifeCycleCORBA::Load_ParallelComponent(const Engines::ContainerParameters& params, const char *componentName, int studyId) { @@ -658,38 +850,84 @@ SALOME_LifeCycleCORBA::Load_ParallelComponent(const Engines::MachineParameters& MESSAGE("Number of component nodes : " << params.nb_component_nodes); MESSAGE("Component Name : " << componentName);*/ - Engines::CompoList clist; - clist.length(1); - clist[0] = componentName; - MESSAGE("Building a list of machines"); - Engines::MachineList_var listOfMachines = _ResManager->GetFittingResources(params, clist); - if (listOfMachines->length() == 0) - { - INFOS("No matching machines founded !"); - return Engines::Component::_nil(); - } + Engines::ContainerParameters parms(params); + parms.resource_params.componentList.length(1); + parms.resource_params.componentList[0] = componentName; + parms.mode = CORBA::string_dup("findorstart"); MESSAGE("Starting Parallel Container"); - Engines::Container_var cont = _ContManager->FindOrStartParallelContainer(params, listOfMachines); + Engines::Container_var cont = _ContManager->GiveContainer(parms); if (CORBA::is_nil(cont)) { INFOS("FindOrStartParallelContainer() returns a NULL container !"); - return Engines::Component::_nil(); + return Engines::EngineComponent::_nil(); } MESSAGE("Loading component library"); - bool isLoadable = cont->load_component_Library(componentName); + char* reason; + bool isLoadable = cont->load_component_Library(componentName,reason); if (!isLoadable) { INFOS(componentName <<" library is not loadable !"); - return Engines::Component::_nil(); + //std::cerr << reason << std::endl; + CORBA::string_free(reason); + return Engines::EngineComponent::_nil(); } + CORBA::string_free(reason); MESSAGE("Creating component instance"); // @PARALLEL@ permits to identify that the component requested // is a parallel component. - string name = string(componentName) + string("@PARALLEL@"); - Engines::Component_var myInstance = cont->create_component_instance(name.c_str(), studyId); + std::string name = std::string(componentName); + Engines::EngineComponent_var myInstance = cont->create_component_instance(name.c_str(), studyId); if (CORBA::is_nil(myInstance)) INFOS("create_component_instance returns a NULL component !"); return myInstance._retn(); } +/*! \brief copy a file from a source host to a destination host + * \param hostSrc the source host + * \param fileSrc the file to copy from the source host to the destination host + * \param hostDest the destination host + * \param fileDest the destination file + */ +void SALOME_LifeCycleCORBA::copyFile(const char* hostSrc, const char* fileSrc, const char* hostDest, const char* fileDest) +{ + if(strcmp(hostDest,"localhost") == 0) + { + //if localhost use a shortcut + SALOME_FileTransferCORBA transfer(hostSrc,fileSrc); + transfer.getLocalFile(fileDest); + return; + } + + Engines::ContainerManager_var contManager = getContainerManager(); + + Engines::ContainerParameters params; + preSet(params); + + params.resource_params.hostname = hostDest; + params.mode = CORBA::string_dup("findorstart"); + Engines::Container_var containerDest = contManager->GiveContainer(params); + + params.resource_params.hostname = hostSrc; + Engines::Container_var containerSrc = contManager->GiveContainer(params); + + containerDest->copyFile(containerSrc,fileSrc,fileDest); +} + +/*! \brief get the naming service used by the life cycle + * + * \return the naming service + */ +SALOME_NamingService * SALOME_LifeCycleCORBA::namingService() +{ + return _NS; +} + +/*! \brief get the orb used by the life cycle + * + * \return the orb + */ +CORBA::ORB_ptr SALOME_LifeCycleCORBA::orb() +{ + return _NS->orb(); +} diff --git a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.hxx b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.hxx index 3c73ad3f9..be24867f0 100644 --- a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.hxx +++ b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.hxx @@ -1,30 +1,28 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SALOME LifeCycleCORBA : implementation of containers and engines life cycle both in Python and C++ // File : SALOME_LifeCycleCORBA.hxx // Author : Paul RASCLE, EDF - MARC TAJCHMAN, CEA // Module : SALOME -// $Header$ -// + #ifndef _SALOME_LIFECYCLECORBA_HXX_ #define _SALOME_LIFECYCLECORBA_HXX_ @@ -41,7 +39,7 @@ #include #ifdef WIN32 -# if defined LIFECYCLECORBA_EXPORTS +# if defined LIFECYCLECORBA_EXPORTS || defined SalomeLifeCycleCORBA_EXPORTS # define LIFECYCLECORBA_EXPORT __declspec( dllexport ) # else # define LIFECYCLECORBA_EXPORT __declspec( dllimport ) @@ -66,46 +64,61 @@ public: SALOME_LifeCycleCORBA(SALOME_NamingService *ns = 0); virtual ~SALOME_LifeCycleCORBA(); - Engines::Component_ptr + Engines::EngineComponent_ptr FindComponent(const Engines::MachineParameters& params, - const char *componentName, - int studyId=0); + const char *componentName, + int studyId=0); - Engines::Component_ptr + Engines::EngineComponent_ptr LoadComponent(const Engines::MachineParameters& params, - const char *componentName, - int studyId=0); + const char *componentName, + int studyId=0); - Engines::Component_ptr + Engines::EngineComponent_ptr FindOrLoad_Component(const Engines::MachineParameters& params, - const char *componentName, - int studyId =0); + const char *componentName, + int studyId =0); + + // SALOME 6 - Interface + Engines::EngineComponent_ptr + FindOrLoad_Component(const Engines::ContainerParameters& params, + const char *componentName, + int studyId =0); - Engines::Component_ptr + Engines::EngineComponent_ptr FindOrLoad_Component(const char *containerName, - const char *componentName); // for compatibility + const char *componentName); // for compatibility // Parallel extension - Engines::Component_ptr - Load_ParallelComponent(const Engines::MachineParameters& params, + Engines::EngineComponent_ptr + Load_ParallelComponent(const Engines::ContainerParameters& params, const char *componentName, int studyId); bool isKnownComponentClass(const char *componentName); - bool isMpiContainer(const Engines::MachineParameters& params) + bool isMpiContainer(const Engines::ContainerParameters& params) throw(IncompatibleComponent); - int NbProc(const Engines::MachineParameters& params); + int NbProc(const Engines::ContainerParameters& params); - void preSet(Engines::MachineParameters& params); + static void preSet(Engines::MachineParameters& outparams); + static void preSet(Engines::ResourceParameters& outparams); + static void preSet(Engines::ContainerParameters& outparams); Engines::ContainerManager_ptr getContainerManager(); Engines::ResourcesManager_ptr getResourcesManager(); + SALOME_NamingService * namingService(); + CORBA::ORB_ptr orb(); + void copyFile(const char* hostSrc, const char* fileSrc, const char* hostDest, const char* fileDest); void shutdownServers(); static void killOmniNames(); + // For SALOME 5.1.x + // Will be deleted on SALOME 6 + void convert(const Engines::MachineParameters& params_in, + Engines::ContainerParameters& params_out); protected: /*! Establish if a component called "componentName" in a container called @@ -113,19 +126,19 @@ protected: * exists among the list of resources in "listOfMachines". * This method uses Naming Service to find the component. */ - Engines::Component_ptr - _FindComponent(const Engines::MachineParameters& params, - const char *componentName, - int studyId, - const Engines::MachineList& listOfMachines); - - Engines::Component_ptr - _LoadComponent(const Engines::MachineParameters& params, - const char *componentName, - int studyId, - const Engines::MachineList& listOfMachines); - + Engines::EngineComponent_ptr + _FindComponent(const Engines::ContainerParameters& params, + const char *componentName, + int studyId, + const Engines::ResourceList& listOfResources); + + Engines::EngineComponent_ptr + _LoadComponent(const Engines::ContainerParameters& params, + const char *componentName, + int studyId); + SALOME_NamingService *_NS; + SALOME_NamingService *_NSnew; Engines::ContainerManager_var _ContManager; Engines::ResourcesManager_var _ResManager; diff --git a/src/LifeCycleCORBA/Test/LifeCycleCORBATest.cxx b/src/LifeCycleCORBA/Test/LifeCycleCORBATest.cxx index 9629055e6..e359aef8c 100644 --- a/src/LifeCycleCORBA/Test/LifeCycleCORBATest.cxx +++ b/src/LifeCycleCORBA/Test/LifeCycleCORBATest.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "LifeCycleCORBATest.hxx" #include "SALOME_LifeCycleCORBA.hxx" #include "SALOME_FileTransferCORBA.hxx" @@ -31,7 +32,6 @@ #include #include -using namespace std; // --- uncomment to have some traces on standard error // (useful only when adding new tests...) @@ -67,15 +67,15 @@ LifeCycleCORBATest::setUp() // --- trace on file const char *theFileName = TRACEFILE; - string s = "file:"; + std::string s = "file:"; s += theFileName; //s="local"; //s="with_logger"; CPPUNIT_ASSERT(! setenv("SALOME_trace",s.c_str(),1)); // 1: overwrite - ofstream traceFile; - // traceFile.open(theFileName, ios::out | ios::trunc); - traceFile.open(theFileName, ios::out | ios::app); + std::ofstream traceFile; + // traceFile.open(theFileName, std::ios::out | std::ios::trunc); + traceFile.open(theFileName, std::ios::out | std::ios::app); CPPUNIT_ASSERT(traceFile); // file created empty, then closed traceFile.close(); @@ -127,8 +127,8 @@ LifeCycleCORBATest::testFindOrLoad_Component_LaunchContainer() // --- get a local container, // load an engine, check that the CORBA object is not null - string containerName = "myContainer"; - Engines::Component_var mycompo = + std::string containerName = "myContainer"; + Engines::EngineComponent_var mycompo = _LCC.FindOrLoad_Component(containerName.c_str(),"SalomeTestComponent"); CPPUNIT_ASSERT(!CORBA::is_nil(mycompo)); @@ -155,13 +155,13 @@ LifeCycleCORBATest::testFindOrLoad_Component_SameInstance() // --- get a local container, // load an engine, check that the CORBA object is not null - string containerName = "myContainer"; + std::string containerName = "myContainer"; - Engines::Component_var mycompo1 = + Engines::EngineComponent_var mycompo1 = _LCC.FindOrLoad_Component(containerName.c_str(),"SalomeTestComponent"); CPPUNIT_ASSERT(!CORBA::is_nil(mycompo1)); - Engines::Component_var mycompo2 = + Engines::EngineComponent_var mycompo2 = _LCC.FindOrLoad_Component(containerName.c_str(),"SalomeTestComponent"); CPPUNIT_ASSERT(!CORBA::is_nil(mycompo2)); @@ -177,8 +177,8 @@ LifeCycleCORBATest::testFindOrLoad_Component_SameInstance() // --- check equality of instance names - string name1 = m1->instanceName(); - string name2 = m2->instanceName(); + std::string name1 = m1->instanceName(); + std::string name2 = m2->instanceName(); CPPUNIT_ASSERT_EQUAL(name1, name2); } @@ -198,9 +198,9 @@ LifeCycleCORBATest::testFindOrLoad_Component_PythonInCppContainer() // --- get a local container, // load an engine, check that the CORBA object is not null - string containerName = "myContainer"; + std::string containerName = "myContainer"; - Engines::Component_var mycompo1 = + Engines::EngineComponent_var mycompo1 = _LCC.FindOrLoad_Component(containerName.c_str(),"SALOME_TestComponentPy"); CPPUNIT_ASSERT(!CORBA::is_nil(mycompo1)); @@ -227,13 +227,13 @@ LifeCycleCORBATest::testFindOrLoad_Component_PythonSameInstance() // --- get a local container (with a name based on local hostname), // load an engine, check that the CORBA object is not null - string containerName = "myContainer"; + std::string containerName = "myContainer"; - Engines::Component_var mycompo1 = + Engines::EngineComponent_var mycompo1 = _LCC.FindOrLoad_Component(containerName.c_str(),"SALOME_TestComponentPy"); CPPUNIT_ASSERT(!CORBA::is_nil(mycompo1)); - Engines::Component_var mycompo2 = + Engines::EngineComponent_var mycompo2 = _LCC.FindOrLoad_Component(containerName.c_str(),"SALOME_TestComponentPy"); CPPUNIT_ASSERT(!CORBA::is_nil(mycompo2)); @@ -249,8 +249,8 @@ LifeCycleCORBATest::testFindOrLoad_Component_PythonSameInstance() // --- check equality of instance names - string name1 = m1->instanceName(); - string name2 = m2->instanceName(); + std::string name1 = m1->instanceName(); + std::string name2 = m2->instanceName(); CPPUNIT_ASSERT_EQUAL(name1, name2); } @@ -271,9 +271,9 @@ LifeCycleCORBATest::testFindOrLoad_Component_UnknownInCatalog() // --- get a local container (with a name based on local hostname), // load an engine, check that the CORBA object is not null - string containerName = "myContainer"; + std::string containerName = "myContainer"; - Engines::Component_var mycompo1 = + Engines::EngineComponent_var mycompo1 = _LCC.FindOrLoad_Component(containerName.c_str(),"MyNewComponent"); CPPUNIT_ASSERT(CORBA::is_nil(mycompo1)); } @@ -295,10 +295,10 @@ LifeCycleCORBATest::testFindOrLoad_Component_LaunchContainerHostname() // --- get a local container (with a name based on local hostname), // load an engine, check that the CORBA object is not null - string containerName = Kernel_Utils::GetHostname(); + std::string containerName = Kernel_Utils::GetHostname(); containerName += "/theContainer"; DEVTRACE("containerName = " << containerName); - Engines::Component_var mycompo = + Engines::EngineComponent_var mycompo = _LCC.FindOrLoad_Component(containerName.c_str(),"SalomeTestComponent"); CPPUNIT_ASSERT(!CORBA::is_nil(mycompo)); @@ -324,16 +324,16 @@ LifeCycleCORBATest::testFindOrLoad_Component_SameContainer() // --- get a local container (with a name based on local hostname), // load an engine, check that the CORBA object is not null - string containerName = "aContainer"; + std::string containerName = "aContainer"; - Engines::Component_var mycompo1 = + Engines::EngineComponent_var mycompo1 = _LCC.FindOrLoad_Component(containerName.c_str(),"SalomeTestComponent"); CPPUNIT_ASSERT(!CORBA::is_nil(mycompo1)); containerName = Kernel_Utils::GetHostname(); containerName += "/aContainer"; DEVTRACE("containerName = " << containerName); - Engines::Component_var mycompo2 = + Engines::EngineComponent_var mycompo2 = _LCC.FindOrLoad_Component(containerName.c_str(),"SalomeTestComponent"); CPPUNIT_ASSERT(!CORBA::is_nil(mycompo2)); @@ -349,8 +349,8 @@ LifeCycleCORBATest::testFindOrLoad_Component_SameContainer() // --- check equality of instance names - string name1 = m1->instanceName(); - string name2 = m2->instanceName(); + std::string name1 = m1->instanceName(); + std::string name2 = m2->instanceName(); CPPUNIT_ASSERT_EQUAL(name1, name2); // --- check containers are the same servant (same container name+hostname) @@ -359,11 +359,11 @@ LifeCycleCORBATest::testFindOrLoad_Component_SameContainer() CPPUNIT_ASSERT(!CORBA::is_nil(c1)); Engines::Container_var c2 = m2->GetContainerRef(); CPPUNIT_ASSERT(!CORBA::is_nil(c1)); - string cname1 = c1->name(); - string cname2 = c2->name(); + std::string cname1 = c1->name(); + std::string cname2 = c2->name(); CPPUNIT_ASSERT_EQUAL(cname1, cname2); - string hostname1 = c1->getHostName(); - string hostname2 = c2->getHostName(); + std::string hostname1 = c1->getHostName(); + std::string hostname2 = c2->getHostName(); CPPUNIT_ASSERT_EQUAL(hostname1, hostname2); CORBA::Long pidc1 = c1->getPID(); CORBA::Long pidc2 = c2->getPID(); @@ -385,24 +385,24 @@ LifeCycleCORBATest::testFindOrLoad_Component_UnknownMachine() // --- try to get a distant container on an unknown machine (not existing) // check that the CORBA object is null - string containerName = "aFarAwayComputer"; + std::string containerName = "aFarAwayComputer"; containerName += "/theContainer"; // CPPUNIT_ASSERT_THROW(Engines::Component_var mycompo = -// _LCC.FindOrLoad_Component(containerName.c_str(),"SalomeTestComponent");,SALOME::SALOME_Exception); +// _LCC.FindOrLoad_Component(containerName.c_str(),"SalomeTestComponent");,SALOME::SALOME_Exception); try { - Engines::Component_var mycompo = - _LCC.FindOrLoad_Component(containerName.c_str(),"SalomeTestComponent"); + Engines::EngineComponent_var mycompo = + _LCC.FindOrLoad_Component(containerName.c_str(),"SalomeTestComponent"); } catch(const SALOME::SALOME_Exception &ex) { CPPUNIT_ASSERT(true); -// string expectedMessage = "BAD PARAM"; +// std::string expectedMessage = "BAD PARAM"; // std::ostream os; // os << ex; -// string actualMessage = os.str(); +// std::string actualMessage = os.str(); // DEVTRACE("actual Exception Message = " << actualMessage); -// CPPUNIT_ASSERT(actualMessage.find(expectedMessage) != string::npos); +// CPPUNIT_ASSERT(actualMessage.find(expectedMessage) != std::string::npos); } } @@ -419,7 +419,7 @@ LifeCycleCORBATest::testFindOrLoad_Component_ParamsEmpty() Engines::MachineParameters params; _LCC.preSet(params); - Engines::Component_var mycompo = + Engines::EngineComponent_var mycompo = _LCC.FindOrLoad_Component(params,"SalomeTestComponent"); CPPUNIT_ASSERT(!CORBA::is_nil(mycompo)); @@ -442,9 +442,9 @@ LifeCycleCORBATest::testFindOrLoad_Component_ParamsLocalContainer() Engines::MachineParameters params; _LCC.preSet(params); - string hostname=Kernel_Utils::GetHostname(); + std::string hostname=Kernel_Utils::GetHostname(); params.hostname=hostname.c_str(); - Engines::Component_var mycompo = + Engines::EngineComponent_var mycompo = _LCC.FindOrLoad_Component(params,"SalomeTestComponent"); CPPUNIT_ASSERT(!CORBA::is_nil(mycompo)); @@ -458,7 +458,7 @@ LifeCycleCORBATest::testFindOrLoad_Component_ParamsLocalContainer() CPPUNIT_ASSERT(!CORBA::is_nil(m1)); Engines::Container_var c1 = m1->GetContainerRef(); CPPUNIT_ASSERT(!CORBA::is_nil(c1)); - string hostname1 = c1->getHostName(); + std::string hostname1 = c1->getHostName(); CPPUNIT_ASSERT_EQUAL(hostname1, Kernel_Utils::GetHostname()); } @@ -476,9 +476,9 @@ LifeCycleCORBATest::testFindOrLoad_Component_ParamsContainerName() Engines::MachineParameters params; _LCC.preSet(params); - string containerName = "myContainer"; + std::string containerName = "myContainer"; params.container_name = containerName.c_str(); - Engines::Component_var mycompo = + Engines::EngineComponent_var mycompo = _LCC.FindOrLoad_Component(params,"SalomeTestComponent"); CPPUNIT_ASSERT(!CORBA::is_nil(mycompo)); @@ -492,10 +492,10 @@ LifeCycleCORBATest::testFindOrLoad_Component_ParamsContainerName() CPPUNIT_ASSERT(!CORBA::is_nil(m1)); Engines::Container_var c1 = m1->GetContainerRef(); CPPUNIT_ASSERT(!CORBA::is_nil(c1)); - string hostname1 = c1->getHostName(); + std::string hostname1 = c1->getHostName(); CPPUNIT_ASSERT_EQUAL(hostname1, Kernel_Utils::GetHostname()); - string cname1 = c1->name(); - CPPUNIT_ASSERT(cname1.find(containerName) != string::npos); + std::string cname1 = c1->name(); + CPPUNIT_ASSERT(cname1.find(containerName) != std::string::npos); } // ============================================================================ @@ -509,16 +509,16 @@ LifeCycleCORBATest::testFindOrLoad_Component_RemoteComputer() { SALOME_LifeCycleCORBA _LCC(&_NS); - string remoteHost = GetRemoteHost(); + std::string remoteHost = GetRemoteHost(); - string containerName = remoteHost; + std::string containerName = remoteHost; containerName += "/aContainer"; DEVTRACE("containerName = " << containerName); - Engines::Component_var mycompo1 = + Engines::EngineComponent_var mycompo1 = _LCC.FindOrLoad_Component(containerName.c_str(),"SalomeTestComponent"); CPPUNIT_ASSERT_MESSAGE("Test validity requires connection to remote "\ - "computers from ResourcesCatalog", - !CORBA::is_nil(mycompo1)); + "computers from ResourcesCatalog", + !CORBA::is_nil(mycompo1)); // --- check narrow @@ -530,7 +530,7 @@ LifeCycleCORBATest::testFindOrLoad_Component_RemoteComputer() CPPUNIT_ASSERT(!CORBA::is_nil(m1)); Engines::Container_var c1 = m1->GetContainerRef(); CPPUNIT_ASSERT(!CORBA::is_nil(c1)); - string hostname1 = c1->getHostName(); + std::string hostname1 = c1->getHostName(); CPPUNIT_ASSERT_EQUAL(hostname1, remoteHost); } @@ -546,17 +546,17 @@ LifeCycleCORBATest::testFindOrLoad_Component_ParamsRemoteComputer() { SALOME_LifeCycleCORBA _LCC(&_NS); - string remoteHost = GetRemoteHost(); + std::string remoteHost = GetRemoteHost(); Engines::MachineParameters params; _LCC.preSet(params); params.hostname = remoteHost.c_str(); - Engines::Component_var mycompo1 = + Engines::EngineComponent_var mycompo1 = _LCC.FindOrLoad_Component(params,"SalomeTestComponent"); CPPUNIT_ASSERT_MESSAGE("Test validity requires connection to remote "\ - "computers from ResourcesCatalog", - !CORBA::is_nil(mycompo1)); + "computers from ResourcesCatalog", + !CORBA::is_nil(mycompo1)); // --- check narrow @@ -568,7 +568,7 @@ LifeCycleCORBATest::testFindOrLoad_Component_ParamsRemoteComputer() CPPUNIT_ASSERT(!CORBA::is_nil(m1)); Engines::Container_var c1 = m1->GetContainerRef(); CPPUNIT_ASSERT(!CORBA::is_nil(c1)); - string hostname1 = c1->getHostName(); + std::string hostname1 = c1->getHostName(); CPPUNIT_ASSERT_EQUAL(hostname1, remoteHost); } @@ -584,18 +584,18 @@ LifeCycleCORBATest::testFindOrLoad_Component_ParamsRemoteComputer2() { SALOME_LifeCycleCORBA _LCC(&_NS); - string remoteHost = GetRemoteHost(); + std::string remoteHost = GetRemoteHost(); Engines::MachineParameters params; _LCC.preSet(params); params.hostname = remoteHost.c_str(); params.container_name = "anotherContainer"; - Engines::Component_var mycompo1 = + Engines::EngineComponent_var mycompo1 = _LCC.FindOrLoad_Component(params,"SalomeTestComponent"); CPPUNIT_ASSERT_MESSAGE("Test validity requires connection to remote "\ - "computers from ResourcesCatalog", - !CORBA::is_nil(mycompo1)); + "computers from ResourcesCatalog", + !CORBA::is_nil(mycompo1)); // --- check narrow @@ -607,7 +607,7 @@ LifeCycleCORBATest::testFindOrLoad_Component_ParamsRemoteComputer2() CPPUNIT_ASSERT(!CORBA::is_nil(m1)); Engines::Container_var c1 = m1->GetContainerRef(); CPPUNIT_ASSERT(!CORBA::is_nil(c1)); - string hostname1 = c1->getHostName(); + std::string hostname1 = c1->getHostName(); CPPUNIT_ASSERT_EQUAL(hostname1, remoteHost); } @@ -620,11 +620,11 @@ LifeCycleCORBATest::testFindOrLoad_Component_ParamsRemoteComputer2() void LifeCycleCORBATest::testgetLocalFile_localComputer() { SALOME_LifeCycleCORBA _LCC(&_NS); - string origFileName = getenv("KERNEL_ROOT_DIR"); + std::string origFileName = getenv("KERNEL_ROOT_DIR"); origFileName += "/lib/salome/libSalomeLifeCycleCORBA.so.0.0.0"; SALOME_FileTransferCORBA transfer( Kernel_Utils::GetHostname(), - origFileName); - string local = transfer.getLocalFile(); + origFileName); + std::string local = transfer.getLocalFile(); CPPUNIT_ASSERT(!local.empty()); CPPUNIT_ASSERT_EQUAL(local, origFileName); } @@ -638,13 +638,13 @@ void LifeCycleCORBATest::testgetLocalFile_localComputer() void LifeCycleCORBATest::testgetLocalFile_remoteComputer() { SALOME_LifeCycleCORBA _LCC(&_NS); - string origFileName = getenv("KERNEL_ROOT_DIR"); + std::string origFileName = getenv("KERNEL_ROOT_DIR"); origFileName += "/lib/salome/libSalomeContainer.so.0.0.0"; SALOME_FileTransferCORBA transfer( GetRemoteHost(), - origFileName); - string local = transfer.getLocalFile(); + origFileName); + std::string local = transfer.getLocalFile(); CPPUNIT_ASSERT(!local.empty()); - string local2 = transfer.getLocalFile(); + std::string local2 = transfer.getLocalFile(); CPPUNIT_ASSERT(!local2.empty()); CPPUNIT_ASSERT_EQUAL(local, local2); } @@ -669,7 +669,7 @@ void LifeCycleCORBATest::testgetLocalFile_remoteComputer() */ // ============================================================================ -string LifeCycleCORBATest::GetRemoteHost() +std::string LifeCycleCORBATest::GetRemoteHost() { SALOME_LifeCycleCORBA _LCC(&_NS); @@ -679,27 +679,26 @@ string LifeCycleCORBATest::GetRemoteHost() Engines::ResourcesManager::_narrow(obj); CPPUNIT_ASSERT(!CORBA::is_nil(resourcesManager)); - Engines::MachineParameters params; + Engines::ContainerParameters params; _LCC.preSet(params); // empty params to get all the machines + params.resource_params.componentList.length(1); + params.resource_params.componentList[0]="SalomeTestComponent"; - Engines::CompoList clist; - clist.length(1); - clist[0] = "SalomeTestComponent"; - Engines::MachineList_var hostList = - resourcesManager->GetFittingResources(params,clist); + Engines::ResourceList_var hostList = resourcesManager->GetFittingResources(params.resource_params); CPPUNIT_ASSERT(hostList->length() > 1); - string localHost = Kernel_Utils::GetHostname(); - string remoteHost; + std::string localHost = Kernel_Utils::GetHostname(); + std::string remoteHost; for (unsigned int i=0; i < hostList->length(); i++) { const char* aMachine = hostList[i]; - string machine(aMachine); + Engines::ResourceDefinition_var resource_definition = resourcesManager->GetResourceDefinition(aMachine); + std::string machine(resource_definition->hostname.in()); if (machine != localHost) - { - remoteHost = machine; - break; - } + { + remoteHost = machine; + break; + } } CPPUNIT_ASSERT(remoteHost != ""); return remoteHost; diff --git a/src/LifeCycleCORBA/Test/LifeCycleCORBATest.hxx b/src/LifeCycleCORBA/Test/LifeCycleCORBATest.hxx index e7c8bf8ec..3be0ebab6 100644 --- a/src/LifeCycleCORBA/Test/LifeCycleCORBATest.hxx +++ b/src/LifeCycleCORBA/Test/LifeCycleCORBATest.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef _LIFECYCLECORBATEST_HXX_ #define _LIFECYCLECORBATEST_HXX_ diff --git a/src/LifeCycleCORBA/Test/Makefile.am b/src/LifeCycleCORBA/Test/Makefile.am index c54e98603..00b572151 100644 --- a/src/LifeCycleCORBA/Test/Makefile.am +++ b/src/LifeCycleCORBA/Test/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + ####################################### library # SALOMELocalTrace : log on local machine # File : Makefile.am @@ -58,7 +59,6 @@ COMMON_CPPFLAGS=\ -I$(srcdir)/$(RPATH)/Utils -I$(srcdir)/$(RPATH)/Utils/Test \ -I$(srcdir)/$(RPATH)/ResourcesManager \ -I$(srcdir)/$(RPATH)/LifeCycleCORBA \ - -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ @@ -74,7 +74,7 @@ COMMON_LIBS =\ $(RPATH)/Utils/Test/libUtilsTest.la $(RPATH)/Utils/libOpUtil.la \ $(RPATH)/SALOMELocalTrace/Test/libSALOMELocalTraceTest.la $(RPATH)/SALOMELocalTrace/libSALOMELocalTrace.la \ $(RPATH)/SALOMETraceCollector/Test/libSALOMETraceCollectorTest.la \ - $(top_builddir)/idl/libSalomeIDLKernel.la + $(top_builddir)/idl/libSalomeIDLKernel.la @CORBA_LIBS@ # # =============================================================== diff --git a/src/LifeCycleCORBA/Test/TestLifeCycleCORBA.cxx b/src/LifeCycleCORBA/Test/TestLifeCycleCORBA.cxx index a213bb7c4..146c39a3d 100644 --- a/src/LifeCycleCORBA/Test/TestLifeCycleCORBA.cxx +++ b/src/LifeCycleCORBA/Test/TestLifeCycleCORBA.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // --- include all Unit Test from basics until the present directory // #include "SALOMELocalTraceTest.hxx" diff --git a/src/LifeCycleCORBA/Test/TestLifeCycleCORBA.py b/src/LifeCycleCORBA/Test/TestLifeCycleCORBA.py index 99e0d4cb1..afdf6b336 100644 --- a/src/LifeCycleCORBA/Test/TestLifeCycleCORBA.py +++ b/src/LifeCycleCORBA/Test/TestLifeCycleCORBA.py @@ -1,24 +1,26 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + import sys, os,signal,string,commands import runSalome import setenv diff --git a/src/LifeCycleCORBA/TestContainerManager.cxx b/src/LifeCycleCORBA/TestContainerManager.cxx index fc09b92e6..ba4f4ae40 100644 --- a/src/LifeCycleCORBA/TestContainerManager.cxx +++ b/src/LifeCycleCORBA/TestContainerManager.cxx @@ -1,24 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME TestContainer : test of container creation and its life cycle // File : TestContainer.cxx // Author : Paul RASCLE, EDF - MARC TAJCHMAN, CEA @@ -47,7 +45,7 @@ int main (int argc, char * argv[]) std::map cycle; std::map first; Engines::Container_ptr cont; - Engines::Component_ptr compo; + Engines::EngineComponent_ptr compo; bool error = false; bool bestImplemented; int status; @@ -65,37 +63,39 @@ int main (int argc, char * argv[]) ASSERT( !CORBA::is_nil(obj)); Engines::ResourcesManager_var _ResManager=Engines::ResourcesManager::_narrow(obj); - Engines::MachineParameters p; - Engines::CompoList clist; - clist.length(2); - clist[0] = "MED"; - clist[1] = "GEOM"; + Engines::ContainerParameters p; + p.resource_params.componentList.length(2); + p.resource_params.componentList[0] = "MED"; + p.resource_params.componentList[1] = "GEOM"; - p.hostname = ""; - p.OS = "LINUX"; - p.mem_mb = 1000; - p.cpu_clock = 1000; - p.nb_proc_per_node = 1; - p.nb_node = 1; + p.resource_params.hostname = ""; + p.resource_params.OS = "LINUX"; + p.resource_params.mem_mb = 1000; + p.resource_params.cpu_clock = 1000; + p.resource_params.nb_proc_per_node = 1; + p.resource_params.nb_node = 1; p.isMPI = false; char st[10]; for(int i=0;i<10;i++){ sprintf(st,"cycl_%d",i); p.container_name = CORBA::string_dup(st); - cont = _ContManager->GiveContainer(p,Engines::P_CYCL,clist); + p.resource_params.policy="cycl"; + cont = _ContManager->GiveContainer(p); if(CORBA::is_nil(cont)) error = true; } for(int i=0;i<10;i++){ sprintf(st,"first_%d",i); p.container_name = CORBA::string_dup(st); - cont = _ContManager->GiveContainer(p,Engines::P_FIRST,clist); + p.resource_params.policy="first"; + cont = _ContManager->GiveContainer(p); if(CORBA::is_nil(cont)) error = true; } p.container_name = CORBA::string_dup("best"); - cont = _ContManager->GiveContainer(p,Engines::P_BEST,clist); + p.resource_params.policy="best"; + cont = _ContManager->GiveContainer(p); if(CORBA::is_nil(cont)) bestImplemented = false; else bestImplemented = true; @@ -125,9 +125,9 @@ int main (int argc, char * argv[]) if(!CORBA::is_nil(cont)){ std::string basename = Kernel_Utils::GetBaseName(cont->name()); if(basename.compare(0,4,"cycl")==0) - cycle[cont->getHostName()]++; + cycle[cont->getHostName()]++; if(basename.compare(0,5,"first")==0) - first[cont->getHostName()]++; + first[cont->getHostName()]++; } } _ContManager->ShutdownContainers(); @@ -139,14 +139,14 @@ int main (int argc, char * argv[]) int nbpmax; for(std::map::iterator iter=cycle.begin();iter!=cycle.end();iter++){ if(strcmp((*iter).first.c_str(),"localhost")!=0){ - Engines::MachineParameters *p = _ResManager->GetMachineParameters((*iter).first.c_str()); + Engines::ResourceDefinition *p = _ResManager->GetResourceDefinition((*iter).first.c_str()); int nbproc = p->nb_node * p->nb_proc_per_node; if(cycle[(*iter).first]/nbproccmax) cmax=cycle[(*iter).first]/nbproc; if(first[(*iter).first]/nbprocfmax){ - fmax=first[(*iter).first]/nbproc; - nbpmax = nbproc; + fmax=first[(*iter).first]/nbproc; + nbpmax = nbproc; } } } diff --git a/src/LifeCycleCORBA/Test_LifeCycleCORBA.cxx b/src/LifeCycleCORBA/Test_LifeCycleCORBA.cxx index b7d10383f..0d4751777 100644 --- a/src/LifeCycleCORBA/Test_LifeCycleCORBA.cxx +++ b/src/LifeCycleCORBA/Test_LifeCycleCORBA.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME LifeCycleCORBA : implementation of containers and engines life cycle both in Python and C++ // File : TestLifeCycleCORBA.cxx // Author : Paul RASCLE, EDF - MARC TAJCHMAN, CEA @@ -38,8 +39,6 @@ #include "utilities.h" #include -using namespace std; - int main (int argc, char * argv[]) { @@ -62,11 +61,11 @@ int main (int argc, char * argv[]) // --- get a local container, // load an engine, and invoque methods on that engine - string containerName = "myServer"; + std::string containerName = "myServer"; MESSAGE("FindOrLoadComponent " + containerName + "/" + "SalomeTestComponent" ); - Engines::Component_var mycompo = - _LCC.FindOrLoad_Component(containerName.c_str(),"SalomeTestComponent"); + Engines::EngineComponent_var mycompo = + _LCC.FindOrLoad_Component(containerName.c_str(),"SalomeTestComponent"); ASSERT(!CORBA::is_nil(mycompo)); Engines::TestComponent_var m1; m1 = Engines::TestComponent::_narrow(mycompo); @@ -77,53 +76,53 @@ int main (int argc, char * argv[]) // --- get another container, // load an engine, and invoque methods on that engine - string containerName2 = "otherServer"; + std::string containerName2 = "otherServer"; - Engines::Component_var mycompo2 = - _LCC.FindOrLoad_Component(containerName2.c_str(),"SALOME_TestComponentPy"); + Engines::EngineComponent_var mycompo2 = + _LCC.FindOrLoad_Component(containerName2.c_str(),"SALOME_TestComponentPy"); ASSERT(!CORBA::is_nil(mycompo2)); Engines::TestComponent_var m2; m2 = Engines::TestComponent::_narrow(mycompo2); ASSERT(!CORBA::is_nil(m2)); SCRUTE(m2->instanceName()); - cout << m2->instanceName() << endl; + std::cout << m2->instanceName() << std::endl; MESSAGE("Coucou " << m2->Coucou(1L)); // --- get a third container, // load an engine, and invoque methods on that engine - Engines::Component_var mycompo3 = - _LCC.FindOrLoad_Component("totoPy","SALOME_TestComponentPy"); + Engines::EngineComponent_var mycompo3 = + _LCC.FindOrLoad_Component("totoPy","SALOME_TestComponentPy"); ASSERT(!CORBA::is_nil(mycompo3)); Engines::TestComponent_var m3 = Engines::TestComponent::_narrow(mycompo3); ASSERT(!CORBA::is_nil(m3)); - cout << m3->instanceName() << endl; + std::cout << m3->instanceName() << std::endl; // --- yet another container, with hostname, // load an engine, and invoque methods on that engine - string containerName4 = Kernel_Utils::GetHostname(); + std::string containerName4 = Kernel_Utils::GetHostname(); containerName4 += "/titiPy"; - Engines::Component_var mycompo4 = - _LCC.FindOrLoad_Component(containerName4.c_str(),"SALOME_TestComponentPy"); + Engines::EngineComponent_var mycompo4 = + _LCC.FindOrLoad_Component(containerName4.c_str(),"SALOME_TestComponentPy"); ASSERT(!CORBA::is_nil(mycompo4)); Engines::TestComponent_var m4 = Engines::TestComponent::_narrow(mycompo4); ASSERT(!CORBA::is_nil(m4)); - cout << m4->instanceName() << endl; + std::cout << m4->instanceName() << std::endl; // --- try a local file transfer - string origFileName = "/home/prascle/petitfichier"; + std::string origFileName = "/home/prascle/petitfichier"; SALOME_FileTransferCORBA transfer( Kernel_Utils::GetHostname(), - origFileName); - string local = transfer.getLocalFile(); + origFileName); + std::string local = transfer.getLocalFile(); SCRUTE(local); // --- try a file transfer from another computer origFileName = "/home/prascle/occ60.tgz"; SALOME_FileTransferCORBA transfer2( "cli76ce", - origFileName); + origFileName); local = transfer2.getLocalFile(); SCRUTE(local); local = transfer2.getLocalFile(); @@ -145,4 +144,3 @@ int main (int argc, char * argv[]) return 0; } - diff --git a/src/LifeCycleCORBA_SWIG/LifeCycleCORBA.py b/src/LifeCycleCORBA_SWIG/LifeCycleCORBA.py index 2b5670b71..44d42461f 100644 --- a/src/LifeCycleCORBA_SWIG/LifeCycleCORBA.py +++ b/src/LifeCycleCORBA_SWIG/LifeCycleCORBA.py @@ -1,24 +1,26 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # SALOME LifeCycleCORBA : implementation of containers and engines life cycle both in Python and C++ # File : LifeCycleCORBA.py # Author : Paul RASCLE, EDF @@ -37,3 +39,40 @@ class LifeCycleCORBA (SALOME_LifeCycleCORBA): return SALOME_LifeCycleCORBA.FindOrLoad_Component(self, containerName, componentName) + +class MachineParameters (Engines.MachineParameters): + def __init__(self, container_name='', hostname='', componentList=[], computerList=[], OS='', + mem_mb=0, cpu_clock=0, nb_proc_per_node=0, nb_node=0, isMPI=False, workingdir='', + mode='start', policy='altcycl', parallelLib='', nb_component_nodes=0): + Engines.MachineParameters.__init__(self,container_name, hostname, componentList, computerList, OS, + mem_mb, cpu_clock, nb_proc_per_node, nb_node, isMPI, workingdir, + mode, policy, parallelLib, nb_component_nodes) + +class ContainerParameters (Engines.ContainerParameters): + def __init__(self, container_name='', mode='start', workingdir='', nb_proc=0, isMPI=False, parallelLib='',resource_params=None): + if resource_params is None:resource_params=ResourceParameters() + Engines.ContainerParameters.__init__(self,container_name, mode, workingdir, nb_proc, isMPI, parallelLib,resource_params) + +class ResourceParameters (Engines.ResourceParameters): + def __init__(self, name="", hostname="", OS="", componentList=[], + nb_proc=0, mem_mb=0, cpu_clock=0, nb_node=0, nb_proc_per_node=0, + policy="", resList=[]): + Engines.ResourceParameters.__init__(self, name, hostname, OS, componentList, + nb_proc, mem_mb, cpu_clock, nb_node, nb_proc_per_node, + policy, resList) + +class JobParameters (Engines.JobParameters): + def __init__(self, job_name="", job_type="", job_file="", env_file="", in_files=[], out_files=[], + work_directory="", local_directory="", result_directory="", maximum_duration="", + resource_required=None, queue="", specific_parameters=[]): + Engines.JobParameters.__init__(self, job_name, job_type, job_file, env_file, in_files, out_files, + work_directory, local_directory, result_directory, maximum_duration, + resource_required, queue, specific_parameters) + +class ResourceDefinition(Engines.ResourceDefinition): + def __init__(self, name="", hostname="", protocol="rsh", username="", applipath="", componentList=[], + mode="interactive", OS="", mem_mb=1, cpu_clock=1, nb_node=1, nb_proc_per_node=1, + batch="", mpiImpl="", iprotocol="rsh"): + Engines.ResourceDefinition.__init__(self, name, hostname, protocol, username, applipath, componentList, + mode, OS, mem_mb, cpu_clock, nb_node, nb_proc_per_node, batch, + mpiImpl, iprotocol) diff --git a/src/LifeCycleCORBA_SWIG/Makefile.am b/src/LifeCycleCORBA_SWIG/Makefile.am index b0cd8a499..81a420ca4 100644 --- a/src/LifeCycleCORBA_SWIG/Makefile.am +++ b/src/LifeCycleCORBA_SWIG/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : Makefile.am # Author : Guillaume Boulant (CSSI) # Module : KERNEL @@ -65,7 +66,6 @@ _libSALOME_LifeCycleCORBA_la_CPPFLAGS =\ -I$(srcdir)/../Basics \ -I$(srcdir)/../SALOMELocalTrace \ -I$(srcdir)/../Utils \ - -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ @@ -88,7 +88,7 @@ EXTRA_DIST = $(SWIGSOURCES) # # Scripts to be installed. -dist_salomescript_DATA =\ +dist_salomescript_PYTHON =\ LifeCycleCORBA.py \ TestLifeCycleCORBA.py diff --git a/src/LifeCycleCORBA_SWIG/Test/LifeCycleCORBA_SWIGTest.py b/src/LifeCycleCORBA_SWIG/Test/LifeCycleCORBA_SWIGTest.py index d74b61537..26c3d25d6 100644 --- a/src/LifeCycleCORBA_SWIG/Test/LifeCycleCORBA_SWIGTest.py +++ b/src/LifeCycleCORBA_SWIG/Test/LifeCycleCORBA_SWIGTest.py @@ -1,24 +1,26 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : LifeCycleCORBA_SWIGTest.py # Author : Paul RASCLE, EDF # Module : SALOME @@ -178,7 +180,7 @@ class LifeCycleCORBA_SWIGTest(unittest.TestCase): try: cp1=self.lcc.FindOrLoad_Component(containerName,"SalomeTestComponent") except RuntimeError,ex : - self.assertEqual(ex.args[0],'Salome Exception : unknown host') + self.assertEqual(ex.args[0],'unknown host') pass diff --git a/src/LifeCycleCORBA_SWIG/Test/Makefile.am b/src/LifeCycleCORBA_SWIG/Test/Makefile.am index d9614245e..42f7babb1 100644 --- a/src/LifeCycleCORBA_SWIG/Test/Makefile.am +++ b/src/LifeCycleCORBA_SWIG/Test/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + ####################################### # File : Makefile.am # Author : Paul RASCLE (EDF) @@ -36,8 +37,10 @@ include $(top_srcdir)/salome_adm/unix/make_common_starter.am salomeinclude_HEADERS= # Scripts to be installed -dist_salomescript_SCRIPTS = \ +dist_salomescript_PYTHON = \ LifeCycleCORBA_SWIGTest.py \ + testresourcemanager.py \ + testcontainermanager.py \ TestLifeCycleCORBA_SWIG.py # @@ -67,3 +70,8 @@ lib_LTLIBRARIES = # =============================================================== # bin_PROGRAMS = + +install-data-hook: + @for f in $(dist_salomescript_PYTHON) ; do \ + chmod -f a+x $(DESTDIR)$(salomescriptdir)/$$f ; \ + done diff --git a/src/LifeCycleCORBA_SWIG/Test/TestLifeCycleCORBA_SWIG.py b/src/LifeCycleCORBA_SWIG/Test/TestLifeCycleCORBA_SWIG.py index 40133b36f..edeabe8a9 100644 --- a/src/LifeCycleCORBA_SWIG/Test/TestLifeCycleCORBA_SWIG.py +++ b/src/LifeCycleCORBA_SWIG/Test/TestLifeCycleCORBA_SWIG.py @@ -1,24 +1,26 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : TestLifeCycleCORBA_SWIG.py # Author : Paul RASCLE, EDF # Module : SALOME diff --git a/src/LifeCycleCORBA_SWIG/Test/testcontainermanager.py b/src/LifeCycleCORBA_SWIG/Test/testcontainermanager.py new file mode 100644 index 000000000..e53b437df --- /dev/null +++ b/src/LifeCycleCORBA_SWIG/Test/testcontainermanager.py @@ -0,0 +1,74 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 unittest +import salome +import Engines +import LifeCycleCORBA +salome.salome_init() +cm= salome.lcc.getContainerManager() +rm= salome.lcc.getResourcesManager() + +class TestContainerManager(unittest.TestCase): + """ +Test with catalog : + + + + + + + +""" + def setUp(self): + pass + + def test0(self): + """""" + rp=LifeCycleCORBA.ResourceParameters(policy="best",componentList=["PYHELLO"]) + p=LifeCycleCORBA.ContainerParameters(container_name="MyContainer",mode="start",resource_params=rp) + co=cm.GiveContainer( p ) + self.assertEqual(co._get_name(), "/Containers/claui2c6/MyContainer") + co=cm.GiveContainer( p ) + self.assertEqual(co._get_name(), "/Containers/clt10br/MyContainer") + + def test1(self): + """""" + rp=LifeCycleCORBA.ResourceParameters(policy="best",componentList=["PYHELLO"]) + p=LifeCycleCORBA.ContainerParameters(container_name="MyContainer",mode="get",resource_params=rp) + co=cm.GiveContainer( p ) + self.assertEqual(co._get_name(), "/Containers/claui2c6/MyContainer") + co=cm.GiveContainer( p ) + self.assertEqual(co._get_name(), "/Containers/clt10br/MyContainer") + + def test2(self): + """""" + rp=LifeCycleCORBA.ResourceParameters(policy="best",componentList=["PYHELLO"]) + p=LifeCycleCORBA.ContainerParameters(container_name="MyContainer",mode="getorstart",resource_params=rp) + co=cm.GiveContainer( p ) + self.assertEqual(co._get_name(), "/Containers/claui2c6/MyContainer") + co=cm.GiveContainer( p ) + self.assertEqual(co._get_name(), "/Containers/clt10br/MyContainer") + + +if __name__ == '__main__': + suite = unittest.TestLoader().loadTestsFromTestCase(TestContainerManager) + unittest.TextTestRunner().run(suite) + diff --git a/src/LifeCycleCORBA_SWIG/Test/testresourcemanager.py b/src/LifeCycleCORBA_SWIG/Test/testresourcemanager.py new file mode 100644 index 000000000..3d6e58ff6 --- /dev/null +++ b/src/LifeCycleCORBA_SWIG/Test/testresourcemanager.py @@ -0,0 +1,146 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 unittest +import salome +import LifeCycleCORBA +import SALOME +salome.salome_init() +cm= salome.lcc.getContainerManager() +rm= salome.lcc.getResourcesManager() + +class TestResourceManager(unittest.TestCase): + """ +Test with CatalogResources.xml: + + + + + + + + + + + + + + + +""" + def setUp(self): + pass + + def test0(self): + """host required""" + params=LifeCycleCORBA.ResourceParameters(hostname="m3") + machineList=rm.GetFittingResources(params) + self.assertEqual(machineList, ["m3"]) + + def test1(self): + """OS required""" + params=LifeCycleCORBA.ResourceParameters(OS="Linux") + self.assertRaises(SALOME.SALOME_Exception,rm.GetFittingResources,params) + + def test2(self): + """component add required""" + params=LifeCycleCORBA.ResourceParameters(componentList=["add"]) + machineList=rm.GetFittingResources(params) + self.assertEqual(machineList, ['claui2c6', 'm1', 'm2']) + + def test3(self): + """component tutu required""" + params=LifeCycleCORBA.ResourceParameters(componentList=["tutu"]) + machineList=rm.GetFittingResources(params) + self.assertEqual(machineList, ['m1', 'm2', 'm3']) + + def test4(self): + """component tata required""" + params=LifeCycleCORBA.ResourceParameters(componentList=["tata"]) + machineList=rm.GetFittingResources(params) + self.assertEqual(machineList, ['m1', 'm2']) + + def test5(self): + """component titi required""" + params=LifeCycleCORBA.ResourceParameters(componentList=["titi"]) + machineList=rm.GetFittingResources(params) + self.assertEqual(machineList, ['m1', 'm2']) + + def test6(self): + """component toto required""" + params=LifeCycleCORBA.ResourceParameters(componentList=["toto"]) + machineList=rm.GetFittingResources(params) + self.assertEqual(machineList, ['claui2c6', 'm1', 'm2']) + + def test7(self): + """components add and toto required""" + params=LifeCycleCORBA.ResourceParameters(componentList=["add","toto"]) + machineList=rm.GetFittingResources(params) + self.assertEqual(machineList, ['claui2c6', 'm1', 'm2']) + + def test8(self): + """components add and toto required""" + machineDef=rm.GetResourceDefinition('claui2c6') + self.assertEqual(machineDef.componentList, ['toto', 'add']) + + def test10(self): + """policy altcycl""" + params=LifeCycleCORBA.ResourceParameters(componentList=["add","toto"]) + machineList=rm.GetFittingResources(params) + self.assertEqual(rm.Find('altcycl',machineList), "claui2c6") + self.assertEqual(rm.Find('altcycl',machineList), "m1") + self.assertEqual(rm.Find('altcycl',machineList), "m2") + self.assertEqual(rm.Find('altcycl',machineList), "claui2c6") + self.assertEqual(rm.Find('altcycl',machineList), "m1") + self.assertEqual(rm.Find('altcycl',machineList), "m2") + + def test11(self): + """policy cycl""" + params=LifeCycleCORBA.ResourceParameters(componentList=["add","toto"]) + machineList=rm.GetFittingResources(params) + self.assertEqual(rm.Find('cycl',machineList), "claui2c6") + self.assertEqual(rm.Find('cycl',machineList), "m1") + self.assertEqual(rm.Find('cycl',machineList), "m2") + self.assertEqual(rm.Find('cycl',machineList), "claui2c6") + self.assertEqual(rm.Find('cycl',machineList), "m1") + self.assertEqual(rm.Find('cycl',machineList), "m2") + + def test12(self): + """policy first""" + params=LifeCycleCORBA.ResourceParameters(componentList=["add","toto"]) + machineList=rm.GetFittingResources(params) + self.assertEqual(rm.Find('first',machineList), "claui2c6") + self.assertEqual(rm.Find('first',machineList), "claui2c6") + + def test13(self): + """policy best""" + params=LifeCycleCORBA.ResourceParameters(componentList=["add","toto"]) + machineList=rm.GetFittingResources(params) + self.assertEqual(rm.Find('best',machineList), "claui2c6") + self.assertEqual(rm.Find('best',machineList), "m1") + self.assertEqual(rm.Find('best',machineList), "m2") + self.assertEqual(rm.Find('best',machineList), "claui2c6") + self.assertEqual(rm.Find('best',machineList), "m1") + self.assertEqual(rm.Find('best',machineList), "m2") + +if __name__ == '__main__': + suite = unittest.TestLoader().loadTestsFromTestCase(TestResourceManager) + unittest.TextTestRunner().run(suite) + diff --git a/src/LifeCycleCORBA_SWIG/TestLifeCycleCORBA.py b/src/LifeCycleCORBA_SWIG/TestLifeCycleCORBA.py index 8bc2683f0..31d1d310f 100644 --- a/src/LifeCycleCORBA_SWIG/TestLifeCycleCORBA.py +++ b/src/LifeCycleCORBA_SWIG/TestLifeCycleCORBA.py @@ -1,24 +1,26 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + #from TestLifeCycleCORBA import * # import os diff --git a/src/LifeCycleCORBA_SWIG/libSALOME_LifeCycleCORBA.i b/src/LifeCycleCORBA_SWIG/libSALOME_LifeCycleCORBA.i index d2d5fe268..3990d9d86 100644 --- a/src/LifeCycleCORBA_SWIG/libSALOME_LifeCycleCORBA.i +++ b/src/LifeCycleCORBA_SWIG/libSALOME_LifeCycleCORBA.i @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // ---------------------------------------------------------------------------- // %module libSALOME_LifeCycleCORBA @@ -26,6 +27,7 @@ %feature("autodoc", "1"); %include +%include "std_string.i" // ---------------------------------------------------------------------------- @@ -43,19 +45,17 @@ typedef int Py_ssize_t; #define PY_SSIZE_T_MIN INT_MIN #endif - using namespace std; - //--- from omniORBpy.h (not present on Debian Sarge packages) struct omniORBpyAPI { PyObject* (*cxxObjRefToPyObjRef)(const CORBA::Object_ptr cxx_obj, - CORBA::Boolean hold_lock); + CORBA::Boolean hold_lock); // Convert a C++ object reference to a Python object reference. // If is true, caller holds the Python interpreter lock. CORBA::Object_ptr (*pyObjRefToCxxObjRef)(PyObject* py_obj, - CORBA::Boolean hold_lock); + CORBA::Boolean hold_lock); // Convert a Python object reference to a C++ object reference. // Raises BAD_PARAM if the Python object is not an object reference. // If is true, caller holds the Python interpreter lock. @@ -65,7 +65,7 @@ struct omniORBpyAPI { // Constructor for the singleton. Sets up the function pointers. }; - omniORBpyAPI* api; +omniORBpyAPI* api; %} @@ -80,8 +80,7 @@ struct omniORBpyAPI { PyObject* omnipy = PyImport_ImportModule((char*)"_omnipy"); if (!omnipy) { - PyErr_SetString(PyExc_ImportError, - (char*)"Cannot import _omnipy"); + PyErr_SetString(PyExc_ImportError, (char*)"Cannot import _omnipy"); return; } PyObject* pyapi = PyObject_GetAttrString(omnipy, (char*)"API"); @@ -93,7 +92,8 @@ struct omniORBpyAPI { // ---------------------------------------------------------------------------- -%typemap(python,out) Engines::Container_ptr, Engines::Component_ptr, Engines::fileRef_ptr +%typemap(out) Engines::Container_ptr, Engines::EngineComponent_ptr, Engines::fileRef_ptr, + Engines::ContainerManager_ptr, Engines::ResourcesManager_ptr { MESSAGE("typemap out on CORBA object ptr"); SCRUTE($1); @@ -101,7 +101,12 @@ struct omniORBpyAPI { SCRUTE($result); } -%typemap(python,in) Engines::fileRef_ptr aFileRef +%typemap(typecheck,precedence=SWIG_TYPECHECK_POINTER) Engines::fileRef_ptr +{ + $1=PyObject_HasAttrString($input, "__omni_obj"); +} + +%typemap(in) Engines::fileRef_ptr aFileRef { MESSAGE("typemap in on CORBA object ptr"); try { @@ -114,114 +119,72 @@ struct omniORBpyAPI { } } - -%typemap(python,out) std::string, - string -{ - MESSAGE("typemap out on std::string"); - SCRUTE($1); - $result = PyString_FromString($1.c_str()); -} - -%typemap(typecheck,precedence=SWIG_TYPECHECK_POINTER) Engines::MachineParameters const & -{ - $1 = PyDict_Check($input)? 1 : 0; -} %typemap(typecheck,precedence=SWIG_TYPECHECK_POINTER) const Engines::MachineParameters & { $1 = PyDict_Check($input)? 1 : 0; } -%typemap(typecheck) std::string, - string -{ - $1 = PyString_Check($input); -} - -%typemap(python,in) std::string, - string -{ - MESSAGE("typemap in on std::string"); - std::string str; - if (PyString_Check($input) == 1) - { - char* value = PyString_AsString($input); - str = value; - $1 = str; - } - else - { - MESSAGE("Not a string"); - PyErr_SetString(PyExc_TypeError,"Must Be a Python string"); - return NULL; - } -} - - -%typemap(python,in) const Engines::MachineParameters & +%typemap(in) const Engines::MachineParameters & { //printf("typemap in on Engines::MachineParameters\n"); MESSAGE("typemap in on Engines::MachineParameters"); if (PyDict_Check($input) == 1) { Engines::MachineParameters *param = new Engines::MachineParameters ; - param->container_name = CORBA::string_dup(""); - param->hostname = CORBA::string_dup(""); - param->OS = CORBA::string_dup(""); - param->mem_mb = 0; - param->cpu_clock = 0; - param->nb_proc_per_node = 0; - param->nb_node = 0; - param->isMPI = false; - param->parallelLib = CORBA::string_dup(""); - param->nb_component_nodes = 0; + SALOME_LifeCycleCORBA::preSet(*param); + PyObject *key, *value; Py_ssize_t pos = 0; while (PyDict_Next($input, &pos, &key, &value)) - { - char* keystr = PyString_AsString(key); - printf("key: %s\n", keystr); - if (strcmp(keystr,"container_name")==0) - { - param->container_name = CORBA::string_dup(PyString_AsString(value)); - } - else if (strcmp(keystr,"hostname")==0) - { - param->hostname = CORBA::string_dup(PyString_AsString(value)); - } - else if (strcmp(keystr,"OS")==0) - { - param->OS = CORBA::string_dup(PyString_AsString(value)); - } - else if (strcmp(keystr,"mem_mb")==0) - { - param->mem_mb = PyLong_AsLong(value); - } - else if (strcmp(keystr,"cpu_clock")==0) - { - param->cpu_clock = PyLong_AsLong(value); - } - else if (strcmp(keystr,"nb_proc_per_node")==0) - { - param->nb_proc_per_node = PyLong_AsLong(value); - } - else if (strcmp(keystr,"nb_node")==0) - { - param->nb_node = PyLong_AsLong(value); - } - else if (strcmp(keystr,"isMPI")==0) - { - param->isMPI = PyLong_AsLong(value); - } - else if (strcmp(keystr,"parallelLib")==0) - { - param->parallelLib = CORBA::string_dup(PyString_AsString(value)); - } - else if (strcmp(keystr,"nb_component_nodes")==0) - { - param->nb_component_nodes = PyLong_AsLong(value); - } - } + { + char* keystr = PyString_AsString(key); + if (strcmp(keystr,"container_name")==0) + { + param->container_name = CORBA::string_dup(PyString_AsString(value)); + } + else if (strcmp(keystr,"hostname")==0) + { + param->hostname = CORBA::string_dup(PyString_AsString(value)); + } + else if (strcmp(keystr,"OS")==0) + { + param->OS = CORBA::string_dup(PyString_AsString(value)); + } + else if (strcmp(keystr,"mem_mb")==0) + { + param->mem_mb = PyLong_AsLong(value); + } + else if (strcmp(keystr,"cpu_clock")==0) + { + param->cpu_clock = PyLong_AsLong(value); + } + else if (strcmp(keystr,"nb_proc_per_node")==0) + { + param->nb_proc_per_node = PyLong_AsLong(value); + } + else if (strcmp(keystr,"nb_node")==0) + { + param->nb_node = PyLong_AsLong(value); + } + else if (strcmp(keystr,"isMPI")==0) + { + param->isMPI = PyLong_AsLong(value); + } + else if (strcmp(keystr,"workingdir")==0) + param->workingdir = CORBA::string_dup(PyString_AsString(value)); + else if (strcmp(keystr,"mode")==0) + param->mode = CORBA::string_dup(PyString_AsString(value)); + else if (strcmp(keystr,"policy")==0) + param->policy = CORBA::string_dup(PyString_AsString(value)); + else if (strcmp(keystr,"parallelLib")==0) + { + param->parallelLib = CORBA::string_dup(PyString_AsString(value)); + } + else if (strcmp(keystr,"nb_component_nodes")==0) + { + param->nb_component_nodes = PyLong_AsLong(value); + } + } $1 = param; } else @@ -233,7 +196,7 @@ struct omniORBpyAPI { } -%typemap(python,freearg) const Engines::MachineParameters & +%typemap(freearg) const Engines::MachineParameters & { MESSAGE("delete $1"); delete $1; @@ -274,4 +237,3 @@ struct omniORBpyAPI { %include %include - diff --git a/src/Logger/Makefile.am b/src/Logger/Makefile.am index db56c6be8..11baed9f1 100644 --- a/src/Logger/Makefile.am +++ b/src/Logger/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # SALOME Logger : CORBA server managing trace output # File : Makefile.am # Author : Guillaume BOULANT, CSSI @@ -43,9 +44,11 @@ SALOME_Logger_Server_SOURCES = \ SALOME_Logger_Server_main.cxx \ SALOME_Logger_Server.hxx -SALOME_Logger_Server_LDADD = libSalomeLoggerServer.la +SALOME_Logger_Server_LDADD = libSalomeLoggerServer.la \ + $(top_builddir)/idl/libSalomeIDLKernel.la \ + @CORBA_LIBS@ + SALOME_Logger_Server_CPPFLAGS =\ - -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ -I$(srcdir)/../SALOMELocalTrace \ -I$(srcdir)/../Basics \ @@ -58,7 +61,6 @@ libSalomeLoggerServer_la_SOURCES =\ SALOME_Logger_Server.cxx libSalomeLoggerServer_la_CPPFLAGS =\ - -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ libSalomeLoggerServer_la_LDFLAGS = -no-undefined -version-info=0:0:0 @@ -68,4 +70,4 @@ libSalomeLoggerServer_la_LIBADD = \ @CORBA_LIBS@ # Scripts target -dist_salomescript_DATA = SALOME_Trace.py +dist_salomescript_PYTHON = SALOME_Trace.py diff --git a/src/Logger/SALOME_Logger_Server.cxx b/src/Logger/SALOME_Logger_Server.cxx index 24e431c7f..98bd49c3a 100644 --- a/src/Logger/SALOME_Logger_Server.cxx +++ b/src/Logger/SALOME_Logger_Server.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Logger : CORBA server managing trace output // File : SALOME_Logger_Server.cxx // Author : Vasily Rusyaev @@ -68,7 +69,7 @@ void Logger::putMessage(const char* message) myLock.lock(); if (m_putIntoFile) - m_outputFile << message << std::flush; + m_outputFile << message << std::flush; else std::cout << message; myLock.unlock(); diff --git a/src/Logger/SALOME_Logger_Server.hxx b/src/Logger/SALOME_Logger_Server.hxx index a20632857..98469d81e 100644 --- a/src/Logger/SALOME_Logger_Server.hxx +++ b/src/Logger/SALOME_Logger_Server.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Logger : CORBA server managing trace output // File : SALOME_Logger_Server.hxx // Author : Vasily Rusyaev @@ -37,7 +38,7 @@ #include "Logger.hh" #ifdef WIN32 -# if defined LOGGER_EXPORTS +# if defined LOGGER_EXPORTS || defined SalomeLoggerServer_EXPORTS # define LOGGER_EXPORT __declspec( dllexport ) # else # define LOGGER_EXPORT __declspec( dllimport ) @@ -46,6 +47,9 @@ # define LOGGER_EXPORT #endif +#ifdef WNT +#pragma warning(disable:4275) // Disable warning interface non dll +#endif class LOGGER_EXPORT Logger : public POA_SALOME_Logger::Logger @@ -53,27 +57,27 @@ class LOGGER_EXPORT Logger : public: //constructor w/o parameters //all messages will be put into terminal via cout - Logger(); + Logger(); //constructor with parameter, filename is output file //all messages will be put into special file passed as parameter - Logger(const char *filename); - virtual ~Logger(); - //put message into one special place for all servers - void putMessage(const char* message); + Logger(const char *filename); + virtual ~Logger(); + //put message into one special place for all servers + void putMessage(const char* message); void ping(); void SetOrb( CORBA::ORB_ptr orb ) { _orb = CORBA::ORB::_duplicate(orb); return; } - void shutdown() { if(!CORBA::is_nil(_orb)) _orb->shutdown(0); }; + void shutdown() { if(!CORBA::is_nil(_orb)) _orb->shutdown(0); }; private: - //if m_putIntoFile is true all messages will be put into special - //otherwise all messages will be put into terminal via cout + //if m_putIntoFile is true all messages will be put into special + //otherwise all messages will be put into terminal via cout bool m_putIntoFile; - //ofstream class specialized for disk file output - std::ofstream m_outputFile; + //ofstream class specialized for disk file output + std::ofstream m_outputFile; - //synchronisation object - static omni_mutex myLock; + //synchronisation object + static omni_mutex myLock; - CORBA::ORB_ptr _orb; + CORBA::ORB_ptr _orb; }; #endif // !defined(SALOME_Logger_Server_include) diff --git a/src/Logger/SALOME_Logger_Server_main.cxx b/src/Logger/SALOME_Logger_Server_main.cxx index 8cd5d9025..b985a6846 100644 --- a/src/Logger/SALOME_Logger_Server_main.cxx +++ b/src/Logger/SALOME_Logger_Server_main.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Logger : CORBA server managing trace output // File : SALOME_Logger_Server.cxx // Author : Vasily Rusyaev @@ -62,46 +63,46 @@ int main(int argc, char **argv) CORBA::ORB_var orb = CORBA::ORB_init(argc, argv) ; for (i = 1; i <= NumberOfTries; i++) - { + { #ifndef WIN32 - if (i != 1) nanosleep(&ts_req, &ts_rem); + if (i != 1) nanosleep(&ts_req, &ts_rem); #else - if (i != 1) Sleep(TIMESleep / 1000000); + if (i != 1) Sleep(TIMESleep / 1000000); #endif - try - { - obj = orb->resolve_initial_references("RootPOA") ; - if(!CORBA::is_nil(obj)) - poa = PortableServer::POA::_narrow(obj) ; - pman = poa->the_POAManager(); - // NB. You can activate the POA before or after - // activating objects in that POA. - - // This activates the object in the root POA (by default), and - // returns a reference to it. - //NB. You can't use SALOME_NamingService class because it uses MESSAGE macro - //Otherwise, you will get segmentation fault. - //Get initial naming context - if(!CORBA::is_nil(orb)) - theObj = orb->resolve_initial_references("NameService"); - //Narrow to NamingContext - if (!CORBA::is_nil(theObj)) - inc = CosNaming::NamingContext::_narrow(theObj); - } catch(CORBA::COMM_FAILURE&) { - //cout<<"Logger Server: CORBA::COMM_FAILURE: Unable to contact the Naming Service"<resolve_initial_references("RootPOA") ; + if(!CORBA::is_nil(obj)) + poa = PortableServer::POA::_narrow(obj) ; + pman = poa->the_POAManager(); + // NB. You can activate the POA before or after + // activating objects in that POA. + + // This activates the object in the root POA (by default), and + // returns a reference to it. + //NB. You can't use SALOME_NamingService class because it uses MESSAGE macro + //Otherwise, you will get segmentation fault. + //Get initial naming context + if(!CORBA::is_nil(orb)) + theObj = orb->resolve_initial_references("NameService"); + //Narrow to NamingContext + if (!CORBA::is_nil(theObj)) + inc = CosNaming::NamingContext::_narrow(theObj); + } catch(CORBA::COMM_FAILURE&) { + //cout<<"Logger Server: CORBA::COMM_FAILURE: Unable to contact the Naming Service"<SetOrb(orb); myLoggerRef = myLogger->_this(); @@ -114,10 +115,10 @@ int main(int argc, char **argv) orb->run() ; orb->destroy() ; } - catch(CORBA::COMM_FAILURE& ex) - { + catch(CORBA::COMM_FAILURE&) + { std::cerr << "Caught system exception COMM_FAILURE -- unable to contact the " - << "object." << std::endl; + << "object." << std::endl; } catch(CORBA::SystemException&) { diff --git a/src/Logger/SALOME_Trace.cxx b/src/Logger/SALOME_Trace.cxx index ce73c7f6d..756cf6698 100644 --- a/src/Logger/SALOME_Trace.cxx +++ b/src/Logger/SALOME_Trace.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Logger : CORBA server managing trace output // File : SALOME_Logger.cxx // Author : Vasily Rusyaev @@ -30,7 +31,6 @@ //#include #include #include -using namespace std; #ifdef WIN32 #include @@ -51,8 +51,8 @@ SALOME_Trace::~SALOME_Trace() SALOME_Trace& SALOME_Trace::Instance() { - static SALOME_Trace instance; - return instance; + static SALOME_Trace instance; + return instance; } int SALOME_Trace::Initialize(CORBA::ORB_ptr theOrb) { @@ -76,15 +76,15 @@ int SALOME_Trace::Initialize(CORBA::ORB_ptr theOrb) { #ifndef WIN32 if (i != 1) nanosleep(&ts_req,&ts_rem); #else - if (i != 1) Sleep(TIMESleep / 1000000); + if (i != 1) Sleep(TIMESleep / 1000000); #endif try{ if(CORBA::is_nil(obj)) - obj = theOrb->resolve_initial_references("RootPOA"); + obj = theOrb->resolve_initial_references("RootPOA"); if(CORBA::is_nil(theObj)) - theObj = theOrb->resolve_initial_references("NameService"); + theObj = theOrb->resolve_initial_references("NameService"); if (!CORBA::is_nil(theObj)) - inc = CosNaming::NamingContext::_narrow(theObj); + inc = CosNaming::NamingContext::_narrow(theObj); if (!CORBA::is_nil(inc)) break; } catch( CORBA::SystemException& ) { } catch (...) { @@ -92,7 +92,7 @@ int SALOME_Trace::Initialize(CORBA::ORB_ptr theOrb) { } if (CORBA::is_nil(inc)) { - cout<<"SALOME_Trace can not find NameService"<resolve(name); - if (!CORBA::is_nil(obj)) m_pInterfaceLogger = SALOME_Logger::Logger::_narrow(obj); + obj = inc->resolve(name); + if (!CORBA::is_nil(obj)) m_pInterfaceLogger = SALOME_Logger::Logger::_narrow(obj); } catch(CosNaming::NamingContext::NotFound) { } catch(...) { } if (!CORBA::is_nil(m_pInterfaceLogger)) { - //cout<<"SALOME_Trace : Logger Server was found"<ping(); - break; + //cout<<"SALOME_Trace : Logger Server was found"<ping(); + break; } } if (CORBA::is_nil(m_pInterfaceLogger)) { - cout<<"SALOME_Trace can not find Logger"<freeze(false); + //rdbuf()->freeze(false); //rdbuf()->sync(); // problem with gcc3.2 seekp(0); if (CORBA::is_nil(m_pInterfaceLogger)) - cout << LogMsg; + std::cout << LogMsg; else m_pInterfaceLogger-> putMessage (LogMsg) ; } diff --git a/src/Logger/SALOME_Trace.hxx b/src/Logger/SALOME_Trace.hxx index a9d2ebd7f..28acd6e43 100644 --- a/src/Logger/SALOME_Trace.hxx +++ b/src/Logger/SALOME_Trace.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Logger : CORBA server managing trace output // File : SALOME_Trace.cxx // Author : Vasily Rusyaev @@ -27,7 +28,7 @@ #if !defined(AFX_LOGGER_H__96F2A3AB_F6F8_11D6_BFA6_000476A0958C__INCLUDED_) #define AFX_LOGGER_H__96F2A3AB_F6F8_11D6_BFA6_000476A0958C__INCLUDED_ -#include +#include #include #include "Logger.hh" @@ -62,19 +63,19 @@ # endif /* WIN32 */ -class SALOME_Trace : public std::ostrstream +class SALOME_Trace : public std::ostringstream { public: - virtual ~SALOME_Trace(); + virtual ~SALOME_Trace(); static Standard_EXPORT SALOME_Trace& Instance(); - // initializes Logger (if USE_LOGGER variable is set) and returns true, in case success - int Initialize(CORBA::ORB_ptr theOrb); - Standard_EXPORT void putMessage(std::ostream& msg); + // initializes Logger (if USE_LOGGER variable is set) and returns true, in case success + int Initialize(CORBA::ORB_ptr theOrb); + Standard_EXPORT void putMessage(std::ostream& msg); protected: - //disable creation of instances. It's necessary to use static SALOME_Logger& Instance() - SALOME_Trace(); - SALOME_Logger::Logger_var m_pInterfaceLogger;// object reference on Logger server. - int isInitialized; + //disable creation of instances. It's necessary to use static SALOME_Logger& Instance() + SALOME_Trace(); + SALOME_Logger::Logger_var m_pInterfaceLogger;// object reference on Logger server. + int isInitialized; }; #define GLogger SALOME_Trace::Instance() diff --git a/src/Logger/SALOME_Trace.py b/src/Logger/SALOME_Trace.py index e6ece2f01..7e178cb20 100644 --- a/src/Logger/SALOME_Trace.py +++ b/src/Logger/SALOME_Trace.py @@ -1,24 +1,26 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # SALOME Logger : CORBA server managing trace output # File : SALOME_Trace.py # Module : SALOME @@ -68,12 +70,9 @@ class SALOME_Trace : time.sleep(0.25) steps = steps - 1 - - + def putMessage ( self, LogMsg ) : - if (CORBA.is_nil(self.m_pInterfaceLogger)): print LogMsg; else: - self.m_pInterfaceLogger.putMessage (LogMsg) - + self.m_pInterfaceLogger.putMessage (LogMsg) diff --git a/src/Logger/Test/Makefile.am b/src/Logger/Test/Makefile.am index 074eb6039..07c25c1fa 100644 --- a/src/Logger/Test/Makefile.am +++ b/src/Logger/Test/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # Logger: CORBA Logger Server # File : Makefile.am # Author : Guillaume Boulant (CSSI) @@ -34,4 +35,4 @@ include $(top_srcdir)/salome_adm/unix/make_common_starter.am # # Executable scripts to be installed -dist_salomescript_SCRIPTS = TestKiller.py +dist_salomescript_PYTHON = TestKiller.py diff --git a/src/Logger/Test/TestKiller.py b/src/Logger/Test/TestKiller.py index 9ad3961c0..5ce72b9ca 100644 --- a/src/Logger/Test/TestKiller.py +++ b/src/Logger/Test/TestKiller.py @@ -1,24 +1,26 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + import sys, os,signal,string,commands def killNamingService(): diff --git a/src/MPIContainer/MPIContainer_i.cxx b/src/MPIContainer/MPIContainer_i.cxx index ecdfba30c..f72a0b5b8 100644 --- a/src/MPIContainer/MPIContainer_i.cxx +++ b/src/MPIContainer/MPIContainer_i.cxx @@ -1,29 +1,28 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SALOME MPIContainer : implemenation of container based on MPI libraries // File : MPIContainer_i.cxx // Module : SALOME -// -#include + +#include #include #include #include "Basics_Utils.hxx" @@ -38,62 +37,30 @@ #include // must be before Python.h ! #include #include "Container_init_python.hxx" -using namespace std; // L'appel au registry SALOME ne se fait que pour le process 0 -Engines_MPIContainer_i::Engines_MPIContainer_i(int nbproc, int numproc, - CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - char * containerName, - int argc, char *argv[]) - : Engines_Container_i(orb,poa,containerName,argc,argv,false), MPIObject_i(nbproc,numproc) +Engines_MPIContainer_i::Engines_MPIContainer_i(CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + char * containerName, + int argc, char *argv[]) + : Engines_Container_i(orb,poa,containerName,argc,argv,false) { - long id=0; - string IdContainerinNS; - char idc[3*sizeof(long)]; - MESSAGE("[" << numproc << "] activate object"); _id = _poa->activate_object(this); + CORBA::Object_var obj=_poa->id_to_reference(*_id); + Engines::Container_var pCont = Engines::Container::_narrow(obj); + _remove_ref(); - if(argc>1) - { - for(int i=0;iinit_orb( CORBA::ORB::_duplicate(_orb) ) ; - CORBA::Object_var obj=_poa->id_to_reference(*_id); - Engines::Container_var pCont = Engines::Container::_narrow(obj); - - string hostname = Kernel_Utils::GetHostname(); + std::string hostname = Kernel_Utils::GetHostname(); _containerName = _NS->BuildContainerNameForNS(containerName,hostname.c_str()); SCRUTE(_containerName); _NS->Register(pCont, _containerName.c_str()); - // A parallel container registers in Naming Service - // on the machine where is process 0. ContainerManager does'nt know the name - // of this machine before the launch of the parallel container. So to get - // the IOR of the parallel container in Naming Service, ContainerManager - // gives a unique Id. The parallel container registers his name under - // /ContainerManager/Id directory in NamingService - - IdContainerinNS = "/ContainerManager/id"; - sprintf(idc,"%ld",id); - IdContainerinNS += idc; - SCRUTE(IdContainerinNS); - _NS->Register(pCont, IdContainerinNS.c_str()); - } // Root recupere les ior des container des autre process @@ -101,8 +68,8 @@ Engines_MPIContainer_i::Engines_MPIContainer_i(int nbproc, int numproc, BCastIOR(_orb,pobj,true); } -Engines_MPIContainer_i::Engines_MPIContainer_i(int nbproc, int numproc) - : Engines_Container_i(), MPIObject_i(nbproc,numproc) +Engines_MPIContainer_i::Engines_MPIContainer_i() + : Engines_Container_i() { } @@ -118,38 +85,66 @@ void Engines_MPIContainer_i::Shutdown() MESSAGE("[" << _numproc << "] shutdown of MPI Corba Server"); if( _numproc == 0 ){ _NS->Destroy_FullDirectory(_containerName.c_str()); + _NS->Destroy_Name(_containerName.c_str()); for(ip= 1;ip<_nbproc;ip++) (Engines::MPIContainer::_narrow((*_tior)[ip]))->Shutdown(); } + + std::map::iterator itm; + for (itm = _listInstances_map.begin(); itm != _listInstances_map.end(); itm++) + { + try + { + itm->second->destroy(); + } + catch(const CORBA::Exception& e) + { + // ignore this entry and continue + } + catch(...) + { + // ignore this entry and continue + } + } + _orb->shutdown(0); } // Load a component library -bool Engines_MPIContainer_i::load_component_Library(const char* componentName) +bool Engines_MPIContainer_i::load_component_Library(const char* componentName, CORBA::String_out reason) { - if( _numproc == 0 ){ - // Invocation du chargement du composant dans les autres process - for(int ip= 1;ip<_nbproc;ip++) - (Engines::MPIContainer::_narrow((*_tior)[ip]))->Asload_component_Library(componentName); + reason=CORBA::string_dup(""); + + pthread_t *th; + if(_numproc == 0){ + th = new pthread_t[_nbproc]; + for(int ip=1;ip<_nbproc;ip++){ + thread_st *st = new thread_st; + st->ip = ip; + st->tior = _tior; + st->compoName = componentName; + pthread_create(&(th[ip]),NULL,th_loadcomponentlibrary,(void*)st); + } } - return Lload_component_Library(componentName); -} + bool ret = Lload_component_Library(componentName); -void Engines_MPIContainer_i::Asload_component_Library(const char* componentName) -{ - Lload_component_Library(componentName); + if(_numproc == 0){ + for(int ip=1;ip<_nbproc;ip++) + pthread_join(th[ip],NULL); + delete th; + } + return ret; } bool Engines_MPIContainer_i::Lload_component_Library(const char* componentName) { - string aCompName = componentName; + std::string aCompName = componentName; // --- try dlopen C++ component - string impl_name = string ("lib") + aCompName + string("Engine.so"); - SCRUTE(impl_name); + std::string impl_name = std::string ("lib") + aCompName + std::string("Engine.so"); _numInstanceMutex.lock(); // lock to be alone // (see decInstanceCnt, finalize_removal)) @@ -167,12 +162,13 @@ bool Engines_MPIContainer_i::Lload_component_Library(const char* componentName) { _library_map[impl_name] = handle; _numInstanceMutex.unlock(); + MESSAGE("[" << _numproc << "] Library " << impl_name << " loaded"); return true; } else { - INFOS("[" << _numproc << "] Can't load shared library : " << impl_name); - INFOS("[" << _numproc << "] error dlopen: " << dlerror()); + MESSAGE("[" << _numproc << "] Can't load shared library : " << impl_name); + MESSAGE("[" << _numproc << "] error dlopen: " << dlerror()); } _numInstanceMutex.unlock(); @@ -191,62 +187,75 @@ bool Engines_MPIContainer_i::Lload_component_Library(const char* componentName) else { Py_ACQUIRE_NEW_THREAD; - PyObject *mainmod = PyImport_AddModule("__main__"); + PyObject *mainmod = PyImport_AddModule((char *)"__main__"); PyObject *globals = PyModule_GetDict(mainmod); PyObject *pyCont = PyDict_GetItemString(globals, "pyCont"); PyObject *result = PyObject_CallMethod(pyCont, - "import_component", - "s",componentName); - int ret= PyInt_AsLong(result); + (char*)"import_component", + (char*)"s",componentName); + std::string ret= PyString_AsString(result); SCRUTE(ret); Py_RELEASE_NEW_THREAD; - if (ret) // import possible: Python component - { - _library_map[aCompName] = (void *)pyCont; // any non O value OK - MESSAGE("[" << _numproc << "] import Python: "<Ascreate_component_instance(componentName,studyId); + reason=CORBA::string_dup(""); + + pthread_t *th; + if(_numproc == 0){ + th = new pthread_t[_nbproc]; + for(int ip=1;ip<_nbproc;ip++){ + thread_st *st = new thread_st; + st->ip = ip; + st->tior = _tior; + st->compoName = componentName; + st->studyId = studyId; + pthread_create(&(th[ip]),NULL,th_createcomponentinstance,(void*)st); + } } - return Lcreate_component_instance(componentName,studyId); -} + Engines::EngineComponent_ptr cptr = Lcreate_component_instance(componentName,studyId); -void Engines_MPIContainer_i::Ascreate_component_instance( const char* componentName, - CORBA::Long studyId) -{ - Lcreate_component_instance(componentName,studyId); + if(_numproc == 0){ + for(int ip=1;ip<_nbproc;ip++) + pthread_join(th[ip],NULL); + delete th; + } + + return cptr; } -Engines::Component_ptr +Engines::EngineComponent_ptr Engines_MPIContainer_i::Lcreate_component_instance( const char* genericRegisterName, CORBA::Long studyId) { if (studyId < 0) { INFOS("studyId must be > 0 for mono study instance, =0 for multiStudy"); - return Engines::Component::_nil() ; + return Engines::EngineComponent::_nil() ; } - Engines::Component_var iobject = Engines::Component::_nil() ; + Engines::EngineComponent_var iobject = Engines::EngineComponent::_nil() ; Engines::MPIObject_var pobj; - string aCompName = genericRegisterName; + std::string aCompName = genericRegisterName; if (_library_map[aCompName]) { // Python component if (_isSupervContainer) { INFOS("Supervision Container does not support Python Component Engines"); - return Engines::Component::_nil(); + return Engines::EngineComponent::_nil(); } _numInstanceMutex.lock() ; // lock on the instance number _numInstance++ ; @@ -255,26 +264,29 @@ Engines_MPIContainer_i::Lcreate_component_instance( const char* genericRegisterN char aNumI[12]; sprintf( aNumI , "%d" , numInstance ) ; - string instanceName = aCompName + "_inst_" + aNumI ; - string component_registerName = + std::string instanceName = aCompName + "_inst_" + aNumI ; + std::string component_registerName = _containerName + "/" + instanceName; Py_ACQUIRE_NEW_THREAD; - PyObject *mainmod = PyImport_AddModule("__main__"); + PyObject *mainmod = PyImport_AddModule((char*)"__main__"); PyObject *globals = PyModule_GetDict(mainmod); PyObject *pyCont = PyDict_GetItemString(globals, "pyCont"); PyObject *result = PyObject_CallMethod(pyCont, - "create_component_instance", - "ssl", - aCompName.c_str(), - instanceName.c_str(), - studyId); - string iors = PyString_AsString(result); + (char*)"create_component_instance", + (char*)"ssl", + aCompName.c_str(), + instanceName.c_str(), + studyId); + const char *ior; + const char *error; + PyArg_ParseTuple(result,"ss", &ior, &error); + std::string iors = ior; SCRUTE(iors); Py_RELEASE_NEW_THREAD; CORBA::Object_var obj = _orb->string_to_object(iors.c_str()); - iobject = Engines::Component::_narrow( obj ) ; + iobject = Engines::EngineComponent::_narrow( obj ) ; pobj = Engines::MPIObject::_narrow(obj) ; if( _numproc == 0 ) _NS->Register(iobject, component_registerName.c_str()) ; @@ -286,56 +298,53 @@ Engines_MPIContainer_i::Lcreate_component_instance( const char* genericRegisterN //--- try C++ - string impl_name = string ("lib") + genericRegisterName +string("Engine.so"); - void* handle = _library_map[impl_name]; - if ( !handle ) { - INFOS("shared library " << impl_name <<"must be loaded before instance"); - return Engines::Component::_nil() ; - } - else { - iobject = createMPIInstance(genericRegisterName, - handle, - studyId); - return iobject._retn(); - } + std::string impl_name = std::string ("lib") + genericRegisterName +std::string("Engine.so"); + if (_library_map.count(impl_name) != 0) // C++ component + { + void* handle = _library_map[impl_name]; + iobject = createMPIInstance(genericRegisterName, + handle, + studyId); + return iobject._retn(); + } + + return Engines::EngineComponent::_nil() ; } -Engines::Component_ptr -Engines_MPIContainer_i::createMPIInstance(string genericRegisterName, - void *handle, - int studyId) +Engines::EngineComponent_ptr +Engines_MPIContainer_i::createMPIInstance(std::string genericRegisterName, + void *handle, + int studyId) { - Engines::Component_var iobject; + Engines::EngineComponent_var iobject; Engines::MPIObject_var pobj; // --- find the factory - string aGenRegisterName = genericRegisterName; - string factory_name = aGenRegisterName + string("Engine_factory"); - SCRUTE(factory_name) ; + std::string aGenRegisterName = genericRegisterName; + std::string factory_name = aGenRegisterName + std::string("Engine_factory"); typedef PortableServer::ObjectId * (*MPIFACTORY_FUNCTION) - (int,int, - CORBA::ORB_ptr, + (CORBA::ORB_ptr, PortableServer::POA_ptr, PortableServer::ObjectId *, const char *, const char *) ; - MPIFACTORY_FUNCTION MPIComponent_factory - = (MPIFACTORY_FUNCTION) dlsym(handle, factory_name.c_str()); + dlerror(); + MPIFACTORY_FUNCTION MPIComponent_factory = (MPIFACTORY_FUNCTION) dlsym(handle, factory_name.c_str()); - char *error ; - if ( (error = dlerror() ) != NULL) { - // Try to load a sequential component - MESSAGE("[" << _numproc << "] Try to load a sequential component"); - _numInstanceMutex.unlock() ; - iobject = Engines_Container_i::createInstance(genericRegisterName,handle,studyId); - if( CORBA::is_nil(iobject) ) return Engines::Component::_duplicate(iobject); - } + if ( !MPIComponent_factory ) + { + INFOS( "[" << _numproc << "] Can't resolve symbol: " + factory_name ); + SCRUTE( dlerror() ); + pobj = Engines::MPIObject::_nil(); + BCastIOR(_orb,pobj,false); + return Engines::EngineComponent::_nil(); + } // --- create instance - iobject = Engines::Component::_nil() ; + iobject = Engines::EngineComponent::_nil() ; try { @@ -346,81 +355,89 @@ Engines_MPIContainer_i::createMPIInstance(string genericRegisterName, char aNumI[12]; sprintf( aNumI , "%d" , numInstance ) ; - string instanceName = aGenRegisterName + "_inst_" + aNumI ; - string component_registerName = - _containerName + "/" + instanceName; + std::string instanceName = aGenRegisterName + "_inst_" + aNumI ; + std::string component_registerName = + _containerName + "/" + instanceName; // --- Instanciate required CORBA object PortableServer::ObjectId *id ; //not owner, do not delete (nore use var) - id = (MPIComponent_factory) ( _nbproc,_numproc,_orb, _poa, _id, instanceName.c_str(), - aGenRegisterName.c_str() ) ; + id = (MPIComponent_factory) ( _orb, _poa, _id, instanceName.c_str(), aGenRegisterName.c_str() ) ; // --- get reference & servant from id CORBA::Object_var obj = _poa->id_to_reference(*id); - iobject = Engines::Component::_narrow( obj ) ; + iobject = Engines::EngineComponent::_narrow( obj ) ; pobj = Engines::MPIObject::_narrow(obj) ; Engines_Component_i *servant = - dynamic_cast(_poa->reference_to_servant(iobject)); + dynamic_cast(_poa->reference_to_servant(iobject)); ASSERT(servant); //SCRUTE(servant->pd_refCount); servant->_remove_ref(); // compensate previous id_to_reference //SCRUTE(servant->pd_refCount); _listInstances_map[instanceName] = iobject; _cntInstances_map[aGenRegisterName] += 1; - SCRUTE(aGenRegisterName); - SCRUTE(_cntInstances_map[aGenRegisterName]); //SCRUTE(servant->pd_refCount); +#ifndef _DEBUG_ + servant->setStudyId(studyId); +#else bool ret_studyId = servant->setStudyId(studyId); ASSERT(ret_studyId); +#endif // --- register the engine under the name // containerName(.dir)/instanceName(.object) if( _numproc == 0 ){ - _NS->Register( iobject , component_registerName.c_str() ) ; - MESSAGE( component_registerName.c_str() << " bound" ) ; + _NS->Register( iobject , component_registerName.c_str() ) ; + MESSAGE( component_registerName.c_str() << " bound" ) ; } // Root recupere les ior des composants des autre process BCastIOR(_orb,pobj,false); } - catch (...) - { - INFOS( "Container_i::createInstance exception catched" ) ; - } + catch(const std::exception &ex){ + INFOS( ex.what() ) ; + return Engines::EngineComponent::_nil(); + } return iobject._retn(); } // Load component -Engines::Component_ptr Engines_MPIContainer_i::load_impl(const char* nameToRegister, - const char* componentName) +Engines::EngineComponent_ptr Engines_MPIContainer_i::load_impl(const char* nameToRegister, + const char* componentName) { - if( _numproc == 0 ){ - // Invocation du chargement du composant dans les autres process - for(int ip= 1;ip<_nbproc;ip++) - (Engines::MPIContainer::_narrow((*_tior)[ip]))->Asload_impl(nameToRegister, - componentName); + pthread_t *th; + if(_numproc == 0){ + th = new pthread_t[_nbproc]; + for(int ip=1;ip<_nbproc;ip++){ + thread_st *st = new thread_st; + st->ip = ip; + st->tior = _tior; + st->nameToRegister = nameToRegister; + st->compoName = componentName; + pthread_create(&(th[ip]),NULL,th_loadimpl,(void*)st); + } } - return Lload_impl(nameToRegister,componentName); + Engines::EngineComponent_ptr cptr = Lload_impl(nameToRegister,componentName); -} + if(_numproc == 0){ + for(int ip=1;ip<_nbproc;ip++) + pthread_join(th[ip],NULL); + delete th; + } -// Load component -void Engines_MPIContainer_i::Asload_impl(const char* nameToRegister, - const char* componentName) -{ - Lload_impl(nameToRegister,componentName); + return cptr; } -Engines::Component_ptr Engines_MPIContainer_i::Lload_impl( - const char* nameToRegister, - const char* componentName) +// Load component +Engines::EngineComponent_ptr Engines_MPIContainer_i::Lload_impl( + const char* nameToRegister, + const char* componentName) { - Engines::Component_var iobject; + Engines::EngineComponent_var iobject; Engines::MPIObject_var pobj; char cproc[4]; @@ -433,35 +450,34 @@ Engines::Component_ptr Engines_MPIContainer_i::Lload_impl( char _aNumI[12]; sprintf(_aNumI,"%d",_numInstance) ; - string _impl_name = componentName; - string _nameToRegister = nameToRegister; - string instanceName = _nameToRegister + "_inst_" + _aNumI + cproc; + std::string _impl_name = componentName; + std::string _nameToRegister = nameToRegister; + std::string instanceName = _nameToRegister + "_inst_" + _aNumI + cproc; MESSAGE("[" << _numproc << "] instanceName=" << instanceName); - string absolute_impl_name(_impl_name); + std::string absolute_impl_name(_impl_name); MESSAGE("[" << _numproc << "] absolute_impl_name=" << absolute_impl_name); void * handle = dlopen(absolute_impl_name.c_str(), RTLD_LAZY); if(!handle){ INFOS("[" << _numproc << "] Can't load shared library : " << absolute_impl_name); INFOS("[" << _numproc << "] error dlopen: " << dlerror()); - return Engines::Component::_nil() ; + return Engines::EngineComponent::_nil() ; } - string factory_name = _nameToRegister + string("Engine_factory"); + std::string factory_name = _nameToRegister + std::string("Engine_factory"); MESSAGE("[" << _numproc << "] factory_name=" << factory_name) ; - PortableServer::ObjectId * (*MPIComponent_factory) (int,int, - CORBA::ORB_ptr, - PortableServer::POA_ptr, - PortableServer::ObjectId *, - const char *, - const char *) = - (PortableServer::ObjectId * (*) (int,int, - CORBA::ORB_ptr, - PortableServer::POA_ptr, - PortableServer::ObjectId *, - const char *, - const char *)) + dlerror(); + PortableServer::ObjectId * (*MPIComponent_factory) (CORBA::ORB_ptr, + PortableServer::POA_ptr, + PortableServer::ObjectId *, + const char *, + const char *) = + (PortableServer::ObjectId * (*) (CORBA::ORB_ptr, + PortableServer::POA_ptr, + PortableServer::ObjectId *, + const char *, + const char *)) dlsym(handle, factory_name.c_str()); char *error ; @@ -470,23 +486,23 @@ Engines::Component_ptr Engines_MPIContainer_i::Lload_impl( MESSAGE("[" << _numproc << "] Try to load a sequential component"); _numInstanceMutex.unlock() ; iobject = Engines_Container_i::load_impl(nameToRegister,componentName); - if( CORBA::is_nil(iobject) ) return Engines::Component::_duplicate(iobject); + if( CORBA::is_nil(iobject) ) return Engines::EngineComponent::_duplicate(iobject); } else{ // Instanciation du composant parallele MESSAGE("[" << _numproc << "] Try to load a parallel component"); PortableServer::ObjectId * id = (MPIComponent_factory) - (_nbproc,_numproc,_orb, _poa, _id, instanceName.c_str(), _nameToRegister.c_str()); + (_orb, _poa, _id, instanceName.c_str(), _nameToRegister.c_str()); // get reference from id CORBA::Object_var o = _poa->id_to_reference(*id); pobj = Engines::MPIObject::_narrow(o) ; - iobject = Engines::Component::_narrow(o) ; + iobject = Engines::EngineComponent::_narrow(o) ; } if( _numproc == 0 ){ // utiliser + tard le registry ici : // register the engine under the name containerName.dir/nameToRegister.object - string component_registerName = _containerName + "/" + _nameToRegister; + std::string component_registerName = _containerName + "/" + _nameToRegister; _NS->Register(iobject, component_registerName.c_str()) ; } @@ -496,89 +512,118 @@ Engines::Component_ptr Engines_MPIContainer_i::Lload_impl( BCastIOR(_orb,pobj,false); END_OF("[" <<_numproc << "] MPIContainer_i::Lload_impl"); - return Engines::Component::_duplicate(iobject); + return Engines::EngineComponent::_duplicate(iobject); } -void Engines_MPIContainer_i::remove_impl(Engines::Component_ptr component_i) +void Engines_MPIContainer_i::remove_impl(Engines::EngineComponent_ptr component_i) { - int ip; - Engines::Component_ptr cptr; Engines::MPIObject_ptr pcptr; Engines::MPIObject_ptr spcptr; - ASSERT(! CORBA::is_nil(component_i)); - - if( _numproc == 0 ){ - // Invocation de la destruction du composant dans les autres process + pthread_t *th; + if(_numproc == 0){ pcptr = (Engines::MPIObject_ptr)component_i; - for(ip= 1;ip<_nbproc;ip++){ + th = new pthread_t[_nbproc]; + for(int ip=1;ip<_nbproc;ip++){ + thread_st *st = new thread_st; + st->ip = ip; + st->tior = _tior; spcptr = Engines::MPIObject::_narrow((*(pcptr->tior()))[ip]); - cptr = (Engines::Component_ptr)spcptr; - (Engines::MPIContainer::_narrow((*_tior)[ip]))->Asremove_impl(cptr); + st->cptr = (Engines::EngineComponent_ptr)spcptr; + pthread_create(&(th[ip]),NULL,th_removeimpl,(void*)st); } } - Lremove_impl(component_i); -} - -void Engines_MPIContainer_i::Asremove_impl(Engines::Component_ptr component_i) -{ - Lremove_impl(component_i); -} - -void Engines_MPIContainer_i::Lremove_impl(Engines::Component_ptr component_i) -{ - BEGIN_OF("[" << _numproc << "] MPIContainer_i::Lremove_impl"); - ASSERT(! CORBA::is_nil(component_i)); - - string instanceName = component_i->instanceName() ; + std::string instanceName = component_i->instanceName() ; MESSAGE("[" << _numproc << "] unload component " << instanceName); - component_i->destroy() ; - MESSAGE("[" << _numproc << "] test key handle_map"); _numInstanceMutex.lock() ; // lock on the remove on handle_map + _listInstances_map.erase(instanceName); _numInstanceMutex.unlock() ; - MESSAGE("[" << _numproc << "] list handle_map"); + component_i->destroy() ; + if(_numproc == 0) + _NS->Destroy_Name(instanceName.c_str()); - END_OF("[" << _numproc << "] MPIContainer_i::Lremove_impl"); + if(_numproc == 0){ + for(int ip=1;ip<_nbproc;ip++) + pthread_join(th[ip],NULL); + delete th; + } } void Engines_MPIContainer_i::finalize_removal() { - int ip; + pthread_t *th; + if(_numproc == 0){ + th = new pthread_t[_nbproc]; + for(int ip=1;ip<_nbproc;ip++){ + thread_st *st = new thread_st; + st->ip = ip; + st->tior = _tior; + pthread_create(&(th[ip]),NULL,th_finalizeremoval,(void*)st); + } + } - if( _numproc == 0 ){ - // Invocation de la destruction du composant dans les autres process - for(ip= 1;ip<_nbproc;ip++) - (Engines::MPIContainer::_narrow((*_tior)[ip]))->Asfinalize_removal(); + _numInstanceMutex.lock(); // lock to be alone + // (see decInstanceCnt, load_component_Library) + std::map::iterator ith; + for (ith = _toRemove_map.begin(); ith != _toRemove_map.end(); ith++) + { + void *handle = (*ith).second; + std::string impl_name= (*ith).first; + if (handle) + { + SCRUTE(handle); + SCRUTE(impl_name); + // dlclose(handle); // SALOME unstable after ... + // _library_map.erase(impl_name); + } + } + _toRemove_map.clear(); + _numInstanceMutex.unlock(); + + if(_numproc == 0){ + for(int ip=1;ip<_nbproc;ip++) + pthread_join(th[ip],NULL); + delete th; } +} + +void *th_loadcomponentlibrary(void *s) +{ + thread_st *st = (thread_st*)s; + char* reason; + (Engines::MPIContainer::_narrow((*(st->tior))[st->ip]))->load_component_Library(st->compoName.c_str(),reason); + CORBA::string_free(reason); + return NULL; +} - Lfinalize_removal(); +void *th_createcomponentinstance(void *s) +{ + thread_st *st = (thread_st*)s; + (Engines::MPIContainer::_narrow((*(st->tior))[st->ip]))->create_component_instance(st->compoName.c_str(),st->studyId); + return NULL; +} + +void *th_loadimpl(void *s) +{ + thread_st *st = (thread_st*)s; + (Engines::MPIContainer::_narrow((*(st->tior))[st->ip]))->load_impl(st->nameToRegister.c_str(),st->compoName.c_str()); + return NULL; } -void Engines_MPIContainer_i::Asfinalize_removal() +void *th_removeimpl(void *s) { - Lfinalize_removal(); + thread_st *st = (thread_st*)s; + (Engines::MPIContainer::_narrow((*(st->tior))[st->ip]))->remove_impl(st->cptr); + return NULL; } -void Engines_MPIContainer_i::Lfinalize_removal() +void *th_finalizeremoval(void *s) { - BEGIN_OF("[" << _numproc << "] MPIContainer_i::Lfinalize_removal"); - -// map::iterator im ; -// // lock on the explore remove_map & dlclose -// _numInstanceMutex.lock() ; -// for (im = remove_map.begin() ; im != remove_map.end() ; im ++) -// { -// void * handle = (*im).second ; -// MESSAGE("[" << _numproc << "] dlclose " << (*im).first); -// dlclose(handle) ; -// } -// MESSAGE("[" << _numproc << "] remove_map.clear()"); -// remove_map.clear() ; -// _numInstanceMutex.unlock() ; - - END_OF("[" << _numproc << "] MPIContainer_i::Lfinalize_removal"); + thread_st *st = (thread_st*)s; + (Engines::MPIContainer::_narrow((*(st->tior))[st->ip]))->finalize_removal(); + return NULL; } diff --git a/src/MPIContainer/MPIContainer_i.hxx b/src/MPIContainer/MPIContainer_i.hxx index a65448540..62a0989c8 100644 --- a/src/MPIContainer/MPIContainer_i.hxx +++ b/src/MPIContainer/MPIContainer_i.hxx @@ -1,28 +1,27 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SALOME MPIContainer : implemenation of container based on MPI libraries // File : MPIContainer_i.hxx // Module : SALOME -// + #ifndef _SALOME_PCONTAINER_ #define _SALOME_PCONTAINER_ @@ -31,19 +30,33 @@ #include "SALOME_Container_i.hxx" #include "MPIObject_i.hxx" +void * th_loadcomponentlibrary(void *st); +void * th_createcomponentinstance(void *st); +void * th_loadimpl(void *st); +void * th_removeimpl(void *st); +void * th_finalizeremoval(void *st); + +typedef struct { + int ip; + Engines::IORTab* tior; + std::string compoName; + std::string nameToRegister; + long studyId; + Engines::EngineComponent_ptr cptr; +} thread_st; + class Engines_MPIContainer_i : public POA_Engines::MPIContainer, - public Engines_Container_i, - public MPIObject_i + public Engines_Container_i, + public MPIObject_i { public: // Constructor - Engines_MPIContainer_i( int nbproc, int numproc, - CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - char * containerName, - int argc, char *argv[]); - Engines_MPIContainer_i(int nbproc, int numproc); + Engines_MPIContainer_i( CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + char * containerName, + int argc, char *argv[]); + Engines_MPIContainer_i(); // Destructor ~Engines_MPIContainer_i(); @@ -52,53 +65,40 @@ class Engines_MPIContainer_i : public POA_Engines::MPIContainer, // Load a component library // synchronous version for process 0 - bool load_component_Library(const char* componentName); - // asynchronous version for other process - void Asload_component_Library(const char* componentName); + bool load_component_Library(const char* componentName, CORBA::String_out reason); // Create an instance of component // synchronous version for process 0 - Engines::Component_ptr - create_component_instance( const char* componentName, - CORBA::Long studyId); // 0 for multiStudy - // asynchronous version for other process - void Ascreate_component_instance( const char* componentName, - CORBA::Long studyId); // 0 for multiStudy + virtual Engines::EngineComponent_ptr + create_component_instance_env( const char* componentName, + CORBA::Long studyId, // 0 for multiStudy + const Engines::FieldsDict& env, + CORBA::String_out reason); // Load a component in current MPI container // synchronous version for process 0 - Engines::Component_ptr load_impl(const char* nameToRegister, - const char* componentName); - // asynchronous version for other process - void Asload_impl(const char* nameToRegister, const char* componentName); + Engines::EngineComponent_ptr load_impl(const char* nameToRegister, + const char* componentName); // Unload a component from current MPI container // synchronous version for process 0 - void remove_impl(Engines::Component_ptr component_i); - // asynchronous version for other process - void Asremove_impl(Engines::Component_ptr component_i); + void remove_impl(Engines::EngineComponent_ptr component_i); // synchronous version for process 0 void finalize_removal(); - // asynchronous version for other process - void Asfinalize_removal(); private: - // local version to not duplicate code - // called by synchronous and asynchronous version bool Lload_component_Library(const char* componentName); - Engines::Component_ptr + Engines::EngineComponent_ptr Lcreate_component_instance( const char* componentName, - CORBA::Long studyId); // 0 for multiStudy - Engines::Component_ptr Lload_impl(const char* nameToRegister, - const char* componentName); - void Lremove_impl(Engines::Component_ptr component_i); - void Lfinalize_removal(); + CORBA::Long studyId); // 0 for multiStudy + Engines::EngineComponent_ptr Lload_impl(const char* nameToRegister, + const char* componentName); - Engines::Component_ptr + Engines::EngineComponent_ptr createMPIInstance(std::string genericRegisterName, - void *handle, - int studyId); + void *handle, + int studyId); }; #endif diff --git a/src/MPIContainer/MPIObject_i.cxx b/src/MPIContainer/MPIObject_i.cxx index f68a739b6..94bba7b48 100644 --- a/src/MPIContainer/MPIObject_i.cxx +++ b/src/MPIContainer/MPIObject_i.cxx @@ -1,32 +1,38 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME MPIContainer : implemenation of container based on MPI libraries // File : MPIObject_i.cxx // Module : SALOME // -#include #include "MPIObject_i.hxx" #include "utilities.h" -using namespace std; +#include "Utils_SALOME_Exception.hxx" + +#define TIMEOUT 5 + +#ifndef WIN32 +#include +#endif MPIObject_i::MPIObject_i() { @@ -35,13 +41,6 @@ MPIObject_i::MPIObject_i() _tior=NULL; } -MPIObject_i::MPIObject_i(int nbproc, int numproc) -{ - _nbproc = nbproc; - _numproc = numproc; - _tior=NULL; -} - MPIObject_i::~MPIObject_i() { if(_tior) delete _tior; @@ -64,62 +63,200 @@ void MPIObject_i::tior(const Engines::IORTab& ior) (*_tior)[ip] = ior[ip]; } -void MPIObject_i::BCastIOR(CORBA::ORB_ptr orb, Engines::MPIObject_ptr pobj, - bool amiCont) +void MPIObject_i::BCastIOR(CORBA::ORB_ptr orb, Engines::MPIObject_ptr pobj, bool amiCont) { int err, ip, n; char *ior; MPI_Status status; /* status de reception de message MPI */ + std::ostringstream msg; + + if( _numproc == 0 ) + { + + //Allocation du tableau des IOR + Engines::IORTab_var iort = new Engines::IORTab; + iort->length(_nbproc); + + iort[0] = pobj; - if( _numproc == 0 ){ - - //Allocation du tableau des IOR - Engines::IORTab_var iort = new Engines::IORTab; - iort->length(_nbproc); - - iort[0] = pobj; - - // Process 0 recupere les ior de l'object sur les autres process - for(ip=1;ip<_nbproc;ip++){ - err = MPI_Recv(&n,1,MPI_INT,ip,ip,MPI_COMM_WORLD,&status); - if(err){ - MESSAGE("[" << _numproc << "] MPI_RECV error"); - exit(1); - } - // Allocation de la chaine de longueur n - ior = new char[n]; - err = MPI_Recv(ior,n,MPI_CHAR,ip,2*ip,MPI_COMM_WORLD,&status); - if(err){ - MESSAGE("[" << _numproc << "] MPI_RECV error"); - exit(1); - } - iort[ip] = orb->string_to_object(ior); - delete [] ior; + // Process 0 recupere les ior de l'object sur les autres process + for(ip=1;ip<_nbproc;ip++) + { + err = MPI_Recv(&n,1,MPI_INT,ip,ip,MPI_COMM_WORLD,&status); + if(err) + { + msg << "[" << _numproc << "] MPI_RECV error"; + throw SALOME_Exception(msg.str().c_str()); + } + // Allocation de la chaine de longueur n + ior = new char[n]; + err = MPI_Recv(ior,n,MPI_CHAR,ip,2*ip,MPI_COMM_WORLD,&status); + if(err) + { + msg << "[" << _numproc << "] MPI_RECV error"; + throw SALOME_Exception(msg.str().c_str()); + } + iort[ip] = orb->string_to_object(ior); + delete [] ior; + if(CORBA::is_nil(iort[ip])) + { + msg << "[" << ip << "] MPI Component not loaded"; + throw SALOME_Exception(msg.str().c_str()); + } + } + // On donne le tableau des ior a l'objet Corba du process 0 + if( amiCont ) + tior(*(iort._retn())); + else + pobj->tior(*(iort._retn())); } - // On donne le tableau des ior a l'objet Corba du process 0 - if( amiCont ) - tior(*(iort._retn())); - else - pobj->tior(*(iort._retn())); - - } - else{ - // Conversion IOR vers string - ior = orb->object_to_string(pobj); - n = strlen(ior) + 1; - // On envoie l'IOR au process 0 - err = MPI_Send(&n,1,MPI_INT,0,_numproc,MPI_COMM_WORLD); - if(err){ - MESSAGE("[" << _numproc << "] MPI_SEND error"); - exit(1); + else + { + // Conversion IOR vers string + ior = orb->object_to_string(pobj); + n = strlen(ior) + 1; + // On envoie l'IOR au process 0 + err = MPI_Send(&n,1,MPI_INT,0,_numproc,MPI_COMM_WORLD); + if(err) + { + msg << "[" << _numproc << "] MPI_SEND error"; + throw SALOME_Exception(msg.str().c_str()); + } + err = MPI_Send(ior,n,MPI_CHAR,0,2*_numproc,MPI_COMM_WORLD); + if(err) + { + msg << "[" << _numproc << "] MPI_SEND error"; + throw SALOME_Exception(msg.str().c_str()); + } + CORBA::string_free(ior); } - err = MPI_Send(ior,n,MPI_CHAR,0,2*_numproc,MPI_COMM_WORLD); - if(err){ - MESSAGE("[" << _numproc << "] MPI_SEND error"); - exit(1); + +} + +#ifdef HAVE_MPI2 +void MPIObject_i::remoteMPI2Connect(std::string service) +{ + int i; + char port_name[MPI_MAX_PORT_NAME]; + char port_name_clt[MPI_MAX_PORT_NAME]; + std::ostringstream msg; + + if( service.size() == 0 ) + { + msg << "[" << _numproc << "] You have to give a service name !"; + throw SALOME_Exception(msg.str().c_str()); + } + + if( _srv.find(service) != _srv.end() ) + { + msg << "[" << _numproc << "] service " << service << " already exist !"; + throw SALOME_Exception(msg.str().c_str()); + } + + _srv[service] = false; + + MPI_Barrier(MPI_COMM_WORLD); + + MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_RETURN); + if( _numproc == 0 ) + { + /* rank 0 try to be a server. If service is already published, try to be a cient */ + MPI_Open_port(MPI_INFO_NULL, port_name); + if ( MPI_Lookup_name((char*)service.c_str(), MPI_INFO_NULL, port_name_clt) == MPI_SUCCESS ) + { + MESSAGE("[" << _numproc << "] I get the connection with " << service << " at " << port_name_clt << std::endl); + MPI_Close_port( port_name ); + } + else if ( MPI_Publish_name((char*)service.c_str(), MPI_INFO_NULL, port_name) == MPI_SUCCESS ) + { + _srv[service] = true; + _port_name[service] = port_name; + MESSAGE("[" << _numproc << "] service " << service << " available at " << port_name << std::endl); + } + else if ( MPI_Lookup_name((char*)service.c_str(), MPI_INFO_NULL, port_name_clt) == MPI_SUCCESS ) + { + MESSAGE("[" << _numproc << "] I get the connection with " << service << " at " << port_name_clt << std::endl); + MPI_Close_port( port_name ); + } + else + { + msg << "[" << _numproc << "] Error on connection with " << service << " at " << port_name_clt; + throw SALOME_Exception(msg.str().c_str()); + } + } + else + { + i=0; + /* Waiting rank 0 publish name and try to be a client */ + while ( i != TIMEOUT ) + { + sleep(1); + if ( MPI_Lookup_name((char*)service.c_str(), MPI_INFO_NULL, port_name_clt) == MPI_SUCCESS ) + { + MESSAGE("[" << _numproc << "] I get the connection with " << service << " at " << port_name_clt << std::endl); + break; + } + i++; + } + if(i==TIMEOUT) + { + msg << "[" << _numproc << "] Error on connection with " << service << " at " << port_name_clt; + throw SALOME_Exception(msg.str().c_str()); + } + } + MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL); + + /* If rank 0 is server, all processes call MPI_Comm_accept */ + /* If rank 0 is not server, all processes call MPI_Comm_connect */ + int srv = (int)_srv[service]; + MPI_Bcast(&srv,1,MPI_INT,0,MPI_COMM_WORLD); + _srv[service] = (bool)srv; + if ( _srv[service] ) + MPI_Comm_accept( port_name, MPI_INFO_NULL, 0, MPI_COMM_WORLD, &(_icom[service]) ); + else + MPI_Comm_connect(port_name_clt, MPI_INFO_NULL, 0, MPI_COMM_WORLD, &(_icom[service]) ); + + /* create global communicator: servers have low index in global communicator*/ + MPI_Intercomm_merge(_icom[service],!_srv[service],&(_gcom[service])); + + /* only rank 0 can be server for unpublish name */ + if(_numproc != 0) _srv[service] = false; + +} + +void MPIObject_i::remoteMPI2Disconnect(std::string service) +{ + std::ostringstream msg; + + if( service.size() == 0 ) + { + msg << "[" << _numproc << "] You have to give a service name !"; + throw SALOME_Exception(msg.str().c_str()); + } + + if( _srv.find(service) == _srv.end() ) + { + msg << "[" << _numproc << "] service " << service << " don't exist !"; + throw SALOME_Exception(msg.str().c_str()); + } + + MPI_Comm_disconnect( &(_gcom[service]) ); + if ( _srv[service] ) + { + + char port_name[MPI_MAX_PORT_NAME]; + strcpy(port_name,_port_name[service].c_str()); + + MPI_Unpublish_name((char*)service.c_str(), MPI_INFO_NULL, port_name); + MESSAGE("[" << _numproc << "] " << service << ": close port " << _port_name[service] << std::endl); + MPI_Close_port( port_name ); + _port_name.erase(service); } - CORBA::string_free(ior); - } + + _gcom.erase(service); + _icom.erase(service); + _srv.erase(service); } +#endif diff --git a/src/MPIContainer/MPIObject_i.hxx b/src/MPIContainer/MPIObject_i.hxx index 21ea9d84c..20c94b8c7 100644 --- a/src/MPIContainer/MPIObject_i.hxx +++ b/src/MPIContainer/MPIObject_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME MPIContainer : implemenation of container based on MPI libraries // File : MPIObject_i.hxx // Module : SALOME @@ -26,14 +27,16 @@ #ifndef _SALOME_POBJECT_I_H_ #define _SALOME_POBJECT_I_H_ +#include +#include +#include #include #include CORBA_SERVER_HEADER(SALOME_MPIObject) -class MPIObject_i: public POA_Engines::MPIObject +class MPIObject_i: public virtual POA_Engines::MPIObject { public: MPIObject_i(); - MPIObject_i(int nbproc, int numproc); ~MPIObject_i(); Engines::IORTab* tior(); @@ -48,6 +51,21 @@ class MPIObject_i: public POA_Engines::MPIObject Engines::IORTab* _tior; // Echange des IOR de l'objet entre process void BCastIOR(CORBA::ORB_ptr orb,Engines::MPIObject_ptr pobj,bool amiCont); +#ifdef HAVE_MPI2 + // MPI2 connection + void remoteMPI2Connect(std::string service); + // MPI2 disconnection + void remoteMPI2Disconnect(std::string service); +#endif + +protected: + std::map _gcom; + +private: + std::map _icom; + std::map _srv; + std::map _port_name; + } ; #endif diff --git a/src/MPIContainer/Makefile.am b/src/MPIContainer/Makefile.am index 84bd2bbfe..6f550a69e 100644 --- a/src/MPIContainer/Makefile.am +++ b/src/MPIContainer/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # SALOME MPIContainer : implemenation of container based on MPI libraries # File : Makefile.am # Author : Guillaume Boulant (CSSI) @@ -41,6 +42,10 @@ salomeinclude_HEADERS = \ MPIObject_i.hxx \ MPIContainer_i.hxx +# These files are executable scripts +dist_salomescript_SCRIPTS = \ + launch_testMPI2.csh + # # =============================================================== # Local definitions @@ -60,7 +65,7 @@ COMMON_CPPFLAGS=\ -I$(srcdir)/../Notification \ -I$(srcdir)/../ResourcesManager \ -I$(srcdir)/../Container \ - -I$(top_builddir)/salome_adm/unix \ + -I$(srcdir)/../GenericObj \ -I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ @@ -74,6 +79,7 @@ COMMON_LIBS =\ ../SALOMELocalTrace/libSALOMELocalTrace.la \ ../Basics/libSALOMEBasics.la \ ../Container/libSalomeContainer.la \ + ../GenericObj/libSalomeGenericObj.la \ $(top_builddir)/idl/libSalomeIDLKernel.la\ @CORBA_LIBS@ @@ -95,9 +101,11 @@ libSalomeMPIContainer_la_LIBADD = $(COMMON_LIBS) # Executables targets # =============================================================== # -bin_PROGRAMS = SALOME_MPIContainer +bin_PROGRAMS = SALOME_MPIContainer testMPI2 SALOME_MPIContainer_SOURCES = SALOME_MPIContainer.cxx -SALOME_MPIContainer_LDADD = libSalomeMPIContainer.la @PYTHON_LIBS@ @MPI_LIBS@ +SALOME_MPIContainer_LDADD = libSalomeMPIContainer.la $(COMMON_LIBS) @PYTHON_LIBS@ @MPI_LIBS@ SALOME_MPIContainer_CPPFLAGS = $(COMMON_CPPFLAGS) - +testMPI2_SOURCES = testMPI2.cxx +testMPI2_LDADD = @MPI_LIBS@ +testMPI2_CPPFLAGS = @MPI_INCLUDES@ diff --git a/src/MPIContainer/SALOME_MPIContainer.cxx b/src/MPIContainer/SALOME_MPIContainer.cxx index 647e54470..e75ba6974 100644 --- a/src/MPIContainer/SALOME_MPIContainer.cxx +++ b/src/MPIContainer/SALOME_MPIContainer.cxx @@ -1,36 +1,35 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include #include #include "MPIContainer_i.hxx" #include "Utils_ORB_INIT.hxx" #include "Utils_SINGLETON.hxx" #include "utilities.h" -using namespace std; int main(int argc, char* argv[]) { int nbproc, numproc; - Engines_MPIContainer_i * myContainer=NULL; MPI_Init(&argc,&argv); MPI_Comm_size(MPI_COMM_WORLD,&nbproc); @@ -51,39 +50,14 @@ int main(int argc, char* argv[]) // obtain the root poa manager PortableServer::POAManager_var pman = root_poa->the_POAManager(); - // define policy objects - PortableServer::ImplicitActivationPolicy_var implicitActivation = - root_poa->create_implicit_activation_policy(PortableServer::NO_IMPLICIT_ACTIVATION) ; - - // default = NO_IMPLICIT_ACTIVATION - PortableServer::ThreadPolicy_var threadPolicy = - root_poa->create_thread_policy(PortableServer::ORB_CTRL_MODEL) ; - // default = ORB_CTRL_MODEL, other choice SINGLE_THREAD_MODEL - - // create policy list - CORBA::PolicyList policyList; - policyList.length(2); - policyList[0] = PortableServer::ImplicitActivationPolicy::_duplicate(implicitActivation) ; - policyList[1] = PortableServer::ThreadPolicy::_duplicate(threadPolicy) ; - - // create the child POA - PortableServer::POAManager_var nil_mgr = PortableServer::POAManager::_nil() ; - PortableServer::POA_var factory_poa = - root_poa->create_POA("factory_poa", pman, policyList) ; - //with nil_mgr instead of pman, a new POA manager is created with the new POA - - // destroy policy objects - implicitActivation->destroy() ; - threadPolicy->destroy() ; - - char *containerName = ""; + char *containerName = (char *)""; if (argc >1) { - containerName = argv[1] ; + containerName = argv[1] ; } MESSAGE("[" << numproc << "] MPIContainer: load MPIContainer servant"); - myContainer = new Engines_MPIContainer_i(nbproc,numproc,orb,factory_poa, containerName,argc,argv); + new Engines_MPIContainer_i(orb,root_poa, containerName,argc,argv); pman->activate(); @@ -106,13 +80,11 @@ int main(int argc, char* argv[]) INFOS("Caught unknown exception."); } - if(myContainer) - delete myContainer; + MPI_Finalize(); END_OF("[" << numproc << "] " << argv[0]); - // delete myThreadTrace; - MPI_Finalize(); + exit(0); } diff --git a/src/MPIContainer/launch_testMPI2.csh b/src/MPIContainer/launch_testMPI2.csh new file mode 100755 index 000000000..7739e01af --- /dev/null +++ b/src/MPIContainer/launch_testMPI2.csh @@ -0,0 +1,40 @@ +#! /bin/csh -f +# debug mode display informations about communication +if $1 == "--debug" then + set debug="-debug" +else + set debug="" +endif +# get pid of ompi-server +setenv OMPI_URI_FILE ${HOME}/.urifile_$$ +set lpid1=`pidof ompi-server` +ompi-server -r ${OMPI_URI_FILE} +set lpid2=`pidof ompi-server` +foreach i ($lpid2) + set flag=0 + foreach j ($lpid1) + if ($i == $j) then + set flag=1 + endif + end + if ($flag == 0) then + set pid=$i + endif +end +sleep 2 +# launch two instances of executable to create communication between both +mpirun -np 2 -ompi-server file:${OMPI_URI_FILE} ${KERNEL_ROOT_DIR}/bin/salome/testMPI2 -vsize 32 $debug & +mpirun -np 3 -ompi-server file:${OMPI_URI_FILE} ${KERNEL_ROOT_DIR}/bin/salome/testMPI2 -vsize 32 $debug +set res=$status +sleep 1 +# kill ompi-server +kill -9 $pid +# delete uri file +rm -f ${OMPI_URI_FILE} +# give result of test +if $res == 0 then + echo "OK" +else + echo "KO" +endif +exit $res diff --git a/src/MPIContainer/testMPI2.cxx b/src/MPIContainer/testMPI2.cxx new file mode 100644 index 000000000..6a17f9f4c --- /dev/null +++ b/src/MPIContainer/testMPI2.cxx @@ -0,0 +1,205 @@ +#include +#include +#include +#include +#define TIMEOUT 20 +#define EPSILON 0.00000001 + +#ifndef WIN32 +# include +#endif + +int main(int argc, char**argv) +{ + int *indg; + double *vector, sum=0., norm, etalon; + int rank, size, grank, gsize, rsize; + int vsize=20, lvsize, rlvsize; + int i, k1, k2, imin, imax, nb; + int srv=0; + MPI_Comm com, icom; + MPI_Status status; + char port_name [MPI_MAX_PORT_NAME]; + char port_name_clt [MPI_MAX_PORT_NAME]; + std::string service = "SERVICE"; + bool debug=false; + +#ifndef WITHOPENMPI + std::cout << "This test only works with openmpi implementation" << std::endl; + exit(1); +#endif + + for(i=1;i ListOfPathPrefix ; - + #endif // PATH_PREFIX_H diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog.hxx b/src/ModuleCatalog/SALOME_ModuleCatalog.hxx index bb8a2320a..820319639 100755 --- a/src/ModuleCatalog/SALOME_ModuleCatalog.hxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOME_ModuleCatalog.hxx // Author : Alexander A. BORODIN // Module : SALOME @@ -27,7 +28,7 @@ #define _SALOME_ModuleCatalog_HXX_ #ifdef WIN32 -# ifdef MODULECATALOG_EXPORTS +# if defined MODULECATALOG_EXPORTS || defined SalomeCatalog_EXPORTS # define MODULECATALOG_EXPORT __declspec( dllexport ) # else # define MODULECATALOG_EXPORT __declspec( dllimport ) diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.cxx index fba68af7b..937e3f472 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.cxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules // File : SALOME_ModuleCatalog_Acomponent_impl.cxx // Author : Estelle Deville @@ -32,8 +33,6 @@ UNEXPECT_CATCH(MC_NotFound, SALOME_ModuleCatalog::NotFound); #include "utilities.h" -using namespace std; - #ifdef _DEBUG_ static int MYDEBUG = 0; #else @@ -91,7 +90,7 @@ SALOME_ModuleCatalog_AcomponentImpl::GetInterfaceList() { _list[ind] = CORBA::string_dup(_Component.interfaces[ind].interfacename); if(MYDEBUG) MESSAGE("The component " << _Component.name - << " contains " << _list[ind] << " as interface"); + << " contains " << _list[ind] << " as interface"); } if(MYDEBUG) END_OF("GetInterfaceList"); @@ -110,7 +109,7 @@ SALOME_ModuleCatalog_AcomponentImpl::GetInterface(const char* interfacename) if(MYDEBUG) SCRUTE(interfacename); SALOME_ModuleCatalog::DefinitionInterface *_interface = - new SALOME_ModuleCatalog::DefinitionInterface; + new SALOME_ModuleCatalog::DefinitionInterface; bool _find = false ; @@ -118,21 +117,21 @@ SALOME_ModuleCatalog_AcomponentImpl::GetInterface(const char* interfacename) for (unsigned int ind = 0; ind < _Component.interfaces.length(); ind++) { SALOME_ModuleCatalog::DefinitionInterface &I - = _Component.interfaces[ind]; + = _Component.interfaces[ind]; if (strcmp(interfacename, I.interfacename) == 0) - { - // wanted interface - _find = true ; - duplicate(*_interface, I); - } + { + // wanted interface + _find = true ; + duplicate(*_interface, I); + } } if(MYDEBUG) SCRUTE(_find); if (!_find) { // The interface was not found, the exception should be thrown - string message = "The interface"; + std::string message = "The interface"; message += interfacename; message += " of the component "; message += _Component.name; @@ -172,25 +171,25 @@ SALOME_ModuleCatalog_AcomponentImpl::GetServiceList(const char* interfacename) SALOME_ModuleCatalog::DefinitionInterface & I = _Component.interfaces[ind]; if (strcmp(interfacename, I.interfacename) == 0) - { - _find = true ; - // wanted interface - // Get the list of services name for this interface - unsigned int _length_services = I.interfaceservicelist.length(); - _list->length(_length_services); - for (unsigned int ind1 = 0; ind1 < _length_services ; ind1++) - { - _list[ind1] = CORBA::string_dup(I.interfaceservicelist[ind1].ServiceName); - if(MYDEBUG) MESSAGE("The interface " << interfacename << " of the component " - << _Component.name << " contains " << _list[ind1] << " as a service") - } - } + { + _find = true ; + // wanted interface + // Get the list of services name for this interface + unsigned int _length_services = I.interfaceservicelist.length(); + _list->length(_length_services); + for (unsigned int ind1 = 0; ind1 < _length_services ; ind1++) + { + _list[ind1] = CORBA::string_dup(I.interfaceservicelist[ind1].ServiceName); + if(MYDEBUG) MESSAGE("The interface " << interfacename << " of the component " + << _Component.name << " contains " << _list[ind1] << " as a service") + } + } } if (!_find) { // The interface was not found, the exception should be thrown - string message = "The interface"; + std::string message = "The interface"; message += interfacename; message += " of the component "; message += _Component.name; @@ -210,7 +209,7 @@ SALOME_ModuleCatalog_AcomponentImpl::GetServiceList(const char* interfacename) //---------------------------------------------------------------------- SALOME_ModuleCatalog::Service* SALOME_ModuleCatalog_AcomponentImpl::GetService(const char* interfacename, - const char* servicename) + const char* servicename) throw(SALOME_ModuleCatalog::NotFound) { if(MYDEBUG) BEGIN_OF("GetService"); @@ -232,32 +231,32 @@ SALOME_ModuleCatalog_AcomponentImpl::GetService(const char* interfacename, SALOME_ModuleCatalog::DefinitionInterface &I = _Component.interfaces[ind]; if (strcmp(interfacename, I.interfacename) == 0) - { - // wanted interface - // looking for the specified service - for (unsigned int ind1 = 0; ind1 < I.interfaceservicelist.length() ; ind1++) - { - SALOME_ModuleCatalog::Service &S = I.interfaceservicelist[ind1]; - if(MYDEBUG) SCRUTE(ind1); - if(MYDEBUG) SCRUTE(S.ServiceName); - - if (strcmp(servicename, S.ServiceName) == 0) - { - // Wanted Service - // Affect the service to be returned - _find = true ; - duplicate(*service, S); - } - } - - } + { + // wanted interface + // looking for the specified service + for (unsigned int ind1 = 0; ind1 < I.interfaceservicelist.length() ; ind1++) + { + SALOME_ModuleCatalog::Service &S = I.interfaceservicelist[ind1]; + if(MYDEBUG) SCRUTE(ind1); + if(MYDEBUG) SCRUTE(S.ServiceName); + + if (strcmp(servicename, S.ServiceName) == 0) + { + // Wanted Service + // Affect the service to be returned + _find = true ; + duplicate(*service, S); + } + } + + } } if(MYDEBUG) SCRUTE(_find); if (!_find) { // The interface was not found, the exception should be thrown - string message = "The service"; + std::string message = "The service"; message += servicename; message += " of the interface "; message += interfacename; @@ -293,27 +292,27 @@ SALOME_ModuleCatalog_AcomponentImpl::GetDefaultService(const char* interfacename for (unsigned int ind = 0; ind < _Component.interfaces.length(); ind++) { if (strcmp(interfacename, _Component.interfaces[ind].interfacename) == 0) - { - // wanted interface - // looking for the defautl service of the wanted interface - for (unsigned int ind1 = 0; ind1 < _Component.interfaces[ind].interfaceservicelist.length() ; ind1++) - { - if (_Component.interfaces[ind].interfaceservicelist[ind1].Servicebydefault) - { - // Default Service - // affect the service to be returned - _find = true ; - duplicate(*_service, _Component.interfaces[ind].interfaceservicelist[ind1]); - } - } - - } + { + // wanted interface + // looking for the defautl service of the wanted interface + for (unsigned int ind1 = 0; ind1 < _Component.interfaces[ind].interfaceservicelist.length() ; ind1++) + { + if (_Component.interfaces[ind].interfaceservicelist[ind1].Servicebydefault) + { + // Default Service + // affect the service to be returned + _find = true ; + duplicate(*_service, _Component.interfaces[ind].interfaceservicelist[ind1]); + } + } + + } } if (!_find) { // The service was not found, the exception should be thrown - string message = "The default service of the interface "; + std::string message = "The default service of the interface "; message += interfacename; message += " of the component "; message += _Component.name; @@ -347,21 +346,21 @@ SALOME_ModuleCatalog_AcomponentImpl::GetPathPrefix(const char* machinename) for (unsigned int ind = 0 ; ind < _Component.paths.length() ; ind++) { if (strcmp(machinename, _Component.paths[ind].machine) == 0) - { - _find = true ; - // Wanted computer - // affect the path to be returned - const char* _temp = _Component.paths[ind].path ; - _path = new char[strlen(_temp)+1]; - strcpy(_path,_temp); - } + { + _find = true ; + // Wanted computer + // affect the path to be returned + const char* _temp = _Component.paths[ind].path ; + _path = new char[strlen(_temp)+1]; + strcpy(_path,_temp); + } } if(MYDEBUG) SCRUTE(_find); if (!_find) { // The computer was not found, the exception should be thrown - string message = "The computer "; + std::string message = "The computer "; message += machinename; message += " was not found in the catalog associated to the component "; message += _Component.name; @@ -496,7 +495,7 @@ void SALOME_ModuleCatalog_AcomponentImpl::duplicate for (unsigned int ind2 = 0; ind2 < _length ; ind2 ++) duplicate(S_out.ServiceinParameter[ind2], - S_in.ServiceinParameter[ind2]); + S_in.ServiceinParameter[ind2]); // duplicate out Parameters _length = S_in.ServiceoutParameter.length(); @@ -504,7 +503,7 @@ void SALOME_ModuleCatalog_AcomponentImpl::duplicate for (unsigned int ind2 = 0; ind2 < _length ; ind2 ++) duplicate(S_out.ServiceoutParameter[ind2], - S_in.ServiceoutParameter[ind2]); + S_in.ServiceoutParameter[ind2]); // duplicate in DataStreamParameters _length = S_in.ServiceinDataStreamParameter.length(); @@ -512,7 +511,7 @@ void SALOME_ModuleCatalog_AcomponentImpl::duplicate for (unsigned int ind2 = 0; ind2 < _length ; ind2 ++) duplicate(S_out.ServiceinDataStreamParameter[ind2], - S_in.ServiceinDataStreamParameter[ind2]); + S_in.ServiceinDataStreamParameter[ind2]); // duplicate out DataStreamParameters _length = S_in.ServiceoutDataStreamParameter.length(); @@ -521,7 +520,7 @@ void SALOME_ModuleCatalog_AcomponentImpl::duplicate for (unsigned int ind2 = 0; ind2 < _length ; ind2 ++) duplicate(S_out.ServiceoutDataStreamParameter[ind2], - S_in.ServiceoutDataStreamParameter[ind2]); + S_in.ServiceoutDataStreamParameter[ind2]); } @@ -539,7 +538,7 @@ void SALOME_ModuleCatalog_AcomponentImpl::duplicate for (unsigned int ind1 = 0; ind1 < _length ; ind1 ++) duplicate(I_out.interfaceservicelist[ind1], - I_in.interfaceservicelist[ind1]); + I_in.interfaceservicelist[ind1]); } diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.hxx b/src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.hxx index 144bb2b9e..578db629c 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.hxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules // File : SALOME_ModuleCatalog_Acomponent_impl.hxx // Author : Estelle Deville @@ -35,6 +36,11 @@ #include CORBA_SERVER_HEADER(SALOME_ModuleCatalog) +#ifdef WNT +#pragma warning(disable:4275) // Disable warning interface non dll +#pragma warning(disable:4290) // Warning Exception ... +#endif + class MODULECATALOG_EXPORT SALOME_ModuleCatalog_AcomponentImpl: public POA_SALOME_ModuleCatalog::Acomponent { public: @@ -78,7 +84,7 @@ public: */ virtual SALOME_ModuleCatalog::Service* GetService(const char* interfacename, - const char* servicename) + const char* servicename) throw(SALOME_ModuleCatalog::NotFound); //! method to get the default service of an interface of a component @@ -156,7 +162,7 @@ private : \return the interface */ void duplicate(SALOME_ModuleCatalog::DefinitionInterface &I_out, - const SALOME_ModuleCatalog::DefinitionInterface &I_in); + const SALOME_ModuleCatalog::DefinitionInterface &I_in); //! method to duplicate a service /*! @@ -164,7 +170,7 @@ private : \return the service */ void duplicate(SALOME_ModuleCatalog::Service & S_out, - const SALOME_ModuleCatalog::Service &S_in); + const SALOME_ModuleCatalog::Service &S_in); //! method to duplicate a parameter /*! @@ -172,7 +178,7 @@ private : \return the parameter */ void duplicate(SALOME_ModuleCatalog::ServicesParameter & P_out, - const SALOME_ModuleCatalog::ServicesParameter & P_in); + const SALOME_ModuleCatalog::ServicesParameter & P_in); //! method to duplicate a parameter /*! @@ -180,7 +186,7 @@ private : \return the parameter */ void duplicate(SALOME_ModuleCatalog::ServicesDataStreamParameter & P_out, - const SALOME_ModuleCatalog::ServicesDataStreamParameter &P_in); + const SALOME_ModuleCatalog::ServicesDataStreamParameter &P_in); }; diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_Client.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_Client.cxx index 895b05cd9..52a489236 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_Client.cxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_Client.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules // File : SALOME_ModuleCatalog_Client.cxx // Module : SALOME @@ -30,14 +31,13 @@ #include "SALOME_ModuleCatalog.hh" #include #include "utilities.h" -using namespace std; void PrintService(SALOME_ModuleCatalog::Acomponent_ptr C, - const string & InterfaceName, - const string & ServiceName); + const std::string & InterfaceName, + const std::string & ServiceName); void PrintInterface(SALOME_ModuleCatalog::Acomponent_ptr C, - const string & InterfaceName); + const std::string & InterfaceName); void PrintComponent(SALOME_ModuleCatalog::Acomponent_ptr C); @@ -49,7 +49,7 @@ int main(int argc,char **argv) CORBA::Object_var objVar, objVarN; try { - // initialize the ORB + // initialize the ORB orb = CORBA::ORB_init (argc, argv); @@ -120,7 +120,7 @@ int main(int argc,char **argv) } catch(SALOME_ModuleCatalog::NotFound &ex){ INFOS("SALOME_ModuleCatalog::NotFound") - cerr << ex.what << endl; + std::cerr << ex.what << std::endl; } catch(CORBA::SystemException&) { INFOS("Caught CORBA::SystemException.") @@ -141,7 +141,7 @@ int main(int argc,char **argv) INFOS("CosNaming::NamingContext::NotEmpty") } - catch(CORBA::Exception &sysEx) { + catch(CORBA::Exception &) { INFOS("Caught CORBA::Exception.") } @@ -167,10 +167,10 @@ void PrintComponent(SALOME_ModuleCatalog::Acomponent_ptr C) void PrintInterface(SALOME_ModuleCatalog::Acomponent_ptr C, - const string & InterfaceName) + const std::string & InterfaceName) { unsigned int i, n; - + SALOME_ModuleCatalog::DefinitionInterface_var _interf = C->GetInterface(InterfaceName.c_str()); MESSAGE ("Interface : " << _interf->interfacename); @@ -184,8 +184,8 @@ void PrintInterface(SALOME_ModuleCatalog::Acomponent_ptr C, } void PrintService(SALOME_ModuleCatalog::Acomponent_ptr C, - const string & InterfaceName, - const string & ServiceName) + const std::string & InterfaceName, + const std::string & ServiceName) { int i, n; @@ -201,9 +201,9 @@ void PrintService(SALOME_ModuleCatalog::Acomponent_ptr C, for (i = 0; iServiceinParameter[i].Parametername); + << Service->ServiceinParameter[i].Parametername); MESSAGE(" Type : " - << Service->ServiceinParameter[i].Parametertype); + << Service->ServiceinParameter[i].Parametertype); } MESSAGE("Out Parameter(s):"); @@ -211,9 +211,9 @@ void PrintService(SALOME_ModuleCatalog::Acomponent_ptr C, for (i = 0; iServiceoutParameter[i].Parametername); + << Service->ServiceoutParameter[i].Parametername); MESSAGE(" Type : " - << Service->ServiceoutParameter[i].Parametertype); + << Service->ServiceoutParameter[i].Parametertype); } MESSAGE("In DataStreamParameter(s):"); @@ -221,11 +221,11 @@ void PrintService(SALOME_ModuleCatalog::Acomponent_ptr C, for (i = 0; iServiceinDataStreamParameter[i].Parametername); + << Service->ServiceinDataStreamParameter[i].Parametername); MESSAGE(" Type : " - << Service->ServiceinDataStreamParameter[i].Parametertype); + << Service->ServiceinDataStreamParameter[i].Parametertype); MESSAGE(" Dependency : " - << Service->ServiceinDataStreamParameter[i].Parametertype); + << Service->ServiceinDataStreamParameter[i].Parametertype); } MESSAGE("Out DataStreamParameter(s):"); @@ -233,11 +233,11 @@ void PrintService(SALOME_ModuleCatalog::Acomponent_ptr C, for (i = 0; iServiceoutDataStreamParameter[i].Parametername); + << Service->ServiceoutDataStreamParameter[i].Parametername); MESSAGE(" Type : " - << Service->ServiceoutDataStreamParameter[i].Parametertype); + << Service->ServiceoutDataStreamParameter[i].Parametertype); MESSAGE(" Dependency : " - << Service->ServiceoutDataStreamParameter[i].Parametertype); + << Service->ServiceoutDataStreamParameter[i].Parametertype); } diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_Handler.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_Handler.cxx index 7298101b4..4ba2f9af0 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_Handler.cxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_Handler.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules // File : SALOME_ModuleCatalog_Handler.cxx // Author : Estelle Deville @@ -32,7 +33,6 @@ #include "utilities.h" #include -using namespace std; #ifdef _DEBUG_ static int MYDEBUG = 0; @@ -479,7 +479,7 @@ void SALOME_ModuleCatalog_Handler::ProcessXmlDocument(xmlDocPtr theDoc) // Tag test_component_multistudy if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_multistudy) ) - _aModule.multistudy = atoi( aContent.c_str() ); + _aModule.multistudy = atoi( aContent.c_str() ) != 0; // Tag test_component_impltype if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_impltype) ) @@ -542,11 +542,11 @@ void SALOME_ModuleCatalog_Handler::ProcessXmlDocument(xmlDocPtr theDoc) // Tag test_defaultservice if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_defaultservice) ) - _aService.byDefault = (const char*)aCompServiceData; + _aService.byDefault = atoi((const char*)aCompServiceData) !=0 ; // Tag test_typeofnode if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_typeofnode) ) - _aService.typeOfNode = (const char*)aCompServiceData; + _aService.typeOfNode = atoi((const char*)aCompServiceData) !=0 ; xmlFree(aCompServiceData); } diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_Handler.hxx b/src/ModuleCatalog/SALOME_ModuleCatalog_Handler.hxx index 2e6eaff65..f012e5441 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_Handler.hxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_Handler.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules // File : SALOME_ModuleCatalog_Handler.hxx // Author : Estelle Deville @@ -38,6 +39,10 @@ #include +#ifdef WNT +#pragma warning(disable:4251) // Warning DLL Interface ... +#endif + class MODULECATALOG_EXPORT SALOME_ModuleCatalog_Handler { public: diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_Parser.hxx b/src/ModuleCatalog/SALOME_ModuleCatalog_Parser.hxx index c0548b485..00bab974b 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_Parser.hxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_Parser.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules // File : SALOME_ModuleCatalog_Parser.hxx // Author : Estelle Deville diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_Parser_IO.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_Parser_IO.cxx index a6d0b1258..7246b7594 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_Parser_IO.cxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_Parser_IO.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules // File : SALOME_ModuleCatalog_Parser_IO.cxx // Author : Estelle Deville @@ -30,8 +31,6 @@ #include #include "utilities.h" -using namespace std; - std::ostream & operator<< (std::ostream & f, const ParserParameter & P) { f << " name : " << P.name << std::endl; @@ -40,7 +39,7 @@ std::ostream & operator<< (std::ostream & f, const ParserParameter & P) } std::ostream & operator<< (std::ostream & f, - const ParserDataStreamParameter & P) + const ParserDataStreamParameter & P) { f << " name : " << P.name << std::endl; f << " type : " << P.type << std::endl; @@ -49,7 +48,7 @@ std::ostream & operator<< (std::ostream & f, } std::ostream & operator<< (std::ostream & f, - const ParserService & S) + const ParserService & S) { int i, n; f << " name : " << S.name << std::endl; @@ -84,7 +83,7 @@ std::ostream & operator<< (std::ostream & f, } std::ostream & operator<< (std::ostream & f, - const ParserInterface & I) + const ParserInterface & I) { int j, n; f << " name : " << I.name << std::endl; @@ -100,7 +99,7 @@ std::ostream & operator<< (std::ostream & f, } std::ostream & operator<< (std::ostream & f, - const ParserComponentType & T) + const ParserComponentType & T) { std::string s; switch (T) { @@ -118,7 +117,7 @@ std::ostream & operator<< (std::ostream & f, } std::ostream & operator<< (std::ostream & f, - const ParserComponent & C) + const ParserComponent & C) { int j, n; f << std::endl diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_Parser_IO.hxx b/src/ModuleCatalog/SALOME_ModuleCatalog_Parser_IO.hxx index 948b1447a..105ac0bc3 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_Parser_IO.hxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_Parser_IO.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules // File : SALOME_ModuleCatalog_Parser_IO.hxx // Author : Marc Tajchman @@ -32,21 +33,21 @@ #include std::ostream & operator<< (std::ostream & f, - const ParserParameter & P); + const ParserParameter & P); std::ostream & operator<< (std::ostream & f, - const ParserDataStreamParameter & P); + const ParserDataStreamParameter & P); std::ostream & operator<< (std::ostream & f, - const ParserService & S); + const ParserService & S); std::ostream & operator<< (std::ostream & f, - const ParserInterface & I); + const ParserInterface & I); std::ostream & operator<< (std::ostream & f, - const ParserComponent & C); + const ParserComponent & C); std::ostream & operator<< (std::ostream & f, - const ParserComponentType & T); + const ParserComponentType & T); #endif diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_Server.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_Server.cxx index 43c4b6d8c..9eafa308d 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_Server.cxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_Server.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules // File : SALOME_ModuleCatalog_Server.cxx // Module : SALOME @@ -34,13 +35,11 @@ #ifdef CHECKTIME #include #endif -using namespace std; int main(int argc,char **argv) { // initialize the ORB CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); - // LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb); try { CosNaming::NamingContext_var _rootContext, catalogContext; @@ -49,7 +48,9 @@ int main(int argc,char **argv) // long TIMESleep = 500000000; int NumberOfTries = 40; +#ifndef WIN32 int a; +#endif timespec ts_req; ts_req.tv_nsec=TIMESleep; ts_req.tv_sec=0; @@ -65,75 +66,75 @@ int main(int argc,char **argv) const char * Env = getenv("USE_LOGGER"); int EnvL =0; if ((Env!=NULL) && (strlen(Env))) - EnvL=1; + EnvL=1; CosNaming::Name name; name.length(1); name[0].id=CORBA::string_dup("Logger"); PortableServer::POAManager_var mgr; for (int i = 1; i<=NumberOfTries; i++) - { - if (i!=1) + { + if (i!=1) #ifndef WIN32 - a=nanosleep(&ts_req,&ts_rem); + a=nanosleep(&ts_req,&ts_rem); #else - Sleep(TIMESleep/1000000); + Sleep(TIMESleep/1000000); #endif - try - { - obj = orb->resolve_initial_references("RootPOA"); - if(!CORBA::is_nil(obj)) - poa = PortableServer::POA::_narrow(obj); - if(!CORBA::is_nil(poa)) - mgr = poa->the_POAManager(); - if(!CORBA::is_nil(orb)) - theObj = orb->resolve_initial_references("NameService"); - } - catch( CORBA::SystemException& ) - { - INFOS( "Module Catalog Server: CORBA::SystemException: Unable to contact the Naming Service" ); - } - if (!CORBA::is_nil(theObj)) - { - inc = CosNaming::NamingContext::_narrow(theObj); - if(!CORBA::is_nil(inc)) - { - INFOS( "Module Catalog Server: Naming Service was found" ); - if(EnvL==1) - { - CORBA::ORB_var orb1 = CORBA::ORB_init(argc,argv) ; - SALOME_NamingService &NS = *SINGLETON_::Instance() ; - NS.init_orb( orb1 ) ; - for(int j=1; j<=NumberOfTries; j++) - { - if (j!=1) + try + { + obj = orb->resolve_initial_references("RootPOA"); + if(!CORBA::is_nil(obj)) + poa = PortableServer::POA::_narrow(obj); + if(!CORBA::is_nil(poa)) + mgr = poa->the_POAManager(); + if(!CORBA::is_nil(orb)) + theObj = orb->resolve_initial_references("NameService"); + } + catch( CORBA::SystemException& ) + { + INFOS( "Module Catalog Server: CORBA::SystemException: Unable to contact the Naming Service" ); + } + if (!CORBA::is_nil(theObj)) + { + inc = CosNaming::NamingContext::_narrow(theObj); + if(!CORBA::is_nil(inc)) + { + INFOS( "Module Catalog Server: Naming Service was found" ); + if(EnvL==1) + { + CORBA::ORB_var orb1 = CORBA::ORB_init(argc,argv) ; + SALOME_NamingService &NS = *SINGLETON_::Instance() ; + NS.init_orb( orb1 ) ; + for(int j=1; j<=NumberOfTries; j++) + { + if (j!=1) #ifndef WIN32 - a=nanosleep(&ts_req, &ts_rem); + a=nanosleep(&ts_req, &ts_rem); #else - Sleep(TIMESleep/1000000); + Sleep(TIMESleep/1000000); #endif - try{ - object = inc->resolve(name);} - catch(CosNaming::NamingContext::NotFound) - { - INFOS( "Logger Server wasn't found" ); - } - catch(...) - { - INFOS( "Module Catalog Server: Unknown exception" ) ; - } - if (!CORBA::is_nil(object)) - { - INFOS( "Module Catalog Server: Logger Server was found" ); - MODULE_CATALOG=1; - break; - } - } - } - } - } - if ((MODULE_CATALOG==1)||((EnvL==0)&&(!CORBA::is_nil(inc)))) - break; - } + try{ + object = inc->resolve(name);} + catch(CosNaming::NamingContext::NotFound) + { + INFOS( "Logger Server wasn't found" ); + } + catch(...) + { + INFOS( "Module Catalog Server: Unknown exception" ) ; + } + if (!CORBA::is_nil(object)) + { + INFOS( "Module Catalog Server: Logger Server was found" ); + MODULE_CATALOG=1; + break; + } + } + } + } + } + if ((MODULE_CATALOG==1)||((EnvL==0)&&(!CORBA::is_nil(inc)))) + break; + } // Active catalog @@ -157,11 +158,9 @@ int main(int argc,char **argv) Utils_Timer timer; timer.Start(); timer.Stop(); - MESSAGE("SALOME_Registry_Server.cxx - orb->run()"); timer.ShowAbsolute(); #endif orb->run(); - std::cerr << "server returned from orb->run()" << std::endl; orb->destroy(); // mgr->deactivate(true,true); @@ -176,6 +175,5 @@ int main(int argc,char **argv) } END_OF( argv[0] ); - // delete myThreadTrace; return 0; } diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx index 865635705..789c44d4f 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules // File : SALOME_ModuleCatalog_impl.cxx // Author : Estelle Deville @@ -27,16 +28,17 @@ // #include "SALOME_ModuleCatalog_impl.hxx" #include "SALOME_ModuleCatalog_Acomponent_impl.hxx" +#include #include #include #include "utilities.h" #ifdef WIN32 # include +#else +# include #endif -using namespace std; - #ifdef _DEBUG_ static int MYDEBUG = 0; #else @@ -47,23 +49,23 @@ static const char* SEPARATOR = "::"; static const char* OLD_SEPARATOR = ":"; -list splitStringToList(const string& theString, const string& theSeparator) +std::list splitStringToList(const std::string& theString, const std::string& theSeparator) { - list aList; + std::list aList; int sepLen = theSeparator.length(); int startPos = 0, sepPos = theString.find(theSeparator, startPos); while (1) { - string anItem ; - if(sepPos != string::npos) + std::string anItem ; + if(sepPos != std::string::npos) anItem = theString.substr(startPos, sepPos - startPos); else anItem = theString.substr(startPos); if (anItem.length() > 0) - aList.push_back(anItem); - if(sepPos == string::npos) + aList.push_back(anItem); + if(sepPos == std::string::npos) break; startPos = sepPos + sepLen; sepPos = theString.find(theSeparator, startPos); @@ -79,6 +81,8 @@ list splitStringToList(const string& theString, const string& theSeparat SALOME_ModuleCatalogImpl::SALOME_ModuleCatalogImpl(int argc, char** argv, CORBA::ORB_ptr orb) : _orb(orb) { if(MYDEBUG) MESSAGE("Catalog creation"); + /* Init libxml */ + xmlInitParser(); // Conversion rules for component types ComponentTypeConvert[GEOM] @@ -127,13 +131,13 @@ SALOME_ModuleCatalogImpl::SALOME_ModuleCatalogImpl(int argc, char** argv, CORBA: // Affect the _general_module_list and _general_path_list members // with the common catalog - list dirList; + std::list dirList; #ifdef WIN32 dirList = splitStringToList(_general_path, SEPARATOR); #else //check for new format - bool isNew = (std::string( _general_path ).find(SEPARATOR) != string::npos); + bool isNew = (std::string( _general_path ).find(SEPARATOR) != std::string::npos); if ( isNew ) { //using new format dirList = splitStringToList(_general_path, SEPARATOR); @@ -143,16 +147,16 @@ SALOME_ModuleCatalogImpl::SALOME_ModuleCatalogImpl(int argc, char** argv, CORBA: } #endif - for (list::iterator iter = dirList.begin(); iter != dirList.end(); iter++) + for (std::list::iterator iter = dirList.begin(); iter != dirList.end(); iter++) { - string aPath = (*iter); + std::string aPath = (*iter); //remove inverted commas from filename - while (aPath.find('\"') != string::npos) - aPath.erase(aPath.find('\"'), 1); + while (aPath.find('\"') != std::string::npos) + aPath.erase(aPath.find('\"'), 1); _parse_xml_file(aPath.c_str(), - _general_module_list, - _general_path_list, + _general_module_list, + _general_path_list, _typeMap, _typeList); } @@ -160,8 +164,8 @@ SALOME_ModuleCatalogImpl::SALOME_ModuleCatalogImpl(int argc, char** argv, CORBA: // Verification of _general_path_list content if (!_verify_path_prefix(_general_path_list)) { if(MYDEBUG) MESSAGE( "Error while parsing the general path list, " - "differents paths are associated to the same computer," - "the first one will be choosen"); + "differents paths are associated to the same computer," + "the first one will be choosen"); } else { if(MYDEBUG) MESSAGE("General path list OK"); } @@ -170,22 +174,22 @@ SALOME_ModuleCatalogImpl::SALOME_ModuleCatalogImpl(int argc, char** argv, CORBA: // Initialize the _personal_module_list and // _personal_path_list members with the personal catalog files _parse_xml_file(_personal_path, - _personal_module_list, - _personal_path_list, + _personal_module_list, + _personal_path_list, _typeMap, _typeList); // Verification of _general_path_list content if(!_verify_path_prefix(_personal_path_list)){ - if(MYDEBUG) MESSAGE("Error while parsing the personal path list, " - "differents paths are associated to the same computer, " - "the first one will be choosen" ); + if(MYDEBUG) MESSAGE("Error while parsing the personal path list, " + "differents paths are associated to the same computer, " + "the first one will be choosen" ); }else { - if(MYDEBUG) MESSAGE("Personal path list OK"); + if(MYDEBUG) MESSAGE("Personal path list OK"); } }else if(MYDEBUG) MESSAGE("No personal catalog indicated or error while " - "opening the personal catalog"); + "opening the personal catalog"); } } @@ -208,7 +212,7 @@ SALOME_ModuleCatalog::ListOfTypeDefinition* SALOME_ModuleCatalogImpl::GetTypes() SALOME_ModuleCatalog::ListOfTypeDefinition_var type_list = new SALOME_ModuleCatalog::ListOfTypeDefinition(); type_list->length(_typeList.size()); - for (int ind = 0 ; ind < _typeList.size() ; ind++) + for (unsigned int ind = 0 ; ind < _typeList.size() ; ind++) { //no real need to call string_dup, omniorb calls it on operator= (const char *) but it is safer type_list[ind].name=CORBA::string_dup(_typeList[ind].name.c_str()); @@ -296,17 +300,17 @@ SALOME_ModuleCatalogImpl::GetPathPrefix(const char* machinename) { for (unsigned int ind = 0 ; ind < _personal_path_list.size() ; ind++) { for (unsigned int ind1 = 0 ; ind1 < _personal_path_list[ind].listOfComputer.size() ; ind1++) - { - if (strcmp(machinename, _personal_path_list[ind].listOfComputer[ind1].c_str()) == 0) - { - _find = true ; - // Wanted computer - // affect the path to be returned - const char* _temp = _personal_path_list[ind].path.c_str() ; - _path = new char[strlen(_temp)+1]; - strcpy(_path,_temp); - } - } + { + if (strcmp(machinename, _personal_path_list[ind].listOfComputer[ind1].c_str()) == 0) + { + _find = true ; + // Wanted computer + // affect the path to be returned + const char* _temp = _personal_path_list[ind].path.c_str() ; + _path = new char[strlen(_temp)+1]; + strcpy(_path,_temp); + } + } } if (!_find) @@ -314,17 +318,17 @@ SALOME_ModuleCatalogImpl::GetPathPrefix(const char* machinename) { for (unsigned int ind = 0 ; ind < _general_path_list.size() ; ind++) { for (unsigned int ind1 = 0 ; ind1 < _general_path_list[ind].listOfComputer.size() ; ind1++) - { - if (strcmp(machinename, _general_path_list[ind].listOfComputer[ind1].c_str()) == 0) - { - _find = true ; - // Wanted computer - // affect the path to be returned - const char* _temp = _general_path_list[ind].path.c_str() ; - _path = new char[strlen(_temp)+1]; - strcpy(_path,_temp); - } - } + { + if (strcmp(machinename, _general_path_list[ind].listOfComputer[ind1].c_str()) == 0) + { + _find = true ; + // Wanted computer + // affect the path to be returned + const char* _temp = _general_path_list[ind].path.c_str() ; + _path = new char[strlen(_temp)+1]; + strcpy(_path,_temp); + } + } } } @@ -364,11 +368,11 @@ SALOME_ModuleCatalogImpl::GetComponentList() // searching if the component is already defined in // the personal catalog if ((_general_module_list[ind].name.compare(_personal_module_list[ind1].name)) == 0) - _find = true; + _find = true; } if(!_find){ if(MYDEBUG) MESSAGE("A new component " << _general_module_list[ind].name - << " has to be to added in the list"); + << " has to be to added in the list"); _list_components->length(indice+1); // The component is not already defined => has to be taken _list_components[indice]=(_general_module_list[ind].name).c_str(); @@ -377,7 +381,7 @@ SALOME_ModuleCatalogImpl::GetComponentList() indice++; }else{ if(MYDEBUG) MESSAGE("The component " <<_general_module_list[ind].name - << " was already defined in the personal catalog") ; + << " was already defined in the personal catalog") ; } } @@ -425,10 +429,10 @@ SALOME_ModuleCatalogImpl::GetComponentIconeList() // searching if the component is aleready defined in // the personal catalog if((_general_module_list[ind].name.compare(_personal_module_list[ind1].name)) == 0) - _find = true; + _find = true; } if(!_find){ - // if(MYDEBUG) MESSAGE("A new component " << _general_module_list[ind].name << " has to be to added in the list"); + // if(MYDEBUG) MESSAGE("A new component " << _general_module_list[ind].name << " has to be to added in the list"); _list_components_icone->length(indice+1); // The component is not already defined => has to be taken _list_components_icone[indice].modulename=_general_module_list[ind].name.c_str(); @@ -497,12 +501,12 @@ SALOME_ModuleCatalogImpl::GetTypedComponentList(SALOME_ModuleCatalog::ComponentT for (unsigned int ind=0; ind < _personal_module_list.size();ind++) { if (_personal_module_list[ind].type == _temp_component_type) - { - _list_typed_component->length(_j + 1); + { + _list_typed_component->length(_j + 1); _list_typed_component[_j] = _personal_module_list[ind].name.c_str(); - //if(MYDEBUG) SCRUTE(_list_typed_component[_j]); - _j++; - } + //if(MYDEBUG) SCRUTE(_list_typed_component[_j]); + _j++; + } } int indice = _list_typed_component->length() ; @@ -515,26 +519,26 @@ SALOME_ModuleCatalogImpl::GetTypedComponentList(SALOME_ModuleCatalog::ComponentT _find = false; if(_general_module_list[ind].type == _temp_component_type) - { - for (unsigned int ind1=0; ind1 < _personal_module_list.size();ind1++) - { - // searching if the component is aleready defined in - // the personal catalog - if ((_general_module_list[ind].name.compare(_personal_module_list[ind1].name)) == 0) - _find = true; - } - if (!_find) - { - //if(MYDEBUG) MESSAGE("A new component " << _general_module_list[ind].name << " has to be to added in the list"); + { + for (unsigned int ind1=0; ind1 < _personal_module_list.size();ind1++) + { + // searching if the component is aleready defined in + // the personal catalog + if ((_general_module_list[ind].name.compare(_personal_module_list[ind1].name)) == 0) + _find = true; + } + if (!_find) + { + //if(MYDEBUG) MESSAGE("A new component " << _general_module_list[ind].name << " has to be to added in the list"); _list_typed_component->length(indice+1); - // The component is not already defined => has to be taken - _list_typed_component[indice]=(_general_module_list[ind].name).c_str(); - //if(MYDEBUG) SCRUTE(_list_typed_component[indice]) ; - - indice++; - } - //else - //if(MYDEBUG) MESSAGE("The component " <<_general_module_list[ind].name << " was already defined in the personal catalog") ; + // The component is not already defined => has to be taken + _list_typed_component[indice]=(_general_module_list[ind].name).c_str(); + //if(MYDEBUG) SCRUTE(_list_typed_component[indice]) ; + + indice++; + } + //else + //if(MYDEBUG) MESSAGE("The component " <<_general_module_list[ind].name << " was already defined in the personal catalog") ; } } @@ -583,7 +587,7 @@ SALOME_ModuleCatalogImpl::GetComponent(const char* name) // Not found in the personal catalog and in the general catalog // return NULL object if(MYDEBUG) MESSAGE("Component with name " << name - << " not found in catalog"); + << " not found in catalog"); } return compo; @@ -623,32 +627,32 @@ void SALOME_ModuleCatalogImpl::ShutdownWithExit() } ParserComponent * -SALOME_ModuleCatalogImpl::findComponent(const string & name) +SALOME_ModuleCatalogImpl::findComponent(const std::string & name) { ParserComponent * C_parser = NULL; if (!C_parser) for (unsigned int ind=0; ind < _personal_module_list.size();ind++) { - if (name.compare(_personal_module_list[ind].name) == 0) - { - if(MYDEBUG) MESSAGE("Component named " << name - << " found in the personal catalog"); - C_parser = &(_personal_module_list[ind]); - break; - } + if (name.compare(_personal_module_list[ind].name) == 0) + { + if(MYDEBUG) MESSAGE("Component named " << name + << " found in the personal catalog"); + C_parser = &(_personal_module_list[ind]); + break; + } } if (!C_parser) for (unsigned int ind=0; ind < _general_module_list.size();ind++) { - if (name.compare(_general_module_list[ind].name) == 0) - { - // if(MYDEBUG) MESSAGE("Component named " << name - // << " found in the general catalog"); - C_parser = &(_general_module_list[ind]); - break; - } + if (name.compare(_general_module_list[ind].name) == 0) + { + // if(MYDEBUG) MESSAGE("Component named " << name + // << " found in the general catalog"); + C_parser = &(_general_module_list[ind]); + break; + } } return C_parser; @@ -660,8 +664,8 @@ SALOME_ModuleCatalogImpl::findComponent(const string & name) //---------------------------------------------------------------------- void SALOME_ModuleCatalogImpl::_parse_xml_file(const char* file, - ParserComponents& modulelist, - ParserPathPrefixes& pathList, + ParserComponents& modulelist, + ParserPathPrefixes& pathList, ParserTypes& typeMap, TypeList& typeList) { @@ -681,12 +685,11 @@ SALOME_ModuleCatalogImpl::_parse_xml_file(const char* file, xmlDocPtr aDoc = xmlReadFile(file, NULL, 0); if (aDoc != NULL) - handler->ProcessXmlDocument(aDoc); + handler->ProcessXmlDocument(aDoc); else - MESSAGE("ModuleCatalog: could not parse file "< _machine_list; + std::vector _machine_list; // Fill a list of all computers indicated in the path list for (unsigned int ind = 0; ind < pathList.size(); ind++) { for (unsigned int ind1 = 0 ; ind1 < pathList[ind].listOfComputer.size(); ind1++) - { - _machine_list.push_back(pathList[ind].listOfComputer[ind1]); - } + { + _machine_list.push_back(pathList[ind].listOfComputer[ind1]); + } } // Parse if a computer name is twice in the list of computers @@ -926,11 +929,11 @@ SALOME_ModuleCatalogImpl::_verify_path_prefix(ParserPathPrefixes & pathList) { for (unsigned int ind1 = ind+1 ; ind1 < _machine_list.size(); ind1++) { - if(_machine_list[ind].compare(_machine_list[ind1]) == 0) - { - if(MYDEBUG) MESSAGE( "The computer " << _machine_list[ind] << " is indicated more than once in the path list"); - _return_value = false; - } + if(_machine_list[ind].compare(_machine_list[ind1]) == 0) + { + if(MYDEBUG) MESSAGE( "The computer " << _machine_list[ind] << " is indicated more than once in the path list"); + _return_value = false; + } } } return _return_value; @@ -943,8 +946,8 @@ SALOME_ModuleCatalogImpl::_verify_path_prefix(ParserPathPrefixes & pathList) //---------------------------------------------------------------------- bool SALOME_ModuleCatalogImpl::_parseArguments(int argc, char **argv, - char **_general, - char** _personal) + char **_general, + char** _personal) { bool _return_value = true; *_general = NULL; @@ -953,30 +956,30 @@ SALOME_ModuleCatalogImpl::_parseArguments(int argc, char **argv, { if (strcmp(argv[ind],"-help") == 0) - { - INFOS( "Usage: " << argv[0] - << " -common 'path to general catalog' " - " -personal 'path to personal catalog' " - " -ORBInitRef NameService=corbaname::localhost"); - _return_value = false ; - } + { + INFOS( "Usage: " << argv[0] + << " -common 'path to general catalog' " + " -personal 'path to personal catalog' " + " -ORBInitRef NameService=corbaname::localhost"); + _return_value = false ; + } if (strcmp(argv[ind],"-common") == 0) - { - if (ind + 1 < argc) - { - // General catalog file - *_general = argv[ind + 1] ; - } - } + { + if (ind + 1 < argc) + { + // General catalog file + *_general = argv[ind + 1] ; + } + } else if (strcmp(argv[ind],"-personal") == 0) - { - if (ind + 1 < argc) - { - // Personal catalog file - *_personal = argv[ind + 1] ; - } - } + { + if (ind + 1 < argc) + { + // Personal catalog file + *_personal = argv[ind + 1] ; + } + } } return _return_value; } diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_impl.hxx b/src/ModuleCatalog/SALOME_ModuleCatalog_impl.hxx index 60bd597dd..2be46326e 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_impl.hxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_impl.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules // File : SALOME_ModuleCatalog_impl.hxx // Author : Estelle Deville @@ -38,6 +39,11 @@ #include #include CORBA_SERVER_HEADER(SALOME_ModuleCatalog) +#ifdef WNT +#pragma warning(disable:4275) // Disable warning interface non dll +#pragma warning(disable:4290) // Warning Exception ... +#endif + class MODULECATALOG_EXPORT SALOME_ModuleCatalogImpl: public POA_SALOME_ModuleCatalog::ModuleCatalog { public: @@ -122,8 +128,8 @@ private: \param typeMap ParserTypes arguments */ virtual void _parse_xml_file(const char* file, - ParserComponents & modulelist, - ParserPathPrefixes & pathlist, + ParserComponents & modulelist, + ParserPathPrefixes & pathlist, ParserTypes& typeMap, TypeList& typeList); @@ -140,7 +146,7 @@ private: \param C_parser const ParserComponent argument */ void duplicate(SALOME_ModuleCatalog::ComponentDef & C_corba, - const ParserComponent & C_parser); + const ParserComponent & C_parser); //! method to create a CORBA interface description from parser /*! @@ -148,7 +154,7 @@ private: \param I_parser const ParserInterface argument */ void duplicate(SALOME_ModuleCatalog::DefinitionInterface & I_corba, - const ParserInterface & I_parser); + const ParserInterface & I_parser); //! method to create a CORBA service description from parser /*! @@ -156,7 +162,7 @@ private: \param S_parser const ParserService argument */ void duplicate(SALOME_ModuleCatalog::Service & S_corba, - const ParserService & service); + const ParserService & service); //! method to create a CORBA parameter description from parser /*! @@ -164,7 +170,7 @@ private: \param P_parser const ParserParameter argument */ void duplicate(SALOME_ModuleCatalog::ServicesParameter & P_corba, - const ParserParameter & P_parser); + const ParserParameter & P_parser); //! method to create a CORBA datastream parameter description from parser /*! @@ -172,7 +178,7 @@ private: \param P_parser const ParserDataStreamParameter argument */ void duplicate(SALOME_ModuleCatalog::ServicesDataStreamParameter & P_corba, - const ParserDataStreamParameter & P_parser); + const ParserDataStreamParameter & P_parser); //! method to create the path prefix structures from the catalog parsing /*! @@ -197,7 +203,7 @@ private: \return true if parsing is OK */ virtual bool _parseArguments(int argc, char **argv, - char **_general, char** _personal); + char **_general, char** _personal); // Theses variables will contain the path to the general and personal catalogs diff --git a/src/ModuleCatalog/TestModuleCatalog.py b/src/ModuleCatalog/TestModuleCatalog.py index aa22de9de..ff0c15ffd 100755 --- a/src/ModuleCatalog/TestModuleCatalog.py +++ b/src/ModuleCatalog/TestModuleCatalog.py @@ -1,24 +1,26 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + import batchmode_salome import SALOME_ModuleCatalog diff --git a/src/ModuleGenerator/IDLparser.py b/src/ModuleGenerator/IDLparser.py index e22678cd5..b6b8c0791 100644 --- a/src/ModuleGenerator/IDLparser.py +++ b/src/ModuleGenerator/IDLparser.py @@ -1,27 +1,29 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : IDLparser.py # Module : SALOME -# + import string, sys, fpformat, re, os import xml.sax import pdb @@ -58,7 +60,7 @@ def getParamValue( param_name, default_value, args ): res = opt[s.end():] break #found - return res + return res #-------------------------------------------------- @@ -72,7 +74,7 @@ def error (message): # base class implementing tree #-------------------------------------------------- class Tree: - + def __init__(self, name = '', content = '', key = None): self.name = name self.content = content @@ -81,9 +83,9 @@ class Tree: self.childs = [] self.comments = [] self.attrs={} - + def addChild(self, tree): - if tree is not None: + if tree is not None: self.childs.append(tree) tree.parent = self return tree @@ -102,12 +104,12 @@ class Tree: pos += 1 return self.addChild(tree) - + def insertFirstChild(self, tree): if tree is not None: self.childs.insert(0, tree) return tree - + def insertFirstNamedChild(self, name, content = ''): return self.insertFirstChild(Tree(name, content)) @@ -115,7 +117,7 @@ class Tree: d = depth if self.name != '': s = string.ljust('', 4*depth) - s += '<' + self.name + s += '<' + self.name for k,v in self.attrs.items(): s += ' ' + k + '="' + v + '"' s += '>' @@ -126,10 +128,10 @@ class Tree: s += '\n' f.write(s) d += 1 - + for i in self.childs: i.output_xml(f, d) - + if self.name != '': s = '\n' if len(self.childs) > 0 : @@ -138,9 +140,9 @@ class Tree: def Dump(self, levels=-1, depth=0): #Dumps the tree contents - + if levels == 0: return - + s = string.ljust('', 4*depth) print s, self, self.content for i in self.childs: @@ -155,7 +157,7 @@ class Tree: l.append(p.name) p = p.parent return l - + def getChild(self, name, content=None): # return child node with a given name # if content == None, don't compare contents @@ -171,12 +173,12 @@ class Tree: if (self.name == name): if (content is None) | (self.content == content): return self - + if (depth != 0): for i in self.childs: n = i.getNode(name, content, depth-1) - if n: return n - + if n: return n + return None def __repr__(self): @@ -196,47 +198,46 @@ class Tree: L_int = self.getChild(list) L_merge = Tree(list) - + for i_ext in L_ext.childs: k_ext = i_ext.key if k_ext is None: continue present = 0 - + for i_int in L_int.childs: k_int = i_int.key if k_int is None: continue - + if (k_int == k_ext): present = 1 break; - + if present : i_int.merge(i_ext) L_merge.addChild(i_int) else: L_merge.addChild(i_ext) - + self.replaceChild(L_merge) def setAttrib(self, name,value): self.attrs[name]=value - - + #-------------------------------------------------- # implements parameter tree #-------------------------------------------------- class parameter(Tree): - + def __init__(self, name=None, mode = 'in', type='', comment='unknown'): Tree.__init__(self, mode + 'Parameter', key=name) self.mode = mode if name is None: return - + self.addNamedChild(mode + 'Parameter-name', name) self.addNamedChild(mode + 'Parameter-type', type) self.addNamedChild(mode + 'Parameter-comment', comment) - + def merge(self, P): self.mode = P.mode @@ -245,19 +246,19 @@ class parameter(Tree): C = P.getChild(P.mode + 'Parameter-comment') if C.content != 'unkonwn': self.replaceChild(C) - + #-------------------------------------------------- # implements dataStreamParameter tree #-------------------------------------------------- class dataStreamParameter(parameter): - + def __init__(self, name=None, mode='in', type='', dependency='', comment='unknown'): parameter.__init__(self, name, mode, type, comment) if name is None: return - + self.addNamedChild(mode + 'Parameter-dependency', dependency) self.mode = mode - + def merge(self, P): parameter.merge(self, P) @@ -268,11 +269,11 @@ def parseComment(comment): spaces = '[\t\n ]*' word = spaces + '([a-zA-Z][a-zA-Z0-9_]*)' + spaces - + result = [] type = None key = None - + ## match : // followed by a 'DataStreamPorts' string, ## the service name, and a list of ports pattern = '// *DataStreamPorts{,1}' + word @@ -283,7 +284,7 @@ def parseComment(comment): ## service type = 'DataStreamPorts' key = m.group(1) - + sPorts = comment[m.end():] pattern = word + '\('+word+','+word +','+word+'\)' \ + spaces + ',{,1}' + spaces @@ -298,19 +299,19 @@ def parseComment(comment): 'format error in DataStreamPort definition : '+sPorts sPorts = sPorts[m.end():] result.append(m.groups()) - + return type, key, result; #-------------------------------------------------- # implements service tree #-------------------------------------------------- class Service(Tree): - + def __init__(self, name=None, comment = 'unknown'): - + Tree.__init__(self, 'component-service', key=name) if name is None: return - + self.addNamedChild('service-name', name) self.addNamedChild('service-author',common_data["AUTHOR"]) self.addNamedChild('service-version',common_data["VERSION"]) @@ -319,13 +320,13 @@ class Service(Tree): self.addNamedChild('inParameter-list') self.addNamedChild('outParameter-list') self.addNamedChild('DataStream-list') - + def createInParameter(self, name, type): L = self.getChild('inParameter-list') p = parameter(name, 'in', type) L.replaceChild(p) return p - + def createOutParameter(self, name, type): L = self.getChild('outParameter-list') p = parameter(name, 'out', type) @@ -337,7 +338,7 @@ class Service(Tree): p = dataStreamParameter(p[0], p[2], p[1], p[3]) L.replaceChild(p) return p - + def merge(self, S): self.replaceChild(S.getChild('service-author')) @@ -346,27 +347,26 @@ class Service(Tree): C = S.getChild('service-comment') if C.content != 'unkonwn': self.replaceChild(C) - + for L in ['inParameter-list', 'outParameter-list', 'DataStream-list']: self.mergeChilds(S, L) - #-------------------------------------------------- # implements interface tree #-------------------------------------------------- class Interface(Tree): - + def __init__(self, name=None, comment='unknown'): - + Tree.__init__(self, key=name) if name is None: return - + self.addNamedChild('component-interface-name', name) self.addNamedChild('component-interface-comment', comment); self.addNamedChild('component-service-list') - + def createService(self, name): L = self.getChild('component-service-list') @@ -384,7 +384,7 @@ class Interface(Tree): if S.key == key: return S return None - + def merge(self, I): C = S.getChild('component-interface-comment') @@ -392,7 +392,7 @@ class Interface(Tree): self.replaceChild(C) self.mergeChilds(I, 'component-service-list') - + def processDataStreams(self): for sComment in self.comments: @@ -416,12 +416,12 @@ class Component(Tree): def __init__(self, name=None): Tree.__init__(self, 'component', key=name) if name is None: return - + # ASV : fix for bug PAL8922 (Component name indicated by user in GUI is not taken into account - if common_data["COMP_NAME"] != '': - self.addNamedChild('component-name', common_data["COMP_NAME"]) - else: - self.addNamedChild('component-name', name) + if common_data["COMP_NAME"] != '': + self.addNamedChild('component-name', common_data["COMP_NAME"]) + else: + self.addNamedChild('component-name', name) # ASV : if user name is NOT set, then use component-name instead. Else - default. if common_data["COMP_UNAME"] != '': @@ -431,7 +431,7 @@ class Component(Tree): self.addNamedChild('component-username', common_data["COMP_NAME"] ) else: self.addNamedChild('component-username', name) - + self.addNamedChild('component-type', common_data["COMP_TYPE"]) self.addNamedChild('component-author', common_data["AUTHOR"]) self.addNamedChild('component-version', common_data["VERSION"]) @@ -441,7 +441,7 @@ class Component(Tree): self.addNamedChild('component-icone', common_data["ICON"]) self.addNamedChild('constraint') self.addNamedChild('component-interface-list') - + def createInterface(self, name): L = self.getChild('component-interface-list') if L is None: @@ -462,13 +462,13 @@ class Component(Tree): int = ext elif ext is not None and len(ext.content): int.content = ext.content - + Cc = C.getChild('component-comment') if Cc.content != 'unkonwn': self.replaceChild(Cc) - + self.mergeChilds(C, 'component-interface-list') - + #-------------------------------------------------- # implements document tree #-------------------------------------------------- @@ -497,7 +497,7 @@ class Catalog(ContentHandler, Tree): n.childs.insert(p+1,Tree('type-list')) if n.getChild('component-list') is None: n.addNamedChild('component-list') - + def removeComponent(self, name): complist = self.getNode('component-list') idx = 0 @@ -510,11 +510,11 @@ class Catalog(ContentHandler, Tree): if cname.content == name: complist.childs.pop(idx) print "Component " + name + " is removed" - idx += 1 - + idx += 1 + def startDocument(self): self.list.append(self) - + def startElement(self, name, attrs): p = self.list[len(self.list)-1] if name == 'component': @@ -541,7 +541,7 @@ class Catalog(ContentHandler, Tree): e = p.addNamedChild(name) self.list.append(e) self.buffer = '' - + def endElement(self, name): self.buffer = string.join(string.split(self.buffer), ' ') p = self.list[len(self.list)-1] @@ -550,17 +550,17 @@ class Catalog(ContentHandler, Tree): p.key = p.getChild('component-name').content self.buffer = '' e = self.list.pop() - + def characters(self, ch): self.buffer += ch def mergeComponent(self, comp): - + L_int = self.getNode('component-list') if L_int is None: error("Catalog.mergeComponent : 'component-list' is not found") return - + i_ext = comp present = 0 n_ext = i_ext.key @@ -568,14 +568,14 @@ class Catalog(ContentHandler, Tree): if (i_int.key == n_ext): present = 1 break; - + if present == 0: print ' add component', i_ext.getChild('component-name').content L_int.addChild(i_ext) else: print ' replace component', i_ext.getChild('component-name').content i_int.merge(i_ext) - + def mergeType(self, type): L_int = self.getNode('type-list') if L_int is None: @@ -664,41 +664,41 @@ ttsMap = { # class ModuleCatalogVisitor #-------------------------------------------------- class ModuleCatalogVisitor (idlvisitor.AstVisitor): - + def __init__(self, catalog): self.catalog = catalog self.EngineType = 0 self.currentScope=None - + def visitAST(self, node): for n in node.declarations(): if n.mainFile(): n.accept(self) - + def visitModule(self, node): self.currentScope=node for n in node.definitions(): n.accept(self) - + def visitInterface(self, node): if node.mainFile(): self.EngineType = 0 - + for i in node.inherits(): s = i.scopedName(); if s[0] == "Engines": - if s[1] == "Component": + if s[1] == "EngineComponent": self.EngineType = 1; break if s[1] == "Superv_Component": self.EngineType = 2; break - + if self.EngineType: #This interface is a SALOME component Comp = Component(node.identifier()) - + self.currentInterface = Comp.createInterface(node.identifier()) - + for c in node.callables(): if isinstance(c, idlast.Operation): c.accept(self) @@ -706,13 +706,13 @@ class ModuleCatalogVisitor (idlvisitor.AstVisitor): for c in node.declarations(): if isinstance(c, idlast.Struct): c.accept(self) - + for i in node.comments(): self.currentInterface.comments.append(str(i)) if self.EngineType == 2: self.currentInterface.processDataStreams() - + global nb_components nb_components = nb_components + 1 self.catalog.mergeComponent(Comp) @@ -725,36 +725,36 @@ class ModuleCatalogVisitor (idlvisitor.AstVisitor): self.catalog.mergeType(t) self.EngineType = 0 - + def visitOperation(self, node): self.currentService = self.currentInterface.createService \ (node.identifier()) - + node.returnType().accept(self) if (self.currentType != "void"): self.currentService.createOutParameter \ ("return", self.currentType) - + for c in node.parameters(): c.accept(self) for i in node.comments(): self.currentInterface.comments.append(str(i)) - + def visitDeclaredType(self, type): name=type.name() scoped_name="/".join(type.scopedName()) self.currentType = scoped_name - + def visitBaseType(self, type): self.currentType = ttsMap[type.kind()] - + def visitStringType(self, type): self.currentType = "string" - + def visitParameter(self, node): node.paramType().accept(self) if node.is_in(): @@ -763,7 +763,7 @@ class ModuleCatalogVisitor (idlvisitor.AstVisitor): if node.is_out(): self.currentService.createOutParameter \ (node.identifier(), self.currentType) - + def visitSequenceType(self,type): type.seqType().accept(self) if type.bound() == 0: @@ -820,27 +820,27 @@ class ModuleCatalogVisitor (idlvisitor.AstVisitor): # parse idl and store xml file #-------------------------------------------------- def run(tree, args): - + CatalogFileName=getParamValue("catalog", "CatalogModulePersonnel.xml", args) if re.compile(".*?.xml$").match(CatalogFileName, 1) is None: CatalogFileName = CatalogFileName + '.xml' - #========= Read parameters ====================== + #========= Read parameters ====================== common_data["ICON"] = getParamValue("icon", "", args) common_data["AUTHOR"] = getParamValue("author", os.getenv("USER"), args) common_data["VERSION"] = getParamValue("version", "1", args) - common_data["COMP_NAME"] = getParamValue("name", "", args) + common_data["COMP_NAME"] = getParamValue("name", "", args) common_data["COMP_UNAME"] = getParamValue("username", "", args) common_data["COMP_TYPE"] = getParamValue("type", "OTHER", args) common_data["COMP_MULT"] = getParamValue("multistudy", "1", args) common_data["COMP_IMPL"] = getParamValue("impltype", "1", args) print common_data - + remove_comp = getParamValue("remove", "", args) - - #================================================== - + + #================================================== + if (os.path.exists(CatalogFileName)): print "Importing", CatalogFileName C = Catalog(CatalogFileName) @@ -849,15 +849,15 @@ def run(tree, args): C = Catalog() print "Reading idl file" - + visitor = ModuleCatalogVisitor(C) tree.accept(visitor) ## C.Dump() - + if remove_comp : C.removeComponent(remove_comp) - + if (os.path.exists(CatalogFileName)): print "Updating", CatalogFileName CatalogFileName_old = CatalogFileName + '_old' @@ -865,7 +865,7 @@ def run(tree, args): else: CatalogFileName_old = "" print "Writing", CatalogFileName - + CatalogFileName_new = CatalogFileName + '_new' f=open(CatalogFileName_new, 'w') f.write("\n\n") @@ -875,7 +875,7 @@ def run(tree, args): os.rename(CatalogFileName_new, CatalogFileName) if ((CatalogFileName_old != "") & os.path.exists(CatalogFileName_old)): os.unlink(CatalogFileName_old) - + print @@ -883,5 +883,3 @@ if __name__ == "__main__": print print "Usage : omniidl -bIDLparser [-I]* -Wbcatalog=[,icon=][,version=][,author=][,name=][,username=][,multistudy=][,impltype=] " print - - diff --git a/src/ModuleGenerator/Makefile.am b/src/ModuleGenerator/Makefile.am index 453e87b5a..be3b14f33 100644 --- a/src/ModuleGenerator/Makefile.am +++ b/src/ModuleGenerator/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : Makefile.am # Author : Guillaume Boulant (CSSI) # Module : KERNEL @@ -26,6 +27,11 @@ # include $(top_srcdir)/salome_adm/unix/make_common_starter.am -dist_salomescript_DATA = IDLparser.py +dist_salomescript_PYTHON = IDLparser.py EXTRA_DIST = tests + +install-data-hook: + @for f in $(dist_salomescript_PYTHON) ; do \ + chmod -f a+x $(DESTDIR)$(salomescriptdir)/$$f ; \ + done diff --git a/src/ModuleGenerator/README b/src/ModuleGenerator/README index 1a06d38fc..4ac9cfdfc 100644 --- a/src/ModuleGenerator/README +++ b/src/ModuleGenerator/README @@ -1,4 +1,4 @@ -Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -75,7 +75,7 @@ ou vaut 1, 1b, 2, 3, 4, 5 a partir d'un fichier idl Le fichier idl contient un composant et une interface CORBA qui n'est pas un composant Salome (i.e. ne derive pas de - Engines::Component). + Engines::EngineComponent). _________________________________________ 2. Un meme fichier idl est lu deux fois diff --git a/src/ModuleGenerator/testIDLparser.in b/src/ModuleGenerator/testIDLparser.in index 26c4ef2f1..1e59d7207 100755 --- a/src/ModuleGenerator/testIDLparser.in +++ b/src/ModuleGenerator/testIDLparser.in @@ -1,24 +1,24 @@ #!/bin/sh -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # ROOT_SRCDIR=@ROOT_SRCDIR@ diff --git a/src/ModuleGenerator/tests/AddComponent.idl b/src/ModuleGenerator/tests/AddComponent.idl index 1fc59233d..0316c3554 100644 --- a/src/ModuleGenerator/tests/AddComponent.idl +++ b/src/ModuleGenerator/tests/AddComponent.idl @@ -1,27 +1,27 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : AddComponent.idl // Author : Jean Rahuel -// + #ifndef _ADDCOMPONENT_IDL #define _ADDCOMPONENT_IDL @@ -31,7 +31,7 @@ module SuperVisionTest { interface Adder ; - interface AddComponent : Engines::Component { + interface AddComponent : Engines::EngineComponent { double Add( in double x , in double y , out double z ) ; double AddWithoutSleep( in double x , in double y , out double z ) ; void Setx( in double x ) ; @@ -52,15 +52,15 @@ module SuperVisionTest { out AddComponent RetAdder3 ) ; }; - interface Adder : Engines::Component { + interface Adder : Engines::EngineComponent { double Add( in double x , in double y , out double z ) ; double AddWithoutSleep( in double x , in double y , out double z ) ; double AddAndCompare( in double x , in double y , in Adder anOtherAdder, out double z ) ; void SetLastResult( in double z ) ; void LastResult( out double z ) ; - Engines::Component LccAddComponent( in string aContainer , - in string aComponentName ) ; + Engines::EngineComponent LccAddComponent( in string aContainer , + in string aComponentName ) ; }; } ; diff --git a/src/ModuleGenerator/tests/SubComponent.idl b/src/ModuleGenerator/tests/SubComponent.idl index 772b3f1ea..281311fd5 100644 --- a/src/ModuleGenerator/tests/SubComponent.idl +++ b/src/ModuleGenerator/tests/SubComponent.idl @@ -1,27 +1,27 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : SubComponent.idl // Author : Jean Rahuel -// + #ifndef _SUBCOMPONENT_IDL #define _SUBCOMPONENT_IDL @@ -29,7 +29,7 @@ module SuperVisionTest { - interface SubComponent : Engines::Component { + interface SubComponent : Engines::EngineComponent { void Sub( in double x , in double y , out double z ) ; } ; }; diff --git a/src/ModuleGenerator/tests/Truc2Component.idl b/src/ModuleGenerator/tests/Truc2Component.idl index 69a2b9d2f..5a22e5010 100644 --- a/src/ModuleGenerator/tests/Truc2Component.idl +++ b/src/ModuleGenerator/tests/Truc2Component.idl @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : AddComponent.idl // Author : // Module : SALOME diff --git a/src/ModuleGenerator/tests/TrucComponent.idl b/src/ModuleGenerator/tests/TrucComponent.idl index b50e15911..06a7250db 100644 --- a/src/ModuleGenerator/tests/TrucComponent.idl +++ b/src/ModuleGenerator/tests/TrucComponent.idl @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : AddComponent.idl // Author : // Module : SALOME diff --git a/src/ModuleGenerator/tests/test1.sh b/src/ModuleGenerator/tests/test1.sh index bc7cadfbc..39c0cc0c0 100755 --- a/src/ModuleGenerator/tests/test1.sh +++ b/src/ModuleGenerator/tests/test1.sh @@ -1,25 +1,26 @@ #!/bin/sh -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : test1.sh # Module : SALOME # diff --git a/src/ModuleGenerator/tests/test1b.sh b/src/ModuleGenerator/tests/test1b.sh index 8cad7c9b1..ee74c8c15 100755 --- a/src/ModuleGenerator/tests/test1b.sh +++ b/src/ModuleGenerator/tests/test1b.sh @@ -1,25 +1,26 @@ #!/bin/sh -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : test1b.sh # Module : SALOME # diff --git a/src/ModuleGenerator/tests/test2.sh b/src/ModuleGenerator/tests/test2.sh index 0d238ce48..ba3879aac 100755 --- a/src/ModuleGenerator/tests/test2.sh +++ b/src/ModuleGenerator/tests/test2.sh @@ -1,25 +1,26 @@ #!/bin/sh -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : test2.sh # Module : SALOME # diff --git a/src/ModuleGenerator/tests/test3.sh b/src/ModuleGenerator/tests/test3.sh index 6f9371e84..05e6f6018 100755 --- a/src/ModuleGenerator/tests/test3.sh +++ b/src/ModuleGenerator/tests/test3.sh @@ -1,25 +1,26 @@ #!/bin/sh -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : test3.sh # Module : SALOME # diff --git a/src/ModuleGenerator/tests/test4.sh b/src/ModuleGenerator/tests/test4.sh index 9713d7cfd..38dd610db 100755 --- a/src/ModuleGenerator/tests/test4.sh +++ b/src/ModuleGenerator/tests/test4.sh @@ -1,25 +1,26 @@ #!/bin/sh -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : test4.sh # Module : SALOME # diff --git a/src/ModuleGenerator/tests/test5.sh b/src/ModuleGenerator/tests/test5.sh index 0ada24652..e18c6b7a7 100755 --- a/src/ModuleGenerator/tests/test5.sh +++ b/src/ModuleGenerator/tests/test5.sh @@ -1,25 +1,26 @@ #!/bin/sh -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : test5.sh # Module : SALOME # diff --git a/src/NOTIFICATION_SWIG/Makefile.am b/src/NOTIFICATION_SWIG/Makefile.am index a1b75ed3d..2957b8e7e 100644 --- a/src/NOTIFICATION_SWIG/Makefile.am +++ b/src/NOTIFICATION_SWIG/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # SALOME NOTIFICATION_SWIG : wrapping of Notification sevices in order to be available in Python # File : Makefile.am # Author : Guillaume Boulant (CSSI) @@ -49,7 +50,6 @@ _libNOTIFICATION_la_CPPFLAGS =\ -I$(srcdir)/../Notification \ -I$(srcdir)/../Basics \ -I$(srcdir)/../SALOMELocalTrace \ - -I$(top_builddir)/salome_adm/unix \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ diff --git a/src/NOTIFICATION_SWIG/NOTIFICATION.i b/src/NOTIFICATION_SWIG/NOTIFICATION.i index eee6ffbc8..1e9dc97ca 100644 --- a/src/NOTIFICATION_SWIG/NOTIFICATION.i +++ b/src/NOTIFICATION_SWIG/NOTIFICATION.i @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME NOTIFICATION_SWIG : wrapping of Notification sevices in order to be available in Python // File : NOTIFICATION.i // Author : Francis KLOSS diff --git a/src/NOTIFICATION_SWIG/NOTIFICATION_Swig.cxx b/src/NOTIFICATION_SWIG/NOTIFICATION_Swig.cxx index 14b636801..33c951a72 100644 --- a/src/NOTIFICATION_SWIG/NOTIFICATION_Swig.cxx +++ b/src/NOTIFICATION_SWIG/NOTIFICATION_Swig.cxx @@ -1,31 +1,31 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME NOTIFICATION_SWIG : wrapping of Notification sevices in order to be available in Python // File : NOTIFICATION_Swig.cxx // Author : Francis KLOSS // Module : SALOME // #include "NOTIFICATION_Swig.hxx" -using namespace std; // Swig notification supplier // -------------------------- diff --git a/src/NOTIFICATION_SWIG/NOTIFICATION_Swig.hxx b/src/NOTIFICATION_SWIG/NOTIFICATION_Swig.hxx index b2fab0c16..041df0938 100644 --- a/src/NOTIFICATION_SWIG/NOTIFICATION_Swig.hxx +++ b/src/NOTIFICATION_SWIG/NOTIFICATION_Swig.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME NOTIFICATION_SWIG : wrapping of Notification sevices in order to be available in Python // File : NOTIFICATION_Swig.hxx // Author : Francis KLOSS diff --git a/src/NOTIFICATION_SWIG/SALOME_NOTIFICATION_SWIG.hxx b/src/NOTIFICATION_SWIG/SALOME_NOTIFICATION_SWIG.hxx index cc18e0448..b2067d6d3 100755 --- a/src/NOTIFICATION_SWIG/SALOME_NOTIFICATION_SWIG.hxx +++ b/src/NOTIFICATION_SWIG/SALOME_NOTIFICATION_SWIG.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOME_NOTIFICATION_SWIG.hxx // Author : Oleg UVAROV // Module : SALOME @@ -27,7 +28,7 @@ #define _SALOME_NOTIFICATION_SWIG_HXX_ #ifdef WIN32 -# ifdef NOTIFICATION_SWIG_EXPORTS +# if defined NOTIFICATION_SWIG_EXPORTS || defined _libNOTIFICATION_EXPORTS # define NOTIFICATION_SWIG_EXPORT __declspec( dllexport ) # else # define NOTIFICATION_SWIG_EXPORT __declspec( dllimport ) diff --git a/src/NamingService/Makefile.am b/src/NamingService/Makefile.am index 8b6514755..c6673b582 100644 --- a/src/NamingService/Makefile.am +++ b/src/NamingService/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # SALOME NamingService : wrapping NamingService services # File : Makefile.am # Author : Guillaume Boulant (CSSI) @@ -35,7 +36,7 @@ salomeinclude_HEADERS =\ SALOME_NamingService_defs.hxx # Scripts to be exported -dist_salomescript_DATA =\ +dist_salomescript_PYTHON =\ SALOME_NamingServicePy.py @@ -52,7 +53,6 @@ libSalomeNS_la_CPPFLAGS = \ -I$(srcdir)/../SALOMELocalTrace \ -I$(srcdir)/../Basics \ -I$(srcdir)/../Utils \ - -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ diff --git a/src/NamingService/NamingService_WaitForServerReadiness.cxx b/src/NamingService/NamingService_WaitForServerReadiness.cxx index deab8d1a9..c11eba501 100644 --- a/src/NamingService/NamingService_WaitForServerReadiness.cxx +++ b/src/NamingService/NamingService_WaitForServerReadiness.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : NamingService_WaitForServerReadiness.cxx // Author : Paul RASCLE (EDF) // Module : KERNEL @@ -29,8 +30,6 @@ #include #include -using namespace std; - // ============================================================================ /*! * Wait until a server is registered in naming service. @@ -46,7 +45,7 @@ using namespace std; void NamingService_WaitForServerReadiness(SALOME_NamingService* NS, - string serverName) + std::string serverName) { long TIMESleep = 500000000; // 500 ms. int NumberOfTries = 40; // total wait = 20 s. @@ -63,38 +62,38 @@ void NamingService_WaitForServerReadiness(SALOME_NamingService* NS, for (int itry=0; itry < NumberOfTries; itry++) { try - { - if (serverName.length() == 0) - { + { + if (serverName.length() == 0) + { CORBA::String_var dummyadr = NS->getIORaddr(); // to wait for naming service - found = 1; - break; // naming service found - } - else - { - CORBA::Object_var obj = NS->Resolve(serverName.c_str()); - if (! CORBA::is_nil(obj)) - { - found =1; - break; // server found, no more try to do - } - MESSAGE("Server "<< serverName <<" not yet ready, waiting..."); + found = 1; + break; // naming service found + } + else + { + CORBA::Object_var obj = NS->Resolve(serverName.c_str()); + if (! CORBA::is_nil(obj)) + { + found =1; + break; // server found, no more try to do + } + MESSAGE("Server "<< serverName <<" not yet ready, waiting..."); #ifndef WIN32 nanosleep(&ts_req,&ts_rem); // wait before retry #else Sleep(TIMESleep/1000000); #endif - } - } + } + } catch( ServiceUnreachable& ) - { - MESSAGE("CORBA::COMM_FAILURE: Naming Service not yet ready, waiting..."); + { + MESSAGE("CORBA::COMM_FAILURE: Naming Service not yet ready, waiting..."); #ifndef WIN32 nanosleep(&ts_req,&ts_rem); // wait before retry #else Sleep(TIMESleep/1000000); #endif - } + } } if (!found) { diff --git a/src/NamingService/NamingService_WaitForServerReadiness.hxx b/src/NamingService/NamingService_WaitForServerReadiness.hxx index baa25e082..beb55b835 100644 --- a/src/NamingService/NamingService_WaitForServerReadiness.hxx +++ b/src/NamingService/NamingService_WaitForServerReadiness.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : NamingService_WaitForServerReadiness.hxx // Author : Paul RASCLE (EDF) // Module : KERNEL @@ -32,6 +33,6 @@ #include void NAMINGSERVICE_EXPORT NamingService_WaitForServerReadiness(SALOME_NamingService* NS, - std::string serverName); + std::string serverName); #endif diff --git a/src/NamingService/SALOME_NamingService.cxx b/src/NamingService/SALOME_NamingService.cxx index be057c0f8..b58acc661 100644 --- a/src/NamingService/SALOME_NamingService.cxx +++ b/src/NamingService/SALOME_NamingService.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME NamingService : wrapping NamingService services // File : SALOME_NamingService.cxx // Author : Estelle Deville @@ -33,8 +34,16 @@ #include #include #include +#include + +#ifdef WNT +#define strdup _strdup +#endif + +/*! \class SALOME_NamingService + \brief A class to manage the SALOME naming service -using namespace std; +*/ // ============================================================================ /*! \brief Default Constructor without ORB reference. @@ -62,7 +71,7 @@ SALOME_NamingService::SALOME_NamingService() SALOME_NamingService::SALOME_NamingService(CORBA::ORB_ptr orb) { MESSAGE("SALOME_NamingService creation"); - _orb = orb ; + _orb = CORBA::ORB::_duplicate(orb); _initialize_root_context(); } @@ -85,6 +94,7 @@ SALOME_NamingService::~SALOME_NamingService() * * Initializes ORB reference and naming service root context. * For use after default constructor. + * If param orb is null, the orb is initialized * \param orb CORBA::ORB_ptr arguments */ // ============================================================================ @@ -94,7 +104,13 @@ void SALOME_NamingService::init_orb(CORBA::ORB_ptr orb) MESSAGE("SALOME_NamingService initialisation"); Utils_Locker lock (&_myMutex); - _orb = orb; + if(orb) + _orb = CORBA::ORB::_duplicate(orb); + else + { + int argc=0; + _orb = CORBA::ORB_init(argc, 0); // Here we make the assumption that the orb has already been initialized + } _initialize_root_context(); } @@ -139,11 +155,11 @@ void SALOME_NamingService::Register(CORBA::Object_ptr ObjRef, // to place the current_context to the correct node CosNaming::Name context_name; - vector splitPath; + std::vector splitPath; int dimension_resultat = _createContextNameDir(Path, - context_name, - splitPath, - true); + context_name, + splitPath, + true); CORBA::Boolean not_exist = false; @@ -172,73 +188,73 @@ void SALOME_NamingService::Register(CORBA::Object_ptr ObjRef, catch (CORBA::SystemException&){ INFOS("Register() : CORBA::SystemException: " - << "unable to contact the naming service"); + << "unable to contact the naming service"); throw ServiceUnreachable(); } if (not_exist){ try{ - context_name.length(1); - for (int i = 0 ; i < dimension_resultat ;i++){ - context_name[0].id = CORBA::string_dup(splitPath[i].c_str()); - context_name[0].kind = CORBA::string_dup("dir"); - // SCRUTE(_context_name[0].id); - // --- check if the path is created - try{ - // --- if the context is already created, nothing to do - CORBA::Object_var obj = _current_context->resolve(context_name); - _current_context = CosNaming::NamingContext::_narrow(obj); - } - - catch (CosNaming::NamingContext::NotFound &){ - try{ - // --- the context must be created - CosNaming::NamingContext_var temp_context = - _current_context->bind_new_context(context_name); - _current_context = temp_context; - } - catch (CosNaming::NamingContext::AlreadyBound&){ - CORBA::Object_var obj = _current_context->resolve(context_name); - _current_context = CosNaming::NamingContext::_narrow(obj); - } - } - } + context_name.length(1); + for (int i = 0 ; i < dimension_resultat ;i++){ + context_name[0].id = CORBA::string_dup(splitPath[i].c_str()); + context_name[0].kind = CORBA::string_dup("dir"); + // SCRUTE(_context_name[0].id); + // --- check if the path is created + try{ + // --- if the context is already created, nothing to do + CORBA::Object_var obj = _current_context->resolve(context_name); + _current_context = CosNaming::NamingContext::_narrow(obj); + } + + catch (CosNaming::NamingContext::NotFound &){ + try{ + // --- the context must be created + CosNaming::NamingContext_var temp_context = + _current_context->bind_new_context(context_name); + _current_context = temp_context; + } + catch (CosNaming::NamingContext::AlreadyBound&){ + CORBA::Object_var obj = _current_context->resolve(context_name); + _current_context = CosNaming::NamingContext::_narrow(obj); + } + } + } } catch (CosNaming::NamingContext::AlreadyBound&){ - INFOS("Register() : CosNaming::NamingContext::AlreadyBound"); + INFOS("Register() : CosNaming::NamingContext::AlreadyBound"); } catch (CosNaming::NamingContext::NotFound& ex){ - CosNaming::Name n = ex.rest_of_name; + CosNaming::Name n = ex.rest_of_name; - if (ex.why == CosNaming::NamingContext::missing_node) - INFOS("Register() : " << (char *) n[0].id - << " (" << (char *) n[0].kind << ") not found"); + if (ex.why == CosNaming::NamingContext::missing_node) + INFOS("Register() : " << (char *) n[0].id + << " (" << (char *) n[0].kind << ") not found"); - if (ex.why == CosNaming::NamingContext::not_context) - INFOS("Register() : " << (char *) n[0].id - << " (" << (char *) n[0].kind - << ") is not a context"); + if (ex.why == CosNaming::NamingContext::not_context) + INFOS("Register() : " << (char *) n[0].id + << " (" << (char *) n[0].kind + << ") is not a context"); - if (ex.why == CosNaming::NamingContext::not_object) - INFOS("Register() : " << (char *) n[0].id - << " (" << (char *) n[0].kind - << ") is not an object"); + if (ex.why == CosNaming::NamingContext::not_object) + INFOS("Register() : " << (char *) n[0].id + << " (" << (char *) n[0].kind + << ") is not an object"); } catch (CosNaming::NamingContext::CannotProceed&){ - INFOS("Register(): CosNaming::NamingContext::CannotProceed"); + INFOS("Register(): CosNaming::NamingContext::CannotProceed"); } catch (CosNaming::NamingContext::InvalidName&){ - INFOS("Register(): CosNaming::NamingContext::InvalidName"); + INFOS("Register(): CosNaming::NamingContext::InvalidName"); } catch (CORBA::SystemException&){ - INFOS("Register():CORBA::SystemException: " - << "unable to contact the naming service"); - throw ServiceUnreachable(); + INFOS("Register():CORBA::SystemException: " + << "unable to contact the naming service"); + throw ServiceUnreachable(); } } } @@ -265,18 +281,18 @@ void SALOME_NamingService::Register(CORBA::Object_ptr ObjRef, CosNaming::Name n = ex.rest_of_name; if (ex.why == CosNaming::NamingContext::missing_node) - INFOS("Register() : " << (char *) n[0].id - << " (" << (char *) n[0].kind << ") not found"); + INFOS("Register() : " << (char *) n[0].id + << " (" << (char *) n[0].kind << ") not found"); if (ex.why == CosNaming::NamingContext::not_context) - INFOS("Register() : " << (char *) n[0].id - << " (" << (char *) n[0].kind - << ") is not a context"); + INFOS("Register() : " << (char *) n[0].id + << " (" << (char *) n[0].kind + << ") is not a context"); if (ex.why == CosNaming::NamingContext::not_object) - INFOS("Register() : " << (char *) n[0].id - << " (" << (char *) n[0].kind - << ") is not an object"); + INFOS("Register() : " << (char *) n[0].id + << " (" << (char *) n[0].kind + << ") is not an object"); } catch (CosNaming::NamingContext::CannotProceed&){ @@ -289,13 +305,13 @@ void SALOME_NamingService::Register(CORBA::Object_ptr ObjRef, catch (CosNaming::NamingContext::AlreadyBound&){ INFOS("Register(): CosNaming::NamingContext::AlreadyBound, " - << "object will be rebind"); + << "object will be rebind"); _current_context->rebind(context_name, ObjRef); } catch (CORBA::SystemException&){ INFOS("!!!Register(): CORBA::SystemException: " - << "unable to contact the naming service"); + << "unable to contact the naming service"); throw ServiceUnreachable(); } } @@ -337,11 +353,11 @@ CORBA::Object_ptr SALOME_NamingService::Resolve(const char* Path) // to place the current_context to the correct node CosNaming::Name context_name; - vector splitPath; + std::vector splitPath; _createContextNameDir(Path, - context_name, - splitPath, - false); + context_name, + splitPath, + false); ASSERT(!CORBA::is_nil(_current_context)); @@ -412,13 +428,13 @@ CORBA::Object_ptr SALOME_NamingService::ResolveFirst(const char* Path) Utils_Locker lock (&_myMutex); // SCRUTE(Path); - string thePath = Path; - string basePath = ""; - string name = thePath; + std::string thePath = Path; + std::string basePath = ""; + std::string name = thePath; - string::size_type idx = thePath.rfind('/'); + std::string::size_type idx = thePath.rfind('/'); - if (idx != string::npos) // at least one '/' found + if (idx != std::string::npos) // at least one '/' found { basePath = thePath.substr(0, idx); name = thePath.substr(idx + 1); @@ -436,20 +452,20 @@ CORBA::Object_ptr SALOME_NamingService::ResolveFirst(const char* Path) if (isOk) { - vector listElem = list_directory(); - vector::iterator its = listElem.begin(); + std::vector listElem = list_directory(); + std::vector::iterator its = listElem.begin(); while (its != listElem.end()) - { - MESSAGE(*its); - - if ((*its).find(name) == 0) - { - return Resolve((*its).c_str()); - } - - its++; - } + { + MESSAGE(*its); + + if ((*its).find(name) == 0) + { + return Resolve((*its).c_str()); + } + + its++; + } } return obj._retn(); @@ -475,16 +491,16 @@ CORBA::Object_ptr SALOME_NamingService::ResolveFirst(const char* Path) CORBA::Object_ptr SALOME_NamingService::ResolveComponent(const char* hostname, - const char* containerName, - const char* componentName, - const int nbproc) + const char* containerName, + const char* componentName, + const int nbproc) throw(ServiceUnreachable) { // MESSAGE("ResolveComponent"); Utils_Locker lock (&_myMutex); - string name = "/Containers/"; + std::string name = "/Containers/"; name += hostname; @@ -497,7 +513,7 @@ SALOME_NamingService::ResolveComponent(const char* hostname, char *newContainerName = new char[strlen(containerName) + 8]; sprintf(newContainerName, "%s_%d", containerName, nbproc); name += newContainerName; - delete [] newContainerName; + delete [] newContainerName; } else @@ -513,32 +529,35 @@ SALOME_NamingService::ResolveComponent(const char* hostname, else { SCRUTE(name); - if (Change_Directory(name.c_str())) - { - vector contList = list_subdirs(); - - for (unsigned int ind = 0; ind < contList.size(); ind++) - { - name = contList[ind].c_str(); - - if ( nbproc >= 1 ) - { - char *str_nbproc = new char[8]; - sprintf(str_nbproc, "_%d", nbproc); - if( strstr(name.c_str(),str_nbproc) == NULL) - continue; // check only containers with _%d in name - delete [] str_nbproc; - } - - name += "/"; - name += componentName; - SCRUTE(name); - CORBA::Object_ptr obj = ResolveFirst(name.c_str()); - - if ( !CORBA::is_nil(obj) ) - return obj; - } - } + std::string basename = name; + if (Change_Directory(basename.c_str())) + { + std::vector contList = list_subdirs(); + + for (unsigned int ind = 0; ind < contList.size(); ind++) + { + name = contList[ind].c_str(); + + if ( nbproc >= 1 ) + { + char *str_nbproc = new char[8]; + sprintf(str_nbproc, "_%d", nbproc); + if( strstr(name.c_str(),str_nbproc) == NULL) + continue; // check only containers with _%d in name + delete [] str_nbproc; + } + + name += "/"; + name += componentName; + SCRUTE(name); + CORBA::Object_ptr obj = ResolveFirst(name.c_str()); + + if ( !CORBA::is_nil(obj) ) + return obj; + else + Change_Directory(basename.c_str()); + } + } return CORBA::Object::_nil(); } @@ -555,9 +574,9 @@ SALOME_NamingService::ResolveComponent(const char* hostname, */ // ============================================================================ -string SALOME_NamingService::ContainerName(const char *containerName) +std::string SALOME_NamingService::ContainerName(const char *containerName) { - string ret; + std::string ret; if (strlen(containerName) == 0) ret = "FactoryServer"; @@ -582,7 +601,7 @@ string SALOME_NamingService::ContainerName(const char *containerName) */ // ============================================================================ -string +std::string SALOME_NamingService::ContainerName(const Engines::MachineParameters& params) { int nbproc; @@ -598,7 +617,31 @@ SALOME_NamingService::ContainerName(const Engines::MachineParameters& params) else nbproc = params.nb_node * params.nb_proc_per_node; - string ret = ContainerName(params.container_name); + std::string ret = ContainerName(params.container_name); + + if ( nbproc >= 1 ) + { + char *suffix = new char[8]; + sprintf(suffix, "_%d", nbproc); + ret += suffix; + } + + return ret; +} + +std::string +SALOME_NamingService::ContainerName(const Engines::ContainerParameters& params) +{ + int nbproc; + + if ( !params.isMPI ) + nbproc = 0; + else if ( params.nb_proc <= 0 ) + nbproc = 1; + else + nbproc = params.nb_proc; + + std::string ret = ContainerName(params.container_name); if ( nbproc >= 1 ) { @@ -624,10 +667,10 @@ SALOME_NamingService::ContainerName(const Engines::MachineParameters& params) */ // ============================================================================ -string SALOME_NamingService::BuildContainerNameForNS(const char *containerName, - const char *hostname) +std::string SALOME_NamingService::BuildContainerNameForNS(const char *containerName, + const char *hostname) { - string ret = "/Containers/"; + std::string ret = "/Containers/"; ret += hostname; ret += "/"; ret += ContainerName(containerName); @@ -647,12 +690,25 @@ string SALOME_NamingService::BuildContainerNameForNS(const char *containerName, */ // ============================================================================ -string +std::string SALOME_NamingService:: BuildContainerNameForNS(const Engines::MachineParameters& params, - const char *hostname) + const char *hostname) +{ + std::string ret = "/Containers/"; + ret += hostname; + ret += "/"; + ret += ContainerName(params); + + return ret; +} + +std::string +SALOME_NamingService:: +BuildContainerNameForNS(const Engines::ContainerParameters& params, + const char *hostname) { - string ret = "/Containers/"; + std::string ret = "/Containers/"; ret += hostname; ret += "/"; ret += ContainerName(params); @@ -726,7 +782,7 @@ throw(ServiceUnreachable) Utils_Locker lock (&_myMutex); - string path(Path); + std::string path(Path); // --- if path empty, nothing to create, no context change @@ -770,7 +826,7 @@ throw(ServiceUnreachable) // MESSAGE("BEGIN OF Change_Directory " << Path); Utils_Locker lock (&_myMutex); - string path(Path); + std::string path(Path); // --- if path empty, nothing to do @@ -801,11 +857,11 @@ throw(ServiceUnreachable) if (path[path.length()-1] != '/') path += '/'; // SCRUTE(path); CosNaming::Name context_name; - vector splitPath; + std::vector splitPath; _createContextNameDir(path.c_str(), - context_name, - splitPath, - true); + context_name, + splitPath, + true); // --- Context creation @@ -823,16 +879,16 @@ throw(ServiceUnreachable) CosNaming::Name n = ex.rest_of_name; if (ex.why == CosNaming::NamingContext::missing_node) - MESSAGE( "Change_Directory() : " << (char *) n[0].id - << " (" << (char *) n[0].kind << ") not found"); + MESSAGE( "Change_Directory() : " << (char *) n[0].id + << " (" << (char *) n[0].kind << ") not found"); if (ex.why == CosNaming::NamingContext::not_context) - INFOS("Change_Directory() : " << (char *) n[0].id - << " (" << (char *) n[0].kind - << ") is not a context" ); + INFOS("Change_Directory() : " << (char *) n[0].id + << " (" << (char *) n[0].kind + << ") is not a context" ); if (ex.why == CosNaming::NamingContext::not_object) - INFOS( "Change_Directory() : " << (char *) n[0].id - << " (" << (char *) n[0].kind - << ") is not an object" ); + INFOS( "Change_Directory() : " << (char *) n[0].id + << " (" << (char *) n[0].kind + << ") is not an object" ); } catch (CosNaming::NamingContext::CannotProceed&) @@ -848,7 +904,7 @@ throw(ServiceUnreachable) catch (CORBA::SystemException&) { INFOS("Change_Directory():CORBA::SystemException : unable to contact" - << "the naming service"); + << "the naming service"); throw ServiceUnreachable(); } @@ -874,7 +930,7 @@ throw(ServiceUnreachable) CosNaming::NamingContext_var ref_context = _current_context; - vector splitPath; + std::vector splitPath; splitPath.resize(0); int lengthPath = 0; bool notFound = true ; @@ -895,7 +951,7 @@ throw(ServiceUnreachable) throw ServiceUnreachable(); } - string path; + std::string path; lengthPath = splitPath.size(); for (int k = 0 ; k < lengthPath ;k++) { @@ -940,33 +996,33 @@ throw(ServiceUnreachable) if (! CORBA::is_nil(binding_iterator)) { while (binding_iterator->next_one(binding)) - { - CosNaming::Name bindingName = binding->binding_name; - - if (binding->binding_type == CosNaming::ncontext) - { - MESSAGE( "Context : " << bindingName[0].id ); - - try - { - Change_Directory(bindingName[0].id); - } - - catch (ServiceUnreachable&) - { - INFOS( "list(): ServiceUnreachable" ) - throw ServiceUnreachable(); - } - - list(); - _current_context = ref_context ; - } - - else if (binding->binding_type == CosNaming::nobject) - { - MESSAGE( "Object : " << bindingName[0].id ); - } - } + { + CosNaming::Name bindingName = binding->binding_name; + + if (binding->binding_type == CosNaming::ncontext) + { + MESSAGE( "Context : " << bindingName[0].id ); + + try + { + Change_Directory(bindingName[0].id); + } + + catch (ServiceUnreachable&) + { + INFOS( "list(): ServiceUnreachable" ) + throw ServiceUnreachable(); + } + + list(); + _current_context = ref_context ; + } + + else if (binding->binding_type == CosNaming::nobject) + { + MESSAGE( "Object : " << bindingName[0].id ); + } + } binding_iterator->destroy(); } @@ -983,11 +1039,11 @@ throw(ServiceUnreachable) */ // ============================================================================ -vector SALOME_NamingService::list_directory() +std::vector SALOME_NamingService::list_directory() throw(ServiceUnreachable) { // MESSAGE("list_directory"); - vector dirList ; + std::vector dirList ; dirList.resize(0); CosNaming::BindingList_var binding_list; @@ -1012,7 +1068,7 @@ throw(ServiceUnreachable) { // remove memory leak // dirList.push_back(CORBA::string_dup(bindingName[0].id)); - dirList.push_back(string(bindingName[0].id)); + dirList.push_back(std::string(bindingName[0].id)); } } @@ -1037,11 +1093,11 @@ throw(ServiceUnreachable) */ // ============================================================================ -vector SALOME_NamingService::list_subdirs() +std::vector SALOME_NamingService::list_subdirs() throw(ServiceUnreachable) { MESSAGE("list_subdirs"); - vector dirList ; + std::vector dirList ; dirList.resize(0); CosNaming::BindingList_var binding_list; @@ -1087,14 +1143,14 @@ throw(ServiceUnreachable) */ // ============================================================================ -vector SALOME_NamingService::list_directory_recurs() +std::vector SALOME_NamingService::list_directory_recurs() throw(ServiceUnreachable) { MESSAGE("list_directory_recurs"); Utils_Locker lock (&_myMutex); - vector dirList ; + std::vector dirList ; char* currentDir = Current_Directory(); @@ -1121,7 +1177,7 @@ throw(ServiceUnreachable) Utils_Locker lock (&_myMutex); - string path(Path); + std::string path(Path); // --- if path empty, nothing to do @@ -1141,11 +1197,11 @@ throw(ServiceUnreachable) // --- context of the directory containing the object CosNaming::Name context_name; - vector splitPath; + std::vector splitPath; int dimension_resultat = _createContextNameDir(path.c_str(), - context_name, - splitPath, - true); + context_name, + splitPath, + true); bool exist = false; @@ -1158,7 +1214,7 @@ throw(ServiceUnreachable) { CORBA::Object_var obj = _current_context->resolve(context_name); _current_context = CosNaming::NamingContext::_narrow(obj); - exist = true; + exist = true; } catch (CosNaming::NamingContext::NotFound &ex) @@ -1171,14 +1227,14 @@ throw(ServiceUnreachable) if (ex.why == CosNaming::NamingContext::missing_node) INFOS( "Destroy_Name(): " << (char *) n[0].id << " (" << (char *) n[0].kind << ") not found" ); - if (ex.why == CosNaming::NamingContext::not_context) - INFOS( "Destroy_Name() : " << (char *) n[0].id - << " (" << (char *) n[0].kind - << ") is not a context" ); - if (ex.why == CosNaming::NamingContext::not_object) - INFOS( "Destroy_Name() : " << (char *) n[0].id - << " (" << (char *) n[0].kind - << ") is not an object" ); + if (ex.why == CosNaming::NamingContext::not_context) + INFOS( "Destroy_Name() : " << (char *) n[0].id + << " (" << (char *) n[0].kind + << ") is not a context" ); + if (ex.why == CosNaming::NamingContext::not_object) + INFOS( "Destroy_Name() : " << (char *) n[0].id + << " (" << (char *) n[0].kind + << ") is not an object" ); } catch (CosNaming::NamingContext::InvalidName &) @@ -1213,29 +1269,29 @@ throw(ServiceUnreachable) context_name.length(1); try - { - // --- the last element is an object and not a directory + { + // --- the last element is an object and not a directory - context_name[0].id = - CORBA::string_dup(splitPath[dimension_resultat].c_str()); - context_name[0].kind = CORBA::string_dup("object"); - SCRUTE(context_name[0].id); + context_name[0].id = + CORBA::string_dup(splitPath[dimension_resultat].c_str()); + context_name[0].kind = CORBA::string_dup("object"); + SCRUTE(context_name[0].id); - _current_context->unbind(context_name); - MESSAGE("The object " << context_name[0].id << " has been deleted"); - } + _current_context->unbind(context_name); + MESSAGE("The object " << context_name[0].id << " has been deleted"); + } catch (CosNaming::NamingContext::NotFound& ex) - { - CosNaming::Name n = ex.rest_of_name; - - if (ex.why == CosNaming::NamingContext::missing_node) - INFOS( "Destroy_Name() : " << (char *) n[0].id - << " (" << (char *) n[0].kind << ") not found" ); - if (ex.why == CosNaming::NamingContext::not_context) - INFOS( "Destroy_Name() : " << (char *) n[0].id - << " (" << (char *) n[0].kind - << ") is not a context" ); + { + CosNaming::Name n = ex.rest_of_name; + + if (ex.why == CosNaming::NamingContext::missing_node) + INFOS( "Destroy_Name() : " << (char *) n[0].id + << " (" << (char *) n[0].kind << ") not found" ); + if (ex.why == CosNaming::NamingContext::not_context) + INFOS( "Destroy_Name() : " << (char *) n[0].id + << " (" << (char *) n[0].kind + << ") is not a context" ); if (ex.why == CosNaming::NamingContext::not_object) INFOS( "Destroy_Name() : " << (char *) n[0].id << " (" << (char *) n[0].kind @@ -1243,21 +1299,21 @@ throw(ServiceUnreachable) } catch (CosNaming::NamingContext::CannotProceed&) - { - INFOS( "Destroy_Name(): CosNaming::NamingContext::CannotProceed"); - } + { + INFOS( "Destroy_Name(): CosNaming::NamingContext::CannotProceed"); + } catch (CosNaming::NamingContext::InvalidName&) - { - INFOS( "Destroy_Name(): CosNaming::NamingContext::InvalidName"); - } + { + INFOS( "Destroy_Name(): CosNaming::NamingContext::InvalidName"); + } catch (CORBA::SystemException&) - { - INFOS( "Destroy_Name(): CORBA::SystemException: unable to contact" - << " the naming service"); - throw ServiceUnreachable(); - } + { + INFOS( "Destroy_Name(): CORBA::SystemException: unable to contact" + << " the naming service"); + throw ServiceUnreachable(); + } } } @@ -1277,7 +1333,7 @@ throw(ServiceUnreachable) Utils_Locker lock (&_myMutex); - string path(Path); + std::string path(Path); // --- if path empty, nothing to do @@ -1299,11 +1355,11 @@ throw(ServiceUnreachable) // --- context of the directory CosNaming::Name context_name; - vector splitPath; + std::vector splitPath; int dimension_resultat = _createContextNameDir(path.c_str(), - context_name, - splitPath, - true); + context_name, + splitPath, + true); bool exist = false; if (dimension_resultat > 0) @@ -1315,7 +1371,7 @@ throw(ServiceUnreachable) { CORBA::Object_var obj = _current_context->resolve(context_name); _current_context = CosNaming::NamingContext::_narrow(obj); - exist = true; + exist = true; } catch (CosNaming::NamingContext::NotFound &ex) @@ -1328,14 +1384,14 @@ throw(ServiceUnreachable) if (ex.why == CosNaming::NamingContext::missing_node) INFOS( "Destroy_Directory(): " << (char *) n[0].id << " (" << (char *) n[0].kind << ") not found" ); - if (ex.why == CosNaming::NamingContext::not_context) - INFOS( "Destroy_Directory() : " << (char *) n[0].id - << " (" << (char *) n[0].kind - << ") is not a context" ); - if (ex.why == CosNaming::NamingContext::not_object) - INFOS( "Destroy_Directory() : " << (char *) n[0].id - << " (" << (char *) n[0].kind - << ") is not an object" ); + if (ex.why == CosNaming::NamingContext::not_context) + INFOS( "Destroy_Directory() : " << (char *) n[0].id + << " (" << (char *) n[0].kind + << ") is not a context" ); + if (ex.why == CosNaming::NamingContext::not_object) + INFOS( "Destroy_Directory() : " << (char *) n[0].id + << " (" << (char *) n[0].kind + << ") is not an object" ); } catch (CosNaming::NamingContext::InvalidName &) @@ -1392,46 +1448,46 @@ throw(ServiceUnreachable) if (isContextDestroyed) { try - { - _current_context->unbind(context_name); - MESSAGE( "The bind to the context " - << context_name[0].id - << " has been deleted" ); - } + { + _current_context->unbind(context_name); + MESSAGE( "The bind to the context " + << context_name[0].id + << " has been deleted" ); + } catch (CosNaming::NamingContext::NotFound& ex) - { - CosNaming::Name n = ex.rest_of_name; - - if (ex.why == CosNaming::NamingContext::missing_node) - INFOS( "Destroy_Directory() : " << (char *) n[0].id - << " (" << (char *) n[0].kind << ") not found" ); - if (ex.why == CosNaming::NamingContext::not_context) - INFOS( "Destroy_Directory() : " << (char *) n[0].id - << " (" << (char *) n[0].kind - << ") is not a context" ); - if (ex.why == CosNaming::NamingContext::not_object) - INFOS( "Destroy_Directory() : " << (char *) n[0].id - << " (" << (char *) n[0].kind - << ") is not an object" ); - } + { + CosNaming::Name n = ex.rest_of_name; + + if (ex.why == CosNaming::NamingContext::missing_node) + INFOS( "Destroy_Directory() : " << (char *) n[0].id + << " (" << (char *) n[0].kind << ") not found" ); + if (ex.why == CosNaming::NamingContext::not_context) + INFOS( "Destroy_Directory() : " << (char *) n[0].id + << " (" << (char *) n[0].kind + << ") is not a context" ); + if (ex.why == CosNaming::NamingContext::not_object) + INFOS( "Destroy_Directory() : " << (char *) n[0].id + << " (" << (char *) n[0].kind + << ") is not an object" ); + } catch (CosNaming::NamingContext::CannotProceed&) - { - INFOS("Destroy_Directory: CosNaming::NamingContext::CannotProceed"); - } + { + INFOS("Destroy_Directory: CosNaming::NamingContext::CannotProceed"); + } catch (CosNaming::NamingContext::InvalidName&) - { - INFOS("Destroy_Directory: CosNaming::NamingContext::InvalidName"); - } + { + INFOS("Destroy_Directory: CosNaming::NamingContext::InvalidName"); + } catch (CORBA::SystemException&) - { - INFOS("Destroy_Directory:CORBA::SystemException : unable to contact" - << " the naming service"); - throw ServiceUnreachable(); - } + { + INFOS("Destroy_Directory:CORBA::SystemException : unable to contact" + << " the naming service"); + throw ServiceUnreachable(); + } } } @@ -1451,10 +1507,10 @@ throw(ServiceUnreachable) MESSAGE("begin of Destroy_FullDirectory " << Path); if( Change_Directory(Path) ) { - vector contList = list_directory(); + std::vector contList = list_directory(); for (unsigned int ind = 0; ind < contList.size(); ind++) - Destroy_Name(contList[ind].c_str()); + Destroy_Name(contList[ind].c_str()); Destroy_Directory(Path); } @@ -1512,30 +1568,30 @@ void SALOME_NamingService::_initialize_root_context() // ============================================================================ int -SALOME_NamingService::_createContextNameDir(string path, - CosNaming::Name& context_name, - vector& splitPath, - bool onlyDir) +SALOME_NamingService::_createContextNameDir(std::string path, + CosNaming::Name& context_name, + std::vector& splitPath, + bool onlyDir) { if (path.empty()) return 0; - string::size_type begIdx, endIdx; - const string delims("/"); + std::string::size_type begIdx, endIdx; + const std::string delims("/"); splitPath.resize(0); bool endWithDelim = false; begIdx = path.find_first_not_of(delims); - while (begIdx != string::npos) + while (begIdx != std::string::npos) { endIdx = path.find_first_of(delims, begIdx); if (endIdx == path.length()-1) - endWithDelim = true; - if (endIdx == string::npos) - endIdx = path.length(); + endWithDelim = true; + if (endIdx == std::string::npos) + endIdx = path.length(); int lsub = endIdx - begIdx; if (lsub >= 1) - splitPath.push_back(path.substr(begIdx, lsub)); + splitPath.push_back(path.substr(begIdx, lsub)); begIdx = path.find_first_not_of(delims, endIdx); } @@ -1544,7 +1600,7 @@ SALOME_NamingService::_createContextNameDir(string path, { dim = splitPath.size()-1; // omit final object if (endWithDelim) // unless the path ends with a delimiter - dim++; + dim++; endWithDelim = true; } else @@ -1556,15 +1612,15 @@ SALOME_NamingService::_createContextNameDir(string path, // SCRUTE(splitPath[i]); context_name[i].id = CORBA::string_dup(splitPath[i].c_str()); if (!endWithDelim && (i == dim-1)) // here, the last string is an object - { - context_name[i].kind = CORBA::string_dup("object"); -// MESSAGE("--- " <next_one(binding)) - { - CosNaming::Name bindingName = binding->binding_name; - - if (binding->binding_type == CosNaming::ncontext) - { - // --- We work on a directory, - // the search should be done in this directory - - Change_Directory(bindingName[0].id); - _Find(name, occurence_number); - - // --- We'll go back to the initial context - - _current_context = ref_context ; - } - - else if (binding->binding_type == CosNaming::nobject) - { - // --- We work on an object... - - if (!strcmp( bindingName[0].id, name)) - { - //MESSAGE("One occurence was found"); - occurence_number++; - - // --- We keep in memory the directory where - // one occurence was found - - found_context = _current_context ; - } - } - } + { + CosNaming::Name bindingName = binding->binding_name; + + if (binding->binding_type == CosNaming::ncontext) + { + // --- We work on a directory, + // the search should be done in this directory + + Change_Directory(bindingName[0].id); + _Find(name, occurence_number); + + // --- We'll go back to the initial context + + _current_context = ref_context ; + } + + else if (binding->binding_type == CosNaming::nobject) + { + // --- We work on an object... + + if (!strcmp( bindingName[0].id, name)) + { + //MESSAGE("One occurence was found"); + occurence_number++; + + // --- We keep in memory the directory where + // one occurence was found + + found_context = _current_context ; + } + } + } binding_iterator->destroy(); } @@ -1658,10 +1714,10 @@ void SALOME_NamingService::_Find(const char* name, void SALOME_NamingService:: -_current_directory(vector& splitPath, - int& lengthResult, - CosNaming::NamingContext_var contextToFind, - bool& notFound) +_current_directory(std::vector& splitPath, + int& lengthResult, + CosNaming::NamingContext_var contextToFind, + bool& notFound) { MESSAGE("BEGIN OF _current_Directory"); @@ -1688,7 +1744,7 @@ _current_directory(vector& splitPath, // --- directory, search in it const char* bindingNameid=bindingName[0].id; - splitPath.push_back(bindingNameid); + splitPath.push_back(bindingNameid); lengthResult++; CORBA::Object_var obj = _current_context->resolve(bindingName); @@ -1706,9 +1762,9 @@ _current_directory(vector& splitPath, SCRUTE(bindingName[0].id); Change_Directory(bindingName[0].id); _current_directory(splitPath, - lengthResult, + lengthResult, contextToFind, - notFound); + notFound); if (notFound) { @@ -1717,8 +1773,8 @@ _current_directory(vector& splitPath, _current_context = ref_context; MESSAGE("Just before the delete of " - << splitPath[lengthResult-1]); - splitPath.pop_back(); + << splitPath[lengthResult-1]); + splitPath.pop_back(); lengthResult--; } } @@ -1749,9 +1805,9 @@ _current_directory(vector& splitPath, */ // ============================================================================ -void SALOME_NamingService::_list_directory_recurs(vector& myList, - string relativeSubDir, - string absCurDirectory) +void SALOME_NamingService::_list_directory_recurs(std::vector& myList, + std::string relativeSubDir, + std::string absCurDirectory) { CosNaming::BindingList_var binding_list; CosNaming::BindingIterator_var binding_iterator; @@ -1760,7 +1816,7 @@ void SALOME_NamingService::_list_directory_recurs(vector& myList, unsigned long nb = 0 ; // --- only for thethe use of BindingIterator // to access the bindings - string absDir; + std::string absDir; CosNaming::NamingContext_var ref_context = _current_context; @@ -1779,23 +1835,23 @@ void SALOME_NamingService::_list_directory_recurs(vector& myList, if (! CORBA::is_nil(binding_iterator)) { while (binding_iterator->next_one(binding)) - { - CosNaming::Name bindingName = binding->binding_name; - - if (binding->binding_type == CosNaming::ncontext) - { - string relativeSdir(bindingName[0].id); - _list_directory_recurs(myList, relativeSdir, absDir); - } - - else if (binding->binding_type == CosNaming::nobject) - { - string objName(bindingName[0].id); - string elt = absDir + "/" + objName; - SCRUTE(elt); - myList.push_back(elt); - } - } + { + CosNaming::Name bindingName = binding->binding_name; + + if (binding->binding_type == CosNaming::ncontext) + { + std::string relativeSdir(bindingName[0].id); + _list_directory_recurs(myList, relativeSdir, absDir); + } + + else if (binding->binding_type == CosNaming::nobject) + { + std::string objName(bindingName[0].id); + std::string elt = absDir + "/" + objName; + SCRUTE(elt); + myList.push_back(elt); + } + } binding_iterator->destroy(); } @@ -1817,3 +1873,12 @@ char * SALOME_NamingService::getIORaddr() return _orb->object_to_string(_root_context); } +/*! \brief get the orb used by the naming service + * + * \return the orb + */ +CORBA::ORB_ptr SALOME_NamingService::orb() +{ + return _orb; +} + diff --git a/src/NamingService/SALOME_NamingService.hxx b/src/NamingService/SALOME_NamingService.hxx index daa5ca636..fa30e8db6 100644 --- a/src/NamingService/SALOME_NamingService.hxx +++ b/src/NamingService/SALOME_NamingService.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME NamingService : wrapping NamingService services // File : SALOME_NamingService.hxx // Author : Estelle Deville @@ -40,6 +41,10 @@ #include "SALOME_NamingService_defs.hxx" +#ifdef WNT +#pragma warning(disable:4290) // Warning Exception ... +#endif + class NAMINGSERVICE_EXPORT SALOME_NamingService { public: @@ -48,26 +53,32 @@ public: virtual ~SALOME_NamingService(); - void init_orb(CORBA::ORB_ptr orb); + void init_orb(CORBA::ORB_ptr orb=0); void Register(CORBA::Object_ptr ObjRef, - const char* Path) + const char* Path) throw(ServiceUnreachable); CORBA::Object_ptr Resolve(const char* Path) throw( ServiceUnreachable); CORBA::Object_ptr ResolveFirst(const char* Path) throw( ServiceUnreachable); CORBA::Object_ptr ResolveComponent(const char* hostname, - const char* containerName, - const char* componentName, - const int nbproc=0) + const char* containerName, + const char* componentName, + const int nbproc=0) throw(ServiceUnreachable); std::string ContainerName(const char *ContainerName); - std::string ContainerName(const Engines::MachineParameters& params); + std::string ContainerName(const Engines::ContainerParameters& params); std::string BuildContainerNameForNS(const char *ContainerName, - const char *hostname); + const char *hostname); + std::string + BuildContainerNameForNS(const Engines::ContainerParameters& params, + const char *hostname); + + // Will Be deleted on SALOME 6 + std::string ContainerName(const Engines::MachineParameters& params); std::string BuildContainerNameForNS(const Engines::MachineParameters& params, - const char *hostname); + const char *hostname); int Find(const char* name) throw(ServiceUnreachable); bool Create_Directory(const char* Path) @@ -91,25 +102,26 @@ public: virtual void Destroy_FullDirectory(const char* Path) throw(ServiceUnreachable); char* getIORaddr(); + CORBA::ORB_ptr orb(); protected: Utils_Mutex _myMutex; - CORBA::ORB_ptr _orb; + CORBA::ORB_var _orb; CosNaming::NamingContext_var _root_context, _current_context; void _initialize_root_context(); int _createContextNameDir(std::string path, - CosNaming::Name& context_name, - std::vector& splitPath, - bool onlyDir); + CosNaming::Name& context_name, + std::vector& splitPath, + bool onlyDir); void _Find(const char* name, CORBA::Long& occurence_number); void _current_directory(std::vector& splitPath, - int& lengthResult, - CosNaming::NamingContext_var contextToFind, - bool& notFound); + int& lengthResult, + CosNaming::NamingContext_var contextToFind, + bool& notFound); void _list_directory_recurs(std::vector& myList, - std::string relativeSubDir, - std::string absCurDirectory); + std::string relativeSubDir, + std::string absCurDirectory); }; diff --git a/src/NamingService/SALOME_NamingService.i b/src/NamingService/SALOME_NamingService.i index d1c7ab709..5d1e28ba9 100644 --- a/src/NamingService/SALOME_NamingService.i +++ b/src/NamingService/SALOME_NamingService.i @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME NamingService : wrapping NamingService services // File : SALOME_NamingService.i // Author : Paul RASCLE, EDF diff --git a/src/NamingService/SALOME_NamingServicePy.py b/src/NamingService/SALOME_NamingServicePy.py index 1a41f7ddb..2149ee838 100644 --- a/src/NamingService/SALOME_NamingServicePy.py +++ b/src/NamingService/SALOME_NamingServicePy.py @@ -1,30 +1,34 @@ #! /usr/bin/env python -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # SALOME NamingService : wrapping NamingService services # File : SALOME_NamingServicePy.py # Author : Estelle Deville, CEA # Module : SALOME # $Header$ +## @package SALOME_NamingServicePy +# \brief Module to manage SALOME naming service from python # import sys import time @@ -37,6 +41,9 @@ from SALOME_utilities import * #============================================================================= class SALOME_NamingServicePy_i(object): + """ + A class to manage SALOME naming service from python code + """ _orb = None _root_context=None _current_context=None @@ -44,14 +51,21 @@ class SALOME_NamingServicePy_i(object): #------------------------------------------------------------------------- - def __init__(self, orb): + def __init__(self, orb=None): + """ + Standard Constructor, with ORB reference. + + Initializes the naming service root context + """ #MESSAGE ( "SALOME_NamingServicePy_i::__init__" ) + if orb is None: + orb=CORBA.ORB_init([''], CORBA.ORB_ID) self._orb = orb # initialize root context and current context - ok = 0 - steps = 240 - while steps > 0 and ok == 0: - try: + ok = 0 + steps = 240 + while steps > 0 and ok == 0: + try: obj =self._orb.resolve_initial_references("NameService") self._root_context =obj._narrow(CosNaming.NamingContext) self._current_context = self._root_context @@ -60,13 +74,13 @@ class SALOME_NamingServicePy_i(object): if self._root_context is None : #MESSAGE ( "Name Service Reference is invalid" ) #sys.exit(1) - MESSAGE(" Name service not found") - else: - ok = 1 - except (CORBA.TRANSIENT,CORBA.OBJECT_NOT_EXIST,CORBA.COMM_FAILURE): - MESSAGE(" Name service not found") - time.sleep(0.25) - steps = steps - 1 + MESSAGE(" Name service not found") + else: + ok = 1 + except (CORBA.TRANSIENT,CORBA.OBJECT_NOT_EXIST,CORBA.COMM_FAILURE): + MESSAGE(" Name service not found") + time.sleep(0.25) + steps = steps - 1 if steps == 0 and self._root_context is None: MESSAGE ( "Name Service Reference is invalid" ) sys.exit(1) @@ -180,6 +194,10 @@ class SALOME_NamingServicePy_i(object): #------------------------------------------------------------------------- def Create_Directory(self,ObjRef, Path): + """ ns.Create_Directory(ObjRef, Path) + + create a sub directory + """ MESSAGE ( "SALOME_NamingServicePy_i::Create_Directory" ) _not_exist = 0 path_list = list(Path) @@ -205,6 +223,10 @@ class SALOME_NamingServicePy_i(object): MESSAGE ( "Create_Directory : CORBA.TRANSIENT,CORBA.OBJECT_NOT_EXIST,CORBA.COMM_FAILURE" ) def Destroy_Name(self,Path): + """ ns.Destroy_Name(Path) + + remove a name in naming service + """ resolve_path=string.split(Path,'/') if resolve_path[0] == '': del resolve_path[0] dir_path=resolve_path[:-1] @@ -221,6 +243,10 @@ class SALOME_NamingServicePy_i(object): return def Destroy_FullDirectory(self,Path): + """ ns.Destroy_FullDirectory(Path) + + remove recursively a directory + """ context_name=[] for e in string.split(Path,'/'): if e == '':continue diff --git a/src/NamingService/SALOME_NamingService_defs.hxx b/src/NamingService/SALOME_NamingService_defs.hxx index 061d2f9ce..2115e6034 100644 --- a/src/NamingService/SALOME_NamingService_defs.hxx +++ b/src/NamingService/SALOME_NamingService_defs.hxx @@ -1,24 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME NamingService : wrapping NamingService services // File : SALOME_NamingService_defs.hxx // Author : Alexander A. BORODIN @@ -29,7 +27,7 @@ #define SALOME_NAMINGSERVICE_DEFS_HXX #ifdef WIN32 -# ifdef NAMINGSERVICE_EXPORTS +# if defined NAMINGSERVICE_EXPORTS || defined SalomeNS_EXPORTS # define NAMINGSERVICE_EXPORT __declspec( dllexport ) # else # define NAMINGSERVICE_EXPORT __declspec( dllimport ) diff --git a/src/NamingService/ServiceUnreachable.cxx b/src/NamingService/ServiceUnreachable.cxx index e25928aac..94c28a2d8 100644 --- a/src/NamingService/ServiceUnreachable.cxx +++ b/src/NamingService/ServiceUnreachable.cxx @@ -1,36 +1,36 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME NamingService : wrapping NamingService services // File : ServiceUnreachable.cxx // Module : SALOME // #include "ServiceUnreachable.hxx" -using namespace std; ServiceUnreachable::ServiceUnreachable( void ): SALOME_Exception( "ServiceUnreachable" ) { - ; + ; } ServiceUnreachable::ServiceUnreachable( const ServiceUnreachable &ex ): SALOME_Exception( ex ) { - ; + ; } diff --git a/src/NamingService/ServiceUnreachable.hxx b/src/NamingService/ServiceUnreachable.hxx index 8e2fa2b8e..d27484ad5 100644 --- a/src/NamingService/ServiceUnreachable.hxx +++ b/src/NamingService/ServiceUnreachable.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME NamingService : wrapping NamingService services // File : ServiceUnreachable.hxx // Author : Paul RASCLE, EDF @@ -36,8 +37,8 @@ class NAMINGSERVICE_EXPORT ServiceUnreachable : public SALOME_Exception { public : - ServiceUnreachable( void ); - ServiceUnreachable( const ServiceUnreachable &ex ); + ServiceUnreachable( void ); + ServiceUnreachable( const ServiceUnreachable &ex ); } ; -#endif /* #if ( !defined SERVICEUNREACHABLE_H ) */ +#endif /* #if ( !defined SERVICEUNREACHABLE_H ) */ diff --git a/src/NamingService/Test/Makefile.am b/src/NamingService/Test/Makefile.am index 1de5e46d5..f8073e03c 100644 --- a/src/NamingService/Test/Makefile.am +++ b/src/NamingService/Test/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # SALOMELocalTrace : log on local machine # File : Makefile.am # Author : Guillaume BOULANT (CSSI) @@ -36,7 +37,7 @@ include $(top_srcdir)/salome_adm/unix/make_common_starter.am salomeinclude_HEADERS= NamingServiceTest.hxx # Scripts to be installed -dist_salomescript_SCRIPTS = TestNamingService.py +dist_salomescript_PYTHON = TestNamingService.py # @@ -54,10 +55,14 @@ COMMON_CPPFLAGS=\ -I$(srcdir)/$(RPATH)/Basics \ -I$(srcdir)/$(RPATH)/SALOMELocalTrace \ -I$(srcdir)/$(RPATH)/Utils \ - -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ +# This local variable defines the list of dependant libraries common to all target in this package. +COMMON_LIBS =\ + @CPPUNIT_LIBS@ \ + ../libSalomeNS.la @CORBA_LIBS@ + # # =============================================================== # Libraries targets @@ -67,7 +72,7 @@ lib_LTLIBRARIES = libNamingServiceTest.la libNamingServiceTest_la_SOURCES = NamingServiceTest.cxx libNamingServiceTest_la_CPPFLAGS = $(COMMON_CPPFLAGS) libNamingServiceTest_la_LDFLAGS = -no-undefined -version-info=0:0:0 -libNamingServiceTest_la_LIBADD = @CPPUNIT_LIBS@ +libNamingServiceTest_la_LIBADD = $(COMMON_LIBS) # @@ -91,4 +96,4 @@ TestNamingService_LDADD = \ $(RPATH)/SALOMETraceCollector/Test/libSALOMETraceCollectorTest.la \ $(RPATH)/Utils/Test/libUtilsTest.la $(RPATH)/Utils/libOpUtil.la \ $(RPATH)/Basics/libSALOMEBasics.la \ - $(top_builddir)/idl/libSalomeIDLKernel.la + $(top_builddir)/idl/libSalomeIDLKernel.la $(COMMON_LIBS) diff --git a/src/NamingService/Test/NamingServiceTest.cxx b/src/NamingService/Test/NamingServiceTest.cxx index eb3e3a5de..033f8f87e 100644 --- a/src/NamingService/Test/NamingServiceTest.cxx +++ b/src/NamingService/Test/NamingServiceTest.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "NamingServiceTest.hxx" #include "Utils_ORB_INIT.hxx" #include "Utils_SINGLETON.hxx" @@ -29,7 +30,6 @@ #include #include -using namespace std; // --- uncomment to have some traces on standard error // (useful only when adding new tests...) @@ -114,15 +114,15 @@ NamingServiceTest::setUp() // --- trace on file const char *theFileName = TRACEFILE; - string s = "file:"; + std::string s = "file:"; s += theFileName; //s="local"; //s="with_logger"; CPPUNIT_ASSERT(! setenv("SALOME_trace",s.c_str(),1)); // 1: overwrite - ofstream traceFile; + std::ofstream traceFile; // traceFile.open(theFileName, ios::out | ios::trunc); - traceFile.open(theFileName, ios::out | ios::app); + traceFile.open(theFileName, std::ios::out | std::ios::app); CPPUNIT_ASSERT(traceFile); // file created empty, then closed traceFile.close(); @@ -416,7 +416,7 @@ NamingServiceTest::testResolveFirst() { NSTEST::echo_var anEchoRef = myFactory->createInstance(); ref[i] = anEchoRef->getId(); - string name = "/nstestfirst/echo_"; + std::string name = "/nstestfirst/echo_"; char anum[10]; sprintf(anum,"%d",ref[i]); name += anum; @@ -425,7 +425,7 @@ NamingServiceTest::testResolveFirst() for (int i=0; igetId() == ref[i]); } - string name = "/nstestfirst/echo"; + std::string name = "/nstestfirst/echo"; obj = _NS.ResolveFirst(name.c_str()); CPPUNIT_ASSERT(!CORBA::is_nil(obj)); NSTEST::echo_var anEchoRef = NSTEST::echo::_narrow(obj); @@ -468,7 +468,7 @@ NamingServiceTest::testResolveFirstRelative() { NSTEST::echo_var anEchoRef = myFactory->createInstance(); ref[i] = anEchoRef->getId(); - string name = "/nstestfirstrel/echo_"; + std::string name = "/nstestfirstrel/echo_"; char anum[10]; sprintf(anum,"%d",ref[i]); name += anum; @@ -478,7 +478,7 @@ NamingServiceTest::testResolveFirstRelative() for (int i=0; icreateInstance(); _NS.Register(anEchoRef, - "/Containers/theHostName/theContainerName/theComponentName"); + "/Containers/theHostName/theContainerName/theComponentName"); obj = _NS.ResolveComponent("theHostName", - "theContainerName", - "theComponentName"); + "theContainerName", + "theComponentName"); CPPUNIT_ASSERT(!CORBA::is_nil(obj)); NSTEST::echo_var anEchoRefa = NSTEST::echo::_narrow(obj); CPPUNIT_ASSERT(!CORBA::is_nil(anEchoRefa)); @@ -571,12 +571,12 @@ NamingServiceTest::testResolveComponentOK() NSTEST::echo_var anEchoRef2 = myFactory->createInstance(); _NS.Register(anEchoRef2, - "/Containers/theHostName/theContainerName_2/theComponentName"); + "/Containers/theHostName/theContainerName_2/theComponentName"); obj = _NS.ResolveComponent("theHostName", - "theContainerName", - "theComponentName", - 2); + "theContainerName", + "theComponentName", + 2); CPPUNIT_ASSERT(!CORBA::is_nil(obj)); NSTEST::echo_var anEchoRefb = NSTEST::echo::_narrow(obj); CPPUNIT_ASSERT(!CORBA::is_nil(anEchoRefb)); @@ -599,11 +599,11 @@ NamingServiceTest::testResolveComponentEmptyHostname() NSTEST::echo_var anEchoRef = myFactory->createInstance(); _NS.Register(anEchoRef, - "/Containers/theHostName/theContainerName/theComponentName"); + "/Containers/theHostName/theContainerName/theComponentName"); obj = _NS.ResolveComponent("", - "theContainerName", - "theComponentName"); + "theContainerName", + "theComponentName"); CPPUNIT_ASSERT(CORBA::is_nil(obj)); } @@ -623,11 +623,11 @@ NamingServiceTest::testResolveComponentUnknownHostname() NSTEST::echo_var anEchoRef = myFactory->createInstance(); _NS.Register(anEchoRef, - "/Containers/theHostName/theContainerName/theComponentName"); + "/Containers/theHostName/theContainerName/theComponentName"); obj = _NS.ResolveComponent("anUnknownHostName", - "theContainerName", - "theComponentName"); + "theContainerName", + "theComponentName"); CPPUNIT_ASSERT(CORBA::is_nil(obj)); } @@ -651,24 +651,24 @@ NamingServiceTest::testResolveComponentEmptyContainerName() NSTEST::echo_var anEchoRef = myFactory->createInstance(); _NS.Register(anEchoRef, - "/Containers/theHostName/theContainerName/theComponentName"); + "/Containers/theHostName/theContainerName/theComponentName"); NSTEST::echo_var anEchoRef2 = myFactory->createInstance(); _NS.Register(anEchoRef2, - "/Containers/theHostName/aContainerName/aComponentName"); + "/Containers/theHostName/aContainerName/aComponentName"); NSTEST::echo_var anEchoRef3 = myFactory->createInstance(); _NS.Register(anEchoRef3, - "/Containers/theHostName/otherContainerName/theComponentName"); + "/Containers/theHostName/otherContainerName/theComponentName"); obj = _NS.ResolveComponent("anUnknownHostName", - "", - "theComponentName"); + "", + "theComponentName"); CPPUNIT_ASSERT(CORBA::is_nil(obj)); obj = _NS.ResolveComponent("theHostName", - "", - "theComponentName"); + "", + "theComponentName"); CPPUNIT_ASSERT(!CORBA::is_nil(obj)); NSTEST::echo_var anEchoRefa = NSTEST::echo::_narrow(obj); CPPUNIT_ASSERT(!CORBA::is_nil(anEchoRefa)); @@ -691,19 +691,19 @@ NamingServiceTest::testResolveComponentUnknownContainerName() NSTEST::echo_var anEchoRef = myFactory->createInstance(); _NS.Register(anEchoRef, - "/Containers/theHostName/theContainerName/theComponentName"); + "/Containers/theHostName/theContainerName/theComponentName"); NSTEST::echo_var anEchoRef2 = myFactory->createInstance(); _NS.Register(anEchoRef2, - "/Containers/theHostName/aContainerName/aComponentName"); + "/Containers/theHostName/aContainerName/aComponentName"); NSTEST::echo_var anEchoRef3 = myFactory->createInstance(); _NS.Register(anEchoRef3, - "/Containers/theHostName/otherContainerName/theComponentName"); + "/Containers/theHostName/otherContainerName/theComponentName"); obj = _NS.ResolveComponent("theHostName", - "anUnknownContainerName", - "theComponentName"); + "anUnknownContainerName", + "theComponentName"); CPPUNIT_ASSERT(CORBA::is_nil(obj)); } @@ -723,15 +723,15 @@ NamingServiceTest::testResolveComponentEmptyComponentName() NSTEST::echo_var anEchoRef = myFactory->createInstance(); _NS.Register(anEchoRef, - "/Containers/theHostName/theContainerName/theComponentName"); + "/Containers/theHostName/theContainerName/theComponentName"); NSTEST::echo_var anEchoRef2 = myFactory->createInstance(); _NS.Register(anEchoRef2, - "/Containers/theHostName/EmptyContainerName/"); + "/Containers/theHostName/EmptyContainerName/"); obj = _NS.ResolveComponent("theHostName", - "EmptyContainerName", - ""); + "EmptyContainerName", + ""); CPPUNIT_ASSERT(CORBA::is_nil(obj)); } @@ -751,11 +751,11 @@ NamingServiceTest::testResolveComponentUnknownComponentName() NSTEST::echo_var anEchoRef = myFactory->createInstance(); _NS.Register(anEchoRef, - "/Containers/theHostName/theContainerName/theComponentName"); + "/Containers/theHostName/theContainerName/theComponentName"); obj = _NS.ResolveComponent("theHostName", - "theContainerName", - "anUnknownComponentName"); + "theContainerName", + "anUnknownComponentName"); CPPUNIT_ASSERT(CORBA::is_nil(obj)); } @@ -777,18 +777,18 @@ NamingServiceTest::testResolveComponentFalseNbproc() NSTEST::echo_var anEchoRef = myFactory->createInstance(); _NS.Register(anEchoRef, - "/Containers/theHostName/theContainerName/theComponentName"); + "/Containers/theHostName/theContainerName/theComponentName"); obj = _NS.ResolveComponent("theHostName", - "theContainerName", - "theComponentName", - 25); + "theContainerName", + "theComponentName", + 25); CPPUNIT_ASSERT(CORBA::is_nil(obj)); obj = _NS.ResolveComponent("theHostName", - "theContainerName", - "theComponentName", - -25); + "theContainerName", + "theComponentName", + -25); CPPUNIT_ASSERT(! CORBA::is_nil(obj)); } @@ -801,8 +801,8 @@ NamingServiceTest::testResolveComponentFalseNbproc() void NamingServiceTest::testContainerName() { - string ref0 = "FactoryServer"; - string ret = _NS.ContainerName(""); + std::string ref0 = "FactoryServer"; + std::string ret = _NS.ContainerName(""); CPPUNIT_ASSERT(ret == ref0); ref0 = "MyContainerName"; @@ -829,8 +829,8 @@ NamingServiceTest::testContainerNameParams() params.nb_node = 0; params.isMPI = false; - string ref0 = "FactoryServer"; - string ret = _NS.ContainerName(params); + std::string ref0 = "FactoryServer"; + std::string ret = _NS.ContainerName(params); CPPUNIT_ASSERT(ret == ref0); ref0 = "MyContainerName"; @@ -848,8 +848,8 @@ NamingServiceTest::testContainerNameParams() void NamingServiceTest::testBuildContainerNameForNS() { - string ref0 = "/Containers/theHostName/theContainerName"; - string ret = _NS.BuildContainerNameForNS("theContainerName","theHostName"); + std::string ref0 = "/Containers/theHostName/theContainerName"; + std::string ret = _NS.BuildContainerNameForNS("theContainerName","theHostName"); CPPUNIT_ASSERT(ret == ref0); ref0 = "/Containers/theHostName/FactoryServer"; @@ -877,8 +877,8 @@ NamingServiceTest::testBuildContainerNameForNSParams() params.isMPI = false; params.container_name = "theContainerName"; - string ref0 = "/Containers/theHostName/theContainerName"; - string ret = _NS.BuildContainerNameForNS(params,"theHostName"); + std::string ref0 = "/Containers/theHostName/theContainerName"; + std::string ret = _NS.BuildContainerNameForNS(params,"theHostName"); CPPUNIT_ASSERT(ret == ref0); params.container_name = ""; @@ -903,19 +903,19 @@ NamingServiceTest::testFind() NSTEST::echo_var anEchoRef = myFactory->createInstance(); _NS.Register(anEchoRef, - "/Containers/theHostName/theContainerName/theComponentName"); + "/Containers/theHostName/theContainerName/theComponentName"); NSTEST::echo_var anEchoRef2 = myFactory->createInstance(); _NS.Register(anEchoRef2, - "/Containers/theHostName/aContainerName/aComponentName"); + "/Containers/theHostName/aContainerName/aComponentName"); NSTEST::echo_var anEchoRef3 = myFactory->createInstance(); _NS.Register(anEchoRef3, - "/Containers/theHostName/otherContainerName/theComponentName"); + "/Containers/theHostName/otherContainerName/theComponentName"); NSTEST::echo_var anEchoRef4 = myFactory->createInstance(); _NS.Register(anEchoRef4, - "/Containers/anHostName/oneContainerName/theComponentName"); + "/Containers/anHostName/oneContainerName/theComponentName"); _NS.Change_Directory("/Containers"); int occ= _NS.Find("theComponentName"); @@ -950,13 +950,13 @@ NamingServiceTest::testCreateDirectory() _NS.Change_Directory("/aaa/bbb/ccc/ddd/eee"); NSTEST::echo_var anEchoRef = myFactory->createInstance(); int val = anEchoRef->getId(); - string name = "echo_"; + std::string name = "echo_"; char anum[10]; sprintf(anum,"%d",val); name += anum; _NS.Register(anEchoRef,name.c_str()); - string dirname = "/aaa/bbb/ccc/ddd/eee/"; + std::string dirname = "/aaa/bbb/ccc/ddd/eee/"; dirname += name; obj = _NS.Resolve(dirname.c_str()); CPPUNIT_ASSERT(!CORBA::is_nil(obj)); @@ -993,19 +993,19 @@ NamingServiceTest::testChangeDirectory() NSTEST::echo_var anEchoRef = myFactory->createInstance(); _NS.Register(anEchoRef, - "/Containers/theHostName/theContainerName/theComponentName"); + "/Containers/theHostName/theContainerName/theComponentName"); NSTEST::echo_var anEchoRef2 = myFactory->createInstance(); _NS.Register(anEchoRef2, - "/Containers/theHostName/aContainerName/aComponentName"); + "/Containers/theHostName/aContainerName/aComponentName"); NSTEST::echo_var anEchoRef3 = myFactory->createInstance(); _NS.Register(anEchoRef3, - "/Containers/theHostName/otherContainerName/theComponentName"); + "/Containers/theHostName/otherContainerName/theComponentName"); NSTEST::echo_var anEchoRef4 = myFactory->createInstance(); _NS.Register(anEchoRef4, - "/Containers/anHostName/oneContainerName/theComponentName"); + "/Containers/anHostName/oneContainerName/theComponentName"); _NS.Change_Directory("/Containers/theHostName/otherContainerName"); obj = _NS.Resolve("theComponentName"); @@ -1025,13 +1025,13 @@ NamingServiceTest::testChangeDirectory() void NamingServiceTest::testCurrentDirectory() { - string path = "/aaa/bbb/ccc/ddd/eee"; + std::string path = "/aaa/bbb/ccc/ddd/eee"; bool ret = _NS.Create_Directory(path.c_str()); CPPUNIT_ASSERT(ret); _NS.Change_Directory(path.c_str()); char* acurdir = _NS.Current_Directory(); - string curdir = acurdir; + std::string curdir = acurdir; free(acurdir); CPPUNIT_ASSERT(curdir == path); } @@ -1114,7 +1114,7 @@ NamingServiceTest::testDestroyName() NSTEST::aFactory_var myFactory = NSTEST::aFactory::_narrow(obj); CPPUNIT_ASSERT(!CORBA::is_nil(myFactory)); - string path = "/Containers/theHostName/theContainerName/theComponentName"; + std::string path = "/Containers/theHostName/theContainerName/theComponentName"; NSTEST::echo_var anEchoRef = myFactory->createInstance(); _NS.Register(anEchoRef, path.c_str()); @@ -1141,7 +1141,7 @@ NamingServiceTest::testDestroyDirectory() NSTEST::aFactory_var myFactory = NSTEST::aFactory::_narrow(obj); CPPUNIT_ASSERT(!CORBA::is_nil(myFactory)); - string path = "/Containers/theHostName/theContainerName/theComponentName"; + std::string path = "/Containers/theHostName/theContainerName/theComponentName"; NSTEST::echo_var anEchoRef = myFactory->createInstance(); _NS.Register(anEchoRef, path.c_str()); @@ -1163,22 +1163,22 @@ NamingServiceTest::testDestroyDirectory() */ // ============================================================================ -void NamingServiceTest::_destroyDirectoryRecurs(string path) +void NamingServiceTest::_destroyDirectoryRecurs(std::string path) { - string current = path; + std::string current = path; SCRUTE(path); if (_NS.Change_Directory(path.c_str())) { - vector subdirs = _NS.list_subdirs(); + std::vector subdirs = _NS.list_subdirs(); for (int i=0; i subdirs = _NS.list_subdirs(); + std::vector subdirs = _NS.list_subdirs(); CPPUNIT_ASSERT(subdirs.size() >0); _NS.list_directory_recurs(); - string path = "/Containers"; + std::string path = "/Containers"; _destroyDirectoryRecurs(path); CPPUNIT_ASSERT( ! _NS.Change_Directory("/Containers")); _NS.Change_Directory("/"); diff --git a/src/NamingService/Test/NamingServiceTest.hxx b/src/NamingService/Test/NamingServiceTest.hxx index 7c0ac101e..69ea3df88 100644 --- a/src/NamingService/Test/NamingServiceTest.hxx +++ b/src/NamingService/Test/NamingServiceTest.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef _NAMINGSERVICETEST_HXX_ #define _NAMINGSERVICETEST_HXX_ @@ -29,7 +30,7 @@ #include CORBA_SERVER_HEADER(nstest) class NSTEST_echo_i : public virtual POA_NSTEST::echo, - public virtual PortableServer::ServantBase + public virtual PortableServer::ServantBase { public: NSTEST_echo_i(); @@ -41,7 +42,7 @@ private: }; class NSTEST_aFactory_i : public virtual POA_NSTEST::aFactory, - public virtual PortableServer::ServantBase + public virtual PortableServer::ServantBase { public: NSTEST_aFactory_i(); diff --git a/src/NamingService/Test/TestNamingService.cxx b/src/NamingService/Test/TestNamingService.cxx index 8418e3b0c..1368a93ff 100644 --- a/src/NamingService/Test/TestNamingService.cxx +++ b/src/NamingService/Test/TestNamingService.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // --- include all Unit Test from basics until the present directory // #include "SALOMELocalTraceTest.hxx" diff --git a/src/NamingService/Test/TestNamingService.py b/src/NamingService/Test/TestNamingService.py index d43bbb5cf..730540333 100644 --- a/src/NamingService/Test/TestNamingService.py +++ b/src/NamingService/Test/TestNamingService.py @@ -1,24 +1,26 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + import sys, os,signal,string,commands import runSalome import setenv diff --git a/src/Notification/CosNotifyShorthands.h b/src/Notification/CosNotifyShorthands.h index 97c4b0233..06cc828c8 100644 --- a/src/Notification/CosNotifyShorthands.h +++ b/src/Notification/CosNotifyShorthands.h @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Notification : wrapping of Notification service services // File : CosNotifyShorthands.h // Module : SALOME @@ -50,214 +51,214 @@ // XXX TODO: need typedefs and defines for // XXX compilers that do not support M::x syntax -typedef CosN::AdminProperties CosN_AdminProperties; -typedef CosN::AdminPropertiesAdmin CosN_AdminPropertiesAdmin; -#define CosN_AnyOrder CosN::AnyOrder -#define CosN_BAD_PROPERTY CosN::BAD_PROPERTY -#define CosN_BAD_TYPE CosN::BAD_TYPE -#define CosN_BAD_VALUE CosN::BAD_VALUE -#define CosN_BestEffort CosN::BestEffort -#define CosN_ConnectionReliability CosN::ConnectionReliability -#define CosN_DeadlineOrder CosN::DeadlineOrder -#define CosN_DefaultPriority CosN::DefaultPriority -#define CosN_DiscardPolicy CosN::DiscardPolicy -typedef CosN::EventBatch CosN_EventBatch; -#define CosN_EventReliability CosN::EventReliability -typedef CosN::EventType CosN_EventType; -typedef CosN::EventTypeSeq CosN_EventTypeSeq; -#define CosN_FifoOrder CosN::FifoOrder -#define CosN_HighestPriority CosN::HighestPriority -#define CosN_LifoOrder CosN::LifoOrder -#define CosN_LowestPriority CosN::LowestPriority -#define CosN_MaxEventsPerConsumer CosN::MaxEventsPerConsumer -#define CosN_MaximumBatchSize CosN::MaximumBatchSize -#define CosN_NamedPropertyRangeSeq CosN::NamedPropertyRangeSeq -#define CosN_OrderPolicy CosN::OrderPolicy -#define CosN_PacingInterval CosN::PacingInterval -#define CosN_Persistent CosN::Persistent -#define CosN_Priority CosN::Priority -#define CosN_PriorityOrder CosN::PriorityOrder -typedef CosN::Property CosN_Property; -typedef CosN::PropertyError CosN_PropertyError; -typedef CosN::PropertyErrorSeq CosN_PropertyErrorSeq; -typedef CosN::PropertyRange CosN_PropertyRange; -typedef CosN::PropertySeq CosN_PropertySeq; -typedef CosN::QoSAdmin CosN_QoSAdmin; -typedef CosN::QoSError_code CosN_QoSError_code; -typedef CosN::QoSProperties CosN_QoSProperties; -#define CosN_RejectNewEvents CosN::RejectNewEvents -#define CosN_StartTimeSupported CosN::StartTimeSupported -#define CosN_StopTimeSupported CosN::StopTimeSupported -typedef CosN::StructuredEvent CosN_StructuredEvent; -#define CosN_Timeout CosN::Timeout -#define CosN_UNAVAILABLE_PROPERTY CosN::UNAVAILABLE_PROPERTY -#define CosN_UNAVAILABLE_VALUE CosN::UNAVAILABLE_VALUE -#define CosN_UNSUPPORTED_PROPERTY CosN::UNSUPPORTED_PROPERTY -#define CosN_UNSUPPORTED_VALUE CosN::UNSUPPORTED_VALUE -typedef CosN::UnsupportedAdmin CosN_UnsupportedAdmin; -typedef CosN::UnsupportedQoS CosN_UnsupportedQoS; +typedef CosN::AdminProperties CosN_AdminProperties; +typedef CosN::AdminPropertiesAdmin CosN_AdminPropertiesAdmin; +#define CosN_AnyOrder CosN::AnyOrder +#define CosN_BAD_PROPERTY CosN::BAD_PROPERTY +#define CosN_BAD_TYPE CosN::BAD_TYPE +#define CosN_BAD_VALUE CosN::BAD_VALUE +#define CosN_BestEffort CosN::BestEffort +#define CosN_ConnectionReliability CosN::ConnectionReliability +#define CosN_DeadlineOrder CosN::DeadlineOrder +#define CosN_DefaultPriority CosN::DefaultPriority +#define CosN_DiscardPolicy CosN::DiscardPolicy +typedef CosN::EventBatch CosN_EventBatch; +#define CosN_EventReliability CosN::EventReliability +typedef CosN::EventType CosN_EventType; +typedef CosN::EventTypeSeq CosN_EventTypeSeq; +#define CosN_FifoOrder CosN::FifoOrder +#define CosN_HighestPriority CosN::HighestPriority +#define CosN_LifoOrder CosN::LifoOrder +#define CosN_LowestPriority CosN::LowestPriority +#define CosN_MaxEventsPerConsumer CosN::MaxEventsPerConsumer +#define CosN_MaximumBatchSize CosN::MaximumBatchSize +#define CosN_NamedPropertyRangeSeq CosN::NamedPropertyRangeSeq +#define CosN_OrderPolicy CosN::OrderPolicy +#define CosN_PacingInterval CosN::PacingInterval +#define CosN_Persistent CosN::Persistent +#define CosN_Priority CosN::Priority +#define CosN_PriorityOrder CosN::PriorityOrder +typedef CosN::Property CosN_Property; +typedef CosN::PropertyError CosN_PropertyError; +typedef CosN::PropertyErrorSeq CosN_PropertyErrorSeq; +typedef CosN::PropertyRange CosN_PropertyRange; +typedef CosN::PropertySeq CosN_PropertySeq; +typedef CosN::QoSAdmin CosN_QoSAdmin; +typedef CosN::QoSError_code CosN_QoSError_code; +typedef CosN::QoSProperties CosN_QoSProperties; +#define CosN_RejectNewEvents CosN::RejectNewEvents +#define CosN_StartTimeSupported CosN::StartTimeSupported +#define CosN_StopTimeSupported CosN::StopTimeSupported +typedef CosN::StructuredEvent CosN_StructuredEvent; +#define CosN_Timeout CosN::Timeout +#define CosN_UNAVAILABLE_PROPERTY CosN::UNAVAILABLE_PROPERTY +#define CosN_UNAVAILABLE_VALUE CosN::UNAVAILABLE_VALUE +#define CosN_UNSUPPORTED_PROPERTY CosN::UNSUPPORTED_PROPERTY +#define CosN_UNSUPPORTED_VALUE CosN::UNSUPPORTED_VALUE +typedef CosN::UnsupportedAdmin CosN_UnsupportedAdmin; +typedef CosN::UnsupportedQoS CosN_UnsupportedQoS; -#define CosNA_ALL_NOW_UPDATES_OFF CosNA::ALL_NOW_UPDATES_OFF -#define CosNA_ALL_NOW_UPDATES_ON CosNA::ALL_NOW_UPDATES_ON -#define CosNA_AND_OP CosNA::AND_OP -#define CosNA_ANY_EVENT CosNA::ANY_EVENT -typedef CosNA::AdminID CosNA_AdminID; -typedef CosNA::AdminIDSeq CosNA_AdminIDSeq; -typedef CosNA::AdminLimit CosNA_AdminLimit; -typedef CosNA::AdminLimitExceeded CosNA_AdminLimitExceeded; -typedef CosNA::AdminNotFound CosNA_AdminNotFound; -typedef CosNA::ChannelID CosNA_ChannelID; -typedef CosNA::ChannelIDSeq CosNA_ChannelIDSeq; -typedef CosNA::ChannelNotFound CosNA_ChannelNotFound; -typedef CosNA::ClientType CosNA_ClientType; -typedef CosNA::ConnectionAlreadyActive CosNA_ConnectionAlreadyActive; -typedef CosNA::ConnectionAlreadyInactive CosNA_ConnectionAlreadyInactive; -typedef CosNA::ConsumerAdmin CosNA_ConsumerAdmin; -typedef CosNA::ConsumerAdmin_ptr CosNA_ConsumerAdmin_ptr; -typedef CosNA::ConsumerAdmin_var CosNA_ConsumerAdmin_var; -typedef CosNA::EventChannel CosNA_EventChannel; -typedef CosNA::EventChannelFactory CosNA_EventChannelFactory; -typedef CosNA::EventChannelFactory_ptr CosNA_EventChannelFactory_ptr; -typedef CosNA::EventChannelFactory_var CosNA_EventChannelFactory_var; -typedef CosNA::EventChannel_ptr CosNA_EventChannel_ptr; -typedef CosNA::EventChannel_var CosNA_EventChannel_var; -typedef CosNA::InterFilterGroupOperator CosNA_InterFilterGroupOperator; -#define CosNA_NONE_NOW_UPDATES_OFF CosNA::NONE_NOW_UPDATES_OFF -#define CosNA_NONE_NOW_UPDATES_ON CosNA::NONE_NOW_UPDATES_ON -typedef CosNA::NotConnected CosNA_NotConnected; -#define CosNA_OR_OP CosNA::OR_OP -typedef CosNA::ObtainInfoMode CosNA_ObtainInfoMode; -#define CosNA_PULL_ANY CosNA::PULL_ANY -#define CosNA_PULL_SEQUENCE CosNA::PULL_SEQUENCE -#define CosNA_PULL_STRUCTURED CosNA::PULL_STRUCTURED -#define CosNA_PUSH_ANY CosNA::PUSH_ANY -#define CosNA_PUSH_SEQUENCE CosNA::PUSH_SEQUENCE -#define CosNA_PUSH_STRUCTURED CosNA::PUSH_STRUCTURED -#define CosNA_PUSH_TYPED CosNA::PUSH_TYPED -#define CosNA_PULL_TYPED CosNA::PULL_TYPED -typedef CosNA::ProxyConsumer CosNA_ProxyConsumer; -typedef CosNA::ProxyConsumer_ptr CosNA_ProxyConsumer_ptr; -typedef CosNA::ProxyConsumer_var CosNA_ProxyConsumer_var; -typedef CosNA::ProxyID CosNA_ProxyID; -typedef CosNA::ProxyIDSeq CosNA_ProxyIDSeq; -typedef CosNA::ProxyNotFound CosNA_ProxyNotFound; -typedef CosNA::ProxyPullConsumer CosNA_ProxyPullConsumer; -typedef CosNA::ProxyPullConsumer_ptr CosNA_ProxyPullConsumer_ptr; -typedef CosNA::ProxyPullConsumer_var CosNA_ProxyPullConsumer_var; -typedef CosNA::ProxyPullSupplier CosNA_ProxyPullSupplier; -typedef CosNA::ProxyPullSupplier_ptr CosNA_ProxyPullSupplier_ptr; -typedef CosNA::ProxyPullSupplier_var CosNA_ProxyPullSupplier_var; -typedef CosNA::ProxyPushConsumer CosNA_ProxyPushConsumer; -typedef CosNA::ProxyPushConsumer_ptr CosNA_ProxyPushConsumer_ptr; -typedef CosNA::ProxyPushConsumer_var CosNA_ProxyPushConsumer_var; -typedef CosNA::ProxyPushSupplier CosNA_ProxyPushSupplier; -typedef CosNA::ProxyPushSupplier_ptr CosNA_ProxyPushSupplier_ptr; -typedef CosNA::ProxyPushSupplier_var CosNA_ProxyPushSupplier_var; -typedef CosNA::ProxySupplier CosNA_ProxySupplier; -typedef CosNA::ProxySupplier_ptr CosNA_ProxySupplier_ptr; -typedef CosNA::ProxySupplier_var CosNA_ProxySupplier_var; -typedef CosNA::ProxyType CosNA_ProxyType; -#define CosNA_SEQUENCE_EVENT CosNA::SEQUENCE_EVENT -#define CosNA_STRUCTURED_EVENT CosNA::STRUCTURED_EVENT -typedef CosNA::SequenceProxyPullConsumer CosNA_SequenceProxyPullConsumer; -typedef CosNA::SequenceProxyPullConsumer_ptr CosNA_SequenceProxyPullConsumer_ptr; -typedef CosNA::SequenceProxyPullConsumer_var CosNA_SequenceProxyPullConsumer_var; -typedef CosNA::SequenceProxyPullSupplier CosNA_SequenceProxyPullSupplier; -typedef CosNA::SequenceProxyPullSupplier_ptr CosNA_SequenceProxyPullSupplier_ptr; -typedef CosNA::SequenceProxyPullSupplier_var CosNA_SequenceProxyPullSupplier_var; -typedef CosNA::SequenceProxyPushConsumer CosNA_SequenceProxyPushConsumer; -typedef CosNA::SequenceProxyPushConsumer_ptr CosNA_SequenceProxyPushConsumer_ptr; -typedef CosNA::SequenceProxyPushConsumer_var CosNA_SequenceProxyPushConsumer_var; -typedef CosNA::SequenceProxyPushSupplier CosNA_SequenceProxyPushSupplier; -typedef CosNA::SequenceProxyPushSupplier_ptr CosNA_SequenceProxyPushSupplier_ptr; -typedef CosNA::SequenceProxyPushSupplier_var CosNA_SequenceProxyPushSupplier_var; -typedef CosNA::StructuredProxyPullConsumer CosNA_StructuredProxyPullConsumer; -typedef CosNA::StructuredProxyPullConsumer_ptr CosNA_StructuredProxyPullConsumer_ptr; -typedef CosNA::StructuredProxyPullConsumer_var CosNA_StructuredProxyPullConsumer_var; -typedef CosNA::StructuredProxyPullSupplier CosNA_StructuredProxyPullSupplier; -typedef CosNA::StructuredProxyPullSupplier_ptr CosNA_StructuredProxyPullSupplier_ptr; -typedef CosNA::StructuredProxyPullSupplier_var CosNA_StructuredProxyPullSupplier_var; -typedef CosNA::StructuredProxyPushConsumer CosNA_StructuredProxyPushConsumer; -typedef CosNA::StructuredProxyPushConsumer_ptr CosNA_StructuredProxyPushConsumer_ptr; -typedef CosNA::StructuredProxyPushConsumer_var CosNA_StructuredProxyPushConsumer_var; -typedef CosNA::StructuredProxyPushSupplier CosNA_StructuredProxyPushSupplier; -typedef CosNA::StructuredProxyPushSupplier_ptr CosNA_StructuredProxyPushSupplier_ptr; -typedef CosNA::StructuredProxyPushSupplier_var CosNA_StructuredProxyPushSupplier_var; -typedef CosNA::SupplierAdmin CosNA_SupplierAdmin; -typedef CosNA::SupplierAdmin_ptr CosNA_SupplierAdmin_ptr; -typedef CosNA::SupplierAdmin_var CosNA_SupplierAdmin_var; +#define CosNA_ALL_NOW_UPDATES_OFF CosNA::ALL_NOW_UPDATES_OFF +#define CosNA_ALL_NOW_UPDATES_ON CosNA::ALL_NOW_UPDATES_ON +#define CosNA_AND_OP CosNA::AND_OP +#define CosNA_ANY_EVENT CosNA::ANY_EVENT +typedef CosNA::AdminID CosNA_AdminID; +typedef CosNA::AdminIDSeq CosNA_AdminIDSeq; +typedef CosNA::AdminLimit CosNA_AdminLimit; +typedef CosNA::AdminLimitExceeded CosNA_AdminLimitExceeded; +typedef CosNA::AdminNotFound CosNA_AdminNotFound; +typedef CosNA::ChannelID CosNA_ChannelID; +typedef CosNA::ChannelIDSeq CosNA_ChannelIDSeq; +typedef CosNA::ChannelNotFound CosNA_ChannelNotFound; +typedef CosNA::ClientType CosNA_ClientType; +typedef CosNA::ConnectionAlreadyActive CosNA_ConnectionAlreadyActive; +typedef CosNA::ConnectionAlreadyInactive CosNA_ConnectionAlreadyInactive; +typedef CosNA::ConsumerAdmin CosNA_ConsumerAdmin; +typedef CosNA::ConsumerAdmin_ptr CosNA_ConsumerAdmin_ptr; +typedef CosNA::ConsumerAdmin_var CosNA_ConsumerAdmin_var; +typedef CosNA::EventChannel CosNA_EventChannel; +typedef CosNA::EventChannelFactory CosNA_EventChannelFactory; +typedef CosNA::EventChannelFactory_ptr CosNA_EventChannelFactory_ptr; +typedef CosNA::EventChannelFactory_var CosNA_EventChannelFactory_var; +typedef CosNA::EventChannel_ptr CosNA_EventChannel_ptr; +typedef CosNA::EventChannel_var CosNA_EventChannel_var; +typedef CosNA::InterFilterGroupOperator CosNA_InterFilterGroupOperator; +#define CosNA_NONE_NOW_UPDATES_OFF CosNA::NONE_NOW_UPDATES_OFF +#define CosNA_NONE_NOW_UPDATES_ON CosNA::NONE_NOW_UPDATES_ON +typedef CosNA::NotConnected CosNA_NotConnected; +#define CosNA_OR_OP CosNA::OR_OP +typedef CosNA::ObtainInfoMode CosNA_ObtainInfoMode; +#define CosNA_PULL_ANY CosNA::PULL_ANY +#define CosNA_PULL_SEQUENCE CosNA::PULL_SEQUENCE +#define CosNA_PULL_STRUCTURED CosNA::PULL_STRUCTURED +#define CosNA_PUSH_ANY CosNA::PUSH_ANY +#define CosNA_PUSH_SEQUENCE CosNA::PUSH_SEQUENCE +#define CosNA_PUSH_STRUCTURED CosNA::PUSH_STRUCTURED +#define CosNA_PUSH_TYPED CosNA::PUSH_TYPED +#define CosNA_PULL_TYPED CosNA::PULL_TYPED +typedef CosNA::ProxyConsumer CosNA_ProxyConsumer; +typedef CosNA::ProxyConsumer_ptr CosNA_ProxyConsumer_ptr; +typedef CosNA::ProxyConsumer_var CosNA_ProxyConsumer_var; +typedef CosNA::ProxyID CosNA_ProxyID; +typedef CosNA::ProxyIDSeq CosNA_ProxyIDSeq; +typedef CosNA::ProxyNotFound CosNA_ProxyNotFound; +typedef CosNA::ProxyPullConsumer CosNA_ProxyPullConsumer; +typedef CosNA::ProxyPullConsumer_ptr CosNA_ProxyPullConsumer_ptr; +typedef CosNA::ProxyPullConsumer_var CosNA_ProxyPullConsumer_var; +typedef CosNA::ProxyPullSupplier CosNA_ProxyPullSupplier; +typedef CosNA::ProxyPullSupplier_ptr CosNA_ProxyPullSupplier_ptr; +typedef CosNA::ProxyPullSupplier_var CosNA_ProxyPullSupplier_var; +typedef CosNA::ProxyPushConsumer CosNA_ProxyPushConsumer; +typedef CosNA::ProxyPushConsumer_ptr CosNA_ProxyPushConsumer_ptr; +typedef CosNA::ProxyPushConsumer_var CosNA_ProxyPushConsumer_var; +typedef CosNA::ProxyPushSupplier CosNA_ProxyPushSupplier; +typedef CosNA::ProxyPushSupplier_ptr CosNA_ProxyPushSupplier_ptr; +typedef CosNA::ProxyPushSupplier_var CosNA_ProxyPushSupplier_var; +typedef CosNA::ProxySupplier CosNA_ProxySupplier; +typedef CosNA::ProxySupplier_ptr CosNA_ProxySupplier_ptr; +typedef CosNA::ProxySupplier_var CosNA_ProxySupplier_var; +typedef CosNA::ProxyType CosNA_ProxyType; +#define CosNA_SEQUENCE_EVENT CosNA::SEQUENCE_EVENT +#define CosNA_STRUCTURED_EVENT CosNA::STRUCTURED_EVENT +typedef CosNA::SequenceProxyPullConsumer CosNA_SequenceProxyPullConsumer; +typedef CosNA::SequenceProxyPullConsumer_ptr CosNA_SequenceProxyPullConsumer_ptr; +typedef CosNA::SequenceProxyPullConsumer_var CosNA_SequenceProxyPullConsumer_var; +typedef CosNA::SequenceProxyPullSupplier CosNA_SequenceProxyPullSupplier; +typedef CosNA::SequenceProxyPullSupplier_ptr CosNA_SequenceProxyPullSupplier_ptr; +typedef CosNA::SequenceProxyPullSupplier_var CosNA_SequenceProxyPullSupplier_var; +typedef CosNA::SequenceProxyPushConsumer CosNA_SequenceProxyPushConsumer; +typedef CosNA::SequenceProxyPushConsumer_ptr CosNA_SequenceProxyPushConsumer_ptr; +typedef CosNA::SequenceProxyPushConsumer_var CosNA_SequenceProxyPushConsumer_var; +typedef CosNA::SequenceProxyPushSupplier CosNA_SequenceProxyPushSupplier; +typedef CosNA::SequenceProxyPushSupplier_ptr CosNA_SequenceProxyPushSupplier_ptr; +typedef CosNA::SequenceProxyPushSupplier_var CosNA_SequenceProxyPushSupplier_var; +typedef CosNA::StructuredProxyPullConsumer CosNA_StructuredProxyPullConsumer; +typedef CosNA::StructuredProxyPullConsumer_ptr CosNA_StructuredProxyPullConsumer_ptr; +typedef CosNA::StructuredProxyPullConsumer_var CosNA_StructuredProxyPullConsumer_var; +typedef CosNA::StructuredProxyPullSupplier CosNA_StructuredProxyPullSupplier; +typedef CosNA::StructuredProxyPullSupplier_ptr CosNA_StructuredProxyPullSupplier_ptr; +typedef CosNA::StructuredProxyPullSupplier_var CosNA_StructuredProxyPullSupplier_var; +typedef CosNA::StructuredProxyPushConsumer CosNA_StructuredProxyPushConsumer; +typedef CosNA::StructuredProxyPushConsumer_ptr CosNA_StructuredProxyPushConsumer_ptr; +typedef CosNA::StructuredProxyPushConsumer_var CosNA_StructuredProxyPushConsumer_var; +typedef CosNA::StructuredProxyPushSupplier CosNA_StructuredProxyPushSupplier; +typedef CosNA::StructuredProxyPushSupplier_ptr CosNA_StructuredProxyPushSupplier_ptr; +typedef CosNA::StructuredProxyPushSupplier_var CosNA_StructuredProxyPushSupplier_var; +typedef CosNA::SupplierAdmin CosNA_SupplierAdmin; +typedef CosNA::SupplierAdmin_ptr CosNA_SupplierAdmin_ptr; +typedef CosNA::SupplierAdmin_var CosNA_SupplierAdmin_var; -typedef CosNC::InvalidEventType CosNC_InvalidEventType; -typedef CosNC::NotifyPublish CosNC_NotifyPublish; -typedef CosNC::NotifyPublish_ptr CosNC_NotifyPublish_ptr; -typedef CosNC::NotifyPublish_var CosNC_NotifyPublish_var; -typedef CosNC::NotifySubscribe CosNC_NotifySubscribe; -typedef CosNC::NotifySubscribe_ptr CosNC_NotifySubscribe_ptr; -typedef CosNC::NotifySubscribe_var CosNC_NotifySubscribe_var; -typedef CosNC::PullConsumer CosNC_PullConsumer; -typedef CosNC::PullConsumer_ptr CosNC_PullConsumer_ptr; -typedef CosNC::PullConsumer_var CosNC_PullConsumer_var; -typedef CosNC::PullSupplier CosNC_PullSupplier; -typedef CosNC::PullSupplier_ptr CosNC_PullSupplier_ptr; -typedef CosNC::PullSupplier_var CosNC_PullSupplier_var; -typedef CosNC::PushConsumer CosNC_PushConsumer; -typedef CosNC::PushConsumer_ptr CosNC_PushConsumer_ptr; -typedef CosNC::PushConsumer_var CosNC_PushConsumer_var; -typedef CosNC::PushSupplier CosNC_PushSupplier; -typedef CosNC::PushSupplier_ptr CosNC_PushSupplier_ptr; -typedef CosNC::PushSupplier_var CosNC_PushSupplier_var; -typedef CosNC::SequencePullConsumer CosNC_SequencePullConsumer; -typedef CosNC::SequencePullConsumer_ptr CosNC_SequencePullConsumer_ptr; -typedef CosNC::SequencePullConsumer_var CosNC_SequencePullConsumer_var; -typedef CosNC::SequencePullSupplier CosNC_SequencePullSupplier; -typedef CosNC::SequencePullSupplier_ptr CosNC_SequencePullSupplier_ptr; -typedef CosNC::SequencePullSupplier_var CosNC_SequencePullSupplier_var; -typedef CosNC::SequencePushConsumer CosNC_SequencePushConsumer; -typedef CosNC::SequencePushConsumer_ptr CosNC_SequencePushConsumer_ptr; -typedef CosNC::SequencePushConsumer_var CosNC_SequencePushConsumer_var; -typedef CosNC::SequencePushSupplier CosNC_SequencePushSupplier; -typedef CosNC::SequencePushSupplier_ptr CosNC_SequencePushSupplier_ptr; -typedef CosNC::SequencePushSupplier_var CosNC_SequencePushSupplier_var; -typedef CosNC::StructuredPullConsumer CosNC_StructuredPullConsumer; -typedef CosNC::StructuredPullConsumer_ptr CosNC_StructuredPullConsumer_ptr; -typedef CosNC::StructuredPullConsumer_var CosNC_StructuredPullConsumer_var; -typedef CosNC::StructuredPullSupplier CosNC_StructuredPullSupplier; -typedef CosNC::StructuredPullSupplier_ptr CosNC_StructuredPullSupplier_ptr; -typedef CosNC::StructuredPullSupplier_var CosNC_StructuredPullSupplier_var; -typedef CosNC::StructuredPushConsumer CosNC_StructuredPushConsumer; -typedef CosNC::StructuredPushConsumer_ptr CosNC_StructuredPushConsumer_ptr; -typedef CosNC::StructuredPushConsumer_var CosNC_StructuredPushConsumer_var; -typedef CosNC::StructuredPushSupplier CosNC_StructuredPushSupplier; -typedef CosNC::StructuredPushSupplier_ptr CosNC_StructuredPushSupplier_ptr; -typedef CosNC::StructuredPushSupplier_var CosNC_StructuredPushSupplier_var; +typedef CosNC::InvalidEventType CosNC_InvalidEventType; +typedef CosNC::NotifyPublish CosNC_NotifyPublish; +typedef CosNC::NotifyPublish_ptr CosNC_NotifyPublish_ptr; +typedef CosNC::NotifyPublish_var CosNC_NotifyPublish_var; +typedef CosNC::NotifySubscribe CosNC_NotifySubscribe; +typedef CosNC::NotifySubscribe_ptr CosNC_NotifySubscribe_ptr; +typedef CosNC::NotifySubscribe_var CosNC_NotifySubscribe_var; +typedef CosNC::PullConsumer CosNC_PullConsumer; +typedef CosNC::PullConsumer_ptr CosNC_PullConsumer_ptr; +typedef CosNC::PullConsumer_var CosNC_PullConsumer_var; +typedef CosNC::PullSupplier CosNC_PullSupplier; +typedef CosNC::PullSupplier_ptr CosNC_PullSupplier_ptr; +typedef CosNC::PullSupplier_var CosNC_PullSupplier_var; +typedef CosNC::PushConsumer CosNC_PushConsumer; +typedef CosNC::PushConsumer_ptr CosNC_PushConsumer_ptr; +typedef CosNC::PushConsumer_var CosNC_PushConsumer_var; +typedef CosNC::PushSupplier CosNC_PushSupplier; +typedef CosNC::PushSupplier_ptr CosNC_PushSupplier_ptr; +typedef CosNC::PushSupplier_var CosNC_PushSupplier_var; +typedef CosNC::SequencePullConsumer CosNC_SequencePullConsumer; +typedef CosNC::SequencePullConsumer_ptr CosNC_SequencePullConsumer_ptr; +typedef CosNC::SequencePullConsumer_var CosNC_SequencePullConsumer_var; +typedef CosNC::SequencePullSupplier CosNC_SequencePullSupplier; +typedef CosNC::SequencePullSupplier_ptr CosNC_SequencePullSupplier_ptr; +typedef CosNC::SequencePullSupplier_var CosNC_SequencePullSupplier_var; +typedef CosNC::SequencePushConsumer CosNC_SequencePushConsumer; +typedef CosNC::SequencePushConsumer_ptr CosNC_SequencePushConsumer_ptr; +typedef CosNC::SequencePushConsumer_var CosNC_SequencePushConsumer_var; +typedef CosNC::SequencePushSupplier CosNC_SequencePushSupplier; +typedef CosNC::SequencePushSupplier_ptr CosNC_SequencePushSupplier_ptr; +typedef CosNC::SequencePushSupplier_var CosNC_SequencePushSupplier_var; +typedef CosNC::StructuredPullConsumer CosNC_StructuredPullConsumer; +typedef CosNC::StructuredPullConsumer_ptr CosNC_StructuredPullConsumer_ptr; +typedef CosNC::StructuredPullConsumer_var CosNC_StructuredPullConsumer_var; +typedef CosNC::StructuredPullSupplier CosNC_StructuredPullSupplier; +typedef CosNC::StructuredPullSupplier_ptr CosNC_StructuredPullSupplier_ptr; +typedef CosNC::StructuredPullSupplier_var CosNC_StructuredPullSupplier_var; +typedef CosNC::StructuredPushConsumer CosNC_StructuredPushConsumer; +typedef CosNC::StructuredPushConsumer_ptr CosNC_StructuredPushConsumer_ptr; +typedef CosNC::StructuredPushConsumer_var CosNC_StructuredPushConsumer_var; +typedef CosNC::StructuredPushSupplier CosNC_StructuredPushSupplier; +typedef CosNC::StructuredPushSupplier_ptr CosNC_StructuredPushSupplier_ptr; +typedef CosNC::StructuredPushSupplier_var CosNC_StructuredPushSupplier_var; -typedef CosNF::CallbackID CosNF_CallbackID; -typedef CosNF::CallbackIDSeq CosNF_CallbackIDSeq; -typedef CosNF::ConstraintExp CosNF_ConstraintExp; -typedef CosNF::ConstraintExpSeq CosNF_ConstraintExpSeq; -typedef CosNF::ConstraintID CosNF_ConstraintID; -typedef CosNF::ConstraintIDSeq CosNF_ConstraintIDSeq; -typedef CosNF::ConstraintInfoSeq CosNF_ConstraintInfoSeq; -typedef CosNF::ConstraintInfoSeq_var CosNF_ConstraintInfoSeq_var; -typedef CosNF::ConstraintNotFound CosNF_ConstraintNotFound; -typedef CosNF::Filter CosNF_Filter; -typedef CosNF::FilterAdmin CosNF_FilterAdmin; -typedef CosNF::FilterAdmin_ptr CosNF_FilterAdmin_ptr; -typedef CosNF::FilterFactory CosNF_FilterFactory; -typedef CosNF::FilterFactory_ptr CosNF_FilterFactory_ptr; -typedef CosNF::FilterFactory_var CosNF_FilterFactory_var; -typedef CosNF::FilterID CosNF_FilterID; -typedef CosNF::FilterIDSeq CosNF_FilterIDSeq; -typedef CosNF::FilterNotFound CosNF_FilterNotFound; -typedef CosNF::Filter_ptr CosNF_Filter_ptr; -typedef CosNF::Filter_var CosNF_Filter_var; -typedef CosNF::InvalidConstraint CosNF_InvalidConstraint; -typedef CosNF::InvalidGrammar CosNF_InvalidGrammar; -typedef CosNF::MappingConstraintInfoSeq CosNF_MappingConstraintInfoSeq; -typedef CosNF::MappingConstraintPairSeq CosNF_MappingConstraintPairSeq; -typedef CosNF::MappingFilter CosNF_MappingFilter; -typedef CosNF::MappingFilter_ptr CosNF_MappingFilter_ptr; -typedef CosNF::MappingFilter_var CosNF_MappingFilter_var; +typedef CosNF::CallbackID CosNF_CallbackID; +typedef CosNF::CallbackIDSeq CosNF_CallbackIDSeq; +typedef CosNF::ConstraintExp CosNF_ConstraintExp; +typedef CosNF::ConstraintExpSeq CosNF_ConstraintExpSeq; +typedef CosNF::ConstraintID CosNF_ConstraintID; +typedef CosNF::ConstraintIDSeq CosNF_ConstraintIDSeq; +typedef CosNF::ConstraintInfoSeq CosNF_ConstraintInfoSeq; +typedef CosNF::ConstraintInfoSeq_var CosNF_ConstraintInfoSeq_var; +typedef CosNF::ConstraintNotFound CosNF_ConstraintNotFound; +typedef CosNF::Filter CosNF_Filter; +typedef CosNF::FilterAdmin CosNF_FilterAdmin; +typedef CosNF::FilterAdmin_ptr CosNF_FilterAdmin_ptr; +typedef CosNF::FilterFactory CosNF_FilterFactory; +typedef CosNF::FilterFactory_ptr CosNF_FilterFactory_ptr; +typedef CosNF::FilterFactory_var CosNF_FilterFactory_var; +typedef CosNF::FilterID CosNF_FilterID; +typedef CosNF::FilterIDSeq CosNF_FilterIDSeq; +typedef CosNF::FilterNotFound CosNF_FilterNotFound; +typedef CosNF::Filter_ptr CosNF_Filter_ptr; +typedef CosNF::Filter_var CosNF_Filter_var; +typedef CosNF::InvalidConstraint CosNF_InvalidConstraint; +typedef CosNF::InvalidGrammar CosNF_InvalidGrammar; +typedef CosNF::MappingConstraintInfoSeq CosNF_MappingConstraintInfoSeq; +typedef CosNF::MappingConstraintPairSeq CosNF_MappingConstraintPairSeq; +typedef CosNF::MappingFilter CosNF_MappingFilter; +typedef CosNF::MappingFilter_ptr CosNF_MappingFilter_ptr; +typedef CosNF::MappingFilter_var CosNF_MappingFilter_var; #endif diff --git a/src/Notification/Makefile.am b/src/Notification/Makefile.am index e0b458e4c..8ac5883e6 100644 --- a/src/Notification/Makefile.am +++ b/src/Notification/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # SALOME Notification : wrapping of Notification service services # File : Makefile.am # Author : Guillaume Boulant (CSSI) @@ -56,7 +57,6 @@ libSalomeNotification_la_CPPFLAGS =\ -I$(srcdir)/../Basics \ -I$(srcdir)/../SALOMELocalTrace \ -I$(srcdir)/../Utils \ - -I$(top_builddir)/salome_adm/unix \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ diff --git a/src/Notification/NOTIFICATION.cxx b/src/Notification/NOTIFICATION.cxx index d1dbcd110..43da1f073 100644 --- a/src/Notification/NOTIFICATION.cxx +++ b/src/Notification/NOTIFICATION.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Notification : wrapping of Notification service services // File : NOTIFICATION.cxx // Author : Laurent DADA / Francis KLOSS @@ -28,7 +29,6 @@ #include "Utils_ORB_INIT.hxx" #include "Utils_SINGLETON.hxx" -using namespace std; CosNA_EventChannel_ptr NOTIFICATION_channel() { ORB_INIT& init = *SINGLETON_::Instance(); ASSERT(SINGLETON_::IsAlreadyExisting()); @@ -46,10 +46,10 @@ CosNA_EventChannel_ptr NOTIFICATION_channel() { MESSAGE("NOTIFICATION Error : failed to obtain context for NameService"); return(channel); }; - } catch(CORBA::ORB::InvalidName& ex) { + } catch(CORBA::ORB::InvalidName& ) { MESSAGE("NOTIFICATION Error : service required is invalid [does not exist]"); return(channel); - } catch (CORBA::SystemException& ex) { + } catch (CORBA::SystemException& ) { MESSAGE("NOTIFICATION Error : caught system exception COMM_FAILURE"); return(channel); } catch (...) { @@ -67,9 +67,9 @@ CosNA_EventChannel_ptr NOTIFICATION_channel() { if (CORBA::is_nil(channel)) { MESSAGE("NOTIFICATION Error : failed to narrow object found in naming service"); }; - } catch(CORBA::ORB::InvalidName& ex) { + } catch(CORBA::ORB::InvalidName& ) { MESSAGE("NOTIFICATION Error : invalid name"); - } catch (CORBA::SystemException& ex) { + } catch (CORBA::SystemException& ) { MESSAGE("NOTIFICATION Error : caught system exception COMM_FAILURE while resolving event channel name"); } catch (...) { MESSAGE("NOTIFICATION Error : caught exception while resolving event channel name"); diff --git a/src/Notification/NOTIFICATION.hxx b/src/Notification/NOTIFICATION.hxx index abd984790..dd42f4713 100644 --- a/src/Notification/NOTIFICATION.hxx +++ b/src/Notification/NOTIFICATION.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Notification : wrapping of Notification service services // File : NOTIFICATION.hxx // Author : Laurent DADA / Francis KLOSS diff --git a/src/Notification/NOTIFICATION_Consumer.cxx b/src/Notification/NOTIFICATION_Consumer.cxx index d50b095b8..7a9226f30 100644 --- a/src/Notification/NOTIFICATION_Consumer.cxx +++ b/src/Notification/NOTIFICATION_Consumer.cxx @@ -1,31 +1,31 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Notification : wrapping of Notification service services // File : NOTIFICATION_Consumer.cxx // Author : Laurent DADA / Francis KLOSS // Module : SALOME // #include "NOTIFICATION.hxx" -using namespace std; NOTIFICATION_Consumer::NOTIFICATION_Consumer(): proxy_supplier(0), @@ -50,9 +50,9 @@ NOTIFICATION_Consumer::NOTIFICATION_Consumer(): proxy_supplier->connect_structured_pull_consumer(_this()); _ok = true; MESSAGE("NOTIFICATION Info : successfully connection for pull consumer notification"); - } catch (CORBA::BAD_PARAM& ex) { + } catch (CORBA::BAD_PARAM&) { MESSAGE("NOTIFICATION Error : pull consumer BAD_PARAM exception while connecting"); - } catch (CosEventChannelAdmin::AlreadyConnected& ex) { + } catch (CosEventChannelAdmin::AlreadyConnected&) { MESSAGE("NOTIFICATION Error : pull consumer already connected"); } catch (...) { MESSAGE("NOTIFICATION Error : pull consumer failed to connect"); @@ -92,7 +92,7 @@ bool NOTIFICATION_Consumer::Receive(char** graph, char** node, char** type, char }; if (status) { - //omniORB 4.1.x requiries using only CORBA types instead C types + //omniORB 4.1.x requiries using only CORBA types instead C types const char* Asender; const char* Agraph; const char* Atype; @@ -100,7 +100,7 @@ bool NOTIFICATION_Consumer::Receive(char** graph, char** node, char** type, char CORBA::ULong Astamp; const char* Adate; const char* Anode; - const char* Amessage; + const char* Amessage; event->filterable_data[0].value >>= Asender; event->filterable_data[1].value >>= Agraph; event->filterable_data[2].value >>= Atype; diff --git a/src/Notification/NOTIFICATION_Consumer.hxx b/src/Notification/NOTIFICATION_Consumer.hxx index ef886680f..e729f87a8 100644 --- a/src/Notification/NOTIFICATION_Consumer.hxx +++ b/src/Notification/NOTIFICATION_Consumer.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Notification : wrapping of Notification service services // File : NOTIFICATION_Consumer.hxx // Author : Laurent DADA / Francis KLOSS diff --git a/src/Notification/NOTIFICATION_Supplier.cxx b/src/Notification/NOTIFICATION_Supplier.cxx index 00a214d9f..d3f44e6b6 100644 --- a/src/Notification/NOTIFICATION_Supplier.cxx +++ b/src/Notification/NOTIFICATION_Supplier.cxx @@ -1,31 +1,31 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Notification : wrapping of Notification service services // File : NOTIFICATION_Supplier.cxx // Author : Laurent DADA / Francis KLOSS // Module : SALOME // #include "NOTIFICATION.hxx" -using namespace std; long NOTIFICATION_Supplier::_stamp = 0; @@ -55,9 +55,9 @@ NOTIFICATION_Supplier::NOTIFICATION_Supplier(const char* instanceName, bool noti proxy_consumer->connect_structured_push_supplier(_this()); _ok = true; MESSAGE("NOTIFICATION Info : successfully connection for push supplier notification"); - } catch (CORBA::BAD_PARAM& ex) { + } catch (CORBA::BAD_PARAM&) { MESSAGE("NOTIFICATION Error : push supplier BAD_PARAM Exception while connecting"); - } catch (CosEventChannelAdmin::AlreadyConnected& ex) { + } catch (CosEventChannelAdmin::AlreadyConnected&) { MESSAGE("NOTIFICATION Error : push supplier already connected"); } catch (...) { MESSAGE("NOTIFICATION Error : push supplier failed to connect"); diff --git a/src/Notification/NOTIFICATION_Supplier.hxx b/src/Notification/NOTIFICATION_Supplier.hxx index 1dccf5c50..ffe33f03c 100644 --- a/src/Notification/NOTIFICATION_Supplier.hxx +++ b/src/Notification/NOTIFICATION_Supplier.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Notification : wrapping of Notification service services // File : NOTIFICATION_Supplier.hxx // Author : Laurent DADA / Francis KLOSS @@ -29,6 +30,10 @@ #include "SALOME_NOTIFICATION.hxx" +#ifdef WNT +#pragma warning(disable:4275) // Disable warning interface non dll +#endif + class NOTIFICATION_EXPORT NOTIFICATION_Supplier: public POA_CosNotifyComm::StructuredPushSupplier { public: NOTIFICATION_Supplier(const char* instanceName, bool notif); diff --git a/src/Notification/SALOME_NOTIFICATION.hxx b/src/Notification/SALOME_NOTIFICATION.hxx index 8dad9d8cc..1a92a4915 100755 --- a/src/Notification/SALOME_NOTIFICATION.hxx +++ b/src/Notification/SALOME_NOTIFICATION.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOME_NOTIFICATION.hxx // Author : Alexander A. BORODIN // Module : SALOME @@ -27,7 +28,7 @@ #define _SALOME_NOTIFICATION_HXX_ #ifdef WIN32 -# ifdef NOTIFICATION_EXPORTS +# if defined NOTIFICATION_EXPORTS || defined SalomeNotification_EXPORTS # define NOTIFICATION_EXPORT __declspec( dllexport ) # else # define NOTIFICATION_EXPORT __declspec( dllimport ) diff --git a/src/ParallelContainer/Makefile.am b/src/ParallelContainer/Makefile.am index 62d705aac..074fefc6c 100644 --- a/src/ParallelContainer/Makefile.am +++ b/src/ParallelContainer/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : Makefile.am # Author : André RIBES (EDF) # Module : KERNEL @@ -34,6 +35,7 @@ include $(top_srcdir)/salome_adm/unix/make_common_starter.am salomeinclude_HEADERS = SALOME_ParallelComponent_i.hxx \ SALOME_ParallelContainer_i.hxx \ SALOME_ParallelContainerProxy_i.hxx \ + SALOME_ParallelGlobalProcessVar_i.hxx \ Parallel_Salome_file_i.hxx # @@ -50,21 +52,27 @@ COMMON_CPPFLAGS= -I$(top_srcdir)/src/Container \ -I$(top_srcdir)/src/NamingService \ -I$(top_srcdir)/src/Registry \ -I$(top_srcdir)/src/Utils \ + -I$(top_srcdir)/src/GenericObj \ -I$(srcdir)/../HDFPersist \ - -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ -I$(top_srcdir)/src/SALOMETraceCollector \ + @PYTHON_INCLUDES@ \ @CORBA_CXXFLAGS@ \ @CORBA_INCLUDES@ \ + @MPI_INCLUDES@ \ @PACO_INCLUDES@ # This local variable defines the list of dependant libraries common to all target in this package. COMMON_LIBS = $(top_builddir)/src/Container/libSalomeContainer.la \ + $(top_builddir)/src/NamingService/libSalomeNS.la \ + $(top_builddir)/src/SALOMELocalTrace/libSALOMELocalTrace.la \ + $(top_builddir)/src/Basics/libSALOMEBasics.la \ $(top_builddir)/src/HDFPersist/libSalomeHDFPersist.la \ $(top_builddir)/idl/libSalomeParallelIDLKernel.la \ $(top_builddir)/idl/libSalomeIDLKernel.la \ @CORBA_LIBS@ \ - @PACO_LIBS@ + @PACO_LIBS@ \ + $(PYTHON_LIBS) # # =============================================================== @@ -76,12 +84,12 @@ lib_LTLIBRARIES = libSalomeParallelContainer.la libSalomeParallelContainer_la_SOURCES = SALOME_ParallelComponent_i.cxx \ SALOME_ParallelContainer_i.cxx \ SALOME_ParallelContainerProxy_i.cxx \ - $(top_srcdir)/src/Container/Salome_file_i.cxx \ - Parallel_Salome_file_i.cxx + Parallel_Salome_file_i.cxx \ + SALOME_ParallelGlobalProcessVar_i.cxx libSalomeParallelContainer_la_CXXFLAGS = $(COMMON_CPPFLAGS) -libSalomeParallelContainer_la_LIBADD = $(COMMON_LIBS) +libSalomeParallelContainer_la_LIBADD = $(COMMON_LIBS) @MPI_LIBS@ libSalomeParallelContainer_la_LDFLAGS = -no-undefined -version-info=0:0:0 diff --git a/src/ParallelContainer/Parallel_Salome_file_i.cxx b/src/ParallelContainer/Parallel_Salome_file_i.cxx index c6969d61d..718e8193f 100644 --- a/src/ParallelContainer/Parallel_Salome_file_i.cxx +++ b/src/ParallelContainer/Parallel_Salome_file_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : Parallel_Salome_file_i.cxx // Author : André RIBES, EDF // Module : SALOME @@ -28,12 +29,17 @@ #include "utilities.h" Parallel_Salome_file_i::Parallel_Salome_file_i(CORBA::ORB_ptr orb, - const char * ior, - int rank) : + const char * ior, + int rank) : InterfaceParallel_impl(orb,ior,rank), Engines::Salome_file_serv(orb,ior,rank), + Engines::Salome_file_base_serv(orb,ior,rank), Engines::fileTransfer_serv(orb,ior,rank), - Engines::Parallel_Salome_file_serv(orb,ior,rank) + Engines::Parallel_Salome_file_serv(orb,ior,rank), + Engines::fileTransfer_base_serv(orb,ior,rank), + SALOME::GenericObj_serv(orb,ior,rank), + SALOME::GenericObj_base_serv(orb,ior,rank), + Engines::Parallel_Salome_file_base_serv(orb,ior,rank) { CORBA::Object_ptr obj = _orb->string_to_object(ior); proxy = Engines::Parallel_Salome_file::_narrow(obj); @@ -82,7 +88,7 @@ Parallel_Salome_file_i::connect(Engines::Salome_file_ptr source_Salome_file) { std::string file_name = begin->first; if (_fileManaged[file_name].node > 0 && getMyRank() == 0) { if (parallel_file == NULL) - parallel_file = Engines::PaCO_Parallel_Salome_file::PaCO_narrow(proxy, _orb); + parallel_file = Engines::PaCO_Parallel_Salome_file::PaCO_narrow(proxy, _orb); parallel_file->connect(source_Salome_file, _fileManaged[file_name].node); } } @@ -90,7 +96,7 @@ Parallel_Salome_file_i::connect(Engines::Salome_file_ptr source_Salome_file) { void Parallel_Salome_file_i::connectDistributedFile(const char * file_name, - Engines::Salome_file_ptr source_Salome_file) { + Engines::Salome_file_ptr source_Salome_file) { Salome_file_i::connectDistributedFile(file_name, source_Salome_file); // Test if the file is managed in an another node @@ -105,7 +111,7 @@ Parallel_Salome_file_i::connectDistributedFile(const char * file_name, void Parallel_Salome_file_i::setDistributedSourceFile(const char* file_name, - const char * source_file_name) { + const char * source_file_name) { Salome_file_i::setDistributedSourceFile(file_name, source_file_name); // Test if the file is managed in an another node // If yes, node is updated @@ -162,29 +168,29 @@ Parallel_Salome_file_i::recvFiles_node() { // Test if the file is local or distributed if (std::string(file_infos.type.in()) == "local") { - if (std::string(file_infos.status.in()) == "not_ok") - result = checkLocalFile(file_infos.file_name.in()); + if (std::string(file_infos.status.in()) == "not_ok") + result = checkLocalFile(file_infos.file_name.in()); } else { - if (std::string(file_infos.status.in()) == "not_ok") { - // 2 cases : - // Source file is a Salome_file - // Source file is a Parallel_Salome_file - PaCO::InterfaceManager_var interface_manager = - PaCO::InterfaceManager::_narrow(_fileDistributedSource[file_infos.file_name.in()]); - if (CORBA::is_nil(interface_manager)) - result = getDistributedFile(file_infos.file_name.in()); - else - result = getParallelDistributedFile(file_infos.file_name.in()); - } + if (std::string(file_infos.status.in()) == "not_ok") { + // 2 cases : + // Source file is a Salome_file + // Source file is a Parallel_Salome_file + PaCO::InterfaceManager_var interface_manager = + PaCO::InterfaceManager::_narrow(_fileDistributedSource[file_infos.file_name.in()]); + if (CORBA::is_nil(interface_manager)) + result = getDistributedFile(file_infos.file_name.in()); + else + result = getParallelDistributedFile(file_infos.file_name.in()); + } } // if the result is false // we add this file to files_not_ok if (!result) { - files_not_ok.append(" "); - files_not_ok.append(file_infos.file_name.in()); + files_not_ok.append(" "); + files_not_ok.append(file_infos.file_name.in()); } } } @@ -304,8 +310,8 @@ Parallel_Salome_file_i::setFileNode(const char* file_name, CORBA::Long node) { Engines::Container_ptr cont = parallel_file->updateFile(_fileManaged[fname], node); parallel_file->connectDistributedFile(fname.c_str(), - _fileDistributedSource[fname], - node); + _fileDistributedSource[fname], + node); // Update file infos with the new reference of the container _fileManaged[fname].container = Engines::Container::_duplicate(cont); diff --git a/src/ParallelContainer/Parallel_Salome_file_i.hxx b/src/ParallelContainer/Parallel_Salome_file_i.hxx index b2bcd852c..e689e76cf 100644 --- a/src/ParallelContainer/Parallel_Salome_file_i.hxx +++ b/src/ParallelContainer/Parallel_Salome_file_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : Parallel_Salome_file_i.hxx // Author : André RIBES, EDF // Module : SALOME @@ -32,7 +33,7 @@ #include #include -#include "SALOME_ComponentPaCO_Engines_Parallel_Salome_file_server.h" +#include "SALOME_PACOExtensionPaCO_Engines_Parallel_Salome_file_server.hxx" #include "Salome_file_i.hxx" class CONTAINER_EXPORT Parallel_Salome_file_i: @@ -41,8 +42,8 @@ class CONTAINER_EXPORT Parallel_Salome_file_i: { public: Parallel_Salome_file_i(CORBA::ORB_ptr orb, - const char * ior, - int rank); + const char * ior, + int rank); virtual ~Parallel_Salome_file_i(); virtual void setFileNode(const char* file_name, CORBA::Long node); @@ -56,9 +57,9 @@ class CONTAINER_EXPORT Parallel_Salome_file_i: virtual void save_all(const char* hdf5_file); virtual void connect(Engines::Salome_file_ptr source_Salome_file); virtual void connectDistributedFile(const char * file_name, - Engines::Salome_file_ptr source_Salome_file); + Engines::Salome_file_ptr source_Salome_file); virtual void setDistributedSourceFile(const char* file_name, - const char * source_file_name); + const char * source_file_name); virtual void recvFiles(); virtual void recvFiles_node(); virtual void setContainer(Engines::Container_ptr container); diff --git a/src/ParallelContainer/SALOME_ParallelComponent_i.cxx b/src/ParallelContainer/SALOME_ParallelComponent_i.cxx index 8e8cc6aee..eb511d2a1 100644 --- a/src/ParallelContainer/SALOME_ParallelComponent_i.cxx +++ b/src/ParallelContainer/SALOME_ParallelComponent_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME_ParallelComponent : implementation of container and engine for Parallel Kernel // File : SALOME_ParallelComponent_i.cxx // Author : André RIBES, EDF @@ -34,6 +35,7 @@ #endif #include #include "utilities.h" +#include "Basics_Utils.hxx" #ifndef WIN32 #include @@ -47,7 +49,6 @@ int SIGUSR11 = 1000; #include #include -using namespace std; extern bool _Sleeping ; static Engines_Parallel_Component_i * theEngines_Component ; @@ -55,21 +56,6 @@ static Engines_Parallel_Component_i * theEngines_Component ; bool Engines_Parallel_Component_i::_isMultiStudy = true; bool Engines_Parallel_Component_i::_isMultiInstance = false; -//============================================================================= -/*! - * Default constructor, not for use - */ -//============================================================================= - -Engines_Parallel_Component_i::Engines_Parallel_Component_i(CORBA::ORB_ptr orb, char * ior, int rank) : - InterfaceParallel_impl(orb,ior,rank), - Engines::Component_serv(orb,ior,rank), - Engines::Parallel_Component_serv(orb,ior,rank) -{ - //ASSERT(0); - INFOS("Default Constructor..."); -} - //============================================================================= /*! * Standard Constructor for generic Component, used in derived class @@ -84,34 +70,43 @@ Engines_Parallel_Component_i::Engines_Parallel_Component_i(CORBA::ORB_ptr orb, c //============================================================================= Engines_Parallel_Component_i::Engines_Parallel_Component_i(CORBA::ORB_ptr orb, char * ior, int rank, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName, - bool notif) : + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName, + bool notif, + bool regist) : InterfaceParallel_impl(orb,ior,rank), - Engines::Component_serv(orb,ior,rank), + Engines::EngineComponent_serv(orb,ior,rank), + Engines::EngineComponent_base_serv(orb,ior,rank), Engines::Parallel_Component_serv(orb,ior,rank), + Engines::Parallel_Component_base_serv(orb,ior,rank), _instanceName(instanceName), _interfaceName(interfaceName), + _id(NULL), _myConnexionToRegistry(0), _ThreadId(0) , _ThreadCpuUsed(0) , _Executed(false) , _graphName("") , _nodeName(""), - _studyId(-1) + _studyId(-1), + _destroyed(false), + _CanceledThread(false) { - MESSAGE("Component constructor with instanceName "<< _instanceName); + MESSAGE("Parallel Component constructor with instanceName "<< _instanceName); //SCRUTE(pd_refCount); _orb = CORBA::ORB::_duplicate(orb); _poa = PortableServer::POA::_duplicate(poa); _contId = contId ; CORBA::Object_var o = _poa->id_to_reference(*contId); // container ior... - const CORBA::String_var the_ior = _orb->object_to_string(o); - _myConnexionToRegistry = new RegistryConnexion(0, 0, the_ior,"theSession", - _instanceName.c_str()); + if (regist) + { + CORBA::String_var the_ior = _orb->object_to_string(o); + _myConnexionToRegistry = new RegistryConnexion(0, 0, the_ior,"theSession", + _instanceName.c_str()); + } _notifSupplier = new NOTIFICATION_Supplier(instanceName, notif); deploy_mutex = new pthread_mutex_t(); @@ -130,11 +125,15 @@ Engines_Parallel_Component_i::Engines_Parallel_Component_i(CORBA::ORB_ptr orb, c Engines_Parallel_Component_i::~Engines_Parallel_Component_i() { - MESSAGE("Component destructor"); + MESSAGE("Parallel Component destructor"); Engines_Parallel_Container_i::decInstanceCnt(_interfaceName); + if(_myConnexionToRegistry)delete _myConnexionToRegistry; + if(_notifSupplier)delete _notifSupplier; + if (_id) + delete(_id); + pthread_mutex_destroy(deploy_mutex); delete deploy_mutex; - if (_proxy) delete _proxy; } @@ -183,7 +182,13 @@ CORBA::Long Engines_Parallel_Component_i::getStudyId() void Engines_Parallel_Component_i::ping() { - // MESSAGE("Engines_Parallel_Component_i::ping_c() pid "<< getpid() << " threadid " << pthread_self()); +#ifndef WIN32 + MESSAGE("Engines_Parallel_Component_i::ping() pid "<< getpid() << " threadid " + << pthread_self()); +#else + MESSAGE("Engines_Parallel_Component_i::ping() pid "<< _getpid()<< " threadid " + << pthread_self().p ); +#endif } //============================================================================= @@ -200,20 +205,12 @@ void Engines_Parallel_Component_i::ping() void Engines_Parallel_Component_i::destroy() { MESSAGE("Engines_Parallel_Component_i::destroy()"); - //SCRUTE(pd_refCount); - - delete _notifSupplier; - _notifSupplier = 0; - - delete _myConnexionToRegistry; - _myConnexionToRegistry = 0 ; - _poa->deactivate_object(*_id) ; - CORBA::release(_poa) ; - delete(_id) ; - //SCRUTE(pd_refCount); - _thisObj->_remove_ref(); - //SCRUTE(pd_refCount); - MESSAGE("Engines_Parallel_Component_i::destroyed") ; + MESSAGE("Object Instance will be deleted when Shutdown of the container will be called"); + if (!_destroyed) + { + _remove_ref(); + _destroyed = true; + } } //============================================================================= @@ -226,7 +223,7 @@ void Engines_Parallel_Component_i::destroy() Engines::Container_ptr Engines_Parallel_Component_i::GetContainerRef() { MESSAGE("Engines_Parallel_Component_i::GetContainerRef"); - CORBA::Object_ptr o = _poa->id_to_reference(*_contId) ; + CORBA::Object_var o = _poa->id_to_reference(*_contId) ; return Engines::Container::_narrow(o); } @@ -263,7 +260,7 @@ Engines::FieldsDict* Engines_Parallel_Component_i::getProperties() { Engines::FieldsDict_var copie = new Engines::FieldsDict; copie->length(_fieldsDict.size()); - map::iterator it; + std::map::iterator it; CORBA::ULong i = 0; for (it = _fieldsDict.begin(); it != _fieldsDict.end(); it++, i++) { @@ -283,10 +280,10 @@ Engines::FieldsDict* Engines_Parallel_Component_i::getProperties() void Engines_Parallel_Component_i::Names( const char * graphName , const char * nodeName ) { - _graphName = graphName ; - _nodeName = nodeName ; - INFOS("Engines_Parallel_Component_i::Names( '" << _graphName << "' , '" - << _nodeName << "' )"); + _graphName = graphName; + _nodeName = nodeName; + MESSAGE("Engines_Parallel_Component_i::Names( '" << _graphName << "' , '" + << _nodeName << "' )"); } //============================================================================= @@ -308,7 +305,7 @@ bool Engines_Parallel_Component_i::Kill_impl() #ifndef WIN32 if ( _ThreadId > 0 && pthread_self() != _ThreadId ) { - RetVal = Killer( _ThreadId , 0 ) ; + RetVal = Killer( _ThreadId , SIGUSR2 ) ; _ThreadId = (pthread_t ) -1 ; } @@ -331,11 +328,19 @@ bool Engines_Parallel_Component_i::Kill_impl() bool Engines_Parallel_Component_i::Stop_impl() { +#ifndef WIN32 MESSAGE("Engines_Parallel_Component_i::Stop_i() pthread_t "<< pthread_self() << " pid " << getpid() << " instanceName " << _instanceName.c_str() << " interface " << _interfaceName.c_str() << " machineName " << Kernel_Utils::GetHostname().c_str()<< " _id " << hex << _id << dec << " _ThreadId " << _ThreadId ); +#else + MESSAGE("Engines_Parallel_Component_i::Stop_i() pthread_t "<< pthread_self().p + << " pid " << _getpid() << " instanceName " + << _instanceName.c_str() << " interface " << _interfaceName.c_str() + << " machineName " << Kernel_Utils::GetHostname().c_str()<< " _id " << hex << _id + << dec << " _ThreadId " << _ThreadId ); +#endif bool RetVal = false ; @@ -363,11 +368,19 @@ bool Engines_Parallel_Component_i::Stop_impl() bool Engines_Parallel_Component_i::Suspend_impl() { +#ifndef WIN32 MESSAGE("Engines_Parallel_Component_i::Suspend_i() pthread_t "<< pthread_self() << " pid " << getpid() << " instanceName " << _instanceName.c_str() << " interface " << _interfaceName.c_str() << " machineName " << Kernel_Utils::GetHostname().c_str()<< " _id " << hex << _id << dec << " _ThreadId " << _ThreadId ); +#else + MESSAGE("Engines_Parallel_Component_i::Suspend_i() pthread_t "<< pthread_self().p + << " pid " << _getpid() << " instanceName " + << _instanceName.c_str() << " interface " << _interfaceName.c_str() + << " machineName " << Kernel_Utils::GetHostname().c_str()<< " _id " << hex << _id + << dec << " _ThreadId " << _ThreadId ); +#endif bool RetVal = false ; #ifndef WIN32 @@ -377,17 +390,17 @@ bool Engines_Parallel_Component_i::Suspend_impl() #endif { if ( _Sleeping ) - { - return false ; - } + { + return false ; + } else { #ifndef WIN32 - RetVal = Killer( _ThreadId ,SIGINT ) ; + RetVal = Killer( _ThreadId ,SIGINT ) ; #else - RetVal = Killer( *_ThreadId ,SIGINT ) ; + RetVal = Killer( *_ThreadId ,SIGINT ) ; #endif - //if ( RetVal ) _Sleeping = true; + //if ( RetVal ) _Sleeping = true; } } @@ -402,11 +415,19 @@ bool Engines_Parallel_Component_i::Suspend_impl() bool Engines_Parallel_Component_i::Resume_impl() { +#ifndef WIN32 MESSAGE("Engines_Parallel_Component_i::Resume_i() pthread_t "<< pthread_self() << " pid " << getpid() << " instanceName " << _instanceName.c_str() << " interface " << _interfaceName.c_str() << " machineName " << Kernel_Utils::GetHostname().c_str()<< " _id " << hex << _id << dec << " _ThreadId " << _ThreadId ); +#else + MESSAGE("Engines_Parallel_Component_i::Resume_i() pthread_t "<< pthread_self().p + << " pid " << _getpid() << " instanceName " + << _instanceName.c_str() << " interface " << _interfaceName.c_str() + << " machineName " << Kernel_Utils::GetHostname().c_str()<< " _id " << hex << _id + << dec << " _ThreadId " << _ThreadId ); +#endif bool RetVal = false ; #ifndef WIN32 if ( _ThreadId > 0 && pthread_self() != _ThreadId ) @@ -416,12 +437,12 @@ bool Engines_Parallel_Component_i::Resume_impl() { if ( _Sleeping ) { - _Sleeping = false ; - RetVal = true ; + _Sleeping = false ; + RetVal = true ; } else { - RetVal = false ; + RetVal = false ; } } return RetVal ; @@ -445,41 +466,41 @@ CORBA::Long Engines_Parallel_Component_i::CpuUsed_impl() #else if ( pthread_self().p != _ThreadId->p ) #endif - { + { if ( _Sleeping ) - { - } + { + } else - { - // Get Cpu in the appropriate thread with that object !... - theEngines_Component = this ; + { + // Get Cpu in the appropriate thread with that object !... + theEngines_Component = this ; #ifndef WIN32 - Killer( _ThreadId ,SIGUSR1 ) ; + Killer( _ThreadId ,SIGUSR1 ) ; #else - Killer( *_ThreadId ,SIGUSR11 ) ; + Killer( *_ThreadId ,SIGUSR11 ) ; #endif - } + } cpu = _ThreadCpuUsed ; - } + } else - { - _ThreadCpuUsed = CpuUsed() ; - cpu = _ThreadCpuUsed ; - // cout << pthread_self() << " Engines_Parallel_Component_i::CpuUsed_impl " - // << _serviceName << " " << cpu << endl ; + { + _ThreadCpuUsed = CpuUsed() ; + cpu = _ThreadCpuUsed ; + // std::cout << pthread_self() << " Engines_Parallel_Component_i::CpuUsed_impl " + // << _serviceName << " " << cpu << std::endl ; } } else { - cpu = _ThreadCpuUsed ; - // cout << pthread_self() << " Engines_Parallel_Component_i::CpuUsed_impl " - // << _serviceName << " " << cpu<< endl ; + cpu = _ThreadCpuUsed ; + // std::cout << pthread_self() << " Engines_Parallel_Component_i::CpuUsed_impl " + // << _serviceName << " " << cpu<< std::endl ; } } else { - // cout<< pthread_self()<<"Engines_Parallel_Component_i::CpuUsed_impl _ThreadId " - // <<_ThreadId <<" "<<_serviceName<<" _StartUsed "<<_StartUsed<::iterator it; + std::map::iterator it; for (it = _fieldsDict.begin(); it != _fieldsDict.end(); it++) { std::string cle((*it).first); if ((*it).second.type()->kind() == CORBA::tk_string) - { - const char* value; - (*it).second >>= value; - // ---todo: replace __GNUC__ test by an autoconf macro AC_CHECK_FUNC. + { + const char* value; + (*it).second >>= value; + // ---todo: replace __GNUC__ test by an autoconf macro AC_CHECK_FUNC. #if defined __GNUC__ - //int ret = setenv(cle.c_str(), value, overwrite); - setenv(cle.c_str(), value, overwrite); + //int ret = setenv(cle.c_str(), value, overwrite); + setenv(cle.c_str(), value, overwrite); #else - //CCRT porting : setenv not defined in stdlib.h - std::string s(cle); - s+='='; - s+=value; - // char* cast because 1st arg of linux putenv function - // is not a const char* ! - //int ret=putenv((char *)s.c_str()); - putenv((char *)s.c_str()); - //End of CCRT porting + //CCRT porting : setenv not defined in stdlib.h + std::string s(cle); + s+='='; + s+=value; + // char* cast because 1st arg of linux putenv function + // is not a const char* ! + //int ret=putenv((char *)s.c_str()); + putenv((char *)s.c_str()); + //End of CCRT porting #endif - MESSAGE("--- setenv: "<SetCurCpu() ; + if (theEngines_Component) + theEngines_Component->SetCurCpu(); } //============================================================================= @@ -720,29 +765,46 @@ long Engines_Parallel_Component_i::CpuUsed() if ( _ThreadId || _Executed ) { if ( getrusage( RUSAGE_SELF , &usage ) == -1 ) - { - perror("Engines_Parallel_Component_i::CpuUsed") ; - return 0 ; - } + { + perror("Engines_Parallel_Component_i::CpuUsed") ; + return 0 ; + } cpu = usage.ru_utime.tv_sec - _StartUsed ; - // cout << pthread_self() << " Engines_Parallel_Component_i::CpuUsed " << " " + // std::cout << pthread_self() << " Engines_Parallel_Component_i::CpuUsed " << " " // << _serviceName << usage.ru_utime.tv_sec << " - " << _StartUsed - // << " = " << cpu << endl ; + // << " = " << cpu << std::endl ; } else { - // cout << pthread_self() << "Engines_Parallel_Component_i::CpuUsed _ThreadId " + // std::cout << pthread_self() << "Engines_Parallel_Component_i::CpuUsed _ThreadId " // << _ThreadId << " " << _serviceName<< " _StartUsed " - // << _StartUsed << endl ; + // << _StartUsed << std::endl ; } #else - // NOT implementet yet + // NOT implementet yet #endif return cpu ; } +void CallCancelThread() +{ + if ( theEngines_Component ) + theEngines_Component->CancelThread() ; +} + +//============================================================================= +/*! + * C++ method: + */ +//============================================================================= + +void Engines_Parallel_Component_i::CancelThread() +{ + _CanceledThread = true; +} + //============================================================================= /*! * C++ method: Send message to event channel @@ -750,7 +812,7 @@ long Engines_Parallel_Component_i::CpuUsed() //============================================================================= void Engines_Parallel_Component_i::sendMessage(const char *event_type, - const char *message) + const char *message) { _notifSupplier->Send(graphName(), nodeName(), event_type, message); } @@ -761,9 +823,9 @@ void Engines_Parallel_Component_i::sendMessage(const char *event_type, */ //============================================================================= -string Engines_Parallel_Component_i::GetDynLibraryName(const char *componentName) +std::string Engines_Parallel_Component_i::GetDynLibraryName(const char *componentName) { - string ret="lib"; + std::string ret="lib"; ret+=componentName; ret+="Engine.so"; return ret; @@ -776,10 +838,11 @@ string Engines_Parallel_Component_i::GetDynLibraryName(const char *componentName //============================================================================= Engines::TMPFile* Engines_Parallel_Component_i::DumpPython(CORBA::Object_ptr theStudy, - CORBA::Boolean isPublished, - CORBA::Boolean& isValidScript) + CORBA::Boolean isPublished, + CORBA::Boolean isMultiFile, + CORBA::Boolean& isValidScript) { - const char* aScript = "def RebuildData(theStudy): pass"; + const char* aScript = isMultiFile ? "def RebuildData(theStudy): pass" : ""; char* aBuffer = new char[strlen(aScript)+1]; strcpy(aBuffer, aScript); CORBA::Octet* anOctetBuf = (CORBA::Octet*)aBuffer; @@ -792,7 +855,7 @@ Engines::TMPFile* Engines_Parallel_Component_i::DumpPython(CORBA::Object_ptr the Engines::Salome_file_ptr Engines_Parallel_Component_i::setInputFileToService(const char* service_name, - const char* Salome_file_name) + const char* Salome_file_name) { // Try to find the service, if it doesn't exist, we add it. _Service_file_map_it = _Input_Service_file_map.find(service_name); @@ -825,7 +888,7 @@ Engines_Parallel_Component_i::setInputFileToService(const char* service_name, Engines::Parallel_Salome_file_proxy_impl * proxy = NULL; if (getMyRank() == 0) { proxy = new Engines::Parallel_Salome_file_proxy_impl(CORBA::ORB::_duplicate(_orb), - new paco_omni_fabrique()); + new paco_omni_fabrique()); proxy->copyGlobalContext(this); PaCO::PacoTopology_t serveur_topo; serveur_topo.total = getTotalNode(); @@ -836,7 +899,7 @@ Engines_Parallel_Component_i::setInputFileToService(const char* service_name, // We send the reference to all the nodes... Engines::Parallel_Component_var component_proxy = - Engines::Parallel_Component::_narrow(InterfaceParallel_impl::_proxy); + Engines::Parallel_Component::_narrow(InterfaceParallel_impl::_proxy); component_proxy->send_parallel_proxy_object(proxy_ref); // Adding proxy into the map @@ -853,30 +916,30 @@ Engines_Parallel_Component_i::setInputFileToService(const char* service_name, // into the proxy. for (int i = 0; i < getTotalNode(); i++) { if (i == getMyRank()) { - Parallel_Salome_file_i * servant = - new Parallel_Salome_file_i(CORBA::ORB::_duplicate(_orb), - proxy_ior.c_str(), - i); - servant->copyGlobalContext(this); - - // We register the CORBA objet into the POA - servant->POA_PaCO::InterfaceParallel::_this(); - - // Register the servant - servant->deploy(); - - // Adding servant to the map - (*_map)[Salome_file_name] = servant; + Parallel_Salome_file_i * servant = + new Parallel_Salome_file_i(CORBA::ORB::_duplicate(_orb), + proxy_ior.c_str(), + i); + servant->copyGlobalContext(this); + + // We register the CORBA objet into the POA + servant->POA_PaCO::InterfaceParallel::_this(); + + // Register the servant + servant->deploy(); + + // Adding servant to the map + (*_map)[Salome_file_name] = servant; } _my_com->paco_barrier(); // start parallel object if (getMyRank() == 0) { - proxy->start(); - _my_com->paco_barrier(); + proxy->start(); + _my_com->paco_barrier(); } else - _my_com->paco_barrier(); + _my_com->paco_barrier(); } // Parallel_Salome_file is created and deployed delete _proxy; @@ -891,7 +954,7 @@ Engines_Parallel_Component_i::setInputFileToService(const char* service_name, Engines::Salome_file_ptr Engines_Parallel_Component_i::setOutputFileToService(const char* service_name, - const char* Salome_file_name) + const char* Salome_file_name) { // Try to find the service, if it doesn't exist, we add it. _Service_file_map_it = _Output_Service_file_map.find(service_name); @@ -923,8 +986,8 @@ Engines_Parallel_Component_i::setOutputFileToService(const char* service_name, // of the Salome_file and transmit his // reference to the other nodes. if (getMyRank() == 0) { - proxy = new Engines::Parallel_Salome_file_proxy_impl(CORBA::ORB::_duplicate(_orb), - new paco_omni_fabrique()); + proxy = new Engines::Parallel_Salome_file_proxy_impl(CORBA::ORB::_duplicate(_orb), + new paco_omni_fabrique()); proxy->copyGlobalContext(this); PaCO::PacoTopology_t serveur_topo; serveur_topo.total = getTotalNode(); @@ -935,7 +998,7 @@ Engines_Parallel_Component_i::setOutputFileToService(const char* service_name, // We send the reference to all the nodes... Engines::Parallel_Component_var component_proxy = - Engines::Parallel_Component::_narrow(InterfaceParallel_impl::_proxy); + Engines::Parallel_Component::_narrow(InterfaceParallel_impl::_proxy); component_proxy->send_parallel_proxy_object(proxy_ref); // Adding proxy into the map @@ -952,30 +1015,30 @@ Engines_Parallel_Component_i::setOutputFileToService(const char* service_name, // into the proxy. for (int i = 0; i < getTotalNode(); i++) { if (i == getMyRank()) { - Parallel_Salome_file_i * servant = - new Parallel_Salome_file_i(CORBA::ORB::_duplicate(_orb), - proxy_ior.c_str(), - i); - servant->copyGlobalContext(this); - - // We register the CORBA objet into the POA - servant->POA_PaCO::InterfaceParallel::_this(); - - // Register the servant - servant->deploy(); - - // Adding servant to the map - (*_map)[Salome_file_name] = servant; + Parallel_Salome_file_i * servant = + new Parallel_Salome_file_i(CORBA::ORB::_duplicate(_orb), + proxy_ior.c_str(), + i); + servant->copyGlobalContext(this); + + // We register the CORBA objet into the POA + servant->POA_PaCO::InterfaceParallel::_this(); + + // Register the servant + servant->deploy(); + + // Adding servant to the map + (*_map)[Salome_file_name] = servant; } _my_com->paco_barrier(); // start parallel object if (getMyRank() == 0) { - proxy->start(); - _my_com->paco_barrier(); + proxy->start(); + _my_com->paco_barrier(); } else - _my_com->paco_barrier(); + _my_com->paco_barrier(); } // Parallel_Salome_file is created and deployed @@ -990,7 +1053,7 @@ Engines_Parallel_Component_i::setOutputFileToService(const char* service_name, Engines::Salome_file_ptr Engines_Parallel_Component_i::getInputFileToService(const char* service_name, - const char* Salome_file_name) + const char* Salome_file_name) { // Try to find the service, if it doesn't exist, we throw an exception. _Proxy_Service_file_map_it = _Proxy_Input_Service_file_map.find(service_name); @@ -1018,7 +1081,7 @@ Engines_Parallel_Component_i::getInputFileToService(const char* service_name, Engines::Salome_file_ptr Engines_Parallel_Component_i::getOutputFileToService(const char* service_name, - const char* Salome_file_name) + const char* Salome_file_name) { // Try to find the service, if it doesn't exist, we throw an exception. _Proxy_Service_file_map_it = _Proxy_Output_Service_file_map.find(service_name); @@ -1131,9 +1194,8 @@ Engines_Parallel_Component_i::get_parallel_proxy_object() { //============================================================================= void Engines_Parallel_Component_i::configureSalome_file(std::string service_name, - std::string file_port_name, - Engines::Parallel_Salome_file_proxy_impl * file) + std::string file_port_name, + Engines::Parallel_Salome_file_proxy_impl * file) { // By default this method does nothing } - diff --git a/src/ParallelContainer/SALOME_ParallelComponent_i.hxx b/src/ParallelContainer/SALOME_ParallelComponent_i.hxx index 3a72a55cc..c7832791f 100644 --- a/src/ParallelContainer/SALOME_ParallelComponent_i.hxx +++ b/src/ParallelContainer/SALOME_ParallelComponent_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME_ParallelComponent : implementation of container and engine for Parallel Kernel // File : SALOME_ParallelComponent_i.hxx // Author : André RIBES, EDF @@ -38,7 +39,7 @@ #include #include -#include "SALOME_ComponentPaCO_Engines_Parallel_Component_server.h" +#include "SALOME_PACOExtensionPaCO_Engines_Parallel_Component_server.hxx" #include "NOTIFICATION.hxx" #include "RegistryConnexion.hxx" @@ -47,7 +48,7 @@ class Engines_Parallel_Container_i; #ifdef WIN32 -# ifdef CONTAINER_EXPORTS +# if defined CONTAINER_EXPORTS || defined SalomeParallelContainer_EXPORTS # define CONTAINER_EXPORT __declspec( dllexport ) # else # define CONTAINER_EXPORT __declspec( dllimport ) @@ -61,13 +62,13 @@ class CONTAINER_EXPORT Engines_Parallel_Component_i: public virtual PortableServer::RefCountServantBase { public: - Engines_Parallel_Component_i(CORBA::ORB_ptr orb, char * ior, int rank); Engines_Parallel_Component_i(CORBA::ORB_ptr orb, char * ior, int rank, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName, - bool notif = false); + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName, + bool notif = false, + bool regist = true); virtual ~Engines_Parallel_Component_i(); @@ -93,25 +94,30 @@ public: CORBA::Long CpuUsed_impl() ; virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy, - CORBA::Boolean isPublished, - CORBA::Boolean& isValidScript); + CORBA::Boolean isPublished, + CORBA::Boolean isMultiFile, + CORBA::Boolean& isValidScript); // CORBA operations for Salome_file virtual Engines::Salome_file_ptr getInputFileToService(const char* service_name, - const char* Salome_file_name); + const char* Salome_file_name); virtual Engines::Salome_file_ptr getOutputFileToService(const char* service_name, - const char* Salome_file_name); + const char* Salome_file_name); virtual void checkInputFilesToService(const char* service_name); virtual Engines::Salome_file_ptr setInputFileToService(const char* service_name, - const char* Salome_file_name); + const char* Salome_file_name); virtual void checkOutputFilesToService(const char* service_name); virtual Engines::Salome_file_ptr setOutputFileToService(const char* service_name, - const char* Salome_file_name); + const char* Salome_file_name); void send_parallel_proxy_object(CORBA::Object_ptr proxy_ref); + // Object information + virtual bool hasObjectInfo() { return false; } + virtual char* getObjectInfo(CORBA::Long studyId, const char* entry) { return ""; } + // --- local C++ methods PortableServer::ObjectId * getId(); @@ -130,13 +136,14 @@ public: bool Killer( pthread_t ThreadId , int signum ); void SetCurCpu() ; long CpuUsed() ; + void CancelThread(); void wait_parallel_object_proxy(); char * get_parallel_proxy_object(); virtual void configureSalome_file(std::string service_name, - std::string file_port_name, - Engines::Parallel_Salome_file_proxy_impl * file); + std::string file_port_name, + Engines::Parallel_Salome_file_proxy_impl * file); protected: int _studyId; // -1: not initialised; 0: multiStudy; >0: study @@ -146,8 +153,8 @@ protected: std::string _instanceName ; std::string _interfaceName ; - CORBA::ORB_ptr _orb; - PortableServer::POA_ptr _poa; + CORBA::ORB_var _orb; + PortableServer::POA_var _poa; PortableServer::ObjectId * _id; PortableServer::ObjectId * _contId; Engines_Parallel_Component_i * _thisObj ; @@ -196,6 +203,8 @@ private: long _StartUsed ; long _ThreadCpuUsed ; bool _Executed ; + bool _CanceledThread ; + bool _destroyed; }; #endif diff --git a/src/ParallelContainer/SALOME_ParallelContainerNodeDummy.cxx b/src/ParallelContainer/SALOME_ParallelContainerNodeDummy.cxx index 61f5eda5c..248ad4341 100644 --- a/src/ParallelContainer/SALOME_ParallelContainerNodeDummy.cxx +++ b/src/ParallelContainer/SALOME_ParallelContainerNodeDummy.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME ParallelContainerNodeDummy : launcher of a PaCO++ object // File : SALOME_ParallelContainerNodeDummy.cxx // Author : André Ribes, EDF @@ -42,22 +43,23 @@ #include "SALOME_NamingService.hxx" #include "utilities.h" +#include "Basics_Utils.hxx" #include "Utils_ORB_INIT.hxx" #include "Utils_SINGLETON.hxx" #include "SALOMETraceCollector.hxx" #include "OpUtil.hxx" -using namespace std; +#include "Container_init_python.hxx" #ifdef _DEBUG_ #include void handler(int t) { - cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl; - cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl; - cerr << "SIGSEGV in :" << getpid() << endl; - cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl; - cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl; + std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; + std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; + std::cerr << "SIGSEGV in :" << getpid() << std::endl; + std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; + std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; while (1) {} } #endif @@ -119,15 +121,19 @@ int main(int argc, char* argv[]) // Initialise the ORB. CORBA::ORB_var orb = CORBA::ORB_init(argc, argv); + KERNEL_PYTHON::init_python(argc,argv); std::string containerName(""); if(argc > 1) { containerName = argv[1]; } - std::string hostname(""); + std::string proxy_hostname(""); if(argc > 3) { - hostname = argv[3]; + proxy_hostname = argv[3]; } + int myid = 0; + if(argc > 4) + sscanf(argv[4],"%d",&myid); try { CORBA::Object_var obj = orb->resolve_initial_references("RootPOA"); @@ -141,21 +147,20 @@ int main(int argc, char* argv[]) system(aCommand); #endif - SALOME_NamingService * ns = new SALOME_NamingService(CORBA::ORB::_duplicate(orb)); + SALOME_NamingService * ns = new SALOME_NamingService(orb); // Get the proxy - string proxyNameInNS = ns->BuildContainerNameForNS(containerName.c_str(), - hostname.c_str()); + std::string proxyNameInNS = ns->BuildContainerNameForNS(containerName.c_str(), + proxy_hostname.c_str()); obj = ns->Resolve(proxyNameInNS.c_str()); char * proxy_ior = orb->object_to_string(obj); // Creating a node - string node_name = containerName + "Node"; + std::string node_name = containerName + "Node"; Engines_Parallel_Container_i * servant = new Engines_Parallel_Container_i(CORBA::ORB::_duplicate(orb), - proxy_ior, - 0, - root_poa, - (char*) node_name.c_str(), - argc, argv); + proxy_ior, + myid, + root_poa, + node_name); // PaCO++ init paco_fabrique_manager * pfm = paco_getFabriqueManager(); pfm->register_com("dummy", new paco_dummy_fabrique()); @@ -164,22 +169,24 @@ int main(int argc, char* argv[]) servant->setLibThread("omni"); // Activation - PortableServer::ObjectId * _id = root_poa->activate_object(servant); - servant->set_id(_id); - obj = root_poa->id_to_reference(*_id); + obj = servant->_this(); // In the NamingService string hostname = Kernel_Utils::GetHostname(); - int myid = 0; char buffer [5]; snprintf(buffer, 5, "%d", myid); node_name = node_name + buffer; string _containerName = ns->BuildContainerNameForNS((char*) node_name.c_str(), - hostname.c_str()); - cerr << "---------" << _containerName << "----------" << endl; + hostname.c_str()); + std::cerr << "---------" << _containerName << "----------" << std::endl; ns->Register(obj, _containerName.c_str()); pman->activate(); orb->run(); + PyGILState_Ensure(); + //Delete python container that destroy orb from python (pyCont._orb.destroy()) + Py_Finalize(); + CORBA::string_free(proxy_ior); + delete ns; } catch (PaCO::PACO_Exception& e) { @@ -198,6 +205,13 @@ int main(int argc, char* argv[]) { INFOS("Caught CORBA::Exception."); } + catch(omniORB::fatalException& fe) + { + INFOS("Caught omniORB::fatalException:"); + INFOS(" file: " << fe.file()); + INFOS(" line: " << fe.line()); + INFOS(" mesg: " << fe.errmsg()); + } catch(std::exception& exc) { INFOS("Caught std::exception - "< -void test(int sigval) { - cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl; - cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl; - cerr << "SIGSEGV in :" << getpid() << endl; - cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl; - cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl; - while (1) {} -} - void handler(int t) { - cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl; - cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl; - cerr << "SIGSEGV in :" << getpid() << endl; - cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl; - cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl; + std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; + std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; + std::cerr << "SIGSEGV in :" << getpid() << std::endl; + std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; + std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; while (1) {} } #endif @@ -128,40 +122,45 @@ int main(int argc, char* argv[]) MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE ,&provided); MPI_Comm_rank(MPI_COMM_WORLD,&myid); +#ifdef _DEBUG_ if(getenv ("DEBUGGER")) { std::cerr << "Unexpected: unexpected exception !" << std::endl; setsig(SIGSEGV,&Handler); set_terminate(&terminateHandler); + //set_terminate(__gnu_cxx::__verbose_terminate_handler); set_unexpected(&unexpectedHandler); } - cerr << "Level MPI_THREAD_SINGLE : " << MPI_THREAD_SINGLE << endl; - cerr << "Level MPI_THREAD_SERIALIZED : " << MPI_THREAD_SERIALIZED << endl; - cerr << "Level MPI_THREAD_FUNNELED : " << MPI_THREAD_FUNNELED << endl; - cerr << "Level MPI_THREAD_MULTIPLE : " << MPI_THREAD_MULTIPLE << endl; - cerr << "Level provided : " << provided << endl; +#endif + + std::cerr << "Level MPI_THREAD_SINGLE : " << MPI_THREAD_SINGLE << std::endl; + std::cerr << "Level MPI_THREAD_SERIALIZED : " << MPI_THREAD_SERIALIZED << std::endl; + std::cerr << "Level MPI_THREAD_FUNNELED : " << MPI_THREAD_FUNNELED << std::endl; + std::cerr << "Level MPI_THREAD_MULTIPLE : " << MPI_THREAD_MULTIPLE << std::endl; + std::cerr << "Level provided : " << provided << std::endl; // Initialise the ORB. CORBA::ORB_var orb = CORBA::ORB_init(argc, argv); + KERNEL_PYTHON::init_python(argc,argv); // Code pour choisir le reseau infiniband ..... - /* string hostname_temp = GetHostname(); - hostent * t = gethostbyname(hostname_temp.c_str()); - cerr << " AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA " << t->h_addr << " " << hostname_temp << endl; - cerr << t->h_addr << endl; - in_addr * address=(in_addr * ) t->h_addr; - cerr << inet_ntoa(* address) << endl; - string ip = inet_ntoa(* address); - cerr << " AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA " << endl; - string com = "giop:tcp:" + ip + ":"; - const char* options[][2] = { { "endPoint", com.c_str() }, { 0, 0 } }; - CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "omniORB4", options); - */ + /* std::string hostname_temp = GetHostname(); + hostent * t = gethostbyname(hostname_temp.c_str()); + std::cerr << " AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA " << t->h_addr << " " << hostname_temp << std::endl; + std::cerr << t->h_addr << std::endl; + in_addr * address=(in_addr * ) t->h_addr; + std::cerr << inet_ntoa(* address) << std::endl; + std::string ip = inet_ntoa(* address); + std::cerr << " AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA " << std::endl; + std::string com = "giop:tcp:" + ip + ":"; + const char* options[][2] = { { "endPoint", com.c_str() }, { 0, 0 } }; + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "omniORB4", options); + */ std::string containerName(""); containerName = argv[1]; - std::string hostname(""); + std::string proxy_hostname(""); if(argc > 3) { - hostname = argv[3]; + proxy_hostname = argv[3]; } try { @@ -178,47 +177,55 @@ int main(int argc, char* argv[]) SALOME_NamingService * ns = new SALOME_NamingService(CORBA::ORB::_duplicate(orb)); // On récupère le proxy - string proxyNameInNS = ns->BuildContainerNameForNS(containerName.c_str(), - hostname.c_str()); + std::string proxyNameInNS = ns->BuildContainerNameForNS(containerName.c_str(), + proxy_hostname.c_str()); obj = ns->Resolve(proxyNameInNS.c_str()); char * proxy_ior = orb->object_to_string(obj); // Node creation - string node_name = containerName + "Node"; - Engines_Parallel_Container_i * servant = - new Engines_Parallel_Container_i(CORBA::ORB::_duplicate(orb), - proxy_ior, - myid, - root_poa, - (char*) node_name.c_str(), - argc, argv); + std::string node_name = containerName + "Node"; + Engines_Parallel_Container_i * servant = new Engines_Parallel_Container_i(CORBA::ORB::_duplicate(orb), + proxy_ior, + myid, + root_poa, + node_name); // PaCO++ init paco_fabrique_manager * pfm = paco_getFabriqueManager(); pfm->register_com("mpi", new paco_mpi_fabrique()); pfm->register_thread("omni", new paco_omni_fabrique()); - MPI_Comm group = MPI_COMM_WORLD; - servant->setLibCom("mpi", &group); + servant->setLibCom("mpi", MPI_COMM_WORLD); servant->setLibThread("omni"); // Activation - PortableServer::ObjectId * _id = root_poa->activate_object(servant); - servant->set_id(_id); - obj = root_poa->id_to_reference(*_id); + obj = servant->_this(); // In the NamingService - string hostname = Kernel_Utils::GetHostname(); + std::string hostname = Kernel_Utils::GetHostname(); int myid; MPI_Comm_rank(MPI_COMM_WORLD, &myid); char buffer [5]; snprintf(buffer, 5, "%d", myid); node_name = node_name + buffer; - string _containerName = ns->BuildContainerNameForNS(node_name.c_str(), - hostname.c_str()); - cerr << "---------" << _containerName << "----------" << endl; + + // We register nodes in two different parts + // In the real machine name and in the proxy machine + std::string _containerName = ns->BuildContainerNameForNS(node_name.c_str(), + hostname.c_str()); + std::string _proxymachine_containerName = ns->BuildContainerNameForNS(node_name.c_str(), + proxy_hostname.c_str()); + std::cerr << "Register container node : " << _containerName << std::endl; + std::cerr << "Register container node : " << _proxymachine_containerName << std::endl; ns->Register(obj, _containerName.c_str()); + ns->Register(obj, _proxymachine_containerName.c_str()); pman->activate(); orb->run(); + PyGILState_Ensure(); + //Delete python container that destroy orb from python (pyCont._orb.destroy()) + Py_Finalize(); + MPI_Finalize(); + CORBA::string_free(proxy_ior); + delete ns; } catch (PaCO::PACO_Exception& e) { @@ -245,9 +252,6 @@ int main(int argc, char* argv[]) { INFOS("Caught unknown exception."); } - - MPI_Finalize(); - return 0 ; } diff --git a/src/ParallelContainer/SALOME_ParallelContainerProxyDummy.cxx b/src/ParallelContainer/SALOME_ParallelContainerProxyDummy.cxx index be5ee2add..0c80d9e64 100644 --- a/src/ParallelContainer/SALOME_ParallelContainerProxyDummy.cxx +++ b/src/ParallelContainer/SALOME_ParallelContainerProxyDummy.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME ParallelContainerProxyDummy : Proxy of a PaCO++ object using Dummy // File : SALOME_ParallelContainerProxyDummy.cxx // Author : André Ribes, EDF @@ -43,21 +44,23 @@ #include "SALOME_NamingService.hxx" #include "utilities.h" +#include "Basics_Utils.hxx" #include "Utils_ORB_INIT.hxx" #include "Utils_SINGLETON.hxx" #include "SALOMETraceCollector.hxx" #include "OpUtil.hxx" +#include "Container_init_python.hxx" + #ifdef DEBUG_PARALLEL #include -using namespace std; void handler(int t) { - cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl; - cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl; - cerr << "SIGSEGV in :" << getpid() << endl; - cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl; - cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl; + std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; + std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; + std::cerr << "SIGSEGV in :" << getpid() << std::endl; + std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; + std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; while (1) {} } #endif @@ -71,12 +74,17 @@ int main(int argc, char* argv[]) #endif // Initialise the ORB. CORBA::ORB_var orb = CORBA::ORB_init(argc, argv); + KERNEL_PYTHON::init_python(argc,argv); std::string containerName(""); if(argc > 1) { containerName = argv[1]; } + int nbnodes = 1; + if(argc > 4) + sscanf(argv[4],"%d",&nbnodes); + try { CORBA::Object_var obj = orb->resolve_initial_references("RootPOA"); ASSERT(!CORBA::is_nil(obj)); @@ -90,37 +98,42 @@ int main(int argc, char* argv[]) system(aCommand); #endif - SALOME_NamingService * ns = new SALOME_NamingService(CORBA::ORB::_duplicate(orb)); -// Engines::Container_proxy_impl * proxy = -// new Engines::Container_proxy_impl(orb, -// new paco_omni_fabrique()); + SALOME_NamingService * ns = new SALOME_NamingService(orb); - Container_proxy_impl_final * proxy = - new Container_proxy_impl_final(orb, - new paco_omni_fabrique()); // PaCO++ code paco_fabrique_manager* pfm = paco_getFabriqueManager(); pfm->register_com("dummy", new paco_dummy_fabrique()); - proxy->setLibCom("dummy", proxy); pfm->register_thread("omnithread", new paco_omni_fabrique()); + + Container_proxy_impl_final * proxy = + new Container_proxy_impl_final(orb, + pfm->get_thread("omnithread"), + root_poa, + containerName); + proxy->setLibCom("dummy", proxy); proxy->setLibThread("omnithread"); // Topo of the parallel object PaCO::PacoTopology_t serveur_topo; - serveur_topo.total = 1; + serveur_topo.total = nbnodes; proxy->setTopology(serveur_topo); - PortableServer::ObjectId_var _id = root_poa->activate_object(proxy); - obj = root_poa->id_to_reference(_id); + //PortableServer::ObjectId_var _id = root_poa->activate_object(proxy); + //obj = root_poa->id_to_reference(_id); + obj = proxy->_this(); // In the NamingService - string hostname = Kernel_Utils::GetHostname(); + std::string hostname = Kernel_Utils::GetHostname(); Engines::Container_var pCont = Engines::Container::_narrow(obj); string _containerName = ns->BuildContainerNameForNS(containerName.c_str(), - hostname.c_str()); - cerr << "---------" << _containerName << "----------" << endl; + hostname.c_str()); + std::cerr << "---------" << _containerName << "----------" << std::endl; ns->Register(pCont, _containerName.c_str()); pman->activate(); orb->run(); + PyGILState_Ensure(); + //Delete python container that destroy orb from python (pyCont._orb.destroy()) + Py_Finalize(); + delete ns; } catch (PaCO::PACO_Exception& e) { diff --git a/src/ParallelContainer/SALOME_ParallelContainerProxyMpi.cxx b/src/ParallelContainer/SALOME_ParallelContainerProxyMpi.cxx index 49bb1899f..9c0bdbba1 100644 --- a/src/ParallelContainer/SALOME_ParallelContainerProxyMpi.cxx +++ b/src/ParallelContainer/SALOME_ParallelContainerProxyMpi.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME ParallelContainerProxyMpi : Launching the proxy of a MPI PaCO++ object // File : SALOME_ParallelContainerProxyMpi.cxx // Author : André Ribes, EDF @@ -37,28 +38,75 @@ //#include "SALOME_ComponentPaCO_Engines_Container_server.h" #include "SALOME_ParallelContainerProxy_i.hxx" #include -#include +#include #include #include "SALOME_NamingService.hxx" #include "utilities.h" +#include "Basics_Utils.hxx" #include "Utils_ORB_INIT.hxx" #include "Utils_SINGLETON.hxx" #include "SALOMETraceCollector.hxx" #include "OpUtil.hxx" -using namespace std; -#ifdef DEBUG_PARALLEL +#include "Container_init_python.hxx" + +#ifdef _DEBUG_ #include + +typedef void (*sighandler_t)(int); +sighandler_t setsig(int sig, sighandler_t handler) +{ + struct sigaction context, ocontext; + context.sa_handler = handler; + sigemptyset(&context.sa_mask); + context.sa_flags = 0; + if (sigaction(sig, &context, &ocontext) == -1) + return SIG_ERR; + return ocontext.sa_handler; +} + +void AttachDebugger() +{ + if(getenv ("DEBUGGER")) + { + std::stringstream exec; + exec << "$DEBUGGER SALOME_ParallelContainerProxyMpi " << getpid() << "&"; + std::cerr << exec.str() << std::endl; + system(exec.str().c_str()); + while(1); + } +} + +void Handler(int theSigId) +{ + std::cerr << "SIGSEGV: " << std::endl; + AttachDebugger(); + //to exit or not to exit + exit(1); +} + +void terminateHandler(void) +{ + std::cerr << "Terminate: not managed exception !" << std::endl; + AttachDebugger(); +} + +void unexpectedHandler(void) +{ + std::cerr << "Unexpected: unexpected exception !" << std::endl; + AttachDebugger(); +} + void handler(int t) { - cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl; - cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl; - cerr << "SIGSEGV in :" << getpid() << endl; - cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl; - cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl; + std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; + std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; + std::cerr << "SIGSEGV in :" << getpid() << std::endl; + std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; + std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; while (1) {} } #endif @@ -67,7 +115,7 @@ int main(int argc, char* argv[]) { INFOS("Launching a parallel Mpi proxy container"); -#ifdef DEBUG_PARALLEL +#ifdef _DEBUG_ signal(SIGSEGV, handler); #endif @@ -75,6 +123,18 @@ int main(int argc, char* argv[]) int provided; MPI_Init_thread(&argc, &argv, MPI_THREAD_SERIALIZED ,&provided); CORBA::ORB_var orb = CORBA::ORB_init(argc, argv); + KERNEL_PYTHON::init_python(argc,argv); + +#ifdef _DEBUG_ + if(getenv ("DEBUGGER")) + { + std::cerr << "Unexpected: unexpected exception !" << std::endl; + setsig(SIGSEGV,&Handler); + //set_terminate(&terminateHandler); + set_terminate(__gnu_cxx::__verbose_terminate_handler); + set_unexpected(&unexpectedHandler); + } +#endif std::string containerName(""); containerName = argv[1]; @@ -95,37 +155,43 @@ int main(int argc, char* argv[]) #endif SALOME_NamingService * ns = new SALOME_NamingService(CORBA::ORB::_duplicate(orb)); -// Engines::Container_proxy_impl * proxy = -// new Engines::Container_proxy_impl(orb, -// new paco_omni_fabrique()); - Container_proxy_impl_final * proxy = - new Container_proxy_impl_final(orb, - new paco_omni_fabrique()); // PaCO++ code paco_fabrique_manager* pfm = paco_getFabriqueManager(); - pfm->register_com("mpi", new paco_mpi_fabrique()); - MPI_Comm group = MPI_COMM_WORLD; - proxy->setLibCom("mpi", &group); + pfm->register_com("dummy", new paco_dummy_fabrique()); pfm->register_thread("omnithread", new paco_omni_fabrique()); + + Container_proxy_impl_final * proxy = new Container_proxy_impl_final(orb, + pfm->get_thread("omnithread"), + root_poa, + containerName); + + // PaCO++ code + proxy->setLibCom("dummy", proxy); proxy->setLibThread("omnithread"); PaCO::PacoTopology_t serveur_topo; serveur_topo.total = nb_nodes; proxy->setTopology(serveur_topo); // Activation - PortableServer::ObjectId_var _id = root_poa->activate_object(proxy); - obj = root_poa->id_to_reference(_id); + //PortableServer::ObjectId_var _id = root_poa->activate_object(proxy); + //obj = root_poa->id_to_reference(_id); + obj = proxy->_this(); // in the NamingService - string hostname = Kernel_Utils::GetHostname(); + std::string hostname = Kernel_Utils::GetHostname(); Engines::Container_var pCont = Engines::Container::_narrow(obj); - string _containerName = ns->BuildContainerNameForNS(containerName.c_str(), - hostname.c_str()); - cerr << "---------" << _containerName << "----------" << endl; + std::string _containerName = ns->BuildContainerNameForNS(containerName.c_str(), + hostname.c_str()); + std::cerr << "---------" << _containerName << "----------" << std::endl; ns->Register(pCont, _containerName.c_str()); pman->activate(); orb->run(); + PyGILState_Ensure(); + //Delete python container that destroy orb from python (pyCont._orb.destroy()) + Py_Finalize(); + MPI_Finalize(); + delete ns; } catch (PaCO::PACO_Exception& e) { @@ -152,9 +218,6 @@ int main(int argc, char* argv[]) { INFOS("Caught unknown exception."); } - - MPI_Finalize(); - return 0 ; } diff --git a/src/ParallelContainer/SALOME_ParallelContainerProxy_i.cxx b/src/ParallelContainer/SALOME_ParallelContainerProxy_i.cxx index dfdcab72d..258931d90 100644 --- a/src/ParallelContainer/SALOME_ParallelContainerProxy_i.cxx +++ b/src/ParallelContainer/SALOME_ParallelContainerProxy_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME_ParallelContainerProxy : implementation of container and engine for Parallel Kernel // File : SALOME_ParallelContainerProxy_i.cxx // Author : André RIBES, EDF @@ -26,19 +27,395 @@ #include "SALOME_ParallelContainerProxy_i.hxx" Container_proxy_impl_final::Container_proxy_impl_final(CORBA::ORB_ptr orb, - paco_fabrique_thread * fab_thread, - bool is_a_return_proxy) : + paco_fabrique_thread * fab_thread, + PortableServer::POA_ptr poa, + std::string containerName, + bool is_a_return_proxy) : + Engines::PACO_Container_proxy_impl(orb, fab_thread, is_a_return_proxy), Engines::Container_proxy_impl(orb, fab_thread, is_a_return_proxy), InterfaceManager_impl(orb, fab_thread, is_a_return_proxy) -{} +{ + _numInstance = 0; + _hostname = Kernel_Utils::GetHostname(); + _containerName = _NS->BuildContainerNameForNS(containerName.c_str(), _hostname.c_str()); + _poa = PortableServer::POA::_duplicate(poa); + + _fab_thread = fab_thread; + + // Add CORBA object to the poa + _id = _poa->activate_object(this); + this->_remove_ref(); + + // Init SALOME Naming Service + _NS = new SALOME_NamingService(); + _NS->init_orb(_orb); + + // Init Python container part + CORBA::Object_var container_node = _poa->id_to_reference(*_id); + CORBA::String_var sior = _orb->object_to_string(container_node); + std::string myCommand="pyCont = SALOME_Container.SALOME_Container_i('"; + myCommand += _containerName + "','"; + myCommand += sior; + myCommand += "')\n"; + Py_ACQUIRE_NEW_THREAD; + PyRun_SimpleString("import SALOME_Container\n"); + PyRun_SimpleString((char*)myCommand.c_str()); + Py_RELEASE_NEW_THREAD; +} + +Container_proxy_impl_final:: ~Container_proxy_impl_final() { + if (_id) + delete _id; + if (_NS) + delete _NS; -Container_proxy_impl_final:: ~Container_proxy_impl_final() {} + // _fab_thread not deleted beacause fab_thread is managed + // by paco_fabrique_manager +} void Container_proxy_impl_final::Shutdown() { + // We Start by destroying all the parallel object + std::list::iterator itm; + for (itm = _par_obj_inst_list.begin(); itm != _par_obj_inst_list.end(); itm++) + { + try + { + ((*itm).proxy_corba_ref)->destroy(); + } + catch(const CORBA::Exception& e) + { + // ignore this entry and continue + } + catch(...) + { + // ignore this entry and continue + } + + // Destroy proxy object... parallel object nodes are + // destroyed into the Shutdown of each container nodes + _poa->deactivate_object(*((*itm).proxy_id)); + if ((*itm).proxy_id) + delete (*itm).proxy_id; + if ((*itm).proxy_regist) + delete (*itm).proxy_regist; + } + + // We call shutdown in each node + for (CORBA::ULong i = 0; i < _infos.nodes.length(); i++) + { + MESSAGE("Shutdown work node : " << i); + CORBA::Object_var object = _orb->string_to_object(_infos.nodes[i]); + Engines::Container_var node = Engines::Container::_narrow(object); + if (!CORBA::is_nil(node)) + { + try + { + node->Shutdown(); + MESSAGE("Shutdown done node : " << i); + } + catch (...) + { + INFOS("Exception catch during Shutdown of node : " << i); + } + } + else + { + INFOS("Cannot shutdown node " << i << " ref is nil !"); + } + } + INFOS("Shutdown Parallel Proxy"); + _NS->Destroy_FullDirectory(_containerName.c_str()); + _NS->Destroy_Name(_containerName.c_str()); if(!CORBA::is_nil(_orb)) _orb->shutdown(0); } +// On intercepte cette méthode pour pouvoir ensuite +// déterminer si on doit créer une instance sequentielle +// ou parallèle d'un composant dans la méthode create_component_instance +CORBA::Boolean +Container_proxy_impl_final::load_component_Library(const char* componentName, CORBA::String_out reason) +{ + MESSAGE("Begin of load_component_Library on proxy : " << componentName); + reason=CORBA::string_dup(""); + + std::string aCompName = componentName; + + CORBA::Boolean ret = true; + if (_libtype_map.count(aCompName) == 0) + { + _numInstanceMutex.lock(); // lock to be alone + + // Default lib is seq + _libtype_map[aCompName] = "seq"; + + // --- try dlopen C++ component + // If is not a C++ or failed then is maybe + // a seq component... + + MESSAGE("Try to load C++ component"); +#ifndef WIN32 + std::string impl_name = string ("lib") + aCompName + string("Engine.so"); +#else + std::string impl_name = aCompName + string("Engine.dll"); +#endif + void* handle; +#ifndef WIN32 + handle = dlopen( impl_name.c_str() , RTLD_LAZY ) ; +#else + handle = dlopen( impl_name.c_str() , 0 ) ; +#endif + if ( handle ) + { + _library_map[impl_name] = handle; + MESSAGE("Library " << impl_name << " loaded"); + + //Test if lib could contain a parallel component + + std::string paco_test_fct_signature = aCompName + std::string("_isAPACO_Component"); + INFOS("SIG is : " << paco_test_fct_signature); + PACO_TEST_FUNCTION paco_test_fct = NULL; +#ifndef WIN32 + paco_test_fct = (PACO_TEST_FUNCTION)dlsym(handle, paco_test_fct_signature.c_str()); +#else + paco_test_fct = (PACO_TEST_FUNCTION)GetProcAddress((HINSTANCE)handle, paco_test_fct_signature.c_str()); +#endif + if (paco_test_fct) + { + // PaCO Component found + MESSAGE("PACO LIB FOUND"); + _libtype_map[aCompName] = "par"; + } + else + { + MESSAGE("SEQ LIB FOUND"); +#ifndef WIN32 + MESSAGE("dlerror() result is : " << dlerror()); +#endif + } + } + else + { + MESSAGE("Error in importing Cpp component : " << impl_name); +#ifndef WIN32 + MESSAGE("dlerror() result is : " << dlerror()); +#endif + + MESSAGE("Try to import Python component "<string_to_object(_infos.nodes[i]); + Engines::Container_var node = Engines::Container::_narrow(object); + if (!CORBA::is_nil(node)) + { + char* reason; + try + { + node->load_component_Library(componentName,reason); + MESSAGE("Call load_component_Library done node : " << i); + CORBA::string_free(reason); + } + catch (...) + { + INFOS("Exception catch during load_component_Library of node : " << i); + CORBA::string_free(reason); + ret = false; + } + } + else + { + INFOS("Cannot call load_component_Library node " << i << " ref is nil !"); + ret = false; + } + } + } + + // If ret is false -> lib is not loaded ! + if (!ret) + { + INFOS("Cannot call load_component_Library " << aCompName); + _libtype_map.erase(aCompName); + } + return ret; +} + +Engines::EngineComponent_ptr +Container_proxy_impl_final::create_component_instance(const char* componentName, ::CORBA::Long studyId) +{ + Engines::FieldsDict_var env = new Engines::FieldsDict; + char* reason; + Engines::EngineComponent_ptr compo = create_component_instance_env(componentName, studyId, env, reason); + CORBA::string_free(reason); + return compo; +} + +// Il y a deux cas : +// Composant sequentiel -> on le créer sur le noeud 0 (on pourrait faire une répartition de charge) +// Composant parallèle -> création du proxy ici puis appel de la création de chaque objet participant +// au composant parallèle +Engines::EngineComponent_ptr +Container_proxy_impl_final::create_component_instance_env(const char* componentName, ::CORBA::Long studyId, + const Engines::FieldsDict& env, CORBA::String_out reason) +{ + reason=CORBA::string_dup(""); + + std::string aCompName = componentName; + if (_libtype_map.count(aCompName) == 0) + { + // Component is not loaded ! + INFOS("Proxy: component is not loaded ! : " << aCompName); + return Engines::EngineComponent::_nil(); + } + + // If it is a sequential component + if (_libtype_map[aCompName] == "seq") + { + _numInstanceMutex.lock(); // lock on the instance number + _numInstance++; + _numInstanceMutex.unlock(); + Engines::PACO_Container_proxy_impl::updateInstanceNumber(); + return Engines::Container_proxy_impl::create_component_instance(componentName, studyId); + } + + // Parallel Component ! + Engines::EngineComponent_var component_proxy = Engines::EngineComponent::_nil(); + + // On commence par créer le proxy +#ifndef WIN32 + std::string impl_name = string ("lib") + aCompName + string("Engine.so"); +#else + std::string impl_name = aCompName + string("Engine.dll"); +#endif + void* handle = _library_map[impl_name]; + std::string factory_name = aCompName + std::string("EngineProxy_factory"); + + MESSAGE("Creating component proxy : " << factory_name); + FACTORY_FUNCTION component_proxy_factory = (FACTORY_FUNCTION) dlsym(handle, factory_name.c_str()); + + if (!component_proxy_factory) + { + INFOS("Can't resolve symbol: " + factory_name); +#ifndef WIN32 + INFOS("dlerror() result is : " << dlerror()); +#endif + return Engines::EngineComponent::_nil() ; + } + try { + _numInstanceMutex.lock() ; // lock on the instance number + _numInstance++ ; + int numInstance = _numInstance ; + _numInstanceMutex.unlock() ; + + char aNumI[12]; + sprintf( aNumI , "%d" , numInstance ) ; + string instanceName = aCompName + "_inst_" + aNumI ; + string component_registerName = _containerName + "/" + instanceName; + + // --- Instanciate required CORBA object + Container_proxy_impl_final::proxy_object * proxy = new Container_proxy_impl_final::proxy_object(); + + proxy->proxy_id = (component_proxy_factory) (_orb, + _fab_thread, + _poa, + _id, + &(proxy->proxy_regist), + instanceName.c_str(), + _parallel_object_topology.total); + + // --- get reference & servant from id + CORBA::Object_var obj = _poa->id_to_reference(*(proxy->proxy_id)); + component_proxy = Engines::EngineComponent::_narrow(obj); + proxy->proxy_corba_ref = component_proxy; + + if (!CORBA::is_nil(component_proxy)) + { + _cntInstances_map[impl_name] += 1; + _par_obj_inst_list.push_back(*proxy); + delete proxy; + + // --- register the engine under the name + // containerName(.dir)/instanceName(.object) + _NS->Register(component_proxy , component_registerName.c_str()) ; + MESSAGE(component_registerName.c_str() << " bound" ) ; + } + else + { + INFOS("The factory returns a nil object !"); + return Engines::EngineComponent::_nil(); + } + + } + catch (...) + { + INFOS( "Exception catched in Proxy creation" ); + return Engines::EngineComponent::_nil(); + } + + // Create on each node a work node + for (CORBA::ULong i = 0; i < _infos.nodes.length(); i++) + { + MESSAGE("Call create_paco_component_node_instance on work node : " << i); + CORBA::Object_var object = _orb->string_to_object(_infos.nodes[i]); + Engines::PACO_Container_var node = Engines::PACO_Container::_narrow(object); + if (!CORBA::is_nil(node)) + { + try + { + node->create_paco_component_node_instance(componentName, _containerName.c_str(), studyId); + MESSAGE("Call create_paco_component_node_instance done on node : " << i); + } + catch (SALOME::SALOME_Exception & ex) + { + INFOS("SALOME_EXCEPTION : " << ex.details.text); + return Engines::EngineComponent::_nil(); + } + catch (...) + { + INFOS("Unknown Exception catch during create_paco_component_node_instance on node : " << i); + return Engines::EngineComponent::_nil(); + } + } + else + { + INFOS("Cannot call create_paco_component_node_instance on node " << i << " ref is nil !"); + return Engines::EngineComponent::_nil(); + } + } + + // Start Parallel object + PaCO::InterfaceManager_var paco_proxy = PaCO::InterfaceManager::_narrow(component_proxy); + paco_proxy->start(); + + return component_proxy; +} diff --git a/src/ParallelContainer/SALOME_ParallelContainerProxy_i.hxx b/src/ParallelContainer/SALOME_ParallelContainerProxy_i.hxx index c35cddd6c..3851cdf29 100644 --- a/src/ParallelContainer/SALOME_ParallelContainerProxy_i.hxx +++ b/src/ParallelContainer/SALOME_ParallelContainerProxy_i.hxx @@ -1,45 +1,98 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SALOME_ParallelContainerProxy : implementation of container and engine for Parallel Kernel // File : SALOME_ParallelContainerProxy_i.hxx // Author : André RIBES, EDF -// + #ifndef _SALOME_PARALLEL_CONTAINER_PROXY_I_HXX_ #define _SALOME_PARALLEL_CONTAINER_PROXY_I_HXX_ #include "utilities.h" -#include "SALOME_ComponentPaCO_Engines_Container_server.h" +#include "Basics_Utils.hxx" +#include "SALOME_PACOExtensionPaCO_Engines_PACO_Container_server.hxx" +#include "SALOME_ParallelGlobalProcessVar_i.hxx" +#include "SALOME_NamingService.hxx" +#include "RegistryConnexion.hxx" +#include +#include +#include + +#include +#include "Container_init_python.hxx" class Container_proxy_impl_final : - public Engines::Container_proxy_impl + virtual public Engines::PACO_Container_proxy_impl, + virtual public ParallelGlobalProcessVar_i { public: Container_proxy_impl_final(CORBA::ORB_ptr orb, - paco_fabrique_thread * fab_thread, - bool is_a_return_proxy = false); + paco_fabrique_thread * fab_thread, + PortableServer::POA_ptr poa, + std::string containerName, + bool is_a_return_proxy = false); virtual ~Container_proxy_impl_final(); virtual void Shutdown(); + + virtual ::CORBA::Boolean load_component_Library(const char* componentName,CORBA::String_out reason); + virtual Engines::EngineComponent_ptr create_component_instance (const char* componentName, + ::CORBA::Long studyId); + virtual Engines::EngineComponent_ptr create_component_instance_env (const char* componentName, + CORBA::Long studyId, // 0 for multiStudy + const Engines::FieldsDict& env, + CORBA::String_out reason); + + private: + std::map _libtype_map; // libname -> libtype (seq ou par) + + struct proxy_object + { + Engines::EngineComponent_var proxy_corba_ref; + PortableServer::ObjectId * proxy_id; + RegistryConnexion * proxy_regist; + }; + + // Cette liste contient les references vers les différentes + // instances d'objets parallèles. + std::list _par_obj_inst_list; + + // Fonction de test pour savoir si les objets de la bib sont + // parallèles ou sequentiels + typedef void (*PACO_TEST_FUNCTION) (); + typedef PortableServer::ObjectId * (*FACTORY_FUNCTION) (CORBA::ORB_ptr, + paco_fabrique_thread *, + PortableServer::POA_ptr, + PortableServer::ObjectId *, + RegistryConnexion **, + const char *, + int); + int _numInstance; + std::string _hostname; + std::string _containerName; + PortableServer::POA_var _poa; + PortableServer::ObjectId * _id; + SALOME_NamingService *_NS; + + paco_fabrique_thread * _fab_thread; }; #endif diff --git a/src/ParallelContainer/SALOME_ParallelContainer_i.cxx b/src/ParallelContainer/SALOME_ParallelContainer_i.cxx index 52f5e7070..d4a30c8c8 100644 --- a/src/ParallelContainer/SALOME_ParallelContainer_i.cxx +++ b/src/ParallelContainer/SALOME_ParallelContainer_i.cxx @@ -1,63 +1,56 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SALOME_ParallelContainer : implementation of container and engine for ParallelKernel // File : SALOME_ParallelContainer_i.cxx -// Author : Andr� RIBES, EDF -// Author : Paul RASCLE, EDF - MARC TAJCHMAN, CEA -// -#include -#ifndef WIN32 -#else -#include -#endif -#include "SALOME_ParallelContainer_i.hxx" +// Author : André RIBES, EDF +#include "SALOME_ParallelContainer_i.hxx" #include "SALOME_Component_i.hxx" - #include "SALOME_FileRef_i.hxx" #include "SALOME_FileTransfer_i.hxx" #include "SALOME_NamingService.hxx" #include "OpUtil.hxx" +#include "utilities.h" +#include "Basics_Utils.hxx" #include #include #ifndef WIN32 +#include #include #include #else -#include "../../adm/win32/SALOME_WNT.hxx" #include #include +#include int SIGUSR1 = 1000; #endif #include -#include "utilities.h" -using namespace std; -bool _Sleeping = false ; +#include +#include "Container_init_python.hxx" -// Containers with name FactoryServer are started via rsh in LifeCycleCORBA -// Other Containers are started via start_impl of FactoryServer + +bool _Sleeping = false ; extern "C" {void ActSigIntHandler() ; } #ifndef WIN32 @@ -66,64 +59,69 @@ extern "C" {void SigIntHandler(int, siginfo_t *, void *) ; } extern "C" {void SigIntHandler( int ) ; } #endif - -map Engines_Parallel_Container_i::_cntInstances_map; -map Engines_Parallel_Container_i::_library_map; -map Engines_Parallel_Container_i::_toRemove_map; -omni_mutex Engines_Parallel_Container_i::_numInstanceMutex ; - -//============================================================================= -/*! - * Default constructor, not for use +/*! \class Engines_Parallel_Container_i + * \brief C++ implementation of Engines::Container interface for parallel + * container implemented with PaCO++ */ -//============================================================================= - -Engines_Parallel_Container_i::Engines_Parallel_Container_i (CORBA::ORB_ptr orb, - char * ior, - int rank) : - InterfaceParallel_impl(orb,ior,rank), - Engines::Container_serv(orb,ior,rank), - _numInstance(0) -{ -} //============================================================================= /*! - * Construtor to use + * Construtor */ //============================================================================= Engines_Parallel_Container_i::Engines_Parallel_Container_i (CORBA::ORB_ptr orb, - char * ior, - int rank, - PortableServer::POA_ptr poa, - char *containerName , - int argc , char* argv[], - bool activAndRegist, - bool isServantAloneInProcess - ) : + char * ior, + int rank, + PortableServer::POA_ptr poa, + std::string containerName, + bool isServantAloneInProcess) : InterfaceParallel_impl(orb,ior,rank), + Engines::PACO_Container_serv(orb,ior,rank), + Engines::PACO_Container_base_serv(orb,ior,rank), Engines::Container_serv(orb,ior,rank), + Engines::Container_base_serv(orb,ior,rank), _numInstance(0),_isServantAloneInProcess(isServantAloneInProcess) { - _pid = (long)getpid(); - - if(activAndRegist) - ActSigIntHandler() ; - - _argc = argc ; - _argv = argv ; - - string hostname = Kernel_Utils::GetHostname(); - - _orb = CORBA::ORB::_duplicate(orb) ; - _poa = PortableServer::POA::_duplicate(poa) ; + // Members init + _pid = getpid(); + _hostname = Kernel_Utils::GetHostname(); + _orb = CORBA::ORB::_duplicate(orb); + _poa = PortableServer::POA::_duplicate(poa); + + // Add CORBA object to the poa + _id = _poa->activate_object(this); + this->_remove_ref(); + CORBA::Object_var container_node = _poa->id_to_reference(*_id); + + // Adding this servant to SALOME _NS = new SALOME_NamingService(); - _NS->init_orb( CORBA::ORB::_duplicate(_orb) ); - _containerName = _NS->BuildContainerNameForNS(containerName, hostname.c_str()); - + _NS->init_orb(_orb); + _containerName = _NS->BuildContainerNameForNS(containerName.c_str(), _hostname.c_str()); + + // Ajout du numero de noeud + char node_number[12]; + sprintf(node_number, "%d", getMyRank()); + _containerName = _containerName + node_number; + + // Init Python container part + CORBA::String_var sior = _orb->object_to_string(container_node); + std::string myCommand="pyCont = SALOME_Container.SALOME_Container_i('"; + myCommand += _containerName + "','"; + myCommand += sior; + myCommand += "')\n"; + Py_ACQUIRE_NEW_THREAD; + PyRun_SimpleString("import SALOME_Container\n"); + PyRun_SimpleString((char*)myCommand.c_str()); + Py_RELEASE_NEW_THREAD; + + // Init FileTransfer service fileTransfer_i* aFileTransfer = new fileTransfer_i(); - _fileTransfer = Engines::fileTransfer::_narrow(aFileTransfer->_this()); + _fileTransfer = aFileTransfer->_this(); + aFileTransfer->_remove_ref(); + + // Some signal handlers + ActSigIntHandler(); } //============================================================================= @@ -135,10 +133,14 @@ Engines_Parallel_Container_i::Engines_Parallel_Container_i (CORBA::ORB_ptr orb, Engines_Parallel_Container_i::~Engines_Parallel_Container_i() { MESSAGE("Container_i::~Container_i()"); - delete _id; + if (_id) + delete _id; + if(_NS) + delete _NS; } //============================================================================= +//! Get container name /*! * CORBA attribute: Container name (see constructor) */ @@ -150,6 +152,42 @@ char* Engines_Parallel_Container_i::name() } //============================================================================= +//! Get container working directory +/*! + * CORBA attribute: Container working directory + */ +//============================================================================= + +char* +Engines_Parallel_Container_i::workingdir() +{ + char wd[256]; + getcwd (wd,256); + return CORBA::string_dup(wd) ; +} + +//============================================================================= +//! Get container log file name +/*! + * CORBA attribute: Container log file name + */ +//============================================================================= + +char* +Engines_Parallel_Container_i::logfilename() +{ + return CORBA::string_dup(_logfilename.c_str()) ; +} + +//! Set container log file name +void +Engines_Parallel_Container_i::logfilename(const char* name) +{ + _logfilename=name; +} + +//============================================================================= +//! Get container host name /*! * CORBA method: Get the hostName of the Container (without domain extensions) */ @@ -157,12 +195,12 @@ char* Engines_Parallel_Container_i::name() char* Engines_Parallel_Container_i::getHostName() { - string s = Kernel_Utils::GetHostname(); - MESSAGE("Engines_Parallel_Container_i::getHostName " << s); - return CORBA::string_dup(s.c_str()) ; + MESSAGE("Warning: getHostName of a parallel container returns the hostname of the first servant node"); + return CORBA::string_dup(_hostname.c_str()) ; } //============================================================================= +//! Get container PID /*! * CORBA method: Get the PID (process identification) of the Container */ @@ -170,10 +208,12 @@ char* Engines_Parallel_Container_i::getHostName() CORBA::Long Engines_Parallel_Container_i::getPID() { - return (CORBA::Long)getpid(); + MESSAGE("Warning: getPID of a parallel container returns the PID of the first servant node"); + return _pid; } //============================================================================= +//! Ping the servant to check it is still alive /*! * CORBA method: check if servant is still alive */ @@ -181,10 +221,11 @@ CORBA::Long Engines_Parallel_Container_i::getPID() void Engines_Parallel_Container_i::ping() { - MESSAGE("Engines_Parallel_Container_i::ping() pid "<< getpid()); + MESSAGE("Engines_Parallel_Container_i::ping() my pid is "<< _pid); } //============================================================================= +//! Shutdown the container /*! * CORBA method, oneway: Server shutdown. * - Container name removed from naming service, @@ -196,20 +237,46 @@ void Engines_Parallel_Container_i::ping() void Engines_Parallel_Container_i::Shutdown() { MESSAGE("Engines_Parallel_Container_i::Shutdown()"); + + /* For each seq component contained in this container + * tell it to self-destroy + */ + std::map::iterator itm; + for (itm = _listInstances_map.begin(); itm != _listInstances_map.end(); itm++) + { + try + { + itm->second->destroy(); + } + catch(const CORBA::Exception& e) + { + // ignore this entry and continue + } + catch(...) + { + // ignore this entry and continue + } + } + + // Destroy each parallel component node... + std::map::iterator i; + for (i = _par_obj_inst_map.begin(); i != _par_obj_inst_map.end(); i++) + _poa->deactivate_object(*(i->second)); + _NS->Destroy_FullDirectory(_containerName.c_str()); - //_remove_ref(); - //_poa->deactivate_object(*_id); + _NS->Destroy_Name(_containerName.c_str()); + if(_isServantAloneInProcess) { MESSAGE("Effective Shutdown of container Begins..."); - LocalTraceBufferPool* bp1 = LocalTraceBufferPool::instance(); - bp1->deleteInstance(bp1); - _orb->shutdown(0); + if(!CORBA::is_nil(_orb)) + _orb->shutdown(0); } } //============================================================================= +//! load a new component class /*! * CORBA method: load a new component class (Python or C++ implementation) * \param componentName like COMPONENT @@ -220,56 +287,90 @@ void Engines_Parallel_Container_i::Shutdown() //============================================================================= bool -Engines_Parallel_Container_i::load_component_Library(const char* componentName) +Engines_Parallel_Container_i::load_component_Library(const char* componentName, CORBA::String_out reason) { - bool ret = false; - string aCompName = componentName; - // --- try dlopen C++ component + reason=CORBA::string_dup(""); + MESSAGE("Begin of load_component_Library : " << componentName) + bool ret = false; + std::string aCompName = componentName; #ifndef WIN32 - string impl_name = string ("lib") + aCompName + string("Engine.so"); + std::string impl_name = string ("lib") + aCompName + string("Engine.so"); #else - string impl_name = aCompName + string("Engine.dll"); + std::string impl_name = aCompName + string("Engine.dll"); #endif - SCRUTE(impl_name); - _numInstanceMutex.lock(); // lock to be alone - if (_toRemove_map[impl_name]) _toRemove_map.erase(impl_name); - if (_library_map[impl_name]) + + // Check if already loaded or imported in the container + if (_toRemove_map.count(impl_name) != 0) _toRemove_map.erase(impl_name); + if (_library_map.count(impl_name) != 0) { MESSAGE("Library " << impl_name << " already loaded"); - _numInstanceMutex.unlock(); + ret = true; + } + if (_library_map.count(aCompName) != 0) + { + MESSAGE("Python component already imported"); ret = true; } - void* handle; + // --- try dlopen C++ component + if (!ret) + { + MESSAGE("Try to load C++ component"); + void* handle; #ifndef WIN32 - handle = dlopen( impl_name.c_str() , RTLD_LAZY ) ; + handle = dlopen( impl_name.c_str() , RTLD_LAZY ) ; #else - handle = dlopen( impl_name.c_str() , 0 ) ; + handle = dlopen( impl_name.c_str() , 0 ) ; #endif - if ( handle ) - { - _library_map[impl_name] = handle; - _numInstanceMutex.unlock(); - ret = true; + if ( handle ) + { + _library_map[impl_name] = handle; + MESSAGE("Library " << impl_name << " loaded"); + ret = true; + } + else + { + std::cerr << "Can't load shared library : " << impl_name << std::endl; + std::cerr << "error of dlopen: " << dlerror() << std::endl; + } } - else + + // --- try import Python component + if (!ret) { - cerr << "Can't load shared library : " << impl_name << endl; - cerr << "error dlopen: " << dlerror() << endl; - _numInstanceMutex.unlock(); - ret = false; + MESSAGE("Try to import Python component "<paco_barrier(); - + _numInstanceMutex.unlock(); return ret; } //============================================================================= +//! Create a new component instance /*! * CORBA method: Creates a new servant instance of a component. * The servant registers itself to naming service and Registry. @@ -280,65 +381,83 @@ Engines_Parallel_Container_i::load_component_Library(const char* componentName) * \return a loaded component */ //============================================================================= - -Engines::Component_ptr +Engines::EngineComponent_ptr Engines_Parallel_Container_i::create_component_instance(const char*genericRegisterName, - CORBA::Long studyId) + CORBA::Long studyId) { - cerr << "----------------- create_component_instance node : " << getMyRank() << endl; + Engines::FieldsDict_var env = new Engines::FieldsDict; + char* reason; + Engines::EngineComponent_ptr compo = create_component_instance_env(genericRegisterName,studyId,env, reason); + CORBA::string_free(reason); + return compo; +} + +//============================================================================= +//! Create a new component instance +/*! + * CORBA method: Creates a new servant instance of a component. + * The servant registers itself to naming service and Registry. + * \param genericRegisterName Name of the component instance to register + * in Registry & Name Service (without _inst_n suffix) + * \param studyId 0 for multiStudy instance, + * study Id (>0) otherwise + * \param env dict of environment variables + * \return a loaded component + */ +//============================================================================= + +Engines::EngineComponent_ptr +Engines_Parallel_Container_i::create_component_instance_env(const char*genericRegisterName, + CORBA::Long studyId, + const Engines::FieldsDict& env, + CORBA::String_out reason) +{ + MESSAGE("Begin of create_component_instance in node : " << getMyRank()); + reason=CORBA::string_dup(""); if (studyId < 0) { INFOS("studyId must be > 0 for mono study instance, =0 for multiStudy"); - return Engines::Component::_nil() ; + return Engines::EngineComponent::_nil() ; } - Engines::Component_var iobject = Engines::Component::_nil() ; - - // is it a parallel component ? - bool parallel = false; - string aCompName = genericRegisterName; - int par = aCompName.find("@PARALLEL@"); - if (par>0) { - parallel = true; - aCompName = aCompName.substr(0,par); - } - - //--- try C++ + std::string aCompName = genericRegisterName; #ifndef WIN32 - string impl_name = string ("lib") + aCompName +string("Engine.so"); + std::string impl_name = string ("lib") + aCompName +string("Engine.so"); #else - string impl_name = aCompName +string("Engine.dll"); + std::string impl_name = aCompName +string("Engine.dll"); #endif - void* handle = _library_map[impl_name]; - if ( !handle ) + _numInstanceMutex.lock(); + _numInstance++; + + // Test if the component lib is loaded + std::string type_of_lib("Not Loaded"); + void* handle = _library_map[impl_name]; + if (handle) + type_of_lib = "cpp"; + if (_library_map.count(aCompName) != 0 and !handle) + type_of_lib = "python"; + + if (type_of_lib == "Not Loaded") { - cerr << "shared library " << impl_name <<"must be loaded before instance" << endl;; - return Engines::Component::_nil() ; + std::cerr << "Component library is not loaded or imported ! lib was : " << aCompName << std::endl; + _numInstanceMutex.unlock(); + return Engines::EngineComponent::_nil(); } - else - { - if (parallel) { - // Sequential component case - // Component parallel proxy created on node 0 - iobject = createParallelInstance(aCompName, - handle, - studyId); - } - else { - // Sequential component case - iobject = createInstance(aCompName, - handle, - studyId); - } + Engines::EngineComponent_var iobject = Engines::EngineComponent::_nil(); + if (type_of_lib == "cpp") + iobject = createCPPInstance(aCompName, handle, studyId); + else + iobject = createPythonInstance(aCompName, studyId); - return iobject._retn(); - } + _numInstanceMutex.unlock(); + return iobject._retn(); } //============================================================================= +//! Find an existing (in the container) component instance /*! * CORBA method: Finds a servant instance of a component * \param registeredName Name of the component in Registry or Name Service, @@ -349,21 +468,21 @@ Engines_Parallel_Container_i::create_component_instance(const char*genericRegist */ //============================================================================= -Engines::Component_ptr Engines_Parallel_Container_i::find_component_instance( const char* registeredName, - CORBA::Long studyId) +Engines::EngineComponent_ptr Engines_Parallel_Container_i::find_component_instance( const char* registeredName, + CORBA::Long studyId) { - Engines::Component_var anEngine = Engines::Component::_nil(); - map::iterator itm =_listInstances_map.begin(); + Engines::EngineComponent_var anEngine = Engines::EngineComponent::_nil(); + std::map::iterator itm =_listInstances_map.begin(); while (itm != _listInstances_map.end()) { - string instance = (*itm).first; + std::string instance = (*itm).first; SCRUTE(instance); if (instance.find(registeredName) == 0) { anEngine = (*itm).second; if (studyId == anEngine->getStudyId()) { - return anEngine._retn(); + return anEngine._retn(); } } itm++; @@ -372,6 +491,7 @@ Engines::Component_ptr Engines_Parallel_Container_i::find_component_instance( co } //============================================================================= +//! Find or create a new component instance /*! * CORBA method: find or create an instance of the component (servant), * load a new component class (dynamic library) if required, @@ -385,35 +505,48 @@ Engines::Component_ptr Engines_Parallel_Container_i::find_component_instance( co */ //============================================================================= -Engines::Component_ptr Engines_Parallel_Container_i::load_impl( const char* genericRegisterName, - const char* componentName ) +Engines::EngineComponent_ptr Engines_Parallel_Container_i::load_impl( const char* genericRegisterName, + const char* componentName ) { - string impl_name = string ("lib") + genericRegisterName +string("Engine.so"); - Engines::Component_var iobject = Engines::Component::_nil() ; - if (load_component_Library(genericRegisterName)) - iobject = find_or_create_instance(genericRegisterName, impl_name); + Engines::EngineComponent_var iobject = Engines::EngineComponent::_nil(); + char* reason; + if (load_component_Library(genericRegisterName,reason)) + iobject = find_or_create_instance(genericRegisterName); + CORBA::string_free(reason); return iobject._retn(); } //============================================================================= +//! Remove the component instance from container /*! * CORBA method: Stops the component servant, and deletes all related objects * \param component_i Component to be removed */ //============================================================================= -void Engines_Parallel_Container_i::remove_impl(Engines::Component_ptr component_i) +void Engines_Parallel_Container_i::remove_impl(Engines::EngineComponent_ptr component_i) { - ASSERT(! CORBA::is_nil(component_i)); - string instanceName = component_i->instanceName() ; - MESSAGE("unload component " << instanceName); - _listInstances_map.erase(instanceName); - component_i->destroy() ; - _NS->Destroy_Name(instanceName.c_str()); + ASSERT(!CORBA::is_nil(component_i)); + std::string instanceName = component_i->instanceName(); + _numInstanceMutex.lock() ; // lock to be alone (stl container write) + // Test if the component is in this container + std::map::iterator itm; + itm = _listInstances_map.find(instanceName); + if (itm != _listInstances_map.end()) + { + MESSAGE("Unloading component " << instanceName); + _listInstances_map.erase(instanceName); + component_i->destroy() ; + _NS->Destroy_Name(instanceName.c_str()); + } + else + std::cerr << "WARNING !!!! component instance was not in this container !!!" << std::endl; + _numInstanceMutex.unlock() ; } //============================================================================= +//! Unload component libraries from the container /*! * CORBA method: Discharges unused libraries from the container. */ @@ -421,27 +554,31 @@ void Engines_Parallel_Container_i::remove_impl(Engines::Component_ptr component_ void Engines_Parallel_Container_i::finalize_removal() { - MESSAGE("finalize unload : dlclose"); - _numInstanceMutex.lock(); // lock to be alone + MESSAGE("Finalize removal : dlclose"); + MESSAGE("WARNING FINALIZE DOES CURRENTLY NOTHING !!!"); + // (see decInstanceCnt, load_component_Library) - map::iterator ith; - for (ith = _toRemove_map.begin(); ith != _toRemove_map.end(); ith++) - { - void *handle = (*ith).second; - string impl_name= (*ith).first; - if (handle) - { - SCRUTE(handle); - SCRUTE(impl_name); - // dlclose(handle); // SALOME unstable after ... - // _library_map.erase(impl_name); - } - } + //std::map::iterator ith; + //for (ith = _toRemove_map.begin(); ith != _toRemove_map.end(); ith++) + //{ + // void *handle = (*ith).second; + // std::string impl_name= (*ith).first; + // if (handle) + // { + // SCRUTE(handle); + // SCRUTE(impl_name); + // dlclose(handle); // SALOME unstable after ... + // _library_map.erase(impl_name); + // } + //} + + _numInstanceMutex.lock(); // lock to be alone _toRemove_map.clear(); _numInstanceMutex.unlock(); } //============================================================================= +//! Kill the container /*! * CORBA method: Kill the container process with exit(0). * To remove : never returns ! @@ -450,9 +587,9 @@ void Engines_Parallel_Container_i::finalize_removal() bool Engines_Parallel_Container_i::Kill_impl() { - MESSAGE("Engines_Parallel_Container_i::Kill() pid "<< getpid() << " containerName " - << _containerName.c_str() << " machineName " - << Kernel_Utils::GetHostname().c_str()); + MESSAGE("Engines_Parallel_Container_i::Kill() my pid is "<< _pid + << " my containerName is " << _containerName.c_str() + << " my machineName is " << _hostname.c_str()); INFOS("==============================================================="); INFOS("= REMOVE calls to Kill_impl in C++ container ="); INFOS("==============================================================="); @@ -461,7 +598,96 @@ bool Engines_Parallel_Container_i::Kill_impl() return false; } +//============================================================================= +//! Get or create a file reference object associated to a local file (to transfer it) +/*! + * CORBA method: get or create a fileRef object associated to a local file + * (a file on the computer on which runs the container server), which stores + * a list of (machine, localFileName) corresponding to copies already done. + * + * \param origFileName absolute path for a local file to copy on other + * computers + * \return a fileRef object associated to the file. + */ +//============================================================================= + +Engines::fileRef_ptr +Engines_Parallel_Container_i::createFileRef(const char* origFileName) +{ + std::string origName(origFileName); + Engines::fileRef_var theFileRef = Engines::fileRef::_nil(); + + if (origName[0] != '/') + { + INFOS("path of file to copy must be an absolute path begining with '/'"); + return Engines::fileRef::_nil(); + } + + if (CORBA::is_nil(_fileRef_map[origName])) + { + CORBA::Object_var obj=_poa->id_to_reference(*_id); + Engines::Container_var pCont = Engines::Container::_narrow(obj); + fileRef_i* aFileRef = new fileRef_i(pCont, origFileName); + theFileRef = Engines::fileRef::_narrow(aFileRef->_this()); + _numInstanceMutex.lock() ; // lock to be alone (stl container write) + _fileRef_map[origName] = theFileRef; + _numInstanceMutex.unlock() ; + } + + theFileRef = Engines::fileRef::_duplicate(_fileRef_map[origName]); + ASSERT(! CORBA::is_nil(theFileRef)); + return theFileRef._retn(); +} + //============================================================================= +/*! + * CORBA method: + * \return a reference to the fileTransfer object + */ +//============================================================================= + +Engines::fileTransfer_ptr +Engines_Parallel_Container_i::getFileTransfer() +{ + Engines::fileTransfer_var aFileTransfer + = Engines::fileTransfer::_duplicate(_fileTransfer); + return aFileTransfer._retn(); +} + + +Engines::Salome_file_ptr +Engines_Parallel_Container_i::createSalome_file(const char* origFileName) +{ + string origName(origFileName); + if (CORBA::is_nil(_Salome_file_map[origName])) + { + Salome_file_i* aSalome_file = new Salome_file_i(); + try + { + aSalome_file->setLocalFile(origFileName); + aSalome_file->recvFiles(); + } + catch (const SALOME::SALOME_Exception& e) + { + return Engines::Salome_file::_nil(); + } + + Engines::Salome_file_var theSalome_file = Engines::Salome_file::_nil(); + theSalome_file = Engines::Salome_file::_narrow(aSalome_file->_this()); + _numInstanceMutex.lock() ; // lock to be alone (stl container write) + _Salome_file_map[origName] = theSalome_file; + _numInstanceMutex.unlock() ; + } + + Engines::Salome_file_ptr theSalome_file = + Engines::Salome_file::_duplicate(_Salome_file_map[origName]); + ASSERT(!CORBA::is_nil(theSalome_file)); + return theSalome_file; +} + + +//============================================================================= +//! Finds an already existing component instance or create a new instance /*! * C++ method: Finds an already existing servant instance of a component, or * create an instance. @@ -469,7 +695,6 @@ bool Engines_Parallel_Container_i::Kill_impl() * \param genericRegisterName Name of the component instance to register * in Registry & Name Service, * (without _inst_n suffix, like "COMPONENT") - * \param componentLibraryName like "libCOMPONENTEngine.so" * \return a loaded component * * example with names: @@ -484,66 +709,45 @@ bool Engines_Parallel_Container_i::Kill_impl() */ //============================================================================= -Engines::Component_ptr -Engines_Parallel_Container_i::find_or_create_instance(string genericRegisterName, - string componentLibraryName) +Engines::EngineComponent_ptr +Engines_Parallel_Container_i::find_or_create_instance(std::string genericRegisterName) { - string aGenRegisterName = genericRegisterName; - string impl_name = componentLibraryName; - void* handle = _library_map[impl_name]; - if ( !handle ) - { - INFOS("shared library " << impl_name <<"must be loaded before instance"); - return Engines::Component::_nil() ; - } - else + Engines::EngineComponent_var iobject = Engines::EngineComponent::_nil(); + try { + std::string aGenRegisterName = genericRegisterName; // --- find a registered instance in naming service, or create - - string component_registerBase = - _containerName + "/" + aGenRegisterName; - Engines::Component_var iobject = Engines::Component::_nil() ; - try + std::string component_registerBase = _containerName + "/" + aGenRegisterName; + CORBA::Object_var obj = _NS->ResolveFirst(component_registerBase.c_str()); + if (CORBA::is_nil( obj )) { - CORBA::Object_var obj = - _NS->ResolveFirst( component_registerBase.c_str()); - if ( CORBA::is_nil( obj ) ) + iobject = create_component_instance(genericRegisterName.c_str(), + 0); // force multiStudy instance here ! + } + else + { + iobject = Engines::EngineComponent::_narrow(obj) ; + Engines_Component_i *servant = dynamic_cast(_poa->reference_to_servant(iobject)); + ASSERT(servant) + int studyId = servant->getStudyId(); + ASSERT (studyId >= 0); + if (studyId != 0) // monoStudy instance: NOK { - iobject = createInstance(genericRegisterName, - handle, - 0); // force multiStudy instance here ! + iobject = Engines::EngineComponent::_nil(); + INFOS("load_impl & find_component_instance methods " + << "NOT SUITABLE for mono study components"); } - else - { - iobject = Engines::Component::_narrow( obj ) ; - Engines_Component_i *servant = - dynamic_cast - (_poa->reference_to_servant(iobject)); - ASSERT(servant) - int studyId = servant->getStudyId(); - ASSERT (studyId >= 0); - if (studyId == 0) // multiStudy instance, OK - { - // No ReBind ! - MESSAGE(component_registerBase.c_str()<<" already bound"); - } - else // monoStudy instance: NOK - { - iobject = Engines::Component::_nil(); - INFOS("load_impl & find_component_instance methods " - << "NOT SUITABLE for mono study components"); - } - } - } - catch (...) - { - INFOS( "Container_i::load_impl catched" ) ; } - return iobject._retn(); } + catch (...) + { + INFOS( "Container_i::load_impl catched" ) ; + } + return iobject._retn(); } //============================================================================= +//! Create a new Python component instance /*! * C++ method: create a servant instance of a component. * \param genericRegisterName Name of the component instance to register @@ -563,61 +767,128 @@ Engines_Parallel_Container_i::find_or_create_instance(string genericRegisterName * component_registerName = /Containers/cli76ce/FactoryServer/COMPONENT_inst_1 */ //============================================================================= +Engines::EngineComponent_ptr +Engines_Parallel_Container_i::createPythonInstance(std::string genericRegisterName, int studyId) +{ + + Engines::EngineComponent_var iobject = Engines::EngineComponent::_nil(); + + int numInstance = _numInstance; + char aNumI[12]; + sprintf( aNumI , "%d" , numInstance ) ; + std::string instanceName = genericRegisterName + "_inst_" + aNumI ; + std::string component_registerName = _containerName + "/" + instanceName; + + Py_ACQUIRE_NEW_THREAD; + PyObject *mainmod = PyImport_AddModule("__main__"); + PyObject *globals = PyModule_GetDict(mainmod); + PyObject *pyCont = PyDict_GetItemString(globals, "pyCont"); + PyObject *result = PyObject_CallMethod(pyCont, + (char*)"create_component_instance", + (char*)"ssl", + genericRegisterName.c_str(), + instanceName.c_str(), + studyId); + const char *ior; + const char *error; + PyArg_ParseTuple(result,"ss", &ior, &error); + string iors = ior; + Py_DECREF(result); + Py_RELEASE_NEW_THREAD; + + if( iors!="" ) + { + CORBA::Object_var obj = _orb->string_to_object(iors.c_str()); + iobject = Engines::EngineComponent::_narrow(obj); + _listInstances_map[instanceName] = iobject; + } + else + std::cerr << "createPythonInstance ior is empty ! Error in creation" << std::endl; -Engines::Component_ptr -Engines_Parallel_Container_i::createInstance(string genericRegisterName, - void *handle, - int studyId) + return iobject._retn(); +} + +//============================================================================= +//! Create a new CPP component instance +/*! + * C++ method: create a servant instance of a component. + * \param genericRegisterName Name of the component instance to register + * in Registry & Name Service, + * (without _inst_n suffix, like "COMPONENT") + * \param handle loaded library handle + * \param studyId 0 for multiStudy instance, + * study Id (>0) otherwise + * \return a loaded component + * + * example with names: + * aGenRegisterName = COMPONENT (= first argument) + * _containerName = /Containers/cli76ce/FactoryServer + * factoryName = COMPONENTEngine_factory + * component_registerBase = /Containers/cli76ce/FactoryServer/COMPONENT + * instanceName = COMPONENT_inst_1 + * component_registerName = /Containers/cli76ce/FactoryServer/COMPONENT_inst_1 + */ +//============================================================================= +Engines::EngineComponent_ptr +Engines_Parallel_Container_i::createCPPInstance(std::string genericRegisterName, + void *handle, + int studyId) { - // --- find the factory + MESSAGE("Entering Engines_Parallel_Container_i::createCPPInstance"); - string aGenRegisterName = genericRegisterName; - string factory_name = aGenRegisterName + string("Engine_factory"); + // --- find the factory - SCRUTE(factory_name) ; + std::string aGenRegisterName = genericRegisterName; + std::string factory_name = aGenRegisterName + string("Engine_factory"); - typedef PortableServer::ObjectId * (*FACTORY_FUNCTION) + typedef PortableServer::ObjectId * (*FACTORY_FUNCTION_2) (CORBA::ORB_ptr, PortableServer::POA_ptr, PortableServer::ObjectId *, const char *, const char *) ; - FACTORY_FUNCTION Component_factory - = (FACTORY_FUNCTION) dlsym(handle, factory_name.c_str()); + FACTORY_FUNCTION_2 Component_factory = NULL; +#ifndef WIN32 + Component_factory = (FACTORY_FUNCTION_2)dlsym( handle, factory_name.c_str() ); +#else + Component_factory = (FACTORY_FUNCTION_2)GetProcAddress( (HINSTANCE)handle, factory_name.c_str() ); +#endif - char *error ; - if ( (error = dlerror() ) != NULL) + if (!Component_factory) { INFOS("Can't resolve symbol: " + factory_name); - SCRUTE(error); - return Engines::Component::_nil() ; +#ifndef WIN32 + INFOS("dlerror() result is : " << dlerror()); +#endif + return Engines::EngineComponent::_nil() ; } // --- create instance - Engines::Component_var iobject = Engines::Component::_nil() ; + Engines::EngineComponent_var iobject = Engines::EngineComponent::_nil() ; try { - _numInstanceMutex.lock() ; // lock on the instance number - _numInstance++ ; - int numInstance = _numInstance ; - _numInstanceMutex.unlock() ; - + int numInstance = _numInstance; char aNumI[12]; - sprintf( aNumI , "%d" , numInstance ) ; - string instanceName = aGenRegisterName + "_inst_" + aNumI ; - string component_registerName = + sprintf( aNumI , "%d" , numInstance ); + std::string instanceName = aGenRegisterName + "_inst_" + aNumI; + std::string component_registerName = _containerName + "/" + instanceName; // --- Instanciate required CORBA object - PortableServer::ObjectId *id ; //not owner, do not delete (nore use var) + PortableServer::ObjectId *id; //not owner, do not delete (nore use var) id = (Component_factory) ( _orb, _poa, _id, instanceName.c_str(), - aGenRegisterName.c_str() ) ; + aGenRegisterName.c_str() ); + if (id == NULL) + { + INFOS("Factory function returns NULL !"); + return iobject._retn(); + } // --- get reference & servant from id CORBA::Object_var obj = _poa->id_to_reference(*id); - iobject = Engines::Component::_narrow(obj) ; + iobject = Engines::EngineComponent::_narrow(obj); Engines_Component_i *servant = dynamic_cast(_poa->reference_to_servant(iobject)); @@ -625,208 +896,152 @@ Engines_Parallel_Container_i::createInstance(string genericRegisterName, servant->_remove_ref(); // compensate previous id_to_reference _listInstances_map[instanceName] = iobject; _cntInstances_map[aGenRegisterName] += 1; +#if defined(_DEBUG_) || defined(_DEBUG) bool ret_studyId = servant->setStudyId(studyId); ASSERT(ret_studyId); +#else + servant->setStudyId(studyId); +#endif // --- register the engine under the name // containerName(.dir)/instanceName(.object) - _NS->Register(iobject , component_registerName.c_str()) ; - MESSAGE( component_registerName.c_str() << " bound" ) ; + _NS->Register(iobject , component_registerName.c_str()); + MESSAGE( component_registerName.c_str() << " bound" ); } catch (...) { - INFOS( "Container_i::createInstance exception catched" ) ; + INFOS( "Container_i::createInstance exception catched" ); } return iobject._retn(); } -Engines::Component_ptr -Engines_Parallel_Container_i::createParallelInstance(string genericRegisterName, - void *handle, - int studyId) +void +Engines_Parallel_Container_i::create_paco_component_node_instance(const char* componentName, + const char* proxy_containerName, + CORBA::Long studyId) { - cerr << "----------------- createParallelInstance node : " << getMyRank() << endl; - // --- create instance - Engines::Component_var iobject = Engines::Component::_nil(); - string aGenRegisterName = genericRegisterName; - - ////////////////////////////////////////////////////////////////////////// - // 1: Proxy Step - // Node 0 create the proxy - if (getMyRank() == 0) { - // --- find the factory - string factory_name = aGenRegisterName + string("EngineProxy_factory"); - - typedef PortableServer::ObjectId * (*FACTORY_FUNCTION) - (CORBA::ORB_ptr, - paco_fabrique_thread *, - PortableServer::POA_ptr, - PortableServer::ObjectId *, - const char *, - int) ; - - FACTORY_FUNCTION Component_factory - = (FACTORY_FUNCTION) dlsym(handle, factory_name.c_str()); - - char *error ; - if ( (error = dlerror() ) != NULL) { - INFOS("Can't resolve symbol: " + factory_name); - SCRUTE(error); - return Engines::Component::_nil(); - } - try { - _numInstanceMutex.lock() ; // lock on the instance number - _numInstance++ ; - int numInstance = _numInstance ; - _numInstanceMutex.unlock() ; - - char aNumI[12]; - sprintf( aNumI , "%d" , numInstance ) ; - string instanceName = aGenRegisterName + "_inst_" + aNumI ; - string component_registerName = - _containerName + "/" + instanceName; - - // --- Instanciate required CORBA object - PortableServer::ObjectId *id ; //not owner, do not delete (nore use var) - id = (Component_factory) ( _orb, new paco_omni_fabrique(), _poa, _id, instanceName.c_str(), getTotalNode()) ; - - // --- get reference & servant from id - CORBA::Object_var obj = _poa->id_to_reference(*id); - iobject = Engines::Component::_narrow(obj) ; - - _listInstances_map[instanceName] = iobject; - _cntInstances_map[aGenRegisterName] += 1; - - // --- register the engine under the name - // containerName(.dir)/instanceName(.object) - _NS->Register(iobject , component_registerName.c_str()) ; - MESSAGE( component_registerName.c_str() << " bound" ) ; - } - catch (...) - { - INFOS( "Container_i::createParallelInstance exception catched in Proxy creation" ) ; - } - } - else { - // We have to have the same numIntance to be able to get the proxy reference - // in the nameing service. - _numInstanceMutex.lock() ; // lock on the instance number - _numInstance++ ; - // int numInstance = _numInstance ; - _numInstanceMutex.unlock() ; - } - cerr << "Node " << getMyRank() << " entering in paco_barrier()" << endl; - _my_com->paco_barrier(); - cerr << "Node " << getMyRank() << " quitting paco_barrier()" << endl; - - ////////////////////////////////////////////////////////////////////////// - // 2: Nodes Step - + // Init de la méthode char * proxy_ior; - Engines::Component_PaCO_var iobject2; + Engines::EngineComponent_PaCO_var work_node; + std::string aCompName = componentName; + std::string _proxy_containerName = proxy_containerName; +#ifndef WIN32 + string impl_name = string ("lib") + aCompName +string("Engine.so"); +#else + string impl_name = aCompName +string("Engine.dll"); +#endif + void* handle = _library_map[impl_name]; + _numInstanceMutex.lock() ; // lock on the instance number + _numInstance++ ; + int numInstance = _numInstance ; + _numInstanceMutex.unlock() ; char aNumI[12]; - sprintf( aNumI , "%d" , _numInstance ) ; - string instanceName = aGenRegisterName + "_inst_" + aNumI ; - - string component_registerName = _containerName + "/" + instanceName; - string hostname = Kernel_Utils::GetHostname(); + sprintf( aNumI , "%d" , numInstance ) ; + string instanceName = aCompName + "_inst_" + aNumI ; + // Step 1 : Get proxy ! + string component_registerName = _proxy_containerName + "/" + instanceName; CORBA::Object_var temp = _NS->Resolve(component_registerName.c_str()); - Engines::Component_var obj_proxy = Engines::Component::_narrow(temp); + Engines::EngineComponent_var obj_proxy = Engines::EngineComponent::_narrow(temp); + if (CORBA::is_nil(obj_proxy)) + { + INFOS("Proxy reference from NamingService is nil !"); + INFOS("Proxy name was : " << component_registerName); + SALOME::ExceptionStruct es; + es.type = SALOME::INTERNAL_ERROR; + es.text = "Proxy reference from NamingService is nil !"; + throw SALOME::SALOME_Exception(es); + } proxy_ior = _orb->object_to_string(obj_proxy); - // --- find the factory - string factory_name = aGenRegisterName + string("Engine_factory"); - - typedef PortableServer::ObjectId * (*FACTORY_FUNCTION) - (CORBA::ORB_ptr, char *, int, - PortableServer::POA_ptr, - PortableServer::ObjectId *, - const char *, - const char *) ; - - FACTORY_FUNCTION Component_factory - = (FACTORY_FUNCTION) dlsym(handle, factory_name.c_str()); - - char *error ; - if ( (error = dlerror() ) != NULL) + // Get factory + string factory_name = aCompName + string("Engine_factory"); + FACTORY_FUNCTION Component_factory = (FACTORY_FUNCTION) dlsym(handle, factory_name.c_str()); + if (!Component_factory) { - INFOS("Can't resolve symbol: " + factory_name); - SCRUTE(error); - return Engines::Component::_nil() ; + INFOS("Can't resolve symbol : " + factory_name); +#ifndef WIN32 + INFOS("dlerror() result is : " << dlerror()); +#endif + std::string ex_text = "Can't resolve symbol : " + factory_name; + SALOME::ExceptionStruct es; + es.type = SALOME::INTERNAL_ERROR; + es.text = CORBA::string_dup(ex_text.c_str()); + throw SALOME::SALOME_Exception(es); } + try { char aNumI2[12]; sprintf(aNumI2 , "%d" , getMyRank()) ; - string instanceName = aGenRegisterName + "_inst_node_" + aNumI2; - string component_registerName = _containerName + aNumI2 + "/" + instanceName; - - // --- Instanciate required CORBA object + std::string instanceName = aCompName + "_inst_" + aNumI + "_work_node_" + aNumI2; + std::string component_registerName = _containerName + "/" + instanceName; + // --- Instanciate work node PortableServer::ObjectId *id ; //not owner, do not delete (nore use var) - id = (Component_factory) ( _orb, proxy_ior, getMyRank(), _poa, _id, instanceName.c_str(), - aGenRegisterName.c_str() ) ; + id = (Component_factory) (_orb, proxy_ior, getMyRank(), _poa, _id, instanceName.c_str(), componentName); + CORBA::string_free(proxy_ior); // --- get reference & servant from id CORBA::Object_var obj = _poa->id_to_reference(*id); - iobject2 = Engines::Component_PaCO::_narrow(obj) ; - - // --- register the engine under the name - _NS->Register(iobject2 , component_registerName.c_str()) ; - MESSAGE( component_registerName.c_str() << " bound" ) ; + work_node = Engines::EngineComponent_PaCO::_narrow(obj) ; + if (CORBA::is_nil(work_node)) + { + INFOS("work_node reference from factory is nil !"); + SALOME::ExceptionStruct es; + es.type = SALOME::INTERNAL_ERROR; + es.text = "work_node reference from factory is nil !"; + throw SALOME::SALOME_Exception(es); + } + work_node->deploy(); + _NS->Register(work_node, component_registerName.c_str()); + _par_obj_inst_map[instanceName] = id; + MESSAGE(component_registerName.c_str() << " bound" ); } catch (...) { - INFOS( "Container_i::createParallelInstance exception catched" ) ; + INFOS("Container_i::create_paco_component_node_instance exception catched"); + SALOME::ExceptionStruct es; + es.type = SALOME::INTERNAL_ERROR; + es.text = "Container_i::create_paco_component_node_instance exception catched"; + throw SALOME::SALOME_Exception(es); } - - ////////////////////////////////////////////////////////////////////////// - // 3: Deployment Step - - iobject2->deploy(); - _my_com->paco_barrier(); - cerr << "--------- createParallelInstance : End Deploy step ----------" << endl; - if (getMyRank() == 0) { - PaCO::InterfaceManager_var proxy = PaCO::InterfaceManager::_narrow(iobject); - proxy->start(); - _my_com->paco_barrier(); - } - else - _my_com->paco_barrier(); - - return iobject._retn(); } //============================================================================= +//! Decrement component instance reference count /*! * */ //============================================================================= -void Engines_Parallel_Container_i::decInstanceCnt(string genericRegisterName) +void Engines_Parallel_Container_i::decInstanceCnt(std::string genericRegisterName) { - string aGenRegisterName =genericRegisterName; - MESSAGE("Engines_Parallel_Container_i::decInstanceCnt " << aGenRegisterName); - ASSERT(_cntInstances_map[aGenRegisterName] > 0); - _numInstanceMutex.lock(); // lock to be alone - // (see finalize_removal, load_component_Library) - _cntInstances_map[aGenRegisterName] -= 1; - SCRUTE(_cntInstances_map[aGenRegisterName]); - if (_cntInstances_map[aGenRegisterName] == 0) + if(_cntInstances_map.count(genericRegisterName) !=0 ) { - string impl_name = - Engines_Component_i::GetDynLibraryName(aGenRegisterName.c_str()); - SCRUTE(impl_name); - void* handle = _library_map[impl_name]; - ASSERT(handle); - _toRemove_map[impl_name] = handle; + std::string aGenRegisterName =genericRegisterName; + MESSAGE("Engines_Parallel_Container_i::decInstanceCnt " << aGenRegisterName); + ASSERT(_cntInstances_map[aGenRegisterName] > 0); + _numInstanceMutex.lock(); // lock to be alone + // (see finalize_removal, load_component_Library) + _cntInstances_map[aGenRegisterName] -= 1; + SCRUTE(_cntInstances_map[aGenRegisterName]); + if (_cntInstances_map[aGenRegisterName] == 0) + { + std::string impl_name = + Engines_Component_i::GetDynLibraryName(aGenRegisterName.c_str()); + SCRUTE(impl_name); + void* handle = _library_map[impl_name]; + ASSERT(handle); + _toRemove_map[impl_name] = handle; + } + _numInstanceMutex.unlock(); } - _numInstanceMutex.unlock(); } //============================================================================= +//! Indicate if container is a python one /*! * Retrieves only with container naming convention if it is a python container */ @@ -835,13 +1050,91 @@ void Engines_Parallel_Container_i::decInstanceCnt(string genericRegisterName) bool Engines_Parallel_Container_i::isPythonContainer(const char* ContainerName) { bool ret=false; - int len=strlen(ContainerName); - if(len>=2) - if(strcmp(ContainerName+len-2,"Py")==0) - ret=true; return ret; } + +// Cette méthode permet de tenir à jour le compteur des +// instances pour le container parallèle. +// En effet losrque l'on charge un composant séquentielle seul +// le compteur du noeud 0 est augmenté, il faut donc tenir les autres +// noeuds à jour. +void +Engines_Parallel_Container_i::updateInstanceNumber() +{ + if (getMyRank() != 0) + { + _numInstanceMutex.lock(); + _numInstance++; + _numInstanceMutex.unlock(); + } +} + +/*! \brief copy a file from a remote host (container) to the local host + * \param container the remote container + * \param remoteFile the file to copy locally from the remote host into localFile + * \param localFile the local file + */ +void +Engines_Parallel_Container_i::copyFile(Engines::Container_ptr container, const char* remoteFile, const char* localFile) +{ + Engines::fileTransfer_var fileTransfer = container->getFileTransfer(); + + FILE* fp; + if ((fp = fopen(localFile,"wb")) == NULL) + { + INFOS("file " << localFile << " cannot be open for writing"); + return; + } + + CORBA::Long fileId = fileTransfer->open(remoteFile); + if (fileId > 0) + { + Engines::fileBlock* aBlock; + int toFollow = 1; + int ctr=0; + while (toFollow) + { + ctr++; + SCRUTE(ctr); + aBlock = fileTransfer->getBlock(fileId); + toFollow = aBlock->length(); + SCRUTE(toFollow); + CORBA::Octet *buf = aBlock->get_buffer(); + fwrite(buf, sizeof(CORBA::Octet), toFollow, fp); + delete aBlock; + } + fclose(fp); + MESSAGE("end of transfer"); + fileTransfer->close(fileId); + } + else + { + INFOS("open reference file for copy impossible"); + } +} + +/*! \brief create a PyNode object to execute remote python code + * \param nodeName the name of the node + * \param code the python code to load + * \return the PyNode + */ +Engines::PyNode_ptr +Engines_Parallel_Container_i::createPyNode(const char* nodeName, const char* code) +{ + INFOS("Python component not yet implemented"); + Engines::PyNode_var node= Engines::PyNode::_nil(); + return node._retn(); +} + +Engines::PyScriptNode_ptr +Engines_Parallel_Container_i::createPyScriptNode(const char* nodeName, const char* cod) +{ + INFOS("Python script node not yet implemented"); + Engines::PyScriptNode_var node= Engines::PyScriptNode::_nil(); + return node._retn(); +} + //============================================================================= /*! * @@ -860,6 +1153,7 @@ void ActSigIntHandler() // (SIGINT | SIGUSR1) : // it must be only one signal ===> one call for SIGINT // and an other one for SIGUSR1 + #ifndef WIN32 if ( sigaction( SIGINT , &SigIntAct, NULL ) ) { perror("SALOME_Container main ") ; @@ -869,6 +1163,12 @@ void ActSigIntHandler() perror("SALOME_Container main ") ; exit(0) ; } + if ( sigaction( SIGUSR2 , &SigIntAct, NULL ) ) + { + perror("SALOME_Container main ") ; + exit(0) ; + } + //PAL9042 JR : during the execution of a Signal Handler (and of methods called through Signal Handlers) // use of streams (and so on) should never be used because : // streams of C++ are naturally thread-safe and use pthread_mutex_lock ===> @@ -883,11 +1183,12 @@ void ActSigIntHandler() } -void SetCpuUsed() ; +void SetCpuUsed(); +void CallCancelThread(); #ifndef WIN32 void SigIntHandler(int what , siginfo_t * siginfo , - void * toto ) { + void * toto ) { //PAL9042 JR : during the execution of a Signal Handler (and of methods called through Signal Handlers) // use of streams (and so on) should never be used because : // streams of C++ are naturally thread-safe and use pthread_mutex_lock ===> @@ -908,13 +1209,17 @@ void SigIntHandler(int what , siginfo_t * siginfo , if ( siginfo->si_signo == SIGUSR1 ) { SetCpuUsed() ; } + else if ( siginfo->si_signo == SIGUSR2 ) + { + CallCancelThread() ; + } else { _Sleeping = true ; // MESSAGE("SigIntHandler BEGIN sleeping.") ; int count = 0 ; while( _Sleeping ) { - sleep( 1 ) ; - count += 1 ; + sleep( 1 ) ; + count += 1 ; } // MESSAGE("SigIntHandler LEAVE sleeping after " << count << " s.") ; } @@ -939,8 +1244,8 @@ void SigIntHandler( int what ) { MESSAGE("SigIntHandler BEGIN sleeping.") ; int count = 0 ; while( _Sleeping ) { - Sleep( 1000 ) ; - count += 1 ; + Sleep( 1000 ) ; + count += 1 ; } MESSAGE("SigIntHandler LEAVE sleeping after " << count << " s.") ; } @@ -948,121 +1253,3 @@ void SigIntHandler( int what ) { } } #endif - -//============================================================================= -/*! - * CORBA method: get or create a fileRef object associated to a local file - * (a file on the computer on which runs the container server), which stores - * a list of (machine, localFileName) corresponding to copies already done. - * - * \param origFileName absolute path for a local file to copy on other - * computers - * \return a fileRef object associated to the file. - */ -//============================================================================= - -Engines::fileRef_ptr -Engines_Parallel_Container_i::createFileRef(const char* origFileName) -{ - string origName(origFileName); - Engines::fileRef_var theFileRef = Engines::fileRef::_nil(); - - if (origName[0] != '/') - { - INFOS("path of file to copy must be an absolute path begining with '/'"); - return Engines::fileRef::_nil(); - } - - if (CORBA::is_nil(_fileRef_map[origName])) - { - CORBA::Object_var obj=_poa->id_to_reference(*_id); - Engines::Container_var pCont = Engines::Container::_narrow(obj); - fileRef_i* aFileRef = new fileRef_i(pCont, origFileName); - theFileRef = Engines::fileRef::_narrow(aFileRef->_this()); - _numInstanceMutex.lock() ; // lock to be alone (stl container write) - _fileRef_map[origName] = theFileRef; - _numInstanceMutex.unlock() ; - } - - theFileRef = Engines::fileRef::_duplicate(_fileRef_map[origName]); - ASSERT(! CORBA::is_nil(theFileRef)); - return theFileRef._retn(); -} - -//============================================================================= -/*! - * CORBA method: - * \return a reference to the fileTransfer object - */ -//============================================================================= - -Engines::fileTransfer_ptr -Engines_Parallel_Container_i::getFileTransfer() -{ - Engines::fileTransfer_var aFileTransfer - = Engines::fileTransfer::_duplicate(_fileTransfer); - return aFileTransfer._retn(); -} - - -Engines::Salome_file_ptr -Engines_Parallel_Container_i::createSalome_file(const char* origFileName) -{ - string origName(origFileName); - if (CORBA::is_nil(_Salome_file_map[origName])) - { - Salome_file_i* aSalome_file = new Salome_file_i(); - try - { - aSalome_file->setLocalFile(origFileName); - aSalome_file->recvFiles(); - } - catch (const SALOME::SALOME_Exception& e) - { - return Engines::Salome_file::_nil(); - } - - Engines::Salome_file_var theSalome_file = Engines::Salome_file::_nil(); - theSalome_file = Engines::Salome_file::_narrow(aSalome_file->_this()); - _numInstanceMutex.lock() ; // lock to be alone (stl container write) - _Salome_file_map[origName] = theSalome_file; - _numInstanceMutex.unlock() ; - } - - Engines::Salome_file_ptr theSalome_file = - Engines::Salome_file::_duplicate(_Salome_file_map[origName]); - ASSERT(!CORBA::is_nil(theSalome_file)); - return theSalome_file; -} - -//============================================================================= -/*! - * CORBA attribute: Container working directory - */ -//============================================================================= - -char* -Engines_Parallel_Container_i::workingdir() -{ - char wd[256]; - getcwd (wd,256); - return CORBA::string_dup(wd) ; -} - -//============================================================================= -/*! - * CORBA attribute: Container log file name - */ -//============================================================================= - -char* -Engines_Parallel_Container_i::logfilename() -{ - return CORBA::string_dup(_logfilename.c_str()) ; -} - -void -Engines_Parallel_Container_i::logfilename(const char* name) -{ - _logfilename=name; -} diff --git a/src/ParallelContainer/SALOME_ParallelContainer_i.hxx b/src/ParallelContainer/SALOME_ParallelContainer_i.hxx index 1c09296f0..86cb60aac 100644 --- a/src/ParallelContainer/SALOME_ParallelContainer_i.hxx +++ b/src/ParallelContainer/SALOME_ParallelContainer_i.hxx @@ -1,35 +1,34 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SALOME_ParallelContainer : implementation of container and engine for Parallel Kernel // File : SALOME_ParallelContainer_i.hxx // Author : André RIBES, EDF -// Author : Paul RASCLE, EDF - MARC TAJCHMAN, CEA -// + #ifndef _SALOME_PARALLEL_CONTAINER_I_HXX_ #define _SALOME_PARALLEL_CONTAINER_I_HXX_ #include -#include "SALOME_ComponentPaCO_Engines_Container_server.h" +#include "SALOME_PACOExtensionPaCO_Engines_PACO_Container_server.hxx" +#include "SALOME_ParallelGlobalProcessVar_i.hxx" #include #include @@ -45,7 +44,7 @@ class SALOME_NamingService; #ifdef WIN32 -# ifdef CONTAINER_EXPORTS +# if defined CONTAINER_EXPORTS || defined SalomeParallelContainer_EXPORTS # define CONTAINER_EXPORT __declspec( dllexport ) # else # define CONTAINER_EXPORT __declspec( dllimport ) @@ -55,38 +54,50 @@ class SALOME_NamingService; #endif class CONTAINER_EXPORT Engines_Parallel_Container_i: - /* public virtual POA_Engines::Container, */ - public Engines::Container_serv, - public virtual PortableServer::RefCountServantBase + virtual public Engines::PACO_Container_serv, + virtual public ParallelGlobalProcessVar_i, + virtual public PortableServer::RefCountServantBase { public: - Engines_Parallel_Container_i(CORBA::ORB_ptr orb, char * ior, int rank); - Engines_Parallel_Container_i(CORBA::ORB_ptr orb, char * ior, int rank, - PortableServer::POA_ptr poa, - char * containerName , - int argc, char* argv[], - bool activAndRegist = true, - bool isServantAloneInProcess = true); + Engines_Parallel_Container_i(CORBA::ORB_ptr orb, + char * ior, + int rank, + PortableServer::POA_ptr poa, + std::string containerName , + bool isServantAloneInProcess = true); + virtual ~Engines_Parallel_Container_i(); // --- CORBA methods - virtual bool load_component_Library(const char* componentName); + virtual bool load_component_Library(const char* componentName, CORBA::String_out reason); - virtual Engines::Component_ptr + virtual Engines::EngineComponent_ptr create_component_instance( const char* componentName, - CORBA::Long studyId); // 0 for multiStudy + CORBA::Long studyId); // 0 for multiStudy + + virtual Engines::EngineComponent_ptr + create_component_instance_env( const char* componentName, + CORBA::Long studyId, // 0 for multiStudy + const Engines::FieldsDict& env, + CORBA::String_out reason); - Engines::Component_ptr + Engines::EngineComponent_ptr find_component_instance( const char* registeredName, - CORBA::Long studyId); // 0 for multiStudy + CORBA::Long studyId); // 0 for multiStudy - Engines::Component_ptr + Engines::EngineComponent_ptr load_impl(const char* nameToRegister, - const char* componentName); + const char* componentName); + void + create_paco_component_node_instance(const char* componentName, + const char* proxy_containerName, + CORBA::Long studyId); // 0 for multiStudy - void remove_impl(Engines::Component_ptr component_i); + void updateInstanceNumber(); + + void remove_impl(Engines::EngineComponent_ptr component_i); void finalize_removal(); virtual void ping(); @@ -98,66 +109,68 @@ public: virtual void Shutdown(); char* getHostName(); CORBA::Long getPID(); + //! Kill current container bool Kill_impl() ; // --- local C++ methods + Engines::EngineComponent_ptr + find_or_create_instance(std::string genericRegisterName); - Engines::Component_ptr - find_or_create_instance( std::string genericRegisterName, - std::string componentLibraryName); + Engines::EngineComponent_ptr + createCPPInstance(std::string genericRegisterName, + void *handle, + int studyId); - Engines::Component_ptr - createInstance(std::string genericRegisterName, - void *handle, - int studyId); - - Engines::Component_ptr - createParallelInstance(std::string genericRegisterName, - void *handle, - int studyId); + Engines::EngineComponent_ptr + createPythonInstance(std::string genericRegisterName, + int studyId); static bool isPythonContainer(const char* ContainerName); static void decInstanceCnt(std::string genericRegisterName); // --- needed for parallel components, Numerical Platon - - int getArgc() { return _argc; } - char **getArgv() { return _argv; } - void set_id(PortableServer::ObjectId * id) { _id = id;} Engines::fileRef_ptr createFileRef(const char* origFileName); Engines::fileTransfer_ptr getFileTransfer(); virtual Engines::Salome_file_ptr createSalome_file(const char* origFileName); -protected: + void copyFile(Engines::Container_ptr container, const char* remoteFile, const char* localFile); + Engines::PyNode_ptr createPyNode(const char* nodeName, const char* code); + Engines::PyScriptNode_ptr createPyScriptNode(const char* nodeName, const char* code); - static std::map _cntInstances_map; - static std::map _library_map; // library names, loaded - static std::map _toRemove_map;// library names to remove - static omni_mutex _numInstanceMutex ; // lib and instance protection - - bool _isSupervContainer; +protected: - SALOME_NamingService *_NS ; + SALOME_NamingService *_NS; + std::string _hostname; std::string _library_path; std::string _containerName; std::string _logfilename; CORBA::ORB_var _orb; PortableServer::POA_var _poa; - PortableServer::ObjectId * _id ; - int _numInstance ; - std::map _listInstances_map; - std::map _fileRef_map; - std::map _Salome_file_map; + PortableServer::ObjectId * _id; + int _numInstance; + CORBA::Long _pid; + bool _isServantAloneInProcess; Engines::fileTransfer_var _fileTransfer; - int _argc ; - char** _argv ; - long _pid; - bool _isServantAloneInProcess; + typedef std::map _listInstances_map_t; + typedef std::map _fileRef_map_t; + typedef std::map _Salome_file_map_t; + _listInstances_map_t _listInstances_map; + _fileRef_map_t _fileRef_map; + _Salome_file_map_t _Salome_file_map; + + // Cette map contient les references vers les différentes + // instances d'objets parallèles. + std::map _par_obj_inst_map; + + typedef PortableServer::ObjectId * (*FACTORY_FUNCTION) (CORBA::ORB_ptr, char *, int, + PortableServer::POA_ptr, + PortableServer::ObjectId *, + const char *, + const char *); }; #endif - diff --git a/src/ParallelContainer/SALOME_ParallelGlobalProcessVar_i.cxx b/src/ParallelContainer/SALOME_ParallelGlobalProcessVar_i.cxx new file mode 100644 index 000000000..5ce2cbf4c --- /dev/null +++ b/src/ParallelContainer/SALOME_ParallelGlobalProcessVar_i.cxx @@ -0,0 +1,38 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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 +// + +// SALOME_ParallelContainer : implementation of container and engine for ParallelKernel +// File : SALOME_ParallelContainer_i.cxx +// Author : André RIBES, EDF +// +#include "SALOME_ParallelGlobalProcessVar_i.hxx" + +// Ces variables globales de classes permettent de ne charger +// qu'une seule fois une bibliothèque dynamique. +std::map ParallelGlobalProcessVar_i::_cntInstances_map; +std::map ParallelGlobalProcessVar_i::_library_map; +std::map ParallelGlobalProcessVar_i::_toRemove_map; +omni_mutex ParallelGlobalProcessVar_i::_numInstanceMutex ; + +ParallelGlobalProcessVar_i::ParallelGlobalProcessVar_i() {} + +ParallelGlobalProcessVar_i::~ParallelGlobalProcessVar_i() {} diff --git a/src/ParallelContainer/SALOME_ParallelGlobalProcessVar_i.hxx b/src/ParallelContainer/SALOME_ParallelGlobalProcessVar_i.hxx new file mode 100644 index 000000000..1c866baf9 --- /dev/null +++ b/src/ParallelContainer/SALOME_ParallelGlobalProcessVar_i.hxx @@ -0,0 +1,60 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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 +// + +// SALOME_ParallelContainer : implementation of container and engine for Parallel Kernel +// File : SALOME_ParallelContainer_i.hxx +// Author : André RIBES, EDF +// +#ifndef _SALOME_PARALLEL_GLOBALPROCESSVAR_I_HXX_ +#define _SALOME_PARALLEL_GLOBALPROCESSVAR_I_HXX_ + +#ifdef WIN32 +# ifdef CONTAINER_EXPORTS +# define CONTAINER_EXPORT __declspec( dllexport ) +# else +# define CONTAINER_EXPORT __declspec( dllimport ) +# endif +#else +# define CONTAINER_EXPORT +#endif + +#include +#include +#include +#include + +class CONTAINER_EXPORT ParallelGlobalProcessVar_i +{ +public: + ParallelGlobalProcessVar_i(); + virtual ~ParallelGlobalProcessVar_i(); + +protected: + // Voir commentaire dans le fichier .cxx + static std::map _cntInstances_map; + static std::map _library_map; // library names, loaded + static std::map _toRemove_map;// library names to remove + static omni_mutex _numInstanceMutex ; // lib and instance protection +}; + +#endif + diff --git a/src/Registry/Makefile.am b/src/Registry/Makefile.am index 3502d99b7..1c5d12468 100644 --- a/src/Registry/Makefile.am +++ b/src/Registry/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # SALOME Registry : Registry server implementation # File : Makefile.am # Author : Guillaume Boulant (CSSI) @@ -45,7 +46,6 @@ libRegistry_la_CPPFLAGS =\ -I$(srcdir)/../SALOMELocalTrace \ -I$(srcdir)/../NamingService \ -I$(srcdir)/../Utils \ - -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ @@ -60,7 +60,11 @@ libRegistry_la_LIBADD =\ bin_PROGRAMS = SALOME_Registry_Server SALOME_Registry_Server_SOURCES = SALOME_Registry_Server.cxx SALOME_Registry_Server_LDADD =\ + $(top_builddir)/idl/libSalomeIDLKernel.la \ libRegistry.la \ + ../NamingService/libSalomeNS.la \ + ../Utils/libOpUtil.la \ + ../SALOMELocalTrace/libSALOMELocalTrace.la \ ../Basics/libSALOMEBasics.la \ @CORBA_LIBS@ SALOME_Registry_Server_CPPFLAGS =\ @@ -68,6 +72,5 @@ SALOME_Registry_Server_CPPFLAGS =\ -I$(srcdir)/../SALOMELocalTrace \ -I$(srcdir)/../NamingService \ -I$(srcdir)/../Utils \ - -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ diff --git a/src/Registry/RegistryConnexion.cxx b/src/Registry/RegistryConnexion.cxx index 2a505c764..2187f6d15 100644 --- a/src/Registry/RegistryConnexion.cxx +++ b/src/Registry/RegistryConnexion.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Registry : Registry server implementation // File : RegistryConnexion.cxx // Author : Pascale NOYRET - Antoine YESSAYAN, EDF @@ -38,124 +39,118 @@ extern "C" { # include } -using namespace std; - Registry::Components_var Connexion( int argc , char **argv , const char *ptrSessionName ) throw( CommException ) { - Registry::Components_var varComponents = 0 ; - ASSERT(ptrSessionName) ; - ASSERT(strlen(ptrSessionName)>0) ; - const char *registryName = "Registry" ; - - try - { - ORB_INIT &init = *SINGLETON_::Instance() ; - ASSERT(SINGLETON_::IsAlreadyExisting()) ; - CORBA::ORB_var &orb = init( argc , argv ) ; - - SALOME_NamingService &naming = *SINGLETON_::Instance() ; - ASSERT(SINGLETON_::IsAlreadyExisting()) ; - naming.init_orb( orb ) ; - - // Recuperation de la reference de l'objet - CORBA::Object_var object = naming.Resolve( registryName ) ; - if(CORBA::is_nil(object)) throw CommException( "unable to find the RegistryService" ) ; - - // Specialisation de l'objet generique - varComponents = Registry::Components::_narrow( object ) ; - ASSERT(! CORBA::is_nil(varComponents)) ; - } - catch( ... ) - { - throw CommException ( "NamingService Connexion Error" ) ; - } - return varComponents ; + Registry::Components_var varComponents = 0 ; + ASSERT(ptrSessionName) ; + ASSERT(strlen(ptrSessionName)>0) ; + const char *registryName = "Registry" ; + + try + { + ORB_INIT &init = *SINGLETON_::Instance() ; + ASSERT(SINGLETON_::IsAlreadyExisting()) ; + CORBA::ORB_var &orb = init( argc , argv ) ; + + SALOME_NamingService &naming = *SINGLETON_::Instance() ; + ASSERT(SINGLETON_::IsAlreadyExisting()) ; + naming.init_orb( orb ) ; + + // Recuperation de la reference de l'objet + CORBA::Object_var object = naming.Resolve( registryName ) ; + if(CORBA::is_nil(object)) throw CommException( "unable to find the RegistryService" ) ; + + // Specialisation de l'objet generique + varComponents = Registry::Components::_narrow( object ) ; + ASSERT(! CORBA::is_nil(varComponents)) ; + } + catch( ... ) + { + throw CommException ( "NamingService Connexion Error" ) ; + } + return varComponents ; } RegistryConnexion::RegistryConnexion( int argc , char **argv , const char *ior , const char *ptrSessionName, const char *componentName ): \ - _Ior(duplicate(ior)), _VarComponents( Connexion(argc,argv,ptrSessionName) ), _SessionName(ptrSessionName),_Name(""), _Id(0) + _Ior(duplicate(ior)), _VarComponents( Connexion(argc,argv,ptrSessionName) ), _SessionName(ptrSessionName),_Name(""), _Id(0) { - this->add( componentName ) ; + this->add( componentName ) ; } RegistryConnexion::RegistryConnexion( void ): _Ior(0), _VarComponents( 0 ), _Name(""), _Id(0) { - INTERRUPTION(EXIT_FAILURE) ; + INTERRUPTION(EXIT_FAILURE) ; } RegistryConnexion::~RegistryConnexion() { - BEGIN_OF("RegistryConnexion::~RegistryConnexion()" ) ; - if( _Id != 0 ) - { - ASSERT(_SessionName!="" ) ; - ASSERT(_Name!="" ) ; - _VarComponents->remove( _Id ) ; - } - _Id = 0 ; -#ifndef WIN32 - delete [] _Ior; -#else - delete [] (char*) _Ior; -#endif - _Ior = 0; - _SessionName = ""; - _Name = "" ; - END_OF("RegistryConnexion::~RegistryConnexion()" ) ; + BEGIN_OF("RegistryConnexion::~RegistryConnexion()" ) ; + if( _Id != 0 ) + { + ASSERT(_SessionName!="" ) ; + ASSERT(_Name!="" ) ; + _VarComponents->remove( _Id ) ; + } + _Id = 0 ; + delete [] (char*) _Ior; + _Ior = 0; + _SessionName = ""; + _Name = "" ; + END_OF("RegistryConnexion::~RegistryConnexion()" ) ; } void RegistryConnexion::add( const char *aName ) { - ASSERT(_SessionName!="" ) ; - ASSERT(_Name=="" ) ; - ASSERT(_Id==0 ) ; - ASSERT(aName) ; - SCRUTE(aName) ; - ASSERT(strlen( aName )>0) ; - - const Identity lesInfos( aName ) ; - Registry::Infos infos ; - infos.name = CORBA::string_dup( lesInfos.name() ) ; - infos.pid = lesInfos.pid() ; - infos.machine = CORBA::string_dup( lesInfos.host_char() ) ; - infos.adip = CORBA::string_dup( lesInfos.adip() ) ; - infos.uid = (long)lesInfos.uid() ; - infos.pwname = CORBA::string_dup( lesInfos.pwname() ) ; - infos.tc_start = lesInfos.start() ; - infos.tc_hello = 0 ; - infos.tc_end = 0 ; - infos.difftime = 0 ; - infos.cdir = CORBA::string_dup( lesInfos.rep() ) ; - infos.status = -1 ; - infos.ior = CORBA::string_dup(_Ior); - - ASSERT(!CORBA::is_nil(this->_VarComponents)) ; - - CORBA::ULong id = _VarComponents->add( infos ) ; - - SCRUTE(aName) ; SCRUTE(id) ; - ASSERT(id) ; - - _Id = id ; - _Name = aName ; - - return ; + ASSERT(_SessionName!="" ) ; + ASSERT(_Name=="" ) ; + ASSERT(_Id==0 ) ; + ASSERT(aName) ; + SCRUTE(aName) ; + ASSERT(strlen( aName )>0) ; + + const Identity lesInfos( aName ) ; + Registry::Infos infos ; + infos.name = CORBA::string_dup( lesInfos.name() ) ; + infos.pid = lesInfos.pid() ; + infos.machine = CORBA::string_dup( lesInfos.host_char() ) ; + infos.adip = CORBA::string_dup( lesInfos.adip() ) ; + infos.uid = (long)lesInfos.uid() ; + infos.pwname = CORBA::string_dup( lesInfos.pwname() ) ; + infos.tc_start = lesInfos.start() ; + infos.tc_hello = 0 ; + infos.tc_end = 0 ; + infos.difftime = 0 ; + infos.cdir = CORBA::string_dup( lesInfos.rep() ) ; + infos.status = -1 ; + infos.ior = CORBA::string_dup(_Ior); + + ASSERT(!CORBA::is_nil(this->_VarComponents)) ; + + CORBA::ULong id = _VarComponents->add( infos ) ; + + SCRUTE(aName) ; SCRUTE(id) ; + ASSERT(id) ; + + _Id = id ; + _Name = aName ; + + return ; } void RegistryConnexion::remove( void ) { - ASSERT(_Id>0) ; - ASSERT(!CORBA::is_nil(this->_VarComponents)) ; - _VarComponents->remove( _Id ) ; + ASSERT(_Id>0) ; + ASSERT(!CORBA::is_nil(this->_VarComponents)) ; + _VarComponents->remove( _Id ) ; - _Name = "" ; - _Id = 0 ; + _Name = "" ; + _Id = 0 ; - return ; + return ; } diff --git a/src/Registry/RegistryConnexion.hxx b/src/Registry/RegistryConnexion.hxx index d91c7c664..4c538aed8 100644 --- a/src/Registry/RegistryConnexion.hxx +++ b/src/Registry/RegistryConnexion.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Registry : Registry server implementation // File : RegistryConnexion.hxx // Author : Pascale NOYRET - Antoine YESSAYAN, EDF @@ -26,7 +27,7 @@ // $Header$ // /* - RegistryConnexion should be used by an engine to add or to remove a component. + RegistryConnexion should be used by an engine to add or to remove a component. */ # if !defined( __RegistryConnexion_HXX__ ) @@ -41,18 +42,18 @@ class REGISTRY_EXPORT RegistryConnexion { protected : - const char* _Ior ; // engine ior - Registry::Components_var _VarComponents ; // RegistryService reference - std::string _SessionName ; - std::string _Name ; // code name - int _Id ; // code identity returned by RegistryService - void add( const char *aName ); - void remove( void ); - RegistryConnexion( void ); + const char* _Ior ; // engine ior + Registry::Components_var _VarComponents ; // RegistryService reference + std::string _SessionName ; + std::string _Name ; // code name + int _Id ; // code identity returned by RegistryService + void add( const char *aName ); + void remove( void ); + RegistryConnexion( void ); public : - RegistryConnexion( int argc , char **argv , const char *ior , const char *ptrSessionName, const char *componentName ); - ~RegistryConnexion(); + RegistryConnexion( int argc , char **argv , const char *ior , const char *ptrSessionName, const char *componentName ); + ~RegistryConnexion(); } ; -# endif /* # if !defined( __RegistryConnexion_H__ ) */ +# endif /* # if !defined( __RegistryConnexion_H__ ) */ diff --git a/src/Registry/RegistryService.cxx b/src/Registry/RegistryService.cxx index d85e1e755..4078e9e20 100644 --- a/src/Registry/RegistryService.cxx +++ b/src/Registry/RegistryService.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Registry : Registry server implementation // File : RegistryService.cxx // Author : Pascale NOYRET - Antoine YESSAYAN, EDF @@ -38,227 +39,199 @@ extern "C" #include #else #include +#define getpid _getpid #endif -using namespace std; /* ------------------------------*/ -/* Constructeurs et Destructeurs */ +/* Constructors and Destructors */ /* ------------------------------*/ RegistryService::RegistryService( void ) : _SessionName(0), _Compteur(0) { - MESSAGE("Passage dans RegistryService::RegistryService()") ; - _orb = CORBA::ORB::_nil(); + MESSAGE("RegistryService::RegistryService()") ; + _orb = CORBA::ORB::_nil(); } - RegistryService::~RegistryService() { - BEGIN_OF("RegistryService::~RegistryService()") ; - map::iterator im; - for (im=_reg.begin();im!=_reg.end(); im++) - { -#if defined(_DEBUG_) || defined(_DEBUG) - const client_infos &lesInfos = *(*im).second ; - MESSAGE("Deletion") ; SCRUTE( lesInfos._name ) ; -#endif - _reg.erase ( im ) ; - } - ASSERT(_reg.size()==0) ; - for (im=_fin.begin();im!=_fin.end(); im++) - { -#if defined(_DEBUG_) || defined(_DEBUG) - const client_infos &lesInfos = *(*im).second ; - MESSAGE("Deletion") ; SCRUTE( lesInfos._name ) ; -#endif - _fin.erase ( im ) ; - } - ASSERT(_fin.size()==0) ; - _Compteur = -1 ; - if ( _SessionName ) - { -#ifndef WIN32 - delete [] _SessionName ; -#else - delete [] (char*)_SessionName ; -#endif - _SessionName = 0 ; - } - END_OF("RegistryService::~RegistryService()") ; + BEGIN_OF("RegistryService::~RegistryService()") ; + std::map::iterator im; + for (im=_reg.begin();im!=_reg.end(); im++) + { + MESSAGE("Delete _reg item " << im->second->_name) ; + delete im->second; + } + for (im=_fin.begin();im!=_fin.end(); im++) + { + MESSAGE("Delete _fin item " << im->second->_name) ; + delete im->second; + } + _Compteur = -1 ; + if ( _SessionName ) + { + delete [] (char*)_SessionName ; + _SessionName = 0 ; + } + END_OF("RegistryService::~RegistryService()") ; } /* ------------------------------*/ -/* Contrats IDL */ +/* IDL contracts */ /* ------------------------------*/ CORBA::ULong RegistryService::size ( void ) { - ASSERT(_SessionName) ; - ASSERT(strlen(_SessionName)>0) ; - return _reg.size() ; + ASSERT(_SessionName) ; + ASSERT(strlen(_SessionName)>0) ; + return _reg.size() ; } - CORBA::ULong RegistryService::add( const Registry::Infos & infos ) { - BEGIN_OF("RegistryService::add") ; - ASSERT(_SessionName) ; - ASSERT(strlen(_SessionName)>0) ; - client_infos *ptr_Component = new client_infos( infos ) ; - ASSERT(ptr_Component) ; - SCRUTE(ptr_Component->_name) ; - - _Compteur++; - _reg[_Compteur]=ptr_Component; - - END_OF("RegistryService::add") ; - return (CORBA::ULong)_Compteur ; + BEGIN_OF("RegistryService::add") ; + ASSERT(_SessionName) ; + ASSERT(strlen(_SessionName)>0) ; + client_infos *ptr_Component = new client_infos( infos ) ; + ASSERT(ptr_Component) ; + SCRUTE(ptr_Component->_name) ; + + _Compteur++; + _reg[_Compteur]=ptr_Component; + + END_OF("RegistryService::add") ; + return (CORBA::ULong)_Compteur ; } -#ifndef WIN32 -void RegistryService::remove( const CORBA::ULong id) -#else void RegistryService::remove( CORBA::ULong id) -#endif { - BEGIN_OF("RegistryService::remove") ; - SCRUTE(id) ; - ASSERT(_SessionName) ; - ASSERT(strlen(_SessionName)>0) ; - - ASSERT(_reg.find(id)!=_reg.end()) - _reg[id]->_status=TERMINATED; - _reg[id]->_ts_end = time(NULL) ; - - _fin[id]=_reg[id]; - SCRUTE(_fin.size()) ; - - map::iterator pos = _reg.find ( id ) ; - _reg.erase ( pos ) ; - SCRUTE(_reg.size()) ; - SCRUTE(_fin.size()) ; - - END_OF("RegistryService::remove") ; - return ; + BEGIN_OF("RegistryService::remove") ; + SCRUTE(id) ; + ASSERT(_SessionName) ; + ASSERT(strlen(_SessionName)>0) ; + + ASSERT(_reg.find(id)!=_reg.end()) + _reg[id]->_status=TERMINATED; + _reg[id]->_ts_end = time(NULL) ; + + _fin[id]=_reg[id]; + _reg.erase(id); + + SCRUTE(_reg.size()) ; + SCRUTE(_fin.size()) ; + + END_OF("RegistryService::remove") ; + return ; } -#ifndef WIN32 -void RegistryService::hello( const CORBA::ULong id ) -#else void RegistryService::hello( CORBA::ULong id ) -#endif { - BEGIN_OF("RegistryService::hello") ; - SCRUTE(id) ; - ASSERT(_SessionName) ; - ASSERT(strlen(_SessionName)>0) ; - - ASSERT(_reg.find(id)!=_reg.end()) - _reg[id]->_ts_hello = time(NULL) ; - - END_OF("RegistryService::hello") ; - return ; -} + BEGIN_OF("RegistryService::hello") ; + SCRUTE(id) ; + ASSERT(_SessionName) ; + ASSERT(strlen(_SessionName)>0) ; + ASSERT(_reg.find(id)!=_reg.end()) + _reg[id]->_ts_hello = time(NULL) ; + + END_OF("RegistryService::hello") ; + return ; +} void RegistryService::end( void ) { - ASSERT(_SessionName) ; - ASSERT(strlen(_SessionName)>0) ; - BEGIN_OF( "RegistryService::end( void )" ) ; - exit( EXIT_SUCCESS ) ; + ASSERT(_SessionName) ; + ASSERT(strlen(_SessionName)>0) ; + BEGIN_OF( "RegistryService::end( void )" ) ; + exit( EXIT_SUCCESS ) ; } - Registry::AllInfos* RegistryService::getall( void ) { - ASSERT(_SessionName) ; - ASSERT(strlen(_SessionName)>0) ; - return RegistryService::makeseq(_reg) ; + ASSERT(_SessionName) ; + ASSERT(strlen(_SessionName)>0) ; + return RegistryService::makeseq(_reg) ; } Registry::AllInfos* RegistryService::history( void ) { - ASSERT(_SessionName) ; - ASSERT(strlen(_SessionName)>0) ; - return RegistryService::makeseq(_fin) ; + ASSERT(_SessionName) ; + ASSERT(strlen(_SessionName)>0) ; + return RegistryService::makeseq(_fin) ; } -Registry::AllInfos* RegistryService::makeseq(map &mymap ) +Registry::AllInfos* RegistryService::makeseq(std::map &mymap ) { - int i=0 ; + int i=0 ; - Registry::AllInfos *all = new Registry::AllInfos ; - ASSERT(all) ; - const int RegLength = mymap.size(); - all->length(RegLength); + Registry::AllInfos *all = new Registry::AllInfos ; + ASSERT(all) ; + const int RegLength = mymap.size(); + all->length(RegLength); - map::iterator im; - for (im=mymap.begin();im!=mymap.end(); im++) + std::map::iterator im; + for (im=mymap.begin();im!=mymap.end(); im++) { - Registry::Infos &infos = (*all)[i] ; - const client_infos &lesInfos = *(*im).second ; - infos.name = CORBA::string_dup( lesInfos._name ) ; - infos.pid = lesInfos._pid ; - infos.pwname = lesInfos._pwname ; - infos.machine = CORBA::string_dup( lesInfos._machine ) ; - infos.adip = CORBA::string_dup( lesInfos._adip ) ; - infos.uid = lesInfos._uid ; - infos.tc_start = lesInfos._ts_start + lesInfos._difftime ; - infos.tc_hello = lesInfos._ts_hello + lesInfos._difftime ; - infos.tc_end = lesInfos._ts_end + lesInfos._difftime ; - infos.difftime = lesInfos._difftime ; - infos.cdir = CORBA::string_dup( lesInfos._cdir ) ; - infos.status = lesInfos._status ; - - i++; - } - - return all ; + Registry::Infos &infos = (*all)[i] ; + const client_infos &lesInfos = *(*im).second ; + infos.name = CORBA::string_dup( lesInfos._name ) ; + infos.pid = lesInfos._pid ; + infos.pwname = lesInfos._pwname ; + infos.machine = CORBA::string_dup( lesInfos._machine ) ; + infos.adip = CORBA::string_dup( lesInfos._adip ) ; + infos.uid = lesInfos._uid ; + infos.tc_start = lesInfos._ts_start + lesInfos._difftime ; + infos.tc_hello = lesInfos._ts_hello + lesInfos._difftime ; + infos.tc_end = lesInfos._ts_end + lesInfos._difftime ; + infos.difftime = lesInfos._difftime ; + infos.cdir = CORBA::string_dup( lesInfos._cdir ) ; + infos.status = lesInfos._status ; + + i++; + } + + return all ; } /* ------------------------------*/ -/* Autres */ +/* Others */ /* ------------------------------*/ RegistryService::client_infos::client_infos( const Registry::Infos &infos ):\ - _ior(duplicate(infos.ior)),\ - _name(duplicate(infos.name)),\ - _pid(infos.pid),\ - _machine(duplicate(infos.machine)),\ - _adip(duplicate(infos.adip)),\ - _uid(infos.uid),\ - _pwname(duplicate(infos.pwname)),\ - _ts_start(time(NULL)),\ - _difftime(infos.tc_start - _ts_start),\ - _cdir(duplicate(infos.cdir)),\ - _ts_hello(_ts_start),\ - _ts_end(0),\ - _status(RUNNING) + _ior(duplicate(infos.ior)),\ + _name(duplicate(infos.name)),\ + _pid(infos.pid),\ + _machine(duplicate(infos.machine)),\ + _adip(duplicate(infos.adip)),\ + _uid(infos.uid),\ + _pwname(duplicate(infos.pwname)),\ + _ts_start(time(NULL)),\ + _difftime(infos.tc_start - _ts_start),\ + _cdir(duplicate(infos.cdir)),\ + _ts_hello(_ts_start),\ + _ts_end(0),\ + _status(RUNNING) { - // SCRUTE(_ior) ; - ; } RegistryService::client_infos::~client_infos() { - delete [] (char*)_ior ; (char*&)_ior = NULL ; - delete [] (char*)_name ; (char*&)_name = NULL ; - delete [] (char*)_machine ; (char*&)_machine = NULL ; - delete [] (char*)_pwname ; (char*&)_pwname = NULL ; - delete [] (char*)_adip ; (char*&)_adip = NULL ; - delete [] (char*)_cdir ; (char*&)_cdir = NULL ; + delete [] (char*)_ior ; (char*&)_ior = NULL ; + delete [] (char*)_name ; (char*&)_name = NULL ; + delete [] (char*)_machine ; (char*&)_machine = NULL ; + delete [] (char*)_pwname ; (char*&)_pwname = NULL ; + delete [] (char*)_adip ; (char*&)_adip = NULL ; + delete [] (char*)_cdir ; (char*&)_cdir = NULL ; } void RegistryService::SessionName( const char *sessionName ) { - ASSERT(sessionName) ; - ASSERT(strlen(sessionName)>0) ; - _SessionName = duplicate(sessionName) ; - return ; + ASSERT(sessionName) ; + ASSERT(strlen(sessionName)>0) ; + _SessionName = duplicate(sessionName) ; + return ; } void RegistryService::ping() { diff --git a/src/Registry/RegistryService.hxx b/src/Registry/RegistryService.hxx index de22e1fa1..0fb91fea2 100644 --- a/src/Registry/RegistryService.hxx +++ b/src/Registry/RegistryService.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Registry : Registry server implementation // File : RegistryService.hxx // Author : Pascale NOYRET - Antoine YESSAYAN, EDF @@ -35,58 +36,63 @@ # include +#ifdef WNT +#pragma warning(disable:4275) // Disable warning interface non dll +#pragma warning(disable:4251) // Warning DLL Interface ... +#endif + class REGISTRY_EXPORT RegistryService : public POA_Registry::Components //, public PortableServer::RefCountServantBase { public : - enum Status { UNDEF=-1 , TERMINATED=0 , RUNNING=1 } ; - - class client_infos - { - protected : - const char* const _ior; - const char* const _name; - const long _pid ; - const char* const _machine; - const char* const _adip; - const long _uid; - const char* const _pwname; - const long _ts_start ; - const long _difftime; - const char* const _cdir ; - long _ts_hello ; - long _ts_end ; - Status _status; - public : - friend class RegistryService ; - - client_infos( const Registry::Infos &infos ); - ~client_infos(); - }; + enum Status { UNDEF=-1 , TERMINATED=0 , RUNNING=1 } ; + + class client_infos + { + protected : + const char* const _ior; + const char* const _name; + const long _pid ; + const char* const _machine; + const char* const _adip; + const long _uid; + const char* const _pwname; + const long _ts_start ; + const long _difftime; + const char* const _cdir ; + long _ts_hello ; + long _ts_end ; + Status _status; + public : + friend class RegistryService ; + + client_infos( const Registry::Infos &infos ); + ~client_infos(); + }; public : - RegistryService(void); - virtual ~RegistryService(void); + RegistryService(void); + virtual ~RegistryService(void); void ping(); CORBA::Long getPID(); - virtual CORBA::ULong add (const Registry::Infos & infos); - virtual CORBA::ULong size ( void ); + virtual CORBA::ULong add (const Registry::Infos & infos); + virtual CORBA::ULong size ( void ); #ifndef WIN32 - virtual void remove( const CORBA::ULong id ); - virtual void hello( const CORBA::ULong id ); + virtual void remove( const CORBA::ULong id ); + virtual void hello( const CORBA::ULong id ); #else - virtual void remove( CORBA::ULong id ); - virtual void hello( CORBA::ULong id ); + virtual void remove( CORBA::ULong id ); + virtual void hello( CORBA::ULong id ); #endif - virtual void end(void); + virtual void end(void); - virtual Registry::AllInfos *getall(void); - virtual Registry::AllInfos *history(void); + virtual Registry::AllInfos *getall(void); + virtual Registry::AllInfos *history(void); - void SessionName( const char *sessionName ) ; + void SessionName( const char *sessionName ) ; void SetOrb( CORBA::ORB_ptr orb ) { _orb = CORBA::ORB::_duplicate(orb); return; } @@ -95,12 +101,12 @@ public : protected : CORBA::ORB_var _orb; - const char *_SessionName ; - int _Compteur ; - std::map _reg ; - std::map _fin ; + const char *_SessionName ; + int _Compteur ; + std::map _reg ; + std::map _fin ; - Registry::AllInfos* makeseq(std::map &mymap ); + Registry::AllInfos* makeseq(std::map &mymap ); } ; diff --git a/src/Registry/SALOME_Registry.hxx b/src/Registry/SALOME_Registry.hxx index a4c234a29..4de6da998 100755 --- a/src/Registry/SALOME_Registry.hxx +++ b/src/Registry/SALOME_Registry.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOME_Registry.hxx // Author : Alexander A. BORODIN // Module : SALOME @@ -27,7 +28,7 @@ #define _SALOME_Registry_HXX_ #ifdef WIN32 -# ifdef REGISTRY_EXPORTS +# if defined REGISTRY_EXPORTS || defined Registry_EXPORTS # define REGISTRY_EXPORT __declspec( dllexport ) # else # define REGISTRY_EXPORT __declspec( dllimport ) diff --git a/src/Registry/SALOME_Registry_Server.cxx b/src/Registry/SALOME_Registry_Server.cxx index 766e379db..d663cce01 100644 --- a/src/Registry/SALOME_Registry_Server.cxx +++ b/src/Registry/SALOME_Registry_Server.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Registry : Registry server implementation // File : SALOME_Registry_Server.cxx // Author : Pascale NOYRET - Antoine YESSAYAN, EDF @@ -46,7 +47,6 @@ extern "C" #ifdef CHECKTIME #include #endif -using namespace std; int main( int argc , char **argv ) { @@ -58,8 +58,8 @@ int main( int argc , char **argv ) SCRUTE(argc) if( argc<3 ) { - MESSAGE("you must provide the Salome session name when you call SALOME_Registry_Server") ; - throw CommException("you must provide the Salome session name when you call SALOME_Registry_Server") ; + MESSAGE("you must provide the Salome session name when you call SALOME_Registry_Server") ; + throw CommException("you must provide the Salome session name when you call SALOME_Registry_Server") ; } const char *ptrSessionName=0 ; @@ -67,17 +67,19 @@ int main( int argc , char **argv ) for ( k=1 ; k0) ; const char *registryName = "Registry" ; long TIMESleep = 250000000; int NumberOfTries = 40; +#ifndef WIN32 int a; +#endif timespec ts_req; ts_req.tv_nsec=TIMESleep; ts_req.tv_sec=0; @@ -104,62 +106,62 @@ int main( int argc , char **argv ) { if (i!=1) #ifndef WIN32 - a=nanosleep(&ts_req,&ts_rem); + a=nanosleep(&ts_req,&ts_rem); #else Sleep(TIMESleep/1000000); #endif try - { - obj = orb->resolve_initial_references("RootPOA"); - if(!CORBA::is_nil(obj)) - poa = PortableServer::POA::_narrow(obj); - if(!CORBA::is_nil(poa)) - manager = poa->the_POAManager(); - if(!CORBA::is_nil(orb)) - theObj = orb->resolve_initial_references("NameService"); - if (!CORBA::is_nil(theObj)) - inc = CosNaming::NamingContext::_narrow(theObj); - } + { + obj = orb->resolve_initial_references("RootPOA"); + if(!CORBA::is_nil(obj)) + poa = PortableServer::POA::_narrow(obj); + if(!CORBA::is_nil(poa)) + manager = poa->the_POAManager(); + if(!CORBA::is_nil(orb)) + theObj = orb->resolve_initial_references("NameService"); + if (!CORBA::is_nil(theObj)) + inc = CosNaming::NamingContext::_narrow(theObj); + } catch( CORBA::SystemException& ) - { - MESSAGE( "Registry Server: CORBA::SystemException: Unable to contact the Naming Service" ); - } + { + MESSAGE( "Registry Server: CORBA::SystemException: Unable to contact the Naming Service" ); + } if(!CORBA::is_nil(inc)) - { - MESSAGE( "Registry Server: Naming Service was found" ); - if(EnvL==1) - { - for(int j=1; j<=NumberOfTries; j++) - { - if (j!=1) + { + MESSAGE( "Registry Server: Naming Service was found" ); + if(EnvL==1) + { + for(int j=1; j<=NumberOfTries; j++) + { + if (j!=1) #ifndef WIN32 - a=nanosleep(&ts_req, &ts_rem); + a=nanosleep(&ts_req, &ts_rem); #else - Sleep(TIMESleep/1000000); + Sleep(TIMESleep/1000000); #endif - try - { - object = inc->resolve(name); - } - catch(CosNaming::NamingContext::NotFound) - { - MESSAGE( "Registry Server: Logger Server wasn't found" ); - } - catch(...) - { - MESSAGE( "Registry Server: Unknown exception" ); - } - if (!CORBA::is_nil(object)) - { - MESSAGE( "Module Catalog Server: Logger Server was found" ); - REGISTRY=1; - break; - } - } - } - } + try + { + object = inc->resolve(name); + } + catch(CosNaming::NamingContext::NotFound) + { + MESSAGE( "Registry Server: Logger Server wasn't found" ); + } + catch(...) + { + MESSAGE( "Registry Server: Unknown exception" ); + } + if (!CORBA::is_nil(object)) + { + MESSAGE( "Module Catalog Server: Logger Server was found" ); + REGISTRY=1; + break; + } + } + } + } if ((REGISTRY==1)||((EnvL==0)&&(!CORBA::is_nil(inc)))) - break; + break; } try @@ -171,53 +173,53 @@ int main( int argc , char **argv ) varComponents = ptrRegistry->_this() ; ptrRegistry->_remove_ref(); //let poa manage registryservice deletion // The RegistryService must not already exist. - + try - { - CORBA::Object_var pipo = naming.Resolve( registryName ) ; - if (CORBA::is_nil(pipo) ) throw ServiceUnreachable() ; - MESSAGE("RegistryService servant already existing" ) ; - exit( EXIT_FAILURE ) ; - } - catch( const ServiceUnreachable &ex ) - { - } - catch( const CORBA::Exception &exx ) - { - } - string absoluteName = string("/") + registryName; + { + CORBA::Object_var pipo = naming.Resolve( registryName ) ; + if (CORBA::is_nil(pipo) ) throw ServiceUnreachable() ; + MESSAGE("RegistryService servant already existing" ) ; + exit( EXIT_FAILURE ) ; + } + catch( const ServiceUnreachable & ) + { + } + catch( const CORBA::Exception & ) + { + } + std::string absoluteName = std::string("/") + registryName; naming.Register( varComponents , absoluteName.c_str() ) ; MESSAGE("Wait client requests") ; try - { - // Activation du POA - MESSAGE("POA activation") ; - manager->activate() ; - - // Lancement de l'ORB - MESSAGE("ORB launching") ; + { + // Activation du POA + MESSAGE("POA activation") ; + manager->activate() ; + + // Lancement de l'ORB + MESSAGE("ORB launching") ; #ifdef CHECKTIME - Utils_Timer timer; - timer.Start(); - timer.Stop(); - MESSAGE("SALOME_Registry_Server.cxx - orb->run()"); - timer.ShowAbsolute(); + Utils_Timer timer; + timer.Start(); + timer.Stop(); + MESSAGE("SALOME_Registry_Server.cxx - orb->run()"); + timer.ShowAbsolute(); #endif - orb->run() ; - } - catch( const CORBA::Exception &ex ) - { - MESSAGE("System error") ; - return EXIT_FAILURE ; - } - + orb->run() ; + } + catch( const CORBA::Exception & ) + { + MESSAGE("System error") ; + return EXIT_FAILURE ; + } + } catch( const SALOME_Exception &ex ) { MESSAGE( "Communication Error : " << ex.what() ) - return EXIT_FAILURE ; + return EXIT_FAILURE ; } - + END_OF( argv[0] ) ; // delete myThreadTrace; return 0 ; diff --git a/src/ResourcesManager/Makefile.am b/src/ResourcesManager/Makefile.am index f24d8355d..b449e8251 100755 --- a/src/ResourcesManager/Makefile.am +++ b/src/ResourcesManager/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # SALOME ResourcesManager # File : Makefile.am # Author : Guillaume Boulant (CSSI) @@ -49,12 +50,10 @@ salomeinclude_HEADERS = \ # This local variable defines the list of CPPFLAGS common to all target in this package. COMMON_CPPFLAGS=\ - -I$(srcdir)/../Batch \ -I$(srcdir)/../Basics \ -I$(srcdir)/../SALOMELocalTrace \ -I$(srcdir)/../NamingService \ -I$(srcdir)/../Utils \ - -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ @LIBXML_INCLUDES@ \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ @@ -101,5 +100,6 @@ libResourcesManager_la_CPPFLAGS =\ libResourcesManager_la_LDFLAGS = -no-undefined -version-info=0:0:0 libResourcesManager_la_LIBADD =\ + ../Basics/libSALOMEBasics.la \ ../Utils/libOpUtil.la \ @LIBXML_LIBS@ diff --git a/src/ResourcesManager/ResourcesManager.cxx b/src/ResourcesManager/ResourcesManager.cxx index 5bcf6d843..23d8e781e 100644 --- a/src/ResourcesManager/ResourcesManager.cxx +++ b/src/ResourcesManager/ResourcesManager.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "ResourcesManager.hxx" #include #include @@ -27,17 +28,21 @@ #include #include #include - #include #include +#ifdef WNT +#else +#include +#endif #include #include #define MAX_SIZE_FOR_HOSTNAME 256; -using namespace std; - +static LoadRateManagerFirst first; +static LoadRateManagerCycl cycl; +static LoadRateManagerAltCycl altcycl; //============================================================================= /*! * just for test @@ -45,12 +50,17 @@ using namespace std; //============================================================================= ResourcesManager_cpp:: -ResourcesManager_cpp(const char *xmlFilePath) : - _path_resources(xmlFilePath) +ResourcesManager_cpp(const char *xmlFilePath) { + _path_resources.push_back(xmlFilePath); #if defined(_DEBUG_) || defined(_DEBUG) - cerr << "ResourcesManager_cpp constructor" << endl; + std::cerr << "ResourcesManager_cpp constructor" << std::endl; #endif + _resourceManagerMap["first"]=&first; + _resourceManagerMap["cycl"]=&cycl; + _resourceManagerMap["altcycl"]=&altcycl; + _resourceManagerMap["best"]=&altcycl; + _resourceManagerMap[""]=&altcycl; } //============================================================================= @@ -66,31 +76,73 @@ ResourcesManager_cpp(const char *xmlFilePath) : ResourcesManager_cpp::ResourcesManager_cpp() throw(ResourcesException) { -#if defined(_DEBUG_) || defined(_DEBUG) - cerr << "ResourcesManager_cpp constructor" << endl; -#endif - _isAppliSalomeDefined = (getenv("APPLI") != 0); - if(!getenv("KERNEL_ROOT_DIR")) - throw ResourcesException("you must define KERNEL_ROOT_DIR environment variable!!"); + RES_MESSAGE("ResourcesManager_cpp constructor"); + + _resourceManagerMap["first"]=&first; + _resourceManagerMap["cycl"]=&cycl; + _resourceManagerMap["altcycl"]=&altcycl; + _resourceManagerMap["best"]=&altcycl; + _resourceManagerMap[""]=&altcycl; - if (_isAppliSalomeDefined) + bool default_catalog_resource = true; + if (getenv("USER_CATALOG_RESOURCES_FILE") != 0) + { + default_catalog_resource = false; + std::string user_file(""); + user_file = getenv("USER_CATALOG_RESOURCES_FILE"); + std::ifstream ifile(user_file.c_str(), std::ifstream::in ); + if (ifile) { + // The file exists, and is open for input + _path_resources.push_back(user_file); + } + else { + default_catalog_resource = false; + RES_INFOS("Warning: USER_CATALOG_RESOURCES_FILE is set and file cannot be found.") + RES_INFOS("Warning: That's why we try to create a new one.") + std::ofstream user_catalog_file; + user_catalog_file.open(user_file.c_str()); + if (user_catalog_file.fail()) + { + RES_INFOS("Error: cannot write in the user catalog resouces files"); + RES_INFOS("Error: using default CatalogResources.xml file"); + default_catalog_resource = true; + } + else + { + user_catalog_file << "" << std::endl; + user_catalog_file << "" << std::endl; + user_catalog_file << "" << std::endl; + user_catalog_file << " " << std::endl; + user_catalog_file << "" << std::endl; + user_catalog_file.close(); + } + } + } + if (default_catalog_resource) + { + std::string default_file(""); + if (getenv("APPLI") != 0) { - _path_resources = getenv("HOME"); - _path_resources += "/"; - _path_resources += getenv("APPLI"); - _path_resources += "/CatalogResources.xml"; + default_file += getenv("HOME"); + default_file += "/"; + default_file += getenv("APPLI"); + default_file += "/CatalogResources.xml"; + _path_resources.push_back(default_file); } - - else + else { - _path_resources = getenv("KERNEL_ROOT_DIR"); - _path_resources += "/share/salome/resources/kernel/CatalogResources.xml"; + if(!getenv("KERNEL_ROOT_DIR")) + throw ResourcesException("you must define KERNEL_ROOT_DIR environment variable!! -> cannot load a CatalogResources.xml"); + default_file = getenv("KERNEL_ROOT_DIR"); + default_file += "/share/salome/resources/kernel/CatalogResources.xml"; + _path_resources.push_back(default_file); } + } - ParseXmlFile(); -#if defined(_DEBUG_) || defined(_DEBUG) - cerr << "ResourcesManager_cpp constructor end"; -#endif + _lasttime=0; + + ParseXmlFiles(); + RES_MESSAGE("ResourcesManager_cpp constructor end"); } //============================================================================= @@ -101,169 +153,148 @@ ResourcesManager_cpp::ResourcesManager_cpp() throw(ResourcesException) ResourcesManager_cpp::~ResourcesManager_cpp() { -#if defined(_DEBUG_) || defined(_DEBUG) - cerr << "ResourcesManager_cpp destructor" << endl; -#endif + RES_MESSAGE("ResourcesManager_cpp destructor"); } //============================================================================= +//! get the list of resource names fitting constraints given by params /*! - * get the list of name of ressources fitting for the specified module. - * If hostname specified, check it is local or known in resources catalog. - * - * Else - * - select first machines with corresponding OS (all machines if - * parameter OS empty), - * - then select the sublist of machines on witch the module is known - * (if the result is empty, that probably means that the inventory of - * modules is probably not done, so give complete list from previous step) + * Steps: + * 1: Restrict list with resourceList if defined + * 2: If name is defined -> check resource list + * 3: If not 2:, if hostname is defined -> check resource list + * 4: If not 3:, sort resource with nb_proc, etc... + * 5: In all cases remove resource that does not correspond with OS + * 6: And remove resource with componentList - if list is empty ignored it... */ //============================================================================= std::vector -ResourcesManager_cpp::GetFittingResources(const machineParams& params, - const std::vector& componentList) throw(ResourcesException) +ResourcesManager_cpp::GetFittingResources(const resourceParams& params) throw(ResourcesException) { - vector vec; + RES_MESSAGE("[GetFittingResources] on computer " << Kernel_Utils::GetHostname().c_str()); + RES_MESSAGE("[GetFittingResources] with resource name: " << params.name); + RES_MESSAGE("[GetFittingResources] with hostname: "<< params.hostname); + + // Result + std::vector vec; + + // Parse Again CalatogResource File + ParseXmlFiles(); + + // Steps: + // 1: If name is defined -> check resource list + // 2: Restrict list with resourceList if defined + // 3: If not 2:, if hostname is defined -> check resource list + // 4: If not 3:, sort resource with nb_proc, etc... + // 5: In all cases remove resource that does not correspond with OS + // 6: And remove resource with componentList - if list is empty ignored it... + + // Step 1 + if (params.name != "") + { + RES_MESSAGE("[GetFittingResources] name parameter found !"); + if (_resourcesList.find(params.name) != _resourcesList.end()) + { + vec.push_back(params.name); + return vec; + } + else + RES_MESSAGE("[GetFittingResources] resource name was not found on resource list ! name requested was " << params.name); + std::string error("[GetFittingResources] resource name was not found on resource list ! name requested was " + params.name); + throw ResourcesException(error); + } - ParseXmlFile(); + MapOfParserResourcesType local_resourcesList = _resourcesList; + // Step 2 + if (params.resourceList.size() > 0) + { + RES_MESSAGE("[GetFittingResources] Restricted resource list found !"); + local_resourcesList.clear(); + std::vector::size_type sz = params.resourceList.size(); - const char *hostname = params.hostname.c_str(); -#if defined(_DEBUG_) || defined(_DEBUG) - cerr << "GetFittingResources " << hostname << " " << Kernel_Utils::GetHostname().c_str() << endl; -#endif + for (unsigned int i=0; i < sz; i++) + { + if (_resourcesList.find(params.resourceList[i]) != _resourcesList.end()) + local_resourcesList[params.resourceList[i]] = _resourcesList[params.resourceList[i]]; + } + } - if (hostname[0] != '\0'){ + // Step 3 + if (params.hostname != "") + { + RES_MESSAGE("[GetFittingResources] Entering in hostname case !"); - if ( strcmp(hostname, "localhost") == 0 || - strcmp(hostname, Kernel_Utils::GetHostname().c_str()) == 0 ) - { -//#if defined(_DEBUG_) || defined(_DEBUG) -// cerr << "ResourcesManager_cpp::GetFittingResources : localhost" << endl; -//#endif - vec.push_back(Kernel_Utils::GetHostname().c_str()); -//#if defined(_DEBUG_) || defined(_DEBUG) -// cerr << "ResourcesManager_cpp::GetFittingResources : " << vec.size() << endl; -//#endif - } - - else if (_resourcesList.find(hostname) != _resourcesList.end()) - { - // --- params.hostname is in the list of resources so return it. - vec.push_back(hostname); - } - - else if (_resourcesBatchList.find(hostname) != _resourcesBatchList.end()) + std::string hostname = params.hostname; + if (hostname == "localhost") + hostname = Kernel_Utils::GetHostname().c_str(); + + std::map::const_iterator iter = _resourcesList.begin(); + for (; iter != _resourcesList.end(); iter++) { - // --- params.hostname is in the list of resources so return it. - vec.push_back(hostname); + if ((*iter).second.HostName == hostname) + vec.push_back((*iter).first); } - - else - { - // Cas d'un cluster: nombre de noeuds > 1 - int cpt=0; - for (map::const_iterator iter = _resourcesList.begin(); iter != _resourcesList.end(); iter++){ - if( (*iter).second.DataForSort._nbOfNodes > 1 ){ - if( strncmp(hostname,(*iter).first.c_str(),strlen(hostname)) == 0 ){ - vec.push_back((*iter).first.c_str()); - cpt++; - } - } - } - if(cpt==0){ - // --- user specified an unknown hostame so notify him. -#if defined(_DEBUG_) || defined(_DEBUG) - cerr << "ResourcesManager_cpp::GetFittingResources : SALOME_Exception" << endl; -#endif - throw ResourcesException("unknown host"); - } - } } - - else{ + // Step 4 + else + { // --- Search for available resources sorted by priority - SelectOnlyResourcesWithOS(vec, params.OS.c_str()); - - KeepOnlyResourcesWithModule(vec, componentList); - - if (vec.size() == 0) - SelectOnlyResourcesWithOS(vec, params.OS.c_str()); - + MapOfParserResourcesType_it i = local_resourcesList.begin(); + for (; i != local_resourcesList.end(); ++i) + vec.push_back(i->first); + // --- set wanted parameters + ResourceDataToSort::_nbOfProcWanted = params.nb_proc; ResourceDataToSort::_nbOfNodesWanted = params.nb_node; - ResourceDataToSort::_nbOfProcPerNodeWanted = params.nb_proc_per_node; - ResourceDataToSort::_CPUFreqMHzWanted = params.cpu_clock; - ResourceDataToSort::_memInMBWanted = params.mem_mb; - // --- end of set - - list li; - - for (vector::iterator iter = vec.begin(); - iter != vec.end(); - iter++) - li.push_back(_resourcesList[(*iter)].DataForSort); - + + // Sort + std::list li; + std::vector::iterator iter = vec.begin(); + for (; iter != vec.end(); iter++) + li.push_back(local_resourcesList[(*iter)].DataForSort); li.sort(); - - unsigned int i = 0; - - for (list::iterator iter2 = li.begin(); - iter2 != li.end(); - iter2++) - vec[i++] = (*iter2)._hostName; + + vec.clear(); + for (std::list::iterator iter2 = li.begin(); iter2 != li.end(); iter2++) + vec.push_back((*iter2)._Name); } + + // Step 5 + SelectOnlyResourcesWithOS(vec, params.OS.c_str()); - return vec; + // Step 6 + std::vector vec_save(vec); + KeepOnlyResourcesWithComponent(vec, params.componentList); + if (vec.size() == 0) + vec = vec_save; + + // End + // Send an exception if return list is empty... + if (vec.size() == 0) + { + std::string error("[GetFittingResources] ResourcesManager doesn't find any resource that fits to your parameters"); + throw ResourcesException(error); + } + return vec; } //============================================================================= /*! - * add an entry in the ressources catalog xml file. - * Return 0 if OK (KERNEL found in new resources modules) else throw exception + * add an entry in the ressources catalog xml file. */ //============================================================================= -int -ResourcesManager_cpp:: -AddResourceInCatalog(const machineParams& paramsOfNewResources, - const vector& modulesOnNewResources, - const char *alias, - const char *userName, - AccessModeType mode, - AccessProtocolType prot) -throw(ResourcesException) +void +ResourcesManager_cpp::AddResourceInCatalog(const ParserResourcesType & new_resource) throw(ResourcesException) { - vector::const_iterator iter = find(modulesOnNewResources.begin(), - modulesOnNewResources.end(), - "KERNEL"); - - if (iter != modulesOnNewResources.end()) - { - ParserResourcesType newElt; - newElt.DataForSort._hostName = paramsOfNewResources.hostname; - newElt.Alias = alias; - newElt.Protocol = prot; - newElt.Mode = mode; - newElt.UserName = userName; - newElt.ModulesList = modulesOnNewResources; - newElt.OS = paramsOfNewResources.OS; - newElt.DataForSort._memInMB = paramsOfNewResources.mem_mb; - newElt.DataForSort._CPUFreqMHz = paramsOfNewResources.cpu_clock; - newElt.DataForSort._nbOfNodes = paramsOfNewResources.nb_node; - newElt.DataForSort._nbOfProcPerNode = - paramsOfNewResources.nb_proc_per_node; - _resourcesList[newElt.DataForSort._hostName] = newElt; - return 0; - } - - else - throw ResourcesException("KERNEL is not present in this resource"); + // TODO - Add minimal check + _resourcesList[new_resource.Name] = new_resource; } //============================================================================= @@ -272,9 +303,13 @@ throw(ResourcesException) */ //============================================================================= -void ResourcesManager_cpp::DeleteResourceInCatalog(const char *hostname) +void ResourcesManager_cpp::DeleteResourceInCatalog(const char * name) { - _resourcesList.erase(hostname); + MapOfParserResourcesType_it it = _resourcesList.find(name); + if (it != _resourcesList.end()) + _resourcesList.erase(name); + else + RES_INFOS("You try to delete a resource that does not exist... : " << name); } //============================================================================= @@ -283,43 +318,41 @@ void ResourcesManager_cpp::DeleteResourceInCatalog(const char *hostname) */ //============================================================================= -void ResourcesManager_cpp::WriteInXmlFile() +void ResourcesManager_cpp::WriteInXmlFile(std::string xml_file) { - const char* aFilePath = _path_resources.c_str(); - + RES_MESSAGE("WriteInXmlFile : start"); + + if (xml_file == "") + { + _path_resources_it = _path_resources.begin(); + xml_file = *_path_resources_it; + } + + const char* aFilePath = xml_file.c_str(); FILE* aFile = fopen(aFilePath, "w"); if (aFile == NULL) - { -#if defined(_DEBUG_) || defined(_DEBUG) - cerr << "Error opening file !" << endl; -#endif - return; - } + { + std::cerr << "Error opening file in WriteInXmlFile : " << xml_file << std::endl; + return; + } xmlDocPtr aDoc = xmlNewDoc(BAD_CAST "1.0"); xmlNewDocComment(aDoc, BAD_CAST "ResourcesCatalog"); SALOME_ResourcesCatalog_Handler* handler = - new SALOME_ResourcesCatalog_Handler(_resourcesList, _resourcesBatchList); + new SALOME_ResourcesCatalog_Handler(_resourcesList); handler->PrepareDocToXmlFile(aDoc); delete handler; -#if defined(_DEBUG_) || defined(_DEBUG) - int isOk = xmlSaveFile(aFilePath, aDoc); - if (!isOk) cerr << "Error while XML file saving." << endl; -#else - xmlSaveFile(aFilePath, aDoc); -#endif + int isOk = xmlSaveFormatFile(aFilePath, aDoc, 1); + if (!isOk) + std::cerr << "Error while XML file saving : " << xml_file << std::endl; // Free the document xmlFreeDoc(aDoc); - fclose(aFile); - -#if defined(_DEBUG_) || defined(_DEBUG) - cerr << "WRITING DONE!" << endl; -#endif + RES_MESSAGE("WriteInXmlFile : WRITING DONE!"); } //============================================================================= @@ -328,37 +361,73 @@ void ResourcesManager_cpp::WriteInXmlFile() */ //============================================================================= -const MapOfParserResourcesType& ResourcesManager_cpp::ParseXmlFile() +const MapOfParserResourcesType& ResourcesManager_cpp::ParseXmlFiles() { - SALOME_ResourcesCatalog_Handler* handler = - new SALOME_ResourcesCatalog_Handler(_resourcesList, _resourcesBatchList); + // Parse file only if its modification time is greater than lasttime (last registered modification time) + bool to_parse = false; + for(_path_resources_it = _path_resources.begin(); _path_resources_it != _path_resources.end(); ++_path_resources_it) + { + struct stat statinfo; + int result = stat((*_path_resources_it).c_str(), &statinfo); + if (result < 0) + { + std::cerr << "Error in method stat for file : " << (*_path_resources_it).c_str() << " no new xml file is parsed" << std::endl; + return _resourcesList; + } - const char* aFilePath = _path_resources.c_str(); - FILE* aFile = fopen(aFilePath, "r"); - - if (aFile != NULL) + if(statinfo.st_mtime > _lasttime) { - xmlDocPtr aDoc = xmlReadFile(aFilePath, NULL, 0); - - if (aDoc != NULL) - handler->ProcessXmlDocument(aDoc); -#if defined(_DEBUG_) || defined(_DEBUG) + to_parse = true; + _lasttime = statinfo.st_mtime; + } + } + + if (to_parse) + { + _resourcesList.clear(); + // On parse tous les fichiers + for(_path_resources_it = _path_resources.begin(); _path_resources_it != _path_resources.end(); ++_path_resources_it) + { + MapOfParserResourcesType _resourcesList_tmp; + MapOfParserResourcesType _resourcesBatchList_tmp; + SALOME_ResourcesCatalog_Handler* handler = + new SALOME_ResourcesCatalog_Handler(_resourcesList_tmp); + const char* aFilePath = (*_path_resources_it).c_str(); + FILE* aFile = fopen(aFilePath, "r"); + + if (aFile != NULL) + { + xmlDocPtr aDoc = xmlReadFile(aFilePath, NULL, 0); + if (aDoc != NULL) + { + handler->ProcessXmlDocument(aDoc); + + // adding new resources to the file + for (MapOfParserResourcesType_it i = _resourcesList_tmp.begin(); i != _resourcesList_tmp.end(); ++i) + { + MapOfParserResourcesType_it j = _resourcesList.find(i->first); + if (j == _resourcesList.end()) + { + _resourcesList[i->first] = i->second; + } + else + { + std::cerr << "ParseXmlFiles Warning, two resources with the same name were found, taking the first declaration : " << i->first << std::endl; + } + } + } + else + std::cerr << "ResourcesManager_cpp: could not parse file " << aFilePath << std::endl; + // Free the document + xmlFreeDoc(aDoc); + fclose(aFile); + } else - cerr << "ResourcesManager_cpp: could not parse file "<< aFilePath << endl; -#endif - - // Free the document - xmlFreeDoc(aDoc); + std::cerr << "ResourcesManager_cpp: file " << aFilePath << " is not readable." << std::endl; - fclose(aFile); + delete handler; } -#if defined(_DEBUG_) || defined(_DEBUG) - else - cerr << "ResourcesManager_cpp: file "<& listOfMachines) -{ - return _dynamicResourcesSelecter.FindFirst(listOfMachines); -} - -//============================================================================= -/*! - * dynamically obtains the best machines - */ -//============================================================================= - -string ResourcesManager_cpp::FindNext(const std::vector& listOfMachines) { - return _dynamicResourcesSelecter.FindNext(listOfMachines,_resourcesList); + return _resourcesList; } -//============================================================================= -/*! - * dynamically obtains the best machines - */ -//============================================================================= -string ResourcesManager_cpp::FindBest(const std::vector& listOfMachines) +std::string ResourcesManager_cpp::Find(const std::string& policy, const std::vector& listOfResources) { - return _dynamicResourcesSelecter.FindBest(listOfMachines); + if(_resourceManagerMap.count(policy)==0) + return _resourceManagerMap[""]->Find(listOfResources, _resourcesList); + return _resourceManagerMap[policy]->Find(listOfResources, _resourcesList); } //============================================================================= /*! - * Gives a sublist of machines with matching OS. - * If parameter OS is empty, gives the complete list of machines + * Gives a sublist of resources with matching OS. + * If parameter OS is empty, gives the complete list of resources */ //============================================================================= - -// Warning need an updated parsed list : _resourcesList -void ResourcesManager_cpp::SelectOnlyResourcesWithOS( vector& hosts, const char *OS) const -throw(ResourcesException) +void +ResourcesManager_cpp::SelectOnlyResourcesWithOS(std::vector& resources, std::string OS) { - string base(OS); - - for (map::const_iterator iter = - _resourcesList.begin(); - iter != _resourcesList.end(); - iter++) + if (OS != "") + { + // a computer list is given : take only resources with OS on those computers + std::vector vec_tmp = resources; + resources.clear(); + std::vector::iterator iter = vec_tmp.begin(); + for (; iter != vec_tmp.end(); iter++) { - if ( (*iter).second.OS == base || base.size() == 0) - hosts.push_back((*iter).first); + MapOfParserResourcesType::const_iterator it = _resourcesList.find(*iter); + if(it != _resourcesList.end()) + if ( (*it).second.OS == OS) + resources.push_back(*iter); } + } } //============================================================================= /*! - * Gives a sublist of machines on which the module is known. + * Gives a sublist of machines on which the component is known. */ //============================================================================= - -//Warning need an updated parsed list : _resourcesList -void ResourcesManager_cpp::KeepOnlyResourcesWithModule( vector& hosts, const vector& componentList) const -throw(ResourcesException) +void +ResourcesManager_cpp::KeepOnlyResourcesWithComponent(std::vector& resources, + const std::vector& componentList) { - for (vector::iterator iter = hosts.begin(); iter != hosts.end();) + std::vector kept_resources; + + std::vector::iterator iter = resources.begin(); + for (; iter != resources.end(); iter++) + { + const std::vector& mapOfComponentsOfCurrentHost = _resourcesList[*iter].ComponentsList; + + bool erasedHost = false; + if( mapOfComponentsOfCurrentHost.size() > 0 ) { - MapOfParserResourcesType::const_iterator it = _resourcesList.find(*iter); - const vector& mapOfModulesOfCurrentHost = (((*it).second).ModulesList); - - bool erasedHost = false; - if( mapOfModulesOfCurrentHost.size() > 0 ){ - for(unsigned int i=0;i::const_iterator itt = find(mapOfModulesOfCurrentHost.begin(), - mapOfModulesOfCurrentHost.end(), - compoi); -// componentList[i]); - if (itt == mapOfModulesOfCurrentHost.end()){ - erasedHost = true; - break; - } - } + for(unsigned int i=0; i::const_iterator itt = find(mapOfComponentsOfCurrentHost.begin(), + mapOfComponentsOfCurrentHost.end(), + componentList[i]); + if (itt == mapOfComponentsOfCurrentHost.end()) + { + erasedHost = true; + break; + } } - if(erasedHost) - hosts.erase(iter); - else - iter++; } + if(!erasedHost) + kept_resources.push_back(*iter); + } + resources=kept_resources; } -ParserResourcesType ResourcesManager_cpp::GetResourcesList(const std::string& machine) +ParserResourcesType +ResourcesManager_cpp::GetResourcesDescr(const std::string & name) { - if (_resourcesList.find(machine) != _resourcesList.end()) - return _resourcesList[machine]; + if (_resourcesList.find(name) != _resourcesList.end()) + return _resourcesList[name]; else - return _resourcesBatchList[machine]; + { + std::string error("[GetResourcesDescr] Resource does not exist: "); + error += name; + throw ResourcesException(error); + } } diff --git a/src/ResourcesManager/ResourcesManager.hxx b/src/ResourcesManager/ResourcesManager.hxx index cc065929c..a85f68497 100644 --- a/src/ResourcesManager/ResourcesManager.hxx +++ b/src/ResourcesManager/ResourcesManager.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef __RESOURCESMANAGER_HXX__ #define __RESOURCESMANAGER_HXX__ @@ -27,23 +28,39 @@ #include #include #include +#include #include "SALOME_ResourcesCatalog_Parser.hxx" #include "SALOME_ResourcesCatalog_Handler.hxx" #include "SALOME_LoadRateManager.hxx" +#include +#include +#ifdef WNT +#else +#include +#endif + +#ifdef WNT +#pragma warning(disable:4251) // Warning DLL Interface ... +#pragma warning(disable:4290) // Warning Exception ... +#endif // --- WARNING --- // The call of BuildTempFileToLaunchRemoteContainer and RmTmpFile must be done // in a critical section to be sure to be clean. // Only one thread should use the SALOME_ResourcesManager class in a SALOME // session. - -struct machineParams{ +struct resourceParams +{ + std::string name; std::string hostname; std::string OS; - unsigned int nb_node; - unsigned int nb_proc_per_node; - unsigned int cpu_clock; - unsigned int mem_mb; + long nb_proc; + long nb_node; + long nb_proc_per_node; + long cpu_clock; + long mem_mb; + std::vector componentList; + std::vector resourceList; }; class RESOURCESMANAGER_EXPORT ResourcesException @@ -65,54 +82,42 @@ class RESOURCESMANAGER_EXPORT ResourcesManager_cpp ~ResourcesManager_cpp(); std::vector - GetFittingResources(const machineParams& params, - const std::vector& componentList) throw(ResourcesException); + GetFittingResources(const resourceParams& params) throw(ResourcesException); - std::string FindFirst(const std::vector& listOfMachines); - std::string FindNext(const std::vector& listOfMachines); - std::string FindBest(const std::vector& listOfMachines); + std::string Find(const std::string& policy, + const std::vector& listOfResources); - int AddResourceInCatalog - (const machineParams& paramsOfNewResources, - const std::vector& modulesOnNewResources, - const char *alias, - const char *userName, - AccessModeType mode, - AccessProtocolType prot) throw(ResourcesException); + void AddResourceInCatalog (const ParserResourcesType & new_resource) throw(ResourcesException); - void DeleteResourceInCatalog(const char *hostname); + void DeleteResourceInCatalog(const char * name); - void WriteInXmlFile(); + void WriteInXmlFile(std::string xml_file); - const MapOfParserResourcesType& ParseXmlFile(); + const MapOfParserResourcesType& ParseXmlFiles(); const MapOfParserResourcesType& GetList() const; - ParserResourcesType GetResourcesList(const std::string& machine); + ParserResourcesType GetResourcesDescr(const std::string & name); protected: - void SelectOnlyResourcesWithOS(std::vector& hosts, - const char *OS) const - throw(ResourcesException); + void SelectOnlyResourcesWithOS(std::vector& resources, std::string OS); - void KeepOnlyResourcesWithModule(std::vector& hosts, - const std::vector& componentList) const - throw(ResourcesException); + void KeepOnlyResourcesWithComponent(std::vector& resources, + const std::vector& componentList); //! will contain the path to the ressources catalog - std::string _path_resources; + std::list _path_resources; + std::list::iterator _path_resources_it; //! will contain the informations on the data type catalog(after parsing) MapOfParserResourcesType _resourcesList; - //! will contain the informations on the data type catalog(after parsing) - MapOfParserResourcesType _resourcesBatchList; - - SALOME_LoadRateManager _dynamicResourcesSelecter; + //! a map that contains all the available load rate managers (the key is the name) + std::map _resourceManagerMap; - //! different behaviour if $APPLI exists (SALOME Application) - bool _isAppliSalomeDefined; + //! contain the time where resourcesList was created + time_t _lasttime; }; #endif // __RESOURCESMANAGER_HXX__ diff --git a/src/ResourcesManager/ResourcesManager_Defs.hxx b/src/ResourcesManager/ResourcesManager_Defs.hxx index 8613c4b9d..191a46212 100755 --- a/src/ResourcesManager/ResourcesManager_Defs.hxx +++ b/src/ResourcesManager/ResourcesManager_Defs.hxx @@ -1,29 +1,30 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef __RESOURCESMANAGER_DEFS_HXX__ #define __RESOURCESMANAGER_DEFS_HXX__ #ifdef WIN32 -# ifdef RESOURCESMANAGER_EXPORTS +# if defined RESOURCESMANAGER_EXPORTS || defined ResourcesManager_EXPORTS # define RESOURCESMANAGER_EXPORT __declspec( dllexport ) # else # define RESOURCESMANAGER_EXPORT __declspec( dllimport ) @@ -32,4 +33,16 @@ # define RESOURCESMANAGER_EXPORT #endif +// MESSAGES +#define RES_MESS_INIT(deb) std::cerr << deb +#define RES_MESS_BEGIN(deb) RES_MESS_INIT(deb)<<__FILE__ <<" ["<<__LINE__<<"] : " +#define RES_MESS_END std::endl; +#define RES_INFOS(msg) {RES_MESS_BEGIN("- Trace ") << msg << RES_MESS_END} + +#if defined(_DEBUG_) || defined(_DEBUG) +#define RES_MESSAGE(msg) {RES_MESS_BEGIN("- Trace ") << msg << RES_MESS_END} +#else /* ifdef _DEBUG_*/ +#define RES_MESSAGE(msg) {} +#endif /* ifdef _DEBUG_*/ + #endif // __RESOURCESMANAGER_DEFS_HXX__ diff --git a/src/ResourcesManager/SALOME_LoadRateManager.cxx b/src/ResourcesManager/SALOME_LoadRateManager.cxx index 5865483a6..e0843ec17 100644 --- a/src/ResourcesManager/SALOME_LoadRateManager.cxx +++ b/src/ResourcesManager/SALOME_LoadRateManager.cxx @@ -1,66 +1,92 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "SALOME_LoadRateManager.hxx" #include #include -using namespace std; - -string SALOME_LoadRateManager::FindFirst(const vector& hosts) +std::string LoadRateManagerFirst::Find(const std::vector& hosts, + MapOfParserResourcesType& resList) { if (hosts.size() == 0) - return string(""); + return std::string(""); - return string(hosts[0]); + return std::string(hosts[0]); } -string SALOME_LoadRateManager::FindNext(const vector& hosts,MapOfParserResourcesType& resList) +std::string LoadRateManagerCycl::Find(const std::vector& hosts, + MapOfParserResourcesType& resList) { static int imachine = 0; static int iproc = 0; // if empty list return empty string if (hosts.size() == 0) - return string(""); + return std::string(""); else{ - ParserResourcesType resource = resList[string(hosts[imachine])]; + ParserResourcesType resource = resList[std::string(hosts[imachine])]; int nbproc = resource.DataForSort._nbOfProcPerNode * resource.DataForSort._nbOfNodes; if( nbproc <= 0) nbproc = 1; if( iproc < nbproc ){ iproc++; - return string(hosts[imachine]); + return std::string(hosts[imachine]); } else{ iproc = 1; imachine++; - if(imachine == hosts.size()) - imachine = 0; - return string(hosts[imachine]); + if(imachine >= (int)hosts.size()) + imachine = 0; + return std::string(hosts[imachine]); } } } -string SALOME_LoadRateManager::FindBest(const vector& hosts) +std::string LoadRateManagerAltCycl::Find(const std::vector& hosts, + MapOfParserResourcesType& resList) { - // for the moment then "maui" will be used for dynamic selection ... - return FindFirst(hosts); + if (hosts.size() == 0) + return std::string(""); + + std::string selected=hosts[0]; + int uses=0; + if(_numberOfUses.count(selected) != 0) + uses=_numberOfUses[selected]; + else + uses=0; + + for (std::vector::const_iterator iter = hosts.begin(); iter != hosts.end(); iter++) + { + std::string machine=*iter; + if(_numberOfUses.count(machine) == 0) + _numberOfUses[machine]=0; + if(_numberOfUses[machine] < uses) + { + selected=machine; + uses=_numberOfUses[machine]; + } + } + + _numberOfUses[selected]=_numberOfUses[selected]+1; + //std::cerr << "selected: " << selected << " " << _numberOfUses[selected] << std::endl; + return selected; } + diff --git a/src/ResourcesManager/SALOME_LoadRateManager.hxx b/src/ResourcesManager/SALOME_LoadRateManager.hxx index 4a43bd7e3..53abe329f 100644 --- a/src/ResourcesManager/SALOME_LoadRateManager.hxx +++ b/src/ResourcesManager/SALOME_LoadRateManager.hxx @@ -1,38 +1,61 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef __SALOME_LOADRATEMANAGER_HXX__ #define __SALOME_LOADRATEMANAGER_HXX__ #include "ResourcesManager_Defs.hxx" #include +#include #include "SALOME_ResourcesCatalog_Parser.hxx" -class RESOURCESMANAGER_EXPORT SALOME_LoadRateManager - { +class RESOURCESMANAGER_EXPORT LoadRateManager +{ + public: + virtual std::string Find(const std::vector& hosts, + MapOfParserResourcesType& resList){return "";}; +}; + +class RESOURCESMANAGER_EXPORT LoadRateManagerFirst:public LoadRateManager +{ + public: + virtual std::string Find(const std::vector& hosts, + MapOfParserResourcesType& resList); +}; + +class RESOURCESMANAGER_EXPORT LoadRateManagerCycl :public LoadRateManager +{ + public: + virtual std::string Find(const std::vector& hosts, + MapOfParserResourcesType& resList); +}; +class RESOURCESMANAGER_EXPORT LoadRateManagerAltCycl :public LoadRateManager +{ public: - std::string FindFirst(const std::vector& hosts); - std::string FindNext(const std::vector& hosts,MapOfParserResourcesType& resList); - std::string FindBest(const std::vector& hosts); - }; + virtual std::string Find(const std::vector& hosts, + MapOfParserResourcesType& resList); + protected: + std::map _numberOfUses; +}; #endif diff --git a/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx b/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx index 1602fcce9..f65db96c0 100755 --- a/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx +++ b/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME ResourcesCatalog : implementation of catalog resources parsing (SALOME_ModuleCatalog.idl) // File : SALOME_ResourcesCatalog_Handler.cxx // Author : Estelle Deville @@ -27,11 +28,11 @@ // #include "SALOME_ResourcesCatalog_Handler.hxx" #include "Basics_Utils.hxx" +#include "Utils_SALOME_Exception.hxx" #include +#include #include -using namespace std; - //============================================================================= /*! * Constructor @@ -40,18 +41,15 @@ using namespace std; //============================================================================= SALOME_ResourcesCatalog_Handler:: -SALOME_ResourcesCatalog_Handler(MapOfParserResourcesType& resources_list, - MapOfParserResourcesType& resources_batch_list): - _resources_list(resources_list), - _resources_batch_list(resources_batch_list) +SALOME_ResourcesCatalog_Handler(MapOfParserResourcesType& resources_list): _resources_list(resources_list) { //XML tags initialisation test_machine = "machine"; - test_resources = "resources"; - + test_cluster = "cluster"; + test_name = "name"; test_hostname = "hostname"; - test_alias = "alias"; test_protocol = "protocol"; + test_cluster_internal_protocol = "iprotocol"; test_mode = "mode"; test_batch = "batch"; test_mpi = "mpi"; @@ -59,13 +57,20 @@ SALOME_ResourcesCatalog_Handler(MapOfParserResourcesType& resources_list, test_appli_path = "appliPath"; test_modules = "modules"; test_module_name = "moduleName"; + test_components = "component"; + test_component_name = "name"; test_os = "OS"; test_mem_in_mb = "memInMB"; test_cpu_freq_mhz = "CPUFreqMHz"; test_nb_of_nodes = "nbOfNodes"; + test_nb_of_proc = "nbOfProc"; test_nb_of_proc_per_node = "nbOfProcPerNode"; test_batch_queue = "batchQueue"; test_user_commands = "userCommands"; + test_use = "use"; + test_members = "members"; + test_is_cluster_head = "isClusterHead"; + test_working_directory = "workingDirectory"; } //============================================================================= @@ -102,248 +107,573 @@ void SALOME_ResourcesCatalog_Handler::ProcessXmlDocument(xmlDocPtr theDoc) // Empty private elements _resources_list.clear(); + //default resources + _resource.Clear(); + _resource.HostName = Kernel_Utils::GetHostname(); + _resource.Name = Kernel_Utils::GetHostname(); + _resource.DataForSort._Name = Kernel_Utils::GetHostname(); + _resources_list[Kernel_Utils::GetHostname()] = _resource; + // Get the document root node xmlNodePtr aCurNode = xmlDocGetRootElement(theDoc); aCurNode = aCurNode->xmlChildrenNode; - + // Processing the document nodes while(aCurNode != NULL) + { + // Cas d'une machine ou d'une machine batch + if (!xmlStrcmp(aCurNode->name,(const xmlChar*)test_machine)) { - if ( !xmlStrcmp(aCurNode->name,(const xmlChar*)test_machine) ) - { - _resource.Clear(); - if (xmlHasProp(aCurNode, (const xmlChar*)test_hostname)) - { - xmlChar* hostname = xmlGetProp(aCurNode, (const xmlChar*)test_hostname); - _resource.DataForSort._hostName = (const char*)hostname; - _resource.HostName = (const char*)hostname; - xmlFree(hostname); - } - else - break; - - if (xmlHasProp(aCurNode, (const xmlChar*)test_alias)) - { - xmlChar* alias = xmlGetProp(aCurNode, (const xmlChar*)test_alias); - _resource.Alias = (const char*)alias; - xmlFree(alias); - } - else - _resource.Alias = ""; - - if (xmlHasProp(aCurNode, (const xmlChar*)test_batch_queue)) - { - xmlChar* batch_queue = xmlGetProp(aCurNode, (const xmlChar*)test_batch_queue); - _resource.batchQueue = (const char*)batch_queue; - xmlFree(batch_queue); - } - else - _resource.batchQueue = ""; - - if (xmlHasProp(aCurNode, (const xmlChar*)test_user_commands)) - { - xmlChar* user_commands= xmlGetProp(aCurNode, (const xmlChar*)test_user_commands); - _resource.userCommands = (const char*)user_commands; - xmlFree(user_commands); - } - else - _resource.userCommands = ""; - - if (xmlHasProp(aCurNode, (const xmlChar*)test_protocol)) - { - xmlChar* protocol= xmlGetProp(aCurNode, (const xmlChar*)test_protocol); - switch ( protocol[0]) - { - case 'r': - _resource.Protocol = rsh; - break; - case 's': - _resource.Protocol = ssh; - break; - default: - // If it'not in all theses cases, the protocol is affected to rsh - _resource.Protocol = rsh; - break; - } - xmlFree(protocol); - } - else - _resource.Protocol = rsh; - - if (xmlHasProp(aCurNode, (const xmlChar*)test_mode)) - { - xmlChar* mode=xmlGetProp(aCurNode, (const xmlChar*)test_mode); - switch ( mode[0] ) - { - case 'i': - _resource.Mode = interactive; - break; - case 'b': - _resource.Mode = batch; - break; - default: - // If it'not in all theses cases, the mode is affected to interactive - _resource.Mode = interactive; - break; - } - xmlFree(mode); - } - else - _resource.Mode = interactive; - - if (xmlHasProp(aCurNode, (const xmlChar*)test_batch)) - { - xmlChar* batch = xmlGetProp(aCurNode, (const xmlChar*)test_batch); - std::string aBatch = (const char*)batch; - xmlFree(batch); - if (aBatch == "pbs") - _resource.Batch = pbs; - else if (aBatch == "lsf") - _resource.Batch = lsf; - else if (aBatch == "sge") - _resource.Batch = sge; - else - _resource.Batch = none; - } - - if (xmlHasProp(aCurNode, (const xmlChar*)test_mpi)) - { - xmlChar* mpi = xmlGetProp(aCurNode, (const xmlChar*)test_mpi); - std::string anMpi = (const char*)mpi; - xmlFree(mpi); - if (anMpi == "lam") - _resource.mpi = lam; - else if (anMpi == "mpich1") - _resource.mpi = mpich1; - else if (anMpi == "mpich2") - _resource.mpi = mpich2; - else if (anMpi == "openmpi") - _resource.mpi = openmpi; - else if (anMpi == "slurm") - _resource.mpi = slurm; - else if (anMpi == "prun") - _resource.mpi = prun; - else - _resource.mpi = nompi; - } - - if (xmlHasProp(aCurNode, (const xmlChar*)test_user_name)) - { - xmlChar* user_name= xmlGetProp(aCurNode, (const xmlChar*)test_user_name); - _resource.UserName = (const char*)user_name; - xmlFree(user_name); - } - - if (xmlHasProp(aCurNode, (const xmlChar*)test_appli_path)) - { - xmlChar* appli_path = xmlGetProp(aCurNode, (const xmlChar*)test_appli_path); - _resource.AppliPath = (const char*)appli_path; - xmlFree(appli_path); - } - - if (xmlHasProp(aCurNode, (const xmlChar*)test_os)) - { - xmlChar* os = xmlGetProp(aCurNode, (const xmlChar*)test_os); - _resource.OS = (const char*)os; - xmlFree(os); - } - - if (xmlHasProp(aCurNode, (const xmlChar*)test_mem_in_mb)) - { - xmlChar* mem_in_mb = xmlGetProp(aCurNode, (const xmlChar*)test_mem_in_mb); - _resource.DataForSort._memInMB = atoi((const char*)mem_in_mb); - xmlFree(mem_in_mb); - } - - if (xmlHasProp(aCurNode, (const xmlChar*)test_cpu_freq_mhz)) - { - xmlChar* cpu_freq_mhz = xmlGetProp(aCurNode, (const xmlChar*)test_cpu_freq_mhz); - _resource.DataForSort._CPUFreqMHz = atoi((const char*)cpu_freq_mhz); - xmlFree(cpu_freq_mhz); - } - - if (xmlHasProp(aCurNode, (const xmlChar*)test_nb_of_nodes)) - { - xmlChar* nb_of_nodes = xmlGetProp(aCurNode, (const xmlChar*)test_nb_of_nodes); - _resource.DataForSort._nbOfNodes = atoi((const char*)nb_of_nodes); - xmlFree(nb_of_nodes); - } - - if (xmlHasProp(aCurNode, (const xmlChar*)test_nb_of_proc_per_node)) - { - xmlChar* nb_of_proc_per_node = xmlGetProp(aCurNode, (const xmlChar*)test_nb_of_proc_per_node); - _resource.DataForSort._nbOfProcPerNode = atoi((const char*)nb_of_proc_per_node); - xmlFree(nb_of_proc_per_node); - } - - // Process modules - xmlNodePtr aCurSubNode = aCurNode->xmlChildrenNode; - while(aCurSubNode != NULL) - { - if ( !xmlStrcmp(aCurSubNode->name, (const xmlChar*)test_modules) ) - { - if (xmlHasProp(aCurSubNode, (const xmlChar*)test_module_name)) - { - xmlChar* module_name = xmlGetProp(aCurSubNode, (const xmlChar*)test_module_name); - std::string aModuleName = (const char*)module_name; - _resource.ModulesList.push_back(aModuleName); - xmlFree(module_name); - } - } - aCurSubNode = aCurSubNode->next; - } - - // There is two lists - // _resources_list for interactive resources - // _resources_batch_list for batch resources - // This choice is done with Mode parameter - if (_resource.Mode == interactive) - { - int aNbNodes = _resource.DataForSort._nbOfNodes; - if( aNbNodes > 1 ){ - string clusterNode = _resource.DataForSort._hostName ; - for( int i=0; i < aNbNodes; i++ ){ - char inode[64]; - inode[0] = '\0' ; - sprintf(inode,"%s%d",clusterNode.c_str(),i+1); - std::string nodeName(inode); - _resource.DataForSort._hostName = nodeName ; - _resource.HostName = nodeName ; - _resources_list[nodeName] = _resource; - } - } - else - { - _resources_list[_resource.HostName] = _resource; - if(_resource.HostName == "localhost") - _resources_list[Kernel_Utils::GetHostname()] = _resource; - } - } - else - _resources_batch_list[_resource.HostName] = _resource; + _resource.Clear(); + bool Ok = ProcessMachine(aCurNode, _resource); + if (Ok) + { + // Adding a resource + if(_resource.HostName == "localhost") + { + _resource.HostName = Kernel_Utils::GetHostname(); } - aCurNode = aCurNode->next; + std::map::const_iterator iter = _resources_list.find(_resource.Name); + if (iter != _resources_list.end()) + RES_INFOS("Warning resource " << _resource.Name << " already added, keep last resource found !"); + _resources_list[_resource.Name] = _resource; + } } - -#ifdef _DEBUG_ - for (map::const_iterator iter = - _resources_list.begin(); - iter != _resources_list.end(); - iter++) + // Cas de la déclaration d'un cluster + if (!xmlStrcmp(aCurNode->name,(const xmlChar*)test_cluster)) + { + _resource.Clear(); + if(ProcessCluster(aCurNode, _resource)) { - std::cerr << (*iter).second.HostName << std::endl; - std::cerr << (*iter).second.Alias << std::endl; - std::cerr << (*iter).second.UserName << std::endl; - std::cerr << (*iter).second.AppliPath << std::endl; - std::cerr << (*iter).second.OS << std::endl; - std::cerr << (*iter).second.Protocol << std::endl; - std::cerr << (*iter).second.Mode << std::endl; + std::map::const_iterator iter = _resources_list.find(_resource.Name); + if (iter != _resources_list.end()) + RES_INFOS("Warning resource " << _resource.Name << " already added, keep last resource found !"); + _resources_list[_resource.Name] = _resource; } + } + aCurNode = aCurNode->next; + } + +#ifdef _DEBUG_ + for (std::map::const_iterator iter = _resources_list.begin(); + iter != _resources_list.end(); + iter++) + { + std::cerr << "************************************************" << std::endl; + std::cerr << "Resource " << (*iter).first << " found:" << std::endl; + std::cerr << " Name: " << (*iter).second.Name << std::endl; + std::cerr << " Hostname: " << (*iter).second.HostName << std::endl; + std::cerr << " Username: " << (*iter).second.UserName << std::endl; + std::cerr << " Appli path: " <<(*iter).second.AppliPath << std::endl; + std::cerr << " OS: " << (*iter).second.OS << std::endl; + std::cerr << " Protocol: " << (*iter).second.PrintAccessProtocolType() << std::endl; + std::cerr << " Internal Protocol: " <<(*iter).second.PrintClusterInternalProtocol() << std::endl; + std::cerr << " Mode: " << (*iter).second.PrintAccessModeType() << std::endl; + std::cerr << " Batch Type: " << (*iter).second.PrintBatchType() << std::endl; + std::cerr << " MPI Impl: " << (*iter).second.PrintMpiImplType() << std::endl; + std::cerr << "************************************************" << std::endl; + } #endif +} +bool +SALOME_ResourcesCatalog_Handler::ProcessCluster(xmlNodePtr cluster_descr, ParserResourcesType & resource) +{ + // Ajout d'un cluster + // hostname, use et nbOfProc sont obligatoires + if (xmlHasProp(cluster_descr, (const xmlChar*)test_hostname)) + { + xmlChar* hostname = xmlGetProp(cluster_descr, (const xmlChar*)test_hostname); + resource.HostName = (const char*)hostname; + xmlFree(hostname); + } + else + { + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessCluster : !!! Warning !!! found a cluster without a hostname" << std::endl; + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessCluster : !!! Warning !!! this cluster will not be added" << std::endl; + return false; + } + + if (xmlHasProp(cluster_descr, (const xmlChar*)test_name)) + { + xmlChar* name = xmlGetProp(cluster_descr, (const xmlChar*)test_name); + resource.Name = (const char*)name; + resource.DataForSort._Name = (const char*)name; + xmlFree(name); + } + else + { + resource.Name = resource.HostName; + resource.DataForSort._Name = resource.HostName; + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessCluster : !!! Warning !!! No Name found use Hostname for resource: " << _resource.Name << std::endl; + } + + if (xmlHasProp(cluster_descr, (const xmlChar*)test_use)) + { + xmlChar* use = xmlGetProp(cluster_descr, (const xmlChar*)test_use); + resource.use = (const char*)use; + xmlFree(use); + } + else + { + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessCluster : !!! Warning !!! found a cluster without a use" << std::endl; + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessCluster : !!! Warning !!! this cluster will not be added" << std::endl; + return false; + } + + if (xmlHasProp(cluster_descr, (const xmlChar*)test_nb_of_proc)) + { + xmlChar* nb_of_proc = xmlGetProp(cluster_descr, (const xmlChar*)test_nb_of_proc); + resource.nbOfProc = atoi((const char*)nb_of_proc); + xmlFree(nb_of_proc); + } + else + { + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessCluster : !!! Warning !!! found a cluster without a nbOfProc" << std::endl; + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessCluster : !!! Warning !!! this cluster will not be added" << std::endl; + return false; + } + + if (xmlHasProp(cluster_descr, (const xmlChar*)test_mpi)) + { + xmlChar* mpi = xmlGetProp(cluster_descr, (const xmlChar*)test_mpi); + std::string anMpi = (const char*)mpi; + xmlFree(mpi); + if (anMpi == "lam") + resource.mpi = lam; + else if (anMpi == "mpich1") + resource.mpi = mpich1; + else if (anMpi == "mpich2") + resource.mpi = mpich2; + else if (anMpi == "openmpi") + resource.mpi = openmpi; + else if (anMpi == "slurmmpi") + resource.mpi = slurmmpi; + else if (anMpi == "prun") + resource.mpi = prun; + else + resource.mpi = nompi; + } + + // Parsing des membres du cluster + xmlNodePtr aCurSubNode = cluster_descr->xmlChildrenNode; + while(aCurSubNode != NULL) + { + if (!xmlStrcmp(aCurSubNode->name, (const xmlChar*)test_members)) + { + xmlNodePtr members = aCurSubNode->xmlChildrenNode; + while (members != NULL) + { + // Process members + if (!xmlStrcmp(members->name, (const xmlChar*)test_machine)) + { + ParserResourcesClusterMembersType new_member; + if (ProcessMember(members, new_member)) + resource.ClusterMembersList.push_back(new_member); + } + members = members->next; + } + } + aCurSubNode = aCurSubNode->next; + } + + // Test: Il faut au moins un membre pour que le cluster soit correct ! + if (resource.ClusterMembersList.empty()) + { + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessCluster : !!! Warning !!! found a cluster without a member" << std::endl; + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessCluster : !!! Warning !!! this cluster will not be added" << std::endl; + return false; + } + return true; } +bool +SALOME_ResourcesCatalog_Handler::ProcessMember(xmlNodePtr member_descr, ParserResourcesClusterMembersType & resource) +{ + if (xmlHasProp(member_descr, (const xmlChar*)test_hostname)) + { + xmlChar* hostname = xmlGetProp(member_descr, (const xmlChar*)test_hostname); + resource.HostName = (const char*)hostname; + xmlFree(hostname); + } + else + { + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning found a machine without a hostname" << std::endl; + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning this machine will not be added" << std::endl; + return false; + } + + if (xmlHasProp(member_descr, (const xmlChar*)test_protocol)) + { + xmlChar* protocol= xmlGetProp(member_descr, (const xmlChar*)test_protocol); + try + { + resource.Protocol = ParserResourcesType::stringToProtocol((const char *)protocol); + } + catch (SALOME_Exception e) + { + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning found a machine with a bad protocol" << std::endl; + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning this machine will not be added" << std::endl; + return false; + } + xmlFree(protocol); + } + else + { + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning found a machine without a protocol" << std::endl; + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning this machine will not be added" << std::endl; + return false; + } + + if (xmlHasProp(member_descr, (const xmlChar*)test_cluster_internal_protocol)) + { + xmlChar* iprotocol= xmlGetProp(member_descr, (const xmlChar*)test_cluster_internal_protocol); + try + { + resource.ClusterInternalProtocol = ParserResourcesType::stringToProtocol((const char *)iprotocol); + } + catch (SALOME_Exception e) + { + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning found a machine with a bad protocol" << std::endl; + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning this machine will not be added" << std::endl; + return false; + } + xmlFree(iprotocol); + } + else + { + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning found a machine without a protocol" << std::endl; + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning this machine will not be added" << std::endl; + return false; + } + + if (xmlHasProp(member_descr, (const xmlChar*)test_user_name)) + { + xmlChar* user_name= xmlGetProp(member_descr, (const xmlChar*)test_user_name); + resource.UserName = (const char*)user_name; + xmlFree(user_name); + } + else + { + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning found a machine without a user name" << std::endl; + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning this machine will not be added" << std::endl; + return false; + } + + if (xmlHasProp(member_descr, (const xmlChar*)test_nb_of_nodes)) + { + xmlChar* nb_of_nodes = xmlGetProp(member_descr, (const xmlChar*)test_nb_of_nodes); + resource.DataForSort._nbOfNodes = atoi((const char*)nb_of_nodes); + xmlFree(nb_of_nodes); + } + else + { + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning found a machine without a nbOfNodes" << std::endl; + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning this machine will not be added" << std::endl; + return false; + } + + if (xmlHasProp(member_descr, (const xmlChar*)test_nb_of_proc_per_node)) + { + xmlChar* nb_of_proc_per_node = xmlGetProp(member_descr, (const xmlChar*)test_nb_of_proc_per_node); + resource.DataForSort._nbOfProcPerNode = atoi((const char*)nb_of_proc_per_node); + xmlFree(nb_of_proc_per_node); + } + else + { + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning found a machine without a nbOfProcPerNode" << std::endl; + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning this machine will not be added" << std::endl; + return false; + } + + if (xmlHasProp(member_descr, (const xmlChar*)test_appli_path)) + { + xmlChar* appli_path = xmlGetProp(member_descr, (const xmlChar*)test_appli_path); + resource.AppliPath = (const char*)appli_path; + xmlFree(appli_path); + } + else + { + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning found a machine without a AppliPath" << std::endl; + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning this machine will not be added" << std::endl; + return false; + } + return true; +} + +bool +SALOME_ResourcesCatalog_Handler::ProcessMachine(xmlNodePtr machine_descr, ParserResourcesType & resource) +{ + if (xmlHasProp(machine_descr, (const xmlChar*)test_hostname)) + { + xmlChar* hostname = xmlGetProp(machine_descr, (const xmlChar*)test_hostname); + resource.HostName = (const char*)hostname; + xmlFree(hostname); + } + else + { + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMachine : Warning found a machine without a hostname" << std::endl; + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMachine : Warning this machine will not be added" << std::endl; + return false; + } + + if (xmlHasProp(machine_descr, (const xmlChar*)test_name)) + { + xmlChar* name = xmlGetProp(machine_descr, (const xmlChar*)test_name); + resource.Name = (const char*)name; + resource.DataForSort._Name = (const char*)name; + xmlFree(name); + } + else + { + resource.Name = resource.HostName; + resource.DataForSort._Name = resource.HostName; + std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMachine : !!! Warning !!! No Name found use Hostname for resource: " << _resource.Name << std::endl; + } + + if (xmlHasProp(machine_descr, (const xmlChar*)test_batch_queue)) + { + xmlChar* batch_queue = xmlGetProp(machine_descr, (const xmlChar*)test_batch_queue); + resource.batchQueue = (const char*)batch_queue; + xmlFree(batch_queue); + } + else + resource.batchQueue = ""; + + if (xmlHasProp(machine_descr, (const xmlChar*)test_user_commands)) + { + xmlChar* user_commands= xmlGetProp(machine_descr, (const xmlChar*)test_user_commands); + resource.userCommands = (const char*)user_commands; + xmlFree(user_commands); + } + else + resource.userCommands = ""; + + if (xmlHasProp(machine_descr, (const xmlChar*)test_protocol)) + { + xmlChar* protocol= xmlGetProp(machine_descr, (const xmlChar*)test_protocol); + try + { + resource.Protocol = ParserResourcesType::stringToProtocol((const char *)protocol); + } + catch (SALOME_Exception e) + { + // If it'not in all theses cases, the protocol is affected to rsh + resource.Protocol = rsh; + } + xmlFree(protocol); + } + else + resource.Protocol = rsh; + + if (xmlHasProp(machine_descr, (const xmlChar*)test_cluster_internal_protocol)) + { + xmlChar* iprotocol= xmlGetProp(machine_descr, (const xmlChar*)test_cluster_internal_protocol); + try + { + resource.ClusterInternalProtocol = ParserResourcesType::stringToProtocol((const char *)iprotocol); + } + catch (SALOME_Exception e) + { + // If it'not in all theses cases, the protocol is affected to rsh + resource.ClusterInternalProtocol = rsh; + } + xmlFree(iprotocol); + } + else + resource.ClusterInternalProtocol = resource.Protocol; + + if (xmlHasProp(machine_descr, (const xmlChar*)test_mode)) + { + xmlChar* mode=xmlGetProp(machine_descr, (const xmlChar*)test_mode); + switch ( mode[0] ) + { + case 'i': + resource.Mode = interactive; + break; + case 'b': + resource.Mode = batch; + break; + default: + // If it'not in all theses cases, the mode is affected to interactive + resource.Mode = interactive; + break; + } + xmlFree(mode); + } + else + resource.Mode = interactive; + + if (xmlHasProp(machine_descr, (const xmlChar*)test_batch)) + { + xmlChar* batch = xmlGetProp(machine_descr, (const xmlChar*)test_batch); + std::string aBatch = (const char*)batch; + xmlFree(batch); + if (aBatch == "pbs") + resource.Batch = pbs; + else if (aBatch == "lsf") + resource.Batch = lsf; + else if (aBatch == "sge") + resource.Batch = sge; + else if (aBatch == "ssh_batch") + resource.Batch = ssh_batch; + else if (aBatch == "ccc") + resource.Batch = ccc; + else if (aBatch == "slurm") + resource.Batch = slurm; + else if (aBatch == "ll") + resource.Batch = ll; + else if (aBatch == "vishnu") + resource.Batch = vishnu; + else + resource.Batch = none; + } + + if (xmlHasProp(machine_descr, (const xmlChar*)test_mpi)) + { + xmlChar* mpi = xmlGetProp(machine_descr, (const xmlChar*)test_mpi); + std::string anMpi = (const char*)mpi; + xmlFree(mpi); + if (anMpi == "lam") + resource.mpi = lam; + else if (anMpi == "mpich1") + resource.mpi = mpich1; + else if (anMpi == "mpich2") + resource.mpi = mpich2; + else if (anMpi == "openmpi") + resource.mpi = openmpi; + else if (anMpi == "slurmmpi") + resource.mpi = slurmmpi; + else if (anMpi == "prun") + resource.mpi = prun; + else + resource.mpi = nompi; + } + + if (xmlHasProp(machine_descr, (const xmlChar*)test_user_name)) + { + xmlChar* user_name= xmlGetProp(machine_descr, (const xmlChar*)test_user_name); + resource.UserName = (const char*)user_name; + xmlFree(user_name); + } + + if (xmlHasProp(machine_descr, (const xmlChar*)test_appli_path)) + { + xmlChar* appli_path = xmlGetProp(machine_descr, (const xmlChar*)test_appli_path); + resource.AppliPath = (const char*)appli_path; + xmlFree(appli_path); + } + + if (xmlHasProp(machine_descr, (const xmlChar*)test_os)) + { + xmlChar* os = xmlGetProp(machine_descr, (const xmlChar*)test_os); + resource.OS = (const char*)os; + xmlFree(os); + } + + if (xmlHasProp(machine_descr, (const xmlChar*)test_mem_in_mb)) + { + xmlChar* mem_in_mb = xmlGetProp(machine_descr, (const xmlChar*)test_mem_in_mb); + resource.DataForSort._memInMB = atoi((const char*)mem_in_mb); + xmlFree(mem_in_mb); + } + + if (xmlHasProp(machine_descr, (const xmlChar*)test_cpu_freq_mhz)) + { + xmlChar* cpu_freq_mhz = xmlGetProp(machine_descr, (const xmlChar*)test_cpu_freq_mhz); + resource.DataForSort._CPUFreqMHz = atoi((const char*)cpu_freq_mhz); + xmlFree(cpu_freq_mhz); + } + + if (xmlHasProp(machine_descr, (const xmlChar*)test_nb_of_nodes)) + { + xmlChar* nb_of_nodes = xmlGetProp(machine_descr, (const xmlChar*)test_nb_of_nodes); + resource.DataForSort._nbOfNodes = atoi((const char*)nb_of_nodes); + xmlFree(nb_of_nodes); + } + + if (xmlHasProp(machine_descr, (const xmlChar*)test_nb_of_proc_per_node)) + { + xmlChar* nb_of_proc_per_node = xmlGetProp(machine_descr, (const xmlChar*)test_nb_of_proc_per_node); + resource.DataForSort._nbOfProcPerNode = atoi((const char*)nb_of_proc_per_node); + xmlFree(nb_of_proc_per_node); + } + + if (xmlHasProp(machine_descr, (const xmlChar*)test_is_cluster_head)) + { + xmlChar* is_cluster_head = xmlGetProp(machine_descr, (const xmlChar*)test_is_cluster_head); + std::string str_ich = (const char*)is_cluster_head; + if (str_ich == "true") + { + resource.is_cluster_head = true; + } + else + { + resource.is_cluster_head = false; + } + xmlFree(is_cluster_head); + } + else + { + resource.is_cluster_head = false; + } + + if (xmlHasProp(machine_descr, (const xmlChar*)test_working_directory)) + { + xmlChar* working_directory = xmlGetProp(machine_descr, (const xmlChar*)test_working_directory); + resource.working_directory = (const char*)working_directory; + xmlFree(working_directory); + } + else + { + resource.working_directory = ""; + } + + // Process children nodes + xmlNodePtr aCurSubNode = machine_descr->xmlChildrenNode; + while(aCurSubNode != NULL) + { + // Process components + if ( !xmlStrcmp(aCurSubNode->name, (const xmlChar*)test_components) ) + { + //If a component is given, it is in a module with the same name + //except if the module name is given + if (xmlHasProp(aCurSubNode, (const xmlChar*)test_component_name)) + { + xmlChar* component_name = xmlGetProp(aCurSubNode, (const xmlChar*)test_component_name); + std::string aComponentName = (const char*)component_name; + _resource.ComponentsList.push_back(aComponentName); + if (xmlHasProp(aCurSubNode, (const xmlChar*)test_module_name)) + { + xmlChar* module_name = xmlGetProp(aCurSubNode, (const xmlChar*)test_module_name); + std::string aModuleName = (const char*)module_name; + _resource.ModulesList.push_back(aModuleName); + xmlFree(module_name); + } + else + _resource.ModulesList.push_back(aComponentName); + xmlFree(component_name); + } + } + // Process modules + else if ( !xmlStrcmp(aCurSubNode->name, (const xmlChar*)test_modules) ) + { + // If a module is given, we create an entry in componentsList and modulesList + // with the same name (module == component) + if (xmlHasProp(aCurSubNode, (const xmlChar*)test_module_name)) + { + xmlChar* component_name = xmlGetProp(aCurSubNode, (const xmlChar*)test_module_name); + std::string aComponentName = (const char*)component_name; + _resource.ComponentsList.push_back(aComponentName); + _resource.ModulesList.push_back(aComponentName); + xmlFree(component_name); + } + } + aCurSubNode = aCurSubNode->next; + } + return true; +} //============================================================================= /*! @@ -356,189 +686,119 @@ void SALOME_ResourcesCatalog_Handler::PrepareDocToXmlFile(xmlDocPtr theDoc) { // Node pointers xmlNodePtr root_node = NULL, node = NULL, node1 = NULL; - char string_buf[80]; root_node = xmlNewNode(NULL, BAD_CAST "resources"); xmlDocSetRootElement(theDoc, root_node); - for (map::iterator iter = - _resources_list.begin(); - iter != _resources_list.end(); - iter++) + std::map::iterator iter = _resources_list.begin(); + for (; iter != _resources_list.end(); iter++) + { + node = xmlNewChild(root_node, NULL, BAD_CAST test_machine, NULL); + RES_MESSAGE("Add resource name = " << (*iter).second.Name.c_str()); + xmlNewProp(node, BAD_CAST test_name, BAD_CAST (*iter).second.Name.c_str()); + xmlNewProp(node, BAD_CAST test_hostname, BAD_CAST (*iter).second.HostName.c_str()); + xmlNewProp(node, BAD_CAST test_appli_path, BAD_CAST (*iter).second.AppliPath.c_str()); + xmlNewProp(node, BAD_CAST test_batch_queue, BAD_CAST (*iter).second.batchQueue.c_str()); + xmlNewProp(node, BAD_CAST test_user_commands, BAD_CAST (*iter).second.userCommands.c_str()); + xmlNewProp(node, + BAD_CAST test_protocol, + BAD_CAST ParserResourcesType::protocolToString((*iter).second.Protocol).c_str()); + xmlNewProp(node, + BAD_CAST test_cluster_internal_protocol, + BAD_CAST ParserResourcesType::protocolToString((*iter).second.ClusterInternalProtocol).c_str()); + xmlNewProp(node, BAD_CAST test_working_directory, BAD_CAST (*iter).second.working_directory.c_str()); + if ((*iter).second.is_cluster_head) + xmlNewProp(node, BAD_CAST test_is_cluster_head, BAD_CAST "true"); + else + xmlNewProp(node, BAD_CAST test_is_cluster_head, BAD_CAST "false"); + + switch ((*iter).second.Mode) { - node = xmlNewChild(root_node, NULL, BAD_CAST test_machine, NULL); - xmlNewProp(node, BAD_CAST test_hostname, BAD_CAST (*iter).second.HostName.c_str()); - xmlNewProp(node, BAD_CAST test_alias, BAD_CAST (*iter).second.Alias.c_str()); - xmlNewProp(node, BAD_CAST test_batch_queue, BAD_CAST (*iter).second.batchQueue.c_str()); - xmlNewProp(node, BAD_CAST test_user_commands, BAD_CAST (*iter).second.userCommands.c_str()); - - switch ((*iter).second.Protocol) - { - case rsh: - xmlNewProp(node, BAD_CAST test_protocol, BAD_CAST "rsh"); - break; - case ssh: - xmlNewProp(node, BAD_CAST test_protocol, BAD_CAST "ssh"); - break; - default: - xmlNewProp(node, BAD_CAST test_protocol, BAD_CAST "rsh"); - } - - switch ((*iter).second.Mode) - { - case interactive: - xmlNewProp(node, BAD_CAST test_mode, BAD_CAST "interactive"); - break; - case batch: - xmlNewProp(node, BAD_CAST test_mode, BAD_CAST "batch"); - break; - default: - xmlNewProp(node, BAD_CAST test_mode, BAD_CAST "interactive"); - } - - switch ((*iter).second.Batch) - { - case pbs: - xmlNewProp(node, BAD_CAST test_batch, BAD_CAST "pbs"); - break; - case lsf: - xmlNewProp(node, BAD_CAST test_batch, BAD_CAST "lsf"); - break; - case sge: - xmlNewProp(node, BAD_CAST test_batch, BAD_CAST "sge"); - break; - default: - xmlNewProp(node, BAD_CAST test_batch, BAD_CAST ""); - } - - switch ((*iter).second.mpi) - { - case lam: - xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST "lam"); - break; - case mpich1: - xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST "mpich1"); - break; - case mpich2: - xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST "mpich2"); - break; - case openmpi: - xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST "openmpi"); - break; - case slurm: - xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST "slurm"); - break; - case prun: - xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST "prun"); - break; - default: - xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST ""); - } - - xmlNewProp(node, BAD_CAST test_user_name, BAD_CAST (*iter).second.UserName.c_str()); - - for (vector::const_iterator iter2 = - (*iter).second.ModulesList.begin(); - iter2 != (*iter).second.ModulesList.end(); - iter2++) - { - node1 = xmlNewChild(node, NULL, BAD_CAST test_modules, NULL); - xmlNewProp(node1, BAD_CAST test_module_name, BAD_CAST (*iter2).c_str()); - } - - xmlNewProp(node, BAD_CAST test_os, BAD_CAST (*iter).second.OS.c_str()); - xmlNewProp(node, BAD_CAST test_mem_in_mb, BAD_CAST sprintf(string_buf, "%u", (*iter).second.DataForSort._memInMB)); - xmlNewProp(node, BAD_CAST test_cpu_freq_mhz, BAD_CAST sprintf(string_buf, "%u", (*iter).second.DataForSort._CPUFreqMHz)); - xmlNewProp(node, BAD_CAST test_nb_of_nodes, BAD_CAST sprintf(string_buf, "%u", (*iter).second.DataForSort._nbOfNodes)); - xmlNewProp(node, BAD_CAST test_nb_of_proc_per_node, BAD_CAST sprintf(string_buf, "%u", (*iter).second.DataForSort._nbOfProcPerNode)); + case interactive: + xmlNewProp(node, BAD_CAST test_mode, BAD_CAST "interactive"); + break; + case batch: + xmlNewProp(node, BAD_CAST test_mode, BAD_CAST "batch"); + break; + default: + xmlNewProp(node, BAD_CAST test_mode, BAD_CAST "interactive"); } - for (map::iterator iter = - _resources_batch_list.begin(); - iter != _resources_batch_list.end(); - iter++) - { - node = xmlNewChild(root_node, NULL, BAD_CAST test_machine, NULL); - xmlNewProp(node, BAD_CAST test_hostname, BAD_CAST (*iter).second.HostName.c_str()); - xmlNewProp(node, BAD_CAST test_alias, BAD_CAST (*iter).second.Alias.c_str()); - - switch ((*iter).second.Protocol) - { - case rsh: - xmlNewProp(node, BAD_CAST test_protocol, BAD_CAST "rsh"); - break; - case ssh: - xmlNewProp(node, BAD_CAST test_protocol, BAD_CAST "ssh"); - break; - default: - xmlNewProp(node, BAD_CAST test_protocol, BAD_CAST "rsh"); - } - - switch ((*iter).second.Mode) - { - case interactive: - xmlNewProp(node, BAD_CAST test_mode, BAD_CAST "interactive"); - break; - case batch: - xmlNewProp(node, BAD_CAST test_mode, BAD_CAST "batch"); - break; - default: - xmlNewProp(node, BAD_CAST test_mode, BAD_CAST "interactive"); - } - - switch ((*iter).second.Batch) - { - case pbs: - xmlNewProp(node, BAD_CAST test_batch, BAD_CAST "pbs"); - break; - case lsf: - xmlNewProp(node, BAD_CAST test_batch, BAD_CAST "lsf"); - break; - case sge: - xmlNewProp(node, BAD_CAST test_batch, BAD_CAST "sge"); - break; - default: - xmlNewProp(node, BAD_CAST test_batch, BAD_CAST ""); - } - switch ((*iter).second.mpi) - { - case lam: - xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST "lam"); - break; - case mpich1: - xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST "mpich1"); - break; - case mpich2: - xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST "mpich2"); - break; - case openmpi: - xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST "openmpi"); - break; - case slurm: - xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST "slurm"); - break; - case prun: - xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST "prun"); - break; - default: - xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST ""); - } + switch ((*iter).second.Batch) + { + case pbs: + xmlNewProp(node, BAD_CAST test_batch, BAD_CAST "pbs"); + break; + case lsf: + xmlNewProp(node, BAD_CAST test_batch, BAD_CAST "lsf"); + break; + case sge: + xmlNewProp(node, BAD_CAST test_batch, BAD_CAST "sge"); + break; + case ccc: + xmlNewProp(node, BAD_CAST test_batch, BAD_CAST "ccc"); + break; + case slurm: + xmlNewProp(node, BAD_CAST test_batch, BAD_CAST "slurm"); + break; + case ssh_batch: + xmlNewProp(node, BAD_CAST test_batch, BAD_CAST "ssh_batch"); + break; + case ll: + xmlNewProp(node, BAD_CAST test_batch, BAD_CAST "ll"); + break; + case vishnu: + xmlNewProp(node, BAD_CAST test_batch, BAD_CAST "vishnu"); + break; + default: + xmlNewProp(node, BAD_CAST test_batch, BAD_CAST ""); + } - xmlNewProp(node, BAD_CAST test_user_name, BAD_CAST (*iter).second.UserName.c_str()); + switch ((*iter).second.mpi) + { + case lam: + xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST "lam"); + break; + case mpich1: + xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST "mpich1"); + break; + case mpich2: + xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST "mpich2"); + break; + case openmpi: + xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST "openmpi"); + break; + case slurmmpi: + xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST "slurmmpi"); + break; + case prun: + xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST "prun"); + break; + default: + xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST ""); + } - for (vector::const_iterator iter2 = - (*iter).second.ModulesList.begin(); - iter2 != (*iter).second.ModulesList.end(); - iter2++) - { - node1 = xmlNewChild(node, NULL, BAD_CAST test_modules, NULL); - xmlNewProp(node1, BAD_CAST test_module_name, BAD_CAST (*iter2).c_str()); - } + xmlNewProp(node, BAD_CAST test_user_name, BAD_CAST (*iter).second.UserName.c_str()); - xmlNewProp(node, BAD_CAST test_os, BAD_CAST (*iter).second.OS.c_str()); - xmlNewProp(node, BAD_CAST test_mem_in_mb, BAD_CAST sprintf(string_buf, "%u", (*iter).second.DataForSort._memInMB)); - xmlNewProp(node, BAD_CAST test_cpu_freq_mhz, BAD_CAST sprintf(string_buf, "%u", (*iter).second.DataForSort._CPUFreqMHz)); - xmlNewProp(node, BAD_CAST test_nb_of_nodes, BAD_CAST sprintf(string_buf, "%u", (*iter).second.DataForSort._nbOfNodes)); - xmlNewProp(node, BAD_CAST test_nb_of_proc_per_node, BAD_CAST sprintf(string_buf, "%u", (*iter).second.DataForSort._nbOfProcPerNode)); + std::vector::const_iterator iter2 = (*iter).second.ComponentsList.begin(); + for(;iter2 != (*iter).second.ComponentsList.end(); iter2++) + { + node1 = xmlNewChild(node, NULL, BAD_CAST test_components, NULL); + xmlNewProp(node1, BAD_CAST test_component_name, BAD_CAST (*iter2).c_str()); } + + xmlNewProp(node, BAD_CAST test_os, BAD_CAST (*iter).second.OS.c_str()); + std::ostringstream mem_stream; + mem_stream << (*iter).second.DataForSort._memInMB; + xmlNewProp(node, BAD_CAST test_mem_in_mb, BAD_CAST mem_stream.str().c_str()); + std::ostringstream cpu_stream; + cpu_stream << (*iter).second.DataForSort._CPUFreqMHz; + xmlNewProp(node, BAD_CAST test_cpu_freq_mhz, BAD_CAST cpu_stream.str().c_str()); + std::ostringstream nb_nodes_stream; + nb_nodes_stream << (*iter).second.DataForSort._nbOfNodes; + xmlNewProp(node, BAD_CAST test_nb_of_nodes, BAD_CAST nb_nodes_stream.str().c_str()); + std::ostringstream nb_proc_per_nodes_stream; + nb_proc_per_nodes_stream << (*iter).second.DataForSort._nbOfProcPerNode; + xmlNewProp(node, BAD_CAST test_nb_of_proc_per_node, BAD_CAST nb_proc_per_nodes_stream.str().c_str()); + } } diff --git a/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.hxx b/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.hxx index 35cd21296..8d94c3d82 100755 --- a/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.hxx +++ b/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME ResourcesCatalog : implementation of catalog resources parsing (SALOME_ModuleCatalog.idl) // File : SALOME_ResourcesCatalog_Handler.hxx // Author : Estelle Deville @@ -42,44 +43,54 @@ class RESOURCESMANAGER_EXPORT SALOME_ResourcesCatalog_Handler { public : - SALOME_ResourcesCatalog_Handler(MapOfParserResourcesType& resources_list, - MapOfParserResourcesType& resources_batch_list); + SALOME_ResourcesCatalog_Handler(MapOfParserResourcesType& resources_list); const MapOfParserResourcesType& GetResourcesAfterParsing() const; virtual ~SALOME_ResourcesCatalog_Handler(); void ProcessXmlDocument(xmlDocPtr theDoc); + + bool ProcessMachine(xmlNodePtr machine_descr, ParserResourcesType & resource); + bool ProcessCluster(xmlNodePtr cluster_descr, ParserResourcesType & resource); + bool ProcessMember(xmlNodePtr member_descr, ParserResourcesClusterMembersType & resource); void PrepareDocToXmlFile(xmlDocPtr theDoc); private : - std::string previous_module_name; + std::string previous_component_name; ParserResourcesType _resource; MapOfParserResourcesType& _resources_list; - MapOfParserResourcesType& _resources_batch_list; const char *test_machine; - const char *test_resources; - + const char *test_cluster; + const char *test_name; const char *test_hostname; - const char *test_alias; const char *test_protocol; + const char *test_cluster_internal_protocol; const char *test_mode; const char *test_batch; const char *test_mpi; const char *test_user_name; const char *test_appli_path; + // for compatibility const char *test_modules; const char *test_module_name; + const char *test_components; + const char *test_component_name; const char *test_os; const char *test_mem_in_mb; const char *test_cpu_freq_mhz; const char *test_nb_of_nodes; + const char *test_nb_of_proc; const char *test_nb_of_proc_per_node; const char *test_batch_queue; const char *test_user_commands; + const char *test_use; + const char *test_members; + const char *test_is_cluster_head; + const char *test_working_directory; }; diff --git a/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx b/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx index fff95034a..50360f72f 100644 --- a/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx +++ b/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx @@ -1,32 +1,33 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "SALOME_ResourcesCatalog_Parser.hxx" +#include "Utils_SALOME_Exception.hxx" #include #include #define NULL_VALUE 0 -using namespace std; - +unsigned int ResourceDataToSort::_nbOfProcWanted = NULL_VALUE; unsigned int ResourceDataToSort::_nbOfNodesWanted = NULL_VALUE; unsigned int ResourceDataToSort::_nbOfProcPerNodeWanted = NULL_VALUE; unsigned int ResourceDataToSort::_CPUFreqMHzWanted = NULL_VALUE; @@ -35,12 +36,12 @@ unsigned int ResourceDataToSort::_memInMBWanted = NULL_VALUE; ResourceDataToSort::ResourceDataToSort() {} -ResourceDataToSort::ResourceDataToSort(const string& hostname, +ResourceDataToSort::ResourceDataToSort(const std::string& name, unsigned int nbOfNodes, unsigned int nbOfProcPerNode, unsigned int CPUFreqMHz, unsigned int memInMB): - _hostName(hostname), + _Name(name), _nbOfNodes(nbOfNodes), _nbOfProcPerNode(nbOfProcPerNode), _CPUFreqMHz(CPUFreqMHz), @@ -57,6 +58,19 @@ bool ResourceDataToSort::operator< (const ResourceDataToSort& other) const unsigned int ResourceDataToSort::GetNumberOfPoints() const { unsigned int ret = 0; + //priority 0 : Nb of proc + + if (_nbOfProcWanted != NULL_VALUE) + { + unsigned int nb_proc = _nbOfNodes * _nbOfProcPerNode; + if (nb_proc == _nbOfProcWanted) + ret += 30000; + else if (nb_proc > _nbOfProcWanted) + ret += 20000; + else + ret += 10000; + } + //priority 1 : Nb of nodes if (_nbOfNodesWanted != NULL_VALUE) @@ -102,56 +116,165 @@ unsigned int ResourceDataToSort::GetNumberOfPoints() const ret += 1; } + //RES_MESSAGE("[GetNumberOfPoints] points number for resource: " << _Name << " " << ret); return ret; } //! Method used for debug void ResourceDataToSort::Print() const { - cout << _nbOfNodes << endl; - cout << _nbOfProcPerNode << endl; - cout << _CPUFreqMHz << endl; - cout << _memInMB << endl; + std::cout << _nbOfNodes << std::endl; + std::cout << _nbOfProcPerNode << std::endl; + std::cout << _CPUFreqMHz << std::endl; + std::cout << _memInMB << std::endl; + } + + +std::string ParserResourcesType::protocolToString(AccessProtocolType protocol) +{ + switch (protocol) + { + case rsh: + return "rsh"; + case ssh: + return "ssh"; + case srun: + return "srun"; + case pbsdsh: + return "pbsdsh"; + case blaunch: + return "blaunch"; + default: + throw SALOME_Exception("Unknown protocol"); } +} + +AccessProtocolType ParserResourcesType::stringToProtocol(const std::string & protocolStr) +{ + if (protocolStr == "rsh") + return rsh; + else if (protocolStr == "ssh") + return ssh; + else if (protocolStr == "srun") + return srun; + else if (protocolStr == "pbsdsh") + return pbsdsh; + else if (protocolStr == "blaunch") + return blaunch; + else + throw SALOME_Exception("Unknown protocol"); +} -void ParserResourcesType::Print() const +void ParserResourcesType::Print() { - ostringstream oss; - oss << endl << - "HostName : " << HostName << endl << - "Alias : " << Alias << endl << - "NbOfNodes : " << DataForSort._nbOfNodes << endl << - "NbOfProcPerNode : " << DataForSort._nbOfProcPerNode << endl << - "CPUFreqMHz : " << DataForSort._CPUFreqMHz << endl << - "MemInMB : " << DataForSort._memInMB << endl << - "Protocol : " << Protocol << endl << - "Mode : " << Mode << endl << - "Batch : " << Batch << endl << - "mpi : " << mpi << endl << - "UserName : " << UserName << endl << - "AppliPath : " << AppliPath << endl << - "OS : " << OS << endl << - "batchQueue : " << batchQueue << endl << - "userCommands : " << userCommands << endl << - "Modules : " << endl; - - for(int i=0;i::iterator it; + for(it = ClusterMembersList.begin(); + it != ClusterMembersList.end(); + it++) + { + oss << "Cluster member called : " << (*it).HostName << std::endl; + } + std::cout << oss.str() << std::endl; +} + +std::string +ParserResourcesType::PrintAccessProtocolType() const +{ + return protocolToString(Protocol); +} + +std::string +ParserResourcesType::PrintClusterInternalProtocol() const +{ + return protocolToString(ClusterInternalProtocol); +} + +std::string +ParserResourcesType::PrintAccessModeType() const +{ + if (Mode == interactive) + return "interactive"; + else + return "batch"; +} + +std::string +ParserResourcesType::PrintBatchType() const +{ + if (Batch == none) + return "none"; + else if (Batch == pbs) + return "pbs"; + else if (Batch == lsf) + return "lsf"; + else if (Batch == sge) + return "sge"; + else if (Batch == ccc) + return "ccc"; + else if (Batch == slurm) + return "slurm"; + else if (Batch == ll) + return "ll"; + else if (Batch == vishnu) + return "vishnu"; + else + return "ssh"; +} + +std::string +ParserResourcesType::PrintMpiImplType() const +{ + if (mpi == nompi) + return "no mpi"; + else if (mpi == lam) + return "lam"; + else if (mpi == mpich1) + return "mpich1"; + else if (mpi == mpich2) + return "mpich2"; + else if (mpi == openmpi) + return "openmpi"; + else if (mpi == slurmmpi) + return "slurmmpi"; + else + return "prun"; } void ParserResourcesType::Clear() { - DataForSort._hostName = ""; - DataForSort._nbOfNodes = 1; - DataForSort._nbOfProcPerNode = 1; - DataForSort._CPUFreqMHz = 0; - DataForSort._memInMB = 0; + Name = ""; HostName = ""; - Alias = ""; Protocol = rsh; + ClusterInternalProtocol = rsh; Mode = interactive; Batch = none; mpi = nompi; @@ -159,6 +282,17 @@ void ParserResourcesType::Clear() AppliPath = ""; batchQueue = ""; userCommands = ""; - ModulesList.clear(); + ComponentsList.clear(); OS = ""; + use = ""; + ClusterMembersList.clear(); + nbOfProc = 1; + is_cluster_head = false; + working_directory = ""; + + DataForSort._Name = ""; + DataForSort._nbOfNodes = 1; + DataForSort._nbOfProcPerNode = 1; + DataForSort._CPUFreqMHz = 0; + DataForSort._memInMB = 0; } diff --git a/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.hxx b/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.hxx index 2d723b580..20a390db1 100755 --- a/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.hxx +++ b/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME ResourcesCatalog : implementation of catalog resources parsing (SALOME_ModuleCatalog.idl) // File : SALOME_ResourcesCatalog_Parser.hxx // Author : Estelle Deville @@ -32,26 +33,32 @@ #include #include +#include #include #include -enum AccessProtocolType {rsh, ssh}; +#ifdef WNT +#pragma warning(disable:4251) // Warning DLL Interface ... +#endif + +enum AccessProtocolType {rsh, ssh, srun, pbsdsh, blaunch}; enum AccessModeType {interactive, batch}; -enum BatchType {none, pbs, lsf, sge}; +enum BatchType {none, pbs, lsf, sge, ssh_batch, ccc, ll, slurm, vishnu}; -enum MpiImplType {nompi, lam, mpich1, mpich2, openmpi, slurm, prun}; +enum MpiImplType {nompi, lam, mpich1, mpich2, openmpi, slurmmpi, prun}; class RESOURCESMANAGER_EXPORT ResourceDataToSort { public: - std::string _hostName; + std::string _Name; unsigned int _nbOfNodes; unsigned int _nbOfProcPerNode; unsigned int _CPUFreqMHz; unsigned int _memInMB; + static unsigned int _nbOfProcWanted; static unsigned int _nbOfNodesWanted; static unsigned int _nbOfProcPerNodeWanted; static unsigned int _CPUFreqMHzWanted; @@ -59,7 +66,7 @@ class RESOURCESMANAGER_EXPORT ResourceDataToSort public: ResourceDataToSort(); - ResourceDataToSort(const std::string& hostname, + ResourceDataToSort(const std::string& name, unsigned int nbOfNodes, unsigned int nbOfProcPerNode, unsigned int CPUFreqMHz, @@ -71,26 +78,53 @@ class RESOURCESMANAGER_EXPORT ResourceDataToSort unsigned int GetNumberOfPoints() const; }; +struct RESOURCESMANAGER_EXPORT ParserResourcesClusterMembersType +{ + std::string HostName; + AccessProtocolType Protocol; + AccessProtocolType ClusterInternalProtocol; + std::string UserName; + std::string AppliPath; + ResourceDataToSort DataForSort; +}; + struct RESOURCESMANAGER_EXPORT ParserResourcesType - { - ResourceDataToSort DataForSort; - std::string HostName; - std::string Alias; - AccessProtocolType Protocol; - AccessModeType Mode; - BatchType Batch; - MpiImplType mpi; - std::string UserName; - std::string AppliPath; - std::vector ModulesList; - std::string OS; - std::string batchQueue; - std::string userCommands; +{ + ResourceDataToSort DataForSort; + std::string Name; + std::string HostName; + AccessProtocolType Protocol; + AccessProtocolType ClusterInternalProtocol; + AccessModeType Mode; + BatchType Batch; + MpiImplType mpi; + std::string UserName; + std::string AppliPath; + std::vector ComponentsList; + std::vector ModulesList; + std::string OS; + std::string batchQueue; + std::string userCommands; + std::string use; + std::list ClusterMembersList; + unsigned int nbOfProc; + bool is_cluster_head; + std::string working_directory; - void Print() const; - void Clear(); - }; + void Print(); + void Clear(); + + static std::string protocolToString(AccessProtocolType protocol); + static AccessProtocolType stringToProtocol(const std::string & protocolStr); + + std::string PrintAccessProtocolType() const; + std::string PrintAccessModeType() const; + std::string PrintBatchType() const; + std::string PrintMpiImplType() const; + std::string PrintClusterInternalProtocol() const; +}; typedef std::map MapOfParserResourcesType; +typedef std::map::iterator MapOfParserResourcesType_it; #endif //SALOME_RESOURCES_CATALOG_PARSER diff --git a/src/ResourcesManager/SALOME_ResourcesManager.cxx b/src/ResourcesManager/SALOME_ResourcesManager.cxx index 408c2250a..eb932fdc8 100644 --- a/src/ResourcesManager/SALOME_ResourcesManager.cxx +++ b/src/ResourcesManager/SALOME_ResourcesManager.cxx @@ -1,30 +1,32 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "SALOME_ResourcesManager.hxx" #include "Utils_ExceptHandlers.hxx" #include "Utils_CorbaException.hxx" #include "OpUtil.hxx" #include +#include #ifndef WIN32 #include #else @@ -44,8 +46,6 @@ #define MAX_SIZE_FOR_HOSTNAME 256; -using namespace std; - const char *SALOME_ResourcesManager::_ResourcesManagerNameInNS = "/ResourcesManager"; //============================================================================= @@ -56,8 +56,8 @@ const char *SALOME_ResourcesManager::_ResourcesManagerNameInNS = "/ResourcesMana SALOME_ResourcesManager:: SALOME_ResourcesManager(CORBA::ORB_ptr orb, - PortableServer::POA_var poa, - SALOME_NamingService *ns, + PortableServer::POA_var poa, + SALOME_NamingService *ns, const char *xmlFilePath) : _rm(xmlFilePath) { MESSAGE("SALOME_ResourcesManager constructor"); @@ -66,9 +66,7 @@ SALOME_ResourcesManager(CORBA::ORB_ptr orb, _poa = PortableServer::POA::_duplicate(poa) ; PortableServer::ObjectId_var id = _poa->activate_object(this); CORBA::Object_var obj = _poa->id_to_reference(id); - Engines::SalomeLauncher_var refContMan = - Engines::SalomeLauncher::_narrow(obj); - + Engines::ResourcesManager_var refContMan = Engines::ResourcesManager::_narrow(obj); _NS->Register(refContMan,_ResourcesManagerNameInNS); MESSAGE("SALOME_ResourcesManager constructor end"); } @@ -85,8 +83,8 @@ SALOME_ResourcesManager(CORBA::ORB_ptr orb, //============================================================================= SALOME_ResourcesManager::SALOME_ResourcesManager(CORBA::ORB_ptr orb, - PortableServer::POA_var poa, - SALOME_NamingService *ns) : _rm() + PortableServer::POA_var poa, + SALOME_NamingService *ns) : _rm() { MESSAGE("SALOME_ResourcesManager constructor"); _NS = ns; @@ -124,49 +122,56 @@ void SALOME_ResourcesManager::Shutdown() _NS->Destroy_Name(_ResourcesManagerNameInNS); PortableServer::ObjectId_var oid = _poa->servant_to_id(this); _poa->deactivate_object(oid); - //_remove_ref(); } //============================================================================= +//! get the name of resources fitting the specified constraints (params) /*! - * get the list of name of ressources fitting for the specified module. * If hostname specified, check it is local or known in resources catalog. * * Else * - select first machines with corresponding OS (all machines if * parameter OS empty), - * - then select the sublist of machines on witch the module is known + * - then select the sublist of machines on which the component is known * (if the result is empty, that probably means that the inventory of - * modules is probably not done, so give complete list from previous step) + * components is probably not done, so give complete list from previous step) */ //============================================================================= -Engines::MachineList * -SALOME_ResourcesManager::GetFittingResources(const Engines::MachineParameters& params, - const Engines::CompoList& componentList) +Engines::ResourceList * +SALOME_ResourcesManager::GetFittingResources(const Engines::ResourceParameters& params) { -// MESSAGE("ResourcesManager::GetFittingResources"); - machineParams p; + MESSAGE("ResourcesManager::GetFittingResources"); + Engines::ResourceList * ret = new Engines::ResourceList; + + // CORBA -> C++ + resourceParams p; + p.name = params.name; p.hostname = params.hostname; p.OS = params.OS; + p.nb_proc = params.nb_proc; p.nb_node = params.nb_node; p.nb_proc_per_node = params.nb_proc_per_node; p.cpu_clock = params.cpu_clock; p.mem_mb = params.mem_mb; - - vector cl; - for(unsigned int i=0;i vec = _rm.GetFittingResources(p,cl); - ret->length(vec.size()); - for(unsigned int i=0;i vec = _rm.GetFittingResources(p); + + // C++ -> CORBA + ret->length(vec.size()); + for(unsigned int i=0;i ml; - for(unsigned int i=0;i C++ + std::vector rl; + for(unsigned int i=0; icontainer_name = CORBA::string_dup(""); + // CORBA -> C++ + std::vector rl; + for(unsigned int i=0; iname = CORBA::string_dup(resource.Name.c_str()); p_ptr->hostname = CORBA::string_dup(resource.HostName.c_str()); - p_ptr->alias = CORBA::string_dup(resource.Alias.c_str()); - if( resource.Protocol == rsh ) - p_ptr->protocol = "rsh"; - else if( resource.Protocol == ssh ) - p_ptr->protocol = "ssh"; + p_ptr->protocol = ParserResourcesType::protocolToString(resource.Protocol).c_str(); + p_ptr->iprotocol = ParserResourcesType::protocolToString(resource.ClusterInternalProtocol).c_str(); p_ptr->username = CORBA::string_dup(resource.UserName.c_str()); p_ptr->applipath = CORBA::string_dup(resource.AppliPath.c_str()); - p_ptr->modList.length(resource.ModulesList.size()); - for(unsigned int i=0;imodList[i] = CORBA::string_dup(resource.ModulesList[i].c_str()); + p_ptr->componentList.length(resource.ComponentsList.size()); + for(unsigned int i=0;icomponentList[i] = CORBA::string_dup(resource.ComponentsList[i].c_str()); p_ptr->OS = CORBA::string_dup(resource.OS.c_str()); p_ptr->mem_mb = resource.DataForSort._memInMB; p_ptr->cpu_clock = resource.DataForSort._CPUFreqMHz; p_ptr->nb_proc_per_node = resource.DataForSort._nbOfProcPerNode; p_ptr->nb_node = resource.DataForSort._nbOfNodes; + p_ptr->is_cluster_head = resource.is_cluster_head; + p_ptr->working_directory = CORBA::string_dup(resource.working_directory.c_str()); if( resource.mpi == lam ) p_ptr->mpiImpl = "lam"; @@ -219,8 +237,8 @@ Engines::MachineParameters* SALOME_ResourcesManager::GetMachineParameters(const p_ptr->mpiImpl = "mpich2"; else if( resource.mpi == openmpi ) p_ptr->mpiImpl = "openmpi"; - else if( resource.mpi == slurm ) - p_ptr->mpiImpl = "slurm"; + else if( resource.mpi == slurmmpi ) + p_ptr->mpiImpl = "slurmmpi"; else if( resource.mpi == prun ) p_ptr->mpiImpl = "prun"; @@ -230,9 +248,286 @@ Engines::MachineParameters* SALOME_ResourcesManager::GetMachineParameters(const p_ptr->batch = "lsf"; else if( resource.Batch == sge ) p_ptr->batch = "sge"; - - p_ptr->nb_component_nodes=1; + else if( resource.Batch == ccc ) + p_ptr->batch = "ccc"; + else if( resource.Batch == slurm ) + p_ptr->batch = "slurm"; + else if( resource.Batch == ssh_batch ) + p_ptr->batch = "ssh"; + else if( resource.Batch == ll ) + p_ptr->batch = "ll"; + else if( resource.Batch == vishnu ) + p_ptr->batch = "vishnu"; return p_ptr; } +void +SALOME_ResourcesManager::AddResource(const Engines::ResourceDefinition& new_resource, + CORBA::Boolean write, + const char * xml_file) +{ + ParserResourcesType resource; + resource.Name = new_resource.name.in(); + resource.HostName = new_resource.hostname.in(); + resource.OS = new_resource.OS.in(); + resource.AppliPath = new_resource.applipath.in(); + resource.DataForSort._memInMB = new_resource.mem_mb; + resource.DataForSort._CPUFreqMHz = new_resource.cpu_clock; + resource.DataForSort._nbOfNodes = new_resource.nb_node; + resource.DataForSort._nbOfProcPerNode = new_resource.nb_proc_per_node; + resource.UserName = new_resource.username.in(); + resource.is_cluster_head = new_resource.is_cluster_head; + resource.working_directory = new_resource.working_directory.in(); + + std::string aBatch = new_resource.batch.in(); + if (aBatch == "pbs") + resource.Batch = pbs; + else if (aBatch == "lsf") + resource.Batch = lsf; + else if (aBatch == "sge") + resource.Batch = sge; + else if (aBatch == "slurm") + resource.Batch = slurm; + else if (aBatch == "ccc") + resource.Batch = ccc; + else if (aBatch == "ssh_batch") + resource.Batch = ssh_batch; + else if (aBatch == "ll") + resource.Batch = ll; + else if (aBatch == "vishnu") + resource.Batch = vishnu; + else if (aBatch == "") + resource.Batch = none; + else { + INFOS("Bad Batch definition in AddResource: " << aBatch); + std::string message("Bad Batch definition in AddResource: "); + message += aBatch; + THROW_SALOME_CORBA_EXCEPTION(message.c_str(),SALOME::BAD_PARAM); + } + + std::string anMpi = new_resource.mpiImpl.in(); + if (anMpi == "lam") + resource.mpi = lam; + else if (anMpi == "mpich1") + resource.mpi = mpich1; + else if (anMpi == "mpich2") + resource.mpi = mpich2; + else if (anMpi == "openmpi") + resource.mpi = openmpi; + else if (anMpi == "slurmmpi") + resource.mpi = slurmmpi; + else if (anMpi == "prun") + resource.mpi = prun; + else if (anMpi == "") + resource.mpi = nompi; + else { + INFOS("Bad MPI definition in AddResource: " << anMpi); + std::string message("Bad MPI definition in AddResource: "); + message += anMpi; + THROW_SALOME_CORBA_EXCEPTION(message.c_str(),SALOME::BAD_PARAM); + } + + std::string mode_str = new_resource.mode.in(); + if (mode_str == "interactive") + resource.Mode = interactive; + else if (mode_str == "batch") + resource.Mode = batch; + else if (mode_str == "") + resource.Mode = interactive; + else { + INFOS("Bad mode definition in AddResource: " << mode_str); + std::string message("Bad mode definition in AddResource: "); + message += mode_str; + THROW_SALOME_CORBA_EXCEPTION(message.c_str(),SALOME::BAD_PARAM); + } + + std::string protocol = new_resource.protocol.in(); + try + { + resource.Protocol = ParserResourcesType::stringToProtocol(protocol); + } + catch (SALOME_Exception e) + { + INFOS("Bad protocol definition in AddResource: " << protocol); + std::string message("Bad protocol definition in AddResource: "); + message += protocol; + THROW_SALOME_CORBA_EXCEPTION(message.c_str(),SALOME::BAD_PARAM); + } + + std::string iprotocol = new_resource.iprotocol.in(); + try + { + resource.ClusterInternalProtocol = ParserResourcesType::stringToProtocol(iprotocol); + } + catch (SALOME_Exception e) + { + INFOS("Bad iprotocol definition in AddResource: " << iprotocol); + std::string message("Bad iprotocol definition in AddResource: "); + message += iprotocol; + THROW_SALOME_CORBA_EXCEPTION(message.c_str(),SALOME::BAD_PARAM); + } + + for (CORBA::ULong i = 0; i < new_resource.componentList.length(); i++) + resource.ComponentsList.push_back(new_resource.componentList[i].in()); + + _rm.AddResourceInCatalog(resource); + + if (write) + { + _rm.WriteInXmlFile(std::string(xml_file)); + _rm.ParseXmlFiles(); + } +} + +void +SALOME_ResourcesManager::RemoveResource(const char * resource_name, + CORBA::Boolean write, + const char * xml_file) +{ + _rm.DeleteResourceInCatalog(resource_name); + if (write) + { + _rm.WriteInXmlFile(std::string(xml_file)); + _rm.ParseXmlFiles(); + } +} + +std::string +SALOME_ResourcesManager::getMachineFile(std::string resource_name, + CORBA::Long nb_procs, + std::string parallelLib) +{ + std::string machine_file_name(""); + + if (parallelLib == "Dummy") + { + MESSAGE("[getMachineFile] parallelLib is Dummy"); + MapOfParserResourcesType resourcesList = _rm.GetList(); + if (resourcesList.find(resource_name) != resourcesList.end()) + { + ParserResourcesType resource = resourcesList[resource_name]; + + // Check if resource is cluster or not + if (resource.ClusterMembersList.empty()) + { + //It is not a cluster so we create a cluster with one machine + ParserResourcesClusterMembersType fake_node; + fake_node.HostName = resource.HostName; + fake_node.Protocol = resource.Protocol; + fake_node.ClusterInternalProtocol = resource.ClusterInternalProtocol; + fake_node.UserName = resource.UserName; + fake_node.AppliPath = resource.AppliPath; + fake_node.DataForSort = resource.DataForSort; + + resource.ClusterMembersList.push_front(fake_node); + } + + // Creating list of machines for creating the machine file + std::list list_of_machines; + std::list::iterator cluster_it = + resource.ClusterMembersList.begin(); + while (cluster_it != resource.ClusterMembersList.end()) + { + // For each member of the cluster we add a nbOfNodes * nbOfProcPerNode in the list + unsigned int number_of_proc = (*cluster_it).DataForSort._nbOfNodes * + (*cluster_it).DataForSort._nbOfProcPerNode; + for (unsigned int i = 0; i < number_of_proc; i++) + list_of_machines.push_back((*cluster_it).HostName); + cluster_it++; + } + + // Creating machine file + machine_file_name = tmpnam(NULL); + std::ofstream machine_file(machine_file_name.c_str(), std::ios_base::out); + + CORBA::Long machine_number = 0; + std::list::iterator it = list_of_machines.begin(); + while (machine_number != nb_procs) + { + // Adding a new node to the machine file + machine_file << *it << std::endl; + + // counting... + it++; + if (it == list_of_machines.end()) + it = list_of_machines.begin(); + machine_number++; + } + } + else + INFOS("[getMachineFile] Error resource_name not found in resourcesList -> " << resource_name); + } + else if (parallelLib == "Mpi") + { + MESSAGE("[getMachineFile] parallelLib is Mpi"); + + MapOfParserResourcesType resourcesList = _rm.GetList(); + if (resourcesList.find(resource_name) != resourcesList.end()) + { + ParserResourcesType resource = resourcesList[resource_name]; + // Check if resource is cluster or not + if (resource.ClusterMembersList.empty()) + { + //It is not a cluster so we create a cluster with one machine + ParserResourcesClusterMembersType fake_node; + fake_node.HostName = resource.HostName; + fake_node.Protocol = resource.Protocol; + fake_node.ClusterInternalProtocol = resource.ClusterInternalProtocol; + fake_node.UserName = resource.UserName; + fake_node.AppliPath = resource.AppliPath; + fake_node.DataForSort = resource.DataForSort; + + resource.ClusterMembersList.push_front(fake_node); + } + + // Choose mpi implementation -> each MPI implementation has is own machinefile... + if (resource.mpi == lam) + { + // Creating machine file + machine_file_name = tmpnam(NULL); + std::ofstream machine_file(machine_file_name.c_str(), std::ios_base::out); + + // We add all cluster machines to the file + std::list::iterator cluster_it = + resource.ClusterMembersList.begin(); + while (cluster_it != resource.ClusterMembersList.end()) + { + unsigned int number_of_proc = (*cluster_it).DataForSort._nbOfNodes * + (*cluster_it).DataForSort._nbOfProcPerNode; + machine_file << (*cluster_it).HostName << " cpu=" << number_of_proc << std::endl; + cluster_it++; + } + } + else if (resource.mpi == openmpi) + { + // Creating machine file + machine_file_name = tmpnam(NULL); + std::ofstream machine_file(machine_file_name.c_str(), std::ios_base::out); + + // We add all cluster machines to the file + std::list::iterator cluster_it = + resource.ClusterMembersList.begin(); + while (cluster_it != resource.ClusterMembersList.end()) + { + unsigned int number_of_proc = (*cluster_it).DataForSort._nbOfNodes * + (*cluster_it).DataForSort._nbOfProcPerNode; + machine_file << (*cluster_it).HostName << " slots=" << number_of_proc << std::endl; + cluster_it++; + } + } + else if (resource.mpi == nompi) + { + INFOS("[getMachineFile] Error resource_name MPI implementation was defined for " << resource_name); + } + else + INFOS("[getMachineFile] Error resource_name MPI implementation not currenly handled for " << resource_name); + } + else + INFOS("[getMachineFile] Error resource_name not found in resourcesList -> " << resource_name); + } + else + INFOS("[getMachineFile] Error parallelLib is not handled -> " << parallelLib); + + return machine_file_name; +} diff --git a/src/ResourcesManager/SALOME_ResourcesManager.hxx b/src/ResourcesManager/SALOME_ResourcesManager.hxx index 959822e49..d22daf195 100644 --- a/src/ResourcesManager/SALOME_ResourcesManager.hxx +++ b/src/ResourcesManager/SALOME_ResourcesManager.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef __SALOME_RESOURCESMANAGER_HXX__ #define __SALOME_RESOURCESMANAGER_HXX__ @@ -36,7 +37,7 @@ #ifdef WIN32 -# ifdef SALOMERESOURCESMANAGER_EXPORTS +# if defined SALOMERESOURCESMANAGER_EXPORTS || defined SalomeResourcesManager_EXPORTS # define SALOMERESOURCESMANAGER_EXPORT __declspec( dllexport ) # else # define SALOMERESOURCESMANAGER_EXPORT __declspec( dllimport ) @@ -45,6 +46,10 @@ # define SALOMERESOURCESMANAGER_EXPORT #endif +#ifdef WNT +#pragma warning(disable:4275) // Disable warning interface non dll +#endif + // --- WARNING --- // The call of BuildTempFileToLaunchRemoteContainer and RmTmpFile must be done // in a critical section to be sure to be clean. @@ -63,22 +68,30 @@ class SALOMERESOURCESMANAGER_EXPORT SALOME_ResourcesManager: ~SALOME_ResourcesManager(); - Engines::MachineList * - GetFittingResources(const Engines::MachineParameters& params, - const Engines::CompoList& componentList); + // CORBA Methods + Engines::ResourceList * GetFittingResources(const Engines::ResourceParameters& params); + char* FindFirst(const Engines::ResourceList& listOfResources); + char* Find(const char *policy, const Engines::ResourceList& listOfResources); + Engines::ResourceDefinition * GetResourceDefinition(const char * name); + void AddResource(const Engines::ResourceDefinition& new_resource, + CORBA::Boolean write, + const char * xml_file); - char* FindFirst(const Engines::MachineList& listOfMachines); - - Engines::MachineParameters* GetMachineParameters(const char *hostname); + void RemoveResource(const char * resource_name, + CORBA::Boolean write, + const char * xml_file); + // Cpp Methods void Shutdown(); - - static const char *_ResourcesManagerNameInNS; - ResourcesManager_cpp *GetImpl() { return &_rm; } + std::string getMachineFile(std::string resource_name, + CORBA::Long nb_procs, + std::string parallelLib); + + static const char *_ResourcesManagerNameInNS; protected: - + SALOME_NamingService *_NS; CORBA::ORB_var _orb; PortableServer::POA_var _poa; @@ -88,7 +101,6 @@ class SALOMERESOURCESMANAGER_EXPORT SALOME_ResourcesManager: MapOfParserResourcesType _resourcesBatchList; ResourcesManager_cpp _rm; - }; #endif // RESSOURCESCATALOG_IMPL_H diff --git a/src/SALOMEDS/Makefile.am b/src/SALOMEDS/Makefile.am index c56b74553..bfc45db68 100644 --- a/src/SALOMEDS/Makefile.am +++ b/src/SALOMEDS/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : Makefile.am # Author : Guillaume Boulant (CSSI) # Module : KERNEL @@ -47,7 +48,7 @@ salomeinclude_HEADERS= \ SALOMEDS_Defines.hxx # Scripts to be installed -dist_salomescript_DATA = SALOME_DriverPy.py +dist_salomescript_PYTHON = SALOME_DriverPy.py # # =============================================================== @@ -69,7 +70,6 @@ COMMON_CPPFLAGS=\ -I$(srcdir)/../GenericObj \ -I$(srcdir)/../SALOMEDSClient \ -I$(srcdir)/../LifeCycleCORBA \ - -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ @@ -287,6 +287,7 @@ bin_PROGRAMS = SALOMEDS_Server SALOMEDS_Client SALOMEDS_Server_SOURCES = SALOMEDS_Server.cxx SALOMEDS_Server_CPPFLAGS = $(COMMON_CPPFLAGS) SALOMEDS_Server_LDADD = libSalomeDS.la \ + $(COMMON_LIBS) \ ../Basics/libSALOMEBasics.la \ $(HDF5_LIBS) \ $(CORBA_LIBS) @@ -294,6 +295,7 @@ SALOMEDS_Server_LDADD = libSalomeDS.la \ SALOMEDS_Client_SOURCES = SALOMEDS_Client.cxx SALOMEDS_Client_CPPFLAGS = $(COMMON_CPPFLAGS) SALOMEDS_Client_LDADD = libSalomeDS.la \ + $(COMMON_LIBS) \ ../Basics/libSALOMEBasics.la \ $(HDF5_LIBS) \ $(CORBA_LIBS) diff --git a/src/SALOMEDS/README_attributes b/src/SALOMEDS/README_attributes index 51c13174b..f97a43583 100644 --- a/src/SALOMEDS/README_attributes +++ b/src/SALOMEDS/README_attributes @@ -1,4 +1,4 @@ -Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/src/SALOMEDS/SALOMEDS.cxx b/src/SALOMEDS/SALOMEDS.cxx index 6da176aa7..2432e74d9 100644 --- a/src/SALOMEDS/SALOMEDS.cxx +++ b/src/SALOMEDS/SALOMEDS.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME SALOMEDS : data structure of SALOME and sources of Salome data server // File : SALOMEDS.cxx // Author : Sergey ANIKIN @@ -43,17 +44,15 @@ #include CORBA_SERVER_HEADER(SALOMEDS) #include -using namespace SALOMEDS; - // PAL8065: san -- Global recursive mutex for SALOMEDS methods -Utils_Mutex Locker::MutexDS; +Utils_Mutex SALOMEDS::Locker::MutexDS; // PAL8065: san -- Global SALOMEDS locker -Locker::Locker() +SALOMEDS::Locker::Locker() : Utils_Locker( &MutexDS ) {} -Locker::~Locker() +SALOMEDS::Locker::~Locker() {} void SALOMEDS::lock() @@ -63,7 +62,7 @@ void SALOMEDS::lock() void SALOMEDS::unlock() { - Locker::MutexDS.unlock(); + SALOMEDS::Locker::MutexDS.unlock(); } diff --git a/src/SALOMEDS/SALOMEDS.hxx b/src/SALOMEDS/SALOMEDS.hxx index f2e923cfb..7c9107d30 100644 --- a/src/SALOMEDS/SALOMEDS.hxx +++ b/src/SALOMEDS/SALOMEDS.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME SALOMEDS : data structure of SALOME and sources of Salome data server // File : SALOMEDS.hxx // Author : Sergey ANIKIN diff --git a/src/SALOMEDS/SALOMEDS_AttLong_i.cxx b/src/SALOMEDS/SALOMEDS_AttLong_i.cxx index 7aaeb5337..b62a7cd00 100644 --- a/src/SALOMEDS/SALOMEDS_AttLong_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttLong_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME SALOMEDS : data structure of SALOME and sources of Salome data server // File : SALOMEDS_AttLong_i.cxx // Author : Estelle Deville @@ -29,7 +30,7 @@ #include "utilities.h" #include #include -using namespace std; + //============================================================================ /*! Function : Set diff --git a/src/SALOMEDS/SALOMEDS_AttLong_i.hxx b/src/SALOMEDS/SALOMEDS_AttLong_i.hxx index ad7084b20..92044fdfd 100644 --- a/src/SALOMEDS/SALOMEDS_AttLong_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttLong_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME SALOMEDS : data structure of SALOME and sources of Salome data server // File : SALOMEDS_AttLong_i.hxx // Author : Estelle Deville @@ -34,7 +35,7 @@ #include "SALOMEDS_BasicAttribute_i.hxx" class SALOMEDS_AttLong_i: public POA_SALOMEDS::AttLong, - public SALOMEDS_BasicAttribute_i { + public SALOMEDS_BasicAttribute_i { protected: char * _type; diff --git a/src/SALOMEDS/SALOMEDS_AttReal_i.cxx b/src/SALOMEDS/SALOMEDS_AttReal_i.cxx index d0475f246..914475f46 100644 --- a/src/SALOMEDS/SALOMEDS_AttReal_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttReal_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME SALOMEDS : data structure of SALOME and sources of Salome data server // File : SALOMEDS_AttReal_i.cxx // Author : Estelle Deville @@ -30,7 +31,7 @@ #include #include #include -using namespace std; + //============================================================================ /*! Function : Set diff --git a/src/SALOMEDS/SALOMEDS_AttReal_i.hxx b/src/SALOMEDS/SALOMEDS_AttReal_i.hxx index 4eeb13ed8..29a6640f4 100644 --- a/src/SALOMEDS/SALOMEDS_AttReal_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttReal_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME SALOMEDS : data structure of SALOME and sources of Salome data server // File : SALOMEDS_AttReal_i.hxx // Author : Estelle Deville @@ -34,7 +35,7 @@ #include "SALOMEDS_BasicAttribute_i.hxx" class SALOMEDS_AttReal_i: public POA_SALOMEDS::AttReal, - public SALOMEDS_BasicAttribute_i { + public SALOMEDS_BasicAttribute_i { protected: char * _type; diff --git a/src/SALOMEDS/SALOMEDS_AttributeComment.cxx b/src/SALOMEDS/SALOMEDS_AttributeComment.cxx index fad869ea4..957abe0de 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeComment.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeComment.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeComment.cxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeComment.hxx b/src/SALOMEDS/SALOMEDS_AttributeComment.hxx index b328bc837..0a6d20809 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeComment.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeComment.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeComment.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeComment_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeComment_i.cxx index dee16e6fa..870bde3d4 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeComment_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeComment_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeComment_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -28,8 +29,6 @@ #include "SALOMEDS_SObject_i.hxx" #include "SALOMEDS.hxx" -using namespace std; - char* SALOMEDS_AttributeComment_i::Value() { SALOMEDS::Locker lock; @@ -45,6 +44,6 @@ void SALOMEDS_AttributeComment_i::SetValue(const char* value) CheckLocked(); CORBA::String_var Str = CORBA::string_dup(value); - string aValue((char*)Str.in()); + std::string aValue((char*)Str.in()); dynamic_cast(_impl)->SetValue(aValue); } diff --git a/src/SALOMEDS/SALOMEDS_AttributeComment_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeComment_i.hxx index 070ccbbb9..a751c5d9d 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeComment_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeComment_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeComment_i.hxx // Author : Sergey RUIN // Module : SALOME @@ -34,7 +35,7 @@ #include "SALOMEDSImpl_AttributeComment.hxx" class SALOMEDS_AttributeComment_i: public virtual POA_SALOMEDS::AttributeComment, - public virtual SALOMEDS_GenericAttribute_i + public virtual SALOMEDS_GenericAttribute_i { public: SALOMEDS_AttributeComment_i(SALOMEDSImpl_AttributeComment* theAttr, CORBA::ORB_ptr orb) diff --git a/src/SALOMEDS/SALOMEDS_AttributeDrawable.cxx b/src/SALOMEDS/SALOMEDS_AttributeDrawable.cxx index 232f15f2a..03124d20d 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeDrawable.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeDrawable.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeDrawable.cxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeDrawable.hxx b/src/SALOMEDS/SALOMEDS_AttributeDrawable.hxx index d808ce229..86f22ecbd 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeDrawable.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeDrawable.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeDrawable.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeDrawable_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeDrawable_i.cxx index 137f752e9..073c2872a 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeDrawable_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeDrawable_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeDrawable_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -26,8 +27,6 @@ #include "SALOMEDS_AttributeDrawable_i.hxx" #include "SALOMEDS.hxx" -using namespace std; - CORBA::Boolean SALOMEDS_AttributeDrawable_i::IsDrawable() { SALOMEDS::Locker lock; diff --git a/src/SALOMEDS/SALOMEDS_AttributeDrawable_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeDrawable_i.hxx index 1e4c68078..bc0e810dc 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeDrawable_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeDrawable_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeDrawable_i.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeExpandable.cxx b/src/SALOMEDS/SALOMEDS_AttributeExpandable.cxx index c959f06ac..d2f9191e4 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeExpandable.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeExpandable.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeExpandable.cxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeExpandable.hxx b/src/SALOMEDS/SALOMEDS_AttributeExpandable.hxx index 97100969a..3829658ed 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeExpandable.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeExpandable.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeExpandable.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeExpandable_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeExpandable_i.cxx index 5b75422b9..25ed682e9 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeExpandable_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeExpandable_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeExpandable_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -26,8 +27,6 @@ #include "SALOMEDS_AttributeExpandable_i.hxx" #include "SALOMEDS.hxx" -using namespace std; - CORBA::Boolean SALOMEDS_AttributeExpandable_i::IsExpandable() { SALOMEDS::Locker lock; diff --git a/src/SALOMEDS/SALOMEDS_AttributeExpandable_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeExpandable_i.hxx index 2aea23a6d..c2ccdaf49 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeExpandable_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeExpandable_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeExpandable_i.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeExternalFileDef.cxx b/src/SALOMEDS/SALOMEDS_AttributeExternalFileDef.cxx index 60e0ff10d..5307c81a2 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeExternalFileDef.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeExternalFileDef.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeExternalFileDef.cxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeExternalFileDef.hxx b/src/SALOMEDS/SALOMEDS_AttributeExternalFileDef.hxx index 7f7073200..0d1bd812f 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeExternalFileDef.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeExternalFileDef.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeExternalFileDef.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeExternalFileDef_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeExternalFileDef_i.cxx index 66465d3be..0c49ca0d6 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeExternalFileDef_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeExternalFileDef_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeExternalFileDef_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -26,8 +27,6 @@ #include "SALOMEDS_AttributeExternalFileDef_i.hxx" #include "SALOMEDS.hxx" -using namespace std; - char* SALOMEDS_AttributeExternalFileDef_i::Value() { SALOMEDS::Locker lock; @@ -41,5 +40,5 @@ void SALOMEDS_AttributeExternalFileDef_i::SetValue(const char* value) SALOMEDS::Locker lock; CheckLocked(); CORBA::String_var Str = CORBA::string_dup(value); - dynamic_cast(_impl)->SetValue(string(Str)); + dynamic_cast(_impl)->SetValue(std::string(Str)); } diff --git a/src/SALOMEDS/SALOMEDS_AttributeExternalFileDef_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeExternalFileDef_i.hxx index 492f62811..c9a019e5d 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeExternalFileDef_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeExternalFileDef_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeExternalFileDef_i.hxx // Author : Sergey RUIN // Module : SALOME @@ -34,7 +35,7 @@ #include "SALOMEDSImpl_AttributeExternalFileDef.hxx" class SALOMEDS_AttributeExternalFileDef_i: public virtual POA_SALOMEDS::AttributeExternalFileDef, - public virtual SALOMEDS_GenericAttribute_i + public virtual SALOMEDS_GenericAttribute_i { public: diff --git a/src/SALOMEDS/SALOMEDS_AttributeFileType.cxx b/src/SALOMEDS/SALOMEDS_AttributeFileType.cxx index 6afa8b961..29b53364f 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeFileType.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeFileType.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeFileType.cxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeFileType.hxx b/src/SALOMEDS/SALOMEDS_AttributeFileType.hxx index 67ce22283..bf445e027 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeFileType.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeFileType.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeFileType.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeFileType_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeFileType_i.cxx index e61dd0de2..c4b8fc840 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeFileType_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeFileType_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeFileType_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -26,8 +27,6 @@ #include "SALOMEDS_AttributeFileType_i.hxx" #include "SALOMEDS.hxx" -using namespace std; - char* SALOMEDS_AttributeFileType_i::Value() { SALOMEDS::Locker lock; @@ -41,6 +40,6 @@ void SALOMEDS_AttributeFileType_i::SetValue(const char* value) SALOMEDS::Locker lock; CheckLocked(); CORBA::String_var Str = CORBA::string_dup(value); - string aValue((char*)Str.in()); + std::string aValue((char*)Str.in()); dynamic_cast(_impl)->SetValue(aValue); } diff --git a/src/SALOMEDS/SALOMEDS_AttributeFileType_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeFileType_i.hxx index f80fb8988..f47d5094d 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeFileType_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeFileType_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeFileType_i.hxx // Author : Sergey RUIN // Module : SALOME @@ -34,7 +35,7 @@ #include "SALOMEDSImpl_AttributeFileType.hxx" class SALOMEDS_AttributeFileType_i: public virtual POA_SALOMEDS::AttributeFileType, - public virtual SALOMEDS_GenericAttribute_i { + public virtual SALOMEDS_GenericAttribute_i { public: SALOMEDS_AttributeFileType_i(SALOMEDSImpl_AttributeFileType* theAttr, CORBA::ORB_ptr orb) diff --git a/src/SALOMEDS/SALOMEDS_AttributeFlags.cxx b/src/SALOMEDS/SALOMEDS_AttributeFlags.cxx index 2937887a2..3574109c0 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeFlags.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeFlags.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeFlags.cxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeFlags.hxx b/src/SALOMEDS/SALOMEDS_AttributeFlags.hxx index 174d5d9bf..642de5125 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeFlags.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeFlags.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeFlags.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeFlags_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeFlags_i.cxx index 1240a0049..d8b062802 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeFlags_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeFlags_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeFlags_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -26,8 +27,6 @@ #include "SALOMEDS_AttributeFlags_i.hxx" #include "SALOMEDS.hxx" -using namespace std; - /* Class : SALOMEDS_AttributeFlags_i Description : This class is intended for storing different object attributes that diff --git a/src/SALOMEDS/SALOMEDS_AttributeFlags_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeFlags_i.hxx index 16c193925..fa0e74e26 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeFlags_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeFlags_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeFlags_i.hxx // Author : Sergey RUIN // Module : SALOME @@ -52,7 +53,7 @@ class SALOMEDS_AttributeFlags_i: public virtual POA_SALOMEDS::AttributeFlags, public: SALOMEDS_AttributeFlags_i( SALOMEDSImpl_AttributeFlags* theAttr, CORBA::ORB_ptr orb ) - :SALOMEDS_GenericAttribute_i(theAttr, orb) {}; + :SALOMEDS_GenericAttribute_i(theAttr, orb) {}; virtual ~SALOMEDS_AttributeFlags_i() {}; diff --git a/src/SALOMEDS/SALOMEDS_AttributeGraphic.cxx b/src/SALOMEDS/SALOMEDS_AttributeGraphic.cxx index f6b751eb9..a46e864c0 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeGraphic.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeGraphic.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeGraphic.cxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeGraphic.hxx b/src/SALOMEDS/SALOMEDS_AttributeGraphic.hxx index f777c9144..7676098a5 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeGraphic.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeGraphic.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeGraphic.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeGraphic_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeGraphic_i.cxx index 1b291989e..3a183148f 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeGraphic_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeGraphic_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeGraphic_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -26,8 +27,6 @@ #include "SALOMEDS_AttributeGraphic_i.hxx" #include "SALOMEDS.hxx" -using namespace std; - /* Class : SALOMEDS_AttributeGraphic_i Description : This class is intended for storing information about diff --git a/src/SALOMEDS/SALOMEDS_AttributeGraphic_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeGraphic_i.hxx index 2233f0631..9b9416908 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeGraphic_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeGraphic_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeFlags_i.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeIOR.cxx b/src/SALOMEDS/SALOMEDS_AttributeIOR.cxx index 121d87587..cfc12e77d 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeIOR.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeIOR.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeIOR.cxx // Author : Sergey RUIN // Module : SALOME @@ -46,7 +47,7 @@ std::string SALOMEDS_AttributeIOR::Value() SALOMEDS::Locker lock; aValue = dynamic_cast(_local_impl)->Value(); } - else aValue = SALOMEDS::AttributeIOR::_narrow(_corba_impl)->Value(); + else aValue = (CORBA::String_var)((SALOMEDS::AttributeIOR_var)SALOMEDS::AttributeIOR::_narrow(_corba_impl))->Value(); return aValue; } @@ -57,5 +58,5 @@ void SALOMEDS_AttributeIOR::SetValue(const std::string& value) SALOMEDS::Locker lock; dynamic_cast(_local_impl)->SetValue(value); } - else SALOMEDS::AttributeIOR::_narrow(_corba_impl)->SetValue(value.c_str()); + else ((SALOMEDS::AttributeIOR_var)SALOMEDS::AttributeIOR::_narrow(_corba_impl))->SetValue(value.c_str()); } diff --git a/src/SALOMEDS/SALOMEDS_AttributeIOR.hxx b/src/SALOMEDS/SALOMEDS_AttributeIOR.hxx index 21c94b2ef..fd29d813e 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeIOR.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeIOR.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeIOR.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeIOR_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeIOR_i.cxx index 1ca91189e..89a59c49f 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeIOR_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeIOR_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeIOR_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -26,8 +27,6 @@ #include "SALOMEDS_AttributeIOR_i.hxx" #include "SALOMEDS.hxx" -using namespace std; - char* SALOMEDS_AttributeIOR_i::Value() { SALOMEDS::Locker lock; @@ -36,11 +35,15 @@ char* SALOMEDS_AttributeIOR_i::Value() return c_s._retn(); } + void SALOMEDS_AttributeIOR_i::SetValue(const char* value) { SALOMEDS::Locker lock; CheckLocked(); CORBA::String_var Str = CORBA::string_dup(value); - string anExtStr((char *)Str.in()); + std::string anExtStr((char *)Str.in()); dynamic_cast(_impl)->SetValue(anExtStr); } + +SALOMEDS_AttributeIOR_i::~SALOMEDS_AttributeIOR_i() +{} diff --git a/src/SALOMEDS/SALOMEDS_AttributeIOR_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeIOR_i.hxx index c5f05dcb7..235c6717e 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeIOR_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeIOR_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeIOR_i.hxx // Author : Sergey RUIN // Module : SALOME @@ -33,13 +34,13 @@ #include "SALOMEDSImpl_AttributeIOR.hxx" class SALOMEDS_AttributeIOR_i: public virtual POA_SALOMEDS::AttributeIOR, - public virtual SALOMEDS_GenericAttribute_i { + public virtual SALOMEDS_GenericAttribute_i { public: SALOMEDS_AttributeIOR_i(SALOMEDSImpl_AttributeIOR* theAttr, CORBA::ORB_ptr orb) :SALOMEDS_GenericAttribute_i(theAttr, orb) {}; - ~SALOMEDS_AttributeIOR_i() {}; + ~SALOMEDS_AttributeIOR_i(); char* Value(); void SetValue(const char* value); diff --git a/src/SALOMEDS/SALOMEDS_AttributeInteger.cxx b/src/SALOMEDS/SALOMEDS_AttributeInteger.cxx index 5135f819f..dedb74770 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeInteger.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeInteger.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeInteger.cxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeInteger.hxx b/src/SALOMEDS/SALOMEDS_AttributeInteger.hxx index ff1a78c3b..044167247 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeInteger.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeInteger.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeInteger.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeInteger_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeInteger_i.cxx index b3256a2ba..66e907a67 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeInteger_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeInteger_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeInteger_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -26,8 +27,6 @@ #include "SALOMEDS_AttributeInteger_i.hxx" #include "SALOMEDS.hxx" -using namespace std; - CORBA::Long SALOMEDS_AttributeInteger_i::Value() { SALOMEDS::Locker lock; diff --git a/src/SALOMEDS/SALOMEDS_AttributeInteger_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeInteger_i.hxx index 8ddaf37a1..e4aade2d0 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeInteger_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeInteger_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeInteger_i.hxx // Author : Sergey RUIN // Module : SALOME @@ -36,7 +37,7 @@ #include "SALOMEDSImpl_AttributeInteger.hxx" class SALOMEDS_AttributeInteger_i: public virtual POA_SALOMEDS::AttributeInteger, - public virtual SALOMEDS_GenericAttribute_i { + public virtual SALOMEDS_GenericAttribute_i { public: SALOMEDS_AttributeInteger_i(SALOMEDSImpl_AttributeInteger* theAttr, CORBA::ORB_ptr orb) diff --git a/src/SALOMEDS/SALOMEDS_AttributeLocalID.cxx b/src/SALOMEDS/SALOMEDS_AttributeLocalID.cxx index 49dd676eb..b7ae9f83c 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeLocalID.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeLocalID.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeLocalID.cxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeLocalID.hxx b/src/SALOMEDS/SALOMEDS_AttributeLocalID.hxx index a07af540e..3c4b7d425 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeLocalID.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeLocalID.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeLocalID.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeLocalID_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeLocalID_i.cxx index c17da185c..4c1e8102d 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeLocalID_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeLocalID_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeLocalID_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -26,8 +27,6 @@ #include "SALOMEDS_AttributeLocalID_i.hxx" #include "SALOMEDS.hxx" -using namespace std; - CORBA::Long SALOMEDS_AttributeLocalID_i::Value() { SALOMEDS::Locker lock; diff --git a/src/SALOMEDS/SALOMEDS_AttributeLocalID_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeLocalID_i.hxx index 6ff17cdf7..f701a7482 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeLocalID_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeLocalID_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeLocalID_i.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeName.cxx b/src/SALOMEDS/SALOMEDS_AttributeName.cxx index 86a384ddd..9538e4a21 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeName.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeName.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeName.cxx // Author : Sergey RUIN // Module : SALOME @@ -46,7 +47,7 @@ std::string SALOMEDS_AttributeName::Value() SALOMEDS::Locker lock; aValue = dynamic_cast(_local_impl)->Value(); } - else aValue = SALOMEDS::AttributeName::_narrow(_corba_impl)->Value(); + else aValue = (CORBA::String_var)((SALOMEDS::AttributeName_var)SALOMEDS::AttributeName::_narrow(_corba_impl))->Value(); return aValue; } @@ -57,5 +58,5 @@ void SALOMEDS_AttributeName::SetValue(const std::string& value) SALOMEDS::Locker lock; dynamic_cast(_local_impl)->SetValue(value); } - else SALOMEDS::AttributeName::_narrow(_corba_impl)->SetValue(value.c_str()); + else ((SALOMEDS::AttributeName_var)SALOMEDS::AttributeName::_narrow(_corba_impl))->SetValue(value.c_str()); } diff --git a/src/SALOMEDS/SALOMEDS_AttributeName.hxx b/src/SALOMEDS/SALOMEDS_AttributeName.hxx index 75ca696fe..c49e73347 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeName.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeName.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeName.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeName_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeName_i.cxx index b2bb0db6b..1aa9cd0b3 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeName_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeName_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeName_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -26,8 +27,6 @@ #include "SALOMEDS_AttributeName_i.hxx" #include "SALOMEDS.hxx" -using namespace std; - char* SALOMEDS_AttributeName_i::Value() { SALOMEDS::Locker lock; @@ -40,5 +39,5 @@ void SALOMEDS_AttributeName_i::SetValue(const char* value) { SALOMEDS::Locker lock; CheckLocked(); - dynamic_cast(_impl)->SetValue(string(value)); + dynamic_cast(_impl)->SetValue(std::string(value)); } diff --git a/src/SALOMEDS/SALOMEDS_AttributeName_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeName_i.hxx index 978301c70..a7d499950 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeName_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeName_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeName_i.hxx // Author : Sergey RUIN // Module : SALOME @@ -35,7 +36,7 @@ #include "SALOMEDSImpl_AttributeName.hxx" class SALOMEDS_AttributeName_i: public virtual POA_SALOMEDS::AttributeName, - public virtual SALOMEDS_GenericAttribute_i + public virtual SALOMEDS_GenericAttribute_i { public: diff --git a/src/SALOMEDS/SALOMEDS_AttributeOpened.cxx b/src/SALOMEDS/SALOMEDS_AttributeOpened.cxx index a2c02e5ac..840410b0e 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeOpened.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeOpened.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeOpened.cxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeOpened.hxx b/src/SALOMEDS/SALOMEDS_AttributeOpened.hxx index 43d352319..afb3570a3 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeOpened.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeOpened.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeOpened.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeOpened_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeOpened_i.cxx index bc1031fa0..0632c9335 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeOpened_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeOpened_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeOpened_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -26,8 +27,6 @@ #include "SALOMEDS_AttributeOpened_i.hxx" #include "SALOMEDS.hxx" -using namespace std; - CORBA::Boolean SALOMEDS_AttributeOpened_i::IsOpened() { SALOMEDS::Locker lock; diff --git a/src/SALOMEDS/SALOMEDS_AttributeOpened_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeOpened_i.hxx index d73c8c002..3e4bc2abd 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeOpened_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeOpened_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeOpened_i.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeParameter.cxx b/src/SALOMEDS/SALOMEDS_AttributeParameter.cxx index 8377bfb83..e6791c23b 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeParameter.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeParameter.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeParameter.cxx // Author : Sergey RUIN // Module : SALOME @@ -28,8 +29,6 @@ #include -using namespace std; - //======================================================================= /*! * Function : Constructor @@ -65,7 +64,7 @@ SALOMEDS_AttributeParameter::~SALOMEDS_AttributeParameter() * Purpose : Associates a integer value with the ID */ //======================================================================= -void SALOMEDS_AttributeParameter::SetInt(const string& theID, const int theValue) +void SALOMEDS_AttributeParameter::SetInt(const std::string& theID, const int theValue) { CheckLocked(); @@ -83,7 +82,7 @@ void SALOMEDS_AttributeParameter::SetInt(const string& theID, const int theValue * Purpose : Returns a int value associated with the given ID */ //======================================================================= -int SALOMEDS_AttributeParameter::GetInt(const string& theID) +int SALOMEDS_AttributeParameter::GetInt(const std::string& theID) { int aValue; if(_isLocal) { @@ -101,7 +100,7 @@ int SALOMEDS_AttributeParameter::GetInt(const string& theID) * Purpose : Associates a double value with the ID */ //======================================================================= -void SALOMEDS_AttributeParameter::SetReal(const string& theID, const double& theValue) +void SALOMEDS_AttributeParameter::SetReal(const std::string& theID, const double& theValue) { CheckLocked(); @@ -119,7 +118,7 @@ void SALOMEDS_AttributeParameter::SetReal(const string& theID, const double& the * Purpose : Returns a double value associated with the given ID */ //======================================================================= -double SALOMEDS_AttributeParameter::GetReal(const string& theID) +double SALOMEDS_AttributeParameter::GetReal(const std::string& theID) { double aValue; if(_isLocal) { @@ -137,7 +136,7 @@ double SALOMEDS_AttributeParameter::GetReal(const string& theID) * Purpose : Associates a string with the ID */ //======================================================================= -void SALOMEDS_AttributeParameter::SetString(const string& theID, const string& theValue) +void SALOMEDS_AttributeParameter::SetString(const std::string& theID, const std::string& theValue) { CheckLocked(); @@ -155,9 +154,9 @@ void SALOMEDS_AttributeParameter::SetString(const string& theID, const string& t * Purpose : Returns a string associated with the given ID */ //======================================================================= -string SALOMEDS_AttributeParameter::GetString(const string& theID) +std::string SALOMEDS_AttributeParameter::GetString(const std::string& theID) { - string aValue; + std::string aValue; if(_isLocal) { SALOMEDS::Locker lock; aValue = dynamic_cast(_local_impl)->GetString(theID); @@ -173,7 +172,7 @@ string SALOMEDS_AttributeParameter::GetString(const string& theID) * Purpose : Associates a bool value with the ID */ //======================================================================= -void SALOMEDS_AttributeParameter::SetBool(const string& theID, const bool& theValue) +void SALOMEDS_AttributeParameter::SetBool(const std::string& theID, const bool& theValue) { CheckLocked(); @@ -191,7 +190,7 @@ void SALOMEDS_AttributeParameter::SetBool(const string& theID, const bool& theVa * Purpose : Returns a bool value associated with the ID */ //======================================================================= -bool SALOMEDS_AttributeParameter::GetBool(const string& theID) +bool SALOMEDS_AttributeParameter::GetBool(const std::string& theID) { if(_isLocal) { SALOMEDS::Locker lock; @@ -207,7 +206,7 @@ bool SALOMEDS_AttributeParameter::GetBool(const string& theID) * Purpose : Associates an array of double values with the given ID */ //======================================================================= -void SALOMEDS_AttributeParameter::SetRealArray(const string& theID, const vector& theArray) +void SALOMEDS_AttributeParameter::SetRealArray(const std::string& theID, const std::vector& theArray) { CheckLocked(); @@ -232,9 +231,9 @@ void SALOMEDS_AttributeParameter::SetRealArray(const string& theID, const vector * Purpose : Returns an array of double values associated with the ID */ //======================================================================= -vector SALOMEDS_AttributeParameter::GetRealArray(const string& theID) +std::vector SALOMEDS_AttributeParameter::GetRealArray(const std::string& theID) { - vector v; + std::vector v; if(_isLocal) { SALOMEDS::Locker lock; return dynamic_cast(_local_impl)->GetRealArray(theID); @@ -256,7 +255,7 @@ vector SALOMEDS_AttributeParameter::GetRealArray(const string& theID) * Purpose : Associates an array of int values with the given ID */ //======================================================================= -void SALOMEDS_AttributeParameter::SetIntArray(const string& theID, const vector& theArray) +void SALOMEDS_AttributeParameter::SetIntArray(const std::string& theID, const std::vector& theArray) { CheckLocked(); @@ -281,9 +280,9 @@ void SALOMEDS_AttributeParameter::SetIntArray(const string& theID, const vector< * Purpose : Returns an array of int values associated with the ID */ //======================================================================= -vector SALOMEDS_AttributeParameter::GetIntArray(const string& theID) +std::vector SALOMEDS_AttributeParameter::GetIntArray(const std::string& theID) { - vector v; + std::vector v; if(_isLocal) { SALOMEDS::Locker lock; return dynamic_cast(_local_impl)->GetIntArray(theID); @@ -305,7 +304,7 @@ vector SALOMEDS_AttributeParameter::GetIntArray(const string& theID) * Purpose : Associates an array of string values with the given ID */ //======================================================================= -void SALOMEDS_AttributeParameter::SetStrArray(const string& theID, const vector& theArray) +void SALOMEDS_AttributeParameter::SetStrArray(const std::string& theID, const std::vector& theArray) { CheckLocked(); @@ -330,9 +329,9 @@ void SALOMEDS_AttributeParameter::SetStrArray(const string& theID, const vector< * Purpose : Returns an array of string values associated with the ID */ //======================================================================= -vector SALOMEDS_AttributeParameter::GetStrArray(const string& theID) +std::vector SALOMEDS_AttributeParameter::GetStrArray(const std::string& theID) { - vector v; + std::vector v; if(_isLocal) { SALOMEDS::Locker lock; return dynamic_cast(_local_impl)->GetStrArray(theID); @@ -342,7 +341,7 @@ vector SALOMEDS_AttributeParameter::GetStrArray(const string& theID) int length = aSeq->length(); if(length) { v.resize(length); - for(int i = 0; i < length; i++) v[i] = string(aSeq[i].in()); + for(int i = 0; i < length; i++) v[i] = std::string(aSeq[i].in()); } } return v; @@ -356,7 +355,7 @@ vector SALOMEDS_AttributeParameter::GetStrArray(const string& theID) * a value in the attribute */ //======================================================================= -bool SALOMEDS_AttributeParameter::IsSet(const string& theID, const int theType) +bool SALOMEDS_AttributeParameter::IsSet(const std::string& theID, const int theType) { if(_isLocal) { SALOMEDS::Locker lock; @@ -372,7 +371,7 @@ bool SALOMEDS_AttributeParameter::IsSet(const string& theID, const int theType) * Purpose : Removes a parameter with given ID */ //======================================================================= -bool SALOMEDS_AttributeParameter::RemoveID(const string& theID, const int theType) +bool SALOMEDS_AttributeParameter::RemoveID(const std::string& theID, const int theType) { CheckLocked(); @@ -462,9 +461,9 @@ void SALOMEDS_AttributeParameter::Clear() * Purpose : Returns an array of all ID's of the given type */ //======================================================================= -vector SALOMEDS_AttributeParameter::GetIDs(const int theType) +std::vector SALOMEDS_AttributeParameter::GetIDs(const int theType) { - vector v; + std::vector v; if(_isLocal) { SALOMEDS::Locker lock; SALOMEDSImpl_AttributeParameter* AP_impl = dynamic_cast(_local_impl); @@ -476,7 +475,7 @@ vector SALOMEDS_AttributeParameter::GetIDs(const int theType) int length = CorbaSeq->length(); if(length) { v.resize(length); - for(int i = 0; i -using namespace std; +#include "Utils_ExceptHandlers.hxx" +UNEXPECT_CATCH(AP_InvalidIdentifier, SALOMEDS::AttributeParameter::InvalidIdentifier); //======================================================================= /*! @@ -50,8 +52,10 @@ void SALOMEDS_AttributeParameter_i::SetInt(const char* theID, CORBA::Long theVal */ //======================================================================= CORBA::Long SALOMEDS_AttributeParameter_i::GetInt(const char* theID) + throw (SALOMEDS::AttributeParameter::InvalidIdentifier) { SALOMEDS::Locker lock; + Unexpect aCatch (AP_InvalidIdentifier); return dynamic_cast(_impl)->GetInt(theID); } @@ -75,8 +79,10 @@ void SALOMEDS_AttributeParameter_i::SetReal(const char* theID, CORBA::Double the */ //======================================================================= CORBA::Double SALOMEDS_AttributeParameter_i::GetReal(const char* theID) + throw (SALOMEDS::AttributeParameter::InvalidIdentifier) { SALOMEDS::Locker lock; + Unexpect aCatch (AP_InvalidIdentifier); return dynamic_cast(_impl)->GetReal(theID); } @@ -101,8 +107,10 @@ void SALOMEDS_AttributeParameter_i::SetString(const char* theID, const char* the */ //======================================================================= char* SALOMEDS_AttributeParameter_i::GetString(const char* theID) + throw (SALOMEDS::AttributeParameter::InvalidIdentifier) { SALOMEDS::Locker lock; + Unexpect aCatch (AP_InvalidIdentifier); SALOMEDSImpl_AttributeParameter* impl = dynamic_cast(_impl); CORBA::String_var c_s = CORBA::string_dup(impl->GetString(theID).c_str()); return c_s._retn(); @@ -128,8 +136,10 @@ void SALOMEDS_AttributeParameter_i::SetBool(const char* theID, CORBA::Boolean th */ //======================================================================= CORBA::Boolean SALOMEDS_AttributeParameter_i::GetBool(const char* theID) + throw (SALOMEDS::AttributeParameter::InvalidIdentifier) { SALOMEDS::Locker lock; + Unexpect aCatch (AP_InvalidIdentifier); return dynamic_cast(_impl)->GetBool(theID); } @@ -143,7 +153,7 @@ void SALOMEDS_AttributeParameter_i::SetRealArray(const char* theID, const SALOME { SALOMEDS::Locker lock; CheckLocked(); - vector v; + std::vector v; int length = theArray.length(); if(length) { v.resize(length); @@ -159,10 +169,12 @@ void SALOMEDS_AttributeParameter_i::SetRealArray(const char* theID, const SALOME */ //======================================================================= SALOMEDS::DoubleSeq* SALOMEDS_AttributeParameter_i::GetRealArray(const char* theID) + throw (SALOMEDS::AttributeParameter::InvalidIdentifier) { SALOMEDS::Locker lock; + Unexpect aCatch (AP_InvalidIdentifier); SALOMEDS::DoubleSeq_var aSeq = new SALOMEDS::DoubleSeq; - vector v = dynamic_cast(_impl)->GetRealArray(theID); + std::vector v = dynamic_cast(_impl)->GetRealArray(theID); int length = v.size(); if(length) { aSeq->length(length); @@ -181,7 +193,7 @@ void SALOMEDS_AttributeParameter_i::SetIntArray(const char* theID, const SALOMED { SALOMEDS::Locker lock; CheckLocked(); - vector v; + std::vector v; int length = theArray.length(); if(length) { v.resize(length); @@ -197,10 +209,12 @@ void SALOMEDS_AttributeParameter_i::SetIntArray(const char* theID, const SALOMED */ //======================================================================= SALOMEDS::LongSeq* SALOMEDS_AttributeParameter_i::GetIntArray(const char* theID) + throw (SALOMEDS::AttributeParameter::InvalidIdentifier) { SALOMEDS::Locker lock; + Unexpect aCatch (AP_InvalidIdentifier); SALOMEDS::LongSeq_var aSeq = new SALOMEDS::LongSeq; - vector v = dynamic_cast(_impl)->GetIntArray(theID); + std::vector v = dynamic_cast(_impl)->GetIntArray(theID); int length = v.size(); if(length) { aSeq->length(length); @@ -219,11 +233,11 @@ void SALOMEDS_AttributeParameter_i::SetStrArray(const char* theID, const SALOMED { SALOMEDS::Locker lock; CheckLocked(); - vector v; + std::vector v; int length = theArray.length(); if(length) { v.resize(length); - for(int i = 0; i(_impl)->SetStrArray(theID, v); } @@ -235,10 +249,12 @@ void SALOMEDS_AttributeParameter_i::SetStrArray(const char* theID, const SALOMED */ //======================================================================= SALOMEDS::StringSeq* SALOMEDS_AttributeParameter_i::GetStrArray(const char* theID) + throw (SALOMEDS::AttributeParameter::InvalidIdentifier) { SALOMEDS::Locker lock; + Unexpect aCatch (AP_InvalidIdentifier); SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq; - vector v = dynamic_cast(_impl)->GetStrArray(theID); + std::vector v = dynamic_cast(_impl)->GetStrArray(theID); int length = v.size(); if(length) { aSeq->length(length); @@ -335,7 +351,7 @@ SALOMEDS::StringSeq* SALOMEDS_AttributeParameter_i::GetIDs(CORBA::Long theType) { SALOMEDS::Locker lock; SALOMEDS::StringSeq_var CorbaSeq = new SALOMEDS::StringSeq; - vector A = dynamic_cast(_impl)->GetIDs((Parameter_Types)theType); + std::vector A = dynamic_cast(_impl)->GetIDs((Parameter_Types)theType); if(A.size()) { int length = A.size(); diff --git a/src/SALOMEDS/SALOMEDS_AttributeParameter_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeParameter_i.hxx index 0ae2e1be4..567e99b89 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeParameter_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeParameter_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeParameter_i.hxx // Author : Sergey RUIN // Module : SALOME @@ -40,7 +41,7 @@ */ class SALOMEDS_AttributeParameter_i: public virtual POA_SALOMEDS::AttributeParameter, - public virtual SALOMEDS_GenericAttribute_i + public virtual SALOMEDS_GenericAttribute_i { public: @@ -51,25 +52,32 @@ public: virtual void SetInt(const char* theID, CORBA::Long theValue); - virtual CORBA::Long GetInt(const char* theID); + virtual CORBA::Long GetInt(const char* theID) + throw (SALOMEDS::AttributeParameter::InvalidIdentifier); virtual void SetReal(const char* theID, CORBA::Double theValue); - virtual CORBA::Double GetReal(const char* theID); + virtual CORBA::Double GetReal(const char* theID) + throw (SALOMEDS::AttributeParameter::InvalidIdentifier); virtual void SetString(const char* theID, const char* theValue); - virtual char* GetString(const char* theID); + virtual char* GetString(const char* theID) + throw (SALOMEDS::AttributeParameter::InvalidIdentifier); virtual void SetBool(const char* theID, CORBA::Boolean theValue); - virtual CORBA::Boolean GetBool(const char* theID); + virtual CORBA::Boolean GetBool(const char* theID) + throw (SALOMEDS::AttributeParameter::InvalidIdentifier); virtual void SetRealArray(const char* theID, const SALOMEDS::DoubleSeq& theArray); - virtual SALOMEDS::DoubleSeq* GetRealArray(const char* theID); - + virtual SALOMEDS::DoubleSeq* GetRealArray(const char* theID) + throw (SALOMEDS::AttributeParameter::InvalidIdentifier); + virtual void SetIntArray(const char* theID, const SALOMEDS::LongSeq& theArray); - virtual SALOMEDS::LongSeq* GetIntArray(const char* theID); + virtual SALOMEDS::LongSeq* GetIntArray(const char* theID) + throw (SALOMEDS::AttributeParameter::InvalidIdentifier); virtual void SetStrArray(const char* theID, const SALOMEDS::StringSeq& theArray); - virtual SALOMEDS::StringSeq* GetStrArray(const char* theID); + virtual SALOMEDS::StringSeq* GetStrArray(const char* theID) + throw (SALOMEDS::AttributeParameter::InvalidIdentifier); virtual CORBA::Boolean IsSet(const char* theID, CORBA::Long theType); diff --git a/src/SALOMEDS/SALOMEDS_AttributePersistentRef.cxx b/src/SALOMEDS/SALOMEDS_AttributePersistentRef.cxx index d95040ed0..f0acb0037 100644 --- a/src/SALOMEDS/SALOMEDS_AttributePersistentRef.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributePersistentRef.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributePersistentRef.cxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributePersistentRef.hxx b/src/SALOMEDS/SALOMEDS_AttributePersistentRef.hxx index ee931f97c..f9443cd8b 100644 --- a/src/SALOMEDS/SALOMEDS_AttributePersistentRef.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributePersistentRef.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributePersistentRef.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributePersistentRef_i.cxx b/src/SALOMEDS/SALOMEDS_AttributePersistentRef_i.cxx index 7cc694596..021d9b6d9 100644 --- a/src/SALOMEDS/SALOMEDS_AttributePersistentRef_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributePersistentRef_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributePersistentRef_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -26,8 +27,6 @@ #include "SALOMEDS_AttributePersistentRef_i.hxx" #include "SALOMEDS.hxx" -using namespace std; - char* SALOMEDS_AttributePersistentRef_i::Value() { SALOMEDS::Locker lock; @@ -41,5 +40,5 @@ void SALOMEDS_AttributePersistentRef_i::SetValue(const char* value) SALOMEDS::Locker lock; CheckLocked(); CORBA::String_var Str = CORBA::string_dup(value); - dynamic_cast(_impl)->SetValue(string(Str)); + dynamic_cast(_impl)->SetValue(std::string(Str)); } diff --git a/src/SALOMEDS/SALOMEDS_AttributePersistentRef_i.hxx b/src/SALOMEDS/SALOMEDS_AttributePersistentRef_i.hxx index f1aea71bc..4109e18b1 100644 --- a/src/SALOMEDS/SALOMEDS_AttributePersistentRef_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributePersistentRef_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributePersistentRef_i.hxx // Author : Sergey RUIN // Module : SALOME @@ -33,7 +34,7 @@ #include "SALOMEDSImpl_AttributePersistentRef.hxx" class SALOMEDS_AttributePersistentRef_i: public virtual POA_SALOMEDS::AttributePersistentRef, - public virtual SALOMEDS_GenericAttribute_i { + public virtual SALOMEDS_GenericAttribute_i { public: SALOMEDS_AttributePersistentRef_i(SALOMEDSImpl_AttributePersistentRef* theAttr, CORBA::ORB_ptr orb) diff --git a/src/SALOMEDS/SALOMEDS_AttributePixMap.cxx b/src/SALOMEDS/SALOMEDS_AttributePixMap.cxx index c7cd068cc..4b86a20a5 100644 --- a/src/SALOMEDS/SALOMEDS_AttributePixMap.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributePixMap.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributePixMap.cxx // Author : Sergey RUIN // Module : SALOME @@ -46,7 +47,7 @@ bool SALOMEDS_AttributePixMap::HasPixMap() SALOMEDS::Locker lock; ret = dynamic_cast(_local_impl)->HasPixMap(); } - else ret = SALOMEDS::AttributePixMap::_narrow(_corba_impl)->HasPixMap(); + else ret = ((SALOMEDS::AttributePixMap_var)SALOMEDS::AttributePixMap::_narrow(_corba_impl))->HasPixMap(); return ret; } @@ -57,7 +58,7 @@ std::string SALOMEDS_AttributePixMap::GetPixMap() SALOMEDS::Locker lock; aValue = dynamic_cast(_local_impl)->GetPixMap(); } - else aValue = SALOMEDS::AttributePixMap::_narrow(_corba_impl)->GetPixMap(); + else aValue = (CORBA::String_var)((SALOMEDS::AttributePixMap_var)SALOMEDS::AttributePixMap::_narrow(_corba_impl))->GetPixMap(); return aValue; } @@ -68,5 +69,5 @@ void SALOMEDS_AttributePixMap::SetPixMap(const std::string& value) SALOMEDS::Locker lock; dynamic_cast(_local_impl)->SetPixMap(value); } - else SALOMEDS::AttributePixMap::_narrow(_corba_impl)->SetPixMap(value.c_str()); + else ((SALOMEDS::AttributePixMap_var)SALOMEDS::AttributePixMap::_narrow(_corba_impl))->SetPixMap(value.c_str()); } diff --git a/src/SALOMEDS/SALOMEDS_AttributePixMap.hxx b/src/SALOMEDS/SALOMEDS_AttributePixMap.hxx index a27aa7bc4..4c0a8b786 100644 --- a/src/SALOMEDS/SALOMEDS_AttributePixMap.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributePixMap.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributePixMap.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributePixMap_i.cxx b/src/SALOMEDS/SALOMEDS_AttributePixMap_i.cxx index 2e3c4cdba..fa4802e18 100644 --- a/src/SALOMEDS/SALOMEDS_AttributePixMap_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributePixMap_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributePixMap_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -26,8 +27,6 @@ #include "SALOMEDS_AttributePixMap_i.hxx" #include "SALOMEDS.hxx" -using namespace std; - CORBA::Boolean SALOMEDS_AttributePixMap_i::HasPixMap() { SALOMEDS::Locker lock; @@ -47,5 +46,5 @@ void SALOMEDS_AttributePixMap_i::SetPixMap(const char* value) SALOMEDS::Locker lock; CheckLocked(); CORBA::String_var Str = CORBA::string_dup(value); - dynamic_cast(_impl)->SetPixMap(string(Str)); + dynamic_cast(_impl)->SetPixMap(std::string(Str)); } diff --git a/src/SALOMEDS/SALOMEDS_AttributePixMap_i.hxx b/src/SALOMEDS/SALOMEDS_AttributePixMap_i.hxx index 65a0ddd00..824cc00ae 100644 --- a/src/SALOMEDS/SALOMEDS_AttributePixMap_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributePixMap_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributePixMap_i.hxx // Author : Sergey RUIN // Module : SALOME @@ -34,7 +35,7 @@ #include "SALOMEDSImpl_AttributePixMap.hxx" class SALOMEDS_AttributePixMap_i: public virtual POA_SALOMEDS::AttributePixMap, - public virtual SALOMEDS_GenericAttribute_i + public virtual SALOMEDS_GenericAttribute_i { public: diff --git a/src/SALOMEDS/SALOMEDS_AttributePythonObject.cxx b/src/SALOMEDS/SALOMEDS_AttributePythonObject.cxx index e6b49f0ab..43d9fd529 100644 --- a/src/SALOMEDS/SALOMEDS_AttributePythonObject.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributePythonObject.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributePythonObject.cxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributePythonObject.hxx b/src/SALOMEDS/SALOMEDS_AttributePythonObject.hxx index eada242a9..29973d900 100644 --- a/src/SALOMEDS/SALOMEDS_AttributePythonObject.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributePythonObject.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributePythonObject.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributePythonObject_i.cxx b/src/SALOMEDS/SALOMEDS_AttributePythonObject_i.cxx index 5645d1c3c..f910df5d4 100644 --- a/src/SALOMEDS/SALOMEDS_AttributePythonObject_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributePythonObject_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributePythonObject_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -26,8 +27,6 @@ #include "SALOMEDS_AttributePythonObject_i.hxx" #include "SALOMEDS.hxx" -using namespace std; - void SALOMEDS_AttributePythonObject_i::SetObject(const char* theSequence, CORBA::Boolean IsScript) { SALOMEDS::Locker lock; @@ -39,7 +38,7 @@ void SALOMEDS_AttributePythonObject_i::SetObject(const char* theSequence, CORBA: char* SALOMEDS_AttributePythonObject_i::GetObject() { SALOMEDS::Locker lock; - string aSeq(dynamic_cast(_impl)->GetObject()); + std::string aSeq(dynamic_cast(_impl)->GetObject()); CORBA::String_var aStr = CORBA::string_dup(aSeq.c_str()); return aStr._retn(); } diff --git a/src/SALOMEDS/SALOMEDS_AttributePythonObject_i.hxx b/src/SALOMEDS/SALOMEDS_AttributePythonObject_i.hxx index 0f4e05d07..bcb4055b0 100644 --- a/src/SALOMEDS/SALOMEDS_AttributePythonObject_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributePythonObject_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributePythonObject_i.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeReal.cxx b/src/SALOMEDS/SALOMEDS_AttributeReal.cxx index 4bfb46ebd..a16fe3e7a 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeReal.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeReal.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeReal.cxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeReal.hxx b/src/SALOMEDS/SALOMEDS_AttributeReal.hxx index a75e73c6d..a686764dd 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeReal.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeReal.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeReal.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeReal_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeReal_i.cxx index f033a682c..403fedc21 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeReal_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeReal_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeReal_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -28,8 +29,6 @@ #include "SALOMEDS.hxx" #include -using namespace std; - CORBA::Double SALOMEDS_AttributeReal_i::Value() { SALOMEDS::Locker lock; diff --git a/src/SALOMEDS/SALOMEDS_AttributeReal_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeReal_i.hxx index ef5d0363f..03a3e8a0d 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeReal_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeReal_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeReal_i.hxx // Author : Sergey RUIN // Module : SALOME @@ -34,7 +35,7 @@ #include "SALOMEDSImpl_AttributeReal.hxx" class SALOMEDS_AttributeReal_i: public virtual POA_SALOMEDS::AttributeReal, - public virtual SALOMEDS_GenericAttribute_i { + public virtual SALOMEDS_GenericAttribute_i { public: SALOMEDS_AttributeReal_i(SALOMEDSImpl_AttributeReal* theAttr, CORBA::ORB_ptr orb) diff --git a/src/SALOMEDS/SALOMEDS_AttributeSelectable.cxx b/src/SALOMEDS/SALOMEDS_AttributeSelectable.cxx index c39f80699..91b0f5b7a 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeSelectable.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeSelectable.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeSelectable.cxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeSelectable.hxx b/src/SALOMEDS/SALOMEDS_AttributeSelectable.hxx index 197f27a98..ff934e85d 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeSelectable.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeSelectable.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeSelectable.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeSelectable_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeSelectable_i.cxx index 949b40205..a7372188a 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeSelectable_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeSelectable_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeSelectable_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -26,8 +27,6 @@ #include "SALOMEDS_AttributeSelectable_i.hxx" #include "SALOMEDS.hxx" -using namespace std; - CORBA::Boolean SALOMEDS_AttributeSelectable_i::IsSelectable() { SALOMEDS::Locker lock; diff --git a/src/SALOMEDS/SALOMEDS_AttributeSelectable_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeSelectable_i.hxx index 454d9fda7..ae9ad6141 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeSelectable_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeSelectable_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeSelectable_i.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger.cxx b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger.cxx index 15eb47305..2c4558c78 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeSequenceOfInteger.cxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger.hxx b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger.hxx index 027bc4d26..4393ca43b 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeSequenceOfInteger.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger_i.cxx index 5db32c6dd..a6133109b 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeSequenceOfInteger_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -28,14 +29,11 @@ #include -using namespace std; - - void SALOMEDS_AttributeSequenceOfInteger_i::Assign(const SALOMEDS::LongSeq& other) { SALOMEDS::Locker lock; CheckLocked(); - vector aSeq; + std::vector aSeq; for(int i = 0, len = other.length(); i(_impl)->Assign(aSeq); } @@ -44,7 +42,7 @@ SALOMEDS::LongSeq* SALOMEDS_AttributeSequenceOfInteger_i::CorbaSequence() { SALOMEDS::Locker lock; SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq; - const vector& CasCadeSeq = dynamic_cast(_impl)->Array(); + const std::vector& CasCadeSeq = dynamic_cast(_impl)->Array(); int len = CasCadeSeq.size(); CorbaSeq->length(len); for (int i = 0; i < len; i++) { diff --git a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger_i.hxx index fa1a868f5..f3a56c772 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeSequenceOfInteger_i.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal.cxx b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal.cxx index 35a108625..708891275 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeSequenceOfReal.cxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal.hxx b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal.hxx index 7e75c9217..eeed784e4 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeSequenceOfReal.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal_i.cxx index e028c1022..4505fe0f0 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeSequenceOfReal_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -27,13 +28,11 @@ #include "SALOMEDS.hxx" #include -using namespace std; - void SALOMEDS_AttributeSequenceOfReal_i::Assign(const SALOMEDS::DoubleSeq& other) { SALOMEDS::Locker lock; CheckLocked(); - vector CasCadeSeq; + std::vector CasCadeSeq; for (int i = 0; i < other.length(); i++) { CasCadeSeq.push_back(other[i]); } @@ -44,7 +43,7 @@ SALOMEDS::DoubleSeq* SALOMEDS_AttributeSequenceOfReal_i::CorbaSequence() { SALOMEDS::Locker lock; SALOMEDS::DoubleSeq_var CorbaSeq = new SALOMEDS::DoubleSeq; - const vector& CasCadeSeq = dynamic_cast(_impl)->Array(); + const std::vector& CasCadeSeq = dynamic_cast(_impl)->Array(); int len = CasCadeSeq.size(); CorbaSeq->length(len); for (int i = 0; i < len; i++) { diff --git a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal_i.hxx index 1d68ee7cf..38b70be59 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeSequenceOfSequenceOfReal_i.hxx // Author : Sergey RUIN // Module : SALOME @@ -34,7 +35,7 @@ #include "SALOMEDSImpl_AttributeSequenceOfReal.hxx" class SALOMEDS_AttributeSequenceOfReal_i: public virtual POA_SALOMEDS::AttributeSequenceOfReal, - public virtual SALOMEDS_GenericAttribute_i { + public virtual SALOMEDS_GenericAttribute_i { public: SALOMEDS_AttributeSequenceOfReal_i(SALOMEDSImpl_AttributeSequenceOfReal* theAttr, CORBA::ORB_ptr orb) diff --git a/src/SALOMEDS/SALOMEDS_AttributeString.cxx b/src/SALOMEDS/SALOMEDS_AttributeString.cxx index 9b1ad933f..60a287256 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeString.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeString.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeString.cxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeString.hxx b/src/SALOMEDS/SALOMEDS_AttributeString.hxx index 6d8b615ac..74908b074 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeString.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeString.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeString.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeString_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeString_i.cxx index 3adec8caf..a63752b00 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeString_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeString_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeString_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -28,8 +29,6 @@ #include "SALOMEDS_SObject_i.hxx" #include "SALOMEDS.hxx" -using namespace std; - char* SALOMEDS_AttributeString_i::Value() { SALOMEDS::Locker lock; @@ -44,5 +43,5 @@ void SALOMEDS_AttributeString_i::SetValue(const char* value) SALOMEDS::Locker lock; CheckLocked(); - dynamic_cast(_impl)->SetValue(string(value)); + dynamic_cast(_impl)->SetValue(std::string(value)); } diff --git a/src/SALOMEDS/SALOMEDS_AttributeString_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeString_i.hxx index 798462d1d..d4e4283b4 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeString_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeString_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeString_i.hxx // Author : Sergey RUIN // Module : SALOME @@ -34,7 +35,7 @@ #include "SALOMEDSImpl_AttributeString.hxx" class SALOMEDS_AttributeString_i: public virtual POA_SALOMEDS::AttributeString, - public virtual SALOMEDS_GenericAttribute_i + public virtual SALOMEDS_GenericAttribute_i { public: SALOMEDS_AttributeString_i(SALOMEDSImpl_AttributeString* theAttr, CORBA::ORB_ptr orb) diff --git a/src/SALOMEDS/SALOMEDS_AttributeStudyProperties.cxx b/src/SALOMEDS/SALOMEDS_AttributeStudyProperties.cxx index d8eacff0a..af20553fa 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeStudyProperties.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeStudyProperties.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeStudyProperties.cxx // Author : Sergey RUIN // Module : SALOME @@ -26,8 +27,6 @@ #include "SALOMEDS_AttributeStudyProperties.hxx" #include "SALOMEDS.hxx" -using namespace std; - SALOMEDS_AttributeStudyProperties::SALOMEDS_AttributeStudyProperties (SALOMEDSImpl_AttributeStudyProperties* theAttr) :SALOMEDS_GenericAttribute(theAttr) @@ -51,7 +50,7 @@ void SALOMEDS_AttributeStudyProperties::SetUserName(const std::string& theName) dynamic_cast(_local_impl); anImpl->ChangeCreatorName(theName); } else - SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->SetUserName(theName.c_str()); + ((SALOMEDS::AttributeStudyProperties_var)SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl))->SetUserName(theName.c_str()); } std::string SALOMEDS_AttributeStudyProperties::GetUserName() @@ -62,9 +61,9 @@ std::string SALOMEDS_AttributeStudyProperties::GetUserName() aName = dynamic_cast(_local_impl)->GetCreatorName(); } #ifndef WIN32 - else aName = SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->GetUserName(); + else aName = ((SALOMEDS::AttributeStudyProperties_var)SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl))->GetUserName(); #else - else aName = SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->GetUserNameA(); + else aName = ((SALOMEDS::AttributeStudyProperties_var)SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl))->GetUserNameA(); #endif return aName; } @@ -79,22 +78,22 @@ void SALOMEDS_AttributeStudyProperties::SetCreationDate dynamic_cast(_local_impl); int aTmp; if (anImpl->GetCreationDate(aTmp, aTmp, aTmp, aTmp, aTmp)) return; - string S; + std::string S; anImpl->SetModification(S, theMinute, theHour, theDay, theMonth, theYear); } else { - SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->SetCreationDate(theMinute, - theHour, - theDay, - theMonth, - theYear); + ((SALOMEDS::AttributeStudyProperties_var)SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl))->SetCreationDate(theMinute, + theHour, + theDay, + theMonth, + theYear); } } bool SALOMEDS_AttributeStudyProperties::GetCreationDate(int& theMinute, - int& theHour, - int& theDay, - int& theMonth, - int& theYear) + int& theHour, + int& theDay, + int& theMonth, + int& theYear) { bool ret; if (_isLocal) { @@ -103,11 +102,11 @@ bool SALOMEDS_AttributeStudyProperties::GetCreationDate(int& theMinute, (_local_impl)->GetCreationDate(theMinute, theHour, theDay, theMonth, theYear); } else { CORBA::Long aMinute, anHour, aDay, aMonth, anYear; - ret = SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->GetCreationDate(aMinute, - anHour, - aDay, - aMonth, - anYear); + ret = ((SALOMEDS::AttributeStudyProperties_var)SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl))->GetCreationDate(aMinute, + anHour, + aDay, + aMonth, + anYear); theMinute = (int)aMinute; theHour = (int)anHour; theDay = (int)aDay; @@ -129,7 +128,7 @@ void SALOMEDS_AttributeStudyProperties::SetCreationMode(const std::string& theMo else //Not defined dynamic_cast(_local_impl)->SetCreationMode(0); } - else SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->SetCreationMode(theMode.c_str()); + else ((SALOMEDS::AttributeStudyProperties_var)SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl))->SetCreationMode(theMode.c_str()); } std::string SALOMEDS_AttributeStudyProperties::GetCreationMode() @@ -142,7 +141,7 @@ std::string SALOMEDS_AttributeStudyProperties::GetCreationMode() if (mode == 2) aMode = "copy from"; } else - aMode = SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->GetCreationMode(); + aMode = ((SALOMEDS::AttributeStudyProperties_var)SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl))->GetCreationMode(); return aMode; } @@ -153,7 +152,7 @@ void SALOMEDS_AttributeStudyProperties::SetModified(int theModified) dynamic_cast(_local_impl)->SetModified(theModified); } else - SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->SetModified(theModified); + ((SALOMEDS::AttributeStudyProperties_var)SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl))->SetModified(theModified); } bool SALOMEDS_AttributeStudyProperties::IsModified() @@ -164,7 +163,7 @@ bool SALOMEDS_AttributeStudyProperties::IsModified() ret = dynamic_cast(_local_impl)->IsModified(); } else - ret = SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->IsModified(); + ret = ((SALOMEDS::AttributeStudyProperties_var)SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl))->IsModified(); return ret; } @@ -176,7 +175,7 @@ int SALOMEDS_AttributeStudyProperties::GetModified() isModified = dynamic_cast(_local_impl)->GetModified(); } else - isModified = SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->GetModified(); + isModified = ((SALOMEDS::AttributeStudyProperties_var)SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl))->GetModified(); return isModified; } @@ -187,7 +186,7 @@ void SALOMEDS_AttributeStudyProperties::SetLocked(bool theLocked) dynamic_cast(_local_impl)->SetLocked(theLocked); } else - SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->SetLocked(theLocked); + ((SALOMEDS::AttributeStudyProperties_var)SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl))->SetLocked(theLocked); } bool SALOMEDS_AttributeStudyProperties::IsLocked() @@ -198,16 +197,16 @@ bool SALOMEDS_AttributeStudyProperties::IsLocked() ret = dynamic_cast(_local_impl)->IsLocked(); } else - ret = SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->IsLocked(); + ret = ((SALOMEDS::AttributeStudyProperties_var)SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl))->IsLocked(); return ret; } void SALOMEDS_AttributeStudyProperties::SetModification(const std::string& theName, - int theMinute, - int theHour, - int theDay, - int theMonth, - int theYear) + int theMinute, + int theHour, + int theDay, + int theMonth, + int theYear) { if (_isLocal) { CheckLocked(); @@ -215,7 +214,7 @@ void SALOMEDS_AttributeStudyProperties::SetModification(const std::string& theNa SALOMEDSImpl_AttributeStudyProperties* anImpl = dynamic_cast(_local_impl); anImpl->SetModification(theName, theMinute, theHour, theDay, theMonth, theYear); } else - SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->SetModification(theName.c_str(), + ((SALOMEDS::AttributeStudyProperties_var)SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl))->SetModification(theName.c_str(), theMinute, theHour, theDay, @@ -224,19 +223,19 @@ void SALOMEDS_AttributeStudyProperties::SetModification(const std::string& theNa } void SALOMEDS_AttributeStudyProperties::GetModificationsList(std::vector& theNames, - std::vector& theMinutes, - std::vector& theHours, - std::vector& theDays, - std::vector& theMonths, - std::vector& theYears, - bool theWithCreator) + std::vector& theMinutes, + std::vector& theHours, + std::vector& theDays, + std::vector& theMonths, + std::vector& theYears, + bool theWithCreator) { int i, aLength; if (_isLocal) { SALOMEDS::Locker lock; - vector aNames; - vector aMinutes, aHours, aDays, aMonths, aYears; + std::vector aNames; + std::vector aMinutes, aHours, aDays, aMonths, aYears; SALOMEDSImpl_AttributeStudyProperties* anImpl = dynamic_cast(_local_impl); anImpl->GetModifications(aNames, aMinutes, aHours, aDays, aMonths, aYears); aLength = aNames.size(); @@ -252,13 +251,13 @@ void SALOMEDS_AttributeStudyProperties::GetModificationsList(std::vectorGetModificationsList(aNames.out(), - aMinutes.out(), - aHours.out(), - aDays.out(), - aMonths.out(), - aYears.out(), - theWithCreator); + ((SALOMEDS::AttributeStudyProperties_var)SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl))->GetModificationsList(aNames.out(), + aMinutes.out(), + aHours.out(), + aDays.out(), + aMonths.out(), + aYears.out(), + theWithCreator); aLength = aNames->length(); for (i = 0; i(_local_impl); + anImpl->SetComment(theComment); + } else + ((SALOMEDS::AttributeStudyProperties_var)SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl))->SetComment(theComment.c_str()); +} + +std::string SALOMEDS_AttributeStudyProperties::GetComment() +{ + std::string aComment; + if (_isLocal) { + SALOMEDS::Locker lock; + aComment = dynamic_cast(_local_impl)->GetComment(); + } + else + aComment = ((SALOMEDS::AttributeStudyProperties_var)SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl))->GetComment(); + return aComment; +} + + +void SALOMEDS_AttributeStudyProperties::SetUnits(const std::string& theUnits) +{ + if (_isLocal) { + CheckLocked(); + SALOMEDS::Locker lock; + SALOMEDSImpl_AttributeStudyProperties* anImpl = + dynamic_cast(_local_impl); + anImpl->SetUnits(theUnits); + } else + ((SALOMEDS::AttributeStudyProperties_var)SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl))->SetUnits(theUnits.c_str()); +} + +std::string SALOMEDS_AttributeStudyProperties::GetUnits() +{ + std::string anUnits; + if (_isLocal) { + SALOMEDS::Locker lock; + anUnits = dynamic_cast(_local_impl)->GetUnits(); + } + else + anUnits = ((SALOMEDS::AttributeStudyProperties_var)SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl))->GetUnits(); + return anUnits; +} diff --git a/src/SALOMEDS/SALOMEDS_AttributeStudyProperties.hxx b/src/SALOMEDS/SALOMEDS_AttributeStudyProperties.hxx index ed1c19ecc..4ebd180bd 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeStudyProperties.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeStudyProperties.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeStudyProperties.hxx // Author : Sergey RUIN // Module : SALOME @@ -62,18 +63,25 @@ public: virtual void SetLocked(bool theLocked); virtual bool IsLocked(); virtual void SetModification(const std::string& theName, - int theMinute, - int theHour, - int theDay, - int theMonth, - int theYear); + int theMinute, + int theHour, + int theDay, + int theMonth, + int theYear); virtual void GetModificationsList(std::vector& theNames, - std::vector& theMinutes, - std::vector& theHours, - std::vector& theDays, - std::vector& theMonths, - std::vector& theYears, - bool theWithCreator); + std::vector& theMinutes, + std::vector& theHours, + std::vector& theDays, + std::vector& theMonths, + std::vector& theYears, + bool theWithCreator); + + virtual void SetUnits(const std::string& theUnits); + virtual std::string GetUnits(); + + virtual void SetComment(const std::string& theComment); + virtual std::string GetComment(); + }; diff --git a/src/SALOMEDS/SALOMEDS_AttributeStudyProperties_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeStudyProperties_i.cxx index b1415aab8..a6bd88294 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeStudyProperties_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeStudyProperties_i.cxx @@ -1,31 +1,31 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeStudyProperties_i.cxx // Author : Sergey RUIN // Module : SALOME // #include "SALOMEDS_AttributeStudyProperties_i.hxx" #include "SALOMEDS.hxx" -using namespace std; #define CREATION_MODE_NOTDEFINED 0 #define CREATION_MODE_SCRATCH 1 @@ -41,31 +41,31 @@ void SALOMEDS_AttributeStudyProperties_i::SetUserName(const char* theName) char* SALOMEDS_AttributeStudyProperties_i::GetUserName() { SALOMEDS::Locker lock; - string S = dynamic_cast(_impl)->GetCreatorName(); + std::string S = dynamic_cast(_impl)->GetCreatorName(); CORBA::String_var c_s = CORBA::string_dup(S.c_str()); return c_s._retn(); } void SALOMEDS_AttributeStudyProperties_i::SetCreationDate(CORBA::Long theMinute, - CORBA::Long theHour, - CORBA::Long theDay, - CORBA::Long theMonth, - CORBA::Long theYear) + CORBA::Long theHour, + CORBA::Long theDay, + CORBA::Long theMonth, + CORBA::Long theYear) { SALOMEDS::Locker lock; CheckLocked(); SALOMEDSImpl_AttributeStudyProperties* aProp = dynamic_cast(_impl); int aTmp; if (aProp->GetCreationDate(aTmp, aTmp, aTmp, aTmp, aTmp)) return; - string S; + std::string S; aProp->SetModification(S, theMinute, theHour, theDay, theMonth, theYear); } CORBA::Boolean SALOMEDS_AttributeStudyProperties_i::GetCreationDate(CORBA::Long& theMinute, - CORBA::Long& theHour, - CORBA::Long& theDay, - CORBA::Long& theMonth, - CORBA::Long& theYear) + CORBA::Long& theHour, + CORBA::Long& theDay, + CORBA::Long& theMonth, + CORBA::Long& theYear) { SALOMEDS::Locker lock; int aMinute; @@ -137,11 +137,11 @@ CORBA::Boolean SALOMEDS_AttributeStudyProperties_i::IsLocked() } void SALOMEDS_AttributeStudyProperties_i::SetModification(const char* theName, - CORBA::Long theMinute, - CORBA::Long theHour, - CORBA::Long theDay, - CORBA::Long theMonth, - CORBA::Long theYear) + CORBA::Long theMinute, + CORBA::Long theHour, + CORBA::Long theDay, + CORBA::Long theMonth, + CORBA::Long theYear) { SALOMEDS::Locker lock; CheckLocked(); @@ -151,16 +151,16 @@ void SALOMEDS_AttributeStudyProperties_i::SetModification(const char* theName, } void SALOMEDS_AttributeStudyProperties_i::GetModificationsList(SALOMEDS::StringSeq_out theNames, - SALOMEDS::LongSeq_out theMinutes, - SALOMEDS::LongSeq_out theHours, - SALOMEDS::LongSeq_out theDays, - SALOMEDS::LongSeq_out theMonths, - SALOMEDS::LongSeq_out theYears, - CORBA::Boolean theWithCreator) + SALOMEDS::LongSeq_out theMinutes, + SALOMEDS::LongSeq_out theHours, + SALOMEDS::LongSeq_out theDays, + SALOMEDS::LongSeq_out theMonths, + SALOMEDS::LongSeq_out theYears, + CORBA::Boolean theWithCreator) { SALOMEDS::Locker lock; - vector aNames; - vector aMinutes, aHours, aDays, aMonths, aYears; + std::vector aNames; + std::vector aMinutes, aHours, aDays, aMonths, aYears; SALOMEDSImpl_AttributeStudyProperties* aProp = dynamic_cast(_impl); aProp->GetModifications(aNames, aMinutes, aHours, aDays, aMonths, aYears); int aLength = aNames.size(); @@ -187,3 +187,34 @@ void SALOMEDS_AttributeStudyProperties_i::GetModificationsList(SALOMEDS::StringS (*theYears)[a] = aYears[ind-1]; } } + +void SALOMEDS_AttributeStudyProperties_i::SetComment(const char* theComment) +{ + SALOMEDS::Locker lock; + CheckLocked(); + dynamic_cast(_impl)->SetComment(std::string(theComment)); +} + +char* SALOMEDS_AttributeStudyProperties_i::GetComment() +{ + SALOMEDS::Locker lock; + std::string C = dynamic_cast(_impl)->GetComment(); + CORBA::String_var c_s = CORBA::string_dup(C.c_str()); + return c_s._retn(); +} + +void SALOMEDS_AttributeStudyProperties_i::SetUnits(const char* theUnits) +{ + SALOMEDS::Locker lock; + CheckLocked(); + dynamic_cast(_impl)->SetUnits(std::string(theUnits)); +} + +char* SALOMEDS_AttributeStudyProperties_i::GetUnits() +{ + SALOMEDS::Locker lock; + std::string U = dynamic_cast(_impl)->GetUnits(); + CORBA::String_var c_s = CORBA::string_dup(U.c_str()); + return c_s._retn(); +} + diff --git a/src/SALOMEDS/SALOMEDS_AttributeStudyProperties_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeStudyProperties_i.hxx index 1b53e3a12..7c6198ee1 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeStudyProperties_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeStudyProperties_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeStudyProperties_i.hxx // Author : Sergey RUIN // Module : SALOME @@ -54,19 +55,24 @@ public: virtual void SetLocked(CORBA::Boolean theLocked); virtual CORBA::Boolean IsLocked(); virtual void SetModification(const char* theName, - CORBA::Long theMinute, - CORBA::Long theHour, - CORBA::Long theDay, - CORBA::Long theMonth, - CORBA::Long theYear); + CORBA::Long theMinute, + CORBA::Long theHour, + CORBA::Long theDay, + CORBA::Long theMonth, + CORBA::Long theYear); virtual void GetModificationsList(SALOMEDS::StringSeq_out theNames, - SALOMEDS::LongSeq_out theMinutes, - SALOMEDS::LongSeq_out theHours, - SALOMEDS::LongSeq_out theDays, - SALOMEDS::LongSeq_out theMonths, - SALOMEDS::LongSeq_out theYears, - CORBA::Boolean theWithCreator); + SALOMEDS::LongSeq_out theMinutes, + SALOMEDS::LongSeq_out theHours, + SALOMEDS::LongSeq_out theDays, + SALOMEDS::LongSeq_out theMonths, + SALOMEDS::LongSeq_out theYears, + CORBA::Boolean theWithCreator); + + virtual void SetComment(const char* theComment); + virtual char* GetComment(); + virtual void SetUnits(const char* theUnits); + virtual char* GetUnits(); }; diff --git a/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger.cxx b/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger.cxx index 522377918..8b09c86f5 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeTableOfInteger.cxx // Author : Sergey RUIN // Module : SALOME @@ -26,8 +27,6 @@ #include "SALOMEDS_AttributeTableOfInteger.hxx" #include "SALOMEDS.hxx" -using namespace std; - SALOMEDS_AttributeTableOfInteger::SALOMEDS_AttributeTableOfInteger (SALOMEDSImpl_AttributeTableOfInteger* theAttr) :SALOMEDS_GenericAttribute(theAttr) @@ -73,13 +72,31 @@ void SALOMEDS_AttributeTableOfInteger::SetRowTitle(int theIndex, const std::stri else SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->SetRowTitle(theIndex, theTitle.c_str()); } +std::string SALOMEDS_AttributeTableOfInteger::GetRowTitle(int theIndex) +{ + std::string aTitle; + if (_isLocal) { + SALOMEDS::Locker lock; + try { + aTitle = dynamic_cast(_local_impl)->GetRowTitle(theIndex); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + aTitle = SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->GetRowTitle(theIndex); + } + return aTitle; +} + void SALOMEDS_AttributeTableOfInteger::SetRowTitles(const std::vector& theTitles) { int aLength = theTitles.size(), i; if (_isLocal) { CheckLocked(); SALOMEDS::Locker lock; - vector aSeq; + std::vector aSeq; for (i = 0; i < aLength; i++) aSeq.push_back(theTitles[i]); dynamic_cast(_local_impl)->SetRowTitles(aSeq); } @@ -118,13 +135,31 @@ void SALOMEDS_AttributeTableOfInteger::SetColumnTitle(int theIndex, const std::s else SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->SetColumnTitle(theIndex, theTitle.c_str()); } +std::string SALOMEDS_AttributeTableOfInteger::GetColumnTitle(int theIndex) +{ + std::string aTitle; + if (_isLocal) { + SALOMEDS::Locker lock; + try { + aTitle = dynamic_cast(_local_impl)->GetColumnTitle(theIndex); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + aTitle = SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->GetColumnTitle(theIndex); + } + return aTitle; +} + void SALOMEDS_AttributeTableOfInteger::SetColumnTitles(const std::vector& theTitles) { int aLength = theTitles.size(), i; if (_isLocal) { CheckLocked(); SALOMEDS::Locker lock; - vector aSeq; + std::vector aSeq; for (i = 0; i < aLength; i++) aSeq.push_back(theTitles[i]); dynamic_cast(_local_impl)->SetColumnTitles(aSeq); } @@ -162,6 +197,24 @@ void SALOMEDS_AttributeTableOfInteger::SetRowUnit(int theIndex, const std::strin else SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->SetRowUnit(theIndex, theUnit.c_str()); } +std::string SALOMEDS_AttributeTableOfInteger::GetRowUnit(int theIndex) +{ + std::string aTitle; + if (_isLocal) { + SALOMEDS::Locker lock; + try { + aTitle = dynamic_cast(_local_impl)->GetRowUnit(theIndex); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + aTitle = SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->GetRowUnit(theIndex); + } + return aTitle; +} + void SALOMEDS_AttributeTableOfInteger::SetRowUnits(const std::vector& theUnits) { int aLength = theUnits.size(), i; @@ -228,7 +281,7 @@ void SALOMEDS_AttributeTableOfInteger::AddRow(const std::vector& theData) aTable->SetRowData(aTable->GetNbRows() + 1, theData); } catch(...) { - throw SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength(); + throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); } } else { @@ -250,7 +303,7 @@ void SALOMEDS_AttributeTableOfInteger::SetRow(int theRow, const std::vector aTable->SetRowData(theRow, theData); } catch(...) { - throw SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength(); + throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); } } else { @@ -289,7 +342,7 @@ void SALOMEDS_AttributeTableOfInteger::AddColumn(const std::vector& theData aTable->SetColumnData(aTable->GetNbColumns() + 1, theData); } catch(...) { - throw SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength(); + throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); } } else { @@ -311,7 +364,7 @@ void SALOMEDS_AttributeTableOfInteger::SetColumn(int theColumn, const std::vecto aTable->SetColumnData(theColumn, theData); } catch(...) { - throw SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength(); + throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); } } else { @@ -347,7 +400,7 @@ void SALOMEDS_AttributeTableOfInteger::PutValue(int theValue, int theRow, int th dynamic_cast(_local_impl)->PutValue(theValue, theRow, theColumn); } catch(...) { - throw SALOMEDS::AttributeTableOfInteger::IncorrectIndex(); + throw SALOMEDS::AttributeTable::IncorrectIndex(); } } else { @@ -375,7 +428,7 @@ int SALOMEDS_AttributeTableOfInteger::GetValue(int theRow, int theColumn) aValue = dynamic_cast(_local_impl)->GetValue(theRow, theColumn); } catch(...) { - throw SALOMEDS::AttributeTableOfInteger::IncorrectIndex(); + throw SALOMEDS::AttributeTable::IncorrectIndex(); } } else { @@ -384,6 +437,22 @@ int SALOMEDS_AttributeTableOfInteger::GetValue(int theRow, int theColumn) return aValue; } +void SALOMEDS_AttributeTableOfInteger::RemoveValue(int theRow, int theColumn) +{ + if (_isLocal) { + SALOMEDS::Locker lock; + try { + dynamic_cast(_local_impl)->RemoveValue(theRow, theColumn); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->RemoveValue(theRow, theColumn); + } +} + std::vector SALOMEDS_AttributeTableOfInteger::GetRowSetIndices(int theRow) { std::vector aVector; @@ -409,3 +478,155 @@ void SALOMEDS_AttributeTableOfInteger::SetNbColumns(int theNbColumns) } else SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->SetNbColumns(theNbColumns); } + +std::vector SALOMEDS_AttributeTableOfInteger::SortRow(int theRow, SortOrder theOrder, SortPolicy thePolicy) +{ + std::vector aVector; + int aLength, i; + if (_isLocal) { + SALOMEDS::Locker lock; + try { + aVector = dynamic_cast(_local_impl)->SortRow(theRow, + (SALOMEDSImpl_AttributeTable::SortOrder)theOrder, + (SALOMEDSImpl_AttributeTable::SortPolicy)thePolicy); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + SALOMEDS::LongSeq_var aSet = + SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->SortRow(theRow, + (SALOMEDS::AttributeTable::SortOrder)theOrder, + (SALOMEDS::AttributeTable::SortPolicy)thePolicy); + aLength = aSet->length(); + for (i = 0; i < aLength; i++) aVector.push_back(aSet[i]); + } + return aVector; +} + +std::vector SALOMEDS_AttributeTableOfInteger::SortColumn(int theColumn, SortOrder theOrder, SortPolicy thePolicy) +{ + std::vector aVector; + int aLength, i; + if (_isLocal) { + SALOMEDS::Locker lock; + try { + aVector = dynamic_cast(_local_impl)->SortColumn(theColumn, + (SALOMEDSImpl_AttributeTable::SortOrder)theOrder, + (SALOMEDSImpl_AttributeTable::SortPolicy)thePolicy); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + SALOMEDS::LongSeq_var aSet = + SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->SortColumn(theColumn, + (SALOMEDS::AttributeTable::SortOrder)theOrder, + (SALOMEDS::AttributeTable::SortPolicy)thePolicy); + aLength = aSet->length(); + for (i = 0; i < aLength; i++) aVector.push_back(aSet[i]); + } + return aVector; +} + +std::vector SALOMEDS_AttributeTableOfInteger::SortByRow(int theRow, SortOrder theOrder, SortPolicy thePolicy) +{ + std::vector aVector; + int aLength, i; + if (_isLocal) { + SALOMEDS::Locker lock; + try { + aVector = dynamic_cast(_local_impl)->SortByRow(theRow, + (SALOMEDSImpl_AttributeTable::SortOrder)theOrder, + (SALOMEDSImpl_AttributeTable::SortPolicy)thePolicy); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + SALOMEDS::LongSeq_var aSet = + SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->SortByRow(theRow, + (SALOMEDS::AttributeTable::SortOrder)theOrder, + (SALOMEDS::AttributeTable::SortPolicy)thePolicy); + aLength = aSet->length(); + for (i = 0; i < aLength; i++) aVector.push_back(aSet[i]); + } + return aVector; +} + +std::vector SALOMEDS_AttributeTableOfInteger::SortByColumn(int theColumn, SortOrder theOrder, SortPolicy thePolicy) +{ + std::vector aVector; + int aLength, i; + if (_isLocal) { + SALOMEDS::Locker lock; + try { + aVector = dynamic_cast(_local_impl)->SortByColumn(theColumn, + (SALOMEDSImpl_AttributeTable::SortOrder)theOrder, + (SALOMEDSImpl_AttributeTable::SortPolicy)thePolicy); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + SALOMEDS::LongSeq_var aSet = + SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->SortByColumn(theColumn, + (SALOMEDS::AttributeTable::SortOrder)theOrder, + (SALOMEDS::AttributeTable::SortPolicy)thePolicy); + aLength = aSet->length(); + for (i = 0; i < aLength; i++) aVector.push_back(aSet[i]); + } + return aVector; +} + +void SALOMEDS_AttributeTableOfInteger::SwapCells(int theRow1, int theColumn1, int theRow2, int theColumn2) +{ + if (_isLocal) { + SALOMEDS::Locker lock; + try { + dynamic_cast(_local_impl)->SwapCells(theRow1, theColumn1, theRow2, theColumn2); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->SwapCells(theRow1, theColumn1, theRow2, theColumn2); + } +} + +void SALOMEDS_AttributeTableOfInteger::SwapRows(int theRow1, int theRow2) +{ + if (_isLocal) { + SALOMEDS::Locker lock; + try { + dynamic_cast(_local_impl)->SwapRows(theRow1, theRow2); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->SwapRows(theRow1, theRow2); + } +} + +void SALOMEDS_AttributeTableOfInteger::SwapColumns(int theColumn1, int theColumn2) +{ + if (_isLocal) { + SALOMEDS::Locker lock; + try { + dynamic_cast(_local_impl)->SwapColumns(theColumn1, theColumn2); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->SwapColumns(theColumn1, theColumn2); + } +} diff --git a/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger.hxx b/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger.hxx index c585ef2b5..883ddd549 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeTableOfInteger.hxx // Author : Sergey RUIN // Module : SALOME @@ -47,13 +48,16 @@ public: virtual void SetTitle(const std::string& theTitle); virtual std::string GetTitle(); virtual void SetRowTitle(int theIndex, const std::string& theTitle); + virtual std::string GetRowTitle(int theIndex); virtual void SetRowTitles(const std::vector& theTitles); virtual std::vector GetRowTitles(); virtual void SetColumnTitle(int theIndex, const std::string& theTitle); + virtual std::string GetColumnTitle(int theIndex); virtual void SetColumnTitles(const std::vector& theTitles); virtual std::vector GetColumnTitles(); virtual void SetRowUnit(int theIndex, const std::string& theUnit); + virtual std::string GetRowUnit(int theIndex); virtual void SetRowUnits(const std::vector& theUnits); virtual std::vector GetRowUnits(); @@ -68,10 +72,18 @@ public: virtual void PutValue(int theValue, int theRow, int theColumn); virtual bool HasValue(int theRow, int theColumn); virtual int GetValue(int theRow, int theColumn); + virtual void RemoveValue(int theRow, int theColumn); virtual std::vector GetRowSetIndices(int theRow); virtual void SetNbColumns(int theNbColumns); + virtual std::vector SortRow(int theRow, SortOrder theOrder, SortPolicy thePolicy); + virtual std::vector SortColumn(int theColumn, SortOrder theOrder, SortPolicy thePolicy); + virtual std::vector SortByRow(int theRow, SortOrder theOrder, SortPolicy thePolicy); + virtual std::vector SortByColumn(int theColumn, SortOrder theOrder, SortPolicy thePolicy); + virtual void SwapCells(int theRow1, int theColumn1, int theRow2, int theColumn2); + virtual void SwapRows(int theRow1, int theRow2); + virtual void SwapColumns(int theColumn1, int theColumn2); }; #endif diff --git a/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger_i.cxx index 992bd9163..ab2b47a4d 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeTableOfInteger_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -29,21 +30,19 @@ #include "Utils_ExceptHandlers.hxx" #include -#include +#include #include #include -using namespace std; - -UNEXPECT_CATCH(ATI_IncorrectIndex, SALOMEDS::AttributeTableOfInteger::IncorrectIndex); -UNEXPECT_CATCH(ATI_IncorrectArgumentLength, SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength); +UNEXPECT_CATCH(ATI_IncorrectIndex, SALOMEDS::AttributeTable::IncorrectIndex); +UNEXPECT_CATCH(ATI_IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectArgumentLength); void SALOMEDS_AttributeTableOfInteger_i::SetTitle(const char* theTitle) { SALOMEDS::Locker lock; CheckLocked(); CORBA::String_var aStr = CORBA::string_dup(theTitle); - dynamic_cast(_impl)->SetTitle(string(aStr)); + dynamic_cast(_impl)->SetTitle(std::string(aStr)); } char* SALOMEDS_AttributeTableOfInteger_i::GetTitle() @@ -55,24 +54,36 @@ char* SALOMEDS_AttributeTableOfInteger_i::GetTitle() } void SALOMEDS_AttributeTableOfInteger_i::SetRowTitle(CORBA::Long theIndex, const char* theTitle) - throw (SALOMEDS::AttributeTableOfInteger::IncorrectIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch (ATI_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); + if (theIndex < 1 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + aTable->SetRowTitle(theIndex, std::string(theTitle)); +} + +char* SALOMEDS_AttributeTableOfInteger_i::GetRowTitle(CORBA::Long theIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) { SALOMEDS::Locker lock; Unexpect aCatch (ATI_IncorrectIndex); CheckLocked(); SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); - if (theIndex <= 0 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfInteger::IncorrectIndex(); - aTable->SetRowTitle(theIndex, string(theTitle)); + if (theIndex < 1 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + CORBA::String_var c_s = CORBA::string_dup(aTable->GetRowTitle(theIndex).c_str()); + return c_s._retn(); } void SALOMEDS_AttributeTableOfInteger_i::SetRowTitles(const SALOMEDS::StringSeq& theTitles) - throw (SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength) + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength) { SALOMEDS::Locker lock; Unexpect aCatch (ATI_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); - if (theTitles.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength(); + if (theTitles.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); for (int i = 0; i < theTitles.length(); i++) { SetRowTitle(i + 1, theTitles[i]); } @@ -90,25 +101,37 @@ SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfInteger_i::GetRowTitles() } void SALOMEDS_AttributeTableOfInteger_i::SetColumnTitle(CORBA::Long theIndex, const char* theTitle) - throw (SALOMEDS::AttributeTableOfInteger::IncorrectIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) { SALOMEDS::Locker lock; Unexpect aCatch (ATI_IncorrectIndex); CheckLocked(); SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); - if (theIndex <= 0 || theIndex > aTable->GetNbColumns()) throw SALOMEDS::AttributeTableOfInteger::IncorrectIndex(); + if (theIndex < 1 || theIndex > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); CORBA::String_var aStr = CORBA::string_dup(theTitle); - aTable->SetColumnTitle(theIndex, string(aStr)); + aTable->SetColumnTitle(theIndex, std::string(aStr)); +} + +char* SALOMEDS_AttributeTableOfInteger_i::GetColumnTitle(CORBA::Long theIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch (ATI_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); + if (theIndex < 1 || theIndex > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + CORBA::String_var c_s = CORBA::string_dup(aTable->GetColumnTitle(theIndex).c_str()); + return c_s._retn(); } void SALOMEDS_AttributeTableOfInteger_i::SetColumnTitles(const SALOMEDS::StringSeq& theTitles) - throw (SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength) + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength) { SALOMEDS::Locker lock; Unexpect aCatch(ATI_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); - if (theTitles.length() != aTable->GetNbColumns()) throw SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength(); + if (theTitles.length() != aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); for (int i = 0; i < theTitles.length(); i++) { aTable->SetColumnTitle(i + 1, (char*)theTitles[i].in()); } @@ -127,24 +150,36 @@ SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfInteger_i::GetColumnTitles() //Units support void SALOMEDS_AttributeTableOfInteger_i::SetRowUnit(CORBA::Long theIndex, const char* theUnit) - throw (SALOMEDS::AttributeTableOfInteger::IncorrectIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) { SALOMEDS::Locker lock; Unexpect aCatch (ATI_IncorrectIndex); CheckLocked(); SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); - if (theIndex <= 0 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfInteger::IncorrectIndex(); - aTable->SetRowUnit(theIndex, string(theUnit)); + if (theIndex < 1 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + aTable->SetRowUnit(theIndex, std::string(theUnit)); +} + +char* SALOMEDS_AttributeTableOfInteger_i::GetRowUnit(CORBA::Long theIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch (ATI_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); + if (theIndex < 1 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + CORBA::String_var c_s = CORBA::string_dup(aTable->GetRowUnit(theIndex).c_str()); + return c_s._retn(); } void SALOMEDS_AttributeTableOfInteger_i::SetRowUnits(const SALOMEDS::StringSeq& theUnits) - throw (SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength) + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength) { SALOMEDS::Locker lock; Unexpect aCatch (ATI_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); - if (theUnits.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength(); + if (theUnits.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); for (int i = 0; i < theUnits.length(); i++) { aTable->SetRowUnit(i + 1, (char*)theUnits[i].in()); } @@ -174,51 +209,51 @@ CORBA::Long SALOMEDS_AttributeTableOfInteger_i::GetNbColumns() } void SALOMEDS_AttributeTableOfInteger_i::AddRow(const SALOMEDS::LongSeq& theData) - throw (SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength) + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength) { SALOMEDS::Locker lock; Unexpect aCatch(ATI_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); - vector aRow; + std::vector aRow; for (int i = 0; i < theData.length(); i++) aRow.push_back(theData[i]); try { aTable->SetRowData(aTable->GetNbRows() + 1, aRow); } catch(...) { - throw SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength(); + throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); } } void SALOMEDS_AttributeTableOfInteger_i::SetRow(CORBA::Long theRow, const SALOMEDS::LongSeq& theData) - throw (SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength, SALOMEDS::AttributeTableOfInteger::IncorrectIndex) + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectIndex) { SALOMEDS::Locker lock; Unexpect aCatch(ATI_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); - vector aRow; + std::vector aRow; for (int i = 0; i < theData.length(); i++) aRow.push_back(theData[i]); try { aTable->SetRowData(theRow, aRow); } catch(...) { - throw SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength(); + throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); } } SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfInteger_i::GetRow(CORBA::Long theRow) - throw (SALOMEDS::AttributeTableOfInteger::IncorrectIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) { SALOMEDS::Locker lock; Unexpect aCatch(ATI_IncorrectIndex); SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); - if (theRow <= 0 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfInteger::IncorrectIndex(); + if (theRow < 1 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq; - vector aRow = aTable->GetRowData(theRow); + std::vector aRow = aTable->GetRowData(theRow); CorbaSeq->length(aRow.size()); for (int i = 0; i < aRow.size(); i++) { CorbaSeq[i] = aRow[i]; @@ -227,51 +262,51 @@ SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfInteger_i::GetRow(CORBA::Long theRow } void SALOMEDS_AttributeTableOfInteger_i::AddColumn(const SALOMEDS::LongSeq& theData) - throw (SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength) + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength) { SALOMEDS::Locker lock; Unexpect aCatch(ATI_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); - vector aColumn; + std::vector aColumn; for (int i = 0; i < theData.length(); i++) aColumn.push_back(theData[i]); try { aTable->SetColumnData(aTable->GetNbColumns() + 1, aColumn); } catch(...) { - throw SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength(); + throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); } } void SALOMEDS_AttributeTableOfInteger_i::SetColumn(CORBA::Long theColumn, const SALOMEDS::LongSeq& theData) - throw (SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength, SALOMEDS::AttributeTableOfInteger::IncorrectIndex) + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectIndex) { SALOMEDS::Locker lock; Unexpect aCatch(ATI_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); - vector aColumn; + std::vector aColumn; for (int i = 0; i < theData.length(); i++) aColumn.push_back(theData[i]); try { aTable->SetColumnData(theColumn, aColumn); } catch(...) { - throw SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength(); + throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); } } SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfInteger_i::GetColumn(CORBA::Long theColumn) - throw (SALOMEDS::AttributeTableOfInteger::IncorrectIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) { SALOMEDS::Locker lock; Unexpect aCatch(ATI_IncorrectIndex); SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); - if (theColumn <= 0 || theColumn > aTable->GetNbColumns()) throw SALOMEDS::AttributeTableOfInteger::IncorrectIndex(); + if (theColumn < 1 || theColumn > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq; - vector aColumn = aTable->GetColumnData(theColumn); + std::vector aColumn = aTable->GetColumnData(theColumn); CorbaSeq->length(aColumn.size()); for (int i = 0; i < aColumn.size(); i++) { CorbaSeq[i] = aColumn[i]; @@ -280,7 +315,7 @@ SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfInteger_i::GetColumn(CORBA::Long the } void SALOMEDS_AttributeTableOfInteger_i::PutValue(CORBA::Long theValue, CORBA::Long theRow, CORBA::Long theColumn) - throw (SALOMEDS::AttributeTableOfInteger::IncorrectIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) { SALOMEDS::Locker lock; Unexpect aCatch(ATI_IncorrectIndex); @@ -291,7 +326,7 @@ void SALOMEDS_AttributeTableOfInteger_i::PutValue(CORBA::Long theValue, CORBA::L aTable->PutValue(theValue, theRow, theColumn); } catch(...) { - throw SALOMEDS::AttributeTableOfInteger::IncorrectIndex(); + throw SALOMEDS::AttributeTable::IncorrectIndex(); } } @@ -302,32 +337,50 @@ CORBA::Boolean SALOMEDS_AttributeTableOfInteger_i::HasValue(CORBA::Long theRow, } CORBA::Long SALOMEDS_AttributeTableOfInteger_i::GetValue(CORBA::Long theRow, CORBA::Long theColumn) - throw (SALOMEDS::AttributeTableOfInteger::IncorrectIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) { SALOMEDS::Locker lock; Unexpect aCatch(ATI_IncorrectIndex); SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); - if (theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfInteger::IncorrectIndex(); + if (theRow < 1 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + if (theColumn < 1 || theColumn > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); CORBA::Long aValue; try { aValue = aTable->GetValue(theRow, theColumn); } catch(...) { - throw SALOMEDS::AttributeTableOfInteger::IncorrectIndex(); + throw SALOMEDS::AttributeTable::IncorrectIndex(); } return aValue; } +void SALOMEDS_AttributeTableOfInteger_i::RemoveValue(CORBA::Long theRow, CORBA::Long theColumn) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch(ATI_IncorrectIndex); + SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); + if (theRow < 1 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + if (theColumn < 1 || theColumn > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + + try { + aTable->RemoveValue(theRow, theColumn); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } +} + SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfInteger_i::GetRowSetIndices(CORBA::Long theRow) { SALOMEDS::Locker lock; SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); - if(theRow <= 0 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfInteger::IncorrectIndex(); + if(theRow < 1 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq; - vector aSeq = aTable->GetSetRowIndices(theRow); + std::vector aSeq = aTable->GetSetRowIndices(theRow); CorbaSeq->length(aSeq.size()); for (int i = 0; i < aSeq.size(); i++) { CorbaSeq[i] = aSeq[i]; @@ -335,7 +388,6 @@ SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfInteger_i::GetRowSetIndices(CORBA::L return CorbaSeq._retn(); } - void SALOMEDS_AttributeTableOfInteger_i::SetNbColumns(CORBA::Long theNbColumns) { SALOMEDS::Locker lock; @@ -348,17 +400,17 @@ bool SALOMEDS_AttributeTableOfInteger_i::ReadFromFile(const SALOMEDS::TMPFile& t SALOMEDS::Locker lock; SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); - string aStream((char*)&theStream[0], theStream.length()); + std::string aStream((char*)&theStream[0], theStream.length()); aTable->Load(aStream); return true; } -SALOMEDS::TMPFile* SALOMEDS_AttributeTableOfInteger_i::SaveToFile() +SALOMEDS::TMPFile* SALOMEDS_AttributeTableOfInteger_i::SaveToFile() { SALOMEDS::Locker lock; SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); - string aString = aTable->Save(); + std::string aString = aTable->Save(); char* aBuffer = (char*)CORBA::string_dup(aString.c_str()); int aBufferSize = strlen((char*)aBuffer); @@ -370,4 +422,167 @@ SALOMEDS::TMPFile* SALOMEDS_AttributeTableOfInteger_i::SaveToFile() return aStreamFile._retn(); } +SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfInteger_i::SortRow(CORBA::Long theRow, + SALOMEDS::AttributeTable::SortOrder sortOrder, + SALOMEDS::AttributeTable::SortPolicy sortPolicy) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch(ATI_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); + if (theRow < 1 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + + std::vector aSeq; + SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq; + try { + aSeq = aTable->SortRow(theRow, (SALOMEDSImpl_AttributeTable::SortOrder)sortOrder, + (SALOMEDSImpl_AttributeTable::SortPolicy)sortPolicy); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + CorbaSeq->length(aSeq.size()); + for (int i = 0; i < aSeq.size(); i++) { + CorbaSeq[i] = aSeq[i]; + } + return CorbaSeq._retn(); +} + +SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfInteger_i::SortColumn(CORBA::Long theColumn, + SALOMEDS::AttributeTable::SortOrder sortOrder, + SALOMEDS::AttributeTable::SortPolicy sortPolicy) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch(ATI_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); + if (theColumn < 1 || theColumn > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + + std::vector aSeq; + SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq; + try { + aSeq = aTable->SortColumn(theColumn, (SALOMEDSImpl_AttributeTable::SortOrder)sortOrder, + (SALOMEDSImpl_AttributeTable::SortPolicy)sortPolicy); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + CorbaSeq->length(aSeq.size()); + for (int i = 0; i < aSeq.size(); i++) { + CorbaSeq[i] = aSeq[i]; + } + return CorbaSeq._retn(); +} + +SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfInteger_i::SortByRow(CORBA::Long theRow, + SALOMEDS::AttributeTable::SortOrder sortOrder, + SALOMEDS::AttributeTable::SortPolicy sortPolicy) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch(ATI_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); + if (theRow < 1 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + + std::vector aSeq; + SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq; + try { + aSeq = aTable->SortByRow(theRow, (SALOMEDSImpl_AttributeTable::SortOrder)sortOrder, + (SALOMEDSImpl_AttributeTable::SortPolicy)sortPolicy); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + CorbaSeq->length(aSeq.size()); + for (int i = 0; i < aSeq.size(); i++) { + CorbaSeq[i] = aSeq[i]; + } + return CorbaSeq._retn(); +} + +SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfInteger_i::SortByColumn(CORBA::Long theColumn, + SALOMEDS::AttributeTable::SortOrder sortOrder, + SALOMEDS::AttributeTable::SortPolicy sortPolicy) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch(ATI_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); + if (theColumn < 1 || theColumn > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + + std::vector aSeq; + SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq; + try { + aSeq = aTable->SortByColumn(theColumn, (SALOMEDSImpl_AttributeTable::SortOrder)sortOrder, + (SALOMEDSImpl_AttributeTable::SortPolicy)sortPolicy); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + CorbaSeq->length(aSeq.size()); + for (int i = 0; i < aSeq.size(); i++) { + CorbaSeq[i] = aSeq[i]; + } + return CorbaSeq._retn(); +} + +void SALOMEDS_AttributeTableOfInteger_i::SwapCells(CORBA::Long theRow1, CORBA::Long theColumn1, + CORBA::Long theRow2, CORBA::Long theColumn2) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch(ATI_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); + if (theRow1 < 1 || theRow1 > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + if (theColumn1 < 1 || theColumn1 > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + if (theRow2 < 1 || theRow2 > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + if (theColumn2 < 1 || theColumn2 > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + + try { + aTable->SwapCells(theRow1, theColumn1, theRow2, theColumn2); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } +} + +void SALOMEDS_AttributeTableOfInteger_i::SwapRows(CORBA::Long theRow1, CORBA::Long theRow2) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch(ATI_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); + if (theRow1 < 1 || theRow1 > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + if (theRow2 < 1 || theRow2 > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + + try { + aTable->SwapRows(theRow1, theRow2); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } +} + +void SALOMEDS_AttributeTableOfInteger_i::SwapColumns(CORBA::Long theColumn1, CORBA::Long theColumn2) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch(ATI_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); + if (theColumn1 < 1 || theColumn1 > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + if (theColumn2 < 1 || theColumn2 > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + try { + aTable->SwapColumns(theColumn1, theColumn2); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } +} diff --git a/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger_i.hxx index 861543371..1cf175a93 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeTableOfInteger_i.hxx // Author : Sergey RUIN // Module : SALOME @@ -36,9 +37,7 @@ class SALOMEDS_AttributeTableOfInteger_i: public virtual POA_SALOMEDS::AttributeTableOfInteger, public virtual SALOMEDS_GenericAttribute_i { - public: - SALOMEDS_AttributeTableOfInteger_i(SALOMEDSImpl_AttributeTableOfInteger* theAttr, CORBA::ORB_ptr orb) :SALOMEDS_GenericAttribute_i(theAttr, orb) {}; @@ -47,45 +46,74 @@ public: virtual void SetTitle(const char* theTitle); virtual char* GetTitle(); virtual void SetRowTitle(CORBA::Long theIndex, const char* theTitle) - throw (SALOMEDS::AttributeTableOfInteger::IncorrectIndex); + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual char* GetRowTitle(CORBA::Long theIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex); virtual void SetRowTitles(const SALOMEDS::StringSeq& theTitles) - throw (SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength); + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength); virtual SALOMEDS::StringSeq* GetRowTitles(); virtual void SetColumnTitle(CORBA::Long theIndex, const char* theTitle) - throw (SALOMEDS::AttributeTableOfInteger::IncorrectIndex); + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual char* GetColumnTitle(CORBA::Long theIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex); virtual void SetColumnTitles(const SALOMEDS::StringSeq& theTitles) - throw (SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength); + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength); virtual SALOMEDS::StringSeq* GetColumnTitles(); virtual void SetRowUnit(CORBA::Long theIndex, const char* theUnit) - throw (SALOMEDS::AttributeTableOfInteger::IncorrectIndex); + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual char* GetRowUnit(CORBA::Long theIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex); virtual void SetRowUnits(const SALOMEDS::StringSeq& theUnits) - throw (SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength); + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength); virtual SALOMEDS::StringSeq* GetRowUnits(); virtual CORBA::Long GetNbRows(); virtual CORBA::Long GetNbColumns(); virtual void AddRow(const SALOMEDS::LongSeq& theData) - throw (SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength); + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength); virtual void SetRow(CORBA::Long theRow, const SALOMEDS::LongSeq& theData) - throw (SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength, SALOMEDS::AttributeTableOfInteger::IncorrectIndex); + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectIndex); virtual SALOMEDS::LongSeq* GetRow(CORBA::Long theRow) - throw (SALOMEDS::AttributeTableOfInteger::IncorrectIndex); + throw (SALOMEDS::AttributeTable::IncorrectIndex); virtual void AddColumn(const SALOMEDS::LongSeq& theData) - throw (SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength); + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength); virtual void SetColumn(CORBA::Long theColumn, const SALOMEDS::LongSeq& theData) - throw (SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength, SALOMEDS::AttributeTableOfInteger::IncorrectIndex); + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectIndex); virtual SALOMEDS::LongSeq* GetColumn(CORBA::Long theColumn) - throw (SALOMEDS::AttributeTableOfInteger::IncorrectIndex); + throw (SALOMEDS::AttributeTable::IncorrectIndex); virtual void PutValue(CORBA::Long theValue, CORBA::Long theRow, CORBA::Long theColumn) - throw (SALOMEDS::AttributeTableOfInteger::IncorrectIndex); + throw (SALOMEDS::AttributeTable::IncorrectIndex); virtual CORBA::Boolean HasValue(CORBA::Long theRow, CORBA::Long theColumn); virtual CORBA::Long GetValue(CORBA::Long theRow, CORBA::Long theColumn) - throw (SALOMEDS::AttributeTableOfInteger::IncorrectIndex); + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual void RemoveValue(CORBA::Long theRow, CORBA::Long theColumn) + throw (SALOMEDS::AttributeTable::IncorrectIndex); virtual SALOMEDS::LongSeq* GetRowSetIndices(CORBA::Long theRow); virtual void SetNbColumns(CORBA::Long theNbColumns); + virtual SALOMEDS::LongSeq* SortRow(CORBA::Long theRow, SALOMEDS::AttributeTable::SortOrder sortOrder, + SALOMEDS::AttributeTable::SortPolicy sortPolicy) + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual SALOMEDS::LongSeq* SortColumn(CORBA::Long theColumn, SALOMEDS::AttributeTable::SortOrder sortOrder, + SALOMEDS::AttributeTable::SortPolicy sortPolicy) + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual SALOMEDS::LongSeq* SortByRow(CORBA::Long theRow, SALOMEDS::AttributeTable::SortOrder sortOrder, + SALOMEDS::AttributeTable::SortPolicy sortPolicy) + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual SALOMEDS::LongSeq* SortByColumn(CORBA::Long theColumn, SALOMEDS::AttributeTable::SortOrder sortOrder, + SALOMEDS::AttributeTable::SortPolicy sortPolicy) + throw (SALOMEDS::AttributeTable::IncorrectIndex); + + virtual void SwapCells(CORBA::Long theRow1, CORBA::Long theColumn1, + CORBA::Long theRow2, CORBA::Long theColumn2) + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual void SwapRows(CORBA::Long theRow1, CORBA::Long theRow2) + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual void SwapColumns(CORBA::Long theColumn1, CORBA::Long theColumn2) + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual bool ReadFromFile(const SALOMEDS::TMPFile& theStream); virtual SALOMEDS::TMPFile* SaveToFile(); }; diff --git a/src/SALOMEDS/SALOMEDS_AttributeTableOfReal.cxx b/src/SALOMEDS/SALOMEDS_AttributeTableOfReal.cxx index 8efbaaec5..97c8ab2bb 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTableOfReal.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTableOfReal.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeTableOfReal.cxx // Author : Sergey RUIN // Module : SALOME @@ -26,8 +27,6 @@ #include "SALOMEDS_AttributeTableOfReal.hxx" #include "SALOMEDS.hxx" -using namespace std; - SALOMEDS_AttributeTableOfReal::SALOMEDS_AttributeTableOfReal (SALOMEDSImpl_AttributeTableOfReal* theAttr) :SALOMEDS_GenericAttribute(theAttr) @@ -72,6 +71,24 @@ void SALOMEDS_AttributeTableOfReal::SetRowTitle(int theIndex, const std::string& else SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->SetRowTitle(theIndex, theTitle.c_str()); } +std::string SALOMEDS_AttributeTableOfReal::GetRowTitle(int theIndex) +{ + std::string aTitle; + if (_isLocal) { + SALOMEDS::Locker lock; + try { + aTitle = dynamic_cast(_local_impl)->GetRowTitle(theIndex); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + aTitle = SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->GetRowTitle(theIndex); + } + return aTitle; +} + void SALOMEDS_AttributeTableOfReal::SetRowTitles(const std::vector& theTitles) { CheckLocked(); @@ -115,6 +132,24 @@ void SALOMEDS_AttributeTableOfReal::SetColumnTitle(int theIndex, const std::stri else SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->SetColumnTitle(theIndex, theTitle.c_str()); } +std::string SALOMEDS_AttributeTableOfReal::GetColumnTitle(int theIndex) +{ + std::string aTitle; + if (_isLocal) { + SALOMEDS::Locker lock; + try { + aTitle = dynamic_cast(_local_impl)->GetColumnTitle(theIndex); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + aTitle = SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->GetColumnTitle(theIndex); + } + return aTitle; +} + void SALOMEDS_AttributeTableOfReal::SetColumnTitles(const std::vector& theTitles) { int aLength = theTitles.size(), i; @@ -157,6 +192,24 @@ void SALOMEDS_AttributeTableOfReal::SetRowUnit(int theIndex, const std::string& else SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->SetRowUnit(theIndex, theUnit.c_str()); } +std::string SALOMEDS_AttributeTableOfReal::GetRowUnit(int theIndex) +{ + std::string aTitle; + if (_isLocal) { + SALOMEDS::Locker lock; + try { + aTitle = dynamic_cast(_local_impl)->GetRowUnit(theIndex); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + aTitle = SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->GetRowUnit(theIndex); + } + return aTitle; +} + void SALOMEDS_AttributeTableOfReal::SetRowUnits(const std::vector& theUnits) { int aLength = theUnits.size(), i; @@ -184,7 +237,7 @@ std::vector SALOMEDS_AttributeTableOfReal::GetRowUnits() else { SALOMEDS::StringSeq_var aSeq = SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->GetRowUnits(); aLength = aSeq->length(); - for (i = 0; i < aLength; i++) aVector.push_back(string(aSeq[i].in())); + for (i = 0; i < aLength; i++) aVector.push_back(std::string(aSeq[i].in())); } return aVector; } @@ -222,7 +275,7 @@ void SALOMEDS_AttributeTableOfReal::AddRow(const std::vector& theData) aTable->SetRowData(aTable->GetNbRows() + 1, theData); } catch(...) { - throw SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength(); + throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); } } else { @@ -244,7 +297,7 @@ void SALOMEDS_AttributeTableOfReal::SetRow(int theRow, const std::vector aTable->SetRowData(theRow, theData); } catch(...) { - throw SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength(); + throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); } } else { @@ -283,7 +336,7 @@ void SALOMEDS_AttributeTableOfReal::AddColumn(const std::vector& theData aTable->SetColumnData(aTable->GetNbColumns() + 1, theData); } catch(...) { - throw SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength(); + throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); } } else { @@ -305,7 +358,7 @@ void SALOMEDS_AttributeTableOfReal::SetColumn(int theColumn, const std::vectorSetColumnData(theColumn, theData); } catch(...) { - throw SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength(); + throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); } } else { @@ -341,7 +394,7 @@ void SALOMEDS_AttributeTableOfReal::PutValue(double theValue, int theRow, int th dynamic_cast(_local_impl)->PutValue(theValue, theRow, theColumn); } catch(...) { - throw SALOMEDS::AttributeTableOfReal::IncorrectIndex(); + throw SALOMEDS::AttributeTable::IncorrectIndex(); } } else { @@ -369,7 +422,7 @@ double SALOMEDS_AttributeTableOfReal::GetValue(int theRow, int theColumn) aValue = dynamic_cast(_local_impl)->GetValue(theRow, theColumn); } catch(...) { - throw SALOMEDS::AttributeTableOfReal::IncorrectIndex(); + throw SALOMEDS::AttributeTable::IncorrectIndex(); } } else { @@ -378,6 +431,22 @@ double SALOMEDS_AttributeTableOfReal::GetValue(int theRow, int theColumn) return aValue; } +void SALOMEDS_AttributeTableOfReal::RemoveValue(int theRow, int theColumn) +{ + if (_isLocal) { + SALOMEDS::Locker lock; + try { + dynamic_cast(_local_impl)->RemoveValue(theRow, theColumn); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->RemoveValue(theRow, theColumn); + } +} + std::vector SALOMEDS_AttributeTableOfReal::GetRowSetIndices(int theRow) { std::vector aVector; @@ -402,3 +471,155 @@ void SALOMEDS_AttributeTableOfReal::SetNbColumns(int theNbColumns) } else SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->SetNbColumns(theNbColumns); } + +std::vector SALOMEDS_AttributeTableOfReal::SortRow(int theRow, SortOrder theOrder, SortPolicy thePolicy) +{ + std::vector aVector; + int aLength, i; + if (_isLocal) { + SALOMEDS::Locker lock; + try { + aVector = dynamic_cast(_local_impl)->SortRow(theRow, + (SALOMEDSImpl_AttributeTable::SortOrder)theOrder, + (SALOMEDSImpl_AttributeTable::SortPolicy)thePolicy); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + SALOMEDS::LongSeq_var aSet = + SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->SortRow(theRow, + (SALOMEDS::AttributeTable::SortOrder)theOrder, + (SALOMEDS::AttributeTable::SortPolicy)thePolicy); + aLength = aSet->length(); + for (i = 0; i < aLength; i++) aVector.push_back(aSet[i]); + } + return aVector; +} + +std::vector SALOMEDS_AttributeTableOfReal::SortColumn(int theColumn, SortOrder theOrder, SortPolicy thePolicy) +{ + std::vector aVector; + int aLength, i; + if (_isLocal) { + SALOMEDS::Locker lock; + try { + aVector = dynamic_cast(_local_impl)->SortColumn(theColumn, + (SALOMEDSImpl_AttributeTable::SortOrder)theOrder, + (SALOMEDSImpl_AttributeTable::SortPolicy)thePolicy); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + SALOMEDS::LongSeq_var aSet = + SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->SortColumn(theColumn, + (SALOMEDS::AttributeTable::SortOrder)theOrder, + (SALOMEDS::AttributeTable::SortPolicy)thePolicy); + aLength = aSet->length(); + for (i = 0; i < aLength; i++) aVector.push_back(aSet[i]); + } + return aVector; +} + +std::vector SALOMEDS_AttributeTableOfReal::SortByRow(int theRow, SortOrder theOrder, SortPolicy thePolicy) +{ + std::vector aVector; + int aLength, i; + if (_isLocal) { + SALOMEDS::Locker lock; + try { + aVector = dynamic_cast(_local_impl)->SortByRow(theRow, + (SALOMEDSImpl_AttributeTable::SortOrder)theOrder, + (SALOMEDSImpl_AttributeTable::SortPolicy)thePolicy); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + SALOMEDS::LongSeq_var aSet = + SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->SortByRow(theRow, + (SALOMEDS::AttributeTable::SortOrder)theOrder, + (SALOMEDS::AttributeTable::SortPolicy)thePolicy); + aLength = aSet->length(); + for (i = 0; i < aLength; i++) aVector.push_back(aSet[i]); + } + return aVector; +} + +std::vector SALOMEDS_AttributeTableOfReal::SortByColumn(int theColumn, SortOrder theOrder, SortPolicy thePolicy) +{ + std::vector aVector; + int aLength, i; + if (_isLocal) { + SALOMEDS::Locker lock; + try { + aVector = dynamic_cast(_local_impl)->SortByColumn(theColumn, + (SALOMEDSImpl_AttributeTable::SortOrder)theOrder, + (SALOMEDSImpl_AttributeTable::SortPolicy)thePolicy); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + SALOMEDS::LongSeq_var aSet = + SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->SortByColumn(theColumn, + (SALOMEDS::AttributeTable::SortOrder)theOrder, + (SALOMEDS::AttributeTable::SortPolicy)thePolicy); + aLength = aSet->length(); + for (i = 0; i < aLength; i++) aVector.push_back(aSet[i]); + } + return aVector; +} + +void SALOMEDS_AttributeTableOfReal::SwapCells(int theRow1, int theColumn1, int theRow2, int theColumn2) +{ + if (_isLocal) { + SALOMEDS::Locker lock; + try { + dynamic_cast(_local_impl)->SwapCells(theRow1, theColumn1, theRow2, theColumn2); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->SwapCells(theRow1, theColumn1, theRow2, theColumn2); + } +} + +void SALOMEDS_AttributeTableOfReal::SwapRows(int theRow1, int theRow2) +{ + if (_isLocal) { + SALOMEDS::Locker lock; + try { + dynamic_cast(_local_impl)->SwapRows(theRow1, theRow2); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->SwapRows(theRow1, theRow2); + } +} + +void SALOMEDS_AttributeTableOfReal::SwapColumns(int theColumn1, int theColumn2) +{ + if (_isLocal) { + SALOMEDS::Locker lock; + try { + dynamic_cast(_local_impl)->SwapColumns(theColumn1, theColumn2); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->SwapColumns(theColumn1, theColumn2); + } +} diff --git a/src/SALOMEDS/SALOMEDS_AttributeTableOfReal.hxx b/src/SALOMEDS/SALOMEDS_AttributeTableOfReal.hxx index f58219ce3..b4e9747cb 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTableOfReal.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTableOfReal.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeTableOfReal.hxx // Author : Sergey RUIN // Module : SALOME @@ -47,13 +48,16 @@ public: virtual void SetTitle(const std::string& theTitle); virtual std::string GetTitle(); virtual void SetRowTitle(int theIndex, const std::string& theTitle); + virtual std::string GetRowTitle(int theIndex); virtual void SetRowTitles(const std::vector& theTitles); virtual std::vector GetRowTitles(); virtual void SetColumnTitle(int theIndex, const std::string& theTitle); + virtual std::string GetColumnTitle(int theIndex); virtual void SetColumnTitles(const std::vector& theTitles); virtual std::vector GetColumnTitles(); virtual void SetRowUnit(int theIndex, const std::string& theUnit); + virtual std::string GetRowUnit(int theIndex); virtual void SetRowUnits(const std::vector& theUnits); virtual std::vector GetRowUnits(); @@ -68,10 +72,18 @@ public: virtual void PutValue(double theValue, int theRow, int theColumn); virtual bool HasValue(int theRow, int theColumn); virtual double GetValue(int theRow, int theColumn); + virtual void RemoveValue(int theRow, int theColumn); virtual std::vector GetRowSetIndices(int theRow); virtual void SetNbColumns(int theNbColumns); + virtual std::vector SortRow(int theRow, SortOrder theOrder, SortPolicy thePolicy); + virtual std::vector SortColumn(int theColumn, SortOrder theOrder, SortPolicy thePolicy); + virtual std::vector SortByRow(int theRow, SortOrder theOrder, SortPolicy thePolicy); + virtual std::vector SortByColumn(int theColumn, SortOrder theOrder, SortPolicy thePolicy); + virtual void SwapCells(int theRow1, int theColumn1, int theRow2, int theColumn2); + virtual void SwapRows(int theRow1, int theRow2); + virtual void SwapColumns(int theColumn1, int theColumn2); }; #endif diff --git a/src/SALOMEDS/SALOMEDS_AttributeTableOfReal_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeTableOfReal_i.cxx index 9a4de029d..3db06aa14 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTableOfReal_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTableOfReal_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeTableOfReal_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -26,15 +27,13 @@ #include "SALOMEDS_AttributeTableOfReal_i.hxx" #include "SALOMEDS.hxx" -#include +#include #include #include -using namespace std; - #include "Utils_ExceptHandlers.hxx" -UNEXPECT_CATCH(ATR_IncorrectIndex, SALOMEDS::AttributeTableOfReal::IncorrectIndex); -UNEXPECT_CATCH(ATR_IncorrectArgumentLength, SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength); +UNEXPECT_CATCH(ATR_IncorrectIndex, SALOMEDS::AttributeTable::IncorrectIndex); +UNEXPECT_CATCH(ATR_IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectArgumentLength); void SALOMEDS_AttributeTableOfReal_i::SetTitle(const char* theTitle) { @@ -42,7 +41,7 @@ void SALOMEDS_AttributeTableOfReal_i::SetTitle(const char* theTitle) CheckLocked(); SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); CORBA::String_var aStr = CORBA::string_dup(theTitle); - aTable->SetTitle(string(aStr)); + aTable->SetTitle(std::string(aStr)); } char* SALOMEDS_AttributeTableOfReal_i::GetTitle() @@ -54,24 +53,36 @@ char* SALOMEDS_AttributeTableOfReal_i::GetTitle() } void SALOMEDS_AttributeTableOfReal_i::SetRowTitle(CORBA::Long theIndex, const char* theTitle) - throw (SALOMEDS::AttributeTableOfReal::IncorrectIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) { SALOMEDS::Locker lock; Unexpect aCatch (ATR_IncorrectIndex); CheckLocked(); SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); - if (theIndex <= 0 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfReal::IncorrectIndex(); - aTable->SetRowTitle(theIndex, string(theTitle)); + if (theIndex <= 0 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + aTable->SetRowTitle(theIndex, std::string(theTitle)); +} + +char* SALOMEDS_AttributeTableOfReal_i::GetRowTitle(CORBA::Long theIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch (ATR_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); + if (theIndex <= 0 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + CORBA::String_var c_s = CORBA::string_dup(aTable->GetRowTitle(theIndex).c_str()); + return c_s._retn(); } void SALOMEDS_AttributeTableOfReal_i::SetRowTitles(const SALOMEDS::StringSeq& theTitles) - throw (SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength) + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength) { SALOMEDS::Locker lock; Unexpect aCatch (ATR_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); - if (theTitles.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength(); + if (theTitles.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); for (int i = 0; i < theTitles.length(); i++) { aTable->SetRowTitle(i + 1, (char*)theTitles[i].in()); } @@ -89,25 +100,37 @@ SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfReal_i::GetRowTitles() } void SALOMEDS_AttributeTableOfReal_i::SetColumnTitle(CORBA::Long theIndex, const char* theTitle) - throw (SALOMEDS::AttributeTableOfReal::IncorrectIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) { SALOMEDS::Locker lock; Unexpect aCatch (ATR_IncorrectIndex); CheckLocked(); SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); - if (theIndex <= 0 || theIndex > aTable->GetNbColumns()) throw SALOMEDS::AttributeTableOfReal::IncorrectIndex(); + if (theIndex <= 0 || theIndex > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); CORBA::String_var aStr = CORBA::string_dup(theTitle); - aTable->SetColumnTitle(theIndex, string(aStr)); + aTable->SetColumnTitle(theIndex, std::string(aStr)); +} + +char* SALOMEDS_AttributeTableOfReal_i::GetColumnTitle(CORBA::Long theIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch (ATR_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); + if (theIndex <= 0 || theIndex > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + CORBA::String_var c_s = CORBA::string_dup(aTable->GetColumnTitle(theIndex).c_str()); + return c_s._retn(); } void SALOMEDS_AttributeTableOfReal_i::SetColumnTitles(const SALOMEDS::StringSeq& theTitles) - throw (SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength) + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength) { SALOMEDS::Locker lock; Unexpect aCatch(ATR_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); - if (theTitles.length() != aTable->GetNbColumns()) throw SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength(); + if (theTitles.length() != aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); for (int i = 0; i < theTitles.length(); i++) { aTable->SetColumnTitle(i + 1, (char*)theTitles[i].in()); } @@ -126,24 +149,36 @@ SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfReal_i::GetColumnTitles() //Units support void SALOMEDS_AttributeTableOfReal_i::SetRowUnit(CORBA::Long theIndex, const char* theUnit) - throw (SALOMEDS::AttributeTableOfReal::IncorrectIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) { SALOMEDS::Locker lock; Unexpect aCatch (ATR_IncorrectIndex); CheckLocked(); SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); - if (theIndex <= 0 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfReal::IncorrectIndex(); - aTable->SetRowUnit(theIndex, string(theUnit)); + if (theIndex <= 0 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + aTable->SetRowUnit(theIndex, std::string(theUnit)); +} + +char* SALOMEDS_AttributeTableOfReal_i::GetRowUnit(CORBA::Long theIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch (ATR_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); + if (theIndex <= 0 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + CORBA::String_var c_s = CORBA::string_dup(aTable->GetRowUnit(theIndex).c_str()); + return c_s._retn(); } void SALOMEDS_AttributeTableOfReal_i::SetRowUnits(const SALOMEDS::StringSeq& theUnits) - throw (SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength) + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength) { SALOMEDS::Locker lock; Unexpect aCatch (ATR_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); - if (theUnits.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength(); + if (theUnits.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); for (int i = 0; i < theUnits.length(); i++) { aTable->SetRowUnit(i + 1, (char*)theUnits[i].in()); } @@ -174,41 +209,41 @@ CORBA::Long SALOMEDS_AttributeTableOfReal_i::GetNbColumns() } void SALOMEDS_AttributeTableOfReal_i::AddRow(const SALOMEDS::DoubleSeq& theData) - throw (SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength) + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength) { SALOMEDS::Locker lock; Unexpect aCatch(ATR_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); - vector aRow; + std::vector aRow; for (int i = 0; i < theData.length(); i++) aRow.push_back(theData[i]); aTable->SetRowData(aTable->GetNbRows() + 1, aRow); } void SALOMEDS_AttributeTableOfReal_i::SetRow(CORBA::Long theRow, const SALOMEDS::DoubleSeq& theData) - throw (SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength, SALOMEDS::AttributeTableOfReal::IncorrectIndex) + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectIndex) { SALOMEDS::Locker lock; Unexpect aCatch(ATR_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); - vector aRow; + std::vector aRow; for (int i = 0; i < theData.length(); i++) aRow.push_back(theData[i]); aTable->SetRowData(theRow, aRow); } SALOMEDS::DoubleSeq* SALOMEDS_AttributeTableOfReal_i::GetRow(CORBA::Long theRow) - throw (SALOMEDS::AttributeTableOfReal::IncorrectIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) { SALOMEDS::Locker lock; Unexpect aCatch(ATR_IncorrectIndex); SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); - if (theRow <= 0 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfReal::IncorrectIndex(); + if (theRow <= 0 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); SALOMEDS::DoubleSeq_var CorbaSeq = new SALOMEDS::DoubleSeq; - vector aRow = aTable->GetRowData(theRow); + std::vector aRow = aTable->GetRowData(theRow); CorbaSeq->length(aRow.size()); for (int i = 0; i < aRow.size(); i++) { CorbaSeq[i] = aRow[i]; @@ -217,41 +252,41 @@ SALOMEDS::DoubleSeq* SALOMEDS_AttributeTableOfReal_i::GetRow(CORBA::Long theRow) } void SALOMEDS_AttributeTableOfReal_i::AddColumn(const SALOMEDS::DoubleSeq& theData) - throw (SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength) + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength) { SALOMEDS::Locker lock; Unexpect aCatch(ATR_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); - vector aColumn; + std::vector aColumn; for (int i = 0; i < theData.length(); i++) aColumn.push_back(theData[i]); aTable->SetColumnData(aTable->GetNbColumns() + 1, aColumn); } void SALOMEDS_AttributeTableOfReal_i::SetColumn(CORBA::Long theColumn, const SALOMEDS::DoubleSeq& theData) - throw (SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength, SALOMEDS::AttributeTableOfReal::IncorrectIndex) + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectIndex) { SALOMEDS::Locker lock; Unexpect aCatch(ATR_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); - vector aColumn; + std::vector aColumn; for (int i = 0; i < theData.length(); i++) aColumn.push_back(theData[i]); aTable->SetColumnData(theColumn, aColumn); } SALOMEDS::DoubleSeq* SALOMEDS_AttributeTableOfReal_i::GetColumn(CORBA::Long theColumn) - throw (SALOMEDS::AttributeTableOfReal::IncorrectIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) { SALOMEDS::Locker lock; Unexpect aCatch(ATR_IncorrectIndex); SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); - if (theColumn <= 0 || theColumn > aTable->GetNbColumns()) throw SALOMEDS::AttributeTableOfReal::IncorrectIndex(); + if (theColumn <= 0 || theColumn > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); SALOMEDS::DoubleSeq_var CorbaSeq = new SALOMEDS::DoubleSeq; - vector aColumn = aTable->GetColumnData(theColumn); + std::vector aColumn = aTable->GetColumnData(theColumn); CorbaSeq->length(aColumn.size()); for (int i = 0; i < aColumn.size(); i++) { CorbaSeq[i] = aColumn[i]; @@ -260,7 +295,7 @@ SALOMEDS::DoubleSeq* SALOMEDS_AttributeTableOfReal_i::GetColumn(CORBA::Long theC } void SALOMEDS_AttributeTableOfReal_i::PutValue(CORBA::Double theValue, CORBA::Long theRow, CORBA::Long theColumn) - throw (SALOMEDS::AttributeTableOfReal::IncorrectIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) { SALOMEDS::Locker lock; Unexpect aCatch(ATR_IncorrectIndex); @@ -277,12 +312,12 @@ CORBA::Boolean SALOMEDS_AttributeTableOfReal_i::HasValue(CORBA::Long theRow, COR } CORBA::Double SALOMEDS_AttributeTableOfReal_i::GetValue(CORBA::Long theRow, CORBA::Long theColumn) - throw (SALOMEDS::AttributeTableOfReal::IncorrectIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) { SALOMEDS::Locker lock; Unexpect aCatch(ATR_IncorrectIndex); SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); - if (theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfReal::IncorrectIndex(); + if (theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); CORBA::Double aValue; @@ -290,22 +325,38 @@ CORBA::Double SALOMEDS_AttributeTableOfReal_i::GetValue(CORBA::Long theRow, CORB aValue = aTable->GetValue(theRow, theColumn); } catch(...) { - throw SALOMEDS::AttributeTableOfReal::IncorrectIndex(); + throw SALOMEDS::AttributeTable::IncorrectIndex(); } return aValue; } +void SALOMEDS_AttributeTableOfReal_i::RemoveValue(CORBA::Long theRow, CORBA::Long theColumn) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch(ATR_IncorrectIndex); + SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); + if (theRow < 1 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + if (theColumn < 1 || theColumn > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + + try { + aTable->RemoveValue(theRow, theColumn); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } +} SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfReal_i::GetRowSetIndices(CORBA::Long theRow) { SALOMEDS::Locker lock; SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); - if(theRow <= 0 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfReal::IncorrectIndex(); + if(theRow <= 0 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq; - vector aSeq = aTable->GetSetRowIndices(theRow); + std::vector aSeq = aTable->GetSetRowIndices(theRow); int len = aSeq.size(); CorbaSeq->length(len); for (int i = 0; i < len; i++) { @@ -314,7 +365,6 @@ SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfReal_i::GetRowSetIndices(CORBA::Long return CorbaSeq._retn(); } - void SALOMEDS_AttributeTableOfReal_i::SetNbColumns(CORBA::Long theNbColumns) { SALOMEDS::Locker lock; @@ -327,7 +377,7 @@ bool SALOMEDS_AttributeTableOfReal_i::ReadFromFile(const SALOMEDS::TMPFile& theS SALOMEDS::Locker lock; SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); - string aStream((char*)&theStream[0], theStream.length()); + std::string aStream((char*)&theStream[0], theStream.length()); aTable->Load(aStream); return true; } @@ -337,7 +387,7 @@ SALOMEDS::TMPFile* SALOMEDS_AttributeTableOfReal_i::SaveToFile() SALOMEDS::Locker lock; SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); - string aString = aTable->Save(); + std::string aString = aTable->Save(); char* aBuffer = (char*)CORBA::string_dup(aString.c_str()); int aBufferSize = strlen((char*)aBuffer); @@ -347,3 +397,168 @@ SALOMEDS::TMPFile* SALOMEDS_AttributeTableOfReal_i::SaveToFile() return aStreamFile._retn(); } + +SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfReal_i::SortRow(CORBA::Long theRow, + SALOMEDS::AttributeTable::SortOrder sortOrder, + SALOMEDS::AttributeTable::SortPolicy sortPolicy) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch(ATR_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); + if (theRow < 1 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + + std::vector aSeq; + SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq; + try { + aSeq = aTable->SortRow(theRow, (SALOMEDSImpl_AttributeTable::SortOrder)sortOrder, + (SALOMEDSImpl_AttributeTable::SortPolicy)sortPolicy); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + CorbaSeq->length(aSeq.size()); + for (int i = 0; i < aSeq.size(); i++) { + CorbaSeq[i] = aSeq[i]; + } + return CorbaSeq._retn(); +} + +SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfReal_i::SortColumn(CORBA::Long theColumn, + SALOMEDS::AttributeTable::SortOrder sortOrder, + SALOMEDS::AttributeTable::SortPolicy sortPolicy) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch(ATR_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); + if (theColumn < 1 || theColumn > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + + std::vector aSeq; + SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq; + try { + aSeq = aTable->SortColumn(theColumn, (SALOMEDSImpl_AttributeTable::SortOrder)sortOrder, + (SALOMEDSImpl_AttributeTable::SortPolicy)sortPolicy); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + CorbaSeq->length(aSeq.size()); + for (int i = 0; i < aSeq.size(); i++) { + CorbaSeq[i] = aSeq[i]; + } + return CorbaSeq._retn(); +} + +SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfReal_i::SortByRow(CORBA::Long theRow, + SALOMEDS::AttributeTable::SortOrder sortOrder, + SALOMEDS::AttributeTable::SortPolicy sortPolicy) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch(ATR_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); + if (theRow < 1 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + + std::vector aSeq; + SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq; + try { + aSeq = aTable->SortByRow(theRow, (SALOMEDSImpl_AttributeTable::SortOrder)sortOrder, + (SALOMEDSImpl_AttributeTable::SortPolicy)sortPolicy); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + CorbaSeq->length(aSeq.size()); + for (int i = 0; i < aSeq.size(); i++) { + CorbaSeq[i] = aSeq[i]; + } + return CorbaSeq._retn(); +} + +SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfReal_i::SortByColumn(CORBA::Long theColumn, + SALOMEDS::AttributeTable::SortOrder sortOrder, + SALOMEDS::AttributeTable::SortPolicy sortPolicy) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch(ATR_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); + if (theColumn < 1 || theColumn > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + + std::vector aSeq; + SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq; + try { + aSeq = aTable->SortByColumn(theColumn, (SALOMEDSImpl_AttributeTable::SortOrder)sortOrder, + (SALOMEDSImpl_AttributeTable::SortPolicy)sortPolicy); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + CorbaSeq->length(aSeq.size()); + for (int i = 0; i < aSeq.size(); i++) { + CorbaSeq[i] = aSeq[i]; + } + return CorbaSeq._retn(); +} + +void SALOMEDS_AttributeTableOfReal_i::SwapCells(CORBA::Long theRow1, CORBA::Long theColumn1, + CORBA::Long theRow2, CORBA::Long theColumn2) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch(ATR_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); + if (theRow1 < 1 || theRow1 > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + if (theColumn1 < 1 || theColumn1 > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + if (theRow2 < 1 || theRow2 > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + if (theColumn2 < 1 || theColumn2 > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + + try { + aTable->SwapCells(theRow1, theColumn1, theRow2, theColumn2); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } +} + +void SALOMEDS_AttributeTableOfReal_i::SwapRows(CORBA::Long theRow1, CORBA::Long theRow2) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch(ATR_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); + if (theRow1 < 1 || theRow1 > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + if (theRow2 < 1 || theRow2 > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + + try { + aTable->SwapRows(theRow1, theRow2); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } +} + +void SALOMEDS_AttributeTableOfReal_i::SwapColumns(CORBA::Long theColumn1, CORBA::Long theColumn2) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch(ATR_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); + if (theColumn1 < 1 || theColumn1 > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + if (theColumn2 < 1 || theColumn2 > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + + try { + aTable->SwapColumns(theColumn1, theColumn2); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } +} diff --git a/src/SALOMEDS/SALOMEDS_AttributeTableOfReal_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeTableOfReal_i.hxx index e77ee0420..2d9f44c38 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTableOfReal_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTableOfReal_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeTableOfReal_i.hxx // Author : Michael Ponikarov // Module : SALOME @@ -33,58 +34,86 @@ #include "SALOMEDS_GenericAttribute_i.hxx" #include "SALOMEDSImpl_AttributeTableOfReal.hxx" -class SALOMEDS_AttributeTableOfReal_i: public virtual POA_SALOMEDS::AttributeTableOfReal, - public virtual SALOMEDS_GenericAttribute_i { - +class SALOMEDS_AttributeTableOfReal_i : public virtual POA_SALOMEDS::AttributeTableOfReal, + public virtual SALOMEDS_GenericAttribute_i +{ public: - SALOMEDS_AttributeTableOfReal_i(SALOMEDSImpl_AttributeTableOfReal* theAttr, CORBA::ORB_ptr orb) - :SALOMEDS_GenericAttribute_i(theAttr, orb) {}; - + : SALOMEDS_GenericAttribute_i(theAttr, orb) {}; + ~SALOMEDS_AttributeTableOfReal_i() {}; - - virtual void SetTitle(const char* theTitle); + + virtual void SetTitle(const char* theTitle); virtual char* GetTitle(); virtual void SetRowTitle(CORBA::Long theIndex, const char* theTitle) - throw (SALOMEDS::AttributeTableOfReal::IncorrectIndex); + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual char* GetRowTitle(CORBA::Long theIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex); virtual void SetRowTitles(const SALOMEDS::StringSeq& theTitles) - throw (SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength); + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength); virtual SALOMEDS::StringSeq* GetRowTitles(); virtual void SetColumnTitle(CORBA::Long theIndex, const char* theTitle) - throw (SALOMEDS::AttributeTableOfReal::IncorrectIndex); + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual char* GetColumnTitle(CORBA::Long theIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex); virtual void SetColumnTitles(const SALOMEDS::StringSeq& theTitles) - throw (SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength); + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength); virtual SALOMEDS::StringSeq* GetColumnTitles(); virtual void SetRowUnit(CORBA::Long theIndex, const char* theUnit) - throw (SALOMEDS::AttributeTableOfReal::IncorrectIndex); + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual char* GetRowUnit(CORBA::Long theIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex); virtual void SetRowUnits(const SALOMEDS::StringSeq& theUnits) - throw (SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength); + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength); virtual SALOMEDS::StringSeq* GetRowUnits(); virtual CORBA::Long GetNbRows(); virtual CORBA::Long GetNbColumns(); virtual void AddRow(const SALOMEDS::DoubleSeq& theData) - throw (SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength); + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength); virtual void SetRow(CORBA::Long theRow, const SALOMEDS::DoubleSeq& theData) - throw (SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength, SALOMEDS::AttributeTableOfReal::IncorrectIndex); + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectIndex); virtual SALOMEDS::DoubleSeq* GetRow(CORBA::Long theRow) - throw (SALOMEDS::AttributeTableOfReal::IncorrectIndex); + throw (SALOMEDS::AttributeTable::IncorrectIndex); virtual void AddColumn(const SALOMEDS::DoubleSeq& theData) - throw (SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength); + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength); virtual void SetColumn(CORBA::Long theColumn, const SALOMEDS::DoubleSeq& theData) - throw (SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength, SALOMEDS::AttributeTableOfReal::IncorrectIndex); + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectIndex); virtual SALOMEDS::DoubleSeq* GetColumn(CORBA::Long theColumn) - throw (SALOMEDS::AttributeTableOfReal::IncorrectIndex); + throw (SALOMEDS::AttributeTable::IncorrectIndex); virtual void PutValue(CORBA::Double theValue, CORBA::Long theRow, CORBA::Long theColumn) - throw (SALOMEDS::AttributeTableOfReal::IncorrectIndex); + throw (SALOMEDS::AttributeTable::IncorrectIndex); virtual CORBA::Boolean HasValue(CORBA::Long theRow, CORBA::Long theColumn); virtual CORBA::Double GetValue(CORBA::Long theRow, CORBA::Long theColumn) - throw (SALOMEDS::AttributeTableOfReal::IncorrectIndex); + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual void RemoveValue(CORBA::Long theRow, CORBA::Long theColumn) + throw (SALOMEDS::AttributeTable::IncorrectIndex); virtual SALOMEDS::LongSeq* GetRowSetIndices(CORBA::Long theRow); virtual void SetNbColumns(CORBA::Long theNbColumns); + virtual SALOMEDS::LongSeq* SortRow(CORBA::Long theRow, SALOMEDS::AttributeTable::SortOrder sortOrder, + SALOMEDS::AttributeTable::SortPolicy sortPolicy) + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual SALOMEDS::LongSeq* SortColumn(CORBA::Long theColumn, SALOMEDS::AttributeTable::SortOrder sortOrder, + SALOMEDS::AttributeTable::SortPolicy sortPolicy) + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual SALOMEDS::LongSeq* SortByRow(CORBA::Long theRow, SALOMEDS::AttributeTable::SortOrder sortOrder, + SALOMEDS::AttributeTable::SortPolicy sortPolicy) + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual SALOMEDS::LongSeq* SortByColumn(CORBA::Long theColumn, SALOMEDS::AttributeTable::SortOrder sortOrder, + SALOMEDS::AttributeTable::SortPolicy sortPolicy) + throw (SALOMEDS::AttributeTable::IncorrectIndex); + + virtual void SwapCells(CORBA::Long theRow1, CORBA::Long theColumn1, + CORBA::Long theRow2, CORBA::Long theColumn2) + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual void SwapRows(CORBA::Long theRow1, CORBA::Long theRow2) + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual void SwapColumns(CORBA::Long theColumn1, CORBA::Long theColumn2) + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual bool ReadFromFile(const SALOMEDS::TMPFile& theStream); virtual SALOMEDS::TMPFile* SaveToFile(); diff --git a/src/SALOMEDS/SALOMEDS_AttributeTableOfString.cxx b/src/SALOMEDS/SALOMEDS_AttributeTableOfString.cxx index 227ebd4f4..ff24c2981 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTableOfString.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTableOfString.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeTableOfString.cxx // Author : Sergey RUIN // Module : SALOME @@ -28,8 +29,6 @@ #include -using namespace std; - SALOMEDS_AttributeTableOfString::SALOMEDS_AttributeTableOfString (SALOMEDSImpl_AttributeTableOfString* theAttr) :SALOMEDS_GenericAttribute(theAttr) @@ -75,6 +74,24 @@ void SALOMEDS_AttributeTableOfString::SetRowTitle(int theIndex, const std::strin else SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->SetRowTitle(theIndex, theTitle.c_str()); } +std::string SALOMEDS_AttributeTableOfString::GetRowTitle(int theIndex) +{ + std::string aTitle; + if (_isLocal) { + SALOMEDS::Locker lock; + try { + aTitle = dynamic_cast(_local_impl)->GetRowTitle(theIndex); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + aTitle = SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->GetRowTitle(theIndex); + } + return aTitle; +} + void SALOMEDS_AttributeTableOfString::SetRowTitles(const std::vector& theTitles) { int aLength = theTitles.size(), i; @@ -117,6 +134,24 @@ void SALOMEDS_AttributeTableOfString::SetColumnTitle(int theIndex, const std::st else SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->SetColumnTitle(theIndex, theTitle.c_str()); } +std::string SALOMEDS_AttributeTableOfString::GetColumnTitle(int theIndex) +{ + std::string aTitle; + if (_isLocal) { + SALOMEDS::Locker lock; + try { + aTitle = dynamic_cast(_local_impl)->GetColumnTitle(theIndex); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + aTitle = SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->GetColumnTitle(theIndex); + } + return aTitle; +} + void SALOMEDS_AttributeTableOfString::SetColumnTitles(const std::vector& theTitles) { int aLength = theTitles.size(), i; @@ -159,6 +194,24 @@ void SALOMEDS_AttributeTableOfString::SetRowUnit(int theIndex, const std::string else SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->SetRowUnit(theIndex, theUnit.c_str()); } +std::string SALOMEDS_AttributeTableOfString::GetRowUnit(int theIndex) +{ + std::string aTitle; + if (_isLocal) { + SALOMEDS::Locker lock; + try { + aTitle = dynamic_cast(_local_impl)->GetRowUnit(theIndex); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + aTitle = SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->GetRowUnit(theIndex); + } + return aTitle; +} + void SALOMEDS_AttributeTableOfString::SetRowUnits(const std::vector& theUnits) { int aLength = theUnits.size(), i; @@ -224,7 +277,7 @@ void SALOMEDS_AttributeTableOfString::AddRow(const std::vector& the aTable->SetRowData(aTable->GetNbRows() + 1, theData); } catch(...) { - throw SALOMEDS::AttributeTableOfString::IncorrectArgumentLength(); + throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); } } else { @@ -246,7 +299,7 @@ void SALOMEDS_AttributeTableOfString::SetRow(int theRow, const std::vectorSetRowData(theRow, theData); } catch(...) { - throw SALOMEDS::AttributeTableOfString::IncorrectArgumentLength(); + throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); } } else { @@ -285,7 +338,7 @@ void SALOMEDS_AttributeTableOfString::AddColumn(const std::vector& aTable->SetColumnData(aTable->GetNbColumns() + 1, theData); } catch(...) { - throw SALOMEDS::AttributeTableOfString::IncorrectArgumentLength(); + throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); } } else { @@ -307,7 +360,7 @@ void SALOMEDS_AttributeTableOfString::SetColumn(int theColumn, const std::vector aTable->SetColumnData(theColumn, theData); } catch(...) { - throw SALOMEDS::AttributeTableOfString::IncorrectArgumentLength(); + throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); } } else { @@ -344,7 +397,7 @@ void SALOMEDS_AttributeTableOfString::PutValue(const std::string& theValue, int dynamic_cast(_local_impl)->PutValue(theValue, theRow, theColumn); } catch(...) { - throw SALOMEDS::AttributeTableOfString::IncorrectIndex(); + throw SALOMEDS::AttributeTable::IncorrectIndex(); } } else { @@ -372,7 +425,7 @@ std::string SALOMEDS_AttributeTableOfString::GetValue(int theRow, int theColumn) aValue = dynamic_cast(_local_impl)->GetValue(theRow, theColumn); } catch(...) { - throw SALOMEDS::AttributeTableOfString::IncorrectIndex(); + throw SALOMEDS::AttributeTable::IncorrectIndex(); } } else { @@ -381,6 +434,22 @@ std::string SALOMEDS_AttributeTableOfString::GetValue(int theRow, int theColumn) return aValue; } +void SALOMEDS_AttributeTableOfString::RemoveValue(int theRow, int theColumn) +{ + if (_isLocal) { + SALOMEDS::Locker lock; + try { + dynamic_cast(_local_impl)->RemoveValue(theRow, theColumn); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->RemoveValue(theRow, theColumn); + } +} + std::vector SALOMEDS_AttributeTableOfString::GetRowSetIndices(int theRow) { std::vector aVector; @@ -406,3 +475,155 @@ void SALOMEDS_AttributeTableOfString::SetNbColumns(int theNbColumns) } else SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->SetNbColumns(theNbColumns); } + +std::vector SALOMEDS_AttributeTableOfString::SortRow(int theRow, SortOrder theOrder, SortPolicy thePolicy) +{ + std::vector aVector; + int aLength, i; + if (_isLocal) { + SALOMEDS::Locker lock; + try { + aVector = dynamic_cast(_local_impl)->SortRow(theRow, + (SALOMEDSImpl_AttributeTable::SortOrder)theOrder, + (SALOMEDSImpl_AttributeTable::SortPolicy)thePolicy); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + SALOMEDS::LongSeq_var aSet = + SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->SortRow(theRow, + (SALOMEDS::AttributeTable::SortOrder)theOrder, + (SALOMEDS::AttributeTable::SortPolicy)thePolicy); + aLength = aSet->length(); + for (i = 0; i < aLength; i++) aVector.push_back(aSet[i]); + } + return aVector; +} + +std::vector SALOMEDS_AttributeTableOfString::SortColumn(int theColumn, SortOrder theOrder, SortPolicy thePolicy) +{ + std::vector aVector; + int aLength, i; + if (_isLocal) { + SALOMEDS::Locker lock; + try { + aVector = dynamic_cast(_local_impl)->SortColumn(theColumn, + (SALOMEDSImpl_AttributeTable::SortOrder)theOrder, + (SALOMEDSImpl_AttributeTable::SortPolicy)thePolicy); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + SALOMEDS::LongSeq_var aSet = + SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->SortColumn(theColumn, + (SALOMEDS::AttributeTable::SortOrder)theOrder, + (SALOMEDS::AttributeTable::SortPolicy)thePolicy); + aLength = aSet->length(); + for (i = 0; i < aLength; i++) aVector.push_back(aSet[i]); + } + return aVector; +} + +std::vector SALOMEDS_AttributeTableOfString::SortByRow(int theRow, SortOrder theOrder, SortPolicy thePolicy) +{ + std::vector aVector; + int aLength, i; + if (_isLocal) { + SALOMEDS::Locker lock; + try { + aVector = dynamic_cast(_local_impl)->SortByRow(theRow, + (SALOMEDSImpl_AttributeTable::SortOrder)theOrder, + (SALOMEDSImpl_AttributeTable::SortPolicy)thePolicy); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + SALOMEDS::LongSeq_var aSet = + SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->SortByRow(theRow, + (SALOMEDS::AttributeTable::SortOrder)theOrder, + (SALOMEDS::AttributeTable::SortPolicy)thePolicy); + aLength = aSet->length(); + for (i = 0; i < aLength; i++) aVector.push_back(aSet[i]); + } + return aVector; +} + +std::vector SALOMEDS_AttributeTableOfString::SortByColumn(int theColumn, SortOrder theOrder, SortPolicy thePolicy) +{ + std::vector aVector; + int aLength, i; + if (_isLocal) { + SALOMEDS::Locker lock; + try { + aVector = dynamic_cast(_local_impl)->SortByColumn(theColumn, + (SALOMEDSImpl_AttributeTable::SortOrder)theOrder, + (SALOMEDSImpl_AttributeTable::SortPolicy)thePolicy); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + SALOMEDS::LongSeq_var aSet = + SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->SortByColumn(theColumn, + (SALOMEDS::AttributeTable::SortOrder)theOrder, + (SALOMEDS::AttributeTable::SortPolicy)thePolicy); + aLength = aSet->length(); + for (i = 0; i < aLength; i++) aVector.push_back(aSet[i]); + } + return aVector; +} + +void SALOMEDS_AttributeTableOfString::SwapCells(int theRow1, int theColumn1, int theRow2, int theColumn2) +{ + if (_isLocal) { + SALOMEDS::Locker lock; + try { + dynamic_cast(_local_impl)->SwapCells(theRow1, theColumn1, theRow2, theColumn2); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->SwapCells(theRow1, theColumn1, theRow2, theColumn2); + } +} + +void SALOMEDS_AttributeTableOfString::SwapRows(int theRow1, int theRow2) +{ + if (_isLocal) { + SALOMEDS::Locker lock; + try { + dynamic_cast(_local_impl)->SwapRows(theRow1, theRow2); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->SwapRows(theRow1, theRow2); + } +} + +void SALOMEDS_AttributeTableOfString::SwapColumns(int theColumn1, int theColumn2) +{ + if (_isLocal) { + SALOMEDS::Locker lock; + try { + dynamic_cast(_local_impl)->SwapColumns(theColumn1, theColumn2); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + } + else { + SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->SwapColumns(theColumn1, theColumn2); + } +} diff --git a/src/SALOMEDS/SALOMEDS_AttributeTableOfString.hxx b/src/SALOMEDS/SALOMEDS_AttributeTableOfString.hxx index f7e2207ee..c09411d5b 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTableOfString.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTableOfString.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeTableOfString.hxx // Author : Sergey RUIN // Module : SALOME @@ -47,13 +48,16 @@ public: virtual void SetTitle(const std::string& theTitle); virtual std::string GetTitle(); virtual void SetRowTitle(int theIndex, const std::string& theTitle); + virtual std::string GetRowTitle(int theIndex); virtual void SetRowTitles(const std::vector& theTitles); virtual std::vector GetRowTitles(); virtual void SetColumnTitle(int theIndex, const std::string& theTitle); + virtual std::string GetColumnTitle(int theIndex); virtual void SetColumnTitles(const std::vector& theTitles); virtual std::vector GetColumnTitles(); virtual void SetRowUnit(int theIndex, const std::string& theUnit); + virtual std::string GetRowUnit(int theIndex); virtual void SetRowUnits(const std::vector& theUnits); virtual std::vector GetRowUnits(); @@ -68,10 +72,18 @@ public: virtual void PutValue(const std::string& theValue, int theRow, int theColumn); virtual bool HasValue(int theRow, int theColumn); virtual std::string GetValue(int theRow, int theColumn); + virtual void RemoveValue(int theRow, int theColumn); virtual std::vector GetRowSetIndices(int theRow); virtual void SetNbColumns(int theNbColumns); + virtual std::vector SortRow(int theRow, SortOrder theOrder, SortPolicy thePolicy); + virtual std::vector SortColumn(int theColumn, SortOrder theOrder, SortPolicy thePolicy); + virtual std::vector SortByRow(int theRow, SortOrder theOrder, SortPolicy thePolicy); + virtual std::vector SortByColumn(int theColumn, SortOrder theOrder, SortPolicy thePolicy); + virtual void SwapCells(int theRow1, int theColumn1, int theRow2, int theColumn2); + virtual void SwapRows(int theRow1, int theRow2); + virtual void SwapColumns(int theColumn1, int theColumn2); }; #endif diff --git a/src/SALOMEDS/SALOMEDS_AttributeTableOfString_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeTableOfString_i.cxx index 56a29f66a..5c447f6fe 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTableOfString_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTableOfString_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeTableOfString_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -26,16 +27,14 @@ #include "SALOMEDS_AttributeTableOfString_i.hxx" #include "SALOMEDS.hxx" -#include +#include #include #include #include "Utils_ExceptHandlers.hxx" -using namespace std; - -UNEXPECT_CATCH(ATS_IncorrectIndex, SALOMEDS::AttributeTableOfString::IncorrectIndex); -UNEXPECT_CATCH(ATS_IncorrectArgumentLength, SALOMEDS::AttributeTableOfString::IncorrectArgumentLength); +UNEXPECT_CATCH(ATS_IncorrectIndex, SALOMEDS::AttributeTable::IncorrectIndex); +UNEXPECT_CATCH(ATS_IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectArgumentLength); void SALOMEDS_AttributeTableOfString_i::SetTitle(const char* theTitle) { @@ -43,7 +42,7 @@ void SALOMEDS_AttributeTableOfString_i::SetTitle(const char* theTitle) CheckLocked(); SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); CORBA::String_var aStr = CORBA::string_dup(theTitle); - aTable->SetTitle(string(aStr)); + aTable->SetTitle(std::string(aStr)); } char* SALOMEDS_AttributeTableOfString_i::GetTitle() @@ -55,27 +54,39 @@ char* SALOMEDS_AttributeTableOfString_i::GetTitle() } void SALOMEDS_AttributeTableOfString_i::SetRowTitle(CORBA::Long theIndex, const char* theTitle) - throw (SALOMEDS::AttributeTableOfString::IncorrectIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) { SALOMEDS::Locker lock; Unexpect aCatch(ATS_IncorrectIndex); CheckLocked(); SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); - if (theIndex <= 0 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfString::IncorrectIndex(); + if (theIndex <= 0 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); - aTable->SetRowTitle(theIndex, string(theTitle)); + aTable->SetRowTitle(theIndex, std::string(theTitle)); +} + +char* SALOMEDS_AttributeTableOfString_i::GetRowTitle(CORBA::Long theIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch (ATS_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); + if (theIndex <= 0 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + CORBA::String_var c_s = CORBA::string_dup(aTable->GetRowTitle(theIndex).c_str()); + return c_s._retn(); } void SALOMEDS_AttributeTableOfString_i::SetRowTitles(const SALOMEDS::StringSeq& theTitles) - throw (SALOMEDS::AttributeTableOfString::IncorrectArgumentLength) + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength) { SALOMEDS::Locker lock; Unexpect aCatch(ATS_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); - if (theTitles.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfString::IncorrectArgumentLength(); + if (theTitles.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); for (int i = 0; i < theTitles.length(); i++) { - aTable->SetRowTitle(i + 1, string((char*)theTitles[i].in())); + aTable->SetRowTitle(i + 1, std::string((char*)theTitles[i].in())); } } @@ -91,26 +102,38 @@ SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfString_i::GetRowTitles() } void SALOMEDS_AttributeTableOfString_i::SetColumnTitle(CORBA::Long theIndex, const char* theTitle) - throw (SALOMEDS::AttributeTableOfString::IncorrectIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) { SALOMEDS::Locker lock; Unexpect aCatch(ATS_IncorrectIndex); CheckLocked(); SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); - if (theIndex <= 0 || theIndex > aTable->GetNbColumns()) throw SALOMEDS::AttributeTableOfString::IncorrectIndex(); - aTable->SetColumnTitle(theIndex, string((char*)theTitle)); + if (theIndex <= 0 || theIndex > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + aTable->SetColumnTitle(theIndex, std::string((char*)theTitle)); +} + +char* SALOMEDS_AttributeTableOfString_i::GetColumnTitle(CORBA::Long theIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch (ATS_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); + if (theIndex <= 0 || theIndex > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + CORBA::String_var c_s = CORBA::string_dup(aTable->GetColumnTitle(theIndex).c_str()); + return c_s._retn(); } void SALOMEDS_AttributeTableOfString_i::SetColumnTitles(const SALOMEDS::StringSeq& theTitles) - throw (SALOMEDS::AttributeTableOfString::IncorrectArgumentLength) + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength) { SALOMEDS::Locker lock; Unexpect aCatch(ATS_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); - if (theTitles.length() != aTable->GetNbColumns()) throw SALOMEDS::AttributeTableOfString::IncorrectArgumentLength(); + if (theTitles.length() != aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); for (int i = 0; i < theTitles.length(); i++) { - aTable->SetColumnTitle(i + 1, string((char*)theTitles[i].in())); + aTable->SetColumnTitle(i + 1, std::string((char*)theTitles[i].in())); } } @@ -127,26 +150,38 @@ SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfString_i::GetColumnTitles() //Units support void SALOMEDS_AttributeTableOfString_i::SetRowUnit(CORBA::Long theIndex, const char* theUnit) - throw (SALOMEDS::AttributeTableOfString::IncorrectIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) { SALOMEDS::Locker lock; Unexpect aCatch(ATS_IncorrectIndex); CheckLocked(); SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); - if (theIndex <= 0 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfString::IncorrectIndex(); - aTable->SetRowUnit(theIndex, string((char*)theUnit)); + if (theIndex <= 0 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + aTable->SetRowUnit(theIndex, std::string((char*)theUnit)); +} + +char* SALOMEDS_AttributeTableOfString_i::GetRowUnit(CORBA::Long theIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch (ATS_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); + if (theIndex <= 0 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + CORBA::String_var c_s = CORBA::string_dup(aTable->GetRowUnit(theIndex).c_str()); + return c_s._retn(); } void SALOMEDS_AttributeTableOfString_i::SetRowUnits(const SALOMEDS::StringSeq& theUnits) - throw (SALOMEDS::AttributeTableOfString::IncorrectArgumentLength) + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength) { SALOMEDS::Locker lock; Unexpect aCatch(ATS_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); - if (theUnits.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfString::IncorrectArgumentLength(); + if (theUnits.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); for (int i = 0; i < theUnits.length(); i++) { - aTable->SetRowUnit(i + 1, string((char*)theUnits[i].in())); + aTable->SetRowUnit(i + 1, std::string((char*)theUnits[i].in())); } } @@ -175,41 +210,41 @@ CORBA::Long SALOMEDS_AttributeTableOfString_i::GetNbColumns() } void SALOMEDS_AttributeTableOfString_i::AddRow(const SALOMEDS::StringSeq& theData) - throw (SALOMEDS::AttributeTableOfString::IncorrectArgumentLength) + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength) { SALOMEDS::Locker lock; Unexpect aCatch(ATS_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); - vector aRow; - for (int i = 0; i < theData.length(); i++) aRow.push_back(string(CORBA::string_dup(theData[i]))); + std::vector aRow; + for (int i = 0; i < theData.length(); i++) aRow.push_back(std::string(CORBA::string_dup(theData[i]))); aTable->SetRowData(aTable->GetNbRows() + 1, aRow); } void SALOMEDS_AttributeTableOfString_i::SetRow(CORBA::Long theRow, const SALOMEDS::StringSeq& theData) - throw (SALOMEDS::AttributeTableOfString::IncorrectArgumentLength, SALOMEDS::AttributeTableOfString::IncorrectIndex) + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectIndex) { SALOMEDS::Locker lock; Unexpect aCatch(ATS_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); - vector aRow; - for (int i = 0; i < theData.length(); i++) aRow.push_back(string(CORBA::string_dup(theData[i].in()))); + std::vector aRow; + for (int i = 0; i < theData.length(); i++) aRow.push_back(std::string(CORBA::string_dup(theData[i].in()))); aTable->SetRowData(theRow, aRow); } SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfString_i::GetRow(CORBA::Long theRow) - throw (SALOMEDS::AttributeTableOfString::IncorrectIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) { SALOMEDS::Locker lock; Unexpect aCatch(ATS_IncorrectIndex); SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); - if (theRow <= 0 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfString::IncorrectIndex(); + if (theRow <= 0 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); SALOMEDS::StringSeq_var CorbaSeq = new SALOMEDS::StringSeq; - vector aRow = aTable->GetRowData(theRow); + std::vector aRow = aTable->GetRowData(theRow); CorbaSeq->length(aRow.size()); for (int i = 0; i < aRow.size(); i++) { CorbaSeq[i] = CORBA::string_dup(aRow[i].c_str()); @@ -218,41 +253,41 @@ SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfString_i::GetRow(CORBA::Long theRo } void SALOMEDS_AttributeTableOfString_i::AddColumn(const SALOMEDS::StringSeq& theData) - throw (SALOMEDS::AttributeTableOfString::IncorrectArgumentLength) + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength) { SALOMEDS::Locker lock; Unexpect aCatch(ATS_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); - vector aColumn; - for (int i = 0; i < theData.length(); i++) aColumn.push_back(string(CORBA::string_dup(theData[i]))); + std::vector aColumn; + for (int i = 0; i < theData.length(); i++) aColumn.push_back(std::string(CORBA::string_dup(theData[i]))); aTable->SetColumnData(aTable->GetNbColumns() + 1, aColumn); } void SALOMEDS_AttributeTableOfString_i::SetColumn(CORBA::Long theColumn, const SALOMEDS::StringSeq& theData) - throw (SALOMEDS::AttributeTableOfString::IncorrectArgumentLength, SALOMEDS::AttributeTableOfString::IncorrectIndex) + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectIndex) { SALOMEDS::Locker lock; Unexpect aCatch(ATS_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); - vector aColumn; - for (int i = 0; i < theData.length(); i++) aColumn.push_back(string(CORBA::string_dup(theData[i]))); + std::vector aColumn; + for (int i = 0; i < theData.length(); i++) aColumn.push_back(std::string(CORBA::string_dup(theData[i]))); aTable->SetColumnData(theColumn, aColumn); } SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfString_i::GetColumn(CORBA::Long theColumn) - throw (SALOMEDS::AttributeTableOfString::IncorrectIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) { SALOMEDS::Locker lock; Unexpect aCatch(ATS_IncorrectIndex); SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); - if (theColumn <= 0 || theColumn > aTable->GetNbColumns()) throw SALOMEDS::AttributeTableOfString::IncorrectIndex(); + if (theColumn <= 0 || theColumn > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); SALOMEDS::StringSeq_var CorbaSeq = new SALOMEDS::StringSeq; - vector aColumn = aTable->GetColumnData(theColumn); + std::vector aColumn = aTable->GetColumnData(theColumn); CorbaSeq->length(aColumn.size()); for (int i = 0; i < aColumn.size(); i++) { CorbaSeq[i] = CORBA::string_dup(aColumn[i].c_str()); @@ -261,7 +296,7 @@ SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfString_i::GetColumn(CORBA::Long th } void SALOMEDS_AttributeTableOfString_i::PutValue(const char* theValue, CORBA::Long theRow, CORBA::Long theColumn) - throw (SALOMEDS::AttributeTableOfString::IncorrectIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) { SALOMEDS::Locker lock; Unexpect aCatch(ATS_IncorrectIndex); @@ -279,34 +314,50 @@ CORBA::Boolean SALOMEDS_AttributeTableOfString_i::HasValue(CORBA::Long theRow, C } char* SALOMEDS_AttributeTableOfString_i::GetValue(CORBA::Long theRow, CORBA::Long theColumn) - throw (SALOMEDS::AttributeTableOfString::IncorrectIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex) { SALOMEDS::Locker lock; Unexpect aCatch(ATS_IncorrectIndex); SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); - if (theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfString::IncorrectIndex(); + if (theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); - string aValue; + std::string aValue; try { aValue = aTable->GetValue(theRow, theColumn); } catch(...) { - throw SALOMEDS::AttributeTableOfString::IncorrectIndex(); + throw SALOMEDS::AttributeTable::IncorrectIndex(); } return CORBA::string_dup(aValue.c_str()); } +void SALOMEDS_AttributeTableOfString_i::RemoveValue(CORBA::Long theRow, CORBA::Long theColumn) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch(ATS_IncorrectIndex); + SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); + if (theRow < 1 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + if (theColumn < 1 || theColumn > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + + try { + aTable->RemoveValue(theRow, theColumn); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } +} SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfString_i::GetRowSetIndices(CORBA::Long theRow) { SALOMEDS::Locker lock; SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); - if(theRow <= 0 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfString::IncorrectIndex(); + if(theRow <= 0 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq; - vector aSeq = aTable->GetSetRowIndices(theRow); + std::vector aSeq = aTable->GetSetRowIndices(theRow); CorbaSeq->length(aSeq.size()); for (int i = 0; i < aSeq.size(); i++) { CorbaSeq[i] = aSeq[i]; @@ -314,7 +365,6 @@ SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfString_i::GetRowSetIndices(CORBA::Lo return CorbaSeq._retn(); } - void SALOMEDS_AttributeTableOfString_i::SetNbColumns(CORBA::Long theNbColumns) { SALOMEDS::Locker lock; @@ -327,7 +377,7 @@ bool SALOMEDS_AttributeTableOfString_i::ReadFromFile(const SALOMEDS::TMPFile& th SALOMEDS::Locker lock; SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); - string aStream((char*)&theStream[0], theStream.length()); + std::string aStream((char*)&theStream[0], theStream.length()); aTable->Load(aStream); return true; } @@ -337,7 +387,7 @@ SALOMEDS::TMPFile* SALOMEDS_AttributeTableOfString_i::SaveToFile() SALOMEDS::Locker lock; SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); - string aString = aTable->Save(); + std::string aString = aTable->Save(); char* aBuffer = (char*)CORBA::string_dup(aString.c_str()); int aBufferSize = strlen((char*)aBuffer); @@ -348,3 +398,167 @@ SALOMEDS::TMPFile* SALOMEDS_AttributeTableOfString_i::SaveToFile() return aStreamFile._retn(); } +SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfString_i::SortRow(CORBA::Long theRow, + SALOMEDS::AttributeTable::SortOrder sortOrder, + SALOMEDS::AttributeTable::SortPolicy sortPolicy) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch(ATS_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); + if (theRow < 1 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + + std::vector aSeq; + SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq; + try { + aSeq = aTable->SortRow(theRow, (SALOMEDSImpl_AttributeTable::SortOrder)sortOrder, + (SALOMEDSImpl_AttributeTable::SortPolicy)sortPolicy); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + CorbaSeq->length(aSeq.size()); + for (int i = 0; i < aSeq.size(); i++) { + CorbaSeq[i] = aSeq[i]; + } + return CorbaSeq._retn(); +} + +SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfString_i::SortColumn(CORBA::Long theColumn, + SALOMEDS::AttributeTable::SortOrder sortOrder, + SALOMEDS::AttributeTable::SortPolicy sortPolicy) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch(ATS_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); + if (theColumn < 1 || theColumn > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + + std::vector aSeq; + SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq; + try { + aSeq = aTable->SortColumn(theColumn, (SALOMEDSImpl_AttributeTable::SortOrder)sortOrder, + (SALOMEDSImpl_AttributeTable::SortPolicy)sortPolicy); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + CorbaSeq->length(aSeq.size()); + for (int i = 0; i < aSeq.size(); i++) { + CorbaSeq[i] = aSeq[i]; + } + return CorbaSeq._retn(); +} + +SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfString_i::SortByRow(CORBA::Long theRow, + SALOMEDS::AttributeTable::SortOrder sortOrder, + SALOMEDS::AttributeTable::SortPolicy sortPolicy) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch(ATS_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); + if (theRow < 1 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + + std::vector aSeq; + SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq; + try { + aSeq = aTable->SortByRow(theRow, (SALOMEDSImpl_AttributeTable::SortOrder)sortOrder, + (SALOMEDSImpl_AttributeTable::SortPolicy)sortPolicy); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + CorbaSeq->length(aSeq.size()); + for (int i = 0; i < aSeq.size(); i++) { + CorbaSeq[i] = aSeq[i]; + } + return CorbaSeq._retn(); +} + +SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfString_i::SortByColumn(CORBA::Long theColumn, + SALOMEDS::AttributeTable::SortOrder sortOrder, + SALOMEDS::AttributeTable::SortPolicy sortPolicy) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch(ATS_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); + if (theColumn < 1 || theColumn > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + + std::vector aSeq; + SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq; + try { + aSeq = aTable->SortByColumn(theColumn, (SALOMEDSImpl_AttributeTable::SortOrder)sortOrder, + (SALOMEDSImpl_AttributeTable::SortPolicy)sortPolicy); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } + CorbaSeq->length(aSeq.size()); + for (int i = 0; i < aSeq.size(); i++) { + CorbaSeq[i] = aSeq[i]; + } + return CorbaSeq._retn(); +} + +void SALOMEDS_AttributeTableOfString_i::SwapCells(CORBA::Long theRow1, CORBA::Long theColumn1, + CORBA::Long theRow2, CORBA::Long theColumn2) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch(ATS_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); + if (theRow1 < 1 || theRow1 > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + if (theColumn1 < 1 || theColumn1 > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + if (theRow2 < 1 || theRow2 > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + if (theColumn2 < 1 || theColumn2 > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + + try { + aTable->SwapCells(theRow1, theColumn1, theRow2, theColumn2); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } +} + +void SALOMEDS_AttributeTableOfString_i::SwapRows(CORBA::Long theRow1, CORBA::Long theRow2) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch(ATS_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); + if (theRow1 < 1 || theRow1 > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + if (theRow2 < 1 || theRow2 > aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + + try { + aTable->SwapRows(theRow1, theRow2); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } +} + +void SALOMEDS_AttributeTableOfString_i::SwapColumns(CORBA::Long theColumn1, CORBA::Long theColumn2) + throw (SALOMEDS::AttributeTable::IncorrectIndex) +{ + SALOMEDS::Locker lock; + Unexpect aCatch(ATS_IncorrectIndex); + CheckLocked(); + SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); + if (theColumn1 < 1 || theColumn1 > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + if (theColumn2 < 1 || theColumn2 > aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectIndex(); + + try { + aTable->SwapColumns(theColumn1, theColumn2); + } + catch(...) { + throw SALOMEDS::AttributeTable::IncorrectIndex(); + } +} diff --git a/src/SALOMEDS/SALOMEDS_AttributeTableOfString_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeTableOfString_i.hxx index d4743e437..202e97171 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTableOfString_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTableOfString_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeTableOfString_i.hxx // Author : Sergey RUIN // Module : SALOME @@ -46,48 +47,76 @@ public: virtual void SetTitle(const char* theTitle); virtual char* GetTitle(); virtual void SetRowTitle(CORBA::Long theIndex, const char* theTitle) - throw (SALOMEDS::AttributeTableOfString::IncorrectIndex); + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual char* GetRowTitle(CORBA::Long theIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex); virtual void SetRowTitles(const SALOMEDS::StringSeq& theTitles) - throw (SALOMEDS::AttributeTableOfString::IncorrectArgumentLength); + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength); virtual SALOMEDS::StringSeq* GetRowTitles(); virtual void SetColumnTitle(CORBA::Long theIndex, const char* theTitle) - throw (SALOMEDS::AttributeTableOfString::IncorrectIndex); + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual char* GetColumnTitle(CORBA::Long theIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex); virtual void SetColumnTitles(const SALOMEDS::StringSeq& theTitles) - throw (SALOMEDS::AttributeTableOfString::IncorrectArgumentLength); + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength); virtual SALOMEDS::StringSeq* GetColumnTitles(); virtual void SetRowUnit(CORBA::Long theIndex, const char* theUnit) - throw (SALOMEDS::AttributeTableOfString::IncorrectIndex); + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual char* GetRowUnit(CORBA::Long theIndex) + throw (SALOMEDS::AttributeTable::IncorrectIndex); virtual void SetRowUnits(const SALOMEDS::StringSeq& theUnits) - throw (SALOMEDS::AttributeTableOfString::IncorrectArgumentLength); + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength); virtual SALOMEDS::StringSeq* GetRowUnits(); virtual CORBA::Long GetNbRows(); virtual CORBA::Long GetNbColumns(); virtual void AddRow(const SALOMEDS::StringSeq& theData) - throw (SALOMEDS::AttributeTableOfString::IncorrectArgumentLength); + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength); virtual void SetRow(CORBA::Long theRow, const SALOMEDS::StringSeq& theData) - throw (SALOMEDS::AttributeTableOfString::IncorrectArgumentLength, SALOMEDS::AttributeTableOfString::IncorrectIndex); + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectIndex); virtual SALOMEDS::StringSeq* GetRow(CORBA::Long theRow) - throw (SALOMEDS::AttributeTableOfString::IncorrectIndex); + throw (SALOMEDS::AttributeTable::IncorrectIndex); virtual void AddColumn(const SALOMEDS::StringSeq& theData) - throw (SALOMEDS::AttributeTableOfString::IncorrectArgumentLength); + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength); virtual void SetColumn(CORBA::Long theColumn, const SALOMEDS::StringSeq& theData) - throw (SALOMEDS::AttributeTableOfString::IncorrectArgumentLength, SALOMEDS::AttributeTableOfString::IncorrectIndex); + throw (SALOMEDS::AttributeTable::IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectIndex); virtual SALOMEDS::StringSeq* GetColumn(CORBA::Long theColumn) - throw (SALOMEDS::AttributeTableOfString::IncorrectIndex); + throw (SALOMEDS::AttributeTable::IncorrectIndex); virtual void PutValue(const char* theValue, CORBA::Long theRow, CORBA::Long theColumn) - throw (SALOMEDS::AttributeTableOfString::IncorrectIndex); + throw (SALOMEDS::AttributeTable::IncorrectIndex); virtual CORBA::Boolean HasValue(CORBA::Long theRow, CORBA::Long theColumn); virtual char* GetValue(CORBA::Long theRow, CORBA::Long theColumn) - throw (SALOMEDS::AttributeTableOfString::IncorrectIndex); + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual void RemoveValue(CORBA::Long theRow, CORBA::Long theColumn) + throw (SALOMEDS::AttributeTable::IncorrectIndex); virtual SALOMEDS::LongSeq* GetRowSetIndices(CORBA::Long theRow); virtual void SetNbColumns(CORBA::Long theNbColumns); + virtual SALOMEDS::LongSeq* SortRow(CORBA::Long theRow, SALOMEDS::AttributeTable::SortOrder sortOrder, + SALOMEDS::AttributeTable::SortPolicy sortPolicy) + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual SALOMEDS::LongSeq* SortColumn(CORBA::Long theColumn, SALOMEDS::AttributeTable::SortOrder sortOrder, + SALOMEDS::AttributeTable::SortPolicy sortPolicy) + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual SALOMEDS::LongSeq* SortByRow(CORBA::Long theRow, SALOMEDS::AttributeTable::SortOrder sortOrder, + SALOMEDS::AttributeTable::SortPolicy sortPolicy) + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual SALOMEDS::LongSeq* SortByColumn(CORBA::Long theColumn, SALOMEDS::AttributeTable::SortOrder sortOrder, + SALOMEDS::AttributeTable::SortPolicy sortPolicy) + throw (SALOMEDS::AttributeTable::IncorrectIndex); + + virtual void SwapCells(CORBA::Long theRow1, CORBA::Long theColumn1, + CORBA::Long theRow2, CORBA::Long theColumn2) + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual void SwapRows(CORBA::Long theRow1, CORBA::Long theRow2) + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual void SwapColumns(CORBA::Long theColumn1, CORBA::Long theColumn2) + throw (SALOMEDS::AttributeTable::IncorrectIndex); + virtual bool ReadFromFile(const SALOMEDS::TMPFile& theStream); virtual SALOMEDS::TMPFile* SaveToFile(); - }; #endif diff --git a/src/SALOMEDS/SALOMEDS_AttributeTarget.cxx b/src/SALOMEDS/SALOMEDS_AttributeTarget.cxx index 26089eb3f..c64a9776a 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTarget.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTarget.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeTarget.cxx // Author : Sergey RUIN // Module : SALOME @@ -29,8 +30,6 @@ #include "SALOMEDSImpl_SObject.hxx" #include "SALOMEDS_SObject.hxx" -using namespace std; - SALOMEDS_AttributeTarget::SALOMEDS_AttributeTarget(SALOMEDSImpl_AttributeTarget* theAttr) :SALOMEDS_GenericAttribute(theAttr) {} @@ -61,7 +60,7 @@ std::vector<_PTR(SObject)> SALOMEDS_AttributeTarget::Get() if (_isLocal) { SALOMEDS::Locker lock; - vector aSeq = dynamic_cast(_local_impl)->Get(); + std::vector aSeq = dynamic_cast(_local_impl)->Get(); aLength = aSeq.size(); for (i = 0; i < aLength; i++) { aSO = new SALOMEDS_SObject(aSeq[i]); diff --git a/src/SALOMEDS/SALOMEDS_AttributeTarget.hxx b/src/SALOMEDS/SALOMEDS_AttributeTarget.hxx index 80ce672af..65d2b1c0e 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTarget.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTarget.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeTarget.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeTarget_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeTarget_i.cxx index f8edb8a8b..e580d62b4 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTarget_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTarget_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeTarget_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -31,8 +32,6 @@ #include -using namespace std; - void SALOMEDS_AttributeTarget_i::Add(SALOMEDS::SObject_ptr anObject) { SALOMEDS::Locker lock; @@ -43,7 +42,7 @@ void SALOMEDS_AttributeTarget_i::Add(SALOMEDS::SObject_ptr anObject) SALOMEDS::Study::ListOfSObject* SALOMEDS_AttributeTarget_i::Get() { SALOMEDS::Locker lock; - vector aSeq = dynamic_cast(_impl)->Get(); + std::vector aSeq = dynamic_cast(_impl)->Get(); SALOMEDS::Study::ListOfSObject_var aSList = new SALOMEDS::Study::ListOfSObject; int aLength = aSeq.size(), i; if (aLength == 0) return aSList._retn(); diff --git a/src/SALOMEDS/SALOMEDS_AttributeTarget_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeTarget_i.hxx index 12dec3a91..cdab00d20 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTarget_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTarget_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeTarget_i.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeTextColor.cxx b/src/SALOMEDS/SALOMEDS_AttributeTextColor.cxx index 88165807d..9f13fc16c 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTextColor.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTextColor.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeTextColor.cxx // Author : Sergey RUIN // Module : SALOME @@ -28,8 +29,6 @@ #include -using namespace std; - SALOMEDS_AttributeTextColor::SALOMEDS_AttributeTextColor(SALOMEDSImpl_AttributeTextColor* theAttr) :SALOMEDS_GenericAttribute(theAttr) {} @@ -47,10 +46,10 @@ STextColor SALOMEDS_AttributeTextColor::TextColor() STextColor aColor; if (_isLocal) { SALOMEDS::Locker lock; - vector aSeq = dynamic_cast(_local_impl)->TextColor(); + std::vector aSeq = dynamic_cast(_local_impl)->TextColor(); aColor.R = aSeq[0]; aColor.G = aSeq[1]; - aColor.B = aSeq[2]; + aColor.B = aSeq[2]; } else { SALOMEDS::Color anImplColor = SALOMEDS::AttributeTextColor::_narrow(_corba_impl)->TextColor(); @@ -66,7 +65,7 @@ void SALOMEDS_AttributeTextColor::SetTextColor(STextColor value) if (_isLocal) { CheckLocked(); SALOMEDS::Locker lock; - vector aSeq; + std::vector aSeq; aSeq.push_back( value.R ); aSeq.push_back( value.G ); aSeq.push_back( value.B ); diff --git a/src/SALOMEDS/SALOMEDS_AttributeTextColor.hxx b/src/SALOMEDS/SALOMEDS_AttributeTextColor.hxx index 582004e54..c772da601 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTextColor.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTextColor.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeTextColor.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeTextColor_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeTextColor_i.cxx index 8e8b8a2bc..432c7e20d 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTextColor_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTextColor_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeTextColor_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -27,13 +28,11 @@ #include "SALOMEDS.hxx" #include -using namespace std; - SALOMEDS::Color SALOMEDS_AttributeTextColor_i::TextColor() { SALOMEDS::Locker lock; SALOMEDS::Color TextColor; - vector anArray = dynamic_cast(_impl)->TextColor(); + std::vector anArray = dynamic_cast(_impl)->TextColor(); if (anArray.size()!=3) { TextColor.R = 0; TextColor.G = 0; @@ -51,7 +50,7 @@ void SALOMEDS_AttributeTextColor_i::SetTextColor(const SALOMEDS::Color& value) { SALOMEDS::Locker lock; CheckLocked(); - vector anArray; + std::vector anArray; anArray.push_back(value.R); anArray.push_back(value.G); anArray.push_back(value.B); diff --git a/src/SALOMEDS/SALOMEDS_AttributeTextColor_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeTextColor_i.hxx index ffe6a8c93..169c2b668 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTextColor_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTextColor_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeTextColor_i.hxx // Author : Sergey RUIN // Module : SALOME @@ -35,7 +36,7 @@ #include "SALOMEDSImpl_AttributeTextColor.hxx" class SALOMEDS_AttributeTextColor_i: public virtual POA_SALOMEDS::AttributeTextColor, - public virtual SALOMEDS_GenericAttribute_i + public virtual SALOMEDS_GenericAttribute_i { public: diff --git a/src/SALOMEDS/SALOMEDS_AttributeTextHighlightColor.cxx b/src/SALOMEDS/SALOMEDS_AttributeTextHighlightColor.cxx index de50af1d1..edfb16d29 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTextHighlightColor.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTextHighlightColor.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeTextHighlightColor.cxx // Author : Sergey RUIN // Module : SALOME @@ -28,8 +29,6 @@ #include -using namespace std; - SALOMEDS_AttributeTextHighlightColor::SALOMEDS_AttributeTextHighlightColor (SALOMEDSImpl_AttributeTextHighlightColor* theAttr) :SALOMEDS_GenericAttribute(theAttr) @@ -49,10 +48,10 @@ STextColor SALOMEDS_AttributeTextHighlightColor::TextHighlightColor() STextColor aColor; if (_isLocal) { SALOMEDS::Locker lock; - vector aSeq = dynamic_cast(_local_impl)->TextHighlightColor(); + std::vector aSeq = dynamic_cast(_local_impl)->TextHighlightColor(); aColor.R = aSeq[0]; aColor.G = aSeq[1]; - aColor.B = aSeq[2]; + aColor.B = aSeq[2]; } else { SALOMEDS::Color anImplColor = @@ -69,7 +68,7 @@ void SALOMEDS_AttributeTextHighlightColor::SetTextHighlightColor(STextColor valu if (_isLocal) { CheckLocked(); SALOMEDS::Locker lock; - vector aSeq; + std::vector aSeq; aSeq.push_back(value.R); aSeq.push_back(value.G); aSeq.push_back(value.B); diff --git a/src/SALOMEDS/SALOMEDS_AttributeTextHighlightColor.hxx b/src/SALOMEDS/SALOMEDS_AttributeTextHighlightColor.hxx index fd0243300..30a59c138 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTextHighlightColor.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTextHighlightColor.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeTextHighlightColor.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeTextHighlightColor_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeTextHighlightColor_i.cxx index 5facef965..ec7f653fc 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTextHighlightColor_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTextHighlightColor_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeTextHighlightColor_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -27,13 +28,11 @@ #include "SALOMEDS.hxx" #include -using namespace std; - SALOMEDS::Color SALOMEDS_AttributeTextHighlightColor_i::TextHighlightColor() { SALOMEDS::Locker lock; SALOMEDS::Color TextHighlightColor; - vector anArray = dynamic_cast(_impl)->TextHighlightColor(); + std::vector anArray = dynamic_cast(_impl)->TextHighlightColor(); if (anArray.size()!=3) { TextHighlightColor.R = 0; TextHighlightColor.G = 0; @@ -51,7 +50,7 @@ void SALOMEDS_AttributeTextHighlightColor_i::SetTextHighlightColor(const SALOMED { SALOMEDS::Locker lock; CheckLocked(); - vector anArray; + std::vector anArray; anArray.push_back(value.R); anArray.push_back(value.G); anArray.push_back(value.B); diff --git a/src/SALOMEDS/SALOMEDS_AttributeTextHighlightColor_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeTextHighlightColor_i.hxx index 6cba2928e..4fe3b31f8 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTextHighlightColor_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTextHighlightColor_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeTextHighlightColor_i.hxx // Author : Sergey RUIN // Module : SALOME @@ -34,7 +35,7 @@ #include "SALOMEDSImpl_AttributeTextHighlightColor.hxx" class SALOMEDS_AttributeTextHighlightColor_i: public virtual POA_SALOMEDS::AttributeTextHighlightColor, - public virtual SALOMEDS_GenericAttribute_i + public virtual SALOMEDS_GenericAttribute_i { public: diff --git a/src/SALOMEDS/SALOMEDS_AttributeTreeNode.cxx b/src/SALOMEDS/SALOMEDS_AttributeTreeNode.cxx index 5a3c20885..ee007bca7 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTreeNode.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTreeNode.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeTreeNode.cxx // Author : Sergey RUIN // Module : SALOME @@ -32,8 +33,6 @@ #include "SALOMEDSImpl_AttributeTreeNode.hxx" #include "SALOMEDS_AttributeTreeNode.hxx" -using namespace std; - SALOMEDS_AttributeTreeNode::SALOMEDS_AttributeTreeNode(SALOMEDSImpl_AttributeTreeNode* theAttr) :SALOMEDS_GenericAttribute(theAttr) {} @@ -253,7 +252,7 @@ void SALOMEDS_AttributeTreeNode::SetTreeID(const std::string& value) std::string SALOMEDS_AttributeTreeNode::GetTreeID() { - string aGUID; + std::string aGUID; if (_isLocal) { SALOMEDS::Locker lock; SALOMEDSImpl_AttributeTreeNode* aNode = dynamic_cast(_local_impl); @@ -430,7 +429,7 @@ bool SALOMEDS_AttributeTreeNode::IsChild(const _PTR(AttributeTreeNode)& value) std::string SALOMEDS_AttributeTreeNode::Label() { - string aLabel; + std::string aLabel; if (_isLocal) { SALOMEDS::Locker lock; aLabel = _local_impl->Label().Entry(); diff --git a/src/SALOMEDS/SALOMEDS_AttributeTreeNode.hxx b/src/SALOMEDS/SALOMEDS_AttributeTreeNode.hxx index d97fc4f66..d94dd41fd 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTreeNode.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTreeNode.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeTreeNode.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeTreeNode_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeTreeNode_i.cxx index d98808daf..103183ca7 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTreeNode_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTreeNode_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeTreeNode_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -27,10 +28,8 @@ #include "utilities.h" #include "SALOMEDS.hxx" -using namespace std; - static SALOMEDSImpl_AttributeTreeNode* GetNode(SALOMEDS::AttributeTreeNode_ptr value, - SALOMEDSImpl_AttributeTreeNode* aNode) + SALOMEDSImpl_AttributeTreeNode* aNode) { SALOMEDSImpl_AttributeTreeNode* aResult = NULL; DF_Label aLabel = DF_Label::Label(aNode->Label(), value->Label()); diff --git a/src/SALOMEDS/SALOMEDS_AttributeTreeNode_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeTreeNode_i.hxx index 7cfd63941..af49f0b83 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTreeNode_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTreeNode_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeTreeNode_i.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeUserID.cxx b/src/SALOMEDS/SALOMEDS_AttributeUserID.cxx index 72729c6c8..d6453ceaa 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeUserID.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeUserID.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeUserID.cxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeUserID.hxx b/src/SALOMEDS/SALOMEDS_AttributeUserID.hxx index 5e700dfbb..af40640e4 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeUserID.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeUserID.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeUserID.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_AttributeUserID_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeUserID_i.cxx index 3a9f25f90..6be8c02ce 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeUserID_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeUserID_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeName_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -26,8 +27,6 @@ #include "SALOMEDS_AttributeUserID_i.hxx" #include "SALOMEDS.hxx" -using namespace std; - char* SALOMEDS_AttributeUserID_i::Value() { SALOMEDS::Locker lock; @@ -40,6 +39,6 @@ void SALOMEDS_AttributeUserID_i::SetValue(const char* value) SALOMEDS::Locker lock; CheckLocked(); CORBA::String_var Str = CORBA::string_dup(value); - dynamic_cast(_impl)->SetValue(string(Str)); + dynamic_cast(_impl)->SetValue(std::string(Str)); } diff --git a/src/SALOMEDS/SALOMEDS_AttributeUserID_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeUserID_i.hxx index 7f28a81f6..8074ec62c 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeUserID_i.hxx +++ b/src/SALOMEDS/SALOMEDS_AttributeUserID_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributeUserID_i.hxx // Author : Sergey RUIN // Module : SALOME @@ -45,7 +46,7 @@ public: char* Value(); void SetValue(const char* value); - static const std::string& DefaultID() { + static std::string DefaultID() { return SALOMEDSImpl_AttributeUserID::DefaultID(); } diff --git a/src/SALOMEDS/SALOMEDS_Attributes.hxx b/src/SALOMEDS/SALOMEDS_Attributes.hxx index a9e962130..29b1f8742 100644 --- a/src/SALOMEDS/SALOMEDS_Attributes.hxx +++ b/src/SALOMEDS/SALOMEDS_Attributes.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_Attributes.hxx // Author : Sergey RUIN // Module : SALOME @@ -91,7 +92,7 @@ #include "SALOMEDS_AttributeParameter_i.hxx" #include "SALOMEDS_AttributeString_i.hxx" -#define __CreateCORBAAttribute(CORBA_Name) if (strcmp(aTypeOfAttribute, #CORBA_Name) == 0) { \ +#define __CreateCORBAAttribute(CORBA_Name) else if (strcmp(aTypeOfAttribute, #CORBA_Name) == 0) { \ SALOMEDSImpl_##CORBA_Name* A = dynamic_cast(theAttr); \ SALOMEDS_##CORBA_Name##_i* Attr = new SALOMEDS_##CORBA_Name##_i(A, theOrb); \ attr_servant = Attr; \ @@ -100,6 +101,7 @@ #define __CreateGenericCORBAAttribute \ + if(0){} \ __CreateCORBAAttribute(AttributeReal) \ __CreateCORBAAttribute(AttributeInteger) \ __CreateCORBAAttribute(AttributeSequenceOfReal) \ diff --git a/src/SALOMEDS/SALOMEDS_BasicAttributeFactory.cxx b/src/SALOMEDS/SALOMEDS_BasicAttributeFactory.cxx index 58ee4137c..ef8708d8d 100644 --- a/src/SALOMEDS/SALOMEDS_BasicAttributeFactory.cxx +++ b/src/SALOMEDS/SALOMEDS_BasicAttributeFactory.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME SALOMEDS : data structure of SALOME and sources of Salome data server // File : SALOMEDS_BasicAttributeFactory.cxx // Author : Estelle Deville, CEA @@ -27,7 +28,7 @@ // #include "SALOMEDS_BasicAttributeFactory.hxx" #include "utilities.h" -using namespace std; + //============================================================================ /*! Function : Create @@ -40,13 +41,13 @@ SALOMEDS_BasicAttribute_i* BasicAttributeFactory::Create(const char* type) try { if (!strcmp(type,"AttReal")) { - SALOMEDS_AttReal_i *A = new SALOMEDS_AttReal_i(); - return A; + SALOMEDS_AttReal_i *A = new SALOMEDS_AttReal_i(); + return A; } else if(!strcmp(type,"AttLong")) { - SALOMEDS_AttLong_i *A = new SALOMEDS_AttLong_i(); - return A; + SALOMEDS_AttLong_i *A = new SALOMEDS_AttLong_i(); + return A; } else throw(SALOME_Exception(LOCALIZED("bad attribute type name"))); } catch (...) {throw(SALOME_Exception(LOCALIZED("Unexpected exception was caught")));} diff --git a/src/SALOMEDS/SALOMEDS_BasicAttributeFactory.hxx b/src/SALOMEDS/SALOMEDS_BasicAttributeFactory.hxx index 1034a2304..13f6b8704 100644 --- a/src/SALOMEDS/SALOMEDS_BasicAttributeFactory.hxx +++ b/src/SALOMEDS/SALOMEDS_BasicAttributeFactory.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME SALOMEDS : data structure of SALOME and sources of Salome data server // File : SALOMEDS_BasicAttributeFactory.hxx // Author : Estelle Deville, CEA diff --git a/src/SALOMEDS/SALOMEDS_BasicAttribute_i.cxx b/src/SALOMEDS/SALOMEDS_BasicAttribute_i.cxx index ba425bb2e..4994c13a6 100644 --- a/src/SALOMEDS/SALOMEDS_BasicAttribute_i.cxx +++ b/src/SALOMEDS/SALOMEDS_BasicAttribute_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME SALOMEDS : data structure of SALOME and sources of Salome data server // File : SALOMEDS_BasicAttribute_i.cxx // Author : Estelle Deville, CEA @@ -26,7 +27,6 @@ // $Header$ // #include "SALOMEDS_BasicAttribute_i.hxx" -using namespace std; //============================================================================ /*! Function : SetLabel diff --git a/src/SALOMEDS/SALOMEDS_BasicAttribute_i.hxx b/src/SALOMEDS/SALOMEDS_BasicAttribute_i.hxx index 237cd1123..cccaa1f58 100644 --- a/src/SALOMEDS/SALOMEDS_BasicAttribute_i.hxx +++ b/src/SALOMEDS/SALOMEDS_BasicAttribute_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME SALOMEDS : data structure of SALOME and sources of Salome data server // File : SALOMEDS_BasicAttribute_i.hxx // Author : Estelle Deville, CEA @@ -34,7 +35,7 @@ #include class SALOMEDS_BasicAttribute_i: public POA_SALOMEDS::BasicAttribute, - public PortableServer::ServantBase { + public PortableServer::ServantBase { protected: DF_Label _Lab; diff --git a/src/SALOMEDS/SALOMEDS_Callback_i.hxx b/src/SALOMEDS/SALOMEDS_Callback_i.hxx index de95e492b..fb2e3767c 100644 --- a/src/SALOMEDS/SALOMEDS_Callback_i.hxx +++ b/src/SALOMEDS/SALOMEDS_Callback_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME SALOMEDS : data structure of SALOME and sources of Salome data server // File : SALOMEDS_Study_i.hxx // Author : Yves FRICAUD @@ -32,7 +33,7 @@ #include CORBA_SERVER_HEADER(SALOMEDS) class SALOMEDS_Callback_i: public virtual POA_SALOMEDS::Callback, - public virtual PortableServer::ServantBase + public virtual PortableServer::ServantBase { private: SALOMEDS::UseCaseBuilder_var _builder; diff --git a/src/SALOMEDS/SALOMEDS_ChildIterator.cxx b/src/SALOMEDS/SALOMEDS_ChildIterator.cxx index 5cbf2edc0..d559b57e7 100644 --- a/src/SALOMEDS/SALOMEDS_ChildIterator.cxx +++ b/src/SALOMEDS/SALOMEDS_ChildIterator.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_ChildIterator.cxx // Author : Sergey RUIN // Module : SALOME @@ -27,8 +28,6 @@ #include "SALOMEDS_SObject.hxx" #include "SALOMEDS.hxx" -using namespace std; - SALOMEDS_ChildIterator::SALOMEDS_ChildIterator(const SALOMEDSImpl_ChildIterator& theIterator) { SALOMEDS::Locker lock; @@ -46,7 +45,7 @@ SALOMEDS_ChildIterator::SALOMEDS_ChildIterator(SALOMEDS::ChildIterator_ptr theIt SALOMEDS_ChildIterator::~SALOMEDS_ChildIterator() { - if(!_isLocal) _corba_impl->Destroy(); + if(!_isLocal) _corba_impl->UnRegister(); else if(_local_impl) delete _local_impl; } @@ -95,6 +94,9 @@ _PTR(SObject) SALOMEDS_ChildIterator::Value() SALOMEDS::Locker lock; aSO = new SALOMEDS_SObject(_local_impl->Value()); } - else aSO = new SALOMEDS_SObject(_corba_impl->Value()); + else { + SALOMEDS::SObject_var so=_corba_impl->Value(); + aSO = new SALOMEDS_SObject(so); + } return _PTR(SObject)(aSO); } diff --git a/src/SALOMEDS/SALOMEDS_ChildIterator.hxx b/src/SALOMEDS/SALOMEDS_ChildIterator.hxx index 0d8582bae..d46556a65 100644 --- a/src/SALOMEDS/SALOMEDS_ChildIterator.hxx +++ b/src/SALOMEDS/SALOMEDS_ChildIterator.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_ChildIterator.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_ChildIterator_i.cxx b/src/SALOMEDS/SALOMEDS_ChildIterator_i.cxx index 40ccf2034..ff0f2aa2e 100644 --- a/src/SALOMEDS/SALOMEDS_ChildIterator_i.cxx +++ b/src/SALOMEDS/SALOMEDS_ChildIterator_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_ChildIterator_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -30,15 +31,13 @@ #include "SALOMEDSImpl_Study.hxx" #include "utilities.h" -using namespace std; - //============================================================================ /*! Function : constructor * Purpose : */ //============================================================================ SALOMEDS_ChildIterator_i::SALOMEDS_ChildIterator_i(const SALOMEDSImpl_ChildIterator& theImpl, - CORBA::ORB_ptr orb) + CORBA::ORB_ptr orb) : _it(theImpl.GetPersistentCopy()) { SALOMEDS::Locker lock; diff --git a/src/SALOMEDS/SALOMEDS_ChildIterator_i.hxx b/src/SALOMEDS/SALOMEDS_ChildIterator_i.hxx index 057312b44..087cf044f 100644 --- a/src/SALOMEDS/SALOMEDS_ChildIterator_i.hxx +++ b/src/SALOMEDS/SALOMEDS_ChildIterator_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_ChildIterator_i.hxx // Author : Sergey RUIN // Module : SALOME @@ -39,11 +40,11 @@ #include class SALOMEDS_ChildIterator_i: public virtual POA_SALOMEDS::ChildIterator, - public virtual PortableServer::ServantBase, - public virtual SALOME::GenericObj_i + public virtual PortableServer::ServantBase, + public virtual SALOME::GenericObj_i { private: - CORBA::ORB_ptr _orb; + CORBA::ORB_var _orb; SALOMEDSImpl_ChildIterator* _it; public: diff --git a/src/SALOMEDS/SALOMEDS_Client.cxx b/src/SALOMEDS/SALOMEDS_Client.cxx index d0ffb0e88..17c76c7dc 100644 --- a/src/SALOMEDS/SALOMEDS_Client.cxx +++ b/src/SALOMEDS/SALOMEDS_Client.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME SALOMEDS : data structure of SALOME and sources of Salome data server // File : SALOMEDS_Client.cxx // Author : Yves FRICAUD @@ -32,8 +33,6 @@ #include "utilities.h" #include "HDFOI.hxx" -using namespace std; - //============================================================================ /*! Function : * Purpose : @@ -50,12 +49,12 @@ static void DumpComponent(SALOMEDS::Study_ptr Study,SALOMEDS::SObject_ptr SO, in SALOMEDS::AttributeName_var Name = SALOMEDS::AttributeName::_narrow(anAttr); CORBA::String_var Val = Name->Value(); for (int i = 1; i <= offset ; i++) - MESSAGE("--"); + MESSAGE("--"); MESSAGE(">"<GetID()<ReferencedObject(RefSO)) { for (int i = 1; i <= offset ; i++) - MESSAGE(" "); + MESSAGE(" "); MESSAGE("*Reference"<GetID()); } DumpComponent(Study,CSO,offset+2); diff --git a/src/SALOMEDS/SALOMEDS_ClientAttributes.hxx b/src/SALOMEDS/SALOMEDS_ClientAttributes.hxx index 0846ced78..53fbe2671 100644 --- a/src/SALOMEDS/SALOMEDS_ClientAttributes.hxx +++ b/src/SALOMEDS/SALOMEDS_ClientAttributes.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_Attributes.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_Defines.hxx b/src/SALOMEDS/SALOMEDS_Defines.hxx index 1c4475e4c..94efe589a 100755 --- a/src/SALOMEDS/SALOMEDS_Defines.hxx +++ b/src/SALOMEDS/SALOMEDS_Defines.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_Defines.hxx // Author : Alexander A. BORODIN // Module : SALOME @@ -27,7 +28,7 @@ #define _SALOMEDS_Defines_HXX_ #ifdef WIN32 -# ifdef SALOMEDS_EXPORTS +# if defined SALOMEDS_EXPORTS || defined SalomeDS_EXPORTS # define SALOMEDS_EXPORT __declspec( dllexport ) # else # define SALOMEDS_EXPORT __declspec( dllimport ) diff --git a/src/SALOMEDS/SALOMEDS_Driver_i.cxx b/src/SALOMEDS/SALOMEDS_Driver_i.cxx index 1efad2868..87bdec277 100644 --- a/src/SALOMEDS/SALOMEDS_Driver_i.cxx +++ b/src/SALOMEDS/SALOMEDS_Driver_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "SALOMEDS_Driver_i.hxx" #include "SALOMEDS_TMPFile_i.hxx" #include "utilities.h" @@ -28,22 +29,40 @@ #include "SALOMEDS.hxx" #include -using namespace std; +SALOMEDS_Driver_i::SALOMEDS_Driver_i(SALOMEDS::Driver_ptr theDriver, CORBA::ORB_ptr theORB) +{ + _driver = SALOMEDS::Driver::_duplicate(theDriver); + _orb = CORBA::ORB::_duplicate(theORB); +} SALOMEDS_Driver_i::~SALOMEDS_Driver_i() { } +std::string SALOMEDS_Driver_i::GetIOR() +{ + std::string ior = ""; + if ( !CORBA::is_nil(_driver) ) { + CORBA::String_var cior = _orb->object_to_string(_driver); + ior = cior; + } + return ior; +} + SALOMEDSImpl_TMPFile* SALOMEDS_Driver_i::Save(const SALOMEDSImpl_SComponent& theComponent, - const string& theURL, - long& theStreamLength, - bool isMultiFile) + const std::string& theURL, + long& theStreamLength, + bool isMultiFile) { SALOMEDS::SComponent_var sco = SALOMEDS_SComponent_i::New (theComponent, _orb); CORBA::String_var url = CORBA::string_dup(theURL.c_str()); SALOMEDS::unlock(); - SALOMEDS::TMPFile_var aStream = _driver->Save(sco.in(), url, isMultiFile); + SALOMEDS::TMPFile_var aStream; + + if ( !CORBA::is_nil(_driver) ) + aStream = _driver->Save(sco.in(), url, isMultiFile); + SALOMEDSImpl_TMPFile* aTMPFile = new SALOMEDS_TMPFile_i(aStream._retn()); theStreamLength = aTMPFile->Size(); SALOMEDS::lock(); @@ -52,15 +71,19 @@ SALOMEDSImpl_TMPFile* SALOMEDS_Driver_i::Save(const SALOMEDSImpl_SComponent& the } SALOMEDSImpl_TMPFile* SALOMEDS_Driver_i::SaveASCII(const SALOMEDSImpl_SComponent& theComponent, - const string& theURL, - long& theStreamLength, - bool isMultiFile) + const std::string& theURL, + long& theStreamLength, + bool isMultiFile) { SALOMEDS::SComponent_var sco = SALOMEDS_SComponent_i::New (theComponent, _orb); CORBA::String_var url = CORBA::string_dup(theURL.c_str()); SALOMEDS::unlock(); - SALOMEDS::TMPFile_var aStream = _driver->SaveASCII(sco.in(), url, isMultiFile); + SALOMEDS::TMPFile_var aStream; + + if ( !CORBA::is_nil(_driver) ) + aStream = _driver->SaveASCII(sco.in(), url, isMultiFile); + SALOMEDSImpl_TMPFile* aTMPFile = new SALOMEDS_TMPFile_i(aStream._retn()); theStreamLength = aTMPFile->Size(); SALOMEDS::lock(); @@ -69,10 +92,10 @@ SALOMEDSImpl_TMPFile* SALOMEDS_Driver_i::SaveASCII(const SALOMEDSImpl_SComponent } bool SALOMEDS_Driver_i::Load(const SALOMEDSImpl_SComponent& theComponent, - const unsigned char* theStream, - const long theStreamLength, - const string& theURL, - bool isMultiFile) + const unsigned char* theStream, + const long theStreamLength, + const std::string& theURL, + bool isMultiFile) { SALOMEDS::SComponent_var sco = SALOMEDS_SComponent_i::New (theComponent, _orb); CORBA::String_var url = CORBA::string_dup(theURL.c_str()); @@ -85,17 +108,20 @@ bool SALOMEDS_Driver_i::Load(const SALOMEDSImpl_SComponent& theComponent, aStream = new SALOMEDS::TMPFile(0); SALOMEDS::unlock(); - bool isOk = _driver->Load(sco.in(), aStream.in(), url, isMultiFile); - SALOMEDS::lock(); + bool isOk = false; + if ( !CORBA::is_nil(_driver) ) + isOk = _driver->Load(sco.in(), aStream.in(), url, isMultiFile); + + SALOMEDS::lock(); return isOk; } bool SALOMEDS_Driver_i::LoadASCII(const SALOMEDSImpl_SComponent& theComponent, - const unsigned char* theStream, - const long theStreamLength, - const string& theURL, - bool isMultiFile) + const unsigned char* theStream, + const long theStreamLength, + const std::string& theURL, + bool isMultiFile) { SALOMEDS::SComponent_var sco = SALOMEDS_SComponent_i::New (theComponent, _orb); CORBA::String_var url = CORBA::string_dup(theURL.c_str()); @@ -108,9 +134,12 @@ bool SALOMEDS_Driver_i::LoadASCII(const SALOMEDSImpl_SComponent& theComponent, aStream = new SALOMEDS::TMPFile(0); SALOMEDS::unlock(); - bool isOk = _driver->LoadASCII(sco.in(), aStream.in(), url, isMultiFile); - SALOMEDS::lock(); + bool isOk = false; + + if ( !CORBA::is_nil(_driver) ) + isOk = _driver->LoadASCII(sco.in(), aStream.in(), url, isMultiFile); + SALOMEDS::lock(); return isOk; } @@ -119,39 +148,62 @@ void SALOMEDS_Driver_i::Close(const SALOMEDSImpl_SComponent& theComponent) SALOMEDS::SComponent_var sco = SALOMEDS_SComponent_i::New (theComponent, _orb); SALOMEDS::unlock(); - _driver->Close(sco.in()); + if ( !CORBA::is_nil(_driver) ) + _driver->Close(sco.in()); SALOMEDS::lock(); } +std::string SALOMEDS_Driver_i::ComponentDataType() +{ + std::string dtype = ""; + if ( !CORBA::is_nil(_driver) ) { + CORBA::String_var type = _driver->ComponentDataType(); + dtype = type; + } + return dtype; +} - -string SALOMEDS_Driver_i::IORToLocalPersistentID(const SALOMEDSImpl_SObject& theSObject, - const string& IORString, - bool isMultiFile, - bool isASCII) +std::string SALOMEDS_Driver_i::IORToLocalPersistentID(const SALOMEDSImpl_SObject& theSObject, + const std::string& IORString, + bool isMultiFile, + bool isASCII) { SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (theSObject, _orb); CORBA::String_var ior = CORBA::string_dup(IORString.c_str()); SALOMEDS::unlock(); - CORBA::String_var pers_string =_driver->IORToLocalPersistentID(so.in(), ior.in(), isMultiFile, isASCII); + + std::string pstr = ""; + + if ( !CORBA::is_nil(_driver) ) { + CORBA::String_var pers_string =_driver->IORToLocalPersistentID(so.in(), ior.in(), isMultiFile, isASCII); + pstr = pers_string; + } + SALOMEDS::lock(); - return string(pers_string); + return pstr; } -string SALOMEDS_Driver_i::LocalPersistentIDToIOR(const SALOMEDSImpl_SObject& theObject, - const string& aLocalPersistentID, - bool isMultiFile, - bool isASCII) +std::string SALOMEDS_Driver_i::LocalPersistentIDToIOR(const SALOMEDSImpl_SObject& theObject, + const std::string& aLocalPersistentID, + bool isMultiFile, + bool isASCII) { SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (theObject, _orb); CORBA::String_var pers_string = CORBA::string_dup(aLocalPersistentID.c_str()); SALOMEDS::unlock(); - CORBA::String_var IOR = _driver->LocalPersistentIDToIOR(so.in(), pers_string.in(), isMultiFile, isASCII); + + std::string ior = ""; + + if ( !CORBA::is_nil(_driver) ) { + CORBA::String_var IOR = _driver->LocalPersistentIDToIOR(so.in(), pers_string.in(), isMultiFile, isASCII); + ior = IOR; + } + SALOMEDS::lock(); - return string(IOR); + return ior; } bool SALOMEDS_Driver_i::CanCopy(const SALOMEDSImpl_SObject& theObject) @@ -159,7 +211,12 @@ bool SALOMEDS_Driver_i::CanCopy(const SALOMEDSImpl_SObject& theObject) SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (theObject, _orb); SALOMEDS::unlock(); - bool isOk = _driver->CanCopy(so.in()); + bool isOk = false; + + if ( !CORBA::is_nil(_driver) ) + isOk = _driver->CanCopy(so.in()); + + so->UnRegister(); SALOMEDS::lock(); return isOk; @@ -167,14 +224,18 @@ bool SALOMEDS_Driver_i::CanCopy(const SALOMEDSImpl_SObject& theObject) SALOMEDSImpl_TMPFile* SALOMEDS_Driver_i::CopyFrom(const SALOMEDSImpl_SObject& theObject, - int& theObjectID, - long& theStreamLength) + int& theObjectID, + long& theStreamLength) { SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (theObject, _orb); SALOMEDS::unlock(); CORBA::Long anObjectID; - SALOMEDS::TMPFile_var aStream = _driver->CopyFrom(so.in(), anObjectID); + SALOMEDS::TMPFile_var aStream; + + if ( !CORBA::is_nil(_driver) ) + aStream = _driver->CopyFrom(so.in(), anObjectID); + SALOMEDSImpl_TMPFile* aTMPFile = new SALOMEDS_TMPFile_i(aStream._retn()); theStreamLength = aTMPFile->Size(); theObjectID = anObjectID; @@ -183,18 +244,22 @@ SALOMEDSImpl_TMPFile* SALOMEDS_Driver_i::CopyFrom(const SALOMEDSImpl_SObject& th return aTMPFile; } -bool SALOMEDS_Driver_i::CanPaste(const string& theComponentName, int theObjectID) +bool SALOMEDS_Driver_i::CanPaste(const std::string& theComponentName, int theObjectID) { SALOMEDS::unlock(); - bool canPaste = _driver->CanPaste(theComponentName.c_str(), theObjectID); + bool canPaste = false; + + if ( !CORBA::is_nil(_driver) ) + canPaste = _driver->CanPaste(theComponentName.c_str(), theObjectID); + SALOMEDS::lock(); return canPaste; } -string SALOMEDS_Driver_i::PasteInto(const unsigned char* theStream, - const long theStreamLength, - int theObjectID, - const SALOMEDSImpl_SObject& theObject) +std::string SALOMEDS_Driver_i::PasteInto(const unsigned char* theStream, + const long theStreamLength, + int theObjectID, + const SALOMEDSImpl_SObject& theObject) { SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (theObject, _orb); CORBA::Octet* anOctetBuf = (CORBA::Octet*)theStream; @@ -206,27 +271,41 @@ string SALOMEDS_Driver_i::PasteInto(const unsigned char* theStream, aStream = new SALOMEDS::TMPFile(0); SALOMEDS::unlock(); - SALOMEDS::SObject_var ret_so = _driver->PasteInto(aStream.in(), theObjectID, so.in()); + + std::string entry = ""; + + if ( !CORBA::is_nil(_driver) ) { + SALOMEDS::SObject_var ret_so = _driver->PasteInto(aStream.in(), theObjectID, so.in()); + entry = ret_so->GetID(); + } + SALOMEDS::lock(); - return string(ret_so->GetID()); + return entry; } SALOMEDSImpl_TMPFile* SALOMEDS_Driver_i::DumpPython(SALOMEDSImpl_Study* theStudy, - bool isPublished, - bool& isValidScript, - long& theStreamLength) + bool isPublished, + bool isMultiFile, + bool& isValidScript, + long& theStreamLength) { - SALOMEDS_Study_i * st_servant = new SALOMEDS_Study_i (theStudy, _orb); + SALOMEDS_Study_i * st_servant = SALOMEDS_Study_i::GetStudyServant(theStudy, _orb);//new SALOMEDS_Study_i (theStudy, _orb); SALOMEDS::Study_var st = SALOMEDS::Study::_narrow(st_servant->_this()); - Engines::Component_ptr aComponent = Engines::Component::_narrow(_driver); SALOMEDS::unlock(); - CORBA::Boolean aValidScript, aPublished = isPublished; - Engines::TMPFile_var aStream = aComponent->DumpPython(st.in(), aPublished, aValidScript); + + Engines::TMPFile_var aStream; + CORBA::Boolean aValidScript = true; // VSR: maybe should be false by default ??? + + Engines::EngineComponent_ptr aComponent = Engines::EngineComponent::_narrow(_driver); + if ( !CORBA::is_nil( aComponent ) ) + aStream = aComponent->DumpPython(st.in(), isPublished, isMultiFile, aValidScript); + SALOMEDSImpl_TMPFile* aTMPFile = new Engines_TMPFile_i(aStream._retn()); theStreamLength = aTMPFile->Size(); isValidScript = aValidScript; + SALOMEDS::lock(); return aTMPFile; @@ -236,11 +315,23 @@ SALOMEDSImpl_TMPFile* SALOMEDS_Driver_i::DumpPython(SALOMEDSImpl_Study* theStudy // SALOMEDS_DriverFactory //############################################################################################################### -SALOMEDSImpl_Driver* SALOMEDS_DriverFactory_i::GetDriverByType(const string& theComponentType) +SALOMEDS_DriverFactory_i::SALOMEDS_DriverFactory_i(CORBA::ORB_ptr theORB) +{ + _orb = CORBA::ORB::_duplicate(theORB); + _name_service = new SALOME_NamingService(_orb); +} + + +SALOMEDS_DriverFactory_i::~SALOMEDS_DriverFactory_i() +{ + delete _name_service; +} + +SALOMEDSImpl_Driver* SALOMEDS_DriverFactory_i::GetDriverByType(const std::string& theComponentType) { CORBA::Object_var obj; - string aFactoryType; + std::string aFactoryType; if (theComponentType == "SUPERV") aFactoryType = "SuperVisionContainer"; else aFactoryType = "FactoryServer"; @@ -260,7 +351,7 @@ SALOMEDSImpl_Driver* SALOMEDS_DriverFactory_i::GetDriverByType(const string& the return NULL; } -SALOMEDSImpl_Driver* SALOMEDS_DriverFactory_i::GetDriverByIOR(const string& theIOR) +SALOMEDSImpl_Driver* SALOMEDS_DriverFactory_i::GetDriverByIOR(const std::string& theIOR) { CORBA::Object_var obj; obj = _orb->string_to_object(theIOR.c_str()); diff --git a/src/SALOMEDS/SALOMEDS_Driver_i.hxx b/src/SALOMEDS/SALOMEDS_Driver_i.hxx index 369174fc6..a17b9b846 100644 --- a/src/SALOMEDS/SALOMEDS_Driver_i.hxx +++ b/src/SALOMEDS/SALOMEDS_Driver_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef __SALOMEDS_DRIVER_I_H__ #define __SALOMEDS_DRIVER_I_H__ @@ -40,78 +41,66 @@ protected: public: - SALOMEDS_Driver_i(SALOMEDS::Driver_ptr theDriver, CORBA::ORB_ptr theORB) - { - _driver = SALOMEDS::Driver::_duplicate(theDriver); - _orb = CORBA::ORB::_duplicate(theORB); - } + SALOMEDS_Driver_i(SALOMEDS::Driver_ptr theDriver, CORBA::ORB_ptr theORB); ~SALOMEDS_Driver_i(); - virtual std::string GetIOR() - { - CORBA::String_var ior = _orb->object_to_string(_driver); - return std::string(ior); - } + virtual std::string GetIOR(); virtual SALOMEDSImpl_TMPFile* Save(const SALOMEDSImpl_SComponent& theComponent, - const std::string& theURL, - long& theStreamLength, - bool isMultiFile); + const std::string& theURL, + long& theStreamLength, + bool isMultiFile); virtual SALOMEDSImpl_TMPFile* SaveASCII(const SALOMEDSImpl_SComponent& theComponent, - const std::string& theURL, - long& theStreamLength, - bool isMultiFile); + const std::string& theURL, + long& theStreamLength, + bool isMultiFile); virtual bool Load(const SALOMEDSImpl_SComponent& theComponent, - const unsigned char* theStream, - const long theStreamLength, - const std::string& theURL, - bool isMultiFile); + const unsigned char* theStream, + const long theStreamLength, + const std::string& theURL, + bool isMultiFile); virtual bool LoadASCII(const SALOMEDSImpl_SComponent& theComponent, - const unsigned char* theStream, - const long theStreamLength, - const std::string& theURL, - bool isMultiFile); + const unsigned char* theStream, + const long theStreamLength, + const std::string& theURL, + bool isMultiFile); virtual void Close(const SALOMEDSImpl_SComponent& theComponent); - virtual std::string ComponentDataType() - { - CORBA::String_var ior = _driver->ComponentDataType(); - return std::string(ior); - } - + virtual std::string ComponentDataType(); virtual std::string IORToLocalPersistentID(const SALOMEDSImpl_SObject& theSObject, - const std::string& IORString, - bool isMultiFile, - bool isASCII); + const std::string& IORString, + bool isMultiFile, + bool isASCII); virtual std::string LocalPersistentIDToIOR(const SALOMEDSImpl_SObject& theSObject, - const std::string& aLocalPersistentID, - bool isMultiFile, - bool isASCII); + const std::string& aLocalPersistentID, + bool isMultiFile, + bool isASCII); virtual bool CanCopy(const SALOMEDSImpl_SObject& theObject); virtual SALOMEDSImpl_TMPFile* CopyFrom(const SALOMEDSImpl_SObject& theObject, - int& theObjectID, - long& theStreamLength); + int& theObjectID, + long& theStreamLength); virtual bool CanPaste(const std::string& theComponentName, int theObjectID); virtual std::string PasteInto(const unsigned char* theStream, - const long theStreamLength, - int theObjectID, - const SALOMEDSImpl_SObject& theObject); + const long theStreamLength, + int theObjectID, + const SALOMEDSImpl_SObject& theObject); virtual SALOMEDSImpl_TMPFile* DumpPython(SALOMEDSImpl_Study* theStudy, - bool isPublished, - bool& isValidScript, - long& theStreamLength); + bool isPublished, + bool isMultiFile, + bool& isValidScript, + long& theStreamLength); }; #include "SALOME_NamingService.hxx" @@ -125,17 +114,9 @@ protected: public: - SALOMEDS_DriverFactory_i(CORBA::ORB_ptr theORB) - { - _orb = CORBA::ORB::_duplicate(theORB); - _name_service = new SALOME_NamingService(_orb); - } - + SALOMEDS_DriverFactory_i(CORBA::ORB_ptr theORB); - ~SALOMEDS_DriverFactory_i() - { - delete _name_service; - } + ~SALOMEDS_DriverFactory_i(); virtual SALOMEDSImpl_Driver* GetDriverByType(const std::string& theComponentType); diff --git a/src/SALOMEDS/SALOMEDS_GenericAttribute.cxx b/src/SALOMEDS/SALOMEDS_GenericAttribute.cxx index 827ea4714..df1dc6e84 100644 --- a/src/SALOMEDS/SALOMEDS_GenericAttribute.cxx +++ b/src/SALOMEDS/SALOMEDS_GenericAttribute.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_GenericAttribute.cxx // Author : Sergey RUIN // Module : SALOME @@ -40,8 +41,6 @@ #include #endif -using namespace std; - SALOMEDS_GenericAttribute::SALOMEDS_GenericAttribute(SALOMEDSImpl_GenericAttribute* theGA) { _isLocal = true; @@ -71,7 +70,7 @@ SALOMEDS_GenericAttribute::SALOMEDS_GenericAttribute(SALOMEDS::GenericAttribute_ SALOMEDS_GenericAttribute::~SALOMEDS_GenericAttribute() { if (!_isLocal) { - _corba_impl->Destroy(); + _corba_impl->UnRegister(); } } @@ -99,7 +98,7 @@ std::string SALOMEDS_GenericAttribute::Type() aType = _local_impl->Type(); } else { - aType = _corba_impl->Type(); + aType = (CORBA::String_var)_corba_impl->Type(); } return aType; } @@ -112,7 +111,7 @@ std::string SALOMEDS_GenericAttribute::GetClassType() aType = _local_impl->GetClassType(); } else { - aType = _corba_impl->GetClassType(); + aType = (CORBA::String_var)_corba_impl->GetClassType(); } return aType; } @@ -125,7 +124,7 @@ _PTR(SObject) SALOMEDS_GenericAttribute::GetSObject() aSO = new SALOMEDS_SObject(_local_impl->GetSObject()); } else { - aSO = new SALOMEDS_SObject(_corba_impl->GetSObject()); + aSO = new SALOMEDS_SObject((SALOMEDS::SObject_var)_corba_impl->GetSObject()); } return _PTR(SObject)(aSO); @@ -148,7 +147,8 @@ SALOMEDS_GenericAttribute* SALOMEDS_GenericAttribute::CreateAttribute(SALOMEDS:: { SALOMEDS_GenericAttribute* aGA = NULL; if(!CORBA::is_nil(theGA)) { - std::string aTypeOfAttribute = theGA->GetClassType(); + CORBA::String_var astr=theGA->GetClassType(); + std::string aTypeOfAttribute = astr.in(); __CreateGenericClientAttributeCORBA } return aGA; diff --git a/src/SALOMEDS/SALOMEDS_GenericAttribute.hxx b/src/SALOMEDS/SALOMEDS_GenericAttribute.hxx index 582674714..3453e6a35 100644 --- a/src/SALOMEDS/SALOMEDS_GenericAttribute.hxx +++ b/src/SALOMEDS/SALOMEDS_GenericAttribute.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_GenericAttribute.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx b/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx index c68177b5c..e32d55c7b 100644 --- a/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx +++ b/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_GenericAttribute_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -40,8 +41,6 @@ #include #endif -using namespace std; - UNEXPECT_CATCH(GALockProtection, SALOMEDS::GenericAttribute::LockProtection); SALOMEDS_GenericAttribute_i::SALOMEDS_GenericAttribute_i(DF_Attribute* theImpl, CORBA::ORB_ptr theOrb) @@ -50,6 +49,10 @@ SALOMEDS_GenericAttribute_i::SALOMEDS_GenericAttribute_i(DF_Attribute* theImpl, _impl = theImpl; } +SALOMEDS_GenericAttribute_i::~SALOMEDS_GenericAttribute_i() +{ +} + void SALOMEDS_GenericAttribute_i::CheckLocked() throw (SALOMEDS::GenericAttribute::LockProtection) { SALOMEDS::Locker lock; @@ -79,22 +82,22 @@ char* SALOMEDS_GenericAttribute_i::Type() { SALOMEDS::Locker lock; if (_impl) { - string type = SALOMEDSImpl_GenericAttribute::Impl_GetType(_impl); + std::string type = SALOMEDSImpl_GenericAttribute::Impl_GetType(_impl); return CORBA::string_dup(type.c_str()); } - return (char*)""; + return CORBA::string_dup(""); } char* SALOMEDS_GenericAttribute_i::GetClassType() { SALOMEDS::Locker lock; if (_impl) { - string class_type = SALOMEDSImpl_GenericAttribute::Impl_GetClassType(_impl); + std::string class_type = SALOMEDSImpl_GenericAttribute::Impl_GetClassType(_impl); return CORBA::string_dup(class_type.c_str()); } - return (char*)""; + return CORBA::string_dup(""); } @@ -104,7 +107,7 @@ SALOMEDS::GenericAttribute_ptr SALOMEDS_GenericAttribute_i::CreateAttribute { SALOMEDS::Locker lock; - string aClassType = dynamic_cast(theAttr)->GetClassType(); + std::string aClassType = dynamic_cast(theAttr)->GetClassType(); char* aTypeOfAttribute = (char*)aClassType.c_str(); SALOMEDS::GenericAttribute_var anAttribute; SALOMEDS_GenericAttribute_i* attr_servant = NULL; diff --git a/src/SALOMEDS/SALOMEDS_GenericAttribute_i.hxx b/src/SALOMEDS/SALOMEDS_GenericAttribute_i.hxx index 8b2893947..83246dd04 100644 --- a/src/SALOMEDS/SALOMEDS_GenericAttribute_i.hxx +++ b/src/SALOMEDS/SALOMEDS_GenericAttribute_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_GenericAttribute_i.hxx // Author : Sergey RUIN // Module : SALOME @@ -35,17 +36,17 @@ #include "SALOMEDSImpl_GenericAttribute.hxx" class Standard_EXPORT SALOMEDS_GenericAttribute_i: public virtual POA_SALOMEDS::GenericAttribute, - public virtual PortableServer::ServantBase, - public virtual SALOME::GenericObj_i + public virtual PortableServer::ServantBase, + public virtual SALOME::GenericObj_i { protected: DF_Attribute* _impl; - CORBA::ORB_ptr _orb; + CORBA::ORB_var _orb; public: SALOMEDS_GenericAttribute_i(DF_Attribute* theImpl, CORBA::ORB_ptr theOrb); - virtual ~SALOMEDS_GenericAttribute_i() {}; + virtual ~SALOMEDS_GenericAttribute_i(); void CheckLocked() throw (SALOMEDS::GenericAttribute::LockProtection); diff --git a/src/SALOMEDS/SALOMEDS_IParameters.cxx b/src/SALOMEDS/SALOMEDS_IParameters.cxx index 8e54d30bf..e5274e3f9 100644 --- a/src/SALOMEDS/SALOMEDS_IParameters.cxx +++ b/src/SALOMEDS/SALOMEDS_IParameters.cxx @@ -1,29 +1,28 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "SALOMEDS_IParameters.hxx" #include -using namespace std; - #define PT_INTEGER 0 #define PT_REAL 1 #define PT_BOOLEAN 2 @@ -37,6 +36,9 @@ using namespace std; #define _AP_PROPERTIES_LIST_ "AP_PROPERTIES_LIST" #define _AP_DUMP_PYTHON_ "AP_DUMP_PYTHON" +#define _PT_ID_ "_PT_OBJECT_ID_" + + /*! Constructor */ @@ -53,10 +55,10 @@ SALOMEDS_IParameters::~SALOMEDS_IParameters() _compNames.clear(); } -int SALOMEDS_IParameters::append(const string& listName, const string& value) +int SALOMEDS_IParameters::append(const std::string& listName, const std::string& value) { if(!_ap) return -1; - vector v; + std::vector v; if(!_ap->IsSet(listName, PT_STRARRAY)) { if(!_ap->IsSet(_AP_LISTS_LIST_, PT_STRARRAY)) _ap->SetStrArray(_AP_LISTS_LIST_, v); if(listName != _AP_ENTRIES_LIST_ && @@ -71,43 +73,43 @@ int SALOMEDS_IParameters::append(const string& listName, const string& value) return (v.size()-1); } -int SALOMEDS_IParameters::nbValues(const string& listName) +int SALOMEDS_IParameters::nbValues(const std::string& listName) { if(!_ap) return -1; if(!_ap->IsSet(listName, PT_STRARRAY)) return 0; - vector v = _ap->GetStrArray(listName); + std::vector v = _ap->GetStrArray(listName); return v.size(); } -vector SALOMEDS_IParameters::getValues(const string& listName) +std::vector SALOMEDS_IParameters::getValues(const std::string& listName) { - vector v; + std::vector v; if(!_ap) return v; if(!_ap->IsSet(listName, PT_STRARRAY)) return v; return _ap->GetStrArray(listName); } -string SALOMEDS_IParameters::getValue(const string& listName, int index) +std::string SALOMEDS_IParameters::getValue(const std::string& listName, int index) { if(!_ap) return ""; if(!_ap->IsSet(listName, PT_STRARRAY)) return ""; - vector v = _ap->GetStrArray(listName); + std::vector v = _ap->GetStrArray(listName); if(index >= v.size()) return ""; return v[index]; } -vector SALOMEDS_IParameters::getLists() +std::vector SALOMEDS_IParameters::getLists() { - vector v; + std::vector v; if(!_ap->IsSet(_AP_LISTS_LIST_, PT_STRARRAY)) return v; return _ap->GetStrArray(_AP_LISTS_LIST_); } -void SALOMEDS_IParameters::setParameter(const string& entry, const string& parameterName, const string& value) +void SALOMEDS_IParameters::setParameter(const std::string& entry, const std::string& parameterName, const std::string& value) { if(!_ap) return; - vector v; + std::vector v; if(!_ap->IsSet(entry, PT_STRARRAY)) { append(_AP_ENTRIES_LIST_, entry); //Add the entry to the internal list of entries _ap->SetStrArray(entry, v); @@ -119,11 +121,11 @@ void SALOMEDS_IParameters::setParameter(const string& entry, const string& param } -string SALOMEDS_IParameters::getParameter(const string& entry, const string& parameterName) +std::string SALOMEDS_IParameters::getParameter(const std::string& entry, const std::string& parameterName) { if(!_ap) return ""; if(!_ap->IsSet(entry, PT_STRARRAY)) return ""; - vector v = _ap->GetStrArray(entry); + std::vector v = _ap->GetStrArray(entry); int length = v.size(); for(int i = 0; i SALOMEDS_IParameters::getAllParameterNames(const string& entry) +std::vector SALOMEDS_IParameters::getAllParameterNames(const std::string& entry) { - vector v, names; + std::vector v, names; if(!_ap) return v; if(!_ap->IsSet(entry, PT_STRARRAY)) return v; v = _ap->GetStrArray(entry); @@ -145,9 +147,36 @@ vector SALOMEDS_IParameters::getAllParameterNames(const string& entry) return names; } -vector SALOMEDS_IParameters::getAllParameterValues(const string& entry) + +std::string SALOMEDS_IParameters::getIdParameter(const std::string& entry) +{ + if(!_ap) return ""; + if(!_ap->IsSet(entry, PT_STRARRAY)) return ""; + std::vector v = _ap->GetStrArray(entry); + int length = v.size(); + for(int i = 0; i v; + if(!_ap->IsSet(entry, PT_STRARRAY)) { + append(_AP_ENTRIES_LIST_, entry); //Add the entry to the internal list of entries + _ap->SetStrArray(entry, v); + } + v = _ap->GetStrArray(entry); + v.push_back(_PT_ID_); + v.push_back(value); + _ap->SetStrArray(entry, v); +} + +std::vector SALOMEDS_IParameters::getAllParameterValues(const std::string& entry) { - vector v, values; + std::vector v, values; if(!_ap) return v; if(!_ap->IsSet(entry, PT_STRARRAY)) return v; v = _ap->GetStrArray(entry); @@ -158,22 +187,22 @@ vector SALOMEDS_IParameters::getAllParameterValues(const string& entry) return values; } -int SALOMEDS_IParameters::getNbParameters(const string& entry) +int SALOMEDS_IParameters::getNbParameters(const std::string& entry) { if(!_ap) return -1; if(!_ap->IsSet(entry, PT_STRARRAY)) return -1; return _ap->GetStrArray(entry).size()/2; } -vector SALOMEDS_IParameters::getEntries() +std::vector SALOMEDS_IParameters::getEntries() { - vector v; + std::vector v; if(!_ap) return v; if(!_ap->IsSet(_AP_ENTRIES_LIST_, PT_STRARRAY)) return v; return _ap->GetStrArray(_AP_ENTRIES_LIST_); } -void SALOMEDS_IParameters::setProperty(const string& name, const std::string& value) +void SALOMEDS_IParameters::setProperty(const std::string& name, const std::string& value) { if(!_ap) return; if(!_ap->IsSet(name, PT_STRING)) { @@ -182,26 +211,26 @@ void SALOMEDS_IParameters::setProperty(const string& name, const std::string& va _ap->SetString(name, value); } -string SALOMEDS_IParameters::getProperty(const string& name) +std::string SALOMEDS_IParameters::getProperty(const std::string& name) { if(!_ap) return ""; if(!_ap->IsSet(name, PT_STRING)) return ""; return _ap->GetString(name); } -vector SALOMEDS_IParameters::getProperties() +std::vector SALOMEDS_IParameters::getProperties() { - vector v; + std::vector v; if(!_ap) return v; if(!_ap->IsSet(_AP_PROPERTIES_LIST_, PT_STRARRAY)) return v; return _ap->GetStrArray(_AP_PROPERTIES_LIST_); } -vector SALOMEDS_IParameters::parseValue(const string& value, const char separator, bool fromEnd) +std::vector SALOMEDS_IParameters::parseValue(const std::string& value, const char separator, bool fromEnd) { - string val(value); - vector v; + std::string val(value); + std::vector v; int pos; if(fromEnd) pos = val.rfind(separator); else pos = val.find(separator); @@ -211,7 +240,7 @@ vector SALOMEDS_IParameters::parseValue(const string& value, const char return v; } - string part1, part2; + std::string part1, part2; part1 = val.substr(0, pos); part2 = val.substr(pos+1, val.size()); v.push_back(part1); @@ -219,21 +248,21 @@ vector SALOMEDS_IParameters::parseValue(const string& value, const char return v; } -string SALOMEDS_IParameters::encodeEntry(const string& entry, const string& compName) +std::string SALOMEDS_IParameters::encodeEntry(const std::string& entry, const std::string& compName) { - string tail(entry, 6, entry.length()-1); - string newEntry(compName); + std::string tail(entry, 6, entry.length()-1); + std::string newEntry(compName); newEntry+=("_"+tail); return newEntry; } -string SALOMEDS_IParameters::decodeEntry(const string& entry) +std::string SALOMEDS_IParameters::decodeEntry(const std::string& entry) { if(!_study) return entry; int pos = entry.rfind("_"); if(pos < 0 || pos >= entry.length()) return entry; - string compName(entry, 0, pos), compID, tail(entry, pos+1, entry.length()-1); + std::string compName(entry, 0, pos), compID, tail(entry, pos+1, entry.length()-1); if(_compNames.find(compName) == _compNames.end()) { _PTR(SObject) so = _study->FindComponent(compName); @@ -243,15 +272,15 @@ string SALOMEDS_IParameters::decodeEntry(const string& entry) } else compID = _compNames[compName]; - string newEntry(compID); + std::string newEntry(compID); newEntry += (":"+tail); return newEntry; } -void SALOMEDS_IParameters::setDumpPython(_PTR(Study) study, const string& theID) +void SALOMEDS_IParameters::setDumpPython(_PTR(Study) study, const std::string& theID) { - string anID; + std::string anID; if(theID == "") anID = getDefaultVisualComponent(); else anID = theID; @@ -259,9 +288,9 @@ void SALOMEDS_IParameters::setDumpPython(_PTR(Study) study, const string& theID) ap->SetBool(_AP_DUMP_PYTHON_, !isDumpPython(study, theID)); } -bool SALOMEDS_IParameters::isDumpPython(_PTR(Study) study, const string& theID) +bool SALOMEDS_IParameters::isDumpPython(_PTR(Study) study, const std::string& theID) { - string anID; + std::string anID; if(theID == "") anID = getDefaultVisualComponent(); else anID = theID; @@ -271,7 +300,7 @@ bool SALOMEDS_IParameters::isDumpPython(_PTR(Study) study, const string& theID) return (bool)ap->GetBool(_AP_DUMP_PYTHON_); } -string SALOMEDS_IParameters::getDefaultVisualComponent() +std::string SALOMEDS_IParameters::getDefaultVisualComponent() { return "Interface Applicative"; } diff --git a/src/SALOMEDS/SALOMEDS_IParameters.hxx b/src/SALOMEDS/SALOMEDS_IParameters.hxx index 4c518b588..07b1156d6 100644 --- a/src/SALOMEDS/SALOMEDS_IParameters.hxx +++ b/src/SALOMEDS/SALOMEDS_IParameters.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef SALOMEDS_IParameters_H #define SALOMEDS_IParameters_H @@ -76,6 +77,16 @@ public: */ virtual std::string getParameter(const std::string& entry, const std::string& parameterName); + /*! + Sets an id parameter value for the given entry. + */ + virtual void setIdParameter(const std::string& entry, const std::string& value); + + /*! + Gets an id parameter value for the given entry + */ + virtual std::string getIdParameter(const std::string& entry); + /*! Returns all parameter names of the given entry */ diff --git a/src/SALOMEDS/SALOMEDS_SComponent.cxx b/src/SALOMEDS/SALOMEDS_SComponent.cxx index fe7d379fc..7eb6ba557 100644 --- a/src/SALOMEDS/SALOMEDS_SComponent.cxx +++ b/src/SALOMEDS/SALOMEDS_SComponent.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_SComponent.cxx // Author : Sergey RUIN // Module : SALOME @@ -30,8 +31,6 @@ #include -using namespace std; - SALOMEDS_SComponent::SALOMEDS_SComponent(SALOMEDS::SComponent_ptr theSComponent) :SALOMEDS_SObject(theSComponent) {} @@ -50,7 +49,12 @@ std::string SALOMEDS_SComponent::ComponentDataType() SALOMEDS::Locker lock; aType = (dynamic_cast(GetLocalImpl()))->ComponentDataType(); } - else aType = (SALOMEDS::SComponent::_narrow(GetCORBAImpl()))->ComponentDataType(); + else + { + SALOMEDS::SComponent_var aCompo=SALOMEDS::SComponent::_narrow(GetCORBAImpl()); + CORBA::String_var aString = aCompo->ComponentDataType(); + aType=aString.in(); + } return aType; } @@ -65,7 +69,7 @@ bool SALOMEDS_SComponent::ComponentIOR(std::string& theID) else { CORBA::String_var anIOR; ret = (SALOMEDS::SComponent::_narrow(GetCORBAImpl()))->ComponentIOR(anIOR.out()); - theID = std::string(anIOR.in()); + theID = std::string(anIOR.in()); } return ret; @@ -74,13 +78,13 @@ bool SALOMEDS_SComponent::ComponentIOR(std::string& theID) SALOMEDS::SComponent_ptr SALOMEDS_SComponent::GetSComponent() { if(_isLocal) { - if(!CORBA::is_nil(_corba_impl)) return SALOMEDS::SComponent::_duplicate(SALOMEDS::SComponent::_narrow(GetCORBAImpl())); + if(!CORBA::is_nil(_corba_impl)) return SALOMEDS::SComponent::_narrow(GetCORBAImpl()); SALOMEDS::SComponent_var aSCO = SALOMEDS_SComponent_i::New(*(dynamic_cast(GetLocalImpl())), _orb); _corba_impl = SALOMEDS::SComponent::_duplicate(aSCO); return aSCO._retn(); } else { - return SALOMEDS::SComponent::_duplicate(SALOMEDS::SComponent::_narrow(GetCORBAImpl())); + return SALOMEDS::SComponent::_narrow(GetCORBAImpl()); } return SALOMEDS::SComponent::_nil(); } diff --git a/src/SALOMEDS/SALOMEDS_SComponent.hxx b/src/SALOMEDS/SALOMEDS_SComponent.hxx index bd261c729..420df5a7c 100644 --- a/src/SALOMEDS/SALOMEDS_SComponent.hxx +++ b/src/SALOMEDS/SALOMEDS_SComponent.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_SComponent.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_SComponentIterator.cxx b/src/SALOMEDS/SALOMEDS_SComponentIterator.cxx index 9ee6a8e7d..b828d3c3b 100644 --- a/src/SALOMEDS/SALOMEDS_SComponentIterator.cxx +++ b/src/SALOMEDS/SALOMEDS_SComponentIterator.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_SComponentIterator.cxx // Author : Sergey RUIN // Module : SALOME @@ -44,7 +45,7 @@ SALOMEDS_SComponentIterator::SALOMEDS_SComponentIterator(SALOMEDS::SComponentIte SALOMEDS_SComponentIterator::~SALOMEDS_SComponentIterator() { - if(!_isLocal) _corba_impl->Destroy(); + if(!_isLocal) _corba_impl->UnRegister(); else if(_local_impl) delete _local_impl; } @@ -84,6 +85,6 @@ _PTR(SComponent) SALOMEDS_SComponentIterator::Value() SALOMEDS::Locker lock; aSCO = new SALOMEDS_SComponent(_local_impl->Value()); } - else aSCO = new SALOMEDS_SComponent(_corba_impl->Value()); + else aSCO = new SALOMEDS_SComponent((SALOMEDS::SComponent_var)_corba_impl->Value()); return _PTR(SComponent)(aSCO); } diff --git a/src/SALOMEDS/SALOMEDS_SComponentIterator.hxx b/src/SALOMEDS/SALOMEDS_SComponentIterator.hxx index 416de7962..569d211cd 100644 --- a/src/SALOMEDS/SALOMEDS_SComponentIterator.hxx +++ b/src/SALOMEDS/SALOMEDS_SComponentIterator.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_SComponentIterator.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_SComponentIterator_i.cxx b/src/SALOMEDS/SALOMEDS_SComponentIterator_i.cxx index 32ba53b3e..89e017b61 100644 --- a/src/SALOMEDS/SALOMEDS_SComponentIterator_i.cxx +++ b/src/SALOMEDS/SALOMEDS_SComponentIterator_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_SComponentIterator_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -27,8 +28,6 @@ #include "SALOMEDS.hxx" #include "SALOMEDSImpl_SComponent.hxx" -using namespace std; - //============================================================================ /*! Function : constructor * @@ -36,7 +35,7 @@ using namespace std; //============================================================================ SALOMEDS_SComponentIterator_i::SALOMEDS_SComponentIterator_i(const SALOMEDSImpl_SComponentIterator& theImpl, - CORBA::ORB_ptr orb) + CORBA::ORB_ptr orb) { _orb = CORBA::ORB::_duplicate(orb); _impl = theImpl.GetPersistentCopy(); diff --git a/src/SALOMEDS/SALOMEDS_SComponentIterator_i.hxx b/src/SALOMEDS/SALOMEDS_SComponentIterator_i.hxx index ff2e8f16d..32adbac0b 100644 --- a/src/SALOMEDS/SALOMEDS_SComponentIterator_i.hxx +++ b/src/SALOMEDS/SALOMEDS_SComponentIterator_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_SComponentIterator_i.hxx // Author : Sergey RUIN // Module : SALOME @@ -39,13 +40,13 @@ #include "SALOMEDSImpl_SComponentIterator.hxx" class SALOMEDS_SComponentIterator_i:public virtual POA_SALOMEDS::SComponentIterator, - public virtual PortableServer::ServantBase, - public virtual SALOME::GenericObj_i + public virtual PortableServer::ServantBase, + public virtual SALOME::GenericObj_i { private: - CORBA::ORB_ptr _orb; + CORBA::ORB_var _orb; SALOMEDSImpl_SComponentIterator* _impl; public: diff --git a/src/SALOMEDS/SALOMEDS_SComponent_i.cxx b/src/SALOMEDS/SALOMEDS_SComponent_i.cxx index cbe8ed337..a3b0f05ec 100644 --- a/src/SALOMEDS/SALOMEDS_SComponent_i.cxx +++ b/src/SALOMEDS/SALOMEDS_SComponent_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_SComponent_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -28,14 +29,11 @@ #include "utilities.h" #include -using namespace std; - SALOMEDS::SComponent_ptr SALOMEDS_SComponent_i::New(const SALOMEDSImpl_SComponent& theImpl, CORBA::ORB_ptr theORB) { SALOMEDS_SComponent_i* sco_servant = new SALOMEDS_SComponent_i(theImpl, theORB); - SALOMEDS::SComponent_var sco = SALOMEDS::SComponent::_narrow(sco_servant->SComponent::_this()); - return sco._retn(); + return sco_servant->_this(); } //============================================================================ @@ -63,7 +61,7 @@ SALOMEDS_SComponent_i::~SALOMEDS_SComponent_i() char* SALOMEDS_SComponent_i::ComponentDataType() { SALOMEDS::Locker lock; - string aType = dynamic_cast(_impl)->ComponentDataType(); + std::string aType = dynamic_cast(_impl)->ComponentDataType(); return CORBA::string_dup(aType.c_str()); } @@ -76,7 +74,7 @@ char* SALOMEDS_SComponent_i::ComponentDataType() CORBA::Boolean SALOMEDS_SComponent_i::ComponentIOR(CORBA::String_out IOR) { SALOMEDS::Locker lock; - string ior; + std::string ior; if(!dynamic_cast(_impl)->ComponentIOR(ior)) { IOR = CORBA::string_dup(""); return false; diff --git a/src/SALOMEDS/SALOMEDS_SComponent_i.hxx b/src/SALOMEDS/SALOMEDS_SComponent_i.hxx index 9b4a8e577..6465a246d 100644 --- a/src/SALOMEDS/SALOMEDS_SComponent_i.hxx +++ b/src/SALOMEDS/SALOMEDS_SComponent_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_SComponent_i.hxx // Author : Sergey RUIN // Module : SALOME @@ -40,7 +41,7 @@ #include "SALOMEDSImpl_SComponent.hxx" class Standard_EXPORT SALOMEDS_SComponent_i: public POA_SALOMEDS::SComponent, - public SALOMEDS_SObject_i + public SALOMEDS_SObject_i { public: diff --git a/src/SALOMEDS/SALOMEDS_SObject.cxx b/src/SALOMEDS/SALOMEDS_SObject.cxx index 1c6c05b4a..9f465bb04 100644 --- a/src/SALOMEDS/SALOMEDS_SObject.cxx +++ b/src/SALOMEDS/SALOMEDS_SObject.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_SObject.hxx // Author : Sergey RUIN // Module : SALOME @@ -53,9 +54,6 @@ #endif - -using namespace std; - SALOMEDS_SObject::SALOMEDS_SObject(SALOMEDS::SObject_ptr theSObject) { #ifdef WIN32 @@ -98,13 +96,18 @@ SALOMEDS_SObject::SALOMEDS_SObject(const SALOMEDSImpl_SObject& theSObject) SALOMEDS_SObject::~SALOMEDS_SObject() { if (!_isLocal) { - _corba_impl->Destroy(); + _corba_impl->UnRegister(); } else { if(_local_impl) delete _local_impl; } } +bool SALOMEDS_SObject::IsNull() const +{ + return _isLocal ? ( !_local_impl || _local_impl->IsNull() ) : _corba_impl->IsNull(); +} + std::string SALOMEDS_SObject::GetID() { std::string aValue; @@ -112,7 +115,7 @@ std::string SALOMEDS_SObject::GetID() SALOMEDS::Locker lock; aValue = _local_impl->GetID(); } - else aValue = _corba_impl->GetID(); + else aValue = (CORBA::String_var)_corba_impl->GetID(); return aValue; } @@ -122,7 +125,7 @@ _PTR(SComponent) SALOMEDS_SObject::GetFatherComponent() SALOMEDS::Locker lock; return _PTR(SComponent)(new SALOMEDS_SComponent(_local_impl->GetFatherComponent())); } - return _PTR(SComponent)(new SALOMEDS_SComponent(_corba_impl->GetFatherComponent())); + return _PTR(SComponent)(new SALOMEDS_SComponent((SALOMEDS::SComponent_var)_corba_impl->GetFatherComponent())); } _PTR(SObject) SALOMEDS_SObject::GetFather() @@ -131,7 +134,7 @@ _PTR(SObject) SALOMEDS_SObject::GetFather() SALOMEDS::Locker lock; return _PTR(SObject)(new SALOMEDS_SObject(_local_impl->GetFather())); } - return _PTR(SObject)(new SALOMEDS_SObject(_corba_impl->GetFather())); + return _PTR(SObject)(new SALOMEDS_SObject((SALOMEDS::SObject_var)_corba_impl->GetFather())); } bool SALOMEDS_SObject::FindAttribute(_PTR(GenericAttribute)& anAttribute, @@ -199,7 +202,8 @@ _PTR(Study) SALOMEDS_SObject::GetStudy() SALOMEDS::Locker lock; return _PTR(Study)(new SALOMEDS_Study(_local_impl->GetStudy())); } - return _PTR(Study)(new SALOMEDS_Study(_corba_impl->GetStudy())); + SALOMEDS::Study_var study=_corba_impl->GetStudy(); + return _PTR(Study)(new SALOMEDS_Study(study)); } std::string SALOMEDS_SObject::Name() @@ -209,7 +213,7 @@ std::string SALOMEDS_SObject::Name() SALOMEDS::Locker lock; aName = _local_impl->Name(); } - else aName = _corba_impl->Name(); + else aName = (CORBA::String_var)_corba_impl->Name(); return aName; } @@ -223,15 +227,15 @@ void SALOMEDS_SObject::Name(const std::string& theName) else _corba_impl->Name(theName.c_str()); } -vector<_PTR(GenericAttribute)> SALOMEDS_SObject::GetAllAttributes() +std::vector<_PTR(GenericAttribute)> SALOMEDS_SObject::GetAllAttributes() { - vector<_PTR(GenericAttribute)> aVector; + std::vector<_PTR(GenericAttribute)> aVector; int aLength = 0; SALOMEDSClient_GenericAttribute* anAttr; if (_isLocal) { SALOMEDS::Locker lock; - vector aSeq = _local_impl->GetAllAttributes(); + std::vector aSeq = _local_impl->GetAllAttributes(); aLength = aSeq.size(); for (int i = 0; i < aLength; i++) { anAttr = SALOMEDS_GenericAttribute::CreateAttribute(dynamic_cast(aSeq[i])); @@ -257,7 +261,7 @@ std::string SALOMEDS_SObject::GetName() SALOMEDS::Locker lock; aName = _local_impl->GetName(); } - else aName = _corba_impl->GetName(); + else aName = (CORBA::String_var) _corba_impl->GetName(); return aName; } @@ -269,7 +273,7 @@ std::string SALOMEDS_SObject::GetComment() SALOMEDS::Locker lock; aComment = _local_impl->GetComment(); } - else aComment = _corba_impl->GetComment(); + else aComment = (CORBA::String_var) _corba_impl->GetComment(); return aComment; } @@ -281,7 +285,7 @@ std::string SALOMEDS_SObject::GetIOR() SALOMEDS::Locker lock; anIOR = _local_impl->GetIOR(); } - else anIOR = _corba_impl->GetIOR(); + else anIOR = (CORBA::String_var) _corba_impl->GetIOR(); return anIOR; } @@ -343,3 +347,16 @@ void SALOMEDS_SObject::init_orb() ASSERT(SINGLETON_::IsAlreadyExisting()); _orb = init(0 , 0 ) ; } + +void SALOMEDS_SObject::SetAttrString(const std::string& name, const std::string& value) +{ + if(_isLocal) + { + SALOMEDS::Locker lock; + _local_impl->SetAttrString(name,value); + } + else + { + _corba_impl->SetAttrString(name.c_str(),value.c_str()); + } +} diff --git a/src/SALOMEDS/SALOMEDS_SObject.hxx b/src/SALOMEDS/SALOMEDS_SObject.hxx index b20ceaf78..c587a4503 100644 --- a/src/SALOMEDS/SALOMEDS_SObject.hxx +++ b/src/SALOMEDS/SALOMEDS_SObject.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_SObject.hxx // Author : Sergey RUIN // Module : SALOME @@ -52,6 +53,7 @@ public: SALOMEDS_SObject(const SALOMEDSImpl_SObject& theSObject); virtual ~SALOMEDS_SObject(); + virtual bool IsNull() const; virtual std::string GetID(); virtual _PTR(SComponent) GetFatherComponent(); virtual _PTR(SObject) GetFather(); @@ -65,13 +67,14 @@ public: virtual std::string GetName(); virtual std::string GetComment(); virtual std::string GetIOR(); + virtual void SetAttrString(const std::string& name, const std::string& value); virtual int Tag(); virtual int Depth(); CORBA::Object_ptr GetObject(); SALOMEDS::SObject_ptr GetSObject(); - SALOMEDS::SObject_ptr GetCORBAImpl() { return SALOMEDS::SObject::_duplicate(_corba_impl); } + SALOMEDS::SObject_var GetCORBAImpl() { return _corba_impl; } SALOMEDSImpl_SObject* GetLocalImpl() { return _local_impl; } private: diff --git a/src/SALOMEDS/SALOMEDS_SObject_i.cxx b/src/SALOMEDS/SALOMEDS_SObject_i.cxx index 985423a52..2b5f40413 100644 --- a/src/SALOMEDS/SALOMEDS_SObject_i.cxx +++ b/src/SALOMEDS/SALOMEDS_SObject_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_SObject_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -44,14 +45,11 @@ #include #endif -using namespace std; - SALOMEDS::SObject_ptr SALOMEDS_SObject_i::New(const SALOMEDSImpl_SObject& theImpl, CORBA::ORB_ptr theORB) { SALOMEDS_SObject_i* so_servant = new SALOMEDS_SObject_i(theImpl, theORB); - SALOMEDS::SObject_var so = SALOMEDS::SObject::_narrow(so_servant->_this()); - return so._retn(); + return so_servant->_this(); } @@ -62,10 +60,11 @@ SALOMEDS::SObject_ptr SALOMEDS_SObject_i::New(const SALOMEDSImpl_SObject& theImp //============================================================================ SALOMEDS_SObject_i::SALOMEDS_SObject_i(const SALOMEDSImpl_SObject& impl, CORBA::ORB_ptr orb) { + _impl = 0; if(!impl.IsNull()) { if(impl.IsComponent()) { SALOMEDSImpl_SComponent sco = impl; - _impl = sco.GetPersistentCopy(); + _impl = sco.GetPersistentCopy(); } else { _impl = impl.GetPersistentCopy(); @@ -86,6 +85,17 @@ SALOMEDS_SObject_i::~SALOMEDS_SObject_i() if(_impl) delete _impl; } +//================================================================================ +/*! + * \brief Returns true if the %SObject does not belong to any %Study + */ +//================================================================================ + +CORBA::Boolean SALOMEDS_SObject_i::IsNull() +{ + SALOMEDS::Locker lock; + return !_impl || _impl->IsNull(); +} //============================================================================ /*! Function :GetID @@ -136,7 +146,7 @@ SALOMEDS::Study_ptr SALOMEDS_SObject_i::GetStudy() return SALOMEDS::Study::_nil(); } - string IOR = aStudy->GetTransientReference(); + std::string IOR = aStudy->GetTransientReference(); CORBA::Object_var obj = _orb->string_to_object(IOR.c_str()); SALOMEDS::Study_var Study = SALOMEDS::Study::_narrow(obj) ; ASSERT(!CORBA::is_nil(Study)); @@ -149,12 +159,12 @@ SALOMEDS::Study_ptr SALOMEDS_SObject_i::GetStudy() */ //============================================================================ CORBA::Boolean SALOMEDS_SObject_i::FindAttribute (SALOMEDS::GenericAttribute_out anAttribute, - const char* aTypeOfAttribute) + const char* aTypeOfAttribute) { SALOMEDS::Locker lock; DF_Attribute* anAttr = NULL; if(_impl->FindAttribute(anAttr, (char*)aTypeOfAttribute)) { - anAttribute = SALOMEDS::GenericAttribute::_duplicate(SALOMEDS_GenericAttribute_i::CreateAttribute(anAttr, _orb)); + anAttribute = SALOMEDS_GenericAttribute_i::CreateAttribute(anAttr, _orb); return true; } @@ -170,7 +180,7 @@ CORBA::Boolean SALOMEDS_SObject_i::FindAttribute (SALOMEDS::GenericAttribute_out SALOMEDS::ListOfAttributes* SALOMEDS_SObject_i::GetAllAttributes() { SALOMEDS::Locker lock; - vector aSeq = _impl->GetAllAttributes(); + std::vector aSeq = _impl->GetAllAttributes(); SALOMEDS::ListOfAttributes_var SeqOfAttr = new SALOMEDS::ListOfAttributes; int length = aSeq.size(); @@ -180,9 +190,9 @@ SALOMEDS::ListOfAttributes* SALOMEDS_SObject_i::GetAllAttributes() for(int i = 0; i < length; i++) { SALOMEDSImpl_GenericAttribute* anAttr = dynamic_cast(aSeq[i]); SALOMEDS::GenericAttribute_var anAttribute; - anAttribute = SALOMEDS::GenericAttribute::_duplicate(SALOMEDS_GenericAttribute_i::CreateAttribute(anAttr, _orb)); + anAttribute = SALOMEDS_GenericAttribute_i::CreateAttribute(anAttr, _orb); if (!CORBA::is_nil(anAttribute)) { - SeqOfAttr[i] = anAttribute; + SeqOfAttr[i] = anAttribute; } } } @@ -240,7 +250,7 @@ char* SALOMEDS_SObject_i::Name() void SALOMEDS_SObject_i::Name(const char* name) { SALOMEDS::Locker lock; - string aName((char*)name); + std::string aName((char*)name); _impl->Name(aName); } @@ -276,7 +286,7 @@ CORBA::Object_ptr SALOMEDS_SObject_i::GetObject() SALOMEDS::Locker lock; CORBA::Object_ptr obj = CORBA::Object::_nil(); try { - string IOR = _impl->GetIOR(); + std::string IOR = _impl->GetIOR(); char* c_ior = CORBA::string_dup(IOR.c_str()); obj = _orb->string_to_object(c_ior); CORBA::string_free(c_ior); @@ -320,6 +330,17 @@ char* SALOMEDS_SObject_i::GetIOR() return aStr._retn(); } +//============================================================================ +/*! Function : SetAttrString + * Purpose : + */ +//============================================================================ +void SALOMEDS_SObject_i::SetAttrString(const char* name, const char* value) +{ + SALOMEDS::Locker lock; + _impl->SetAttrString(name,value); +} + //=========================================================================== // PRIVATE FUNCTIONS //=========================================================================== diff --git a/src/SALOMEDS/SALOMEDS_SObject_i.hxx b/src/SALOMEDS/SALOMEDS_SObject_i.hxx index abf5fd3b3..4424dad99 100644 --- a/src/SALOMEDS/SALOMEDS_SObject_i.hxx +++ b/src/SALOMEDS/SALOMEDS_SObject_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_SObject_i.hxx // Author : Sergey RUIN // Module : SALOME @@ -38,11 +39,11 @@ #include "SALOMEDSImpl_SObject.hxx" class Standard_EXPORT SALOMEDS_SObject_i: public virtual POA_SALOMEDS::SObject, - public virtual PortableServer::ServantBase, - public virtual SALOME::GenericObj_i + public virtual PortableServer::ServantBase, + public virtual SALOME::GenericObj_i { protected: - CORBA::ORB_ptr _orb; + CORBA::ORB_var _orb; SALOMEDSImpl_SObject* _impl; public: @@ -53,6 +54,7 @@ public: virtual ~SALOMEDS_SObject_i(); + virtual CORBA::Boolean IsNull(); virtual char* GetID(); virtual SALOMEDS::SComponent_ptr GetFatherComponent(); virtual SALOMEDS::SObject_ptr GetFather() ; @@ -70,6 +72,7 @@ public: virtual char* GetName(); virtual char* GetComment(); virtual char* GetIOR(); + virtual void SetAttrString(const char*, const char*); virtual CORBA::Short Tag(); virtual CORBA::Short Depth(); diff --git a/src/SALOMEDS/SALOMEDS_Server.cxx b/src/SALOMEDS/SALOMEDS_Server.cxx index 2a5ea5c3e..8f410d22e 100644 --- a/src/SALOMEDS/SALOMEDS_Server.cxx +++ b/src/SALOMEDS/SALOMEDS_Server.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME SALOMEDS : data structure of SALOME and sources of Salome data server // File : SALOMEDS_Server.cxx // Author : Yves FRICAUD @@ -37,7 +38,6 @@ #ifdef CHECKTIME #include #endif -using namespace std; // extern "C" // { // for ccmalloc memory debug @@ -78,78 +78,78 @@ int main(int argc, char** argv) const char * Env = getenv("USE_LOGGER"); int EnvL =0; if ((Env!=NULL) && (strlen(Env))) - EnvL=1; + EnvL=1; CosNaming::Name name; name.length(1); name[0].id=CORBA::string_dup("Logger"); PortableServer::POAManager_var pman; for (int i = 1; i<=NumberOfTries; i++) - { - if (i!=1) + { + if (i!=1) #ifndef WIN32 - a=nanosleep(&ts_req,&ts_rem); + a=nanosleep(&ts_req,&ts_rem); #else - Sleep(TIMESleep/1000000); + Sleep(TIMESleep/1000000); #endif - try - { - obj = orb->resolve_initial_references("RootPOA"); - if(!CORBA::is_nil(obj)) - poa = PortableServer::POA::_narrow(obj); - if(!CORBA::is_nil(poa)) - pman = poa->the_POAManager(); - if(!CORBA::is_nil(orb)) - theObj = orb->resolve_initial_references("NameService"); - if (!CORBA::is_nil(theObj)){ - inc = CosNaming::NamingContext::_narrow(theObj); - if(!CORBA::is_nil(inc)) - { - MESSAGE( "SalomeDS Server: Naming Service was found" ); - if(EnvL==1) - { - CORBA::ORB_var orb1 = CORBA::ORB_init(argc,argv) ; - SALOME_NamingService &NS = *SINGLETON_::Instance() ; - NS.init_orb( orb1 ) ; - for(int j=1; j<=NumberOfTries; j++) - { - if (j!=1) + try + { + obj = orb->resolve_initial_references("RootPOA"); + if(!CORBA::is_nil(obj)) + poa = PortableServer::POA::_narrow(obj); + if(!CORBA::is_nil(poa)) + pman = poa->the_POAManager(); + if(!CORBA::is_nil(orb)) + theObj = orb->resolve_initial_references("NameService"); + if (!CORBA::is_nil(theObj)){ + inc = CosNaming::NamingContext::_narrow(theObj); + if(!CORBA::is_nil(inc)) + { + MESSAGE( "SalomeDS Server: Naming Service was found" ); + if(EnvL==1) + { + CORBA::ORB_var orb1 = CORBA::ORB_init(argc,argv) ; + SALOME_NamingService &NS = *SINGLETON_::Instance() ; + NS.init_orb( orb1 ) ; + for(int j=1; j<=NumberOfTries; j++) + { + if (j!=1) #ifndef WIN32 - a=nanosleep(&ts_req, &ts_rem); + a=nanosleep(&ts_req, &ts_rem); #else - Sleep(TIMESleep/1000000); + Sleep(TIMESleep/1000000); #endif - try - { - object = inc->resolve(name); - } - catch(CosNaming::NamingContext::NotFound) - { - MESSAGE( "SalomeDS Server: Logger Server wasn't found" ); } + try + { + object = inc->resolve(name); + } + catch(CosNaming::NamingContext::NotFound) + { + MESSAGE( "SalomeDS Server: Logger Server wasn't found" ); } - catch(...) - { - MESSAGE( "SalomeDS Server: Unknown exception" ); - } - if (!CORBA::is_nil(object)) - { - MESSAGE( "SalomeDS Server: Logger Server was found" ); - SALOMEDS=1; - break; - } - } - } - } - } - - } - catch( const SALOME_Exception &ex ) - { - MESSAGE( "Communication Error : " << ex.what() ); - return EXIT_FAILURE ; - } - if ((SALOMEDS==1)||((EnvL==0)&&(!CORBA::is_nil(inc)))) - break; - } + catch(...) + { + MESSAGE( "SalomeDS Server: Unknown exception" ); + } + if (!CORBA::is_nil(object)) + { + MESSAGE( "SalomeDS Server: Logger Server was found" ); + SALOMEDS=1; + break; + } + } + } + } + } + + } + catch( const SALOME_Exception &ex ) + { + MESSAGE( "Communication Error : " << ex.what() ); + return EXIT_FAILURE ; + } + if ((SALOMEDS==1)||((EnvL==0)&&(!CORBA::is_nil(inc)))) + break; + } // We allocate the objects on the heap. Since these are reference // counted objects, they will be deleted by the POA when they are no @@ -175,6 +175,7 @@ int main(int argc, char** argv) timer.ShowAbsolute(); #endif orb->run(); + MESSAGE( "end of SALOME_DS server" ); orb->destroy(); } catch(CORBA::SystemException&) diff --git a/src/SALOMEDS/SALOMEDS_Study.cxx b/src/SALOMEDS/SALOMEDS_Study.cxx index e97694d1b..8466a6723 100644 --- a/src/SALOMEDS/SALOMEDS_Study.cxx +++ b/src/SALOMEDS/SALOMEDS_Study.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_Study.cxx // Author : Sergey RUIN // Module : SALOME @@ -62,8 +63,6 @@ #include #endif -using namespace std; - SALOMEDS_Study::SALOMEDS_Study(SALOMEDSImpl_Study* theStudy) { _isLocal = true; @@ -104,7 +103,7 @@ std::string SALOMEDS_Study::GetPersistentReference() SALOMEDS::Locker lock; aRef = _local_impl->GetPersistentReference(); } - else aRef = _corba_impl->GetPersistentReference(); + else aRef = (CORBA::String_var)_corba_impl->GetPersistentReference(); return aRef; } @@ -176,9 +175,9 @@ _PTR(SObject) SALOMEDS_Study::FindObject(const std::string& anObjectName) SALOMEDSImpl_SObject aSO_impl = _local_impl->FindObject(anObjectName); if (!aSO_impl) return _PTR(SObject)(aSO); if(aSO_impl.IsComponent()) { - SALOMEDSImpl_SComponent aSCO_impl = aSO_impl; + SALOMEDSImpl_SComponent aSCO_impl = aSO_impl; return _PTR(SObject)(new SALOMEDS_SComponent(aSCO_impl)); - } + } aSO = new SALOMEDS_SObject(aSO_impl); } else { @@ -201,14 +200,14 @@ std::vector<_PTR(SObject)> SALOMEDS_Study::FindObjectByName(const std::string& a if (_isLocal) { SALOMEDS::Locker lock; - vector aSeq = _local_impl->FindObjectByName(anObjectName, aComponentName); + std::vector aSeq = _local_impl->FindObjectByName(anObjectName, aComponentName); aLength = aSeq.size(); for (i = 0; i< aLength; i++) aVector.push_back(_PTR(SObject)(new SALOMEDS_SObject(aSeq[i]))); } else { SALOMEDS::Study::ListOfSObject_var aSeq = _corba_impl->FindObjectByName((char*)anObjectName.c_str(), - (char*)aComponentName.c_str()); + (char*)aComponentName.c_str()); aLength = aSeq->length(); for (i = 0; i< aLength; i++) aVector.push_back(_PTR(SObject)(new SALOMEDS_SObject(aSeq[i]))); } @@ -545,7 +544,7 @@ std::vector<_PTR(SObject)> SALOMEDS_Study::FindDependances(const _PTR(SObject)& if (_isLocal) { SALOMEDS::Locker lock; - vector aSeq = _local_impl->FindDependances(*(aSO->GetLocalImpl())); + std::vector aSeq = _local_impl->FindDependances(*(aSO->GetLocalImpl())); if (aSeq.size()) { aLength = aSeq.size(); for (i = 0; i < aLength; i++) @@ -567,7 +566,7 @@ _PTR(AttributeStudyProperties) SALOMEDS_Study::GetProperties() SALOMEDS::Locker lock; aProp = new SALOMEDS_AttributeStudyProperties(_local_impl->GetProperties()); } - else aProp = new SALOMEDS_AttributeStudyProperties(_corba_impl->GetProperties()); + else aProp = new SALOMEDS_AttributeStudyProperties((SALOMEDS::AttributeStudyProperties_var)_corba_impl->GetProperties()); return _PTR(AttributeStudyProperties)(aProp); } @@ -630,15 +629,18 @@ void SALOMEDS_Study::EnableUseCaseAutoFilling(bool isEnabled) else _corba_impl->EnableUseCaseAutoFilling(isEnabled); } -bool SALOMEDS_Study::DumpStudy(const string& thePath, const string& theBaseName, bool isPublished) +bool SALOMEDS_Study::DumpStudy(const std::string& thePath, + const std::string& theBaseName, + bool isPublished, + bool isMultiFile) { //SRN: Pure CORBA DumpStudy as it does more cleaning than the local one if(CORBA::is_nil(_corba_impl)) GetStudy(); //If CORBA implementation is null then retrieve it - bool ret = _corba_impl->DumpStudy(thePath.c_str(), theBaseName.c_str(), isPublished); + bool ret = _corba_impl->DumpStudy(thePath.c_str(), theBaseName.c_str(), isPublished, isMultiFile); return ret; } -void SALOMEDS_Study::SetStudyLock(const string& theLockerID) +void SALOMEDS_Study::SetStudyLock(const std::string& theLockerID) { if (_isLocal) { SALOMEDS::Locker lock; @@ -658,13 +660,13 @@ bool SALOMEDS_Study::IsStudyLocked() return isLocked; } -void SALOMEDS_Study::UnLockStudy(const string& theLockerID) +void SALOMEDS_Study::UnLockStudy(const std::string& theLockerID) { if(_isLocal) _local_impl->UnLockStudy(theLockerID.c_str()); else _corba_impl->UnLockStudy((char*)theLockerID.c_str()); } -vector SALOMEDS_Study::GetLockerID() +std::vector SALOMEDS_Study::GetLockerID() { std::vector aVector; int aLength, i; @@ -681,7 +683,7 @@ vector SALOMEDS_Study::GetLockerID() } -void SALOMEDS_Study::SetReal(const string& theVarName, const double theValue) +void SALOMEDS_Study::SetReal(const std::string& theVarName, const double theValue) { if (_isLocal) { SALOMEDS::Locker lock; @@ -693,7 +695,7 @@ void SALOMEDS_Study::SetReal(const string& theVarName, const double theValue) _corba_impl->SetReal((char*)theVarName.c_str(),theValue); } -void SALOMEDS_Study::SetInteger(const string& theVarName, const int theValue) +void SALOMEDS_Study::SetInteger(const std::string& theVarName, const int theValue) { if (_isLocal) { SALOMEDS::Locker lock; @@ -705,7 +707,7 @@ void SALOMEDS_Study::SetInteger(const string& theVarName, const int theValue) _corba_impl->SetInteger((char*)theVarName.c_str(),theValue); } -void SALOMEDS_Study::SetBoolean(const string& theVarName, const bool theValue) +void SALOMEDS_Study::SetBoolean(const std::string& theVarName, const bool theValue) { if (_isLocal) { SALOMEDS::Locker lock; @@ -717,7 +719,31 @@ void SALOMEDS_Study::SetBoolean(const string& theVarName, const bool theValue) _corba_impl->SetBoolean((char*)theVarName.c_str(),theValue); } -double SALOMEDS_Study::GetReal(const string& theVarName) +void SALOMEDS_Study::SetString(const std::string& theVarName, const std::string& theValue) +{ + if (_isLocal) { + SALOMEDS::Locker lock; + _local_impl->SetStringVariable(theVarName, + theValue, + SALOMEDSImpl_GenericVariable::STRING_VAR); + } + else + _corba_impl->SetString((char*)theVarName.c_str(),(char*)theValue.c_str()); +} + +void SALOMEDS_Study::SetStringAsDouble(const std::string& theVarName, const double theValue) +{ + if (_isLocal) { + SALOMEDS::Locker lock; + _local_impl->SetStringVariableAsDouble(theVarName, + theValue, + SALOMEDSImpl_GenericVariable::STRING_VAR); + } + else + _corba_impl->SetStringAsDouble((char*)theVarName.c_str(),theValue); +} + +double SALOMEDS_Study::GetReal(const std::string& theVarName) { double aResult; if (_isLocal) { @@ -729,7 +755,7 @@ double SALOMEDS_Study::GetReal(const string& theVarName) return aResult; } -int SALOMEDS_Study::GetInteger(const string& theVarName) +int SALOMEDS_Study::GetInteger(const std::string& theVarName) { int aResult; if (_isLocal) { @@ -741,7 +767,7 @@ int SALOMEDS_Study::GetInteger(const string& theVarName) return aResult; } -bool SALOMEDS_Study::GetBoolean(const string& theVarName) +bool SALOMEDS_Study::GetBoolean(const std::string& theVarName) { bool aResult; if (_isLocal) { @@ -753,7 +779,19 @@ bool SALOMEDS_Study::GetBoolean(const string& theVarName) return aResult; } -bool SALOMEDS_Study::IsReal(const string& theVarName) +std::string SALOMEDS_Study::GetString(const std::string& theVarName) +{ + std::string aResult; + if (_isLocal) { + SALOMEDS::Locker lock; + aResult = _local_impl->GetStringVariableValue(theVarName); + } + else + aResult = _corba_impl->GetString((char*)theVarName.c_str()); + return aResult; +} + +bool SALOMEDS_Study::IsReal(const std::string& theVarName) { bool aResult; if (_isLocal) { @@ -766,7 +804,7 @@ bool SALOMEDS_Study::IsReal(const string& theVarName) return aResult; } -bool SALOMEDS_Study::IsInteger(const string& theVarName) +bool SALOMEDS_Study::IsInteger(const std::string& theVarName) { bool aResult; if (_isLocal) { @@ -779,7 +817,7 @@ bool SALOMEDS_Study::IsInteger(const string& theVarName) return aResult; } -bool SALOMEDS_Study::IsBoolean(const string& theVarName) +bool SALOMEDS_Study::IsBoolean(const std::string& theVarName) { bool aResult; if (_isLocal) { @@ -792,7 +830,20 @@ bool SALOMEDS_Study::IsBoolean(const string& theVarName) return aResult; } -bool SALOMEDS_Study::IsVariable(const string& theVarName) +bool SALOMEDS_Study::IsString(const std::string& theVarName) +{ + bool aResult; + if (_isLocal) { + SALOMEDS::Locker lock; + aResult = _local_impl->IsTypeOf(theVarName, + SALOMEDSImpl_GenericVariable::STRING_VAR); + } + else + aResult = _corba_impl->IsString((char*)theVarName.c_str()); + return aResult; +} + +bool SALOMEDS_Study::IsVariable(const std::string& theVarName) { bool aResult; if (_isLocal) { @@ -804,9 +855,9 @@ bool SALOMEDS_Study::IsVariable(const string& theVarName) return aResult; } -vector SALOMEDS_Study::GetVariableNames() +std::vector SALOMEDS_Study::GetVariableNames() { - vector aVector; + std::vector aVector; if (_isLocal) { SALOMEDS::Locker lock; aVector = _local_impl->GetVariableNames(); @@ -815,12 +866,12 @@ vector SALOMEDS_Study::GetVariableNames() SALOMEDS::ListOfStrings_var aSeq = _corba_impl->GetVariableNames(); int aLength = aSeq->length(); for (int i = 0; i < aLength; i++) - aVector.push_back( string(aSeq[i].in()) ); + aVector.push_back( std::string(aSeq[i].in()) ); } return aVector; } -bool SALOMEDS_Study::RemoveVariable(const string& theVarName) +bool SALOMEDS_Study::RemoveVariable(const std::string& theVarName) { bool aResult; if (_isLocal) { @@ -832,7 +883,7 @@ bool SALOMEDS_Study::RemoveVariable(const string& theVarName) return aResult; } -bool SALOMEDS_Study::RenameVariable(const string& theVarName, const string& theNewVarName) +bool SALOMEDS_Study::RenameVariable(const std::string& theVarName, const std::string& theNewVarName) { bool aResult; if (_isLocal) { @@ -844,7 +895,7 @@ bool SALOMEDS_Study::RenameVariable(const string& theVarName, const string& theN return aResult; } -bool SALOMEDS_Study::IsVariableUsed(const string& theVarName) +bool SALOMEDS_Study::IsVariableUsed(const std::string& theVarName) { bool aResult; if (_isLocal) { @@ -856,9 +907,9 @@ bool SALOMEDS_Study::IsVariableUsed(const string& theVarName) return aResult; } -vector< vector > SALOMEDS_Study::ParseVariables(const string& theVars) +std::vector< std::vector > SALOMEDS_Study::ParseVariables(const std::string& theVars) { - vector< vector > aResult; + std::vector< std::vector > aResult; if (_isLocal) { SALOMEDS::Locker lock; aResult = _local_impl->ParseVariables(theVars); @@ -866,10 +917,10 @@ vector< vector > SALOMEDS_Study::ParseVariables(const string& theVars) else { SALOMEDS::ListOfListOfStrings_var aSeq = _corba_impl->ParseVariables(theVars.c_str()); for (int i = 0, n = aSeq->length(); i < n; i++) { - vector aVector; + std::vector aVector; SALOMEDS::ListOfStrings aSection = aSeq[i]; for (int j = 0, m = aSection.length(); j < m; j++) { - aVector.push_back( string(aSection[j].in()) ); + aVector.push_back( std::string(aSection[j].in()) ); } aResult.push_back( aVector ); } @@ -921,7 +972,7 @@ SALOMEDS::Study_ptr SALOMEDS_Study::GetStudy() } -_PTR(AttributeParameter) SALOMEDS_Study::GetCommonParameters(const string& theID, int theSavePoint) +_PTR(AttributeParameter) SALOMEDS_Study::GetCommonParameters(const std::string& theID, int theSavePoint) { SALOMEDSClient_AttributeParameter* AP = NULL; if(theSavePoint >= 0) { @@ -936,8 +987,8 @@ _PTR(AttributeParameter) SALOMEDS_Study::GetCommonParameters(const string& theID return _PTR(AttributeParameter)(AP); } -_PTR(AttributeParameter) SALOMEDS_Study::GetModuleParameters(const string& theID, - const string& theModuleName, int theSavePoint) +_PTR(AttributeParameter) SALOMEDS_Study::GetModuleParameters(const std::string& theID, + const std::string& theModuleName, int theSavePoint) { SALOMEDSClient_AttributeParameter* AP = NULL; if(theSavePoint > 0) { @@ -951,3 +1002,9 @@ _PTR(AttributeParameter) SALOMEDS_Study::GetModuleParameters(const string& theID } return _PTR(AttributeParameter)(AP); } + +void SALOMEDS_Study::attach(SALOMEDS::Observer_ptr theObserver,bool modify) +{ + if(CORBA::is_nil(_corba_impl)) GetStudy(); //If CORBA implementation is null then retrieve it + _corba_impl->attach(theObserver,modify); +} diff --git a/src/SALOMEDS/SALOMEDS_Study.hxx b/src/SALOMEDS/SALOMEDS_Study.hxx index d6784b0ec..3e0c43498 100644 --- a/src/SALOMEDS/SALOMEDS_Study.hxx +++ b/src/SALOMEDS/SALOMEDS_Study.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_Study.hxx // Author : Sergey RUIN // Module : SALOME @@ -89,10 +90,10 @@ public: virtual _PTR(UseCaseBuilder) GetUseCaseBuilder(); virtual void Close(); virtual void EnableUseCaseAutoFilling(bool isEnabled); - virtual bool DumpStudy(const std::string& thePath,const std::string& theBaseName,bool isPublished); + virtual bool DumpStudy(const std::string& thePath,const std::string& theBaseName,bool isPublished,bool isMultiFile); virtual _PTR(AttributeParameter) GetCommonParameters(const std::string& theID, int theSavePoint); virtual _PTR(AttributeParameter) GetModuleParameters(const std::string& theID, - const std::string& theModuleName, int theSavePoint); + const std::string& theModuleName, int theSavePoint); virtual void SetStudyLock(const std::string& theLockerID); virtual bool IsStudyLocked(); virtual void UnLockStudy(const std::string& theLockerID); @@ -101,14 +102,18 @@ public: virtual void SetReal(const std::string& theVarName, const double theValue); virtual void SetInteger(const std::string& theVarName, const int theValue); virtual void SetBoolean(const std::string& theVarName, const bool theValue); + virtual void SetString(const std::string& theVarName, const std::string& theValue); + virtual void SetStringAsDouble(const std::string& theVarName, const double theValue); virtual double GetReal(const std::string& theVarName); virtual int GetInteger(const std::string& theVarName); virtual bool GetBoolean(const std::string& theVarName); + virtual std::string GetString(const std::string& theVarName); virtual bool IsReal(const std::string& theVarName); virtual bool IsInteger(const std::string& theVarName); virtual bool IsBoolean(const std::string& theVarName); + virtual bool IsString(const std::string& theVarName); virtual bool IsVariable(const std::string& theVarName); virtual std::vector GetVariableNames(); @@ -117,6 +122,7 @@ public: virtual bool RenameVariable(const std::string& theVarName, const std::string& theNewVarName); virtual bool IsVariableUsed(const std::string& theVarName); virtual std::vector< std::vector > ParseVariables(const std::string& theVars); + virtual void attach(SALOMEDS::Observer_ptr theObserver,bool modify); std::string ConvertObjectToIOR(CORBA::Object_ptr theObject); CORBA::Object_ptr ConvertIORToObject(const std::string& theIOR); diff --git a/src/SALOMEDS/SALOMEDS_StudyBuilder.cxx b/src/SALOMEDS/SALOMEDS_StudyBuilder.cxx index 49670e54c..5e54ef02e 100644 --- a/src/SALOMEDS/SALOMEDS_StudyBuilder.cxx +++ b/src/SALOMEDS/SALOMEDS_StudyBuilder.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_StudyBuilder.cxx // Author : Sergey RUIN // Module : SALOME @@ -49,8 +50,6 @@ #include "Utils_ORB_INIT.hxx" #include "Utils_SINGLETON.hxx" -using namespace std; - SALOMEDS_StudyBuilder::SALOMEDS_StudyBuilder(SALOMEDSImpl_StudyBuilder* theBuilder) { _isLocal = true; @@ -95,7 +94,7 @@ _PTR(SComponent) SALOMEDS_StudyBuilder::NewComponent(const std::string& Componen } void SALOMEDS_StudyBuilder::DefineComponentInstance (const _PTR(SComponent)& theSCO, - const std::string& ComponentIOR) + const std::string& ComponentIOR) { if(!theSCO) return; @@ -248,7 +247,7 @@ void SALOMEDS_StudyBuilder::RemoveObjectWithChildren(const _PTR(SObject)& theSO) } _PTR(GenericAttribute) SALOMEDS_StudyBuilder::FindOrCreateAttribute(const _PTR(SObject)& theSO, - const std::string& aTypeOfAttribute) + const std::string& aTypeOfAttribute) { SALOMEDSClient_GenericAttribute* anAttr = NULL; if(!theSO) return _PTR(GenericAttribute)(anAttr); @@ -276,8 +275,8 @@ _PTR(GenericAttribute) SALOMEDS_StudyBuilder::FindOrCreateAttribute(const _PTR(S } bool SALOMEDS_StudyBuilder::FindAttribute(const _PTR(SObject)& theSO, - _PTR(GenericAttribute)& anAttribute, - const std::string& aTypeOfAttribute) + _PTR(GenericAttribute)& anAttribute, + const std::string& aTypeOfAttribute) { bool ret; diff --git a/src/SALOMEDS/SALOMEDS_StudyBuilder.hxx b/src/SALOMEDS/SALOMEDS_StudyBuilder.hxx index 5af81a374..273d55d85 100644 --- a/src/SALOMEDS/SALOMEDS_StudyBuilder.hxx +++ b/src/SALOMEDS/SALOMEDS_StudyBuilder.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_StudyBuilder.hxx // Author : Sergey RUIN // Module : SALOME @@ -60,10 +61,10 @@ public: virtual void RemoveObject(const _PTR(SObject)& theSO); virtual void RemoveObjectWithChildren(const _PTR(SObject)& theSO); virtual _PTR(GenericAttribute) FindOrCreateAttribute(const _PTR(SObject)& theSO, - const std::string& aTypeOfAttribute); + const std::string& aTypeOfAttribute); virtual bool FindAttribute(const _PTR(SObject)& theSO, _PTR(GenericAttribute)& theAttribute, - const std::string& aTypeOfAttribute); + const std::string& aTypeOfAttribute); virtual void RemoveAttribute(const _PTR(SObject)& theSO, const std::string& aTypeOfAttribute); virtual void Addreference(const _PTR(SObject)& me, const _PTR(SObject)& thereferencedObject); virtual void RemoveReference(const _PTR(SObject)& me); diff --git a/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx b/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx index 4f6cb0596..c6a323224 100644 --- a/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx +++ b/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_StudyBuilder_i.cxx // Author : Seregy RUIN // Module : SALOME @@ -43,8 +44,6 @@ #include #include -using namespace std; - UNEXPECT_CATCH(SBSalomeException, SALOME::SALOME_Exception); UNEXPECT_CATCH(SBLockProtection, SALOMEDS::StudyBuilder::LockProtection); @@ -54,7 +53,7 @@ UNEXPECT_CATCH(SBLockProtection, SALOMEDS::StudyBuilder::LockProtection); */ //============================================================================ SALOMEDS_StudyBuilder_i::SALOMEDS_StudyBuilder_i(SALOMEDSImpl_StudyBuilder* theImpl, - CORBA::ORB_ptr orb) + CORBA::ORB_ptr orb) { _orb = CORBA::ORB::_duplicate(orb); _impl = theImpl; @@ -78,7 +77,7 @@ SALOMEDS::SComponent_ptr SALOMEDS_StudyBuilder_i::NewComponent(const char* DataT SALOMEDS::Locker lock; CheckLocked(); //char* aDataType = CORBA::string_dup(DataType); - SALOMEDSImpl_SComponent aSCO = _impl->NewComponent(string(DataType)); + SALOMEDSImpl_SComponent aSCO = _impl->NewComponent(std::string(DataType)); //CORBA::free_string(aDataType); if(aSCO.IsNull()) return SALOMEDS::SComponent::_nil(); @@ -92,11 +91,12 @@ SALOMEDS::SComponent_ptr SALOMEDS_StudyBuilder_i::NewComponent(const char* DataT */ //============================================================================ void SALOMEDS_StudyBuilder_i::DefineComponentInstance(SALOMEDS::SComponent_ptr aComponent, - CORBA::Object_ptr IOR) + CORBA::Object_ptr IOR) { SALOMEDS::Locker lock; CheckLocked(); - SALOMEDSImpl_SComponent aSCO = _impl->GetOwner()->GetSComponent(aComponent->GetID()); + CORBA::String_var anID=aComponent->GetID(); + SALOMEDSImpl_SComponent aSCO = _impl->GetOwner()->GetSComponent(anID.in()); CORBA::String_var iorstr = _orb->object_to_string(IOR); _impl->DefineComponentInstance(aSCO, (char*)iorstr.in()); @@ -112,7 +112,8 @@ void SALOMEDS_StudyBuilder_i::RemoveComponent(SALOMEDS::SComponent_ptr aComponen SALOMEDS::Locker lock; CheckLocked(); ASSERT(!CORBA::is_nil(aComponent)); - SALOMEDSImpl_SComponent aSCO = _impl->GetOwner()->GetSComponent(aComponent->GetID()); + CORBA::String_var cid=aComponent->GetID(); + SALOMEDSImpl_SComponent aSCO = _impl->GetOwner()->GetSComponent(cid.in()); _impl->RemoveComponent(aSCO); } @@ -127,7 +128,8 @@ SALOMEDS::SObject_ptr SALOMEDS_StudyBuilder_i::NewObject(SALOMEDS::SObject_ptr t CheckLocked(); SALOMEDSImpl_SObject aFO, aSO; - aFO = _impl->GetOwner()->GetSObject(theFatherObject->GetID()); + CORBA::String_var anID=theFatherObject->GetID(); + aFO = _impl->GetOwner()->GetSObject(anID.in()); aSO = _impl->NewObject(aFO); if(aSO.IsNull()) return SALOMEDS::SObject::_nil(); SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (aSO,_orb); @@ -141,7 +143,7 @@ SALOMEDS::SObject_ptr SALOMEDS_StudyBuilder_i::NewObject(SALOMEDS::SObject_ptr t */ //============================================================================ SALOMEDS::SObject_ptr SALOMEDS_StudyBuilder_i::NewObjectToTag(SALOMEDS::SObject_ptr theFatherObject, - CORBA::Long atag) + CORBA::Long atag) { SALOMEDS::Locker lock; CheckLocked(); @@ -162,7 +164,8 @@ void SALOMEDS_StudyBuilder_i::RemoveObject(SALOMEDS::SObject_ptr anObject) { SALOMEDS::Locker lock; CheckLocked(); - SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anObject->GetID()); + CORBA::String_var anID=anObject->GetID(); + SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anID.in()); _impl->RemoveObject(aSO); } @@ -175,7 +178,8 @@ void SALOMEDS_StudyBuilder_i::RemoveObjectWithChildren(SALOMEDS::SObject_ptr anO { SALOMEDS::Locker lock; CheckLocked(); - SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anObject->GetID()); + CORBA::String_var anID=anObject->GetID(); + SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anID.in()); _impl->RemoveObjectWithChildren(aSO); } @@ -185,12 +189,13 @@ void SALOMEDS_StudyBuilder_i::RemoveObjectWithChildren(SALOMEDS::SObject_ptr anO */ //============================================================================ void SALOMEDS_StudyBuilder_i::LoadWith(SALOMEDS::SComponent_ptr anSCO, - SALOMEDS::Driver_ptr aDriver) throw(SALOME::SALOME_Exception) + SALOMEDS::Driver_ptr aDriver) throw(SALOME::SALOME_Exception) { SALOMEDS::Locker lock; Unexpect aCatch(SBSalomeException); - SALOMEDSImpl_SComponent aSCO = _impl->GetOwner()->GetSComponent(anSCO->GetID()); + CORBA::String_var anID=anSCO->GetID(); + SALOMEDSImpl_SComponent aSCO = _impl->GetOwner()->GetSComponent(anID.in()); SALOMEDS_Driver_i* driver = new SALOMEDS_Driver_i(aDriver, _orb); bool isDone = _impl->LoadWith(aSCO, driver); delete driver; @@ -218,14 +223,14 @@ void SALOMEDS_StudyBuilder_i::Load(SALOMEDS::SObject_ptr sco) */ //============================================================================ SALOMEDS::GenericAttribute_ptr SALOMEDS_StudyBuilder_i::FindOrCreateAttribute(SALOMEDS::SObject_ptr anObject, - const char* aTypeOfAttribute) + const char* aTypeOfAttribute) { SALOMEDS::Locker lock; CORBA::String_var anID = anObject->GetID(); SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anID.inout()); DF_Attribute* anAttr; try { - anAttr = _impl->FindOrCreateAttribute(aSO, string(aTypeOfAttribute)); + anAttr = _impl->FindOrCreateAttribute(aSO, std::string(aTypeOfAttribute)); } catch (...) { throw SALOMEDS::StudyBuilder::LockProtection(); @@ -234,7 +239,7 @@ SALOMEDS::GenericAttribute_ptr SALOMEDS_StudyBuilder_i::FindOrCreateAttribute(SA SALOMEDS::GenericAttribute_var anAttribute; if(anAttr) - anAttribute = SALOMEDS::GenericAttribute::_duplicate(SALOMEDS_GenericAttribute_i::CreateAttribute(anAttr, _orb)); + anAttribute = SALOMEDS_GenericAttribute_i::CreateAttribute(anAttr, _orb); return anAttribute._retn(); } @@ -246,17 +251,18 @@ SALOMEDS::GenericAttribute_ptr SALOMEDS_StudyBuilder_i::FindOrCreateAttribute(SA //============================================================================ CORBA::Boolean SALOMEDS_StudyBuilder_i::FindAttribute(SALOMEDS::SObject_ptr anObject, - SALOMEDS::GenericAttribute_out anAttribute, - const char* aTypeOfAttribute) + SALOMEDS::GenericAttribute_out anAttribute, + const char* aTypeOfAttribute) { SALOMEDS::Locker lock; ASSERT(!CORBA::is_nil(anObject)); - SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anObject->GetID()); + CORBA::String_var anID = anObject->GetID(); + SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anID.in()); DF_Attribute* anAttr; - if(!_impl->FindAttribute(aSO, anAttr, string(aTypeOfAttribute))) return false; + if(!_impl->FindAttribute(aSO, anAttr, std::string(aTypeOfAttribute))) return false; - anAttribute = SALOMEDS::GenericAttribute::_duplicate(SALOMEDS_GenericAttribute_i::CreateAttribute(anAttr, _orb)); + anAttribute = SALOMEDS_GenericAttribute_i::CreateAttribute(anAttr, _orb); return true; } @@ -267,13 +273,14 @@ CORBA::Boolean SALOMEDS_StudyBuilder_i::FindAttribute(SALOMEDS::SObject_ptr anOb //============================================================================ void SALOMEDS_StudyBuilder_i::RemoveAttribute(SALOMEDS::SObject_ptr anObject, - const char* aTypeOfAttribute) + const char* aTypeOfAttribute) { SALOMEDS::Locker lock; CheckLocked(); ASSERT(!CORBA::is_nil(anObject)); - SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anObject->GetID()); - _impl->RemoveAttribute(aSO, string(aTypeOfAttribute)); + CORBA::String_var anID = anObject->GetID(); + SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anID.in()); + _impl->RemoveAttribute(aSO, std::string(aTypeOfAttribute)); } //============================================================================ @@ -282,7 +289,7 @@ void SALOMEDS_StudyBuilder_i::RemoveAttribute(SALOMEDS::SObject_ptr anObject, */ //============================================================================ void SALOMEDS_StudyBuilder_i::Addreference(SALOMEDS::SObject_ptr me, - SALOMEDS::SObject_ptr theReferencedObject) + SALOMEDS::SObject_ptr theReferencedObject) { SALOMEDS::Locker lock; CheckLocked(); @@ -290,8 +297,10 @@ void SALOMEDS_StudyBuilder_i::Addreference(SALOMEDS::SObject_ptr me, ASSERT(!CORBA::is_nil(theReferencedObject)); SALOMEDSImpl_SObject aSO, aRefSO; - aSO = _impl->GetOwner()->GetSObject(me->GetID()); - aRefSO = _impl->GetOwner()->GetSObject(theReferencedObject->GetID()); + CORBA::String_var anID = me->GetID(); + aSO = _impl->GetOwner()->GetSObject(anID.in()); + anID=theReferencedObject->GetID(); + aRefSO = _impl->GetOwner()->GetSObject(anID.in()); _impl->Addreference(aSO, aRefSO); } @@ -305,7 +314,8 @@ void SALOMEDS_StudyBuilder_i::RemoveReference(SALOMEDS::SObject_ptr me) SALOMEDS::Locker lock; CheckLocked(); ASSERT(!CORBA::is_nil(me)); - SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(me->GetID()); + CORBA::String_var anID = me->GetID(); + SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anID.in()); _impl->RemoveReference(aSO); } @@ -320,8 +330,8 @@ void SALOMEDS_StudyBuilder_i::AddDirectory(const char* thePath) SALOMEDS::Locker lock; CheckLocked(); if(thePath == NULL || strlen(thePath) == 0) throw SALOMEDS::Study::StudyInvalidDirectory(); - if(!_impl->AddDirectory(string(thePath))) { - string anErrorCode = _impl->GetErrorCode(); + if(!_impl->AddDirectory(std::string(thePath))) { + std::string anErrorCode = _impl->GetErrorCode(); if(anErrorCode == "StudyNameAlreadyUsed") throw SALOMEDS::Study::StudyNameAlreadyUsed(); if(anErrorCode == "StudyInvalidDirectory") throw SALOMEDS::Study::StudyInvalidDirectory(); if(anErrorCode == "StudyInvalidComponent") throw SALOMEDS::Study::StudyInvalidComponent(); @@ -339,8 +349,9 @@ void SALOMEDS_StudyBuilder_i::SetGUID(SALOMEDS::SObject_ptr anObject, const char SALOMEDS::Locker lock; CheckLocked(); ASSERT(!CORBA::is_nil(anObject)); - SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anObject->GetID()); - _impl->SetGUID(aSO, string(theGUID)); + CORBA::String_var anID=anObject->GetID(); + SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anID.in()); + _impl->SetGUID(aSO, std::string(theGUID)); } //============================================================================ @@ -352,8 +363,9 @@ bool SALOMEDS_StudyBuilder_i::IsGUID(SALOMEDS::SObject_ptr anObject, const char* { SALOMEDS::Locker lock; ASSERT(!CORBA::is_nil(anObject)); - SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anObject->GetID()); - return _impl->IsGUID(aSO, string(theGUID)); + CORBA::String_var anID=anObject->GetID(); + SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anID.in()); + return _impl->IsGUID(aSO, std::string(theGUID)); } @@ -518,8 +530,9 @@ void SALOMEDS_StudyBuilder_i::SetName(SALOMEDS::SObject_ptr theSO, const char* t Unexpect aCatch(SBLockProtection); CheckLocked(); - SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(theSO->GetID()); - _impl->SetName(aSO, string(theValue)); + CORBA::String_var anID=theSO->GetID(); + SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anID.in()); + _impl->SetName(aSO, std::string(theValue)); } //============================================================================ @@ -534,8 +547,9 @@ void SALOMEDS_StudyBuilder_i::SetComment(SALOMEDS::SObject_ptr theSO, const char Unexpect aCatch(SBLockProtection); CheckLocked(); - SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(theSO->GetID()); - _impl->SetComment(aSO, string(theValue)); + CORBA::String_var anID=theSO->GetID(); + SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anID.in()); + _impl->SetComment(aSO, std::string(theValue)); } //============================================================================ @@ -550,6 +564,7 @@ void SALOMEDS_StudyBuilder_i::SetIOR(SALOMEDS::SObject_ptr theSO, const char* th Unexpect aCatch(SBLockProtection); CheckLocked(); - SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(theSO->GetID()); - _impl->SetIOR(aSO, string(theValue)); + CORBA::String_var anID=theSO->GetID(); + SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anID.in()); + _impl->SetIOR(aSO, std::string(theValue)); } diff --git a/src/SALOMEDS/SALOMEDS_StudyBuilder_i.hxx b/src/SALOMEDS/SALOMEDS_StudyBuilder_i.hxx index 99d0a3af4..0681e7d4c 100644 --- a/src/SALOMEDS/SALOMEDS_StudyBuilder_i.hxx +++ b/src/SALOMEDS/SALOMEDS_StudyBuilder_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_StudyBuilder_i.hxx // Author : Sergey RUIN // Module : SALOME @@ -39,7 +40,7 @@ class SALOMEDS_StudyBuilder_i: public POA_SALOMEDS::StudyBuilder { private: - CORBA::ORB_ptr _orb; + CORBA::ORB_var _orb; SALOMEDSImpl_StudyBuilder* _impl; public: @@ -57,7 +58,7 @@ public: //! DefineComponentInstance /*! \param SComponent_ptr - \param ComponentIOR + \param ComponentIOR */ virtual void DefineComponentInstance (SALOMEDS::SComponent_ptr, CORBA::Object_ptr ComponentIOR); @@ -65,7 +66,7 @@ public: /*! - \param aComponent + \param aComponent */ virtual void RemoveComponent(SALOMEDS::SComponent_ptr aComponent); diff --git a/src/SALOMEDS/SALOMEDS_StudyManager.cxx b/src/SALOMEDS/SALOMEDS_StudyManager.cxx index 76ab7d253..813d0820e 100644 --- a/src/SALOMEDS/SALOMEDS_StudyManager.cxx +++ b/src/SALOMEDS/SALOMEDS_StudyManager.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_StudyManager.cxx // Author : Sergey RUIN // Module : SALOME @@ -45,8 +46,6 @@ #include #endif -using namespace std; - SALOMEDS_Driver_i* GetDriver(const SALOMEDSImpl_SObject& theObject, CORBA::ORB_ptr orb); SALOMEDS_StudyManager::SALOMEDS_StudyManager(SALOMEDS::StudyManager_ptr theManager) @@ -169,7 +168,7 @@ std::vector SALOMEDS_StudyManager::GetOpenStudies() if (_isLocal) { SALOMEDS::Locker lock; - vector aSeq = _local_impl->GetOpenStudies(); + std::vector aSeq = _local_impl->GetOpenStudies(); aLength = aSeq.size(); for(i = 0; i < aLength; i++) aVector.push_back(aSeq[i]->Name()); @@ -315,7 +314,7 @@ SALOMEDS_Driver_i* GetDriver(const SALOMEDSImpl_SObject& theObject, CORBA::ORB_p SALOMEDSImpl_SComponent aSCO = theObject.GetFatherComponent(); if(!aSCO.IsNull()) { - string IOREngine = aSCO.GetIOR(); + std::string IOREngine = aSCO.GetIOR(); if(!IOREngine.empty()) { CORBA::Object_var obj = orb->string_to_object(IOREngine.c_str()); SALOMEDS::Driver_var Engine = SALOMEDS::Driver::_narrow(obj) ; diff --git a/src/SALOMEDS/SALOMEDS_StudyManager.hxx b/src/SALOMEDS/SALOMEDS_StudyManager.hxx index e7b657cd9..b48175bf7 100644 --- a/src/SALOMEDS/SALOMEDS_StudyManager.hxx +++ b/src/SALOMEDS/SALOMEDS_StudyManager.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_StudyManager.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_StudyManager_i.cxx b/src/SALOMEDS/SALOMEDS_StudyManager_i.cxx index 63bd4acd8..c26919c8e 100644 --- a/src/SALOMEDS/SALOMEDS_StudyManager_i.cxx +++ b/src/SALOMEDS/SALOMEDS_StudyManager_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_StudyManager_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -41,7 +42,7 @@ #include "Basics_Utils.hxx" #include "SALOME_GenericObj_i.hh" -#include +#include #include #include @@ -52,8 +53,6 @@ #include #endif -using namespace std; - UNEXPECT_CATCH(SalomeException,SALOME::SALOME_Exception); UNEXPECT_CATCH(LockProtection, SALOMEDS::StudyBuilder::LockProtection); @@ -122,8 +121,9 @@ SALOMEDS::Study_ptr SALOMEDS_StudyManager_i::NewStudy(const char* study_name) MESSAGE("NewStudy : Creating the CORBA servant holding it... "); - SALOMEDS_Study_i *Study_servant = new SALOMEDS_Study_i(aStudyImpl, _orb); - SALOMEDS::Study_var Study = SALOMEDS::Study::_narrow(Study_servant->_this()); + SALOMEDS_Study_i *Study_servant = SALOMEDS_Study_i::GetStudyServant(aStudyImpl, _orb); + PortableServer::ObjectId_var servantid = _poa->activate_object(Study_servant); // to use poa registered in _mapOfPOA + SALOMEDS::Study_var Study = Study_servant->_this(); // Register study in the naming service // Path to acces the study @@ -139,7 +139,7 @@ SALOMEDS::Study_ptr SALOMEDS_StudyManager_i::NewStudy(const char* study_name) _mapOfPOA[Study->StudyId()] = _poa; - return Study; + return Study._retn(); } //============================================================================ @@ -155,7 +155,7 @@ SALOMEDS::Study_ptr SALOMEDS_StudyManager_i::Open(const char* aUrl) Unexpect aCatch(SalomeException); MESSAGE("Begin of SALOMEDS_StudyManager_i::Open"); - SALOMEDSImpl_Study* aStudyImpl = _impl->Open(string(aUrl)); + SALOMEDSImpl_Study* aStudyImpl = _impl->Open(std::string(aUrl)); if ( !aStudyImpl ) THROW_SALOME_CORBA_EXCEPTION("Impossible to Open study from file", SALOME::BAD_PARAM) @@ -163,19 +163,22 @@ SALOMEDS::Study_ptr SALOMEDS_StudyManager_i::Open(const char* aUrl) MESSAGE("Open : Creating the CORBA servant holding it... "); // Temporary aStudyUrl in place of study name - SALOMEDS_Study_i * Study_servant = new SALOMEDS_Study_i(aStudyImpl, _orb); - SALOMEDS::Study_var Study = SALOMEDS::Study::_narrow(Study_servant->_this()); + SALOMEDS_Study_i * Study_servant = SALOMEDS_Study_i::GetStudyServant(aStudyImpl, _orb); + PortableServer::ObjectId_var servantid = _poa->activate_object(Study_servant); // to use poa register in _mapOfPOA + SALOMEDS::Study_var Study = Study_servant->_this(); // Assign the value of the IOR in the study->root CORBA::String_var IORStudy = _orb->object_to_string(Study); aStudyImpl->SetTransientReference((char*)IORStudy.in()); + _mapOfPOA[Study->StudyId()] = _poa; + // Register study in the naming service // Path to acces the study if(!_name_service->Change_Directory("/Study")) MESSAGE( "Unable to access the study directory" ) else _name_service->Register(Study, CORBA::string_dup(aStudyImpl->Name().c_str())); - return Study; + return Study._retn(); } @@ -202,6 +205,14 @@ void SALOMEDS_StudyManager_i::Close(SALOMEDS::Study_ptr aStudy) SALOMEDS::unlock(); aStudy->Close(); SALOMEDS::lock(); + + //remove study servant + PortableServer::POA_ptr poa=GetPOA(aStudy); + PortableServer::ServantBase* aservant=poa->reference_to_servant(aStudy); + PortableServer::ObjectId_var anObjectId = poa->servant_to_id(aservant); + poa->deactivate_object(anObjectId.in()); + aservant->_remove_ref(); // decrement for the call to reference_to_servant + aservant->_remove_ref(); // to delete the object } //============================================================================ @@ -250,7 +261,7 @@ CORBA::Boolean SALOMEDS_StudyManager_i::SaveAs(const char* aUrl, SALOMEDS::Study } SALOMEDSImpl_Study* aStudyImpl = _impl->GetStudyByID(aStudy->StudyId()); - return _impl->SaveAs(string(aUrl), aStudyImpl, _factory, theMultiFile); + return _impl->SaveAs(std::string(aUrl), aStudyImpl, _factory, theMultiFile); } CORBA::Boolean SALOMEDS_StudyManager_i::SaveAsASCII(const char* aUrl, SALOMEDS::Study_ptr aStudy, CORBA::Boolean theMultiFile) @@ -263,7 +274,7 @@ CORBA::Boolean SALOMEDS_StudyManager_i::SaveAsASCII(const char* aUrl, SALOMEDS:: } SALOMEDSImpl_Study* aStudyImpl = _impl->GetStudyByID(aStudy->StudyId()); - return _impl->SaveAsASCII(string(aUrl), aStudyImpl, _factory, theMultiFile); + return _impl->SaveAsASCII(std::string(aUrl), aStudyImpl, _factory, theMultiFile); } //============================================================================ @@ -275,7 +286,7 @@ SALOMEDS::ListOfOpenStudies* SALOMEDS_StudyManager_i::GetOpenStudies() { SALOMEDS::Locker lock; - vector anOpened = _impl->GetOpenStudies(); + std::vector anOpened = _impl->GetOpenStudies(); int aLength = anOpened.size(); SALOMEDS::ListOfOpenStudies_var _list_open_studies = new SALOMEDS::ListOfOpenStudies; @@ -288,10 +299,10 @@ SALOMEDS::ListOfOpenStudies* SALOMEDS_StudyManager_i::GetOpenStudies() else { for (unsigned int ind=0; ind < aLength; ind++) - { - _list_open_studies[ind] = CORBA::string_dup(anOpened[ind]->Name().c_str()); - SCRUTE(_list_open_studies[ind]) ; - } + { + _list_open_studies[ind] = CORBA::string_dup(anOpened[ind]->Name().c_str()); + SCRUTE(_list_open_studies[ind]) ; + } } return _list_open_studies._retn(); } @@ -305,7 +316,7 @@ SALOMEDS::Study_ptr SALOMEDS_StudyManager_i::GetStudyByName(const char* aStudyNa { SALOMEDS::Locker lock; - SALOMEDSImpl_Study* aStudyImpl = _impl->GetStudyByName(string(aStudyName)); + SALOMEDSImpl_Study* aStudyImpl = _impl->GetStudyByName(std::string(aStudyName)); if (!aStudyImpl) { @@ -313,10 +324,8 @@ SALOMEDS::Study_ptr SALOMEDS_StudyManager_i::GetStudyByName(const char* aStudyNa return SALOMEDS::Study::_nil(); } - SALOMEDS_Study_i* aStudy_servant = new SALOMEDS_Study_i(aStudyImpl, _orb); - SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow(aStudy_servant->_this()); - - return aStudy._retn(); + SALOMEDS_Study_i* aStudy_servant = SALOMEDS_Study_i::GetStudyServant(aStudyImpl, _orb); + return aStudy_servant->_this(); } //============================================================================ @@ -336,11 +345,8 @@ SALOMEDS::Study_ptr SALOMEDS_StudyManager_i::GetStudyByID(CORBA::Short aStudyID) return SALOMEDS::Study::_nil(); } - SALOMEDS_Study_i* aStudy_servant = new SALOMEDS_Study_i(aStudyImpl, _orb); - CORBA::Object_var obj = aStudy_servant->_this(); - SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow(obj); - - return aStudy._retn(); + SALOMEDS_Study_i* aStudy_servant = SALOMEDS_Study_i::GetStudyServant(aStudyImpl, _orb); + return aStudy_servant->_this(); } @@ -355,7 +361,8 @@ CORBA::Boolean SALOMEDS_StudyManager_i::CanCopy(SALOMEDS::SObject_ptr theObject) SALOMEDS::Study_var aStudy = theObject->GetStudy(); SALOMEDSImpl_Study* aStudyImpl = _impl->GetStudyByID(aStudy->StudyId()); - SALOMEDSImpl_SObject anObject = aStudyImpl->GetSObject(theObject->GetID()); + CORBA::String_var anID = theObject->GetID(); + SALOMEDSImpl_SObject anObject = aStudyImpl->GetSObject(anID.in()); SALOMEDS_Driver_i* aDriver = GetDriver(anObject, _orb); bool ret = _impl->CanCopy(anObject, aDriver); @@ -374,7 +381,8 @@ CORBA::Boolean SALOMEDS_StudyManager_i::Copy(SALOMEDS::SObject_ptr theObject) SALOMEDS::Study_var aStudy = theObject->GetStudy(); SALOMEDSImpl_Study* aStudyImpl = _impl->GetStudyByID(aStudy->StudyId()); - SALOMEDSImpl_SObject anObject = aStudyImpl->GetSObject(theObject->GetID()); + CORBA::String_var anID = theObject->GetID(); + SALOMEDSImpl_SObject anObject = aStudyImpl->GetSObject(anID.in()); SALOMEDS_Driver_i* aDriver = GetDriver(anObject, _orb); bool ret = _impl->Copy(anObject, aDriver); @@ -393,7 +401,8 @@ CORBA::Boolean SALOMEDS_StudyManager_i::CanPaste(SALOMEDS::SObject_ptr theObject SALOMEDS::Study_var aStudy = theObject->GetStudy(); SALOMEDSImpl_Study* aStudyImpl = _impl->GetStudyByID(aStudy->StudyId()); - SALOMEDSImpl_SObject anObject = aStudyImpl->GetSObject(theObject->GetID()); + CORBA::String_var anID = theObject->GetID(); + SALOMEDSImpl_SObject anObject = aStudyImpl->GetSObject(anID.in()); SALOMEDS_Driver_i* aDriver = GetDriver(anObject, _orb); bool ret = _impl->CanPaste(anObject, aDriver); @@ -415,7 +424,8 @@ SALOMEDS::SObject_ptr SALOMEDS_StudyManager_i::Paste(SALOMEDS::SObject_ptr theOb SALOMEDS::Study_var aStudy = theObject->GetStudy(); SALOMEDSImpl_Study* aStudyImpl = _impl->GetStudyByID(aStudy->StudyId()); - SALOMEDSImpl_SObject anObject = aStudyImpl->GetSObject(theObject->GetID()); + CORBA::String_var anID = theObject->GetID(); + SALOMEDSImpl_SObject anObject = aStudyImpl->GetSObject(anID.in()); SALOMEDSImpl_SObject aNewSO; try { @@ -438,7 +448,7 @@ SALOMEDS_Driver_i* GetDriver(const SALOMEDSImpl_SObject& theObject, CORBA::ORB_p SALOMEDSImpl_SComponent aSCO = theObject.GetFatherComponent(); if(!aSCO.IsNull()) { - string IOREngine = aSCO.GetIOR(); + std::string IOREngine = aSCO.GetIOR(); if(!IOREngine.empty()) { CORBA::Object_var obj = orb->string_to_object(IOREngine.c_str()); SALOMEDS::Driver_var Engine = SALOMEDS::Driver::_narrow(obj) ; diff --git a/src/SALOMEDS/SALOMEDS_StudyManager_i.hxx b/src/SALOMEDS/SALOMEDS_StudyManager_i.hxx index 297cac817..5b44f0602 100644 --- a/src/SALOMEDS/SALOMEDS_StudyManager_i.hxx +++ b/src/SALOMEDS/SALOMEDS_StudyManager_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_StudyManager_i.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_Study_i.cxx b/src/SALOMEDS/SALOMEDS_Study_i.cxx index 43ce2d59b..ef483d086 100644 --- a/src/SALOMEDS/SALOMEDS_Study_i.cxx +++ b/src/SALOMEDS/SALOMEDS_Study_i.cxx @@ -1,30 +1,32 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_Study_i.cxx // Author : Sergey RUIN // Module : SALOME // #include "utilities.h" #include "SALOMEDS_Study_i.hxx" +#include "SALOMEDS_StudyManager_i.hxx" #include "SALOMEDS_UseCaseIterator_i.hxx" #include "SALOMEDS_GenericAttribute_i.hxx" #include "SALOMEDS_AttributeStudyProperties_i.hxx" @@ -40,6 +42,7 @@ #include "SALOMEDSImpl_AttributeParameter.hxx" #include "SALOMEDSImpl_ChildIterator.hxx" #include "SALOMEDSImpl_IParameters.hxx" +#include "SALOMEDSImpl_Callback.hxx" #include "DF_Label.hxx" #include "DF_Attribute.hxx" @@ -53,7 +56,88 @@ #include #endif -using namespace std; +class Notifier: public SALOMEDSImpl_AbstractCallback +{ +public: +Notifier(CORBA::ORB_ptr orb) +{ + _orb = CORBA::ORB::_duplicate(orb); +} + +//============================================================================ +/*! Function : addSO_Notification + * Purpose : This function tells all the observers that a SO has been added + */ +//============================================================================ + + virtual bool addSO_Notification(const SALOMEDSImpl_SObject& theSObject) + { + std::string anID=theSObject.GetID(); + const char* cID=anID.c_str(); + for (ObsListIter it (myObservers.begin()); it != myObservers.end(); ++it) + { + it->first->notifyObserverID(cID,1); + } + return true; // NGE return always true but can be modified if needed + } + +//============================================================================ +/*! Function : removeSO_Notification + * Purpose : This function tells all the observers that a SO has been removed + */ +//============================================================================ + + virtual bool removeSO_Notification(const SALOMEDSImpl_SObject& theSObject) + { + std::string anID=theSObject.GetID(); + const char* cID=anID.c_str(); + for (ObsListIter it (myObservers.begin()); it != myObservers.end(); ++it) + { + it->first->notifyObserverID(cID,2); + } + return true; // NGE return always true but can be modified if needed + } + +//============================================================================ +/*! Function : modifySO_Notification + * Purpose : This function tells all the observers that a SO has been modified + */ +//============================================================================ + + virtual bool modifySO_Notification(const SALOMEDSImpl_SObject& theSObject, int reason) + { + for (ObsListIter it (myObservers.begin()); it != myObservers.end(); ++it) + { + if(it->second) + { + std::string anID=theSObject.GetID(); + const char* cID=anID.c_str(); + it->first->notifyObserverID(cID,reason); + } + } + return true; // NGE return always true but can be modified if needed + } + +//============================================================================ +/*! Function : attach + * Purpose : register an Observer + */ +//============================================================================ + + virtual void attach(SALOMEDS::Observer_ptr theObs, bool modify) + { + myObservers.push_back(std::pair< SALOMEDS::Observer_var, bool > (SALOMEDS::Observer::_duplicate(theObs),modify)); + } + +private: + typedef std::list< std::pair< SALOMEDS::Observer_var, bool > > ObsList; + typedef ObsList::iterator ObsListIter; + ObsList myObservers; + CORBA::ORB_var _orb; +}; + + +std::map SALOMEDS_Study_i::_mapOfStudies; //============================================================================ /*! Function : SALOMEDS_Study_i @@ -61,10 +145,12 @@ using namespace std; */ //============================================================================ SALOMEDS_Study_i::SALOMEDS_Study_i(SALOMEDSImpl_Study* theImpl, - CORBA::ORB_ptr orb) + CORBA::ORB_ptr orb) { _orb = CORBA::ORB::_duplicate(orb); _impl = theImpl; + _notifier = new Notifier(_orb); + theImpl->setNotifier(_notifier); _builder = new SALOMEDS_StudyBuilder_i(_impl->NewBuilder(), _orb); } @@ -76,6 +162,15 @@ SALOMEDS_Study_i::SALOMEDS_Study_i(SALOMEDSImpl_Study* theImpl, //============================================================================ SALOMEDS_Study_i::~SALOMEDS_Study_i() { + //delete the builder servant + PortableServer::POA_var poa=_builder->_default_POA(); + PortableServer::ObjectId_var anObjectId = poa->servant_to_id(_builder); + poa->deactivate_object(anObjectId.in()); + _builder->_remove_ref(); + + //delete implementation + delete _impl; + _mapOfStudies.erase(_impl); } //============================================================================ @@ -119,7 +214,7 @@ SALOMEDS::SComponent_ptr SALOMEDS_Study_i::FindComponent (const char* aComponent { SALOMEDS::Locker lock; - SALOMEDSImpl_SComponent aCompImpl = _impl->FindComponent(string(aComponentName)); + SALOMEDSImpl_SComponent aCompImpl = _impl->FindComponent(std::string(aComponentName)); if(aCompImpl.IsNull()) return SALOMEDS::SComponent::_nil(); SALOMEDS::SComponent_var sco = SALOMEDS_SComponent_i::New (aCompImpl, _orb); @@ -135,7 +230,7 @@ SALOMEDS::SComponent_ptr SALOMEDS_Study_i::FindComponentID(const char* aComponen { SALOMEDS::Locker lock; - SALOMEDSImpl_SComponent aCompImpl = _impl->FindComponentID(string((char*)aComponentID)); + SALOMEDSImpl_SComponent aCompImpl = _impl->FindComponentID(std::string((char*)aComponentID)); if(aCompImpl.IsNull()) return SALOMEDS::SComponent::_nil(); SALOMEDS::SComponent_var sco = SALOMEDS_SComponent_i::New (aCompImpl, _orb); @@ -151,7 +246,7 @@ SALOMEDS::SObject_ptr SALOMEDS_Study_i::FindObject(const char* anObjectName) { SALOMEDS::Locker lock; - SALOMEDSImpl_SObject aSO = _impl->FindObject(string((char*)anObjectName)); + SALOMEDSImpl_SObject aSO = _impl->FindObject(std::string((char*)anObjectName)); if(aSO.IsNull()) return SALOMEDS::SObject::_nil(); if(aSO.IsComponent()) { @@ -174,7 +269,7 @@ SALOMEDS::SObject_ptr SALOMEDS_Study_i::FindObjectID(const char* anObjectID) { SALOMEDS::Locker lock; - SALOMEDSImpl_SObject aSO = _impl->FindObjectID(string((char*)anObjectID)); + SALOMEDSImpl_SObject aSO = _impl->FindObjectID(std::string((char*)anObjectID)); if(aSO.IsNull()) return SALOMEDS::SObject::_nil(); SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (aSO, _orb); return so._retn(); @@ -205,12 +300,12 @@ SALOMEDS::SObject_ptr SALOMEDS_Study_i::CreateObjectID(const char* anObjectID) */ //============================================================================ SALOMEDS::Study::ListOfSObject* SALOMEDS_Study_i::FindObjectByName( const char* anObjectName, - const char* aComponentName ) + const char* aComponentName ) { SALOMEDS::Locker lock; - vector aSeq = _impl->FindObjectByName(string((char*)anObjectName), - string((char*)aComponentName)); + std::vector aSeq = _impl->FindObjectByName(std::string((char*)anObjectName), + std::string((char*)aComponentName)); int aLength = aSeq.size(); SALOMEDS::Study::ListOfSObject_var listSO = new SALOMEDS::Study::ListOfSObject ; listSO->length(aLength); @@ -230,7 +325,7 @@ SALOMEDS::SObject_ptr SALOMEDS_Study_i::FindObjectIOR(const char* anObjectIOR) { SALOMEDS::Locker lock; - SALOMEDSImpl_SObject aSO = _impl->FindObjectIOR(string((char*)anObjectIOR)); + SALOMEDSImpl_SObject aSO = _impl->FindObjectIOR(std::string((char*)anObjectIOR)); if(aSO.IsNull()) return SALOMEDS::SObject::_nil(); SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (aSO, _orb); @@ -246,7 +341,7 @@ SALOMEDS::SObject_ptr SALOMEDS_Study_i::FindObjectByPath(const char* thePath) { SALOMEDS::Locker lock; - SALOMEDSImpl_SObject aSO = _impl->FindObjectByPath(string((char*)thePath)); + SALOMEDSImpl_SObject aSO = _impl->FindObjectByPath(std::string((char*)thePath)); if(aSO.IsNull()) return SALOMEDS::SObject::_nil(); SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (aSO, _orb); @@ -262,7 +357,7 @@ char* SALOMEDS_Study_i::GetObjectPath(CORBA::Object_ptr theObject) { SALOMEDS::Locker lock; - string aPath(""); + std::string aPath(""); if(CORBA::is_nil(theObject)) return CORBA::string_dup(aPath.c_str()); SALOMEDSImpl_SObject aSO; SALOMEDS::SObject_var aSObj = SALOMEDS::SObject::_narrow(theObject); @@ -290,7 +385,7 @@ void SALOMEDS_Study_i::SetContext(const char* thePath) { SALOMEDS::Locker lock; - _impl->SetContext(string((char*)thePath)); + _impl->SetContext(std::string((char*)thePath)); if(_impl->IsError() && _impl->GetErrorCode() == "InvalidContext") throw SALOMEDS::Study::StudyInvalidContext(); } @@ -322,7 +417,7 @@ SALOMEDS::ListOfStrings* SALOMEDS_Study_i::GetObjectNames(const char* theContext if (strlen(theContext) == 0 && !_impl->HasCurrentContext()) throw SALOMEDS::Study::StudyInvalidContext(); - vector aSeq = _impl->GetObjectNames(string((char*)theContext)); + std::vector aSeq = _impl->GetObjectNames(std::string((char*)theContext)); if (_impl->GetErrorCode() == "InvalidContext") throw SALOMEDS::Study::StudyInvalidContext(); @@ -349,7 +444,7 @@ SALOMEDS::ListOfStrings* SALOMEDS_Study_i::GetDirectoryNames(const char* theCont if (strlen(theContext) == 0 && !_impl->HasCurrentContext()) throw SALOMEDS::Study::StudyInvalidContext(); - vector aSeq = _impl->GetDirectoryNames(string((char*)theContext)); + std::vector aSeq = _impl->GetDirectoryNames(std::string((char*)theContext)); if (_impl->GetErrorCode() == "InvalidContext") throw SALOMEDS::Study::StudyInvalidContext(); @@ -376,7 +471,7 @@ SALOMEDS::ListOfStrings* SALOMEDS_Study_i::GetFileNames(const char* theContext) if (strlen(theContext) == 0 && !_impl->HasCurrentContext()) throw SALOMEDS::Study::StudyInvalidContext(); - vector aSeq = _impl->GetFileNames(string((char*)theContext)); + std::vector aSeq = _impl->GetFileNames(std::string((char*)theContext)); if (_impl->GetErrorCode() == "InvalidContext") throw SALOMEDS::Study::StudyInvalidContext(); @@ -401,7 +496,7 @@ SALOMEDS::ListOfStrings* SALOMEDS_Study_i::GetComponentNames(const char* theCont SALOMEDS::ListOfStrings_var aResult = new SALOMEDS::ListOfStrings; - vector aSeq = _impl->GetComponentNames(string((char*)theContext)); + std::vector aSeq = _impl->GetComponentNames(std::string((char*)theContext)); int aLength = aSeq.size(); aResult->length(aLength); @@ -421,14 +516,14 @@ SALOMEDS::ChildIterator_ptr SALOMEDS_Study_i::NewChildIterator(SALOMEDS::SObject { SALOMEDS::Locker lock; - SALOMEDSImpl_SObject aSO = _impl->GetSObject(theSO->GetID()); + CORBA::String_var anID=theSO->GetID(); + SALOMEDSImpl_SObject aSO = _impl->GetSObject(anID.in()); SALOMEDSImpl_ChildIterator anItr(aSO); //Create iterator SALOMEDS_ChildIterator_i* it_servant = new SALOMEDS_ChildIterator_i(anItr, _orb); - SALOMEDS::ChildIterator_var it = SALOMEDS::ChildIterator::_narrow(it_servant->_this()); - return it; + return it_servant->_this(); } @@ -476,7 +571,7 @@ char* SALOMEDS_Study_i::Name() void SALOMEDS_Study_i::Name(const char* name) { SALOMEDS::Locker lock; - _impl->Name(string((char*)name)); + _impl->Name(std::string((char*)name)); } //============================================================================ @@ -543,7 +638,7 @@ char* SALOMEDS_Study_i::URL() void SALOMEDS_Study_i::URL(const char* url) { SALOMEDS::Locker lock; - _impl->URL(string((char*)url)); + _impl->URL(std::string((char*)url)); } @@ -562,7 +657,7 @@ void SALOMEDS_Study_i::StudyId(CORBA::Short id) void SALOMEDS_Study_i::UpdateIORLabelMap(const char* anIOR,const char* anEntry) { SALOMEDS::Locker lock; - _impl->UpdateIORLabelMap(string((char*)anIOR), string((char*)anEntry)); + _impl->UpdateIORLabelMap(std::string((char*)anIOR), std::string((char*)anEntry)); } SALOMEDS::Study_ptr SALOMEDS_Study_i::GetStudy(const DF_Label& theLabel, CORBA::ORB_ptr orb) @@ -582,6 +677,18 @@ SALOMEDS::Study_ptr SALOMEDS_Study_i::GetStudy(const DF_Label& theLabel, CORBA:: return SALOMEDS::Study::_nil(); } +SALOMEDS_Study_i* SALOMEDS_Study_i::GetStudyServant(SALOMEDSImpl_Study* aStudyImpl, CORBA::ORB_ptr orb) +{ + if (_mapOfStudies.find(aStudyImpl) != _mapOfStudies.end()) + return _mapOfStudies[aStudyImpl]; + else + { + SALOMEDS_Study_i *Study_servant = new SALOMEDS_Study_i(aStudyImpl, orb); + _mapOfStudies[aStudyImpl]=Study_servant; + return Study_servant; + } +} + void SALOMEDS_Study_i::IORUpdated(SALOMEDSImpl_AttributeIOR* theAttribute) { SALOMEDS::Locker lock; @@ -621,7 +728,7 @@ SALOMEDS::ListOfDates* SALOMEDS_Study_i::GetModificationsDate() { SALOMEDS::Locker lock; - vector aSeq = _impl->GetModificationsDate(); + std::vector aSeq = _impl->GetModificationsDate(); int aLength = aSeq.size(); SALOMEDS::ListOfDates_var aDates = new SALOMEDS::ListOfDates; aDates->length(aLength); @@ -661,25 +768,38 @@ void SALOMEDS_Study_i::Close() SALOMEDS::SComponentIterator_var itcomponent = NewComponentIterator(); for (; itcomponent->More(); itcomponent->Next()) { SALOMEDS::SComponent_var sco = itcomponent->Value(); - MESSAGE ( "Look for an engine for data type :"<< sco->ComponentDataType()); + CORBA::String_var compodatatype=sco->ComponentDataType(); + MESSAGE ( "Look for an engine for data type :"<< compodatatype); // if there is an associated Engine call its method for closing CORBA::String_var IOREngine; if (sco->ComponentIOR(IOREngine)) { // we have found the associated engine to write the data - MESSAGE ( "We have found an engine for data type :"<< sco->ComponentDataType()); - CORBA::Object_var obj = _orb->string_to_object(IOREngine); - if (!CORBA::is_nil(obj)) { - SALOMEDS::Driver_var anEngine = SALOMEDS::Driver::_narrow(obj) ; - - if (!anEngine->_is_nil()) { - SALOMEDS::unlock(); - anEngine->Close(sco); - SALOMEDS::lock(); - } - } + MESSAGE ( "We have found an engine for data type :"<< compodatatype); + //_narrow can throw a corba exception + try + { + CORBA::Object_var obj = _orb->string_to_object(IOREngine); + if (!CORBA::is_nil(obj)) + { + SALOMEDS::Driver_var anEngine = SALOMEDS::Driver::_narrow(obj) ; + if (!anEngine->_is_nil()) + { + SALOMEDS::unlock(); + anEngine->Close(sco); + SALOMEDS::lock(); + } + } + } + catch (CORBA::Exception&) + {/*pass*/ } } + sco->UnRegister(); } + //Does not need any more this iterator + itcomponent->UnRegister(); + + _impl->Close(); } @@ -713,14 +833,17 @@ void SALOMEDS_Study_i::RemovePostponed(CORBA::Long /*theUndoLimit*/) { SALOMEDS::Locker lock; - vector anIORs = _impl->GetIORs(); + std::vector anIORs = _impl->GetIORs(); int i, aSize = (int)anIORs.size(); for(i = 0; i < aSize; i++) { try { CORBA::Object_var obj = _orb->string_to_object(anIORs[i].c_str()); SALOME::GenericObj_var aGeneric = SALOME::GenericObj::_narrow(obj); - if (!CORBA::is_nil(aGeneric)) aGeneric->Destroy(); + //rnv: To avoid double deletion of the Salome Generic Objects: + //rnv: 1. First decrement of the reference count in the SALOMEDSImpl_AttributeIOR::~SALOMEDSImpl_AttributeIOR(); + //rnv: 2. Second decrement of the reference count in the next string : aGeneric->UnRegister(); + //if (!CORBA::is_nil(aGeneric)) aGeneric->UnRegister(); } catch (...) {} } @@ -749,14 +872,15 @@ void SALOMEDS_Study_i::UndoPostponed(CORBA::Long theWay) */ //============================================================================ CORBA::Boolean SALOMEDS_Study_i::DumpStudy(const char* thePath, - const char* theBaseName, - CORBA::Boolean isPublished) + const char* theBaseName, + CORBA::Boolean isPublished, + CORBA::Boolean isMultiFile) { SALOMEDS::Locker lock; - string aPath((char*)thePath), aBaseName((char*)theBaseName); + std::string aPath((char*)thePath), aBaseName((char*)theBaseName); SALOMEDS_DriverFactory_i* factory = new SALOMEDS_DriverFactory_i(_orb); - CORBA::Boolean ret = _impl->DumpStudy(aPath, aBaseName, isPublished, factory); + CORBA::Boolean ret = _impl->DumpStudy(aPath, aBaseName, isPublished, isMultiFile, factory); delete factory; return ret; } @@ -781,8 +905,8 @@ SALOMEDS::AttributeParameter_ptr SALOMEDS_Study_i::GetCommonParameters(const cha */ //============================================================================ SALOMEDS::AttributeParameter_ptr SALOMEDS_Study_i::GetModuleParameters(const char* theID, - const char* theModuleName, - CORBA::Long theSavePoint) + const char* theModuleName, + CORBA::Long theSavePoint) { SALOMEDS::Locker lock; @@ -835,7 +959,7 @@ SALOMEDS::ListOfStrings* SALOMEDS_Study_i::GetLockerID() SALOMEDS::ListOfStrings_var aResult = new SALOMEDS::ListOfStrings; - vector aSeq = _impl->GetLockerID(); + std::vector aSeq = _impl->GetLockerID(); int aLength = aSeq.size(); aResult->length(aLength); @@ -851,7 +975,7 @@ SALOMEDS::ListOfStrings* SALOMEDS_Study_i::GetLockerID() //============================================================================ void SALOMEDS_Study_i::SetReal(const char* theVarName, CORBA::Double theValue) { - _impl->SetVariable(string(theVarName), + _impl->SetVariable(std::string(theVarName), theValue, SALOMEDSImpl_GenericVariable::REAL_VAR); } @@ -863,7 +987,7 @@ void SALOMEDS_Study_i::SetReal(const char* theVarName, CORBA::Double theValue) //============================================================================ void SALOMEDS_Study_i::SetInteger(const char* theVarName, CORBA::Long theValue) { - _impl->SetVariable(string(theVarName), + _impl->SetVariable(std::string(theVarName), theValue, SALOMEDSImpl_GenericVariable::INTEGER_VAR); } @@ -875,11 +999,35 @@ void SALOMEDS_Study_i::SetInteger(const char* theVarName, CORBA::Long theValue) //============================================================================ void SALOMEDS_Study_i::SetBoolean(const char* theVarName, CORBA::Boolean theValue) { - _impl->SetVariable(string(theVarName), + _impl->SetVariable(std::string(theVarName), theValue, SALOMEDSImpl_GenericVariable::BOOLEAN_VAR); } +//============================================================================ +/*! Function : SetString + * Purpose : + */ +//============================================================================ +void SALOMEDS_Study_i::SetString(const char* theVarName, const char* theValue) +{ + _impl->SetStringVariable(std::string(theVarName), + theValue, + SALOMEDSImpl_GenericVariable::STRING_VAR); +} + +//============================================================================ +/*! Function : SetStringAsDouble + * Purpose : + */ +//============================================================================ +void SALOMEDS_Study_i::SetStringAsDouble(const char* theVarName, CORBA::Double theValue) +{ + _impl->SetStringVariableAsDouble(std::string(theVarName), + theValue, + SALOMEDSImpl_GenericVariable::STRING_VAR); +} + //============================================================================ /*! Function : GetReal * Purpose : @@ -887,7 +1035,7 @@ void SALOMEDS_Study_i::SetBoolean(const char* theVarName, CORBA::Boolean theValu //============================================================================ CORBA::Double SALOMEDS_Study_i::GetReal(const char* theVarName) { - return _impl->GetVariableValue(string(theVarName)); + return _impl->GetVariableValue(std::string(theVarName)); } //============================================================================ @@ -897,7 +1045,7 @@ CORBA::Double SALOMEDS_Study_i::GetReal(const char* theVarName) //============================================================================ CORBA::Long SALOMEDS_Study_i::GetInteger(const char* theVarName) { - return (int)_impl->GetVariableValue(string(theVarName)); + return (int)_impl->GetVariableValue(std::string(theVarName)); } //============================================================================ @@ -907,7 +1055,17 @@ CORBA::Long SALOMEDS_Study_i::GetInteger(const char* theVarName) //============================================================================ CORBA::Boolean SALOMEDS_Study_i::GetBoolean(const char* theVarName) { - return (bool)_impl->GetVariableValue(string(theVarName)); + return (bool)_impl->GetVariableValue(std::string(theVarName)); +} + +//============================================================================ +/*! Function : GetString + * Purpose : + */ +//============================================================================ +char* SALOMEDS_Study_i::GetString(const char* theVarName) +{ + return CORBA::string_dup(_impl->GetStringVariableValue(std::string(theVarName)).c_str()); } //============================================================================ @@ -917,7 +1075,7 @@ CORBA::Boolean SALOMEDS_Study_i::GetBoolean(const char* theVarName) //============================================================================ CORBA::Boolean SALOMEDS_Study_i::IsReal(const char* theVarName) { - return _impl->IsTypeOf(string(theVarName), + return _impl->IsTypeOf(std::string(theVarName), SALOMEDSImpl_GenericVariable::REAL_VAR); } @@ -928,7 +1086,7 @@ CORBA::Boolean SALOMEDS_Study_i::IsReal(const char* theVarName) //============================================================================ CORBA::Boolean SALOMEDS_Study_i::IsInteger(const char* theVarName) { - return _impl->IsTypeOf(string(theVarName), + return _impl->IsTypeOf(std::string(theVarName), SALOMEDSImpl_GenericVariable::INTEGER_VAR); } @@ -939,10 +1097,21 @@ CORBA::Boolean SALOMEDS_Study_i::IsInteger(const char* theVarName) //============================================================================ CORBA::Boolean SALOMEDS_Study_i::IsBoolean(const char* theVarName) { - return _impl->IsTypeOf(string(theVarName), + return _impl->IsTypeOf(std::string(theVarName), SALOMEDSImpl_GenericVariable::BOOLEAN_VAR); } +//============================================================================ +/*! Function : IsString + * Purpose : + */ +//============================================================================ +CORBA::Boolean SALOMEDS_Study_i::IsString(const char* theVarName) +{ + return _impl->IsTypeOf(std::string(theVarName), + SALOMEDSImpl_GenericVariable::STRING_VAR); +} + //============================================================================ /*! Function : IsVariable * Purpose : @@ -950,7 +1119,7 @@ CORBA::Boolean SALOMEDS_Study_i::IsBoolean(const char* theVarName) //============================================================================ CORBA::Boolean SALOMEDS_Study_i::IsVariable(const char* theVarName) { - return _impl->IsVariable(string(theVarName)); + return _impl->IsVariable(std::string(theVarName)); } //============================================================================ @@ -960,7 +1129,7 @@ CORBA::Boolean SALOMEDS_Study_i::IsVariable(const char* theVarName) //============================================================================ SALOMEDS::ListOfStrings* SALOMEDS_Study_i::GetVariableNames() { - vector aVarNames = _impl->GetVariableNames(); + std::vector aVarNames = _impl->GetVariableNames(); SALOMEDS::ListOfStrings_var aResult = new SALOMEDS::ListOfStrings; int aLen = aVarNames.size(); @@ -979,7 +1148,7 @@ SALOMEDS::ListOfStrings* SALOMEDS_Study_i::GetVariableNames() //============================================================================ CORBA::Boolean SALOMEDS_Study_i::RemoveVariable(const char* theVarName) { - return _impl->RemoveVariable(string(theVarName)); + return _impl->RemoveVariable(std::string(theVarName)); } //============================================================================ @@ -989,7 +1158,7 @@ CORBA::Boolean SALOMEDS_Study_i::RemoveVariable(const char* theVarName) //============================================================================ CORBA::Boolean SALOMEDS_Study_i::RenameVariable(const char* theVarName, const char* theNewVarName) { - return _impl->RenameVariable(string(theVarName), string(theNewVarName)); + return _impl->RenameVariable(std::string(theVarName), std::string(theNewVarName)); } //============================================================================ @@ -999,7 +1168,7 @@ CORBA::Boolean SALOMEDS_Study_i::RenameVariable(const char* theVarName, const ch //============================================================================ CORBA::Boolean SALOMEDS_Study_i::IsVariableUsed(const char* theVarName) { - return _impl->IsVariableUsed(string(theVarName)); + return _impl->IsVariableUsed(std::string(theVarName)); } @@ -1010,7 +1179,7 @@ CORBA::Boolean SALOMEDS_Study_i::IsVariableUsed(const char* theVarName) //============================================================================ SALOMEDS::ListOfListOfStrings* SALOMEDS_Study_i::ParseVariables(const char* theVarName) { - vector< vector > aSections = _impl->ParseVariables(string(theVarName)); + std::vector< std::vector > aSections = _impl->ParseVariables(std::string(theVarName)); SALOMEDS::ListOfListOfStrings_var aResult = new SALOMEDS::ListOfListOfStrings; @@ -1018,7 +1187,7 @@ SALOMEDS::ListOfListOfStrings* SALOMEDS_Study_i::ParseVariables(const char* theV aResult->length(aSectionsLen); for (int aSectionInd = 0; aSectionInd < aSectionsLen; aSectionInd++) { - vector aVarNames = aSections[aSectionInd]; + std::vector aVarNames = aSections[aSectionInd]; SALOMEDS::ListOfStrings_var aList = new SALOMEDS::ListOfStrings; @@ -1043,7 +1212,7 @@ char* SALOMEDS_Study_i::GetDefaultScript(const char* theModuleName, const char* { SALOMEDS::Locker lock; - string script = SALOMEDSImpl_IParameters::getDefaultScript(_impl, theModuleName, theShift); + std::string script = SALOMEDSImpl_IParameters::getDefaultScript(_impl, theModuleName, theShift); return CORBA::string_dup(script.c_str()); } @@ -1068,6 +1237,17 @@ void SALOMEDS_Study_i::EnableUseCaseAutoFilling(CORBA::Boolean isEnabled) } } +//============================================================================ +/*! Function : attach + * Purpose : This function attach an observer to the study + */ +//============================================================================ +void SALOMEDS_Study_i::attach(SALOMEDS::Observer_ptr theObs,CORBA::Boolean modify) +{ + if(_notifier) + _notifier->attach(theObs,modify); +} + //=========================================================================== // PRIVATE FUNCTIONS //=========================================================================== diff --git a/src/SALOMEDS/SALOMEDS_Study_i.hxx b/src/SALOMEDS/SALOMEDS_Study_i.hxx index 307f09fb2..2b596f40f 100644 --- a/src/SALOMEDS/SALOMEDS_Study_i.hxx +++ b/src/SALOMEDS/SALOMEDS_Study_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_Study_i.hxx // Author : Sergey RUIN // Module : SALOME @@ -45,12 +46,16 @@ #include "SALOMEDSImpl_Study.hxx" #include "SALOMEDSImpl_AttributeIOR.hxx" +class Notifier; + class Standard_EXPORT SALOMEDS_Study_i: public POA_SALOMEDS::Study { private: - CORBA::ORB_ptr _orb; + CORBA::ORB_var _orb; SALOMEDSImpl_Study* _impl; SALOMEDS_StudyBuilder_i* _builder; + static std::map _mapOfStudies; + Notifier* _notifier; public: @@ -244,6 +249,7 @@ public: virtual void StudyId(CORBA::Short id); static SALOMEDS::Study_ptr GetStudy(const DF_Label& theLabel, CORBA::ORB_ptr orb); + static SALOMEDS_Study_i* GetStudyServant(SALOMEDSImpl_Study*, CORBA::ORB_ptr orb); static void IORUpdated(SALOMEDSImpl_AttributeIOR* theAttribute); @@ -285,8 +291,8 @@ public: virtual SALOMEDS::AttributeParameter_ptr GetCommonParameters(const char* theID, CORBA::Long theSavePoint); virtual SALOMEDS::AttributeParameter_ptr GetModuleParameters(const char* theID, - const char* theModuleName, - CORBA::Long theSavePoint); + const char* theModuleName, + CORBA::Long theSavePoint); virtual void SetStudyLock(const char* theLockerID); @@ -302,18 +308,26 @@ public: virtual void SetBoolean(const char* theVarName, CORBA::Boolean theValue); + virtual void SetString(const char* theVarName, const char* theValue); + + virtual void SetStringAsDouble(const char* theVarName, CORBA::Double theValue); + virtual CORBA::Double GetReal(const char* theVarName); virtual CORBA::Long GetInteger(const char* theVarName); virtual CORBA::Boolean GetBoolean(const char* theVarName); + virtual char* GetString(const char* theVarName); + virtual CORBA::Boolean IsReal(const char* theVarName); virtual CORBA::Boolean IsInteger(const char* theVarName); virtual CORBA::Boolean IsBoolean(const char* theVarName); + virtual CORBA::Boolean IsString(const char* theVarName); + virtual CORBA::Boolean IsVariable(const char* theVarName); virtual SALOMEDS::ListOfStrings* GetVariableNames(); @@ -328,10 +342,16 @@ public: virtual char* GetDefaultScript(const char* theModuleName, const char* theShift); - virtual CORBA::Boolean DumpStudy(const char* thePath, const char* theBaseName, CORBA::Boolean isPublished); + virtual CORBA::Boolean DumpStudy(const char* thePath, + const char* theBaseName, + CORBA::Boolean isPublished, + CORBA::Boolean isMultiFile); virtual SALOMEDSImpl_Study* GetImpl() { return _impl; } virtual CORBA::LongLong GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal); + + virtual void attach(SALOMEDS::Observer_ptr theObs, CORBA::Boolean modify); + }; #endif diff --git a/src/SALOMEDS/SALOMEDS_TMPFile_i.cxx b/src/SALOMEDS/SALOMEDS_TMPFile_i.cxx index a3118a993..c4f35ec06 100644 --- a/src/SALOMEDS/SALOMEDS_TMPFile_i.cxx +++ b/src/SALOMEDS/SALOMEDS_TMPFile_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME SALOMEDS : data structure of SALOME and sources of Salome data server // File : SALOMEDSImpl_SObject.cxx // Author : Sergey RUIN diff --git a/src/SALOMEDS/SALOMEDS_TMPFile_i.hxx b/src/SALOMEDS/SALOMEDS_TMPFile_i.hxx index 9948c3241..67aaca2a0 100644 --- a/src/SALOMEDS/SALOMEDS_TMPFile_i.hxx +++ b/src/SALOMEDS/SALOMEDS_TMPFile_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef __SALOMEDSIMPL_TMPFILE_I_H__ #define __SALOMEDSIMPL_TMPFILE_I_H__ diff --git a/src/SALOMEDS/SALOMEDS_UseCaseBuilder.cxx b/src/SALOMEDS/SALOMEDS_UseCaseBuilder.cxx index 3131077e0..8adec6234 100644 --- a/src/SALOMEDS/SALOMEDS_UseCaseBuilder.cxx +++ b/src/SALOMEDS/SALOMEDS_UseCaseBuilder.cxx @@ -1,28 +1,29 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_UseCaseBuilder.cxx // Author : Sergey RUIN // Module : SALOME -// + #include "SALOMEDS_UseCaseBuilder.hxx" #include "SALOMEDS.hxx" @@ -34,8 +35,6 @@ #include -using namespace std; - SALOMEDS_UseCaseBuilder::SALOMEDS_UseCaseBuilder(SALOMEDSImpl_UseCaseBuilder* theBuilder) { _isLocal = true; @@ -52,7 +51,7 @@ SALOMEDS_UseCaseBuilder::SALOMEDS_UseCaseBuilder(SALOMEDS::UseCaseBuilder_ptr th SALOMEDS_UseCaseBuilder::~SALOMEDS_UseCaseBuilder() { - if(!_isLocal) _corba_impl->Destroy(); + if(!_isLocal) _corba_impl->UnRegister(); } bool SALOMEDS_UseCaseBuilder::Append(const _PTR(SObject)& theObject) @@ -140,6 +139,18 @@ bool SALOMEDS_UseCaseBuilder::HasChildren(const _PTR(SObject)& theObject) return ret; } +_PTR(SObject) SALOMEDS_UseCaseBuilder::GetFather(const _PTR(SObject)& theObject) +{ + SALOMEDS_SObject* father = NULL; + SALOMEDS_SObject* obj = dynamic_cast(theObject.get()); + if (_isLocal) { + SALOMEDS::Locker lock; + father = new SALOMEDS_SObject(_local_impl->GetFather(*(obj->GetLocalImpl()))); + } + else father = new SALOMEDS_SObject(_corba_impl->GetFather(obj->GetCORBAImpl())); + return _PTR(SObject)(father); +} + bool SALOMEDS_UseCaseBuilder::IsUseCase(const _PTR(SObject)& theObject) { bool ret; @@ -152,6 +163,18 @@ bool SALOMEDS_UseCaseBuilder::IsUseCase(const _PTR(SObject)& theObject) return ret; } +bool SALOMEDS_UseCaseBuilder::IsUseCaseNode(const _PTR(SObject)& theObject) +{ + bool ret; + SALOMEDS_SObject* obj = dynamic_cast(theObject.get()); + if (_isLocal) { + SALOMEDS::Locker lock; + ret = _local_impl->IsUseCaseNode(*(obj->GetLocalImpl())); + } + else ret = _corba_impl->IsUseCaseNode(obj->GetCORBAImpl()); + return ret; +} + bool SALOMEDS_UseCaseBuilder::SetName(const std::string& theName) { bool ret; diff --git a/src/SALOMEDS/SALOMEDS_UseCaseBuilder.hxx b/src/SALOMEDS/SALOMEDS_UseCaseBuilder.hxx index fb295af66..4c1a1d575 100644 --- a/src/SALOMEDS/SALOMEDS_UseCaseBuilder.hxx +++ b/src/SALOMEDS/SALOMEDS_UseCaseBuilder.hxx @@ -1,28 +1,29 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_UseCaseBuilder.hxx // Author : Sergey RUIN // Module : SALOME -// + #ifndef __SALOMEDS_USECaseBuilder_H__ #define __SALOMEDS_USECaseBuilder_H__ @@ -54,7 +55,9 @@ public: virtual bool SetCurrentObject(const _PTR(SObject)& theObject); virtual bool SetRootCurrent(); virtual bool HasChildren(const _PTR(SObject)& theObject); + virtual _PTR(SObject) GetFather(const _PTR(SObject)& theObject); virtual bool IsUseCase(const _PTR(SObject)& theObject); + virtual bool IsUseCaseNode(const _PTR(SObject)& theObject); virtual bool SetName(const std::string& theName); virtual _PTR(SObject) GetCurrentObject(); virtual std::string GetName(); diff --git a/src/SALOMEDS/SALOMEDS_UseCaseBuilder_i.cxx b/src/SALOMEDS/SALOMEDS_UseCaseBuilder_i.cxx index c97cc1265..d97e50493 100644 --- a/src/SALOMEDS/SALOMEDS_UseCaseBuilder_i.cxx +++ b/src/SALOMEDS/SALOMEDS_UseCaseBuilder_i.cxx @@ -1,28 +1,29 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_UseCaseBuilder_i.cxx // Author : Sergey RUIN // Module : SALOME -// + #include "SALOMEDS_UseCaseBuilder_i.hxx" #include "SALOMEDS_UseCaseIterator_i.hxx" #include "SALOMEDS_SObject_i.hxx" @@ -30,15 +31,13 @@ #include "utilities.h" -using namespace std; - //============================================================================ /*! Function : constructor * Purpose : */ //============================================================================ SALOMEDS_UseCaseBuilder_i::SALOMEDS_UseCaseBuilder_i(SALOMEDSImpl_UseCaseBuilder* theImpl, - CORBA::ORB_ptr orb) + CORBA::ORB_ptr orb) { _orb = CORBA::ORB::_duplicate(orb); _impl = theImpl; @@ -85,7 +84,7 @@ CORBA::Boolean SALOMEDS_UseCaseBuilder_i::Remove(SALOMEDS::SObject_ptr theObject */ //============================================================================ CORBA::Boolean SALOMEDS_UseCaseBuilder_i::AppendTo(SALOMEDS::SObject_ptr theFather, - SALOMEDS::SObject_ptr theObject) + SALOMEDS::SObject_ptr theObject) { SALOMEDS::Locker lock; if(!_impl || theFather->_is_nil() || theObject->_is_nil()) return 0; @@ -98,7 +97,7 @@ CORBA::Boolean SALOMEDS_UseCaseBuilder_i::AppendTo(SALOMEDS::SObject_ptr theFath */ //============================================================================ CORBA::Boolean SALOMEDS_UseCaseBuilder_i::InsertBefore(SALOMEDS::SObject_ptr theFirst, - SALOMEDS::SObject_ptr theNext) + SALOMEDS::SObject_ptr theNext) { SALOMEDS::Locker lock; if(!_impl || theFirst->_is_nil() || theNext->_is_nil()) return 0; @@ -142,6 +141,21 @@ CORBA::Boolean SALOMEDS_UseCaseBuilder_i::HasChildren(SALOMEDS::SObject_ptr theO return _impl->HasChildren(_impl->GetSObject(theObject->GetID())); } +//============================================================================ +/*! Function : GetFather + * Purpose : + */ +//============================================================================ +SALOMEDS::SObject_ptr SALOMEDS_UseCaseBuilder_i::GetFather(SALOMEDS::SObject_ptr theObject) +{ + SALOMEDS::Locker lock; + + if(!_impl) return NULL; + SALOMEDSImpl_SObject aSO = _impl->GetFather(_impl->GetSObject(theObject->GetID())); + SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (aSO, _orb); + return so._retn(); +} + //============================================================================ /*! Function : SetName * Purpose : @@ -194,6 +208,19 @@ CORBA::Boolean SALOMEDS_UseCaseBuilder_i::IsUseCase(SALOMEDS::SObject_ptr theObj return _impl->IsUseCase(_impl->GetSObject(theObject->GetID())); } +//============================================================================ +/*! Function : IsUseCaseNode + * Purpose : + */ +//============================================================================ +CORBA::Boolean SALOMEDS_UseCaseBuilder_i::IsUseCaseNode(SALOMEDS::SObject_ptr theObject) +{ + SALOMEDS::Locker lock; + + if(!_impl || theObject->_is_nil()) return false; + return _impl->IsUseCaseNode(_impl->GetSObject(theObject->GetID())); +} + //============================================================================ /*! Function : NewUseCase * Purpose : diff --git a/src/SALOMEDS/SALOMEDS_UseCaseBuilder_i.hxx b/src/SALOMEDS/SALOMEDS_UseCaseBuilder_i.hxx index 864646a0a..3255b2b33 100644 --- a/src/SALOMEDS/SALOMEDS_UseCaseBuilder_i.hxx +++ b/src/SALOMEDS/SALOMEDS_UseCaseBuilder_i.hxx @@ -1,28 +1,29 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_UseCaseBuilder_i.hxx // Author : Sergey RUIN // Module : SALOME -// + #ifndef __SALOMEDS_USECaseBuilder_I_H__ #define __SALOMEDS_USECaseBuilder_I_H__ @@ -41,19 +42,19 @@ #include "SALOMEDSImpl_UseCaseBuilder.hxx" class SALOMEDS_UseCaseBuilder_i: public virtual POA_SALOMEDS::UseCaseBuilder, - public virtual PortableServer::ServantBase, - public virtual SALOME::GenericObj_i + public virtual PortableServer::ServantBase, + public virtual SALOME::GenericObj_i { private: - CORBA::ORB_ptr _orb; + CORBA::ORB_var _orb; SALOMEDSImpl_UseCaseBuilder* _impl; public: //! standard constructor SALOMEDS_UseCaseBuilder_i(SALOMEDSImpl_UseCaseBuilder* theDocument, - CORBA::ORB_ptr); + CORBA::ORB_ptr); //! standard destructor ~SALOMEDS_UseCaseBuilder_i(); @@ -72,8 +73,12 @@ public: virtual CORBA::Boolean HasChildren(SALOMEDS::SObject_ptr theObject); + virtual SALOMEDS::SObject_ptr GetFather(SALOMEDS::SObject_ptr theObject); + virtual CORBA::Boolean IsUseCase(SALOMEDS::SObject_ptr theObject); + virtual CORBA::Boolean IsUseCaseNode(SALOMEDS::SObject_ptr theObject); + virtual CORBA::Boolean SetName(const char* theName); virtual SALOMEDS::SObject_ptr GetCurrentObject(); diff --git a/src/SALOMEDS/SALOMEDS_UseCaseIterator.cxx b/src/SALOMEDS/SALOMEDS_UseCaseIterator.cxx index 0b3c9b7a8..1e9b8e309 100644 --- a/src/SALOMEDS/SALOMEDS_UseCaseIterator.cxx +++ b/src/SALOMEDS/SALOMEDS_UseCaseIterator.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_UseCaseIterator.cxx // Author : Sergey RUIN // Module : SALOME @@ -28,8 +29,6 @@ #include "SALOMEDS.hxx" #include "SALOMEDS_SObject.hxx" -using namespace std; - SALOMEDS_UseCaseIterator::SALOMEDS_UseCaseIterator(const SALOMEDSImpl_UseCaseIterator& theIterator) { _isLocal = true; @@ -45,7 +44,7 @@ SALOMEDS_UseCaseIterator::SALOMEDS_UseCaseIterator(SALOMEDS::UseCaseIterator_ptr SALOMEDS_UseCaseIterator::~SALOMEDS_UseCaseIterator() { - if(!_isLocal) _corba_impl->Destroy(); + if(!_isLocal) _corba_impl->UnRegister(); else if(_local_impl) delete _local_impl; } diff --git a/src/SALOMEDS/SALOMEDS_UseCaseIterator.hxx b/src/SALOMEDS/SALOMEDS_UseCaseIterator.hxx index e07e131f5..e64b3482f 100644 --- a/src/SALOMEDS/SALOMEDS_UseCaseIterator.hxx +++ b/src/SALOMEDS/SALOMEDS_UseCaseIterator.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_UseCaseIterator.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDS/SALOMEDS_UseCaseIterator_i.cxx b/src/SALOMEDS/SALOMEDS_UseCaseIterator_i.cxx index 3fd6ced61..b75551cdd 100644 --- a/src/SALOMEDS/SALOMEDS_UseCaseIterator_i.cxx +++ b/src/SALOMEDS/SALOMEDS_UseCaseIterator_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_UseCaseIterator_i.cxx // Author : Sergey RUIN // Module : SALOME @@ -30,15 +31,13 @@ #include "SALOMEDSImpl_SObject.hxx" #include "utilities.h" -using namespace std; - //============================================================================ /*! Function : constructor * Purpose : */ //============================================================================ SALOMEDS_UseCaseIterator_i::SALOMEDS_UseCaseIterator_i(const SALOMEDSImpl_UseCaseIterator& theImpl, - CORBA::ORB_ptr orb) + CORBA::ORB_ptr orb) { _orb = CORBA::ORB::_duplicate(orb); _impl = theImpl.GetPersistentCopy(); diff --git a/src/SALOMEDS/SALOMEDS_UseCaseIterator_i.hxx b/src/SALOMEDS/SALOMEDS_UseCaseIterator_i.hxx index d40276d79..8bc8cf82d 100644 --- a/src/SALOMEDS/SALOMEDS_UseCaseIterator_i.hxx +++ b/src/SALOMEDS/SALOMEDS_UseCaseIterator_i.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_UseCaseIterator_i.hxx // Author : Sergey RUIN // Module : SALOME @@ -37,18 +38,18 @@ #include "SALOMEDSImpl_UseCaseIterator.hxx" class SALOMEDS_UseCaseIterator_i: public virtual POA_SALOMEDS::UseCaseIterator, - public virtual PortableServer::ServantBase, - public virtual SALOME::GenericObj_i + public virtual PortableServer::ServantBase, + public virtual SALOME::GenericObj_i { private: - CORBA::ORB_ptr _orb; + CORBA::ORB_var _orb; SALOMEDSImpl_UseCaseIterator* _impl; public: //! standard constructor SALOMEDS_UseCaseIterator_i(const SALOMEDSImpl_UseCaseIterator& theImpl, - CORBA::ORB_ptr); + CORBA::ORB_ptr); //! standard destructor ~SALOMEDS_UseCaseIterator_i(); diff --git a/src/SALOMEDS/SALOME_DriverPy.py b/src/SALOMEDS/SALOME_DriverPy.py index f59953f84..7e820dd27 100644 --- a/src/SALOMEDS/SALOME_DriverPy.py +++ b/src/SALOMEDS/SALOME_DriverPy.py @@ -1,34 +1,40 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +## @package SALOME_DriverPy +# \brief python implementation of SALOMEDS::Driver interface # import SALOMEDS__POA +## Python implementation of generic SALOMEDS::Driver. +# +# class SALOME_DriverPy_i(SALOMEDS__POA.Driver): """ - Python implementation of generic SALOMEDS driver. Should be inherited by any Python module's engine to provide persistence mechanism. """ def __init__ (self, componentDataType): - print "SALOME_DriverPy.__init__: ",componentDataType self._ComponentDataType = componentDataType def IORToLocalPersistentID(self, theSObject, IORString, isMultiFile, isASCII): diff --git a/src/SALOMEDS/Test/Makefile.am b/src/SALOMEDS/Test/Makefile.am index c052e3b70..3076b5821 100644 --- a/src/SALOMEDS/Test/Makefile.am +++ b/src/SALOMEDS/Test/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : Makefile.am # Author : Paul RASCLE # Module : KERNEL @@ -35,7 +36,7 @@ include $(top_srcdir)/salome_adm/unix/make_common_starter.am salomeinclude_HEADERS= SALOMEDSTest.hxx # Scripts to be installed -dist_salomescript_SCRIPTS = TestSALOMEDS.py +dist_salomescript_PYTHON = TestSALOMEDS.py # # =============================================================== @@ -60,7 +61,6 @@ COMMON_CPPFLAGS=\ -I$(srcdir)/$(RPATH)/SALOMEDSClient \ -I$(srcdir)/$(RPATH)/DF \ -I$(srcdir)/$(RPATH)/SALOMEDSImpl -I$(srcdir)/$(RPATH)/SALOMEDSImpl/Test \ - -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ @BOOST_CPPFLAGS@ @@ -145,4 +145,4 @@ dist_TestSALOMEDS_SOURCES = TestSALOMEDS.cxx TestSALOMEDS_CPPFLAGS = $(COMMON_CPPFLAGS) TestSALOMEDS_LDADD = libSALOMEDSTest.la \ $(RPATH)/Basics/libSALOMEBasics.la \ - $(CORBA_LIBS) + $(CORBA_LIBS) $(COMMON_LIBS) diff --git a/src/SALOMEDS/Test/SALOMEDSTest.cxx b/src/SALOMEDS/Test/SALOMEDSTest.cxx index 4351c6bfa..6d5f4da5e 100644 --- a/src/SALOMEDS/Test/SALOMEDSTest.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "SALOMEDSTest.hxx" @@ -41,7 +42,6 @@ #include "SALOMEDS_SObject.hxx" -using namespace std; // ============================================================================ /*! @@ -73,7 +73,7 @@ void SALOMEDSTest::setUp() void SALOMEDSTest::tearDown() { _PTR(StudyManager) sm ( new SALOMEDS_StudyManager(_sm) ); - vector v = sm->GetOpenStudies(); + std::vector v = sm->GetOpenStudies(); for(int i = 0; iGetStudyByName(v[i]); if(study) diff --git a/src/SALOMEDS/Test/SALOMEDSTest.hxx b/src/SALOMEDS/Test/SALOMEDSTest.hxx index e1e047516..6d433f199 100644 --- a/src/SALOMEDS/Test/SALOMEDSTest.hxx +++ b/src/SALOMEDS/Test/SALOMEDSTest.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef _SALOMEDSTEST_HXX_ #define _SALOMEDSTEST_HXX_ diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributeComment.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributeComment.cxx index 0b8e558f7..10ea028ff 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributeComment.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributeComment.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_AttributeComment * Use code of SALOMEDS_AttributeComment.cxx @@ -52,7 +53,7 @@ void SALOMEDSTest::testAttributeComment() CPPUNIT_ASSERT(_attr); //Check method Value - string value = _attr->Value(); + std::string value = _attr->Value(); CPPUNIT_ASSERT(value.empty()); diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributeDrawable.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributeDrawable.cxx index ceeca1e24..0693c7c34 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributeDrawable.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributeDrawable.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_AttributeDrawable * Use code of SALOMEDS_AttributeDrawable.cxx diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributeExpandable.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributeExpandable.cxx index c23b72a58..c9e668cc8 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributeExpandable.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributeExpandable.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_AttributeExpandable * Use code of SALOMEDS_AttributeExpandable.cxx diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributeExternalFileDef.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributeExternalFileDef.cxx index e7be6de13..41a202fdb 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributeExternalFileDef.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributeExternalFileDef.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_AttributeExternalFileDef * Use code of SALOMEDS_AttributeExternalFileDef.cxx @@ -52,7 +53,7 @@ void SALOMEDSTest::testAttributeExternalFileDef() CPPUNIT_ASSERT(_attr); //Check method Value - string value = _attr->Value(); + std::string value = _attr->Value(); CPPUNIT_ASSERT(value.empty()); diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributeFileType.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributeFileType.cxx index 9f28dd5c1..76df542e9 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributeFileType.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributeFileType.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_AttributeFileType * Use code of SALOMEDS_AttributeFileType.cxx @@ -52,7 +53,7 @@ void SALOMEDSTest::testAttributeFileType() CPPUNIT_ASSERT(_attr); //Check method Value - string value = _attr->Value(); + std::string value = _attr->Value(); CPPUNIT_ASSERT(value.empty()); diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributeFlags.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributeFlags.cxx index 233652b90..28f227dae 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributeFlags.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributeFlags.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_AttributeFlags * Use code of SALOMEDS_AttributeFlags.cxx diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributeGraphic.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributeGraphic.cxx index 5519f697e..e02687c2d 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributeGraphic.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributeGraphic.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_AttributeGraphic * Use code of SALOMEDS_AttributeGraphic.cxx diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributeIOR.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributeIOR.cxx index 694597f5d..45045de6c 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributeIOR.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributeIOR.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_AttributeIOR * Use code of SALOMEDS_AttributeIOR.cxx @@ -52,11 +53,11 @@ void SALOMEDSTest::testAttributeIOR() CPPUNIT_ASSERT(_attr); //Check method Value - string value = _attr->Value(); + std::string value = _attr->Value(); CPPUNIT_ASSERT(value.empty()); - string ior = _orb->object_to_string(_sm); + std::string ior = _orb->object_to_string(_sm); //Check method SetValue _attr->SetValue(ior); diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributeInteger.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributeInteger.cxx index ac522f86d..9293dcba7 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributeInteger.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributeInteger.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_AttributeInteger * Use code of SALOMEDS_AttributeInteger.cxx diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributeLocalID.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributeLocalID.cxx index 892239cab..22c1c94cd 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributeLocalID.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributeLocalID.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_AttributeLocalID * Use code of SALOMEDS_AttributeLocalID.cxx diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributeName.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributeName.cxx index 851b5bafb..e86318f45 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributeName.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributeName.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_AttributeName * Use code of SALOMEDS_AttributeName.cxx @@ -52,7 +53,7 @@ void SALOMEDSTest::testAttributeName() CPPUNIT_ASSERT(_attr); //Check method Value - string value = _attr->Value(); + std::string value = _attr->Value(); CPPUNIT_ASSERT(value.empty()); diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributeOpened.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributeOpened.cxx index c96b532cf..b2cf79cbf 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributeOpened.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributeOpened.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_AttributeOpened * Use code of SALOMEDS_AttributeOpened.cxx diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributeParameter.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributeParameter.cxx index d56310482..a15d58d52 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributeParameter.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributeParameter.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #define PT_INTEGER 0 #define PT_REAL 1 #define PT_BOOLEAN 2 @@ -94,7 +95,7 @@ void SALOMEDSTest::testAttributeParameter() CPPUNIT_ASSERT(_attr->IsSet("BoolValue", PT_BOOLEAN)); CPPUNIT_ASSERT(!_attr->GetBool("BoolValue")); - vector intArray; + std::vector intArray; intArray.push_back(0); intArray.push_back(1); @@ -104,7 +105,7 @@ void SALOMEDSTest::testAttributeParameter() CPPUNIT_ASSERT(_attr->GetIntArray("IntArray")[0] == 0); CPPUNIT_ASSERT(_attr->GetIntArray("IntArray")[1] == 1); - vector realArray; + std::vector realArray; realArray.push_back(0.0); realArray.push_back(1.1); @@ -114,7 +115,7 @@ void SALOMEDSTest::testAttributeParameter() CPPUNIT_ASSERT(_attr->GetRealArray("RealArray")[0] == 0.0); CPPUNIT_ASSERT(_attr->GetRealArray("RealArray")[1] == 1.1); - vector strArray; + std::vector strArray; strArray.push_back("hello"); strArray.push_back("world"); diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributePersistentRef.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributePersistentRef.cxx index 335f63445..3e215020f 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributePersistentRef.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributePersistentRef.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_AttributePersistentRef * Use code of SALOMEDS_AttributePersistentRef.cxx @@ -52,7 +53,7 @@ void SALOMEDSTest::testAttributePersistentRef() CPPUNIT_ASSERT(_attr); //Check method Value - string value = _attr->Value(); + std::string value = _attr->Value(); CPPUNIT_ASSERT(value.empty()); diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributePixMap.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributePixMap.cxx index 7f9dec3e3..fb14a5a9e 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributePixMap.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributePixMap.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_AttributePixMap * Use code of SALOMEDS_AttributePixMap.cxx @@ -55,7 +56,7 @@ void SALOMEDSTest::testAttributePixMap() CPPUNIT_ASSERT(!_attr->HasPixMap()); //Check method SetPixMap - string pixmap = "something"; + std::string pixmap = "something"; _attr->SetPixMap(pixmap); CPPUNIT_ASSERT(_attr->HasPixMap()); diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributePythonObject.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributePythonObject.cxx index 592a58100..f0e993b69 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributePythonObject.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributePythonObject.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_AttributePythonObject * Use code of SALOMEDS_AttributePythonObject.cxx @@ -54,7 +55,7 @@ void SALOMEDSTest::testAttributePythonObject() //Check method IsScript CPPUNIT_ASSERT(!_attr->IsScript()); - string pyobj = "some object!"; + std::string pyobj = "some object!"; //Check method SetObject _attr->SetObject(pyobj, true); diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributeReal.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributeReal.cxx index a3fa0a475..575240641 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributeReal.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributeReal.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_AttributeReal * Use code of SALOMEDS_AttributeReal.cxx diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributeSelectable.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributeSelectable.cxx index 4ebb66f14..17ea6dc07 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributeSelectable.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributeSelectable.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_AttributeSelectable * Use code of SALOMEDS_AttributeSelectable.cxx diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributeSequenceOfInteger.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributeSequenceOfInteger.cxx index 22eac7421..860a2d1c1 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributeSequenceOfInteger.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributeSequenceOfInteger.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_AttributeSequenceOfInteger * Use code of SALOMEDS_AttributeSequenceOfInteger.cxx @@ -79,7 +80,7 @@ void SALOMEDSTest::testAttributeSequenceOfInteger() CPPUNIT_ASSERT(_attr->Value(3) == 3); //Check method CorbaSequence - vector v = _attr->CorbaSequence(); + std::vector v = _attr->CorbaSequence(); CPPUNIT_ASSERT(v.size() == 3); diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributeSequenceOfReal.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributeSequenceOfReal.cxx index fe68a5260..c2484b0f4 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributeSequenceOfReal.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributeSequenceOfReal.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_AttributeSequenceOfReal * Use code of SALOMEDS_AttributeSequenceOfReal.cxx @@ -78,7 +79,7 @@ void SALOMEDSTest::testAttributeSequenceOfReal() CPPUNIT_ASSERT(_attr->Value(3) == 3.3); //Check method CorbaSequence - vector v = _attr->CorbaSequence(); + std::vector v = _attr->CorbaSequence(); CPPUNIT_ASSERT(v.size() == 3); v.push_back(5.5); diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributeStudyProperties.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributeStudyProperties.cxx index 9ca2a20d4..4b98050dd 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributeStudyProperties.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributeStudyProperties.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_AttributeStudyProperties * Use code of SALOMEDS_AttributeStudyProperties.cxx @@ -67,7 +68,7 @@ void SALOMEDSTest::testAttributeStudyProperties() CPPUNIT_ASSERT(_attr->GetUserName() == "srn"); //Check method SetCreationMode - string value = "from scratch"; + std::string value = "from scratch"; _attr->SetCreationMode(value); //Check method GetCreationMode @@ -96,8 +97,8 @@ void SALOMEDSTest::testAttributeStudyProperties() _attr->SetModification("srn2", 6, 7, 8, 9, 10); //Check method GetModificationsList - vector vs; - vector vi[5]; + std::vector vs; + std::vector vi[5]; _attr->GetModificationsList(vs, vi[0], vi[1], vi[2], vi[3], vi[4], false); CPPUNIT_ASSERT(vs[0] == "srn2" && vi[0][0] == 6 && vi[1][0] == 7 && vi[2][0] == 8 && vi[3][0] == 9 && vi[4][0] == 10); diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributeTableOfInteger.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributeTableOfInteger.cxx index c8dd9749a..6dc3356d0 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributeTableOfInteger.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributeTableOfInteger.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_AttributeTableOfInteger * Use code of SALOMEDS_AttributeTableOfInteger.cxx @@ -84,14 +85,14 @@ void SALOMEDSTest::testAttributeTableOfInteger() CPPUNIT_ASSERT(_attr->GetValue(1, 1) == 23); //Check method GetRowSetIndices - vector rs = _attr->GetRowSetIndices(1); + std::vector rs = _attr->GetRowSetIndices(1); CPPUNIT_ASSERT(rs.size() == 1 && rs[0] == 1); _attr->PutValue(32, 2,2); CPPUNIT_ASSERT(_attr->HasValue(2, 2)); - vector rowTitles; + std::vector rowTitles; rowTitles.push_back("title1"); rowTitles.push_back("title2"); @@ -102,11 +103,11 @@ void SALOMEDSTest::testAttributeTableOfInteger() _attr->SetRowTitle(1, "new_title"); //Check method GetRowTitles - vector rt = _attr->GetRowTitles(); + std::vector rt = _attr->GetRowTitles(); CPPUNIT_ASSERT(rt.size() == 2 && rt[0] == "new_title" && rt[1] == "title2"); - vector colTitles; + std::vector colTitles; colTitles.push_back("title1"); colTitles.push_back("title2"); @@ -117,11 +118,11 @@ void SALOMEDSTest::testAttributeTableOfInteger() _attr->SetColumnTitle(1, "new_title"); //Check method GetColumnTitles - vector ct = _attr->GetColumnTitles(); + std::vector ct = _attr->GetColumnTitles(); CPPUNIT_ASSERT(ct.size() == 2 && ct[0] == "new_title" && ct[1] == "title2"); - vector rowUnits; + std::vector rowUnits; rowUnits.push_back("unit1"); rowUnits.push_back("unit2"); @@ -132,7 +133,7 @@ void SALOMEDSTest::testAttributeTableOfInteger() _attr->SetRowUnit(1, "new_unit"); //Check method GetRowUnits - vector ru = _attr->GetRowUnits(); + std::vector ru = _attr->GetRowUnits(); CPPUNIT_ASSERT(ru.size() == 2 && ru[0] == "new_unit" && ru[1] == "unit2"); @@ -140,7 +141,7 @@ void SALOMEDSTest::testAttributeTableOfInteger() CPPUNIT_ASSERT(_attr->GetNbColumns() == 2); //Check method AddRow - vector data; + std::vector data; data.push_back(11); data.push_back(22); @@ -149,7 +150,7 @@ void SALOMEDSTest::testAttributeTableOfInteger() CPPUNIT_ASSERT(_attr->GetNbRows() == 3); //Check method GetRow - vector data2 = _attr->GetRow(3); + std::vector data2 = _attr->GetRow(3); CPPUNIT_ASSERT(data2.size() == 2 && data2[0] == 11 && data2[1] == 22); diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributeTableOfReal.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributeTableOfReal.cxx index 7da99c8ba..aeb60d43e 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributeTableOfReal.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributeTableOfReal.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_AttributeTableOfReal * Use code of SALOMEDS_AttributeTableOfReal.cxx @@ -84,14 +85,14 @@ void SALOMEDSTest::testAttributeTableOfReal() CPPUNIT_ASSERT(_attr->GetValue(1, 1) == 23.23); //Check method GetRowSetIndices - vector rs = _attr->GetRowSetIndices(1); + std::vector rs = _attr->GetRowSetIndices(1); CPPUNIT_ASSERT(rs.size() == 1 && rs[0] == 1); _attr->PutValue(32.32, 2,2); CPPUNIT_ASSERT(_attr->HasValue(2, 2)); - vector rowTitles; + std::vector rowTitles; rowTitles.push_back("title1"); rowTitles.push_back("title2"); @@ -102,11 +103,11 @@ void SALOMEDSTest::testAttributeTableOfReal() _attr->SetRowTitle(1, "new_title"); //Check method GetRowTitles - vector rt = _attr->GetRowTitles(); + std::vector rt = _attr->GetRowTitles(); CPPUNIT_ASSERT(rt.size() == 2 && rt[0] == "new_title" && rt[1] == "title2"); - vector colTitles; + std::vector colTitles; colTitles.push_back("title1"); colTitles.push_back("title2"); @@ -117,11 +118,11 @@ void SALOMEDSTest::testAttributeTableOfReal() _attr->SetColumnTitle(1, "new_title"); //Check method GetColumnTitles - vector ct = _attr->GetColumnTitles(); + std::vector ct = _attr->GetColumnTitles(); CPPUNIT_ASSERT(ct.size() == 2 && ct[0] == "new_title" && ct[1] == "title2"); - vector rowUnits; + std::vector rowUnits; rowUnits.push_back("unit1"); rowUnits.push_back("unit2"); @@ -132,7 +133,7 @@ void SALOMEDSTest::testAttributeTableOfReal() _attr->SetRowUnit(1, "new_unit"); //Check method GetRowUnits - vector ru = _attr->GetRowUnits(); + std::vector ru = _attr->GetRowUnits(); CPPUNIT_ASSERT(ru.size() == 2 && ru[0] == "new_unit" && ru[1] == "unit2"); @@ -140,7 +141,7 @@ void SALOMEDSTest::testAttributeTableOfReal() CPPUNIT_ASSERT(_attr->GetNbColumns() == 2); //Check method AddRow - vector data; + std::vector data; data.push_back(11.11); data.push_back(22.22); @@ -149,7 +150,7 @@ void SALOMEDSTest::testAttributeTableOfReal() CPPUNIT_ASSERT(_attr->GetNbRows() == 3); //Check method GetRow - vector data2 = _attr->GetRow(3); + std::vector data2 = _attr->GetRow(3); CPPUNIT_ASSERT(data2.size() == 2 && data2[0] == 11.11 && data2[1] == 22.22); diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributeTableOfString.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributeTableOfString.cxx index 72951d7d4..fb66aea8b 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributeTableOfString.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributeTableOfString.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_AttributeTableOfString * Use code of SALOMEDS_AttributeTableOfString.cxx @@ -84,14 +85,14 @@ void SALOMEDSTest::testAttributeTableOfString() CPPUNIT_ASSERT(_attr->GetValue(1, 1) == "23"); //Check method GetRowSetIndices - vector rs = _attr->GetRowSetIndices(1); + std::vector rs = _attr->GetRowSetIndices(1); CPPUNIT_ASSERT(rs.size() == 1 && rs[0] == 1); _attr->PutValue("32", 2,2); CPPUNIT_ASSERT(_attr->HasValue(2, 2)); - vector rowTitles; + std::vector rowTitles; rowTitles.push_back("title1"); rowTitles.push_back("title2"); @@ -102,12 +103,12 @@ void SALOMEDSTest::testAttributeTableOfString() _attr->SetRowTitle(1, "new_title"); //Check method GetRowTitles - vector rt = _attr->GetRowTitles(); + std::vector rt = _attr->GetRowTitles(); CPPUNIT_ASSERT(rt.size() == 2 && rt[0] == "new_title" && rt[1] == "title2"); - vector colTitles; + std::vector colTitles; colTitles.push_back("title1"); colTitles.push_back("title2"); @@ -118,11 +119,11 @@ void SALOMEDSTest::testAttributeTableOfString() _attr->SetColumnTitle(1, "new_title"); //Check method GetColumnTitles - vector ct = _attr->GetColumnTitles(); + std::vector ct = _attr->GetColumnTitles(); CPPUNIT_ASSERT(ct.size() == 2 && ct[0] == "new_title" && ct[1] == "title2"); - vector rowUnits; + std::vector rowUnits; rowUnits.push_back("unit1"); rowUnits.push_back("unit2"); @@ -133,7 +134,7 @@ void SALOMEDSTest::testAttributeTableOfString() _attr->SetRowUnit(1, "new_unit"); //Check method GetRowUnits - vector ru = _attr->GetRowUnits(); + std::vector ru = _attr->GetRowUnits(); CPPUNIT_ASSERT(ru.size() == 2 && ru[0] == "new_unit" && ru[1] == "unit2"); @@ -141,7 +142,7 @@ void SALOMEDSTest::testAttributeTableOfString() CPPUNIT_ASSERT(_attr->GetNbColumns() == 2); //Check method AddRow - vector data; + std::vector data; data.push_back("11"); data.push_back("22"); @@ -150,7 +151,7 @@ void SALOMEDSTest::testAttributeTableOfString() CPPUNIT_ASSERT(_attr->GetNbRows() == 3); //Check method GetRow - vector data2 = _attr->GetRow(3); + std::vector data2 = _attr->GetRow(3); CPPUNIT_ASSERT(data2.size() == 2 && data2[0] == "11" && data2[1] == "22"); diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributeTarget.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributeTarget.cxx index 72ae366a0..c81382142 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributeTarget.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributeTarget.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_AttributeTarget * Use code of SALOMEDS_AttributeTarget.cxx @@ -66,7 +67,7 @@ void SALOMEDSTest::testAttributeTarget() _attr->Add(so2); //Check method Get - vector< _PTR(SObject) > v = _attr->Get(); + std::vector< _PTR(SObject) > v = _attr->Get(); CPPUNIT_ASSERT(v.size() == 2); diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributeTextColor.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributeTextColor.cxx index ace179de3..21a047723 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributeTextColor.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributeTextColor.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_AttributeTextColor * Use code of SALOMEDS_AttributeTextColor.cxx diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributeTextHighlightColor.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributeTextHighlightColor.cxx index f87a56172..4ef099df5 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributeTextHighlightColor.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributeTextHighlightColor.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_AttributeTextHighlightColor * Use code of SALOMEDS_AttributeTextHighlightColor.cxx diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributeTreeNode.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributeTreeNode.cxx index 00b8f6f96..5e0d379d7 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributeTreeNode.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributeTreeNode.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_AttributeTreeNode * Use code of SALOMEDS_AttributeTreeNode.cxx @@ -52,7 +53,7 @@ void SALOMEDSTest::testAttributeTreeNode() //Check the attribute creation CPPUNIT_ASSERT(_attr); - string TreeNodeID = "0e1c36e6-379b-4d90-ab3b-17a14310e648"; + std::string TreeNodeID = "0e1c36e6-379b-4d90-ab3b-17a14310e648"; _PTR(SObject) so1 = study->CreateObjectID("0:1:2"); @@ -180,12 +181,12 @@ void SALOMEDSTest::testAttributeTreeNode() CPPUNIT_ASSERT(_attr2->GetTreeID() == TreeNodeID); #else - cout << endl << "THE TEST IS NOT COMPLETE !!!" << endl; + std::cout << std::endl << "THE TEST IS NOT COMPLETE !!!" << std::endl; #endif //Try to create the attribute with given TreeID - string value = "0e1c36e6-1111-4d90-ab3b-18a14310e648"; + std::string value = "0e1c36e6-1111-4d90-ab3b-18a14310e648"; _PTR(AttributeTreeNode) _attr_guid = studyBuilder->FindOrCreateAttribute(so, "AttributeTreeNodeGUID"+value); CPPUNIT_ASSERT(_attr_guid && _attr_guid->GetTreeID() == value); diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributeUserID.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributeUserID.cxx index cb8a5dcdb..5aa891615 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributeUserID.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributeUserID.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_AttributeUserID * Use code of SALOMEDS_AttributeUserID.cxx @@ -51,7 +52,7 @@ void SALOMEDSTest::testAttributeUserID() //Check the attribute creation CPPUNIT_ASSERT(_attr); - string value = "0e1c36e6-379b-4d90-ab3b-17a14310e648"; + std::string value = "0e1c36e6-379b-4d90-ab3b-17a14310e648"; //Check method SetValue _attr->SetValue(value); diff --git a/src/SALOMEDS/Test/SALOMEDSTest_ChildIterator.cxx b/src/SALOMEDS/Test/SALOMEDSTest_ChildIterator.cxx index f9962172a..0333247b3 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_ChildIterator.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_ChildIterator.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_ChildIterator * Use code of SALOMEDS_ChildIterator.cxx diff --git a/src/SALOMEDS/Test/SALOMEDSTest_SComponent.cxx b/src/SALOMEDS/Test/SALOMEDSTest_SComponent.cxx index cafd14b31..eb5767145 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_SComponent.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_SComponent.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_SComponent * Use code of SALOMEDS_SComponent.cxx @@ -53,10 +54,10 @@ void SALOMEDSTest::testSComponent() //Check method ComponentIOR - string ior = _orb->object_to_string(_sm); + std::string ior = _orb->object_to_string(_sm); _attr->SetValue(ior); - string new_ior; + std::string new_ior; CPPUNIT_ASSERT(sco->ComponentIOR(new_ior)); CPPUNIT_ASSERT(new_ior == ior); diff --git a/src/SALOMEDS/Test/SALOMEDSTest_SComponentIterator.cxx b/src/SALOMEDS/Test/SALOMEDSTest_SComponentIterator.cxx index 349270f21..3f9b56152 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_SComponentIterator.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_SComponentIterator.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_SComponentIterator * Use code of SALOMEDS_SComponentIterator.cxx @@ -44,7 +45,7 @@ void SALOMEDSTest::testSComponentIterator() studyBuilder->NewComponent("Test1"); studyBuilder->NewComponent("Test2"); - vector v; + std::vector v; v.push_back("Test1"); v.push_back("Test2"); diff --git a/src/SALOMEDS/Test/SALOMEDSTest_SObject.cxx b/src/SALOMEDS/Test/SALOMEDSTest_SObject.cxx index 1145f3e22..f5fab11f0 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_SObject.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_SObject.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_SObject * Use code of SALOMEDS_SObject.cxx @@ -70,7 +71,7 @@ void SALOMEDSTest::testSObject() _PTR(AttributeName) _attrName = studyBuilder->FindOrCreateAttribute(so, "AttributeName"); _PTR(AttributeComment) _attrComment = studyBuilder->FindOrCreateAttribute(so, "AttributeComment"); - string ior = _orb->object_to_string(_sm); + std::string ior = _orb->object_to_string(_sm); _attrIOR->SetValue(ior); _attrName->SetValue("SO name"); _attrComment->SetValue("SO comment"); @@ -99,7 +100,7 @@ void SALOMEDSTest::testSObject() CPPUNIT_ASSERT(so->Name() == "test"); //Check method GetAllAttributes - vector< _PTR(GenericAttribute) > v = so->GetAllAttributes(); + std::vector< _PTR(GenericAttribute) > v = so->GetAllAttributes(); CPPUNIT_ASSERT(v.size() == 5); //+AttributeTarget +AttributeTreeNode diff --git a/src/SALOMEDS/Test/SALOMEDSTest_Study.cxx b/src/SALOMEDS/Test/SALOMEDSTest_Study.cxx index 47da3bd7d..1b9b96831 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_Study.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_Study.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_Study * Use code of SALOMEDS_Study.cxx @@ -101,7 +102,7 @@ void SALOMEDSTest::testStudy() CPPUNIT_ASSERT(!study->FindComponent("")); //Check method GetComponentNames - vector components = study->GetComponentNames(""); //The context doesn't matter + std::vector components = study->GetComponentNames(""); //The context doesn't matter CPPUNIT_ASSERT(components.size() == 1 && components[0] == "sco1"); //Check method FindComponentID @@ -121,7 +122,7 @@ void SALOMEDSTest::testStudy() _PTR(AttributeIOR) ior_attr_so1 = studyBuilder->FindOrCreateAttribute(so1, "AttributeIOR"); CPPUNIT_ASSERT(ior_attr_so1); - string ior = _orb->object_to_string(_sm); + std::string ior = _orb->object_to_string(_sm); ior_attr_so1->SetValue(ior); _PTR(SObject) so2 = studyBuilder->NewObject(so1); @@ -145,7 +146,7 @@ void SALOMEDSTest::testStudy() CPPUNIT_ASSERT(!study->FindObjectID("")); //Check method FindObjectByName - vector< _PTR(SObject) > v = study->FindObjectByName("so1", sco1->ComponentDataType()); + std::vector< _PTR(SObject) > v = study->FindObjectByName("so1", sco1->ComponentDataType()); CPPUNIT_ASSERT(v.size()==1 && v[0]->GetID() == so1->GetID()); //Try to find SObject with empty name and empty component type @@ -163,7 +164,7 @@ void SALOMEDSTest::testStudy() CPPUNIT_ASSERT(!study->FindObjectIOR("")); //Check method GetObjectPath - string path = study->GetObjectPath(so2); + std::string path = study->GetObjectPath(so2); //Try to get path of NULL SObject _PTR(SObject) emptySO; @@ -186,7 +187,7 @@ void SALOMEDSTest::testStudy() study->SetContext("/"); //Root //Check method GetObjectNames - vector vs = study->GetObjectNames("/sco1"); + std::vector vs = study->GetObjectNames("/sco1"); CPPUNIT_ASSERT(vs.size() == 2); //Check method GetDirectoryNames @@ -220,7 +221,7 @@ void SALOMEDSTest::testStudy() //Check method FindDependances studyBuilder->Addreference(so2, so1); studyBuilder->Addreference(sco1, so1); - vector< _PTR(SObject) > vso = study->FindDependances(so1); + std::vector< _PTR(SObject) > vso = study->FindDependances(so1); CPPUNIT_ASSERT(vso.size() == 2 && vso[0]->GetID() == so2->GetID() && vso[1]->GetID() == sco1->GetID()); //Check method GetProperties @@ -251,7 +252,7 @@ void SALOMEDSTest::testStudy() //Check method GetLastModificationDate sp->SetModification("srn", 1, 2, 3, 4, 5); sp->SetModification("srn", 6, 7, 8, 9, 10); - string date = study->GetLastModificationDate(); + std::string date = study->GetLastModificationDate(); CPPUNIT_ASSERT(date == "08/09/0010 07:06"); @@ -314,22 +315,22 @@ void SALOMEDSTest::testStudy() //Check method EnableUseCaseAutoFilling study->EnableUseCaseAutoFilling(false); _PTR(SObject) uso1 = study->NewBuilder()->NewObject(sco1); - vector< _PTR(GenericAttribute) > va1 = uso1->GetAllAttributes(); + std::vector< _PTR(GenericAttribute) > va1 = uso1->GetAllAttributes(); CPPUNIT_ASSERT(va1.size() == 0); study->EnableUseCaseAutoFilling(true); _PTR(SObject) uso2 = study->NewBuilder()->NewObject(sco1); - vector< _PTR(GenericAttribute) > va2 = uso2->GetAllAttributes(); + std::vector< _PTR(GenericAttribute) > va2 = uso2->GetAllAttributes(); CPPUNIT_ASSERT(va2.size() == 1); // +AttributeTreeNode //Check method DumpStudy - study->DumpStudy(".", "SRN", false); + study->DumpStudy(".", "SRN", false, false); - fstream f("SRN.py"); + std::fstream f("SRN.py"); char buffer[128]; buffer[81] = (char)0; f.getline(buffer, 80); - string line(buffer); + std::string line(buffer); f.close(); system("rm -f SRN.py"); diff --git a/src/SALOMEDS/Test/SALOMEDSTest_StudyBuilder.cxx b/src/SALOMEDS/Test/SALOMEDSTest_StudyBuilder.cxx index 240a9343a..41f580a55 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_StudyBuilder.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_StudyBuilder.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_StudyBuilder * Use code of SALOMEDS_StudyBuilder.cxx @@ -47,9 +48,9 @@ void SALOMEDSTest::testStudyBuilder() CPPUNIT_ASSERT(sco1 && sco1->ComponentDataType() == "Test"); //Check method DefineComponentInstance - string ior = _orb->object_to_string(_sm); + std::string ior = _orb->object_to_string(_sm); studyBuilder->DefineComponentInstance(sco1, ior); - string newior; + std::string newior; sco1->ComponentIOR(newior); CPPUNIT_ASSERT(newior == ior); @@ -68,12 +69,12 @@ void SALOMEDSTest::testStudyBuilder() //Check method NewObject _PTR(SObject) so1 = studyBuilder->NewObject(sco3); CPPUNIT_ASSERT(so1); - string id1 = so1->GetID(); + std::string id1 = so1->GetID(); //Check method NewObjectToTag _PTR(SObject) so2 = studyBuilder->NewObjectToTag(so1, 2); CPPUNIT_ASSERT(so2 && so2->Tag() == 2); - string id2 = so2->GetID(); + std::string id2 = so2->GetID(); //Check method FindOrCreateAttribute _PTR(SObject) so3 = studyBuilder->NewObject(sco3); @@ -129,7 +130,7 @@ void SALOMEDSTest::testStudyBuilder() CPPUNIT_ASSERT(!so2->ReferencedObject(refSO)); //Check method SetGUID and IsGUID - string value = "0e1c36e6-379b-4d90-ab3b-17a14310e648"; + std::string value = "0e1c36e6-379b-4d90-ab3b-17a14310e648"; studyBuilder->SetGUID(so1, value); CPPUNIT_ASSERT(studyBuilder->IsGUID(so1, value)); diff --git a/src/SALOMEDS/Test/SALOMEDSTest_StudyManager.cxx b/src/SALOMEDS/Test/SALOMEDSTest_StudyManager.cxx index 0b9216ba5..2514fd740 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_StudyManager.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_StudyManager.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_StudyManager * Use code of SALOMEDS_StudyManager.cxx @@ -57,7 +58,7 @@ void SALOMEDSTest::testStudyManager() CPPUNIT_ASSERT(study4->Name() == study2->Name()); //Check method GetOpenStudies - vector v = sm->GetOpenStudies(); + std::vector v = sm->GetOpenStudies(); CPPUNIT_ASSERT(v.size() == 2); //Check method Close @@ -92,7 +93,7 @@ void SALOMEDSTest::testStudyManager() //Check method SaveAs sm->SaveAs("srn_UnitTest_Save.hdf", study1, false); - string url = study1->URL(); + std::string url = study1->URL(); sm->Close(study1); //Check method Open @@ -108,7 +109,7 @@ void SALOMEDSTest::testStudyManager() CPPUNIT_ASSERT(sco3); // Add a new SObject with AttributeName that contains "Saved study" string _PTR(SObject) so3 = sb3->NewObject(sco3); - string soID = so3->GetID(); + std::string soID = so3->GetID(); _PTR(AttributeName) na3 = sb3->FindOrCreateAttribute(so3, "AttributeName"); CPPUNIT_ASSERT(na3); diff --git a/src/SALOMEDS/Test/SALOMEDSTest_UseCase.cxx b/src/SALOMEDS/Test/SALOMEDSTest_UseCase.cxx index 2d73113dd..c2c2d7af4 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_UseCase.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_UseCase.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + /*! * Check all methods of SALOMEDS_UseCaseBuilder and UseCaseIterator * Use code of SALOMEDS_UseCaseBuilder.cxx and SALOMEDS_UseCaseIterator.cxx diff --git a/src/SALOMEDS/Test/TestSALOMEDS.cxx b/src/SALOMEDS/Test/TestSALOMEDS.cxx index 4d1d7ac4e..117a494bc 100644 --- a/src/SALOMEDS/Test/TestSALOMEDS.cxx +++ b/src/SALOMEDS/Test/TestSALOMEDS.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // --- include all SALOMEDS Test from basics until the present directory // #include "SALOMELocalTraceTest.hxx" @@ -52,7 +53,6 @@ CPPUNIT_TEST_SUITE_REGISTRATION( SALOMEDSTest_Embedded ); #include "NamingService_WaitForServerReadiness.hxx" #include "SALOMEDS_StudyManager_i.hxx" -using namespace std; // ============================================================================ /*! @@ -75,10 +75,10 @@ int main(int argc, char* argv[]) int size; gethostname(hostname, size); char* chr_port = getenv("SALOMEDS_UNITTESTS_PORT"); - string port; + std::string port; if(chr_port) port = chr_port; if(port.empty()) port = "2810"; - string cfg_file = string(getenv("HOME"))+"/.omniORB_"+string(hostname)+"_"+port+".cfg"; + std::string cfg_file = std::string(getenv("HOME"))+"/.omniORB_"+std::string(hostname)+"_"+port+".cfg"; setenv("OMNIORB_CONFIG", cfg_file.c_str(), 1); ORB_INIT &init = *SINGLETON_::Instance() ; @@ -87,7 +87,7 @@ int main(int argc, char* argv[]) sleep(15); - string host; // = Kernel_Utils::GetHostname(); + std::string host; // = Kernel_Utils::GetHostname(); char* wait_Superv = getenv("SALOMEDS_UNITTESTS_WAIT_SUPERVISOR"); if(wait_Superv) host = Kernel_Utils::GetHostname(); @@ -95,7 +95,7 @@ int main(int argc, char* argv[]) if(host.empty()) NamingService_WaitForServerReadiness(&NS, "/myStudyManager"); else { - string serverName = "/Containers/"+host+"/SuperVisionContainer"; + std::string serverName = "/Containers/"+host+"/SuperVisionContainer"; NamingService_WaitForServerReadiness(&NS, serverName); } @@ -106,13 +106,13 @@ int main(int argc, char* argv[]) } //Set up the environement for Embedded case - string kernel_root = getenv("KERNEL_ROOT_DIR"); + std::string kernel_root = getenv("KERNEL_ROOT_DIR"); CPPUNIT_ASSERT(!kernel_root.empty()); kernel_root+="/share/salome/resources/kernel"; CORBA::Object_var poaObj = orb->resolve_initial_references("RootPOA"); if(!CORBA::is_nil(poaObj)) { - PortableServer::POA_var poa = PortableServer::POA::_narrow(poaObj); + PortableServer::POA_var poa = PortableServer::POA::_narrow(poaObj); SALOMEDS_StudyManager_i * aStudyManager_i = new SALOMEDS_StudyManager_i(orb, poa); // Activate the objects. This tells the POA that the objects are ready to accept requests. diff --git a/src/SALOMEDS/Test/TestSALOMEDS.py b/src/SALOMEDS/Test/TestSALOMEDS.py index 71066f35c..c55bbc354 100644 --- a/src/SALOMEDS/Test/TestSALOMEDS.py +++ b/src/SALOMEDS/Test/TestSALOMEDS.py @@ -1,24 +1,26 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + import sys, os,signal,string,commands import runSalome import orbmodule diff --git a/src/SALOMEDSClient/Makefile.am b/src/SALOMEDSClient/Makefile.am index f1534abe8..9e65df0b2 100644 --- a/src/SALOMEDSClient/Makefile.am +++ b/src/SALOMEDSClient/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # SALOMEDSClient: client interface of SALOMEDS # File : Makefile.am # Author : Guillaume Boulant (CSSI) @@ -48,6 +49,7 @@ salomeinclude_HEADERS=\ SALOMEDSClient_AttributeSequenceOfInteger.hxx \ SALOMEDSClient_AttributeSequenceOfReal.hxx \ SALOMEDSClient_AttributeStudyProperties.hxx \ + SALOMEDSClient_AttributeTable.hxx \ SALOMEDSClient_AttributeTableOfInteger.hxx \ SALOMEDSClient_AttributeTableOfReal.hxx \ SALOMEDSClient_AttributeTableOfString.hxx \ @@ -70,6 +72,7 @@ salomeinclude_HEADERS=\ SALOMEDSClient_UseCaseIterator.hxx \ SALOMEDSClient_ClientFactory.hxx \ SALOMEDSClient_IParameters.hxx \ + SALOMEDSClient_Observer.hxx \ SALOMEDSClient.hxx # @@ -81,7 +84,6 @@ salomeinclude_HEADERS=\ # This local variable defines the list of CPPFLAGS common to all target in this package. COMMON_CPPFLAGS= \ @BOOST_CPPFLAGS@ \ - -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ diff --git a/src/SALOMEDSClient/SALOMEDSClient.hxx b/src/SALOMEDSClient/SALOMEDSClient.hxx index 2054714c3..cb606ef13 100644 --- a/src/SALOMEDSClient/SALOMEDSClient.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef SALOMEDSCLIENT_HXX #define SALOMEDSCLIENT_HXX diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributeComment.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributeComment.hxx index f4340ff02..373e543c1 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributeComment.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributeComment.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_AttributeComment.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributeDrawable.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributeDrawable.hxx index c0a31999d..b204a807e 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributeDrawable.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributeDrawable.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_AttributeDrawable.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributeExpandable.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributeExpandable.hxx index 0f3b21e06..e8b6558dc 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributeExpandable.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributeExpandable.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_AttributeExpandable.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributeExternalFileDef.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributeExternalFileDef.hxx index aadfd041b..f470ba97f 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributeExternalFileDef.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributeExternalFileDef.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_AttributeExternalFileDef.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributeFileType.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributeFileType.hxx index 4169f4939..19d57ca25 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributeFileType.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributeFileType.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_AttributeFileType.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributeFlags.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributeFlags.hxx index e80684330..0ad7092e1 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributeFlags.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributeFlags.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_AttributeFlags.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributeGraphic.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributeGraphic.hxx index 03f838763..fcf349766 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributeGraphic.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributeGraphic.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_AttributeFlags.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributeIOR.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributeIOR.hxx index 8ac8ebf30..cb7d42dfc 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributeIOR.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributeIOR.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_AttributeIOR.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributeInteger.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributeInteger.hxx index 4d0b3293a..40ab335be 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributeInteger.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributeInteger.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_AttributeInteger.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributeLocalID.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributeLocalID.hxx index 30a402f6d..5f8f46ac1 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributeLocalID.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributeLocalID.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_AttributeLocalID.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributeName.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributeName.hxx index 96f20c41b..117a8df37 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributeName.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributeName.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_AttributeName.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributeOpened.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributeOpened.hxx index 59a68886e..9044630ae 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributeOpened.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributeOpened.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_AttributeOpened.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributeParameter.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributeParameter.hxx index 80661ff28..f0549600e 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributeParameter.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributeParameter.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeIOR.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributePersistentRef.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributePersistentRef.hxx index ba5e96f55..4211f3662 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributePersistentRef.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributePersistentRef.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_AttributePersistentRef.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributePixMap.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributePixMap.hxx index 85373abb4..917fc65ba 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributePixMap.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributePixMap.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_AttributePixMap.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributePythonObject.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributePythonObject.hxx index 3708df260..15bf1f17a 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributePythonObject.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributePythonObject.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_AttributePythonObject.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributeReal.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributeReal.hxx index b2c41db7d..2623e3192 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributeReal.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributeReal.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_AttributeReal.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributeSelectable.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributeSelectable.hxx index 70a5951e3..8bf7ae302 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributeSelectable.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributeSelectable.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_AttributeSelectable.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributeSequenceOfInteger.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributeSequenceOfInteger.hxx index 52911ab41..5215c1709 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributeSequenceOfInteger.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributeSequenceOfInteger.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_AttributeSequenceOfInteger.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributeSequenceOfReal.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributeSequenceOfReal.hxx index ab03fe892..19c1589ee 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributeSequenceOfReal.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributeSequenceOfReal.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_AttributeSequenceOfSequenceOfReal.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributeString.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributeString.hxx index 29cade26d..b1baa7c03 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributeString.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributeString.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_AttributeString.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributeStudyProperties.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributeStudyProperties.hxx index 03420a3e3..de3f9a5cb 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributeStudyProperties.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributeStudyProperties.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_AttributeStudyProperties.hxx // Author : Sergey RUIN // Module : SALOME @@ -47,18 +48,25 @@ public: virtual void SetLocked(bool theLocked) = 0; virtual bool IsLocked() = 0; virtual void SetModification(const std::string& theName, - int theMinute, - int theHour, - int theDay, - int theMonth, - int theYear) = 0; + int theMinute, + int theHour, + int theDay, + int theMonth, + int theYear) = 0; virtual void GetModificationsList(std::vector& theNames, - std::vector& theMinutes, - std::vector& theHours, - std::vector& theDays, - std::vector& theMonths, - std::vector& theYears, - bool theWithCreator) = 0; + std::vector& theMinutes, + std::vector& theHours, + std::vector& theDays, + std::vector& theMonths, + std::vector& theYears, + bool theWithCreator) = 0; + + virtual void SetUnits(const std::string& theUnits) = 0; + virtual std::string GetUnits() = 0; + + virtual void SetComment(const std::string& theComment) = 0; + virtual std::string GetComment() = 0; + }; diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributeTable.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributeTable.hxx new file mode 100644 index 000000000..b3e9e17f2 --- /dev/null +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributeTable.hxx @@ -0,0 +1,79 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +// File : SALOMEDSClient_AttributeTable.hxx +// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) +// +#ifndef SALOMEDSClient_AttributeTable_HeaderFile +#define SALOMEDSClient_AttributeTable_HeaderFile + +#include +#include +#include "SALOMEDSClient_definitions.hxx" +#include "SALOMEDSClient_GenericAttribute.hxx" + +class SALOMEDSClient_AttributeTable: public virtual SALOMEDSClient_GenericAttribute +{ +public: + typedef enum { + AscendingOrder, + DescendingOrder, + } SortOrder; + + typedef enum { + EmptyLowest, + EmptyHighest, + EmptyFirst, + EmptyLast, + EmptyIgnore, + } SortPolicy; + + virtual void SetTitle(const std::string& theTitle) = 0; + virtual std::string GetTitle() = 0; + virtual void SetRowTitle(int theIndex, const std::string& theTitle) = 0; + virtual std::string GetRowTitle(int theIndex) = 0; + virtual void SetRowTitles(const std::vector& theTitles) = 0; + virtual std::vector GetRowTitles() = 0; + virtual void SetColumnTitle(int theIndex, const std::string& theTitle) = 0; + virtual std::string GetColumnTitle(int theIndex) = 0; + virtual void SetColumnTitles(const std::vector& theTitles) = 0; + virtual std::vector GetColumnTitles() = 0; + virtual void SetRowUnit(int theIndex, const std::string& theUnit) = 0; + virtual std::string GetRowUnit(int theIndex) = 0; + virtual void SetRowUnits(const std::vector& theUnits) = 0; + virtual std::vector GetRowUnits() = 0; + + virtual int GetNbRows() = 0; + virtual int GetNbColumns() = 0; + virtual bool HasValue(int theRow, int theColumn) = 0; + virtual void RemoveValue(int theRow, int theColumn) = 0; + + virtual std::vector GetRowSetIndices(int theRow) = 0; + virtual void SetNbColumns(int theNbColumns) = 0; + + virtual std::vector SortRow(int theRow, SortOrder theOrder, SortPolicy thePolicy) = 0; + virtual std::vector SortColumn(int theColumn, SortOrder theOrder, SortPolicy thePolicy) = 0; + virtual std::vector SortByRow(int theRow, SortOrder theOrder, SortPolicy thePolicy) = 0; + virtual std::vector SortByColumn(int theColumn, SortOrder theOrder, SortPolicy thePolicy) = 0; + virtual void SwapCells(int theRow1, int theColumn1, int theRow2, int theColumn2) = 0; + virtual void SwapRows(int theRow1, int theRow2) = 0; + virtual void SwapColumns(int theColumn1, int theColumn2) = 0; +}; + +#endif // SALOMEDSClient_AttributeTable_HeaderFile diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributeTableOfInteger.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributeTableOfInteger.hxx index 1f3bff0ff..9007cfeee 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributeTableOfInteger.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributeTableOfInteger.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_AttributeTableOfInteger.hxx // Author : Sergey RUIN // Module : SALOME @@ -29,28 +30,11 @@ #include #include #include "SALOMEDSClient_definitions.hxx" -#include "SALOMEDSClient_GenericAttribute.hxx" +#include "SALOMEDSClient_AttributeTable.hxx" -class SALOMEDSClient_AttributeTableOfInteger: public virtual SALOMEDSClient_GenericAttribute +class SALOMEDSClient_AttributeTableOfInteger: public SALOMEDSClient_AttributeTable { - public: - - virtual void SetTitle(const std::string& theTitle) = 0; - virtual std::string GetTitle() = 0; - virtual void SetRowTitle(int theIndex, const std::string& theTitle) = 0; - virtual void SetRowTitles(const std::vector& theTitles) = 0; - virtual std::vector GetRowTitles() = 0; - virtual void SetColumnTitle(int theIndex, const std::string& theTitle) = 0; - virtual void SetColumnTitles(const std::vector& theTitles) = 0; - virtual std::vector GetColumnTitles() = 0; - - virtual void SetRowUnit(int theIndex, const std::string& theUnit) = 0; - virtual void SetRowUnits(const std::vector& theUnits) = 0; - virtual std::vector GetRowUnits() = 0; - - virtual int GetNbRows() = 0; - virtual int GetNbColumns() = 0; virtual void AddRow(const std::vector& theData) = 0; virtual void SetRow(int theRow, const std::vector& theData) = 0; virtual std::vector GetRow(int theRow) = 0; @@ -58,12 +42,7 @@ public: virtual void SetColumn(int theColumn, const std::vector& theData) = 0; virtual std::vector GetColumn(int theColumn) = 0; virtual void PutValue(int theValue, int theRow, int theColumn) = 0; - virtual bool HasValue(int theRow, int theColumn) = 0; virtual int GetValue(int theRow, int theColumn) = 0; - - virtual std::vector GetRowSetIndices(int theRow) = 0; - virtual void SetNbColumns(int theNbColumns) = 0; - }; -#endif +#endif // SALOMEDSClient_AttributeTableOfInteger_HeaderFile diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributeTableOfReal.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributeTableOfReal.hxx index 22b614de1..9d4964c7b 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributeTableOfReal.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributeTableOfReal.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_AttributeTableOfReal.hxx // Author : Michael Ponikarov // Module : SALOME @@ -29,27 +30,11 @@ #include #include #include "SALOMEDSClient_definitions.hxx" -#include "SALOMEDSClient_GenericAttribute.hxx" +#include "SALOMEDSClient_AttributeTable.hxx" -class SALOMEDSClient_AttributeTableOfReal: public virtual SALOMEDSClient_GenericAttribute +class SALOMEDSClient_AttributeTableOfReal: public SALOMEDSClient_AttributeTable { - public: - - virtual void SetTitle(const std::string& theTitle) = 0; - virtual std::string GetTitle() = 0; - virtual void SetRowTitle(int theIndex, const std::string& theTitle) = 0; - virtual void SetRowTitles(const std::vector& theTitles) = 0; - virtual std::vector GetRowTitles() = 0; - virtual void SetColumnTitle(int theIndex, const std::string& theTitle) = 0; - virtual void SetColumnTitles(const std::vector& theTitles) = 0; - virtual std::vector GetColumnTitles() = 0; - virtual void SetRowUnit(int theIndex, const std::string& theUnit) = 0; - virtual void SetRowUnits(const std::vector& theUnits) = 0; - virtual std::vector GetRowUnits() = 0; - - virtual int GetNbRows() = 0; - virtual int GetNbColumns() = 0; virtual void AddRow(const std::vector& theData) = 0; virtual void SetRow(int theRow, const std::vector& theData) = 0; virtual std::vector GetRow(int theRow) = 0; @@ -57,12 +42,7 @@ public: virtual void SetColumn(int theColumn, const std::vector& theData) = 0; virtual std::vector GetColumn(int theColumn) = 0; virtual void PutValue(double theValue, int theRow, int theColumn) = 0; - virtual bool HasValue(int theRow, int theColumn) = 0; virtual double GetValue(int theRow, int theColumn) = 0; - - virtual std::vector GetRowSetIndices(int theRow) = 0; - virtual void SetNbColumns(int theNbColumns) = 0; - }; -#endif +#endif // SALOMEDSClient_AttributeTableOfReal_HeaderFile diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributeTableOfString.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributeTableOfString.hxx index 5bed53cd9..87d1de10b 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributeTableOfString.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributeTableOfString.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_AttributeTableOfString.hxx // Author : Sergey RUIN // Module : SALOME @@ -29,27 +30,11 @@ #include #include #include "SALOMEDSClient_definitions.hxx" -#include "SALOMEDSClient_GenericAttribute.hxx" +#include "SALOMEDSClient_AttributeTable.hxx" -class SALOMEDSClient_AttributeTableOfString: public virtual SALOMEDSClient_GenericAttribute +class SALOMEDSClient_AttributeTableOfString: public SALOMEDSClient_AttributeTable { public: - - virtual void SetTitle(const std::string& theTitle) = 0; - virtual std::string GetTitle() = 0; - virtual void SetRowTitle(int theIndex, const std::string& theTitle) = 0; - virtual void SetRowTitles(const std::vector& theTitles) = 0; - virtual std::vector GetRowTitles() = 0; - virtual void SetColumnTitle(int theIndex, const std::string& theTitle) = 0; - virtual void SetColumnTitles(const std::vector& theTitles) = 0; - virtual std::vector GetColumnTitles() = 0; - - virtual void SetRowUnit(int theIndex, const std::string& theUnit) = 0; - virtual void SetRowUnits(const std::vector& theUnits) = 0; - virtual std::vector GetRowUnits() = 0; - - virtual int GetNbRows() = 0; - virtual int GetNbColumns() = 0; virtual void AddRow(const std::vector& theData) = 0; virtual void SetRow(int theRow, const std::vector& theData) = 0; virtual std::vector GetRow(int theRow) = 0; @@ -57,12 +42,7 @@ public: virtual void SetColumn(int theColumn, const std::vector& theData) = 0; virtual std::vector GetColumn(int theColumn) = 0; virtual void PutValue(const std::string& theValue, int theRow, int theColumn) = 0; - virtual bool HasValue(int theRow, int theColumn) = 0; virtual std::string GetValue(int theRow, int theColumn) = 0; - - virtual std::vector GetRowSetIndices(int theRow) = 0; - virtual void SetNbColumns(int theNbColumns) = 0; - }; -#endif +#endif // SALOMEDSClient_AttributeTableOfString_HeaderFile diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributeTarget.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributeTarget.hxx index 5ae0317dd..f05eeaba8 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributeTarget.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributeTarget.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_AttributeTarget.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributeTextColor.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributeTextColor.hxx index 1bef38d15..d436fc5e7 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributeTextColor.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributeTextColor.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_AttributeTextColor.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributeTextHighlightColor.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributeTextHighlightColor.hxx index ebfe3a368..d4e285205 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributeTextHighlightColor.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributeTextHighlightColor.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_AttributeTextHighlightColor.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributeTreeNode.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributeTreeNode.hxx index b57a985c1..6fecf98a5 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributeTreeNode.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributeTreeNode.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_AttributeTreeNode.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributeUserID.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributeUserID.hxx index cedb5bb52..8dfc8c612 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_AttributeUserID.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributeUserID.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_AttributeUserID.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_ChildIterator.hxx b/src/SALOMEDSClient/SALOMEDSClient_ChildIterator.hxx index dd69bcb64..ba8571222 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_ChildIterator.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_ChildIterator.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_ChildIterator.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_ClientFactory.cxx b/src/SALOMEDSClient/SALOMEDSClient_ClientFactory.cxx index e6bb5367a..2d299d413 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_ClientFactory.cxx +++ b/src/SALOMEDSClient/SALOMEDSClient_ClientFactory.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "SALOMEDSClient_ClientFactory.hxx" #ifdef WIN32 @@ -65,8 +66,6 @@ static CONVERT_SOBJECT_FUNCTION aConvertSObject = NULL; static CONVERT_STUDY_FUNCTION aConvertStudy = NULL; static CONVERT_BUILDER_FUNCTION aConvertBuilder = NULL; -using namespace std; - _PTR(SObject) ClientFactory::SObject(SALOMEDS::SObject_ptr theSObject) { SALOMEDSClient_SObject* so = NULL; diff --git a/src/SALOMEDSClient/SALOMEDSClient_ClientFactory.hxx b/src/SALOMEDSClient/SALOMEDSClient_ClientFactory.hxx index 77f38f3e9..851e337cb 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_ClientFactory.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_ClientFactory.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_ClientFactory.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_GenericAttribute.hxx b/src/SALOMEDSClient/SALOMEDSClient_GenericAttribute.hxx index b086bc963..3abfaf34e 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_GenericAttribute.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_GenericAttribute.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient__GenericAttribute.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_IParameters.hxx b/src/SALOMEDSClient/SALOMEDSClient_IParameters.hxx index ac249d9d3..e42ebca85 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_IParameters.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_IParameters.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef SALOMEDSClient_IParameters_H #define SALOMEDSClient_IParameters_H @@ -75,6 +76,16 @@ public: */ virtual std::string getParameter(const std::string& entry, const std::string& parameterName) = 0; + /*! + Sets an id parameter value for the given entry. + */ + virtual void setIdParameter(const std::string& entry, const std::string& value) = 0; + + /*! + Gets an id parameter value for the given entry + */ + virtual std::string getIdParameter(const std::string& entry) = 0; + /*! Returns all parameter names of the given entry */ diff --git a/src/SALOMEDSClient/SALOMEDSClient_Observer.hxx b/src/SALOMEDSClient/SALOMEDSClient_Observer.hxx new file mode 100644 index 000000000..97852d68b --- /dev/null +++ b/src/SALOMEDSClient/SALOMEDSClient_Observer.hxx @@ -0,0 +1,41 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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 +// + +// File : SALOMEDSClient_Observer.hxx +// Author : Nicolas GEIMER +// Module : SALOME +// +#ifndef __SALOMEDSClient_OBSERVER_H__ +#define __SALOMEDSClient_OBSERVER_H__ + +#include + +class SALOMEDSClient_Observer +{ + + public: + virtual void notifyObserver(const std::string& theID,const std::string& event) = 0; + +}; + + +#endif diff --git a/src/SALOMEDSClient/SALOMEDSClient_SComponent.hxx b/src/SALOMEDSClient/SALOMEDSClient_SComponent.hxx index 9e2e6a326..dd0ea4a7a 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_SComponent.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_SComponent.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_SComponent.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_SComponentIterator.hxx b/src/SALOMEDSClient/SALOMEDSClient_SComponentIterator.hxx index 8fbf3a391..8c991e864 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_SComponentIterator.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_SComponentIterator.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_SComponentIterator.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_SObject.hxx b/src/SALOMEDSClient/SALOMEDSClient_SObject.hxx index 28210a84f..8c92d3067 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_SObject.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_SObject.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_SObject.hxx // Author : Sergey RUIN // Module : SALOME @@ -41,6 +42,7 @@ class SALOMEDSClient_SObject public: virtual ~SALOMEDSClient_SObject() {} + virtual bool IsNull() const = 0; virtual std::string GetID() = 0; virtual _PTR(SComponent) GetFatherComponent() = 0; virtual _PTR(SObject) GetFather() = 0; diff --git a/src/SALOMEDSClient/SALOMEDSClient_Study.hxx b/src/SALOMEDSClient/SALOMEDSClient_Study.hxx index 3177e9ba9..7dfe851db 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_Study.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_Study.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_Study.hxx // Author : Sergey RUIN // Module : SALOME @@ -38,6 +39,9 @@ #include "SALOMEDSClient_UseCaseBuilder.hxx" #include "SALOMEDSClient_AttributeStudyProperties.hxx" #include "SALOMEDSClient_ChildIterator.hxx" +#include "SALOMEDSClient_Observer.hxx" +#include +#include CORBA_CLIENT_HEADER(SALOMEDS) class SALOMEDSClient_Study { @@ -84,11 +88,12 @@ public: virtual void Close() = 0; virtual void EnableUseCaseAutoFilling(bool isEnabled) = 0; virtual bool DumpStudy(const std::string& thePath, - const std::string& theBaseName, - bool isPublished) = 0; + const std::string& theBaseName, + bool isPublished, + bool isMultiFile) = 0; virtual _PTR(AttributeParameter) GetCommonParameters(const std::string& theID, int theSavePoint) = 0; virtual _PTR(AttributeParameter) GetModuleParameters(const std::string& theID, - const std::string& theModuleName, int theSavePoint) = 0; + const std::string& theModuleName, int theSavePoint) = 0; virtual void SetStudyLock(const std::string& theLockerID) = 0; virtual bool IsStudyLocked() = 0; virtual void UnLockStudy(const std::string& theLockerID) = 0; @@ -97,25 +102,31 @@ public: virtual void SetReal(const std::string& theVarName, const double theValue) = 0; virtual void SetInteger(const std::string& theVarName, const int theValue) = 0; virtual void SetBoolean(const std::string& theVarName, const bool theValue) = 0; + virtual void SetString(const std::string& theVarName, const std::string& theValue) = 0; + virtual void SetStringAsDouble(const std::string& theVarName, const double theValue) = 0; virtual double GetReal(const std::string& theVarName) = 0; virtual int GetInteger(const std::string& theVarName) = 0; virtual bool GetBoolean(const std::string& theVarName) = 0; + virtual std::string GetString(const std::string& theVarName) = 0; virtual bool IsReal(const std::string& theVarName) = 0; virtual bool IsInteger(const std::string& theVarName) = 0; virtual bool IsBoolean(const std::string& theVarName) = 0; + virtual bool IsString(const std::string& theVarName) = 0; virtual bool IsVariable(const std::string& theVarName) = 0; virtual std::vector GetVariableNames() = 0; virtual bool RemoveVariable(const std::string& theVarName) = 0; virtual bool RenameVariable(const std::string& theVarName, - const std::string& theNewVarName) = 0; + const std::string& theNewVarName) = 0; virtual bool IsVariableUsed(const std::string& theVarName) = 0; virtual std::vector< std::vector > ParseVariables(const std::string& theVars) = 0; - + + virtual void attach(SALOMEDS::Observer_ptr theObserver,bool modify) = 0; + }; diff --git a/src/SALOMEDSClient/SALOMEDSClient_StudyBuilder.hxx b/src/SALOMEDSClient/SALOMEDSClient_StudyBuilder.hxx index ae02f303b..4a160bccf 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_StudyBuilder.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_StudyBuilder.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_StudyBuilder.hxx // Author : Sergey RUIN // Module : SALOME @@ -50,7 +51,7 @@ public: virtual _PTR(GenericAttribute) FindOrCreateAttribute(const _PTR(SObject)& theSO, const std::string& aTypeOfAttribute) = 0; virtual bool FindAttribute(const _PTR(SObject)& theSO, _PTR(GenericAttribute)& theAttribute, - const std::string& aTypeOfAttribute) = 0; + const std::string& aTypeOfAttribute) = 0; virtual void RemoveAttribute(const _PTR(SObject)& theSO, const std::string& aTypeOfAttribute) = 0; virtual void Addreference(const _PTR(SObject)& me, const _PTR(SObject)& thereferencedObject) = 0; virtual void RemoveReference(const _PTR(SObject)& me) = 0; diff --git a/src/SALOMEDSClient/SALOMEDSClient_StudyManager.hxx b/src/SALOMEDSClient/SALOMEDSClient_StudyManager.hxx index 9d551ef78..a7081c4f2 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_StudyManager.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_StudyManager.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_StudyManager.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_UseCaseBuilder.hxx b/src/SALOMEDSClient/SALOMEDSClient_UseCaseBuilder.hxx index d4a1da5cc..a01733749 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_UseCaseBuilder.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_UseCaseBuilder.hxx @@ -1,28 +1,29 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_UseCaseBuilder.hxx // Author : Sergey RUIN // Module : SALOME -// + #ifndef __SALOMEDSClient_USECaseBuilder_H__ #define __SALOMEDSClient_USECaseBuilder_H__ @@ -43,7 +44,9 @@ public: virtual bool SetCurrentObject(const _PTR(SObject)& theObject) = 0; virtual bool SetRootCurrent() = 0; virtual bool HasChildren(const _PTR(SObject)& theObject) = 0; + virtual _PTR(SObject) GetFather(const _PTR(SObject)& theObject) = 0; virtual bool IsUseCase(const _PTR(SObject)& theObject) = 0; + virtual bool IsUseCaseNode(const _PTR(SObject)& theObject) = 0; virtual bool SetName(const std::string& theName) = 0; virtual _PTR(SObject) GetCurrentObject() = 0; virtual std::string GetName() = 0; diff --git a/src/SALOMEDSClient/SALOMEDSClient_UseCaseIterator.hxx b/src/SALOMEDSClient/SALOMEDSClient_UseCaseIterator.hxx index 8f6877ac4..3068d0bb7 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_UseCaseIterator.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_UseCaseIterator.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_UseCaseIterator.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSClient/SALOMEDSClient_definitions.hxx b/src/SALOMEDSClient/SALOMEDSClient_definitions.hxx index b9942098a..103e9b143 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_definitions.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_definitions.hxx @@ -1,29 +1,30 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef SALOMEDSCLIENT_DEF_HXX #define SALOMEDSCLIENT_DEF_HXX #ifdef WIN32 -# ifdef SALOMEDSCLIENT_EXPORTS +# if defined SALOMEDSCLIENT_EXPORTS || defined SalomeDSClient_EXPORTS # define SALOMEDSCLIENT_EXPORT __declspec( dllexport ) # else # define SALOMEDSCLIENT_EXPORT __declspec( dllimport ) @@ -42,27 +43,27 @@ public: template explicit clt_shared_ptr(Y * p) { - boost::shared_ptr::reset(p); + boost::shared_ptr::reset(p); } template clt_shared_ptr(clt_shared_ptr const & r): boost::shared_ptr(r,boost::detail::dynamic_cast_tag()) - {} + {} template clt_shared_ptr & operator=(clt_shared_ptr const & r) { - clt_shared_ptr(r).swap(*this); - return *this; + clt_shared_ptr(r).swap(*this); + return *this; } template clt_shared_ptr& operator()(Y * p) // Y must be complete { if(T* pt = dynamic_cast(p)) - boost::shared_ptr::reset(pt); + boost::shared_ptr::reset(pt); else - boost::throw_exception(std::bad_cast()); + boost::throw_exception(std::bad_cast()); return *this; } diff --git a/src/SALOMEDSImpl/Makefile.am b/src/SALOMEDSImpl/Makefile.am index 3a16fc238..dac9a72ce 100644 --- a/src/SALOMEDSImpl/Makefile.am +++ b/src/SALOMEDSImpl/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : Makefile.am # Author : Guillaume Boulant (CSSI) # Module : KERNEL @@ -56,6 +57,7 @@ salomeinclude_HEADERS= \ SALOMEDSImpl_AttributePixMap.hxx \ SALOMEDSImpl_AttributeLocalID.hxx \ SALOMEDSImpl_AttributeTarget.hxx \ + SALOMEDSImpl_AttributeTable.hxx \ SALOMEDSImpl_AttributeTableOfInteger.hxx \ SALOMEDSImpl_AttributeTableOfReal.hxx \ SALOMEDSImpl_AttributeTableOfString.hxx \ @@ -95,13 +97,19 @@ COMMON_CPPFLAGS=\ -I$(srcdir)/../SALOMELocalTrace \ -I$(srcdir)/../HDFPersist \ -I$(srcdir)/../DF \ + -I$(srcdir)/../GenericObj \ + -I$(top_builddir)/idl \ + -I$(top_builddir) \ @HDF5_INCLUDES@ \ - @BOOST_CPPFLAGS@ + @BOOST_CPPFLAGS@ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ # This local variable defines the list of dependant libraries common to all target in this package. COMMON_LIBS =\ + ../Basics/libSALOMEBasics.la \ ../HDFPersist/libSalomeHDFPersist.la \ ../DF/libDF.la \ + ../GenericObj/libSalomeGenericObj.la \ + $(top_builddir)/idl/libSalomeIDLKernel.la \ @HDF5_LIBS@ @@ -184,6 +192,7 @@ libSalomeDSImpl_la_SOURCES =\ SALOMEDSImpl_AttributeSequenceOfReal.hxx \ SALOMEDSImpl_Attributes.hxx \ SALOMEDSImpl_AttributeStudyProperties.hxx \ + SALOMEDSImpl_AttributeTable.hxx \ SALOMEDSImpl_AttributeTableOfInteger.hxx \ SALOMEDSImpl_AttributeTableOfReal.hxx \ SALOMEDSImpl_AttributeTableOfString.hxx \ @@ -215,7 +224,7 @@ libSalomeDSImpl_la_SOURCES =\ libSalomeDSImpl_la_CPPFLAGS = $(COMMON_CPPFLAGS) libSalomeDSImpl_la_LDFLAGS = -no-undefined -version-info=0:0:0 -libSalomeDSImpl_la_LIBADD = $(COMMON_LIBS) +libSalomeDSImpl_la_LIBADD = $(COMMON_LIBS) $(CORBA_LIBS) # # =============================================================== @@ -225,5 +234,5 @@ libSalomeDSImpl_la_LIBADD = $(COMMON_LIBS) bin_PROGRAMS = testDS testDS_SOURCES = testDS.cxx testDS_CPPFLAGS = $(COMMON_CPPFLAGS) -testDS_LDADD = libSalomeDSImpl.la \ - $(HDF5_LIBS) +testDS_LDADD = libSalomeDSImpl.la ../DF/libDF.la \ + $(COMMON_LIBS) $(CORBA_LIBS) diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeComment.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeComment.cxx index 62d14a11e..391a57856 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeComment.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeComment.cxx @@ -1,44 +1,43 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeComment.cxx // Author : Sergey RUIN // Module : SALOME // #include "SALOMEDSImpl_AttributeComment.hxx" -using namespace std; - //======================================================================= //function : GetID //purpose : //======================================================================= -const string& SALOMEDSImpl_AttributeComment::GetID () +const std::string& SALOMEDSImpl_AttributeComment::GetID () { - static string CommentID ("7AF2F7CC-1CA2-4476-BE95-8ACC996BC7B9"); + static std::string CommentID ("7AF2F7CC-1CA2-4476-BE95-8ACC996BC7B9"); return CommentID; } SALOMEDSImpl_AttributeComment* SALOMEDSImpl_AttributeComment::Set (const DF_Label& L, - const string& Val) + const std::string& Val) { SALOMEDSImpl_AttributeComment* A = NULL; if (!(A=(SALOMEDSImpl_AttributeComment*)L.FindAttribute(SALOMEDSImpl_AttributeComment::GetID()))) { @@ -55,7 +54,7 @@ SALOMEDSImpl_AttributeComment* SALOMEDSImpl_AttributeComment::Set (const DF_Labe //function : SetValue //purpose : //======================================================================= -void SALOMEDSImpl_AttributeComment::SetValue (const string& S) +void SALOMEDSImpl_AttributeComment::SetValue (const std::string& S) { CheckLocked(); @@ -73,7 +72,7 @@ void SALOMEDSImpl_AttributeComment::SetValue (const string& S) //function : ID //purpose : //======================================================================= -const string& SALOMEDSImpl_AttributeComment::ID () const { return GetID(); } +const std::string& SALOMEDSImpl_AttributeComment::ID () const { return GetID(); } //======================================================================= //function : NewEmpty diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeComment.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeComment.hxx index 4c09c7357..4bc1c2f5f 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeComment.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeComment.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeIOR.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeDrawable.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeDrawable.cxx index 6cc4efba8..3a212d289 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeDrawable.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeDrawable.cxx @@ -1,32 +1,31 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeDrawable.cxx // Author : Sergey RUIN // Module : SALOME // #include "SALOMEDSImpl_AttributeDrawable.hxx" -using namespace std; - //======================================================================= //function : GetID //purpose : @@ -44,7 +43,7 @@ const std::string& SALOMEDSImpl_AttributeDrawable::GetID () //======================================================================= SALOMEDSImpl_AttributeDrawable* SALOMEDSImpl_AttributeDrawable::Set (const DF_Label& L, - const int value) + const int value) { SALOMEDSImpl_AttributeDrawable* A = NULL; if (!(A=(SALOMEDSImpl_AttributeDrawable*)L.FindAttribute(SALOMEDSImpl_AttributeDrawable::GetID()))) { @@ -78,6 +77,8 @@ void SALOMEDSImpl_AttributeDrawable::SetDrawable(const int theValue) Backup(); (theValue!=0)?myValue=1:myValue=0; + + SetModifyFlag(); } diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeDrawable.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeDrawable.hxx index e524af2af..7e7161c02 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeDrawable.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeDrawable.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeDrawable.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExpandable.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExpandable.cxx index c5a0dc094..a9d7ad8d2 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExpandable.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExpandable.cxx @@ -1,32 +1,31 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeExpandable.cxx // Author : Sergey RUIN // Module : SALOME // #include "SALOMEDSImpl_AttributeExpandable.hxx" -using namespace std; - //======================================================================= //function : GetID //purpose : @@ -44,7 +43,7 @@ const std::string& SALOMEDSImpl_AttributeExpandable::GetID () //purpose : //======================================================================= SALOMEDSImpl_AttributeExpandable* SALOMEDSImpl_AttributeExpandable::Set (const DF_Label& L, - const int value) + const int value) { SALOMEDSImpl_AttributeExpandable* A = NULL; if (!(A=(SALOMEDSImpl_AttributeExpandable*)L.FindAttribute(SALOMEDSImpl_AttributeExpandable::GetID()))) { @@ -78,6 +77,8 @@ void SALOMEDSImpl_AttributeExpandable::SetExpandable(const int theValue) Backup(); (theValue!=0)?myValue=1:myValue=0; + + SetModifyFlag(); //VSR: Mark the study as being modified, so it could be saved } //======================================================================= diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExpandable.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExpandable.hxx index 368055604..9cdfd8ac0 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExpandable.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExpandable.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeExpandable.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExternalFileDef.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExternalFileDef.cxx index 8f7be2124..240afcb6b 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExternalFileDef.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExternalFileDef.cxx @@ -1,32 +1,31 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeExternalFileDef.cxx // Author : Sergey RUIN // Module : SALOME // #include "SALOMEDSImpl_AttributeExternalFileDef.hxx" -using namespace std; - //======================================================================= //function : GetID //purpose : diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExternalFileDef.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExternalFileDef.hxx index bf5e0c757..40afa4f3c 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExternalFileDef.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExternalFileDef.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef _SALOMEDSImpl_AttributeExternalFileDef_HeaderFile #define _SALOMEDSImpl_AttributeExternalFileDef_HeaderFile diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeFileType.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeFileType.cxx index 11398d01d..9ce2e1a35 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeFileType.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeFileType.cxx @@ -1,32 +1,31 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeFileType.cxx // Author : Sergey RUIN // Module : SALOME // #include "SALOMEDSImpl_AttributeFileType.hxx" -using namespace std; - //======================================================================= //function : GetID //purpose : @@ -46,7 +45,7 @@ const std::string& SALOMEDSImpl_AttributeFileType::GetID () //======================================================================= SALOMEDSImpl_AttributeFileType* SALOMEDSImpl_AttributeFileType::Set (const DF_Label& L, - const std::string& S) + const std::string& S) { SALOMEDSImpl_AttributeFileType* A = NULL; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeFileType.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeFileType.hxx index e4adc46d4..78f9f2ddd 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeFileType.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeFileType.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef _SALOMEDSImpl_AttributeFileType_HeaderFile #define _SALOMEDSImpl_AttributeFileType_HeaderFile diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeFlags.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeFlags.cxx index 1c568fd5e..95c6101a8 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeFlags.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeFlags.cxx @@ -1,33 +1,31 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeFlags.cxx // Author : Sergey LITONIN // Module : SALOME // #include "SALOMEDSImpl_AttributeFlags.hxx" -using namespace std; - - /* Class : SALOMEDSImpl_AttributeFlags Description : This class is intended for storing different object attributes that @@ -49,7 +47,7 @@ const std::string& SALOMEDSImpl_AttributeFlags::GetID () //purpose : Set value of the attribute //======================================================================= SALOMEDSImpl_AttributeFlags* SALOMEDSImpl_AttributeFlags::Set(const DF_Label& L, - const int value ) + const int value ) { SALOMEDSImpl_AttributeFlags* A = NULL; if ( !(A=(SALOMEDSImpl_AttributeFlags*)L.FindAttribute(SALOMEDSImpl_AttributeFlags::GetID())) ) diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeFlags.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeFlags.hxx index ca53973e3..65dd13a4d 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeFlags.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeFlags.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeFlags.hxx // Author : Sergey LITONIN // Module : SALOME diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeGraphic.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeGraphic.cxx index 5a67dc488..3c3aa39b1 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeGraphic.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeGraphic.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeGraphic.cxx // Author : Sergey LITONIN // Module : SALOME @@ -26,8 +27,6 @@ #include "SALOMEDSImpl_AttributeGraphic.hxx" #include "DF_Attribute.hxx" -using namespace std; - /* Class : SALOMEDSImpl_AttributeGraphic Description : This class is intended for storing information about @@ -66,7 +65,7 @@ SALOMEDSImpl_AttributeGraphic::~SALOMEDSImpl_AttributeGraphic() //purpose : Set visibility of object in given view //======================================================================= void SALOMEDSImpl_AttributeGraphic::SetVisibility(const int theViewId, - const bool theValue ) + const bool theValue ) { if ( myVisibility.find( theViewId ) != myVisibility.end() && myVisibility[theViewId] == theValue ) return; @@ -115,7 +114,7 @@ DF_Attribute* SALOMEDSImpl_AttributeGraphic::NewEmpty () const //function : SetVisibility //purpose : Set visibility of object in all views //======================================================================= -void SALOMEDSImpl_AttributeGraphic::SetVisibility( const map& theMap ) +void SALOMEDSImpl_AttributeGraphic::SetVisibility( const std::map& theMap ) { myVisibility = theMap; } @@ -124,7 +123,7 @@ void SALOMEDSImpl_AttributeGraphic::SetVisibility( const map& theMap ) //function : SetVisibility //purpose : Get visibility of object in all views //======================================================================= -const map& SALOMEDSImpl_AttributeGraphic::GetVisibility() +const std::map& SALOMEDSImpl_AttributeGraphic::GetVisibility() { return myVisibility; } diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeGraphic.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeGraphic.hxx index 377a0db52..15265e83e 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeGraphic.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeGraphic.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeGraphic.hxx // Author : Sergey LITONIN // Module : SALOME diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx index fe83cfd63..a16108523 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeIOR.cxx // Author : Sergey RUIN // Module : SALOME @@ -26,7 +27,62 @@ #include "SALOMEDSImpl_AttributeIOR.hxx" #include "SALOMEDSImpl_Study.hxx" -using namespace std; +//to disable automatic genericobj management comment the following line +#define WITHGENERICOBJ + +#ifdef WITHGENERICOBJ +#include "SALOME_GenericObj_i.hh" + +static CORBA::ORB_var getORB() +{ + int argc=0; + return CORBA::ORB_init(argc,0); +} + +void IORGenericObjDecref(const std::string& anIOR) +{ + if(anIOR=="")return; + CORBA::Object_var obj; + SALOME::GenericObj_var gobj; + try + { + obj = getORB()->string_to_object(anIOR.c_str()); + if(obj->_non_existent())return; + gobj = SALOME::GenericObj::_narrow(obj); + if(! CORBA::is_nil(gobj) ) + { + gobj->UnRegister(); + } + } + catch(const CORBA::Exception& e) + { + } +} + +void IORGenericObjIncref(const std::string& anIOR) +{ + CORBA::Object_var obj; + SALOME::GenericObj_var gobj; + try + { + obj = getORB()->string_to_object(anIOR.c_str()); + if(obj->_non_existent())return; + gobj = SALOME::GenericObj::_narrow(obj); + if(! CORBA::is_nil(gobj) ) + { + gobj->Register(); + } + } + catch(const CORBA::Exception& e) + { + } +} +#else +void IORGenericObjDecref(const std::string& anIOR) +{} +void IORGenericObjIncref(const std::string& anIOR) +{} +#endif //======================================================================= //function : GetID @@ -47,7 +103,7 @@ const std::string& SALOMEDSImpl_AttributeIOR::GetID () //======================================================================= SALOMEDSImpl_AttributeIOR* SALOMEDSImpl_AttributeIOR::Set (const DF_Label& L, - const std::string& S) + const std::string& S) { SALOMEDSImpl_AttributeIOR* A = NULL; if (!(A=(SALOMEDSImpl_AttributeIOR*)L.FindAttribute(SALOMEDSImpl_AttributeIOR::GetID()))) { @@ -56,7 +112,6 @@ SALOMEDSImpl_AttributeIOR* SALOMEDSImpl_AttributeIOR::Set (const DF_Label& L, } A->SetValue(S); - SALOMEDSImpl_Study::IORUpdated(A); return A; } @@ -68,12 +123,25 @@ void SALOMEDSImpl_AttributeIOR::SetValue(const std::string& theValue) { CheckLocked(); - SALOMEDSImpl_Study::GetStudy(Label()); + SALOMEDSImpl_Study* study=SALOMEDSImpl_Study::GetStudy(Label()); Backup(); + //remove IOR entry in study + if(theValue != myString) + { + IORGenericObjIncref(theValue); + IORGenericObjDecref(myString); + study->DeleteIORLabelMapItem(myString); + } + myString = theValue; + //add IOR entry in study SALOMEDSImpl_Study::IORUpdated(this); + + //Reason = 5 means that IOR attribute updated + //Used in the gui module to detect that IOR attribure was assigned to the object + SetModifyFlag(5); } //======================================================================= @@ -94,6 +162,11 @@ SALOMEDSImpl_AttributeIOR::SALOMEDSImpl_AttributeIOR() { } +SALOMEDSImpl_AttributeIOR::~SALOMEDSImpl_AttributeIOR() +{ + IORGenericObjDecref(myString); +} + //======================================================================= //function : ID //purpose : diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.hxx index b0370d3f4..8df3ea125 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeIOR.hxx // Author : Sergey RUIN // Module : SALOME @@ -51,7 +52,7 @@ public: void Restore(DF_Attribute* with); DF_Attribute* NewEmpty() const; void Paste(DF_Attribute* into); - ~SALOMEDSImpl_AttributeIOR() {} + ~SALOMEDSImpl_AttributeIOR() ; }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeInteger.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeInteger.cxx index e772c4bd7..31b24316e 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeInteger.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeInteger.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeInteger.cxx // Author : Sergey RUIN // Module : SALOME @@ -26,7 +27,6 @@ #include "SALOMEDSImpl_AttributeInteger.hxx" #include -using namespace std; //======================================================================= //function : GetID @@ -111,18 +111,18 @@ void SALOMEDSImpl_AttributeInteger::Paste (DF_Attribute* Into) //function : Save //purpose : //======================================================================= -string SALOMEDSImpl_AttributeInteger::Save() +std::string SALOMEDSImpl_AttributeInteger::Save() { char buffer[128]; sprintf(buffer, "%d", myValue); - return string(buffer); + return std::string(buffer); } //======================================================================= //function : Load //purpose : //======================================================================= -void SALOMEDSImpl_AttributeInteger::Load(const string& theValue) +void SALOMEDSImpl_AttributeInteger::Load(const std::string& theValue) { myValue = atoi(theValue.c_str()); } diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeInteger.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeInteger.hxx index b632d4771..ff329e3a7 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeInteger.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeInteger.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeInteger.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeLocalID.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeLocalID.cxx index df25c39a8..9f4bde442 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeLocalID.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeLocalID.cxx @@ -1,32 +1,31 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeLocalID.cxx // Author : Sergey RUIN // Module : SALOME // #include "SALOMEDSImpl_AttributeLocalID.hxx" -using namespace std; - //======================================================================= //function : GetID //purpose : @@ -46,7 +45,7 @@ const std::string& SALOMEDSImpl_AttributeLocalID::GetID () //======================================================================= SALOMEDSImpl_AttributeLocalID* SALOMEDSImpl_AttributeLocalID::Set (const DF_Label& L, - const int value) + const int value) { SALOMEDSImpl_AttributeLocalID* A = NULL; if (!(A=(SALOMEDSImpl_AttributeLocalID*)L.FindAttribute(SALOMEDSImpl_AttributeLocalID::GetID()))) { @@ -127,18 +126,18 @@ void SALOMEDSImpl_AttributeLocalID::Paste (DF_Attribute* into) //function : Save //purpose : //======================================================================= -string SALOMEDSImpl_AttributeLocalID::Save() +std::string SALOMEDSImpl_AttributeLocalID::Save() { char buffer[128]; sprintf(buffer, "%d", myValue); - return string(buffer); + return std::string(buffer); } //======================================================================= //function : Load //purpose : //======================================================================= -void SALOMEDSImpl_AttributeLocalID::Load(const string& theValue) +void SALOMEDSImpl_AttributeLocalID::Load(const std::string& theValue) { myValue = atoi(theValue.c_str()); } diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeLocalID.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeLocalID.hxx index d99662425..8132aa04d 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeLocalID.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeLocalID.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeLocalID.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeName.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeName.cxx index 2bff84705..80c0e3356 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeName.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeName.cxx @@ -1,32 +1,31 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeName.cxx // Author : Sergey RUIN // Module : SALOME // #include "SALOMEDSImpl_AttributeName.hxx" -using namespace std; - //======================================================================= //function : GetID //purpose : @@ -38,7 +37,7 @@ const std::string& SALOMEDSImpl_AttributeName::GetID () } SALOMEDSImpl_AttributeName* SALOMEDSImpl_AttributeName::Set (const DF_Label& L, - const std::string& Val) + const std::string& Val) { SALOMEDSImpl_AttributeName* A = NULL; if (!(A=(SALOMEDSImpl_AttributeName*)L.FindAttribute(SALOMEDSImpl_AttributeName::GetID()))) { diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeName.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeName.hxx index c8153ca25..eea780955 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeName.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeName.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeIOR.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeOpened.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeOpened.cxx index bf1313f63..8ecae1400 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeOpened.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeOpened.cxx @@ -1,32 +1,31 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeOpened.cxx // Author : Sergey RUIN // Module : SALOME // #include "SALOMEDSImpl_AttributeOpened.hxx" -using namespace std; - //======================================================================= //function : GetID //purpose : @@ -46,7 +45,7 @@ const std::string& SALOMEDSImpl_AttributeOpened::GetID () //======================================================================= SALOMEDSImpl_AttributeOpened* SALOMEDSImpl_AttributeOpened::Set (const DF_Label& L, - const int value) + const int value) { SALOMEDSImpl_AttributeOpened* A = NULL; if (!(A=(SALOMEDSImpl_AttributeOpened*)L.FindAttribute(SALOMEDSImpl_AttributeOpened::GetID()))) { diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeOpened.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeOpened.hxx index 04fcde4d1..a6de53193 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeOpened.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeOpened.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeOpened.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx index 441e578a1..97584c9fa 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeParameter.cxx // Author : Sergey RUIN // Module : SALOME @@ -27,16 +28,13 @@ #include #include -#include #include - -using namespace std; - +#include // Purpose: Each character in the string is replaced by 3 characters: '%' and hex number // of the character (2 characters) -string convertString(const string& S) +std::string convertString(const std::string& S) { int length = S.size(); const char *s = S.c_str(); @@ -50,14 +48,14 @@ string convertString(const string& S) buffer[pos+2] = c[1]; } - string RS(buffer); + std::string RS(buffer); delete c; delete buffer; return RS; } //Restors a string converted by the function convertString -string restoreString(const string& S) +std::string restoreString(const std::string& S) { int length = S.size(); char *c = new char[3], *buffer = new char[length/3+1]; @@ -71,7 +69,7 @@ string restoreString(const string& S) buffer[pos] = (char)val; } - string RS(buffer); + std::string RS(buffer); delete c; delete buffer; return RS; @@ -112,7 +110,7 @@ SALOMEDSImpl_AttributeParameter* SALOMEDSImpl_AttributeParameter::Set (const DF_ * Purpose : Associates a integer value with the ID */ //======================================================================= -void SALOMEDSImpl_AttributeParameter::SetInt(const string& theID, const int& theValue) +void SALOMEDSImpl_AttributeParameter::SetInt(const std::string& theID, const int& theValue) { CheckLocked(); @@ -131,7 +129,7 @@ void SALOMEDSImpl_AttributeParameter::SetInt(const string& theID, const int& the * Purpose : Returns a int value associated with the given ID */ //======================================================================= -int SALOMEDSImpl_AttributeParameter::GetInt(const string& theID) +int SALOMEDSImpl_AttributeParameter::GetInt(const std::string& theID) { if(!IsSet(theID, PT_INTEGER)) throw DFexception("Invalid ID"); return _ints[theID]; @@ -143,7 +141,7 @@ int SALOMEDSImpl_AttributeParameter::GetInt(const string& theID) * Purpose : Associates a double value with the ID */ //======================================================================= -void SALOMEDSImpl_AttributeParameter::SetReal(const string& theID, const double& theValue) +void SALOMEDSImpl_AttributeParameter::SetReal(const std::string& theID, const double& theValue) { CheckLocked(); @@ -162,7 +160,7 @@ void SALOMEDSImpl_AttributeParameter::SetReal(const string& theID, const double& * Purpose : Returns a double value associated with the given ID */ //======================================================================= -double SALOMEDSImpl_AttributeParameter::GetReal(const string& theID) +double SALOMEDSImpl_AttributeParameter::GetReal(const std::string& theID) { if(!IsSet(theID, PT_REAL)) throw DFexception("Invalid ID"); return _reals[theID]; @@ -174,7 +172,7 @@ double SALOMEDSImpl_AttributeParameter::GetReal(const string& theID) * Purpose : Associates a string with the ID */ //======================================================================= -void SALOMEDSImpl_AttributeParameter::SetString(const string& theID, const string& theValue) +void SALOMEDSImpl_AttributeParameter::SetString(const std::string& theID, const std::string& theValue) { CheckLocked(); @@ -193,7 +191,7 @@ void SALOMEDSImpl_AttributeParameter::SetString(const string& theID, const strin * Purpose : Returns a string associated with the given ID */ //======================================================================= -string SALOMEDSImpl_AttributeParameter::GetString(const string& theID) +std::string SALOMEDSImpl_AttributeParameter::GetString(const std::string& theID) { if(!IsSet(theID, PT_STRING)) throw DFexception("Invalid ID"); return _strings[theID]; @@ -205,7 +203,7 @@ string SALOMEDSImpl_AttributeParameter::GetString(const string& theID) * Purpose : Associates a bool value with the ID */ //======================================================================= -void SALOMEDSImpl_AttributeParameter::SetBool(const string& theID, const bool& theValue) +void SALOMEDSImpl_AttributeParameter::SetBool(const std::string& theID, const bool& theValue) { CheckLocked(); @@ -224,7 +222,7 @@ void SALOMEDSImpl_AttributeParameter::SetBool(const string& theID, const bool& t * Purpose : Returns a bool value associated with the ID */ //======================================================================= -bool SALOMEDSImpl_AttributeParameter::GetBool(const string& theID) +bool SALOMEDSImpl_AttributeParameter::GetBool(const std::string& theID) { if(!IsSet(theID, PT_BOOLEAN)) throw DFexception("Invalid ID"); return _bools[theID]; @@ -236,7 +234,7 @@ bool SALOMEDSImpl_AttributeParameter::GetBool(const string& theID) * Purpose : Associates an array of double values with the given ID */ //======================================================================= -void SALOMEDSImpl_AttributeParameter::SetRealArray(const string& theID, const vector& theArray) +void SALOMEDSImpl_AttributeParameter::SetRealArray(const std::string& theID, const std::vector& theArray) { CheckLocked(); @@ -255,7 +253,7 @@ void SALOMEDSImpl_AttributeParameter::SetRealArray(const string& theID, const ve * Purpose : Returns double values associated with the ID */ //======================================================================= -vector SALOMEDSImpl_AttributeParameter::GetRealArray(const string& theID) +std::vector SALOMEDSImpl_AttributeParameter::GetRealArray(const std::string& theID) { if(!IsSet(theID, PT_REALARRAY)) throw DFexception("Invalid ID"); return _realarrays[theID]; @@ -268,7 +266,7 @@ vector SALOMEDSImpl_AttributeParameter::GetRealArray(const string& theID * Purpose : Associates an array of int values with the given ID */ //======================================================================= -void SALOMEDSImpl_AttributeParameter::SetIntArray(const string& theID, const vector& theArray) +void SALOMEDSImpl_AttributeParameter::SetIntArray(const std::string& theID, const std::vector& theArray) { CheckLocked(); @@ -287,7 +285,7 @@ void SALOMEDSImpl_AttributeParameter::SetIntArray(const string& theID, const vec * Purpose : Returns int values associated with the ID */ //======================================================================= -vector SALOMEDSImpl_AttributeParameter::GetIntArray(const string& theID) +std::vector SALOMEDSImpl_AttributeParameter::GetIntArray(const std::string& theID) { if(!IsSet(theID, PT_INTARRAY)) throw DFexception("Invalid ID"); return _intarrays[theID]; @@ -300,7 +298,7 @@ vector SALOMEDSImpl_AttributeParameter::GetIntArray(const string& theID) * Purpose : Associates an array of string values with the given ID */ //======================================================================= -void SALOMEDSImpl_AttributeParameter::SetStrArray(const string& theID, const vector& theArray) +void SALOMEDSImpl_AttributeParameter::SetStrArray(const std::string& theID, const std::vector& theArray) { CheckLocked(); @@ -319,7 +317,7 @@ void SALOMEDSImpl_AttributeParameter::SetStrArray(const string& theID, const vec * Purpose : Returns string values associated with the ID */ //======================================================================= -vector SALOMEDSImpl_AttributeParameter::GetStrArray(const string& theID) +std::vector SALOMEDSImpl_AttributeParameter::GetStrArray(const std::string& theID) { if(!IsSet(theID, PT_STRARRAY)) throw DFexception("Invalid ID"); return _strarrays[theID]; @@ -333,7 +331,7 @@ vector SALOMEDSImpl_AttributeParameter::GetStrArray(const string& theID) * a value in the attribute */ //======================================================================= -bool SALOMEDSImpl_AttributeParameter::IsSet(const string& theID, const Parameter_Types theType) +bool SALOMEDSImpl_AttributeParameter::IsSet(const std::string& theID, const Parameter_Types theType) { switch(theType) { case PT_INTEGER: { @@ -376,7 +374,7 @@ bool SALOMEDSImpl_AttributeParameter::IsSet(const string& theID, const Parameter * Purpose : Removes a parameter with given ID */ //======================================================================= -bool SALOMEDSImpl_AttributeParameter::RemoveID(const string& theID, const Parameter_Types theType) +bool SALOMEDSImpl_AttributeParameter::RemoveID(const std::string& theID, const Parameter_Types theType) { Backup(); SetModifyFlag(); @@ -494,66 +492,66 @@ void SALOMEDSImpl_AttributeParameter::Clear() * Purpose : Returns an array of all ID's of the given type */ //======================================================================= -vector SALOMEDSImpl_AttributeParameter::GetIDs(const Parameter_Types theType) +std::vector SALOMEDSImpl_AttributeParameter::GetIDs(const Parameter_Types theType) { - vector anArray; + std::vector anArray; int i = 0; switch(theType) { case PT_INTEGER: { if(_ints.size()) { anArray.resize(_ints.size()); - for(map::const_iterator p = _ints.begin(); p != _ints.end(); p++, i++) - anArray[i] = p->first; + for(std::map::const_iterator p = _ints.begin(); p != _ints.end(); p++, i++) + anArray[i] = p->first; } break; } case PT_REAL: { if(_reals.size()) { anArray.resize(_reals.size()); - for(map::const_iterator p = _reals.begin(); p != _reals.end(); p++, i++) - anArray[i] = p->first; + for(std::map::const_iterator p = _reals.begin(); p != _reals.end(); p++, i++) + anArray[i] = p->first; } break; } case PT_BOOLEAN: { if(_bools.size()) { anArray.resize(_bools.size()); - for(map::const_iterator p = _bools.begin(); p != _bools.end(); p++, i++) - anArray[i] = p->first; + for(std::map::const_iterator p = _bools.begin(); p != _bools.end(); p++, i++) + anArray[i] = p->first; } break; } case PT_STRING: { if(_strings.size()) { anArray.resize(_strings.size()); - for(map::const_iterator p = _strings.begin(); p!= _strings.end(); p++) - anArray[i] = p->first; + for(std::map::const_iterator p = _strings.begin(); p!= _strings.end(); p++) + anArray[i] = p->first; } break; } case PT_REALARRAY: { if(_realarrays.size()) { anArray.resize(_realarrays.size()); - for(map< string, vector >::const_iterator p = _realarrays.begin(); p!= _realarrays.end(); p++) - anArray[i] = p->first; + for(std::map< std::string, std::vector >::const_iterator p = _realarrays.begin(); p!= _realarrays.end(); p++) + anArray[i] = p->first; } break; } case PT_INTARRAY: { if(_intarrays.size()) { anArray.resize(_intarrays.size()); - for(map< string, vector >::const_iterator p = _intarrays.begin(); p!= _intarrays.end(); p++) - anArray[i] = p->first; + for(std::map< std::string, std::vector >::const_iterator p = _intarrays.begin(); p!= _intarrays.end(); p++) + anArray[i] = p->first; } break; } case PT_STRARRAY: { if(_strarrays.size()) { anArray.resize(_strarrays.size()); - for(map< string, vector >::const_iterator p = _strarrays.begin(); p!= _strarrays.end(); p++) - anArray[i] = p->first; + for(std::map< std::string, std::vector >::const_iterator p = _strarrays.begin(); p!= _strarrays.end(); p++) + anArray[i] = p->first; } break; } @@ -594,19 +592,19 @@ void SALOMEDSImpl_AttributeParameter::Restore(DF_Attribute* with) _intarrays.clear(); _strarrays.clear(); - for(map::const_iterator p = A->_ints.begin(); p!= A->_ints.end(); p++) + for(std::map::const_iterator p = A->_ints.begin(); p!= A->_ints.end(); p++) if(p->first.size()) _ints[p->first] = p->second; - for(map::const_iterator p = A->_reals.begin(); p!= A->_reals.end(); p++) + for(std::map::const_iterator p = A->_reals.begin(); p!= A->_reals.end(); p++) if(p->first.size()) _reals[p->first] = p->second; - for(map::const_iterator p = A->_bools.begin(); p!= A->_bools.end(); p++) + for(std::map::const_iterator p = A->_bools.begin(); p!= A->_bools.end(); p++) if(p->first.size()) _bools[p->first] = p->second; - for(map::const_iterator p = A->_strings.begin(); p!= A->_strings.end(); p++) + for(std::map::const_iterator p = A->_strings.begin(); p!= A->_strings.end(); p++) if(p->first.size()) _strings[p->first] = p->second; - for(map< string,vector >::const_iterator p = A->_realarrays.begin(); p!= A->_realarrays.end(); p++) + for(std::map< std::string,std::vector >::const_iterator p = A->_realarrays.begin(); p!= A->_realarrays.end(); p++) if(p->first.size()) _realarrays[p->first] = p->second; - for(map< string,vector >::const_iterator p = A->_intarrays.begin(); p!= A->_intarrays.end(); p++) + for(std::map< std::string,std::vector >::const_iterator p = A->_intarrays.begin(); p!= A->_intarrays.end(); p++) if(p->first.size()) _intarrays[p->first] = p->second; - for(map< string,vector >::const_iterator p = A->_strarrays.begin(); p!= A->_strarrays.end(); p++) + for(std::map< std::string,std::vector >::const_iterator p = A->_strarrays.begin(); p!= A->_strarrays.end(); p++) if(p->first.size()) _strarrays[p->first] = p->second; } @@ -627,36 +625,36 @@ void SALOMEDSImpl_AttributeParameter::Paste (DF_Attribute* into) * Purpose : Saves a content of the attribute as a string */ //======================================================================= -string SALOMEDSImpl_AttributeParameter::Save() +std::string SALOMEDSImpl_AttributeParameter::Save() { - ostringstream buffer; + std::ostringstream buffer; char *tmpBuffer = new char[255]; buffer << _ints.size() << " "; - for(map::const_iterator p = _ints.begin(); p != _ints.end(); p++) { + for(std::map::const_iterator p = _ints.begin(); p != _ints.end(); p++) { buffer << convertString(p->first) << " " << p->second << " "; } buffer << _reals.size() << " "; - for(map::const_iterator p =_reals.begin(); p != _reals.end(); p++) { + for(std::map::const_iterator p =_reals.begin(); p != _reals.end(); p++) { sprintf(tmpBuffer, "%.64e", p->second); buffer << convertString(p->first) << " " << tmpBuffer << " "; } buffer << _bools.size() << " "; - for(map::const_iterator p = _bools.begin(); p != _bools.end(); p++) { + for(std::map::const_iterator p = _bools.begin(); p != _bools.end(); p++) { buffer << convertString(p->first) << " " << p->second << " "; } buffer << _strings.size() << " "; - for(map::const_iterator p = _strings.begin(); p != _strings.end(); p++) { + for(std::map::const_iterator p = _strings.begin(); p != _strings.end(); p++) { buffer << convertString(p->first) << " " << convertString(p->second) << " "; } buffer << _realarrays.size() << " "; - for(map< string,vector >::const_iterator p = _realarrays.begin(); p != _realarrays.end(); p++) { - vector v(p->second); + for(std::map< std::string,std::vector >::const_iterator p = _realarrays.begin(); p != _realarrays.end(); p++) { + std::vector v(p->second); sprintf(tmpBuffer, " %s %d ", convertString(p->first).c_str(), v.size()); buffer << tmpBuffer; for(int i = 0; i >::const_iterator p = _intarrays.begin(); p != _intarrays.end(); p++) { - vector v(p->second); + for(std::map< std::string,std::vector >::const_iterator p = _intarrays.begin(); p != _intarrays.end(); p++) { + std::vector v(p->second); sprintf(tmpBuffer, " %s %d ", convertString(p->first).c_str(), v.size()); buffer << tmpBuffer; for(int i = 0; i >::const_iterator p = _strarrays.begin(); p != _strarrays.end(); p++) { - vector v(p->second); + for(std::map< std::string,std::vector >::const_iterator p = _strarrays.begin(); p != _strarrays.end(); p++) { + std::vector v(p->second); sprintf(tmpBuffer, " %s %d ", convertString(p->first).c_str(), v.size()); buffer << tmpBuffer; for(int i = 0; i> size; for(int i = 1; i<=size; i++) { @@ -743,7 +741,7 @@ void SALOMEDSImpl_AttributeParameter::Load(const string& theValue) buffer >> size; for(int i = 1; i<=size; i++) { buffer >> id >> val; - vector v; + std::vector v; v.resize(val); for(int j = 0; j> val2; @@ -755,7 +753,7 @@ void SALOMEDSImpl_AttributeParameter::Load(const string& theValue) buffer >> size; for(int i = 1; i<=size; i++) { buffer >> id >> val; - vector v; + std::vector v; v.resize(val); for(int j = 0; j> ival; @@ -767,7 +765,7 @@ void SALOMEDSImpl_AttributeParameter::Load(const string& theValue) buffer >> size; for(int i = 1; i<=size; i++) { buffer >> id >> val; - vector v; + std::vector v; v.resize(val); for(int j = 0; j> s; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.hxx index f23ccff67..28ceb6497 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeIOR.hxx // Author : Sergey RUIN // Module : SALOME @@ -65,45 +66,45 @@ public: void SetInt(const std::string& theID, const int& theValue); int GetInt(const std::string& theID); - + void SetReal(const std::string& theID, const double& theValue); double GetReal(const std::string& theID); - + void SetString(const std::string& theID, const std::string& theValue); std::string GetString(const std::string& theID); - + void SetBool(const std::string& theID, const bool& theValue); bool GetBool(const std::string& theID); - + void SetRealArray(const std::string& theID, const std::vector& theArray); std::vector GetRealArray(const std::string& theID); - + void SetIntArray(const std::string& theID, const std::vector& theArray); std::vector GetIntArray(const std::string& theID); - + void SetStrArray(const std::string& theID, const std::vector& theArray); std::vector GetStrArray(const std::string& theID); - + bool IsSet(const std::string& theID, const Parameter_Types theType); bool RemoveID(const std::string& theID, const Parameter_Types theType); - + SALOMEDSImpl_AttributeParameter* GetFather(); bool HasFather(); bool IsRoot(); - + std::vector GetIDs(const Parameter_Types theType); - + void Clear(); - + virtual std::string Save(); virtual void Load(const std::string& theValue); - + const std::string& ID() const; void Restore(DF_Attribute* with) ; DF_Attribute* NewEmpty() const; void Paste(DF_Attribute* into); - + ~SALOMEDSImpl_AttributeParameter() {} }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributePersistentRef.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributePersistentRef.cxx index 6bf8eb76b..e293a1ce0 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributePersistentRef.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributePersistentRef.cxx @@ -1,32 +1,31 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributePersistentRef.cxx // Author : Sergey RUIN // Module : SALOME // #include "SALOMEDSImpl_AttributePersistentRef.hxx" -using namespace std; - //======================================================================= //function : GetID //purpose : @@ -46,7 +45,7 @@ const std::string& SALOMEDSImpl_AttributePersistentRef::GetID () //======================================================================= SALOMEDSImpl_AttributePersistentRef* SALOMEDSImpl_AttributePersistentRef::Set (const DF_Label& L, - const std::string& S) + const std::string& S) { SALOMEDSImpl_AttributePersistentRef* A = NULL; if (!(A=(SALOMEDSImpl_AttributePersistentRef*)L.FindAttribute(SALOMEDSImpl_AttributePersistentRef::GetID()))) { diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributePersistentRef.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributePersistentRef.hxx index 056b5d6e2..f69c2ee14 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributePersistentRef.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributePersistentRef.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributePersistentRef.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributePixMap.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributePixMap.cxx index a244cc3a5..769dda163 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributePixMap.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributePixMap.cxx @@ -1,32 +1,31 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributePixMap.cxx // Author : Sergey RUIN // Module : SALOME // #include "SALOMEDSImpl_AttributePixMap.hxx" -using namespace std; - //======================================================================= //function : GetID //purpose : @@ -46,7 +45,7 @@ const std::string& SALOMEDSImpl_AttributePixMap::GetID () //======================================================================= SALOMEDSImpl_AttributePixMap* SALOMEDSImpl_AttributePixMap::Set (const DF_Label& L, - const std::string& S) + const std::string& S) { SALOMEDSImpl_AttributePixMap* A = NULL; if (!(A=(SALOMEDSImpl_AttributePixMap*)L.FindAttribute(SALOMEDSImpl_AttributePixMap::GetID()))) { diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributePixMap.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributePixMap.hxx index c0b0b28a2..7b1d6912e 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributePixMap.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributePixMap.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributePixMap.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributePythonObject.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributePythonObject.cxx index 3de92728f..6eb0c4820 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributePythonObject.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributePythonObject.cxx @@ -1,32 +1,31 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributePythonObject.cxx // Author : Michael Ponikarov // Module : SALOME // #include "SALOMEDSImpl_AttributePythonObject.hxx" -using namespace std; - const std::string& SALOMEDSImpl_AttributePythonObject::GetID() { static std::string SALOMEDSImpl_AttributePythonObjectID ("128371A3-8F52-11d6-A8A3-0001021E8C7F"); @@ -49,8 +48,8 @@ SALOMEDSImpl_AttributePythonObject::SALOMEDSImpl_AttributePythonObject() myIsScript = false; } -void SALOMEDSImpl_AttributePythonObject::SetObject(const string& theSequence, - const bool theScript) +void SALOMEDSImpl_AttributePythonObject::SetObject(const std::string& theSequence, + const bool theScript) { CheckLocked(); Backup(); @@ -60,7 +59,7 @@ void SALOMEDSImpl_AttributePythonObject::SetObject(const string& theSequence, SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved } -string SALOMEDSImpl_AttributePythonObject::GetObject() const +std::string SALOMEDSImpl_AttributePythonObject::GetObject() const { return mySequence; } @@ -98,16 +97,16 @@ void SALOMEDSImpl_AttributePythonObject::Paste(DF_Attribute* into) } -string SALOMEDSImpl_AttributePythonObject::Save() +std::string SALOMEDSImpl_AttributePythonObject::Save() { - string aString = GetObject(); - string aResult = IsScript()?"s":"n"; + std::string aString = GetObject(); + std::string aResult = IsScript()?"s":"n"; aResult += aString; return aResult; } - -void SALOMEDSImpl_AttributePythonObject::Load(const string& value) + +void SALOMEDSImpl_AttributePythonObject::Load(const std::string& value) { char* aString = (char*)value.c_str(); SetObject(aString + 1, aString[0]=='s'); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributePythonObject.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributePythonObject.hxx index c9d31d12c..8a4d05587 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributePythonObject.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributePythonObject.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributePythonObject.hxx // Author : Michael Ponikarov // Module : SALOME diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeReal.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeReal.cxx index 1b37bb039..74f01ed38 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeReal.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeReal.cxx @@ -1,32 +1,31 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeReal.cxx // Author : Sergey RUIN // Module : SALOME // #include "SALOMEDSImpl_AttributeReal.hxx" -using namespace std; - #include @@ -108,18 +107,18 @@ void SALOMEDSImpl_AttributeReal::Paste (DF_Attribute* into) //function : Save //purpose : //======================================================================= -string SALOMEDSImpl_AttributeReal::Save() +std::string SALOMEDSImpl_AttributeReal::Save() { char buffer[255]; sprintf(buffer, "%.64e", myValue); - return string(buffer); + return std::string(buffer); } //======================================================================= //function : Load //purpose : //======================================================================= -void SALOMEDSImpl_AttributeReal::Load(const string& theValue) +void SALOMEDSImpl_AttributeReal::Load(const std::string& theValue) { myValue = atof(theValue.c_str()); } diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeReal.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeReal.hxx index 37083242e..10e440d60 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeReal.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeReal.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeReal.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeReference.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeReference.cxx index cad6685cc..f836a9008 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeReference.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeReference.cxx @@ -1,32 +1,31 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeReference.cxx // Author : Sergey RUIN // Module : SALOME // #include "SALOMEDSImpl_AttributeReference.hxx" -using namespace std; - //======================================================================= //function : GetID //purpose : @@ -38,7 +37,7 @@ const std::string& SALOMEDSImpl_AttributeReference::GetID () } SALOMEDSImpl_AttributeReference* SALOMEDSImpl_AttributeReference::Set(const DF_Label& theLabel, - const DF_Label& theRefLabel) + const DF_Label& theRefLabel) { SALOMEDSImpl_AttributeReference* A = NULL; if (!(A=(SALOMEDSImpl_AttributeReference*)theLabel.FindAttribute(SALOMEDSImpl_AttributeReference::GetID()))) { @@ -73,12 +72,12 @@ void SALOMEDSImpl_AttributeReference::Set(const DF_Label& Origin) const std::string& SALOMEDSImpl_AttributeReference::ID () const { return GetID(); } -string SALOMEDSImpl_AttributeReference::Save() +std::string SALOMEDSImpl_AttributeReference::Save() { return myLabel.Entry(); } -void SALOMEDSImpl_AttributeReference::Load(const string& value) +void SALOMEDSImpl_AttributeReference::Load(const std::string& value) { myLabel = DF_Label::Label(Label(), value, true); } diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeReference.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeReference.hxx index e84c411d3..34cae67c3 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeReference.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeReference.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeIOR.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSelectable.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSelectable.cxx index a96614055..b2f68c2a6 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSelectable.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSelectable.cxx @@ -1,32 +1,31 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeSelectable.cxx // Author : Sergey RUIN // Module : SALOME // #include "SALOMEDSImpl_AttributeSelectable.hxx" -using namespace std; - //======================================================================= //function : GetID //purpose : @@ -46,7 +45,7 @@ const std::string& SALOMEDSImpl_AttributeSelectable::GetID () //======================================================================= SALOMEDSImpl_AttributeSelectable* SALOMEDSImpl_AttributeSelectable::Set (const DF_Label& L, - const int value) + const int value) { SALOMEDSImpl_AttributeSelectable* A = NULL; if (!(A=(SALOMEDSImpl_AttributeSelectable*)L.FindAttribute(SALOMEDSImpl_AttributeSelectable::GetID()))) { diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSelectable.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSelectable.hxx index 98cf6e89e..2eae209cb 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSelectable.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSelectable.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeSelectable.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSequenceOfInteger.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSequenceOfInteger.cxx index 4120d20b6..b15ecad02 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSequenceOfInteger.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSequenceOfInteger.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeSequenceOfInteger.cxx // Author : Sergey RUIN // Module : SALOME @@ -26,8 +27,6 @@ #include "SALOMEDSImpl_AttributeSequenceOfInteger.hxx" #include -using namespace std; - //======================================================================= //function : GetID //purpose : @@ -106,7 +105,7 @@ void SALOMEDSImpl_AttributeSequenceOfInteger::Paste (DF_Attribute* into) dynamic_cast(into)->Assign(myValue); } -void SALOMEDSImpl_AttributeSequenceOfInteger::Assign(const vector& other) +void SALOMEDSImpl_AttributeSequenceOfInteger::Assign(const std::vector& other) { CheckLocked(); Backup(); @@ -144,7 +143,7 @@ void SALOMEDSImpl_AttributeSequenceOfInteger::Remove(const int Index) if(Index <= 0 || Index > myValue.size()) throw DFexception("Out of range"); - typedef vector::iterator VI; + typedef std::vector::iterator VI; int i = 1; for(VI p = myValue.begin(); p!=myValue.end(); p++, i++) { if(i == Index) { @@ -169,7 +168,7 @@ int SALOMEDSImpl_AttributeSequenceOfInteger::Value(const int Index) -string SALOMEDSImpl_AttributeSequenceOfInteger::Save() +std::string SALOMEDSImpl_AttributeSequenceOfInteger::Save() { int aLength = Length(); char* aResult = new char[aLength * 25]; @@ -179,13 +178,13 @@ string SALOMEDSImpl_AttributeSequenceOfInteger::Save() sprintf(aResult + aPosition , "%d ", Value(i)); aPosition += strlen(aResult + aPosition); } - string ret(aResult); + std::string ret(aResult); delete aResult; return ret; } - -void SALOMEDSImpl_AttributeSequenceOfInteger::Load(const string& value) + +void SALOMEDSImpl_AttributeSequenceOfInteger::Load(const std::string& value) { char* aCopy = (char*)value.c_str(); char* adr = strtok(aCopy, " "); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSequenceOfInteger.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSequenceOfInteger.hxx index 0dde60384..f18503506 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSequenceOfInteger.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSequenceOfInteger.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeSequenceOfInteger.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSequenceOfReal.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSequenceOfReal.cxx index 6e4fc6f6c..b8d8738b0 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSequenceOfReal.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSequenceOfReal.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeSequenceOfReal.cxx // Author : Sergey RUIN // Module : SALOME @@ -26,8 +27,6 @@ #include "SALOMEDSImpl_AttributeSequenceOfReal.hxx" #include -using namespace std; - //======================================================================= //function : GetID //purpose : @@ -109,7 +108,7 @@ void SALOMEDSImpl_AttributeSequenceOfReal::Paste (DF_Attribute* into) dynamic_cast(into)->Assign(myValue); } -void SALOMEDSImpl_AttributeSequenceOfReal::Assign(const vector& other) +void SALOMEDSImpl_AttributeSequenceOfReal::Assign(const std::vector& other) { CheckLocked(); Backup(); @@ -146,7 +145,7 @@ void SALOMEDSImpl_AttributeSequenceOfReal::Remove(const int Index) if(Index <= 0 || Index > myValue.size()) throw DFexception("Out of range"); - typedef vector::iterator VI; + typedef std::vector::iterator VI; int i = 1; for(VI p = myValue.begin(); p!=myValue.end(); p++, i++) { if(i == Index) { @@ -170,7 +169,7 @@ double SALOMEDSImpl_AttributeSequenceOfReal::Value(const int Index) } -string SALOMEDSImpl_AttributeSequenceOfReal::Save() +std::string SALOMEDSImpl_AttributeSequenceOfReal::Save() { int aLength = Length(); char* aResult = new char[aLength * 127]; @@ -180,15 +179,15 @@ string SALOMEDSImpl_AttributeSequenceOfReal::Save() sprintf(aResult + aPosition , "%.64e ", Value(i)); aPosition += strlen(aResult + aPosition); } - string ret(aResult); + std::string ret(aResult); delete aResult; - + return ret; } - -void SALOMEDSImpl_AttributeSequenceOfReal::Load(const string& value) + +void SALOMEDSImpl_AttributeSequenceOfReal::Load(const std::string& value) { - + char* aCopy = (char*)value.c_str(); char* adr = strtok(aCopy, " "); char *err = NULL; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSequenceOfReal.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSequenceOfReal.hxx index 32a80dcc3..ead06c8bd 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSequenceOfReal.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSequenceOfReal.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeSequenceOfReal.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeString.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeString.cxx index 71cccedaa..87db93a61 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeString.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeString.cxx @@ -1,32 +1,31 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeString.cxx // Author : Sergey RUIN // Module : SALOME // #include "SALOMEDSImpl_AttributeString.hxx" -using namespace std; - //======================================================================= //function : GetID //purpose : @@ -38,7 +37,7 @@ const std::string& SALOMEDSImpl_AttributeString::GetID () } SALOMEDSImpl_AttributeString* SALOMEDSImpl_AttributeString::Set (const DF_Label& L, - const std::string& Val) + const std::string& Val) { SALOMEDSImpl_AttributeString* A = NULL; if (!(A=(SALOMEDSImpl_AttributeString*)L.FindAttribute(SALOMEDSImpl_AttributeString::GetID()))) { diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeString.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeString.hxx index 6eeb7cc29..c2eb04a5b 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeString.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeString.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeIOR.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.cxx index d15a29561..60e44a608 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeStudyProperties.cxx // Author : Sergey RUIN // Module : SALOME @@ -26,9 +27,6 @@ #include "SALOMEDSImpl_AttributeStudyProperties.hxx" #include -using namespace std; - - const std::string& SALOMEDSImpl_AttributeStudyProperties::GetID() { static std::string SALOMEDSImpl_AttributeStudyPropertiesID ("128371A2-8F52-11d6-A8A3-0001021E8C7F"); @@ -87,12 +85,12 @@ void SALOMEDSImpl_AttributeStudyProperties::SetModification(const std::string& t } void SALOMEDSImpl_AttributeStudyProperties::GetModifications - (vector& theUserNames, - vector& theMinutes, - vector& theHours, - vector& theDays, - vector& theMonths, - vector& theYears) const + (std::vector& theUserNames, + std::vector& theMinutes, + std::vector& theHours, + std::vector& theDays, + std::vector& theMonths, + std::vector& theYears) const { theUserNames = myUserName; theMinutes = myMinute; @@ -194,8 +192,8 @@ void SALOMEDSImpl_AttributeStudyProperties::Restore(DF_Attribute* with) dynamic_cast(with); Init(); - vector aNames; - vector aMinutes, aHours, aDays, aMonths, aYears; + std::vector aNames; + std::vector aMinutes, aHours, aDays, aMonths, aYears; aProp->GetModifications(aNames, aMinutes, aHours, aDays, aMonths, aYears); for (int i = 0, len = aNames.size(); i < len; i++) { myUserName.push_back(aNames[i]); @@ -234,17 +232,23 @@ void SALOMEDSImpl_AttributeStudyProperties::Paste(DF_Attribute* into) } -string SALOMEDSImpl_AttributeStudyProperties::Save() +std::string SALOMEDSImpl_AttributeStudyProperties::Save() { - vector aNames; - vector aMinutes, aHours, aDays, aMonths, aYears; + std::vector aNames; + std::vector aMinutes, aHours, aDays, aMonths, aYears; GetModifications(aNames, aMinutes, aHours, aDays, aMonths, aYears); - int aLength, anIndex; + int aLength, anIndex, unitsSize = 0, commentSize = 0;; for (aLength = 0, anIndex = aNames.size()-1; anIndex >= 0; anIndex--) aLength += aNames[anIndex].size() + 1; - char* aProperty = new char[3 + aLength + 12 * aNames.size()]; + std::string units = GetUnits(); + std::string comment = GetComment(); + + unitsSize = units.size(); + commentSize = comment.size(); + + char* aProperty = new char[3 + aLength + 12 * aNames.size() + 1 + unitsSize + 1 + commentSize]; char crMode = (char)GetCreationMode(); @@ -254,23 +258,63 @@ string SALOMEDSImpl_AttributeStudyProperties::Save() int a = 2; for (anIndex = 0; anIndex < aLength; anIndex++) { sprintf(&(aProperty[a]),"%2d%2d%2d%2d%4d%s", - (int)(aMinutes[anIndex]), - (int)(aHours[anIndex]), - (int)(aDays[anIndex]), - (int)(aMonths[anIndex]), - (int)(aYears[anIndex]), - (char*)(aNames[anIndex].c_str())); + (int)(aMinutes[anIndex]), + (int)(aHours[anIndex]), + (int)(aDays[anIndex]), + (int)(aMonths[anIndex]), + (int)(aYears[anIndex]), + (char*)(aNames[anIndex].c_str())); a = strlen(aProperty); aProperty[a++] = 1; } + + //Write delimeter of the section to define end of the modifications section + aProperty[a++] = 30; + + //Write units if need + if(units.size() > 0) { + sprintf(&(aProperty[a]),"%s",units.c_str()); + a = strlen(aProperty); + } + + aProperty[a++] = 1; //delimeter of the units and comments + + //Write comments if need + if(comment.size() > 0) { + sprintf(&(aProperty[a]),"%s",comment.c_str()); + a = strlen(aProperty); + a++; + } + aProperty[a] = 0; - string prop(aProperty); + std::string prop(aProperty); delete aProperty; return prop; } -void SALOMEDSImpl_AttributeStudyProperties::Load(const string& value) +void SALOMEDSImpl_AttributeStudyProperties::SetUnits(const std::string& theUnits) { + if(myUnits == theUnits) + return; + myUnits = theUnits; +} + +std::string SALOMEDSImpl_AttributeStudyProperties::GetUnits() { + return myUnits; +} + +void SALOMEDSImpl_AttributeStudyProperties::SetComment(const std::string& theComment) { + if(myComment == theComment) + return; + myComment = theComment; +} + +std::string SALOMEDSImpl_AttributeStudyProperties::GetComment() { + return myComment; +} + + +void SALOMEDSImpl_AttributeStudyProperties::Load(const std::string& value) { char* aCopy = (char*)value.c_str(); @@ -307,11 +351,44 @@ void SALOMEDSImpl_AttributeStudyProperties::Load(const string& value) strncpy(aName, &(aCopy[anIndex]), aNameSize); aName[aNameSize] = 0; SetModification(aName,aMinute,aHour,aDay,aMonth,aYear); - delete(aName); + delete [] (aName); anIndex += aNameSize + 1; + + //Check end of the modifications section + if(anIndex < value.size() && aCopy[anIndex] == 30) + break; + } + + //Case then study contains units and comment properties + if( anIndex < value.size() ) { + anIndex++; //skip the delimeter of the sections: char(30) + int unitsSize; + for(unitsSize = 0; aCopy[anIndex+unitsSize] != 1; unitsSize++); + + if(unitsSize > 0) { + char *anUnits = new char[unitsSize+1]; + strncpy(anUnits, &(aCopy[anIndex]), unitsSize); + anUnits[unitsSize] = 0; + SetUnits(anUnits); + delete [] (anUnits); + } + anIndex += unitsSize + 1; + + int commentSize; + for(commentSize = 0; aCopy[anIndex+commentSize] != 0; commentSize++); + + if(commentSize > 0) { + char *aComment = new char[commentSize+1]; + strncpy(aComment, &(aCopy[anIndex]), commentSize); + aComment[commentSize] = 0; + SetComment(aComment); + delete [] (aComment); + } + anIndex += commentSize; } + if (aCopy[1] == 'l') { SetLocked(true); } - SetModified(0); + SetModified(0); } diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.hxx index 13eb61f6a..4be09cd27 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeStudyProperties.hxx // Author : Sergey RUIN // Module : SALOME @@ -71,6 +72,12 @@ public: void ChangeCreatorName(const std::string& theUserName); + void SetUnits(const std::string& theUnits); + std::string GetUnits(); + + void SetComment(const std::string& theComment); + std::string GetComment(); + void SetCreationMode(const int theMode); int GetCreationMode() const; @@ -94,6 +101,8 @@ private: std::vector myDay; std::vector myMonth; std::vector myYear; + std::string myUnits; + std::string myComment; int myMode; int myModified; bool myLocked; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTable.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTable.hxx new file mode 100644 index 000000000..4cd769fa0 --- /dev/null +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTable.hxx @@ -0,0 +1,106 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 +// + +// File : SALOMEDSImpl_AttributeTable.hxx +// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) +// +#ifndef _SALOMEDSImpl_AttributeTable_HeaderFile +#define _SALOMEDSImpl_AttributeTable_HeaderFile + +#include "SALOMEDSImpl_Defines.hxx" + +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeTable +{ +public: + //! Sort order + typedef enum { + AscendingOrder, //!< The items are sorted ascending + DescendingOrder, //!< The items are sorted descending + } SortOrder; + + //! Sort policy (specifies how empty cells are taken into account when sorting) + typedef enum { + EmptyLowest, //!< Empty cells are considered as lowest values + EmptyHighest, //!< Empty cells are considered as highest values + EmptyFirst, //!< Empty cells are always first + EmptyLast, //!< Empty cells are always last + EmptyIgnore, //!< Empty cells are ignored (stay at initial positions) + } SortPolicy; +}; + +template class TableSorter +{ + TTable* myTable; + SALOMEDSImpl_AttributeTable::SortOrder mySortOrder; + SALOMEDSImpl_AttributeTable::SortPolicy mySortPolicy; + int myIndex; + bool myIsRow; + +public: + TableSorter( TTable* table, + SALOMEDSImpl_AttributeTable::SortOrder so, + SALOMEDSImpl_AttributeTable::SortPolicy sp, + int index, + bool sortRow) + : myTable( table ), mySortOrder( so ), mySortPolicy( sp ), + myIndex( index ), myIsRow( sortRow ) {} + + bool operator() ( int idx1, int idx2 ) + { + bool hasValue1 = myIsRow ? myTable->HasValue( myIndex, idx1 ) : myTable->HasValue( idx1, myIndex ); + bool hasValue2 = myIsRow ? myTable->HasValue( myIndex, idx2 ) : myTable->HasValue( idx2, myIndex ); + if ( !hasValue1 && !hasValue2 ) { + return false; + } + else if ( !hasValue1 || !hasValue2 ) { + switch ( mySortPolicy ) { + case SALOMEDSImpl_AttributeTable::EmptyLowest: + return (!hasValue1) ? + (mySortOrder == SALOMEDSImpl_AttributeTable::AscendingOrder) : + (mySortOrder == SALOMEDSImpl_AttributeTable::DescendingOrder); + case SALOMEDSImpl_AttributeTable::EmptyHighest: + return (!hasValue1) ? + (mySortOrder != SALOMEDSImpl_AttributeTable::AscendingOrder) : + (mySortOrder != SALOMEDSImpl_AttributeTable::DescendingOrder); + case SALOMEDSImpl_AttributeTable::EmptyFirst: + return (!hasValue1); + case SALOMEDSImpl_AttributeTable::EmptyLast: + return hasValue1; + case SALOMEDSImpl_AttributeTable::EmptyIgnore: + default: + // should not go here + return false; + } + } + else { + if ( myIsRow ) { + return mySortOrder == SALOMEDSImpl_AttributeTable::AscendingOrder ? + myTable->GetValue( myIndex, idx1 ) < myTable->GetValue( myIndex, idx2 ) : + myTable->GetValue( myIndex, idx2 ) < myTable->GetValue( myIndex, idx1 ); + } + else { + return mySortOrder == SALOMEDSImpl_AttributeTable::AscendingOrder ? + myTable->GetValue( idx1, myIndex ) < myTable->GetValue( idx2, myIndex ) : + myTable->GetValue( idx2, myIndex ) < myTable->GetValue( idx1, myIndex ); + } + } + } +}; + +#endif // _SALOMEDSImpl_AttributeTable_HeaderFile diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.cxx index da906393c..7290d7098 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.cxx @@ -1,35 +1,36 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeTableOfInteger.cxx // Author : Michael Ponikarov // Module : SALOME // #include "SALOMEDSImpl_AttributeTableOfInteger.hxx" -#include -using namespace std; +#include +#include #define SEPARATOR '\1' -typedef map::const_iterator MI; +typedef std::map::const_iterator MI; static std::string getUnit(std::string theString) { @@ -76,11 +77,10 @@ void SALOMEDSImpl_AttributeTableOfInteger::SetNbColumns(const int theNbColumns) CheckLocked(); Backup(); - map aMap; + std::map aMap; aMap = myTable; myTable.clear(); - for(MI p = aMap.begin(); p != aMap.end(); p++) { int aRow = (int)(p->first/myNbColumns) + 1; int aCol = (int)(p->first - myNbColumns*(aRow-1)); @@ -97,7 +97,6 @@ void SALOMEDSImpl_AttributeTableOfInteger::SetNbColumns(const int theNbColumns) } SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved - } void SALOMEDSImpl_AttributeTableOfInteger::SetTitle(const std::string& theTitle) @@ -105,7 +104,7 @@ void SALOMEDSImpl_AttributeTableOfInteger::SetTitle(const std::string& theTitle) CheckLocked(); Backup(); myTitle = theTitle; - + SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved } @@ -115,7 +114,7 @@ std::string SALOMEDSImpl_AttributeTableOfInteger::GetTitle() const } void SALOMEDSImpl_AttributeTableOfInteger::SetRowData(const int theRow, - const vector& theData) + const std::vector& theData) { CheckLocked(); if(theData.size() > myNbColumns) SetNbColumns(theData.size()); @@ -136,9 +135,9 @@ void SALOMEDSImpl_AttributeTableOfInteger::SetRowData(const int theRow, SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved } -vector SALOMEDSImpl_AttributeTableOfInteger::GetRowData(const int theRow) +std::vector SALOMEDSImpl_AttributeTableOfInteger::GetRowData(const int theRow) { - vector aSeq; + std::vector aSeq; int i, aShift = (theRow-1)*myNbColumns; for(i = 1; i <= myNbColumns; i++) { if(myTable.find(aShift+i) != myTable.end()) @@ -151,11 +150,11 @@ vector SALOMEDSImpl_AttributeTableOfInteger::GetRowData(const int theRow) } void SALOMEDSImpl_AttributeTableOfInteger::SetRowTitle(const int theRow, - const std::string& theTitle) + const std::string& theTitle) { CheckLocked(); Backup(); - string aTitle(theTitle), aUnit = GetRowUnit(theRow); + std::string aTitle(theTitle), aUnit = GetRowUnit(theRow); if(aUnit.size()>0) { aTitle += SEPARATOR; aTitle += aUnit; @@ -166,7 +165,7 @@ void SALOMEDSImpl_AttributeTableOfInteger::SetRowTitle(const int theRow, } void SALOMEDSImpl_AttributeTableOfInteger::SetRowUnit(const int theRow, - const std::string& theUnit) + const std::string& theUnit) { CheckLocked(); Backup(); @@ -179,7 +178,7 @@ void SALOMEDSImpl_AttributeTableOfInteger::SetRowUnit(const int theRow, SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved } -void SALOMEDSImpl_AttributeTableOfInteger::SetRowUnits(const vector& theUnits) +void SALOMEDSImpl_AttributeTableOfInteger::SetRowUnits(const std::vector& theUnits) { if (theUnits.size() != GetNbRows()) throw DFexception("Invalid number of rows"); int aLength = theUnits.size(), i; @@ -188,15 +187,15 @@ void SALOMEDSImpl_AttributeTableOfInteger::SetRowUnits(const vector& the SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved } -vector SALOMEDSImpl_AttributeTableOfInteger::GetRowUnits() +std::vector SALOMEDSImpl_AttributeTableOfInteger::GetRowUnits() { - vector aSeq; + std::vector aSeq; int aLength = myRows.size(), i; for(i=0; i& theTitles) +void SALOMEDSImpl_AttributeTableOfInteger::SetRowTitles(const std::vector& theTitles) { if (theTitles.size() != GetNbRows()) throw DFexception("Invalid number of rows"); int aLength = theTitles.size(), i; @@ -205,29 +204,26 @@ void SALOMEDSImpl_AttributeTableOfInteger::SetRowTitles(const vector& th SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved } -vector SALOMEDSImpl_AttributeTableOfInteger::GetRowTitles() +std::vector SALOMEDSImpl_AttributeTableOfInteger::GetRowTitles() { - vector aSeq; + std::vector aSeq; int aLength = myRows.size(), i; for(i=0; i& theData) + const std::vector& theData) { CheckLocked(); if(theColumn > myNbColumns) SetNbColumns(theColumn); @@ -250,9 +246,9 @@ void SALOMEDSImpl_AttributeTableOfInteger::SetColumnData(const int theColumn, } -vector SALOMEDSImpl_AttributeTableOfInteger::GetColumnData(const int theColumn) +std::vector SALOMEDSImpl_AttributeTableOfInteger::GetColumnData(const int theColumn) { - vector aSeq; + std::vector aSeq; int i, anIndex; for(i = 1; i <= myNbRows; i++) { anIndex = myNbColumns*(i-1) + theColumn; @@ -266,9 +262,9 @@ vector SALOMEDSImpl_AttributeTableOfInteger::GetColumnData(const int theCol } void SALOMEDSImpl_AttributeTableOfInteger::SetColumnTitle(const int theColumn, - const std::string& theTitle) + const std::string& theTitle) { - CheckLocked(); + CheckLocked(); Backup(); while(myCols.size() < theColumn) myCols.push_back(std::string("")); myCols[theColumn-1] = theTitle; @@ -283,7 +279,7 @@ std::string SALOMEDSImpl_AttributeTableOfInteger::GetColumnTitle(const int theCo return myCols[theColumn-1]; } -void SALOMEDSImpl_AttributeTableOfInteger::SetColumnTitles(const vector& theTitles) +void SALOMEDSImpl_AttributeTableOfInteger::SetColumnTitles(const std::vector& theTitles) { if (theTitles.size() != myNbColumns) throw DFexception("Invalid number of columns"); int aLength = theTitles.size(), i; @@ -292,9 +288,9 @@ void SALOMEDSImpl_AttributeTableOfInteger::SetColumnTitles(const vector& SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved } -vector SALOMEDSImpl_AttributeTableOfInteger::GetColumnTitles() +std::vector SALOMEDSImpl_AttributeTableOfInteger::GetColumnTitles() { - vector aSeq; + std::vector aSeq; int aLength = myCols.size(), i; for(i=0; i myNbColumns) SetNbColumns(theColumn); int anIndex = (theRow-1)*myNbColumns + theColumn; @@ -331,7 +328,7 @@ void SALOMEDSImpl_AttributeTableOfInteger::PutValue(const int theValue, } bool SALOMEDSImpl_AttributeTableOfInteger::HasValue(const int theRow, - const int theColumn) + const int theColumn) { if(theRow > myNbRows || theRow < 1) return false; if(theColumn > myNbColumns || theColumn < 1) return false; @@ -340,10 +337,10 @@ bool SALOMEDSImpl_AttributeTableOfInteger::HasValue(const int theRow, } int SALOMEDSImpl_AttributeTableOfInteger::GetValue(const int theRow, - const int theColumn) + const int theColumn) { if(theRow > myNbRows || theRow < 1) throw DFexception("Invalid cell index"); - if(theColumn > myNbColumns || theColumn < 1) DFexception("Invalid cell index"); + if(theColumn > myNbColumns || theColumn < 1) throw DFexception("Invalid cell index"); int anIndex = (theRow-1)*myNbColumns + theColumn; if(myTable.find(anIndex) != myTable.end()) return myTable[anIndex]; @@ -352,6 +349,20 @@ int SALOMEDSImpl_AttributeTableOfInteger::GetValue(const int theRow, return 0; } +void SALOMEDSImpl_AttributeTableOfInteger::RemoveValue(const int theRow, const int theColumn) +{ + CheckLocked(); + if(theRow > myNbRows || theRow < 1) throw DFexception("Invalid cell index"); + if(theColumn > myNbColumns || theColumn < 1) throw DFexception("Invalid cell index"); + + int anIndex = (theRow-1)*myNbColumns + theColumn; + if (myTable.find(anIndex) != myTable.end()) { + //Backup(); + myTable.erase(anIndex); + SetModifyFlag(); // table is modified + } +} + const std::string& SALOMEDSImpl_AttributeTableOfInteger::ID() const { return GetID(); @@ -405,10 +416,9 @@ void SALOMEDSImpl_AttributeTableOfInteger::Paste(DF_Attribute* into) aTable->myCols.push_back(GetColumnTitle(anIndex)); } - -vector SALOMEDSImpl_AttributeTableOfInteger::GetSetRowIndices(const int theRow) +std::vector SALOMEDSImpl_AttributeTableOfInteger::GetSetRowIndices(const int theRow) { - vector aSeq; + std::vector aSeq; int i, aShift = myNbColumns*(theRow-1); for(i = 1; i <= myNbColumns; i++) { @@ -418,9 +428,9 @@ vector SALOMEDSImpl_AttributeTableOfInteger::GetSetRowIndices(const int the return aSeq; } -vector SALOMEDSImpl_AttributeTableOfInteger::GetSetColumnIndices(const int theColumn) +std::vector SALOMEDSImpl_AttributeTableOfInteger::GetSetColumnIndices(const int theColumn) { - vector aSeq; + std::vector aSeq; int i, anIndex; for(i = 1; i <= myNbRows; i++) { @@ -431,10 +441,9 @@ vector SALOMEDSImpl_AttributeTableOfInteger::GetSetColumnIndices(const int return aSeq; } - -string SALOMEDSImpl_AttributeTableOfInteger::Save() +std::string SALOMEDSImpl_AttributeTableOfInteger::Save() { - string aString; + std::string aString; char* buffer = new char[1024]; int i, j, l; @@ -490,11 +499,9 @@ string SALOMEDSImpl_AttributeTableOfInteger::Save() return aString; } - - -void SALOMEDSImpl_AttributeTableOfInteger::Load(const string& value) +void SALOMEDSImpl_AttributeTableOfInteger::Load(const std::string& value) { - vector v; + std::vector v; int i, j, l, pos, aSize = (int)value.size(); for(i = 0, pos = 0; i SALOMEDSImpl_AttributeTableOfInteger::SortRow(const int theRow, SortOrder sortOrder, SortPolicy sortPolicy ) +{ + CheckLocked(); + std::vector result; + if ( theRow > 0 && theRow <= myNbRows ) { + std::vector indices( myNbColumns ); + int cnt = 0; + for ( int i = 0; i < myNbColumns; i++ ) { + if ( sortPolicy != EmptyIgnore || HasValue(theRow, i+1) ) { + indices[cnt++] = i+1; + } + } + indices.resize(cnt); + + TableSorter sorter( this, sortOrder, sortPolicy, theRow, true ); + std::stable_sort( indices.begin(), indices.end(), sorter ); + + if ( sortPolicy == EmptyIgnore ) { + std::vector other( myNbColumns ); + cnt = 0; + for( int i = 0; i < myNbColumns; i++ ) + other[i] = HasValue(theRow, i+1) ? indices[cnt++] : i+1; + indices = other; + } + result = indices; + + for ( int col = 0; col < indices.size(); col++ ) { + int idx = indices[col]; + if ( col+1 == idx ) continue; + SwapCells(theRow, col+1, theRow, idx); + int idx1 = 0; + for ( int i = col+1; i < indices.size() && idx1 == 0; i++) + if ( indices[i] == col+1 ) idx1 = i; + indices[idx1] = idx; + } + // no need for SetModifyFlag(), since it is done by SwapCells() + } + return result; +} + +std::vector SALOMEDSImpl_AttributeTableOfInteger::SortColumn(const int theColumn, SortOrder sortOrder, SortPolicy sortPolicy ) +{ + CheckLocked(); + std::vector result; + if ( theColumn > 0 && theColumn <= myNbColumns ) { + std::vector indices( myNbRows ); + int cnt = 0; + for ( int i = 0; i < myNbRows; i++ ) { + if ( sortPolicy != EmptyIgnore || HasValue(i+1, theColumn) ) { + indices[cnt++] = i+1; + } + } + indices.resize(cnt); + + TableSorter sorter( this, sortOrder, sortPolicy, theColumn, false ); + std::stable_sort( indices.begin(), indices.end(), sorter ); + + if ( sortPolicy == EmptyIgnore ) { + std::vector other( myNbRows ); + cnt = 0; + for( int i = 0; i < myNbRows; i++ ) + other[i] = HasValue(i+1, theColumn) ? indices[cnt++] : i+1; + indices = other; + } + result = indices; + + for ( int row = 0; row < indices.size(); row++ ) { + int idx = indices[row]; + if ( row+1 == idx ) continue; + SwapCells(row+1, theColumn, idx, theColumn); + int idx1 = 0; + for ( int i = row+1; i < indices.size() && idx1 == 0; i++) + if ( indices[i] == row+1 ) idx1 = i; + indices[idx1] = idx; + } + // no need for SetModifyFlag(), since it is done by SwapCells() + } + return result; +} + +std::vector SALOMEDSImpl_AttributeTableOfInteger::SortByRow(const int theRow, SortOrder sortOrder, SortPolicy sortPolicy ) +{ + CheckLocked(); + std::vector result; + if ( theRow > 0 && theRow <= myNbRows ) { + std::vector indices( myNbColumns ); + int cnt = 0; + for ( int i = 0; i < myNbColumns; i++ ) { + if ( sortPolicy != EmptyIgnore || HasValue(theRow, i+1) ) { + indices[cnt++] = i+1; + } + } + indices.resize(cnt); + + TableSorter sorter( this, sortOrder, sortPolicy, theRow, true ); + std::stable_sort( indices.begin(), indices.end(), sorter ); + + if ( sortPolicy == EmptyIgnore ) { + std::vector other( myNbColumns ); + cnt = 0; + for( int i = 0; i < myNbColumns; i++ ) + other[i] = HasValue(theRow, i+1) ? indices[cnt++] : i+1; + indices = other; + } + result = indices; + + for ( int col = 0; col < indices.size(); col++ ) { + int idx = indices[col]; + if ( col+1 == idx ) continue; + SwapColumns(col+1, idx); + int idx1 = 0; + for ( int i = col+1; i < indices.size() && idx1 == 0; i++) + if ( indices[i] == col+1 ) idx1 = i; + indices[idx1] = idx; + } + // no need for SetModifyFlag(), since it is done by SwapColumns() + } + return result; +} + +std::vector SALOMEDSImpl_AttributeTableOfInteger::SortByColumn(const int theColumn, SortOrder sortOrder, SortPolicy sortPolicy ) +{ + CheckLocked(); + std::vector result; + if ( theColumn > 0 && theColumn <= myNbColumns ) { + std::vector indices( myNbRows ); + int cnt = 0; + for ( int i = 0; i < myNbRows; i++ ) { + if ( sortPolicy != EmptyIgnore || HasValue(i+1, theColumn) ) { + indices[cnt++] = i+1; + } + } + indices.resize(cnt); + + TableSorter sorter( this, sortOrder, sortPolicy, theColumn, false ); + std::stable_sort( indices.begin(), indices.end(), sorter ); + + if ( sortPolicy == EmptyIgnore ) { + std::vector other( myNbRows ); + cnt = 0; + for( int i = 0; i < myNbRows; i++ ) + other[i] = HasValue(i+1, theColumn) ? indices[cnt++] : i+1; + indices = other; + } + result = indices; + + for ( int row = 0; row < indices.size(); row++ ) { + int idx = indices[row]; + if ( row+1 == idx ) continue; + SwapRows(row+1, idx); + int idx1 = 0; + for ( int i = row+1; i < indices.size() && idx1 == 0; i++) + if ( indices[i] == row+1 ) idx1 = i; + indices[idx1] = idx; + } + // no need for SetModifyFlag(), since it is done by SwapRows() + } + return result; +} + +void SALOMEDSImpl_AttributeTableOfInteger::SwapCells(const int theRow1, const int theColumn1, + const int theRow2, const int theColumn2) +{ + CheckLocked(); + if (theRow1 > myNbRows || theRow1 < 1) throw DFexception("Invalid cell index"); + if (theRow2 > myNbRows || theRow2 < 1) throw DFexception("Invalid cell index"); + if (theColumn1 > myNbColumns || theColumn1 < 1) throw DFexception("Invalid cell index"); + if (theColumn2 > myNbColumns || theColumn2 < 1) throw DFexception("Invalid cell index"); + + int anIndex1 = (theRow1-1)*myNbColumns + theColumn1; + int anIndex2 = (theRow2-1)*myNbColumns + theColumn2; + + bool hasValue1 = myTable.find(anIndex1) != myTable.end(); + bool hasValue2 = myTable.find(anIndex2) != myTable.end(); + + if (!hasValue1 && !hasValue2) return; // nothing changed + + int value1 = hasValue1 ? myTable[anIndex1] : 0; + int value2 = hasValue2 ? myTable[anIndex2] : 0; + + if (hasValue1 && hasValue2 && value1 == value2) return; // nothing changed + + if (hasValue1) myTable[anIndex2] = value1; + else myTable.erase(anIndex2); + if (hasValue2) myTable[anIndex1] = value2; + else myTable.erase(anIndex1); + + SetModifyFlag(); // table is modified +} + +void SALOMEDSImpl_AttributeTableOfInteger::SwapRows(const int theRow1, const int theRow2) +{ + CheckLocked(); + for (int i = 1; i <= myNbColumns; i++) + SwapCells(theRow1, i, theRow2, i); + // swap row titles + std::string tmp = myRows[theRow1-1]; + myRows[theRow1-1] = myRows[theRow2-1]; + myRows[theRow2-1] = tmp; + // no need for SetModifyFlag(), since it is done by SwapCells() +} + +void SALOMEDSImpl_AttributeTableOfInteger::SwapColumns(const int theColumn1, const int theColumn2) +{ + CheckLocked(); + for (int i = 1; i <= myNbRows; i++) + SwapCells(i, theColumn1, i, theColumn2); + // swap column titles + std::string tmp = myCols[theColumn1-1]; + myCols[theColumn1-1] = myCols[theColumn2-1]; + myCols[theColumn2-1] = tmp; + // no need for SetModifyFlag(), since it is done by SwapCells() +} + diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.hxx index dd80b1ba9..e68fc34bd 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME SALOMEDSImpl : data structure of SALOME and sources of Salome data server // File : SALOMEDSImpl_AttributeTableOfInteger.hxx // Author : Michael Ponikarov @@ -31,6 +32,7 @@ #include "DF_Attribute.hxx" #include "DF_Label.hxx" #include "SALOMEDSImpl_GenericAttribute.hxx" +#include "SALOMEDSImpl_AttributeTable.hxx" #include #include @@ -38,59 +40,70 @@ class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeTableOfInteger : - public SALOMEDSImpl_GenericAttribute + public SALOMEDSImpl_GenericAttribute, public SALOMEDSImpl_AttributeTable { public: - virtual std::string Save(); - virtual void Load(const std::string&); - static const std::string& GetID() ; - static SALOMEDSImpl_AttributeTableOfInteger* Set(const DF_Label& label) ; + virtual std::string Save(); + virtual void Load(const std::string&); + + static const std::string& GetID(); + static SALOMEDSImpl_AttributeTableOfInteger* Set(const DF_Label& label); + SALOMEDSImpl_AttributeTableOfInteger(); - void SetNbColumns(const int theNbColumns); - void SetTitle(const std::string& theTitle) ; - std::string GetTitle() const; - void SetRowData(const int theRow,const std::vector& theData) ; - std::vector GetRowData(const int theRow) ; - void SetRowTitle(const int theRow,const std::string& theTitle) ; - void SetRowUnit(const int theRow,const std::string& theUnit) ; - std::string GetRowUnit(const int theRow) const; - void SetRowUnits(const std::vector& theUnits) ; + + void SetNbColumns(const int theNbColumns); + void SetTitle(const std::string& theTitle); + std::string GetTitle() const; + void SetRowData(const int theRow, const std::vector& theData); + std::vector GetRowData(const int theRow); + void SetRowTitle(const int theRow, const std::string& theTitle); + void SetRowUnit(const int theRow, const std::string& theUnit); + std::string GetRowUnit(const int theRow) const; + void SetRowUnits(const std::vector& theUnits); std::vector GetRowUnits(); - void SetRowTitles(const std::vector& theTitles) ; + void SetRowTitles(const std::vector& theTitles); std::vector GetRowTitles(); - std::string GetRowTitle(const int theRow) const; - void SetColumnData(const int theColumn,const std::vector& theData) ; - std::vector GetColumnData(const int theColumn) ; - void SetColumnTitle(const int theColumn,const std::string& theTitle) ; - std::string GetColumnTitle(const int theColumn) const; - void SetColumnTitles(const std::vector& theTitles); + std::string GetRowTitle(const int theRow) const; + void SetColumnData(const int theColumn, const std::vector& theData); + std::vector GetColumnData(const int theColumn); + void SetColumnTitle(const int theColumn, const std::string& theTitle); + std::string GetColumnTitle(const int theColumn) const; + void SetColumnTitles(const std::vector& theTitles); std::vector GetColumnTitles(); - int GetNbRows() const; - int GetNbColumns() const; + int GetNbRows() const; + int GetNbColumns() const; + + void PutValue(const int theValue, const int theRow, const int theColumn); + bool HasValue(const int theRow, const int theColumn); + int GetValue(const int theRow, const int theColumn); + void RemoveValue(const int theRow, const int theColumn); + const std::string& ID() const; + void Restore(DF_Attribute* with); + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute* into); - void PutValue(const int theValue,const int theRow,const int theColumn) ; - bool HasValue(const int theRow,const int theColumn) ; - int GetValue(const int theRow,const int theColumn) ; - const std::string& ID() const; - void Restore(DF_Attribute* with) ; - DF_Attribute* NewEmpty() const; - void Paste(DF_Attribute* into); + std::vector GetSetRowIndices(const int theRow); + std::vector GetSetColumnIndices(const int theColumn); - std::vector GetSetRowIndices(const int theRow); - std::vector GetSetColumnIndices(const int theColumn); + std::vector SortRow(const int theRow, SortOrder sortOrder, SortPolicy sortPolicy); + std::vector SortColumn(const int theColumn, SortOrder sortOrder, SortPolicy sortPolicy); + std::vector SortByRow(const int theRow, SortOrder sortOrder, SortPolicy sortPolicy); + std::vector SortByColumn(const int theColumn, SortOrder sortOrder, SortPolicy sortPolicy); + + void SwapCells(const int theRow1, const int theColumn1, const int theRow2, const int theColumn2); + void SwapRows(const int theRow1, const int theRow2); + void SwapColumns(const int theColumn1, const int theColumn2); ~SALOMEDSImpl_AttributeTableOfInteger() {} private: - - std::map myTable; - std::string myTitle; + std::map myTable; + std::string myTitle; std::vector myRows; std::vector myCols; - int myNbRows; - int myNbColumns; - + int myNbRows; + int myNbColumns; }; #endif diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.cxx index 1b9dd68c6..477449df2 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.cxx @@ -1,53 +1,49 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeTableOfReal.cxx // Author : Michael Ponikarov // Module : SALOME // #include "SALOMEDSImpl_AttributeTableOfReal.hxx" -#include -#include -using namespace std; +#include +#include #define SEPARATOR '\1' +typedef std::map::const_iterator MI; -typedef map::const_iterator MI; - -static std::string getUnit(std::string theString) +static std::string getUnit(const std::string& theString) { std::string aString(theString); int aPos = aString.find(SEPARATOR); - if(aPos <= 0 || aPos == aString.size() ) return std::string(); - return aString.substr(aPos+1, aString.size()); + return aPos < 0 || aPos == aString.size()-1 ? std::string() : aString.substr(aPos+1, aString.size()); } -static std::string getTitle(std::string theString) +static std::string getTitle(const std::string& theString) { std::string aString(theString); int aPos = aString.find(SEPARATOR); - if(aPos < 0) return aString; - if(aPos == 0) return std::string(); - return aString.substr(0, aPos); + return aPos < 0 ? aString :aString.substr(0, aPos); } const std::string& SALOMEDSImpl_AttributeTableOfReal::GetID() @@ -78,7 +74,7 @@ void SALOMEDSImpl_AttributeTableOfReal::SetNbColumns(const int theNbColumns) CheckLocked(); Backup(); - map aMap; + std::map aMap; aMap = myTable; myTable.clear(); @@ -94,7 +90,7 @@ void SALOMEDSImpl_AttributeTableOfReal::SetNbColumns(const int theNbColumns) myNbColumns = theNbColumns; while (myCols.size() < myNbColumns) { // append empty columns titles - myCols.push_back(string("")); + myCols.push_back(std::string("")); } SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved @@ -115,7 +111,7 @@ std::string SALOMEDSImpl_AttributeTableOfReal::GetTitle() const } void SALOMEDSImpl_AttributeTableOfReal::SetRowData(const int theRow, - const vector& theData) + const std::vector& theData) { CheckLocked(); if(theData.size() > myNbColumns) SetNbColumns(theData.size()); @@ -136,9 +132,9 @@ void SALOMEDSImpl_AttributeTableOfReal::SetRowData(const int theRow, SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved } -vector SALOMEDSImpl_AttributeTableOfReal::GetRowData(const int theRow) +std::vector SALOMEDSImpl_AttributeTableOfReal::GetRowData(const int theRow) { - vector aSeq; + std::vector aSeq; int i, aShift = (theRow-1)*myNbColumns; for(i = 1; i <= myNbColumns; i++) { if(myTable.find(aShift+i) != myTable.end()) @@ -150,9 +146,8 @@ vector SALOMEDSImpl_AttributeTableOfReal::GetRowData(const int theRow) return aSeq; } - void SALOMEDSImpl_AttributeTableOfReal::SetRowTitle(const int theRow, - const std::string& theTitle) + const std::string& theTitle) { CheckLocked(); Backup(); @@ -167,7 +162,7 @@ void SALOMEDSImpl_AttributeTableOfReal::SetRowTitle(const int theRow, } void SALOMEDSImpl_AttributeTableOfReal::SetRowUnit(const int theRow, - const std::string& theUnit) + const std::string& theUnit) { CheckLocked(); Backup(); @@ -180,7 +175,7 @@ void SALOMEDSImpl_AttributeTableOfReal::SetRowUnit(const int theRow, SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved } -void SALOMEDSImpl_AttributeTableOfReal::SetRowUnits(const vector& theUnits) +void SALOMEDSImpl_AttributeTableOfReal::SetRowUnits(const std::vector& theUnits) { if (theUnits.size() != GetNbRows()) throw DFexception("Invalid number of rows"); int aLength = theUnits.size(), i; @@ -189,15 +184,15 @@ void SALOMEDSImpl_AttributeTableOfReal::SetRowUnits(const vector& theUni SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved } -vector SALOMEDSImpl_AttributeTableOfReal::GetRowUnits() +std::vector SALOMEDSImpl_AttributeTableOfReal::GetRowUnits() { - vector aSeq; + std::vector aSeq; int aLength = myRows.size(), i; for(i=0; i& theTitles) +void SALOMEDSImpl_AttributeTableOfReal::SetRowTitles(const std::vector& theTitles) { if (theTitles.size() != GetNbRows()) throw DFexception("Invalid number of rows"); int aLength = theTitles.size(), i; @@ -206,15 +201,14 @@ void SALOMEDSImpl_AttributeTableOfReal::SetRowTitles(const vector& theTi SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved } -vector SALOMEDSImpl_AttributeTableOfReal::GetRowTitles() +std::vector SALOMEDSImpl_AttributeTableOfReal::GetRowTitles() { - vector aSeq; + std::vector aSeq; int aLength = myRows.size(), i; for(i=0; i& theData) + const std::vector& theData) { CheckLocked(); if(theColumn > myNbColumns) SetNbColumns(theColumn); @@ -242,17 +236,16 @@ void SALOMEDSImpl_AttributeTableOfReal::SetColumnData(const int theColumn, if(aLength > myNbRows) { myNbRows = aLength; while (myRows.size() < myNbRows) { // append empty row titles - myRows.push_back(string("")); + myRows.push_back(std::string("")); } } SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved } - -vector SALOMEDSImpl_AttributeTableOfReal::GetColumnData(const int theColumn) +std::vector SALOMEDSImpl_AttributeTableOfReal::GetColumnData(const int theColumn) { - vector aSeq; + std::vector aSeq; int i, anIndex; for(i = 1; i <= myNbRows; i++) { @@ -267,7 +260,7 @@ vector SALOMEDSImpl_AttributeTableOfReal::GetColumnData(const int theCol } void SALOMEDSImpl_AttributeTableOfReal::SetColumnTitle(const int theColumn, - const std::string& theTitle) + const std::string& theTitle) { CheckLocked(); Backup(); @@ -284,7 +277,7 @@ std::string SALOMEDSImpl_AttributeTableOfReal::GetColumnTitle(const int theColum return myCols[theColumn-1]; } -void SALOMEDSImpl_AttributeTableOfReal::SetColumnTitles(const vector& theTitles) +void SALOMEDSImpl_AttributeTableOfReal::SetColumnTitles(const std::vector& theTitles) { if (theTitles.size() != myNbColumns) throw DFexception("Invalid number of columns"); int aLength = theTitles.size(), i; @@ -293,9 +286,9 @@ void SALOMEDSImpl_AttributeTableOfReal::SetColumnTitles(const vector& th SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved } -vector SALOMEDSImpl_AttributeTableOfReal::GetColumnTitles() +std::vector SALOMEDSImpl_AttributeTableOfReal::GetColumnTitles() { - vector aSeq; + std::vector aSeq; int aLength = myCols.size(), i; for(i=0; i myNbColumns) SetNbColumns(theColumn); int anIndex = (theRow-1)*myNbColumns + theColumn; @@ -332,7 +326,7 @@ void SALOMEDSImpl_AttributeTableOfReal::PutValue(const double& theValue, } bool SALOMEDSImpl_AttributeTableOfReal::HasValue(const int theRow, - const int theColumn) + const int theColumn) { if(theRow > myNbRows || theRow < 1) return false; if(theColumn > myNbColumns || theColumn < 1) return false; @@ -341,7 +335,7 @@ bool SALOMEDSImpl_AttributeTableOfReal::HasValue(const int theRow, } double SALOMEDSImpl_AttributeTableOfReal::GetValue(const int theRow, - const int theColumn) + const int theColumn) { if(theRow > myNbRows || theRow < 1) throw DFexception("Invalid cell index"); if(theColumn > myNbColumns || theColumn < 1) throw DFexception("Invalid cell index"); @@ -353,6 +347,20 @@ double SALOMEDSImpl_AttributeTableOfReal::GetValue(const int theRow, return 0.; } +void SALOMEDSImpl_AttributeTableOfReal::RemoveValue(const int theRow, const int theColumn) +{ + CheckLocked(); + if(theRow > myNbRows || theRow < 1) throw DFexception("Invalid cell index"); + if(theColumn > myNbColumns || theColumn < 1) throw DFexception("Invalid cell index"); + + int anIndex = (theRow-1)*myNbColumns + theColumn; + if (myTable.find(anIndex) != myTable.end()) { + //Backup(); + myTable.erase(anIndex); + SetModifyFlag(); // table is modified + } +} + const std::string& SALOMEDSImpl_AttributeTableOfReal::ID() const { return GetID(); @@ -406,10 +414,9 @@ void SALOMEDSImpl_AttributeTableOfReal::Paste(DF_Attribute* into) aTable->myCols.push_back(GetColumnTitle(anIndex)); } - -vector SALOMEDSImpl_AttributeTableOfReal::GetSetRowIndices(const int theRow) +std::vector SALOMEDSImpl_AttributeTableOfReal::GetSetRowIndices(const int theRow) { - vector aSeq; + std::vector aSeq; int i, aShift = myNbColumns*(theRow-1); for(i = 1; i <= myNbColumns; i++) { @@ -419,9 +426,9 @@ vector SALOMEDSImpl_AttributeTableOfReal::GetSetRowIndices(const int theRow return aSeq; } -vector SALOMEDSImpl_AttributeTableOfReal::GetSetColumnIndices(const int theColumn) +std::vector SALOMEDSImpl_AttributeTableOfReal::GetSetColumnIndices(const int theColumn) { - vector aSeq; + std::vector aSeq; int i, anIndex; for(i = 1; i <= myNbRows; i++) { @@ -432,9 +439,9 @@ vector SALOMEDSImpl_AttributeTableOfReal::GetSetColumnIndices(const int the return aSeq; } -string SALOMEDSImpl_AttributeTableOfReal::Save() +std::string SALOMEDSImpl_AttributeTableOfReal::Save() { - string aString; + std::string aString; char* buffer = new char[1024]; int i, j, l; @@ -490,9 +497,9 @@ string SALOMEDSImpl_AttributeTableOfReal::Save() return aString; } -void SALOMEDSImpl_AttributeTableOfReal::Load(const string& value) +void SALOMEDSImpl_AttributeTableOfReal::Load(const std::string& value) { - vector v; + std::vector v; int i, j, l, pos, aSize = (int)value.size(); for(i = 0, pos = 0; i SALOMEDSImpl_AttributeTableOfReal::SortRow(const int theRow, SortOrder sortOrder, SortPolicy sortPolicy ) +{ + CheckLocked(); + std::vector result; + if ( theRow > 0 && theRow <= myNbRows ) { + std::vector indices( myNbColumns ); + int cnt = 0; + for ( int i = 0; i < myNbColumns; i++ ) { + if ( sortPolicy != EmptyIgnore || HasValue(theRow, i+1) ) { + indices[cnt++] = i+1; + } + } + indices.resize(cnt); + + TableSorter sorter( this, sortOrder, sortPolicy, theRow, true ); + std::stable_sort( indices.begin(), indices.end(), sorter ); + + if ( sortPolicy == EmptyIgnore ) { + std::vector other( myNbColumns ); + cnt = 0; + for( int i = 0; i < myNbColumns; i++ ) + other[i] = HasValue(theRow, i+1) ? indices[cnt++] : i+1; + indices = other; + } + result = indices; + + for ( int col = 0; col < indices.size(); col++ ) { + int idx = indices[col]; + if ( col+1 == idx ) continue; + SwapCells(theRow, col+1, theRow, idx); + int idx1 = 0; + for ( int i = col+1; i < indices.size() && idx1 == 0; i++) + if ( indices[i] == col+1 ) idx1 = i; + indices[idx1] = idx; + } + // no need for SetModifyFlag(), since it is done by SwapCells() + } + return result; +} + +std::vector SALOMEDSImpl_AttributeTableOfReal::SortColumn(const int theColumn, SortOrder sortOrder, SortPolicy sortPolicy ) +{ + CheckLocked(); + std::vector result; + if ( theColumn > 0 && theColumn <= myNbColumns ) { + std::vector indices( myNbRows ); + int cnt = 0; + for ( int i = 0; i < myNbRows; i++ ) { + if ( sortPolicy != EmptyIgnore || HasValue(i+1, theColumn) ) { + indices[cnt++] = i+1; + } + } + indices.resize(cnt); + + TableSorter sorter( this, sortOrder, sortPolicy, theColumn, false ); + std::stable_sort( indices.begin(), indices.end(), sorter ); + + if ( sortPolicy == EmptyIgnore ) { + std::vector other( myNbRows ); + cnt = 0; + for( int i = 0; i < myNbRows; i++ ) + other[i] = HasValue(i+1, theColumn) ? indices[cnt++] : i+1; + indices = other; + } + result = indices; + + for ( int row = 0; row < indices.size(); row++ ) { + int idx = indices[row]; + if ( row+1 == idx ) continue; + SwapCells(row+1, theColumn, idx, theColumn); + int idx1 = 0; + for ( int i = row+1; i < indices.size() && idx1 == 0; i++) + if ( indices[i] == row+1 ) idx1 = i; + indices[idx1] = idx; + } + // no need for SetModifyFlag(), since it is done by SwapCells() + } + return result; +} + +std::vector SALOMEDSImpl_AttributeTableOfReal::SortByRow(const int theRow, SortOrder sortOrder, SortPolicy sortPolicy ) +{ + CheckLocked(); + std::vector result; + if ( theRow > 0 && theRow <= myNbRows ) { + std::vector indices( myNbColumns ); + int cnt = 0; + for ( int i = 0; i < myNbColumns; i++ ) { + if ( sortPolicy != EmptyIgnore || HasValue(theRow, i+1) ) { + indices[cnt++] = i+1; + } + } + indices.resize(cnt); + + TableSorter sorter( this, sortOrder, sortPolicy, theRow, true ); + std::stable_sort( indices.begin(), indices.end(), sorter ); + + if ( sortPolicy == EmptyIgnore ) { + std::vector other( myNbColumns ); + cnt = 0; + for( int i = 0; i < myNbColumns; i++ ) + other[i] = HasValue(theRow, i+1) ? indices[cnt++] : i+1; + indices = other; + } + result = indices; + + for ( int col = 0; col < indices.size(); col++ ) { + int idx = indices[col]; + if ( col+1 == idx ) continue; + SwapColumns(col+1, idx); + int idx1 = 0; + for ( int i = col+1; i < indices.size() && idx1 == 0; i++) + if ( indices[i] == col+1 ) idx1 = i; + indices[idx1] = idx; + } + // no need for SetModifyFlag(), since it is done by SwapColumns() + } + return result; +} + +std::vector SALOMEDSImpl_AttributeTableOfReal::SortByColumn(const int theColumn, SortOrder sortOrder, SortPolicy sortPolicy ) +{ + CheckLocked(); + std::vector result; + if ( theColumn > 0 && theColumn <= myNbColumns ) { + std::vector indices( myNbRows ); + int cnt = 0; + for ( int i = 0; i < myNbRows; i++ ) { + if ( sortPolicy != EmptyIgnore || HasValue(i+1, theColumn) ) { + indices[cnt++] = i+1; + } + } + indices.resize(cnt); + + TableSorter sorter( this, sortOrder, sortPolicy, theColumn, false ); + std::stable_sort( indices.begin(), indices.end(), sorter ); + + if ( sortPolicy == EmptyIgnore ) { + std::vector other( myNbRows ); + cnt = 0; + for( int i = 0; i < myNbRows; i++ ) + other[i] = HasValue(i+1, theColumn) ? indices[cnt++] : i+1; + indices = other; + } + result = indices; + + for ( int row = 0; row < indices.size(); row++ ) { + int idx = indices[row]; + if ( row+1 == idx ) continue; + SwapRows(row+1, idx); + int idx1 = 0; + for ( int i = row+1; i < indices.size() && idx1 == 0; i++) + if ( indices[i] == row+1 ) idx1 = i; + indices[idx1] = idx; + } + // no need for SetModifyFlag(), since it is done by SwapRows() + } + return result; +} + +void SALOMEDSImpl_AttributeTableOfReal::SwapCells(const int theRow1, const int theColumn1, + const int theRow2, const int theColumn2) +{ + CheckLocked(); + if (theRow1 > myNbRows || theRow1 < 1) throw DFexception("Invalid cell index"); + if (theRow2 > myNbRows || theRow2 < 1) throw DFexception("Invalid cell index"); + if (theColumn1 > myNbColumns || theColumn1 < 1) throw DFexception("Invalid cell index"); + if (theColumn2 > myNbColumns || theColumn2 < 1) throw DFexception("Invalid cell index"); + + int anIndex1 = (theRow1-1)*myNbColumns + theColumn1; + int anIndex2 = (theRow2-1)*myNbColumns + theColumn2; + + bool hasValue1 = myTable.find(anIndex1) != myTable.end(); + bool hasValue2 = myTable.find(anIndex2) != myTable.end(); + + if (!hasValue1 && !hasValue2) return; // nothing changed + + double value1 = hasValue1 ? myTable[anIndex1] : 0; + double value2 = hasValue2 ? myTable[anIndex2] : 0; + + if (hasValue1 && hasValue2 && value1 == value2) return; // nothing changed + + if (hasValue1) myTable[anIndex2] = value1; + else myTable.erase(anIndex2); + if (hasValue2) myTable[anIndex1] = value2; + else myTable.erase(anIndex1); + + SetModifyFlag(); // table is modified +} + +void SALOMEDSImpl_AttributeTableOfReal::SwapRows(const int theRow1, const int theRow2) +{ + CheckLocked(); + for (int i = 1; i <= myNbColumns; i++) + SwapCells(theRow1, i, theRow2, i); + // swap row titles + std::string tmp = myRows[theRow1-1]; + myRows[theRow1-1] = myRows[theRow2-1]; + myRows[theRow2-1] = tmp; + // no need for SetModifyFlag(), since it is done by SwapCells() +} + +void SALOMEDSImpl_AttributeTableOfReal::SwapColumns(const int theColumn1, const int theColumn2) +{ + CheckLocked(); + for (int i = 1; i <= myNbRows; i++) + SwapCells(i, theColumn1, i, theColumn2); + // swap column titles + std::string tmp = myCols[theColumn1-1]; + myCols[theColumn1-1] = myCols[theColumn2-1]; + myCols[theColumn2-1] = tmp; + // no need for SetModifyFlag(), since it is done by SwapCells() +} + diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.hxx index 17838b39c..323106e26 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME SALOMEDSImpl : data structure of SALOME and sources of Salome data server // File : SALOMEDSImpl_AttributeTableOfReal.hxx // Author : Michael Ponikarov @@ -31,64 +32,77 @@ #include "DF_Attribute.hxx" #include "DF_Label.hxx" #include "SALOMEDSImpl_GenericAttribute.hxx" +#include "SALOMEDSImpl_AttributeTable.hxx" #include #include #include class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeTableOfReal : - public SALOMEDSImpl_GenericAttribute + public SALOMEDSImpl_GenericAttribute, public SALOMEDSImpl_AttributeTable { public: - virtual std::string Save(); - virtual void Load(const std::string&); - static const std::string& GetID() ; - static SALOMEDSImpl_AttributeTableOfReal* Set(const DF_Label& label) ; + virtual std::string Save(); + virtual void Load(const std::string&); + + static const std::string& GetID(); + static SALOMEDSImpl_AttributeTableOfReal* Set(const DF_Label& label); + SALOMEDSImpl_AttributeTableOfReal(); - void SetNbColumns(const int theNbColumns); - void SetTitle(const std::string& theTitle) ; - std::string GetTitle() const; - void SetRowData(const int theRow,const std::vector& theData) ; - std::vector GetRowData(const int theRow) ; - void SetRowTitle(const int theRow,const std::string& theTitle) ; - void SetRowUnit(const int theRow,const std::string& theUnit) ; - std::string GetRowUnit(const int theRow) const; - void SetRowUnits(const std::vector& theUnits) ; + + void SetNbColumns(const int theNbColumns); + void SetTitle(const std::string& theTitle); + std::string GetTitle() const; + void SetRowData(const int theRow, const std::vector& theData); + std::vector GetRowData(const int theRow); + void SetRowTitle(const int theRow, const std::string& theTitle); + void SetRowUnit(const int theRow, const std::string& theUnit); + std::string GetRowUnit(const int theRow) const; + void SetRowUnits(const std::vector& theUnits); std::vector GetRowUnits(); - void SetRowTitles(const std::vector& theTitles) ; + void SetRowTitles(const std::vector& theTitles); std::vector GetRowTitles(); - std::string GetRowTitle(const int theRow) const; - void SetColumnData(const int theColumn,const std::vector& theData) ; - std::vector GetColumnData(const int theColumn) ; - void SetColumnTitle(const int theColumn,const std::string& theTitle) ; - void SetColumnTitles(const std::vector& theTitles); + std::string GetRowTitle(const int theRow) const; + void SetColumnData(const int theColumn, const std::vector& theData); + std::vector GetColumnData(const int theColumn); + void SetColumnTitle(const int theColumn, const std::string& theTitle); + void SetColumnTitles(const std::vector& theTitles); std::vector GetColumnTitles(); - std::string GetColumnTitle(const int theColumn) const; - int GetNbRows() const; - int GetNbColumns() const; + std::string GetColumnTitle(const int theColumn) const; + int GetNbRows() const; + int GetNbColumns() const; - void PutValue(const double& theValue,const int theRow,const int theColumn) ; - bool HasValue(const int theRow,const int theColumn) ; - double GetValue(const int theRow,const int theColumn) ; - const std::string& ID() const; - void Restore(DF_Attribute* with) ; - DF_Attribute* NewEmpty() const; - void Paste(DF_Attribute* into); + void PutValue(const double& theValue, const int theRow, const int theColumn); + bool HasValue(const int theRow, const int theColumn); + double GetValue(const int theRow, const int theColumn); + void RemoveValue(const int theRow, const int theColumn); + const std::string& ID() const; + void Restore(DF_Attribute* with); + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute* into); - std::vector GetSetRowIndices(const int theRow); - std::vector GetSetColumnIndices(const int theColumn); + std::vector GetSetRowIndices(const int theRow); + std::vector GetSetColumnIndices(const int theColumn); + + std::vector SortRow(const int theRow, SortOrder sortOrder, SortPolicy sortPolicy); + std::vector SortColumn(const int theColumn, SortOrder sortOrder, SortPolicy sortPolicy); + std::vector SortByRow(const int theRow, SortOrder sortOrder, SortPolicy sortPolicy); + std::vector SortByColumn(const int theColumn, SortOrder sortOrder, SortPolicy sortPolicy); + + void SwapCells(const int theRow1, const int theColumn1, const int theRow2, const int theColumn2); + void SwapRows(const int theRow1, const int theRow2); + void SwapColumns(const int theColumn1, const int theColumn2); ~SALOMEDSImpl_AttributeTableOfReal() {} private: - std::map myTable; - std::string myTitle; + std::map myTable; + std::string myTitle; std::vector myRows; std::vector myCols; - int myNbRows; - int myNbColumns; - + int myNbRows; + int myNbColumns; }; #endif diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.cxx index f5872c4ad..0c4754e31 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.cxx @@ -1,38 +1,36 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeTableOfString.cxx // Author : Sergey Ruin // Module : SALOME // #include "SALOMEDSImpl_AttributeTableOfString.hxx" -#include -#include -#include -using namespace std; +#include +#include #define SEPARATOR '\1' - -typedef map::const_iterator MI; +typedef std::map::const_iterator MI; static std::string getUnit(std::string theString) { @@ -79,7 +77,7 @@ void SALOMEDSImpl_AttributeTableOfString::SetNbColumns(const int theNbColumns) CheckLocked(); Backup(); - map aMap; + std::map aMap; aMap = myTable; myTable.clear(); @@ -102,7 +100,7 @@ void SALOMEDSImpl_AttributeTableOfString::SetNbColumns(const int theNbColumns) } void SALOMEDSImpl_AttributeTableOfString::SetRowTitle(const int theRow, - const std::string& theTitle) + const std::string& theTitle) { CheckLocked(); Backup(); @@ -117,7 +115,7 @@ void SALOMEDSImpl_AttributeTableOfString::SetRowTitle(const int theRow, } void SALOMEDSImpl_AttributeTableOfString::SetRowUnit(const int theRow, - const std::string& theUnit) + const std::string& theUnit) { CheckLocked(); Backup(); @@ -130,22 +128,22 @@ void SALOMEDSImpl_AttributeTableOfString::SetRowUnit(const int theRow, SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved } -void SALOMEDSImpl_AttributeTableOfString::SetRowUnits(const vector& theUnits) +void SALOMEDSImpl_AttributeTableOfString::SetRowUnits(const std::vector& theUnits) { if (theUnits.size() != GetNbRows()) throw DFexception("Invalid number of rows"); int aLength = theUnits.size(), i; for(i = 1; i <= aLength; i++) SetRowUnit(i, theUnits[i-1]); } -vector SALOMEDSImpl_AttributeTableOfString::GetRowUnits() +std::vector SALOMEDSImpl_AttributeTableOfString::GetRowUnits() { - vector aSeq; + std::vector aSeq; int aLength = myRows.size(), i; for(i=0; i& theTitles) +void SALOMEDSImpl_AttributeTableOfString::SetRowTitles(const std::vector& theTitles) { if (theTitles.size() != GetNbRows()) throw DFexception("Invalid number of rows"); int aLength = theTitles.size(), i; @@ -154,28 +152,26 @@ void SALOMEDSImpl_AttributeTableOfString::SetRowTitles(const vector& the SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved } -vector SALOMEDSImpl_AttributeTableOfString::GetRowTitles() +std::vector SALOMEDSImpl_AttributeTableOfString::GetRowTitles() { - vector aSeq; + std::vector aSeq; int aLength = myRows.size(), i; for(i=0; i& theData) + const std::vector& theData) { CheckLocked(); if(theData.size() > myNbColumns) SetNbColumns(theData.size()); @@ -210,9 +206,9 @@ std::string SALOMEDSImpl_AttributeTableOfString::GetTitle() const return myTitle; } -vector SALOMEDSImpl_AttributeTableOfString::GetRowData(const int theRow) +std::vector SALOMEDSImpl_AttributeTableOfString::GetRowData(const int theRow) { - vector aSeq; + std::vector aSeq; int i, aShift = (theRow-1)*myNbColumns; for(i = 1; i <= myNbColumns; i++) { if(myTable.find(aShift+i) != myTable.end()) @@ -225,7 +221,7 @@ vector SALOMEDSImpl_AttributeTableOfString::GetRowData(const int theRow) } void SALOMEDSImpl_AttributeTableOfString::SetColumnData(const int theColumn, - const vector& theData) + const std::vector& theData) { CheckLocked(); if(theColumn > myNbColumns) SetNbColumns(theColumn); @@ -247,10 +243,9 @@ void SALOMEDSImpl_AttributeTableOfString::SetColumnData(const int theColumn, SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved } - -vector SALOMEDSImpl_AttributeTableOfString::GetColumnData(const int theColumn) +std::vector SALOMEDSImpl_AttributeTableOfString::GetColumnData(const int theColumn) { - vector aSeq; + std::vector aSeq; int i, anIndex; for(i = 1; i <= myNbRows; i++) { @@ -265,7 +260,7 @@ vector SALOMEDSImpl_AttributeTableOfString::GetColumnData(const int theC } void SALOMEDSImpl_AttributeTableOfString::SetColumnTitle(const int theColumn, - const std::string& theTitle) + const std::string& theTitle) { CheckLocked(); Backup(); @@ -282,8 +277,7 @@ std::string SALOMEDSImpl_AttributeTableOfString::GetColumnTitle(const int theCol return myCols[theColumn-1]; } - -void SALOMEDSImpl_AttributeTableOfString::SetColumnTitles(const vector& theTitles) +void SALOMEDSImpl_AttributeTableOfString::SetColumnTitles(const std::vector& theTitles) { if (theTitles.size() != myNbColumns) throw DFexception("Invalid number of columns"); int aLength = theTitles.size(), i; @@ -292,15 +286,14 @@ void SALOMEDSImpl_AttributeTableOfString::SetColumnTitles(const vector& SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved } -vector SALOMEDSImpl_AttributeTableOfString::GetColumnTitles() +std::vector SALOMEDSImpl_AttributeTableOfString::GetColumnTitles() { - vector aSeq; + std::vector aSeq; int aLength = myCols.size(), i; for(i=0; i myNbColumns) SetNbColumns(theColumn); int anIndex = (theRow-1)*myNbColumns + theColumn; @@ -332,7 +326,7 @@ void SALOMEDSImpl_AttributeTableOfString::PutValue(const std::string& theValue, } bool SALOMEDSImpl_AttributeTableOfString::HasValue(const int theRow, - const int theColumn) + const int theColumn) { if(theRow > myNbRows || theRow < 1) return false; if(theColumn > myNbColumns || theColumn < 1) return false; @@ -342,7 +336,7 @@ bool SALOMEDSImpl_AttributeTableOfString::HasValue(const int theRow, } std::string SALOMEDSImpl_AttributeTableOfString::GetValue(const int theRow, - const int theColumn) + const int theColumn) { if(theRow > myNbRows || theRow < 1) throw DFexception("Invalid cell index"); if(theColumn > myNbColumns || theColumn < 1) throw DFexception("Invalid cell index"); @@ -354,6 +348,20 @@ std::string SALOMEDSImpl_AttributeTableOfString::GetValue(const int theRow, return ""; } +void SALOMEDSImpl_AttributeTableOfString::RemoveValue(const int theRow, const int theColumn) +{ + CheckLocked(); + if(theRow > myNbRows || theRow < 1) throw DFexception("Invalid cell index"); + if(theColumn > myNbColumns || theColumn < 1) throw DFexception("Invalid cell index"); + + int anIndex = (theRow-1)*myNbColumns + theColumn; + if (myTable.find(anIndex) != myTable.end()) { + //Backup(); + myTable.erase(anIndex); + SetModifyFlag(); // table is modified + } +} + const std::string& SALOMEDSImpl_AttributeTableOfString::ID() const { return GetID(); @@ -405,10 +413,9 @@ void SALOMEDSImpl_AttributeTableOfString::Paste(DF_Attribute* into) aTable->myCols.push_back(GetColumnTitle(anIndex)); } - -vector SALOMEDSImpl_AttributeTableOfString::GetSetRowIndices(const int theRow) +std::vector SALOMEDSImpl_AttributeTableOfString::GetSetRowIndices(const int theRow) { - vector aSeq; + std::vector aSeq; int i, aShift = myNbColumns*(theRow-1); for(i = 1; i <= myNbColumns; i++) { @@ -418,9 +425,9 @@ vector SALOMEDSImpl_AttributeTableOfString::GetSetRowIndices(const int theR return aSeq; } -vector SALOMEDSImpl_AttributeTableOfString::GetSetColumnIndices(const int theColumn) +std::vector SALOMEDSImpl_AttributeTableOfString::GetSetColumnIndices(const int theColumn) { - vector aSeq; + std::vector aSeq; int i, anIndex; for(i = 1; i <= myNbRows; i++) { @@ -431,11 +438,9 @@ vector SALOMEDSImpl_AttributeTableOfString::GetSetColumnIndices(const int t return aSeq; } - - -string SALOMEDSImpl_AttributeTableOfString::Save() +std::string SALOMEDSImpl_AttributeTableOfString::Save() { - string aString; + std::string aString; char* buffer = new char[1024]; int i, j, l; @@ -501,9 +506,9 @@ string SALOMEDSImpl_AttributeTableOfString::Save() return aString; } -void SALOMEDSImpl_AttributeTableOfString::Load(const string& value) +void SALOMEDSImpl_AttributeTableOfString::Load(const std::string& value) { - vector v; + std::vector v; int i, j, l, pos, aSize = (int)value.size(); for(i = 0, pos = 0; i SALOMEDSImpl_AttributeTableOfString::SortRow(const int theRow, SortOrder sortOrder, SortPolicy sortPolicy ) +{ + CheckLocked(); + std::vector result; + if ( theRow > 0 && theRow <= myNbRows ) { + std::vector indices( myNbColumns ); + int cnt = 0; + for ( int i = 0; i < myNbColumns; i++ ) { + if ( sortPolicy != EmptyIgnore || HasValue(theRow, i+1) ) { + indices[cnt++] = i+1; + } + } + indices.resize(cnt); + + TableSorter sorter( this, sortOrder, sortPolicy, theRow, true ); + std::stable_sort( indices.begin(), indices.end(), sorter ); + + if ( sortPolicy == EmptyIgnore ) { + std::vector other( myNbColumns ); + cnt = 0; + for( int i = 0; i < myNbColumns; i++ ) + other[i] = HasValue(theRow, i+1) ? indices[cnt++] : i+1; + indices = other; + } + result = indices; + + for ( int col = 0; col < indices.size(); col++ ) { + int idx = indices[col]; + if ( col+1 == idx ) continue; + SwapCells(theRow, col+1, theRow, idx); + int idx1 = 0; + for ( int i = col+1; i < indices.size() && idx1 == 0; i++) + if ( indices[i] == col+1 ) idx1 = i; + indices[idx1] = idx; + } + // no need for SetModifyFlag(), since it is done by SwapCells() + } + return result; +} + +std::vector SALOMEDSImpl_AttributeTableOfString::SortColumn(const int theColumn, SortOrder sortOrder, SortPolicy sortPolicy ) +{ + CheckLocked(); + std::vector result; + if ( theColumn > 0 && theColumn <= myNbColumns ) { + std::vector indices( myNbRows ); + int cnt = 0; + for ( int i = 0; i < myNbRows; i++ ) { + if ( sortPolicy != EmptyIgnore || HasValue(i+1, theColumn) ) { + indices[cnt++] = i+1; + } + } + indices.resize(cnt); + + TableSorter sorter( this, sortOrder, sortPolicy, theColumn, false ); + std::stable_sort( indices.begin(), indices.end(), sorter ); + + if ( sortPolicy == EmptyIgnore ) { + std::vector other( myNbRows ); + cnt = 0; + for( int i = 0; i < myNbRows; i++ ) + other[i] = HasValue(i+1, theColumn) ? indices[cnt++] : i+1; + indices = other; + } + result = indices; + + for ( int row = 0; row < indices.size(); row++ ) { + int idx = indices[row]; + if ( row+1 == idx ) continue; + SwapCells(row+1, theColumn, idx, theColumn); + int idx1 = 0; + for ( int i = row+1; i < indices.size() && idx1 == 0; i++) + if ( indices[i] == row+1 ) idx1 = i; + indices[idx1] = idx; + } + // no need for SetModifyFlag(), since it is done by SwapCells() + } + return result; +} + +std::vector SALOMEDSImpl_AttributeTableOfString::SortByRow(const int theRow, SortOrder sortOrder, SortPolicy sortPolicy ) +{ + CheckLocked(); + std::vector result; + if ( theRow > 0 && theRow <= myNbRows ) { + std::vector indices( myNbColumns ); + int cnt = 0; + for ( int i = 0; i < myNbColumns; i++ ) { + if ( sortPolicy != EmptyIgnore || HasValue(theRow, i+1) ) { + indices[cnt++] = i+1; + } + } + indices.resize(cnt); + + TableSorter sorter( this, sortOrder, sortPolicy, theRow, true ); + std::stable_sort( indices.begin(), indices.end(), sorter ); + + if ( sortPolicy == EmptyIgnore ) { + std::vector other( myNbColumns ); + cnt = 0; + for( int i = 0; i < myNbColumns; i++ ) + other[i] = HasValue(theRow, i+1) ? indices[cnt++] : i+1; + indices = other; + } + result = indices; + + for ( int col = 0; col < indices.size(); col++ ) { + int idx = indices[col]; + if ( col+1 == idx ) continue; + SwapColumns(col+1, idx); + int idx1 = 0; + for ( int i = col+1; i < indices.size() && idx1 == 0; i++) + if ( indices[i] == col+1 ) idx1 = i; + indices[idx1] = idx; + } + // no need for SetModifyFlag(), since it is done by SwapColumns() + } + return result; +} + +std::vector SALOMEDSImpl_AttributeTableOfString::SortByColumn(const int theColumn, SortOrder sortOrder, SortPolicy sortPolicy ) +{ + CheckLocked(); + std::vector result; + if ( theColumn > 0 && theColumn <= myNbColumns ) { + std::vector indices( myNbRows ); + int cnt = 0; + for ( int i = 0; i < myNbRows; i++ ) { + if ( sortPolicy != EmptyIgnore || HasValue(i+1, theColumn) ) { + indices[cnt++] = i+1; + } + } + indices.resize(cnt); + + TableSorter sorter( this, sortOrder, sortPolicy, theColumn, false ); + std::stable_sort( indices.begin(), indices.end(), sorter ); + + if ( sortPolicy == EmptyIgnore ) { + std::vector other( myNbRows ); + cnt = 0; + for( int i = 0; i < myNbRows; i++ ) + other[i] = HasValue(i+1, theColumn) ? indices[cnt++] : i+1; + indices = other; + } + result = indices; + + for ( int row = 0; row < indices.size(); row++ ) { + int idx = indices[row]; + if ( row+1 == idx ) continue; + SwapRows(row+1, idx); + int idx1 = 0; + for ( int i = row+1; i < indices.size() && idx1 == 0; i++) + if ( indices[i] == row+1 ) idx1 = i; + indices[idx1] = idx; + } + // no need for SetModifyFlag(), since it is done by SwapRows() + } + return result; +} + +void SALOMEDSImpl_AttributeTableOfString::SwapCells(const int theRow1, const int theColumn1, + const int theRow2, const int theColumn2) +{ + CheckLocked(); + if (theRow1 > myNbRows || theRow1 < 1) throw DFexception("Invalid cell index"); + if (theRow2 > myNbRows || theRow2 < 1) throw DFexception("Invalid cell index"); + if (theColumn1 > myNbColumns || theColumn1 < 1) throw DFexception("Invalid cell index"); + if (theColumn2 > myNbColumns || theColumn2 < 1) throw DFexception("Invalid cell index"); + + int anIndex1 = (theRow1-1)*myNbColumns + theColumn1; + int anIndex2 = (theRow2-1)*myNbColumns + theColumn2; + + bool hasValue1 = myTable.find(anIndex1) != myTable.end(); + bool hasValue2 = myTable.find(anIndex2) != myTable.end(); + + if (!hasValue1 && !hasValue2) return; // nothing changed + + std::string value1 = hasValue1 ? myTable[anIndex1] : 0; + std::string value2 = hasValue2 ? myTable[anIndex2] : 0; + + if (hasValue1 && hasValue2 && value1 == value2) return; // nothing changed + + if (hasValue1) myTable[anIndex2] = value1; + else myTable.erase(anIndex2); + if (hasValue2) myTable[anIndex1] = value2; + else myTable.erase(anIndex1); + + SetModifyFlag(); // table is modified +} + +void SALOMEDSImpl_AttributeTableOfString::SwapRows(const int theRow1, const int theRow2) +{ + CheckLocked(); + for (int i = 1; i <= myNbColumns; i++) + SwapCells(theRow1, i, theRow2, i); + // swap row titles + std::string tmp = myRows[theRow1-1]; + myRows[theRow1-1] = myRows[theRow2-1]; + myRows[theRow2-1] = tmp; + // no need for SetModifyFlag(), since it is done by SwapCells() +} + +void SALOMEDSImpl_AttributeTableOfString::SwapColumns(const int theColumn1, const int theColumn2) +{ + CheckLocked(); + for (int i = 1; i <= myNbRows; i++) + SwapCells(i, theColumn1, i, theColumn2); + // swap column titles + std::string tmp = myCols[theColumn1-1]; + myCols[theColumn1-1] = myCols[theColumn2-1]; + myCols[theColumn2-1] = tmp; + // no need for SetModifyFlag(), since it is done by SwapCells() +} diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.hxx index 121ee4fee..013309400 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME SALOMEDSImpl : data structure of SALOME and sources of Salome data server // File : SALOMEDSImpl_AttributeTableOfString.hxx // Author : Sergey Ruin @@ -31,65 +32,76 @@ #include "DF_Label.hxx" #include "DF_Attribute.hxx" #include "SALOMEDSImpl_GenericAttribute.hxx" +#include "SALOMEDSImpl_AttributeTable.hxx" #include #include #include class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeTableOfString : - public SALOMEDSImpl_GenericAttribute + public SALOMEDSImpl_GenericAttribute, public SALOMEDSImpl_AttributeTable { public: - virtual std::string Save(); - virtual void Load(const std::string&); - static const std::string& GetID() ; - static SALOMEDSImpl_AttributeTableOfString* Set(const DF_Label& label) ; + virtual std::string Save(); + virtual void Load(const std::string&); + + static const std::string& GetID(); + static SALOMEDSImpl_AttributeTableOfString* Set(const DF_Label& label); + SALOMEDSImpl_AttributeTableOfString(); - void SetNbColumns(const int theNbColumns); - void SetTitle(const std::string& theTitle) ; - std::string GetTitle() const; - void SetRowData(const int theRow,const std::vector& theData) ; - std::vector GetRowData(const int theRow) ; - void SetRowTitle(const int theRow,const std::string& theTitle) ; - void SetRowUnit(const int theRow,const std::string& theUnit) ; - std::string GetRowUnit(const int theRow) const; - void SetRowUnits(const std::vector& theUnits) ; + void SetNbColumns(const int theNbColumns); + void SetTitle(const std::string& theTitle); + std::string GetTitle() const; + void SetRowData(const int theRow, const std::vector& theData); + std::vector GetRowData(const int theRow); + void SetRowTitle(const int theRow, const std::string& theTitle); + void SetRowUnit(const int theRow, const std::string& theUnit); + std::string GetRowUnit(const int theRow) const; + void SetRowUnits(const std::vector& theUnits); std::vector GetRowUnits(); - void SetRowTitles(const std::vector& theTitles) ; + void SetRowTitles(const std::vector& theTitles); std::vector GetRowTitles(); - std::string GetRowTitle(const int theRow) const; - void SetColumnData(const int theColumn,const std::vector& theData) ; - std::vector GetColumnData(const int theColumn) ; - void SetColumnTitle(const int theColumn,const std::string& theTitle) ; - std::string GetColumnTitle(const int theColumn) const; - void SetColumnTitles(const std::vector& theTitles); + std::string GetRowTitle(const int theRow) const; + void SetColumnData(const int theColumn, const std::vector& theData); + std::vector GetColumnData(const int theColumn); + void SetColumnTitle(const int theColumn, const std::string& theTitle); + std::string GetColumnTitle(const int theColumn) const; + void SetColumnTitles(const std::vector& theTitles); std::vector GetColumnTitles(); - int GetNbRows() const; - int GetNbColumns() const; + int GetNbRows() const; + int GetNbColumns() const; + + void PutValue(const std::string& theValue, const int theRow, const int theColumn); + bool HasValue(const int theRow, const int theColumn); + std::string GetValue(const int theRow, const int theColumn); + void RemoveValue(const int theRow, const int theColumn); + const std::string& ID() const; + void Restore(DF_Attribute* with); + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute* into); - void PutValue(const std::string& theValue,const int theRow,const int theColumn) ; - bool HasValue(const int theRow,const int theColumn) ; - std::string GetValue(const int theRow,const int theColumn) ; - const std::string& ID() const; - void Restore(DF_Attribute* with) ; - DF_Attribute* NewEmpty() const; - void Paste(DF_Attribute* into); + std::vector GetSetRowIndices(const int theRow); + std::vector GetSetColumnIndices(const int theColumn); - std::vector GetSetRowIndices(const int theRow); - std::vector GetSetColumnIndices(const int theColumn); + std::vector SortRow(const int theRow, SortOrder sortOrder, SortPolicy sortPolicy); + std::vector SortColumn(const int theColumn, SortOrder sortOrder, SortPolicy sortPolicy); + std::vector SortByRow(const int theRow, SortOrder sortOrder, SortPolicy sortPolicy); + std::vector SortByColumn(const int theColumn, SortOrder sortOrder, SortPolicy sortPolicy); + + void SwapCells(const int theRow1, const int theColumn1, const int theRow2, const int theColumn2); + void SwapRows(const int theRow1, const int theRow2); + void SwapColumns(const int theColumn1, const int theColumn2); ~SALOMEDSImpl_AttributeTableOfString() {} private: - std::map myTable; - std::string myTitle; - std::vector myRows; - std::vector myCols; - int myNbRows; - int myNbColumns; - + std::string myTitle; + std::vector myRows; + std::vector myCols; + int myNbRows; + int myNbColumns; }; #endif diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTarget.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTarget.cxx index 36272891b..d9c4656f4 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTarget.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTarget.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeTarget.cxx // Author : Sergey RUIN // Module : SALOME @@ -27,9 +28,6 @@ #include "SALOMEDSImpl_AttributeReference.hxx" #include "SALOMEDSImpl_Study.hxx" -using namespace std; - - //======================================================================= //function : GetID //purpose : @@ -88,8 +86,7 @@ void SALOMEDSImpl_AttributeTarget::Add(const SALOMEDSImpl_SObject& theSO) DF_Label aRefLabel = theSO.GetLabel(); SALOMEDSImpl_AttributeReference* aReference; if ((aReference=(SALOMEDSImpl_AttributeReference*)aRefLabel.FindAttribute(SALOMEDSImpl_AttributeReference::GetID()))) { - for(int i = 0, len = myVariables.size(); iLabel() == aRefLabel) return; //BugID: PAL6192 - myVariables.push_back(aReference); + myVariables[aRefLabel.Entry()]=aReference; } SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved @@ -99,12 +96,12 @@ void SALOMEDSImpl_AttributeTarget::Add(const SALOMEDSImpl_SObject& theSO) //function : Get //purpose : //======================================================================= -vector SALOMEDSImpl_AttributeTarget::Get() +std::vector SALOMEDSImpl_AttributeTarget::Get() { - vector aSeq; + std::vector aSeq; - for(int i = 0, len = myVariables.size(); iLabel())); + for (std::map< std::string , DF_Attribute* >::iterator iter = myVariables.begin(); iter != myVariables.end(); ++iter) + aSeq.push_back( SALOMEDSImpl_Study::SObject(iter->second->Label())); return aSeq; } @@ -118,15 +115,7 @@ void SALOMEDSImpl_AttributeTarget::Remove(const SALOMEDSImpl_SObject& theSO) Backup(); DF_Label aRefLabel = theSO.GetLabel(); - vector va; - for(int i = 0, len = myVariables.size(); iLabel(); - if(myVariables[i]->Label() == aRefLabel) continue; - va.push_back(myVariables[i]); - } - - myVariables.clear(); - myVariables = va; + myVariables.erase(aRefLabel.Entry()); SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved } @@ -146,8 +135,8 @@ void SALOMEDSImpl_AttributeTarget::Restore(DF_Attribute* With) SALOMEDSImpl_AttributeTarget* REL = dynamic_cast(With); myRelation = REL->GetRelation(); myVariables.clear(); - for (int i = 0, len = REL->myVariables.size(); imyVariables[i]); + for (std::map< std::string , DF_Attribute* >::iterator iter = REL->myVariables.begin(); iter != REL->myVariables.end(); ++iter){ + myVariables[iter->first]=iter->second; } } @@ -169,7 +158,7 @@ void SALOMEDSImpl_AttributeTarget::Paste(DF_Attribute* into) SALOMEDSImpl_AttributeTarget* REL = dynamic_cast(into); REL->SetRelation(myRelation); REL->myVariables.clear(); - for (int i = 0, len = myVariables.size(); imyVariables.push_back(myVariables[i]); + for (std::map< std::string , DF_Attribute* >::iterator iter = myVariables.begin(); iter != myVariables.end(); ++iter){ + REL->myVariables[iter->first]=iter->second; } } diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTarget.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTarget.hxx index 972ea75bd..04b43e0b0 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTarget.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTarget.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeTarget.hxx // Author : Sergey RUIN // Module : SALOME @@ -32,13 +33,14 @@ #include #include "SALOMEDSImpl_GenericAttribute.hxx" #include "SALOMEDSImpl_SObject.hxx" +#include class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeTarget : public SALOMEDSImpl_GenericAttribute { private: std::string myRelation; - std::vector myVariables; + std::map< std::string , DF_Attribute* > myVariables; public: static const std::string& GetID() ; @@ -49,7 +51,7 @@ public: void Remove(const SALOMEDSImpl_SObject& theSO); std::string GetRelation() { return myRelation; } void SetRelation(const std::string& theRelation); - std::vector& GetVariables() { return myVariables; } + std::map< std::string , DF_Attribute* >& GetVariables() { return myVariables; } const std::string& ID() const; void Restore(DF_Attribute* with) ; DF_Attribute* NewEmpty() const; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTextColor.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTextColor.cxx index d46c0fb5c..b8d052510 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTextColor.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTextColor.cxx @@ -1,32 +1,31 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeTextColor.cxx // Author : Sergey RUIN // Module : SALOME // #include "SALOMEDSImpl_AttributeTextColor.hxx" -using namespace std; - //======================================================================= //function : GetID //purpose : @@ -73,7 +72,7 @@ void SALOMEDSImpl_AttributeTextColor::SetTextColor(const double& R, const double //function : TextColor //purpose : //======================================================================= -vector SALOMEDSImpl_AttributeTextColor::TextColor() +std::vector SALOMEDSImpl_AttributeTextColor::TextColor() { return myValue; } @@ -82,7 +81,7 @@ vector SALOMEDSImpl_AttributeTextColor::TextColor() //function : ChangeArray //purpose : //======================================================================= -void SALOMEDSImpl_AttributeTextColor::ChangeArray(const vector& newArray) +void SALOMEDSImpl_AttributeTextColor::ChangeArray(const std::vector& newArray) { Backup(); @@ -133,18 +132,18 @@ void SALOMEDSImpl_AttributeTextColor::Paste (DF_Attribute* into) -string SALOMEDSImpl_AttributeTextColor::Save() +std::string SALOMEDSImpl_AttributeTextColor::Save() { char *Val = new char[75]; sprintf(Val, "%f %f %f", (float)myValue[0], (float)myValue[1], - (float)myValue[2]); - string ret(Val); + (float)myValue[2]); + std::string ret(Val); delete Val; return ret; } -void SALOMEDSImpl_AttributeTextColor::Load(const string& value) +void SALOMEDSImpl_AttributeTextColor::Load(const std::string& value) { float r, g, b; sscanf(value.c_str(), "%f %f %f", &r, &g, &b); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTextColor.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTextColor.hxx index 9808145e9..ffe5c7c67 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTextColor.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTextColor.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeTextColor.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTextHighlightColor.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTextHighlightColor.cxx index 8624d52f6..2f39b8297 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTextHighlightColor.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTextHighlightColor.cxx @@ -1,32 +1,31 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeTextHighlightColor.cxx // Author : Sergey RUIN // Module : SALOME // #include "SALOMEDSImpl_AttributeTextHighlightColor.hxx" -using namespace std; - //======================================================================= //function : GetID //purpose : @@ -66,8 +65,8 @@ const std::string& SALOMEDSImpl_AttributeTextHighlightColor::ID () const { retur //purpose : //======================================================================= void SALOMEDSImpl_AttributeTextHighlightColor::SetTextHighlightColor(const double& R, - const double& G, - const double& B) + const double& G, + const double& B) { CheckLocked(); Backup(); @@ -78,12 +77,12 @@ void SALOMEDSImpl_AttributeTextHighlightColor::SetTextHighlightColor(const doubl SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved } - + //======================================================================= //function : TextHighlightColor //purpose : //======================================================================= -vector SALOMEDSImpl_AttributeTextHighlightColor::TextHighlightColor() +std::vector SALOMEDSImpl_AttributeTextHighlightColor::TextHighlightColor() { return myValue; } @@ -92,7 +91,7 @@ vector SALOMEDSImpl_AttributeTextHighlightColor::TextHighlightColor() //function : ChangeArray //purpose : //======================================================================= -void SALOMEDSImpl_AttributeTextHighlightColor::ChangeArray(const vector& newArray) +void SALOMEDSImpl_AttributeTextHighlightColor::ChangeArray(const std::vector& newArray) { Backup(); @@ -133,18 +132,18 @@ void SALOMEDSImpl_AttributeTextHighlightColor::Paste (DF_Attribute* into) dynamic_cast(into)->ChangeArray (myValue); } -string SALOMEDSImpl_AttributeTextHighlightColor::Save() +std::string SALOMEDSImpl_AttributeTextHighlightColor::Save() { char *Val = new char[75]; sprintf(Val, "%f %f %f", (float)myValue[0], (float)myValue[1], - (float)myValue[2]); - string ret(Val); + (float)myValue[2]); + std::string ret(Val); delete Val; return ret; } -void SALOMEDSImpl_AttributeTextHighlightColor::Load(const string& value) +void SALOMEDSImpl_AttributeTextHighlightColor::Load(const std::string& value) { float r, g, b; sscanf(value.c_str(), "%f %f %f", &r, &g, &b); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTextHighlightColor.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTextHighlightColor.hxx index 26cbba435..43f0eac7f 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTextHighlightColor.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTextHighlightColor.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeTextHighlightColor.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTreeNode.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTreeNode.cxx index aace61317..7bcc8e66c 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTreeNode.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTreeNode.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeTreeNode.cxx // Author : Sergey RUIN // Module : SALOME @@ -26,8 +27,6 @@ #include "SALOMEDSImpl_AttributeTreeNode.hxx" #include -using namespace std; - const std::string& SALOMEDSImpl_AttributeTreeNode::GetDefaultTreeID() { static std::string TreeNodeID ("0E1C36E6-379B-4d90-AC37-17A14310E648"); @@ -438,19 +437,19 @@ DF_Attribute* SALOMEDSImpl_AttributeTreeNode::NewEmpty() const return T; } -string SALOMEDSImpl_AttributeTreeNode::Type() +std::string SALOMEDSImpl_AttributeTreeNode::Type() { char* aNodeName = new char[127]; sprintf(aNodeName, "AttributeTreeNodeGUID%s", ID().c_str()); - string ret(aNodeName); - delete aNodeName; + std::string ret(aNodeName); + delete [] aNodeName; return ret; } -string SALOMEDSImpl_AttributeTreeNode::Save() +std::string SALOMEDSImpl_AttributeTreeNode::Save() { - string aFather, aPrevious, aNext, aFirst; + std::string aFather, aPrevious, aNext, aFirst; if (HasFather()) aFather = GetFather()->Label().Entry(); else aFather = "!"; if (HasPrevious()) aPrevious = GetPrevious()->Label().Entry(); else aPrevious = "!"; @@ -461,12 +460,12 @@ string SALOMEDSImpl_AttributeTreeNode::Save() aLength += aFather.size() + aPrevious.size() + aNext.size() + aFirst.size(); char* aResult = new char[aLength]; sprintf(aResult, "%s %s %s %s", aFather.c_str(), aPrevious.c_str(), aNext.c_str(), aFirst.c_str()); - string ret(aResult); - delete aResult; + std::string ret(aResult); + delete [] aResult; return ret; } -void SALOMEDSImpl_AttributeTreeNode::Load(const string& value) +void SALOMEDSImpl_AttributeTreeNode::Load(const std::string& value) { char* aCopy = (char*)value.c_str(); char* adr = strtok(aCopy, " "); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTreeNode.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTreeNode.hxx index 2e2fec18a..fb175d77d 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTreeNode.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTreeNode.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeTreeNode.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeUserID.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeUserID.cxx index 7087c5e4d..15a0051bc 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeUserID.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeUserID.cxx @@ -1,31 +1,36 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeUAttribute.cxx // Author : Sergey RUIN // Module : SALOME // #include "SALOMEDSImpl_AttributeUserID.hxx" +#include "Basics_Utils.hxx" -using namespace std; +std::string SALOMEDSImpl_AttributeUserID::DefaultID() +{ + return Kernel_Utils::GetGUID(Kernel_Utils::DefUserID); +} SALOMEDSImpl_AttributeUserID* SALOMEDSImpl_AttributeUserID::Set (const DF_Label& L, const std::string& ID) { @@ -92,13 +97,13 @@ void SALOMEDSImpl_AttributeUserID::Paste (DF_Attribute* into) A->SetValue( myID ); } -string SALOMEDSImpl_AttributeUserID::Type() +std::string SALOMEDSImpl_AttributeUserID::Type() { char* aUAttrName = new char[127]; sprintf(aUAttrName, "AttributeUserID_%s",ID().c_str()); - string ret(aUAttrName); + std::string ret(aUAttrName); delete aUAttrName; return ret; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeUserID.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeUserID.hxx index 4a768fe80..d72893945 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeUserID.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeUserID.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_AttributeUAttribute.hxx // Author : Sergey RUIN // Module : SALOME @@ -42,11 +43,7 @@ private: public: SALOMEDSImpl_AttributeUserID():SALOMEDSImpl_GenericAttribute("AttributeUserID") {} static SALOMEDSImpl_AttributeUserID* Set (const DF_Label& L, const std::string& ID); - static const std::string& DefaultID() - { - static std::string SALOMEDSImpl_DefaultUserAttributeID ("FFFFFFFF-D9CD-11d6-945D-1050DA506788"); - return SALOMEDSImpl_DefaultUserAttributeID; - } + static std::string DefaultID(); const std::string& Value() const { return ID(); } void SetValue(const std::string& value); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Attributes.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_Attributes.hxx index 77b44d821..5e1a0669a 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Attributes.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Attributes.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_Attributes.hxx // Author : Sergey RUIN // Module : SALOME @@ -72,35 +73,35 @@ public : #define __AttributeTypeToGUIDForSObject \ - if(theType == "AttributeReal") return SALOMEDSImpl_AttributeReal::GetID(); \ - if(theType == "AttributeInteger") return SALOMEDSImpl_AttributeInteger::GetID(); \ - if(theType == "AttributeSequenceOfReal") return SALOMEDSImpl_AttributeSequenceOfReal::GetID(); \ - if(theType == "AttributeSequenceOfInteger") return SALOMEDSImpl_AttributeSequenceOfInteger::GetID(); \ - if(theType == "AttributeName") return SALOMEDSImpl_AttributeName::GetID(); \ + if(theType == "AttributeReal") return SALOMEDSImpl_AttributeReal::GetID(); \ + if(theType == "AttributeInteger") return SALOMEDSImpl_AttributeInteger::GetID(); \ + if(theType == "AttributeSequenceOfReal") return SALOMEDSImpl_AttributeSequenceOfReal::GetID(); \ + if(theType == "AttributeSequenceOfInteger") return SALOMEDSImpl_AttributeSequenceOfInteger::GetID(); \ + if(theType == "AttributeName") return SALOMEDSImpl_AttributeName::GetID(); \ if(theType == "AttributeComment") return SALOMEDSImpl_AttributeComment::GetID(); \ if(theType == "AttributeIOR") return SALOMEDSImpl_AttributeIOR::GetID(); \ if(theType == "AttributePersistentRef") return SALOMEDSImpl_AttributePersistentRef::GetID(); \ if(theType == "AttributeDrawable") return SALOMEDSImpl_AttributeDrawable::GetID(); \ if(theType == "AttributeSelectable") return SALOMEDSImpl_AttributeSelectable::GetID(); \ - if(theType == "AttributeExpandable") return SALOMEDSImpl_AttributeExpandable::GetID(); \ - if(theType == "AttributeOpened") return SALOMEDSImpl_AttributeOpened::GetID(); \ - if(theType == "AttributeTextColor") return SALOMEDSImpl_AttributeTextColor::GetID(); \ - if(theType == "AttributeTextHighlightColor") return SALOMEDSImpl_AttributeTextHighlightColor::GetID(); \ - if(theType == "AttributePixMap") return SALOMEDSImpl_AttributePixMap::GetID(); \ - if(theType == "AttributeLocalID") return SALOMEDSImpl_AttributeLocalID::GetID(); \ - if(theType == "AttributeTarget") return SALOMEDSImpl_AttributeTarget::GetID(); \ - if(theType == "AttributeTableOfInteger") return SALOMEDSImpl_AttributeTableOfInteger::GetID(); \ - if(theType == "AttributeTableOfReal") return SALOMEDSImpl_AttributeTableOfReal::GetID(); \ + if(theType == "AttributeExpandable") return SALOMEDSImpl_AttributeExpandable::GetID(); \ + if(theType == "AttributeOpened") return SALOMEDSImpl_AttributeOpened::GetID(); \ + if(theType == "AttributeTextColor") return SALOMEDSImpl_AttributeTextColor::GetID(); \ + if(theType == "AttributeTextHighlightColor") return SALOMEDSImpl_AttributeTextHighlightColor::GetID(); \ + if(theType == "AttributePixMap") return SALOMEDSImpl_AttributePixMap::GetID(); \ + if(theType == "AttributeLocalID") return SALOMEDSImpl_AttributeLocalID::GetID(); \ + if(theType == "AttributeTarget") return SALOMEDSImpl_AttributeTarget::GetID(); \ + if(theType == "AttributeTableOfInteger") return SALOMEDSImpl_AttributeTableOfInteger::GetID(); \ + if(theType == "AttributeTableOfReal") return SALOMEDSImpl_AttributeTableOfReal::GetID(); \ if(theType == "AttributeTableOfString") return SALOMEDSImpl_AttributeTableOfString::GetID(); \ - if(theType == "AttributeStudyProperties") return SALOMEDSImpl_AttributeStudyProperties::GetID(); \ - if(theType == "AttributePythonObject") return SALOMEDSImpl_AttributePythonObject::GetID(); \ - if(theType == "AttributeUserID") return std::string("FFFFFFFF-D9CD-11d6-945D-1050DA506788"); \ - if(theType == "AttributeExternalFileDef") return SALOMEDSImpl_AttributeExternalFileDef::GetID(); \ - if(theType == "AttributeFileType") return SALOMEDSImpl_AttributeFileType::GetID(); \ - if(theType == "AttributeFlags") return SALOMEDSImpl_AttributeFlags::GetID(); \ + if(theType == "AttributeStudyProperties") return SALOMEDSImpl_AttributeStudyProperties::GetID(); \ + if(theType == "AttributePythonObject") return SALOMEDSImpl_AttributePythonObject::GetID(); \ + if(theType == "AttributeUserID") return std::string("FFFFFFFF-D9CD-11d6-945D-1050DA506788"); \ + if(theType == "AttributeExternalFileDef") return SALOMEDSImpl_AttributeExternalFileDef::GetID(); \ + if(theType == "AttributeFileType") return SALOMEDSImpl_AttributeFileType::GetID(); \ + if(theType == "AttributeFlags") return SALOMEDSImpl_AttributeFlags::GetID(); \ if(theType == "AttributeGraphic") return SALOMEDSImpl_AttributeGraphic::GetID(); \ - if(theType == "AttributeReference") return SALOMEDSImpl_AttributeReference::GetID(); \ - if(theType == "AttributeParameter") return SALOMEDSImpl_AttributeParameter::GetID(); \ + if(theType == "AttributeReference") return SALOMEDSImpl_AttributeReference::GetID(); \ + if(theType == "AttributeParameter") return SALOMEDSImpl_AttributeParameter::GetID(); \ if(theType == "AttributeString") return SALOMEDSImpl_AttributeString::GetID(); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Callback.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_Callback.cxx index 79bbb51da..d2e8d447d 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Callback.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Callback.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_Callback.cxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Callback.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_Callback.hxx index ac6306dd3..7a4ff29da 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Callback.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Callback.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_Callback.hxx // Author : Sergey RUIN // Module : SALOME @@ -53,4 +54,11 @@ public: }; +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AbstractCallback +{ +public: + virtual bool addSO_Notification(const SALOMEDSImpl_SObject& theSObject){return false;}; + virtual bool removeSO_Notification(const SALOMEDSImpl_SObject& theSObject){return false;}; + virtual bool modifySO_Notification(const SALOMEDSImpl_SObject& theSObject, int reason ){return false;}; +}; #endif diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_ChildIterator.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_ChildIterator.cxx index f41d138f8..932d1ba4d 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_ChildIterator.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_ChildIterator.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_ChildIterator.cxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_ChildIterator.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_ChildIterator.hxx index 4307e2c6a..8d43b628f 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_ChildIterator.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_ChildIterator.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_ChildIterator.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_ChildNodeIterator.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_ChildNodeIterator.cxx index 11cffe9e1..fa723039e 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_ChildNodeIterator.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_ChildNodeIterator.cxx @@ -1,28 +1,29 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: SALOMEDSImpl_ChildNodeIterator.cxx -// Created: Wed Jan 26 16:43:08 2000 -// Author: Denis PASCAL -// + +// File: SALOMEDSImpl_ChildNodeIterator.cxx +// Created: Wed Jan 26 16:43:08 2000 +// Author: Denis PASCAL +// // #include "SALOMEDSImpl_ChildNodeIterator.hxx" @@ -30,10 +31,10 @@ { \ while (myNode && (myNode->Depth() > myFirstLevel) && myNode->myNext == NULL) \ myNode = myNode->myFather; \ - if (myNode && (myNode->Depth() > myFirstLevel) && myNode->myFather != NULL) \ - myNode = myNode->myNext; \ - else \ - myNode = NULL; \ + if (myNode && (myNode->Depth() > myFirstLevel) && myNode->myFather != NULL) \ + myNode = myNode->myNext; \ + else \ + myNode = NULL; \ } //======================================================================= @@ -50,7 +51,7 @@ SALOMEDSImpl_ChildNodeIterator::SALOMEDSImpl_ChildNodeIterator() //======================================================================= SALOMEDSImpl_ChildNodeIterator::SALOMEDSImpl_ChildNodeIterator (const SALOMEDSImpl_AttributeTreeNode* aNode, - const bool allLevels) + const bool allLevels) : myNode(aNode->myFirst), myFirstLevel(allLevels ? aNode->Depth() : -1) {} @@ -61,7 +62,7 @@ SALOMEDSImpl_ChildNodeIterator::SALOMEDSImpl_ChildNodeIterator (const SALOMEDSIm //======================================================================= void SALOMEDSImpl_ChildNodeIterator::Initialize(const SALOMEDSImpl_AttributeTreeNode* aNode, - const bool allLevels) + const bool allLevels) { myNode = aNode->myFirst; myFirstLevel = allLevels ? aNode->Depth() : -1; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_ChildNodeIterator.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_ChildNodeIterator.hxx index 7aece5b4b..c97550266 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_ChildNodeIterator.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_ChildNodeIterator.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef _SALOMEDSImpl_ChildNodeIterator_HeaderFile #define _SALOMEDSImpl_ChildNodeIterator_HeaderFile diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Defines.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_Defines.hxx index 5b6ee955d..2b374078c 100755 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Defines.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Defines.hxx @@ -1,24 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_Defines.hxx // Author : Alexander A. BORODIN // Module : KERNEL @@ -27,7 +25,7 @@ #define _SALOMEDSImpl_Defines_HXX_ #ifdef WIN32 -# if defined SALOMEDSIMPL_EXPORTS +# if defined SALOMEDSIMPL_EXPORTS || defined SalomeDSImpl_EXPORTS # define SALOMEDSIMPL_EXPORT __declspec( dllexport ) # else # define SALOMEDSIMPL_EXPORT __declspec( dllimport ) diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Driver.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_Driver.hxx index f07f0467e..84be82bcb 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Driver.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Driver.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef __SALOMEDSIMPL_DRIVER_H__ #define __SALOMEDSIMPL_DRIVER_H__ @@ -87,6 +88,7 @@ public: virtual SALOMEDSImpl_TMPFile* DumpPython(SALOMEDSImpl_Study* theStudy, bool isPublished, + bool isMultiFile, bool& isValidScript, long& theStreamLength) = 0; }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_GenericAttribute.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_GenericAttribute.cxx index b1148f59c..4337e8e95 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_GenericAttribute.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_GenericAttribute.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_GenericAttribute.hxx // Author : SERGEY_RUIN // Module : SALOME @@ -27,9 +28,7 @@ #include "SALOMEDSImpl_Study.hxx" #include "SALOMEDSImpl_StudyBuilder.hxx" -using namespace std; - -string SALOMEDSImpl_GenericAttribute::Impl_GetType(DF_Attribute* theAttr) +std::string SALOMEDSImpl_GenericAttribute::Impl_GetType(DF_Attribute* theAttr) { SALOMEDSImpl_GenericAttribute* ga = dynamic_cast(theAttr); if (ga) @@ -38,7 +37,7 @@ string SALOMEDSImpl_GenericAttribute::Impl_GetType(DF_Attribute* theAttr) return ""; } -string SALOMEDSImpl_GenericAttribute::Impl_GetClassType(DF_Attribute* theAttr) +std::string SALOMEDSImpl_GenericAttribute::Impl_GetClassType(DF_Attribute* theAttr) { SALOMEDSImpl_GenericAttribute* ga = dynamic_cast(theAttr); if (ga) @@ -53,7 +52,7 @@ void SALOMEDSImpl_GenericAttribute::Impl_CheckLocked(DF_Attribute* theAttr) ga->CheckLocked(); } -string SALOMEDSImpl_GenericAttribute::Type() +std::string SALOMEDSImpl_GenericAttribute::Type() { return _type; } @@ -80,12 +79,16 @@ SALOMEDSImpl_SObject SALOMEDSImpl_GenericAttribute::GetSObject() return SALOMEDSImpl_Study::SObject(aLabel); } -void SALOMEDSImpl_GenericAttribute::SetModifyFlag() +/*! + * Set modification flag of the Attribute. + * param reason reason of the modification (by default equal to 0) + */ +void SALOMEDSImpl_GenericAttribute::SetModifyFlag(int reason) { DF_Label aLabel = Label(); if(aLabel.IsNull()) return; SALOMEDSImpl_Study* aStudy = SALOMEDSImpl_Study::GetStudy(aLabel); + if(aStudy) aStudy->modifySO_Notification(GetSObject(), reason); if(aStudy) aStudy->Modify(); } - diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_GenericAttribute.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_GenericAttribute.hxx index f36bccf59..499ca178e 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_GenericAttribute.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_GenericAttribute.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_GenericAttribute.hxx // Author : SERGEY_RUIN // Module : SALOME @@ -50,7 +51,7 @@ public: virtual void CheckLocked(); std::string GetClassType() { return _type; } SALOMEDSImpl_SObject GetSObject(); - void SetModifyFlag(); + void SetModifyFlag(int reason = 0); static std::string Impl_GetType(DF_Attribute* theAttr); static std::string Impl_GetClassType(DF_Attribute* theAttr); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_GenericVariable.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_GenericVariable.cxx index 7de967c2c..ba99d74b4 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_GenericVariable.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_GenericVariable.cxx @@ -1,26 +1,26 @@ -// Copyright (C) 2008 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// // 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 +// 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 +// +// 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 +// 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 // + // File : SALOMEDSImpl_GenericVariable.cxx // Author : Roman NIKOLAEV, Open CASCADE S.A.S. // Module : SALOME - +// #include "SALOMEDSImpl_GenericVariable.hxx" #include "SALOMEDSImpl_Attributes.hxx" #include "SALOMEDSImpl_Study.hxx" @@ -28,8 +28,6 @@ #include -using namespace std; - //============================================================================ /*! Function : SALOMEDSImpl_GenericVariable * Purpose : @@ -37,7 +35,7 @@ using namespace std; //============================================================================ SALOMEDSImpl_GenericVariable:: SALOMEDSImpl_GenericVariable(SALOMEDSImpl_GenericVariable::VariableTypes theType, - const string& theName): + const std::string& theName): _type(theType), _name(theName) {} @@ -65,7 +63,7 @@ SALOMEDSImpl_GenericVariable::VariableTypes SALOMEDSImpl_GenericVariable::Type() * Purpose : */ //============================================================================ -string SALOMEDSImpl_GenericVariable::Name() const +std::string SALOMEDSImpl_GenericVariable::Name() const { return _name; } @@ -103,7 +101,7 @@ bool SALOMEDSImpl_GenericVariable::setName(const std::string& theName) * Purpose : */ //============================================================================ -SALOMEDSImpl_GenericVariable::VariableTypes SALOMEDSImpl_GenericVariable::String2VariableType(const string& theStrType) +SALOMEDSImpl_GenericVariable::VariableTypes SALOMEDSImpl_GenericVariable::String2VariableType(const std::string& theStrType) { return(SALOMEDSImpl_GenericVariable::VariableTypes)atoi((char*)theStrType.c_str()); } @@ -113,9 +111,9 @@ SALOMEDSImpl_GenericVariable::VariableTypes SALOMEDSImpl_GenericVariable::String * Purpose : */ //============================================================================ -string SALOMEDSImpl_GenericVariable::Save() const +std::string SALOMEDSImpl_GenericVariable::Save() const { - return string(); + return std::string(); } @@ -124,18 +122,18 @@ string SALOMEDSImpl_GenericVariable::Save() const * Purpose : */ //============================================================================ -string SALOMEDSImpl_GenericVariable::SaveToScript() const +std::string SALOMEDSImpl_GenericVariable::SaveToScript() const { - return string(); + return std::string(); } //============================================================================ /*! Function : SaveType * Purpose : */ //============================================================================ -string SALOMEDSImpl_GenericVariable::SaveType() const +std::string SALOMEDSImpl_GenericVariable::SaveType() const { - return string(); + return std::string(); } //============================================================================ @@ -143,6 +141,6 @@ string SALOMEDSImpl_GenericVariable::SaveType() const * Purpose : */ //============================================================================ -void SALOMEDSImpl_GenericVariable::Load(const string& theStrValue) +void SALOMEDSImpl_GenericVariable::Load(const std::string& theStrValue) { } diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_GenericVariable.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_GenericVariable.hxx index 5dc385cc0..ecf11fdd4 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_GenericVariable.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_GenericVariable.hxx @@ -1,26 +1,26 @@ -// Copyright (C) 2008 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// // 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 +// 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 +// +// 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 +// 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 // + // File : SALOMEDSImpl_GenericVariable.hxx // Author : Roman NIKOLAEV, Open CASCADE S.A.S. // Module : SALOME - +// #ifndef _GENERICIMPL_VARIABLE_HXX_ #define _GENERICIMPL_VARIABLE_HXX_ @@ -35,7 +35,7 @@ class SALOMEDSIMPL_EXPORT SALOMEDSImpl_GenericVariable public: //Supported types of the nootebook variables - enum VariableTypes{REAL_VAR, INTEGER_VAR, BOOLEAN_VAR}; + enum VariableTypes{REAL_VAR, INTEGER_VAR, BOOLEAN_VAR, STRING_VAR}; SALOMEDSImpl_GenericVariable(VariableTypes theType, const std::string& theName); ~SALOMEDSImpl_GenericVariable(); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.cxx index 6d4c99082..90e02afdd 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.cxx @@ -1,37 +1,38 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "SALOMEDSImpl_IParameters.hxx" #include #include "SALOMEDSImpl_SObject.hxx" #include "SALOMEDSImpl_ChildIterator.hxx" -using namespace std; - #define _AP_LISTS_LIST_ "AP_LISTS_LIST" #define _AP_ENTRIES_LIST_ "AP_ENTRIES_LIST" #define _AP_PROPERTIES_LIST_ "AP_PROPERTIES_LIST" #define _AP_DUMP_PYTHON_ "AP_DUMP_PYTHON" +#define _PT_ID_ "_PT_OBJECT_ID_" + /*! Constructor */ @@ -48,10 +49,10 @@ SALOMEDSImpl_IParameters::~SALOMEDSImpl_IParameters() _compNames.clear(); } -int SALOMEDSImpl_IParameters::append(const string& listName, const string& value) +int SALOMEDSImpl_IParameters::append(const std::string& listName, const std::string& value) { if(!_ap) return -1; - vector v; + std::vector v; if(!_ap->IsSet(listName, PT_STRARRAY)) { if(!_ap->IsSet(_AP_LISTS_LIST_, PT_STRARRAY)) _ap->SetStrArray(_AP_LISTS_LIST_, v); if(listName != _AP_ENTRIES_LIST_ && @@ -66,43 +67,43 @@ int SALOMEDSImpl_IParameters::append(const string& listName, const string& value return (v.size()-1); } -int SALOMEDSImpl_IParameters::nbValues(const string& listName) +int SALOMEDSImpl_IParameters::nbValues(const std::string& listName) { if(!_ap) return -1; if(!_ap->IsSet(listName, PT_STRARRAY)) return 0; - vector v = _ap->GetStrArray(listName); + std::vector v = _ap->GetStrArray(listName); return v.size(); } -vector SALOMEDSImpl_IParameters::getValues(const string& listName) +std::vector SALOMEDSImpl_IParameters::getValues(const std::string& listName) { - vector v; + std::vector v; if(!_ap) return v; if(!_ap->IsSet(listName, PT_STRARRAY)) return v; return _ap->GetStrArray(listName); } -string SALOMEDSImpl_IParameters::getValue(const string& listName, int index) +std::string SALOMEDSImpl_IParameters::getValue(const std::string& listName, int index) { if(!_ap) return ""; if(!_ap->IsSet(listName, PT_STRARRAY)) return ""; - vector v = _ap->GetStrArray(listName); + std::vector v = _ap->GetStrArray(listName); if(index >= v.size()) return ""; return v[index]; } -vector SALOMEDSImpl_IParameters::getLists() +std::vector SALOMEDSImpl_IParameters::getLists() { - vector v; + std::vector v; if(!_ap->IsSet(_AP_LISTS_LIST_, PT_STRARRAY)) return v; return _ap->GetStrArray(_AP_LISTS_LIST_); } -void SALOMEDSImpl_IParameters::setParameter(const string& entry, const string& parameterName, const string& value) +void SALOMEDSImpl_IParameters::setParameter(const std::string& entry, const std::string& parameterName, const std::string& value) { if(!_ap) return; - vector v; + std::vector v; if(!_ap->IsSet(entry, PT_STRARRAY)) { append(_AP_ENTRIES_LIST_, entry); //Add the entry to the internal list of entries _ap->SetStrArray(entry, v); @@ -114,11 +115,11 @@ void SALOMEDSImpl_IParameters::setParameter(const string& entry, const string& p } -string SALOMEDSImpl_IParameters::getParameter(const string& entry, const string& parameterName) +std::string SALOMEDSImpl_IParameters::getParameter(const std::string& entry, const std::string& parameterName) { if(!_ap) return ""; if(!_ap->IsSet(entry, PT_STRARRAY)) return ""; - vector v = _ap->GetStrArray(entry); + std::vector v = _ap->GetStrArray(entry); int length = v.size(); for(int i = 0; i SALOMEDSImpl_IParameters::getAllParameterNames(const string& entry) +void SALOMEDSImpl_IParameters::setIdParameter(const std::string& entry, const std::string& value) { - vector v, names; + if(!_ap) return; + std::vector v; + if(!_ap->IsSet(entry, PT_STRARRAY)) { + append(_AP_ENTRIES_LIST_, entry); //Add the entry to the internal list of entries + _ap->SetStrArray(entry, v); + } + v = _ap->GetStrArray(entry); + v.push_back(_PT_ID_); + v.push_back(value); + _ap->SetStrArray(entry, v); +} + + +std::string SALOMEDSImpl_IParameters::getIdParameter(const std::string& entry) +{ + if(!_ap) return ""; + if(!_ap->IsSet(entry, PT_STRARRAY)) return ""; + std::vector v = _ap->GetStrArray(entry); + int length = v.size(); + for(int i = 0; i SALOMEDSImpl_IParameters::getAllParameterNames(const std::string& entry) +{ + std::vector v, names; if(!_ap) return v; if(!_ap->IsSet(entry, PT_STRARRAY)) return v; v = _ap->GetStrArray(entry); @@ -140,9 +168,9 @@ vector SALOMEDSImpl_IParameters::getAllParameterNames(const string& entr return names; } -vector SALOMEDSImpl_IParameters::getAllParameterValues(const string& entry) +std::vector SALOMEDSImpl_IParameters::getAllParameterValues(const std::string& entry) { - vector v, values; + std::vector v, values; if(!_ap) return v; if(!_ap->IsSet(entry, PT_STRARRAY)) return v; v = _ap->GetStrArray(entry); @@ -153,22 +181,22 @@ vector SALOMEDSImpl_IParameters::getAllParameterValues(const string& ent return values; } -int SALOMEDSImpl_IParameters::getNbParameters(const string& entry) +int SALOMEDSImpl_IParameters::getNbParameters(const std::string& entry) { if(!_ap) return -1; if(!_ap->IsSet(entry, PT_STRARRAY)) return -1; return _ap->GetStrArray(entry).size()/2; } -vector SALOMEDSImpl_IParameters::getEntries() +std::vector SALOMEDSImpl_IParameters::getEntries() { - vector v; + std::vector v; if(!_ap) return v; if(!_ap->IsSet(_AP_ENTRIES_LIST_, PT_STRARRAY)) return v; return _ap->GetStrArray(_AP_ENTRIES_LIST_); } -void SALOMEDSImpl_IParameters::setProperty(const string& name, const std::string& value) +void SALOMEDSImpl_IParameters::setProperty(const std::string& name, const std::string& value) { if(!_ap) return; if(!_ap->IsSet(name, PT_STRING)) { @@ -177,28 +205,28 @@ void SALOMEDSImpl_IParameters::setProperty(const string& name, const std::string _ap->SetString(name, value); } -string SALOMEDSImpl_IParameters::getProperty(const string& name) +std::string SALOMEDSImpl_IParameters::getProperty(const std::string& name) { if(!_ap) return ""; if(!_ap->IsSet(name, PT_STRING)) return ""; return _ap->GetString(name); } -vector SALOMEDSImpl_IParameters::getProperties() +std::vector SALOMEDSImpl_IParameters::getProperties() { - vector v; + std::vector v; if(!_ap) return v; if(!_ap->IsSet(_AP_PROPERTIES_LIST_, PT_STRARRAY)) return v; return _ap->GetStrArray(_AP_PROPERTIES_LIST_); } -string SALOMEDSImpl_IParameters::decodeEntry(const string& entry) +std::string SALOMEDSImpl_IParameters::decodeEntry(const std::string& entry) { if(!_study) return entry; int pos = entry.rfind("_"); if(pos < 0 || pos >= entry.size()) return entry; - string compName(entry, 0, pos), compID, tail(entry, pos+1, entry.length()-1); + std::string compName(entry, 0, pos), compID, tail(entry, pos+1, entry.length()-1); if(_compNames.find(compName) == _compNames.end()) { SALOMEDSImpl_SObject so = _study->FindComponent(compName); @@ -208,16 +236,16 @@ string SALOMEDSImpl_IParameters::decodeEntry(const string& entry) } else compID = _compNames[compName]; - string newEntry(compID); + std::string newEntry(compID); newEntry += (":"+tail); return newEntry; } -bool SALOMEDSImpl_IParameters::isDumpPython(SALOMEDSImpl_Study* study, const string& theID) +bool SALOMEDSImpl_IParameters::isDumpPython(SALOMEDSImpl_Study* study, const std::string& theID) { - string anID; + std::string anID; if(theID == "") anID = getDefaultVisualComponent(); else anID = theID; @@ -228,9 +256,9 @@ bool SALOMEDSImpl_IParameters::isDumpPython(SALOMEDSImpl_Study* study, const str } -int SALOMEDSImpl_IParameters::getLastSavePoint(SALOMEDSImpl_Study* study, const string& theID) +int SALOMEDSImpl_IParameters::getLastSavePoint(SALOMEDSImpl_Study* study, const std::string& theID) { - string anID; + std::string anID; if(theID == "") anID = getDefaultVisualComponent(); else anID = theID; @@ -253,26 +281,26 @@ int SALOMEDSImpl_IParameters::getLastSavePoint(SALOMEDSImpl_Study* study, const -string SALOMEDSImpl_IParameters::getStudyScript(SALOMEDSImpl_Study* study, int savePoint, const std::string& theID) +std::string SALOMEDSImpl_IParameters::getStudyScript(SALOMEDSImpl_Study* study, int savePoint, const std::string& theID) { - string anID; + std::string anID; if(theID == "") anID = getDefaultVisualComponent(); else anID = theID; SALOMEDSImpl_AttributeParameter* ap = study->GetCommonParameters((char*)anID.c_str(), savePoint); SALOMEDSImpl_IParameters ip(ap); - string dump(""); + std::string dump(""); dump += "import iparameters\n"; - dump += "ipar = iparameters.IParameters(salome.myStudy.GetCommonParameters(\""+anID+"\", 1))\n\n"; + dump += "ipar = iparameters.IParameters(salome.myStudy.GetCommonParameters(\""+anID+"\", 1), True)\n\n"; - vector v = ip.getProperties(); + std::vector v = ip.getProperties(); if(v.size() > 0) { dump += "#Set up visual properties:\n"; for(int i = 0; i 0) { dump += "#Set up lists:\n"; for(int i = 0; i lst = ip.getValues(v[i]); + std::vector lst = ip.getValues(v[i]); dump += "# fill list "+v[i]+"\n"; for(int j = 0; j < lst.size(); j++) { - printf("### %s \nFind : %i\n",lst[j].c_str(), lst[j].find('\"')); - if (lst[j].find('\"') == -1) - dump += "ipar.append(\""+v[i]+"\", \""+lst[j]+"\")\n"; - else - dump += "ipar.append(\""+v[i]+"\", \"\"\""+lst[j]+"\"\"\")\n"; + if (lst[j].find('\"') == -1) + dump += "ipar.append(\""+v[i]+"\", \""+lst[j]+"\")\n"; + else + dump += "ipar.append(\""+v[i]+"\", \"\"\""+lst[j]+"\"\"\")\n"; } } } @@ -296,16 +323,16 @@ string SALOMEDSImpl_IParameters::getStudyScript(SALOMEDSImpl_Study* study, int s return dump; } -string SALOMEDSImpl_IParameters::getDefaultScript(SALOMEDSImpl_Study* study, - const string& moduleName, - const string& shift, - const string& theID) +std::string SALOMEDSImpl_IParameters::getDefaultScript(SALOMEDSImpl_Study* study, + const std::string& moduleName, + const std::string& shift, + const std::string& theID) { - string anID; + std::string anID; if(theID == "") anID = getDefaultVisualComponent(); else anID = theID; - string dump(""); + std::string dump(""); int savePoint = SALOMEDSImpl_IParameters::getLastSavePoint(study, anID); if(savePoint < 0) return dump; @@ -319,11 +346,11 @@ string SALOMEDSImpl_IParameters::getDefaultScript(SALOMEDSImpl_Study* study, dump += shift +"import iparameters\n"; dump += shift + "ipar = iparameters.IParameters(theStudy.GetModuleParameters(\""+anID+"\", \""+moduleName+"\", 1))\n\n"; - vector v = ip.getProperties(); + std::vector v = ip.getProperties(); if(v.size() > 0) { dump += shift +"#Set up visual properties:\n"; for(int i = 0; i 0) { dump += shift +"#Set up lists:\n"; for(int i = 0; i lst = ip.getValues(v[i]); + std::vector lst = ip.getValues(v[i]); dump += shift +"# fill list "+v[i]+"\n"; for(int j = 0; j < lst.size(); j++) - dump += shift +"ipar.append(\""+v[i]+"\", \""+lst[j]+"\")\n"; + dump += shift +"ipar.append(\""+v[i]+"\", \""+lst[j]+"\")\n"; } } @@ -343,15 +370,33 @@ string SALOMEDSImpl_IParameters::getDefaultScript(SALOMEDSImpl_Study* study, if(v.size() > 0) { dump += shift + "#Set up entries:\n"; for(int i = 0; i names = ip.getAllParameterNames(v[i]); - vector values = ip.getAllParameterValues(v[i]); - string decodedEntry = ip.decodeEntry(v[i]); + std::vector names = ip.getAllParameterNames(v[i]); + std::vector values = ip.getAllParameterValues(v[i]); + std::string decodedEntry = ip.decodeEntry(v[i]); SALOMEDSImpl_SObject so = study->FindObjectID(decodedEntry); - string so_name(""); + std::string so_name(""); if(so) so_name = so.GetName(); - dump += shift + "# set up entry " + v[i] +" ("+so_name+")" + " parameters" + "\n"; - for(int j = 0; j < names.size() && j < values.size(); j++) - dump += shift + "ipar.setParameter(\"" + v[i] + "\", \"" + names[j] + "\", \"" + values[j] + "\")\n"; + + //Try to find id parameter + std::vector::iterator it = std::find(names.begin(), names.end(), _PT_ID_ ); + bool hasId = it != names.end(); + bool onlyId = hasId && names.size() == 1; + + if(!onlyId) { + dump += shift + "# set up entry " + v[i] +" ("+so_name+")" + " parameters" + "\n"; + if(hasId) { + int idIndex = std::distance(names.begin(), it); + dump += shift + "objId = " + values[idIndex] + "\n"; + } + + for(int j = 0; j < names.size() && j < values.size(); j++) { + if(names[j] == _PT_ID_) continue; + if(hasId) + dump += shift + "ipar.setParameter(" + "objId" + ", \"" + names[j] + "\", \"" + values[j] + "\")\n"; + else + dump += shift + "ipar.setParameter(\"" + v[i] + "\", \"" + names[j] + "\", \"" + values[j] + "\")\n"; + } + } } } @@ -359,7 +404,7 @@ string SALOMEDSImpl_IParameters::getDefaultScript(SALOMEDSImpl_Study* study, } -string SALOMEDSImpl_IParameters::getDefaultVisualComponent() +std::string SALOMEDSImpl_IParameters::getDefaultVisualComponent() { return "Interface Applicative"; } diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.hxx index 17b59ef68..ca5a011ae 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef SALOMEDSImpl_IParameters_H #define SALOMEDSImpl_IParameters_H @@ -77,6 +78,16 @@ public: */ virtual std::string getParameter(const std::string& entry, const std::string& parameterName); + /*! + Sets an id parameter value for the given entry. + */ + virtual void setIdParameter(const std::string& entry, const std::string& value); + + /*! + Gets an id parameter value for the given entry + */ + virtual std::string getIdParameter(const std::string& entry); + /*! Returns all parameter names of the given entry */ diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_SComponent.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_SComponent.cxx index 5c5d096ba..b4a555ac8 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_SComponent.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_SComponent.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_SComponent.cxx // Author : Sergey RUIN // Module : SALOME @@ -27,8 +28,6 @@ #include "SALOMEDSImpl_AttributeComment.hxx" #include "SALOMEDSImpl_AttributeIOR.hxx" -using namespace std; - //============================================================================ /*! Function : Empty constructor * Purpose : @@ -76,9 +75,9 @@ SALOMEDSImpl_SComponent::~SALOMEDSImpl_SComponent() * Purpose : */ //============================================================================ -string SALOMEDSImpl_SComponent::ComponentDataType() +std::string SALOMEDSImpl_SComponent::ComponentDataType() { - string res = ""; + std::string res = ""; SALOMEDSImpl_AttributeComment* type; if ( (type = (SALOMEDSImpl_AttributeComment*)_lab.FindAttribute(SALOMEDSImpl_AttributeComment::GetID())) ) { res = type->Value(); @@ -93,7 +92,7 @@ string SALOMEDSImpl_SComponent::ComponentDataType() * Purpose : */ //============================================================================ -bool SALOMEDSImpl_SComponent::ComponentIOR(string& IOR) +bool SALOMEDSImpl_SComponent::ComponentIOR(std::string& IOR) { SALOMEDSImpl_AttributeIOR* ior; if (!(ior = (SALOMEDSImpl_AttributeIOR*)_lab.FindAttribute(SALOMEDSImpl_AttributeIOR::GetID())) ) diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_SComponent.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_SComponent.hxx index cfe6a4761..f6bd4fef1 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_SComponent.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_SComponent.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_SComponent.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_SComponentIterator.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_SComponentIterator.cxx index c175e766b..b760d7e4a 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_SComponentIterator.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_SComponentIterator.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_SComponentIterator.cxx // Author : Sergey RUIN // Module : SALOME @@ -26,8 +27,6 @@ #include "SALOMEDSImpl_SComponentIterator.hxx" #include "SALOMEDSImpl_Study.hxx" -using namespace std; - //============================================================================ /*! Function : constructor * diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_SComponentIterator.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_SComponentIterator.hxx index 7ab0a5b4e..ea0437a12 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_SComponentIterator.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_SComponentIterator.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_SComponentIterator_i.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_SObject.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_SObject.cxx index b34f8f02b..11716d09c 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_SObject.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_SObject.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME SALOMEDS : data structure of SALOME and sources of Salome data server // File : SALOMEDSImpl_SObject.cxx // Author : Sergey RUIN @@ -29,8 +30,6 @@ #include "SALOMEDSImpl_SComponent.hxx" #include "SALOMEDSImpl_Study.hxx" -using namespace std; - #include #include @@ -85,7 +84,7 @@ SALOMEDSImpl_SObject::~SALOMEDSImpl_SObject() * Purpose : */ //============================================================================ -string SALOMEDSImpl_SObject::GetID() const +std::string SALOMEDSImpl_SObject::GetID() const { return _lab.Entry(); } @@ -135,7 +134,7 @@ SALOMEDSImpl_Study* SALOMEDSImpl_SObject::GetStudy() const */ //============================================================================ bool SALOMEDSImpl_SObject::FindAttribute(DF_Attribute*& theAttribute, - const string& theTypeOfAttribute) const + const std::string& theTypeOfAttribute) const { if(_lab.IsNull()) return false; std::string aGUID = GetGUID(theTypeOfAttribute); @@ -150,13 +149,13 @@ bool SALOMEDSImpl_SObject::FindAttribute(DF_Attribute*& theAttribute, * Purpose : Returns list of all attributes for this sobject */ //============================================================================ -vector SALOMEDSImpl_SObject::GetAllAttributes() const +std::vector SALOMEDSImpl_SObject::GetAllAttributes() const { - vector va1, va = _lab.GetAttributes(); + std::vector va1, va = _lab.GetAttributes(); for(int i = 0, len = va.size(); i(va[i]); - if(ga && ga->Type() != string("AttributeReference")) - va1.push_back(va[i]); + if(ga && ga->Type() != std::string("AttributeReference")) + va1.push_back(va[i]); } return va1; @@ -199,9 +198,9 @@ bool SALOMEDSImpl_SObject::FindSubObject(int theTag, SALOMEDSImpl_SObject& theOb * Purpose : */ //============================================================================ -string SALOMEDSImpl_SObject::GetName() const +std::string SALOMEDSImpl_SObject::GetName() const { - string aStr = ""; + std::string aStr = ""; SALOMEDSImpl_AttributeName* aName; if ((aName=(SALOMEDSImpl_AttributeName*)_lab.FindAttribute(SALOMEDSImpl_AttributeName::GetID()))) { aStr =aName->Value(); @@ -214,9 +213,9 @@ string SALOMEDSImpl_SObject::GetName() const * Purpose : */ //============================================================================ -string SALOMEDSImpl_SObject::GetComment() const +std::string SALOMEDSImpl_SObject::GetComment() const { - string aStr = ""; + std::string aStr = ""; SALOMEDSImpl_AttributeComment* aComment; if ((aComment=(SALOMEDSImpl_AttributeComment*)_lab.FindAttribute(SALOMEDSImpl_AttributeComment::GetID()))) { aStr = aComment->Value(); @@ -229,9 +228,9 @@ string SALOMEDSImpl_SObject::GetComment() const * Purpose : */ //============================================================================ -string SALOMEDSImpl_SObject::GetIOR() const +std::string SALOMEDSImpl_SObject::GetIOR() const { - string aStr = ""; + std::string aStr = ""; SALOMEDSImpl_AttributeIOR* anIOR; if ((anIOR=(SALOMEDSImpl_AttributeIOR*)_lab.FindAttribute(SALOMEDSImpl_AttributeIOR::GetID()))) { aStr = dynamic_cast(anIOR)->Value(); @@ -240,13 +239,16 @@ string SALOMEDSImpl_SObject::GetIOR() const } -std::string SALOMEDSImpl_SObject::GetGUID(const string& theType) +std::string SALOMEDSImpl_SObject::GetGUID(const std::string& theType) { __AttributeTypeToGUIDForSObject if (strncmp(theType.c_str(), "AttributeTreeNodeGUID",21) == 0) { return theType.substr(21, theType.size()); } + if (strncmp(theType.c_str(), "AttributeUserID",15) == 0) { + return theType.substr(15, theType.size()); + } return ""; } @@ -290,3 +292,10 @@ bool SALOMEDSImpl_SObject::IsComponent() const return SALOMEDSImpl_SComponent::IsA(_lab); } +void SALOMEDSImpl_SObject::SetAttrString(const std::string& name, const std::string& value) +{ + if(name=="AttributeName")SALOMEDSImpl_AttributeName::Set(GetLabel(), value); + else if(name=="AttributeIOR")SALOMEDSImpl_AttributeIOR::Set(GetLabel(), value); + else if(name=="AttributeString")SALOMEDSImpl_AttributeString::Set(GetLabel(), value); + else if(name=="AttributePixMap")SALOMEDSImpl_AttributePixMap::Set(GetLabel(), value); +} diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_SObject.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_SObject.hxx index 40162ddb3..4368cccb2 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_SObject.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_SObject.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_SObject.hxx // Author : Sergey RUIN // Module : SALOME @@ -66,6 +67,7 @@ public: virtual std::string GetName() const ; virtual std::string GetComment() const; virtual std::string GetIOR() const; + virtual void SetAttrString(const std::string& name,const std::string& value); virtual int Tag() const { return _lab.Tag(); } virtual int Depth() const { return _lab.Depth(); } diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_ScalarVariable.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_ScalarVariable.cxx index 3149d8738..0980ba2c5 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_ScalarVariable.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_ScalarVariable.cxx @@ -1,30 +1,34 @@ -// Copyright (C) 2008 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// // 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 +// 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 +// +// 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 +// 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 // + // File : SALOMEDSImpl_ScalarVariable.cxx // Author : Roman NIKOLAEV, Open CASCADE S.A.S. // Module : SALOME - +// #include "SALOMEDSImpl_ScalarVariable.hxx" #include "SALOMEDSImpl_GenericVariable.hxx" +#include "Basics_Utils.hxx" #include -using namespace std; +#include +#include + +#define OLDSTUDY_COMPATIBILITY //============================================================================ /*! Function : SALOMEDSImpl_ScalarVariable @@ -33,7 +37,7 @@ using namespace std; //============================================================================ SALOMEDSImpl_ScalarVariable:: SALOMEDSImpl_ScalarVariable(SALOMEDSImpl_GenericVariable::VariableTypes type, - const string& theName): + const std::string& theName): SALOMEDSImpl_GenericVariable(type,theName) {} @@ -59,6 +63,21 @@ bool SALOMEDSImpl_ScalarVariable::setValue(const double theValue) return true; } +//============================================================================ +/*! Function : + * Purpose : + */ +//============================================================================ +bool SALOMEDSImpl_ScalarVariable::setStringValue(const std::string& theValue) +{ + + if(myStrValue == theValue) + return false; + + myStrValue = theValue; + return true; +} + //============================================================================ /*! Function : getValue() * Purpose : @@ -69,12 +88,24 @@ double SALOMEDSImpl_ScalarVariable::getValue() const return myValue; } +//============================================================================ +/*! Function : getStringValue() + * Purpose : + */ +//============================================================================ +std::string SALOMEDSImpl_ScalarVariable::getStringValue() const +{ + return myStrValue; +} + //============================================================================ /*! Function : Save() * Purpose : */ //============================================================================ -string SALOMEDSImpl_ScalarVariable::Save() const{ +std::string SALOMEDSImpl_ScalarVariable::Save() const{ + Kernel_Utils::Localizer loc; + char buffer[255]; switch(Type()) { @@ -89,9 +120,14 @@ string SALOMEDSImpl_ScalarVariable::Save() const{ sprintf(buffer, "%d", (int)myValue); break; } + case SALOMEDSImpl_GenericVariable::STRING_VAR: + { + sprintf(buffer, "%s", myStrValue.c_str()); + break; + } default:break; } - return string(buffer); + return std::string(buffer); } //============================================================================ @@ -99,8 +135,10 @@ string SALOMEDSImpl_ScalarVariable::Save() const{ * Purpose : */ //============================================================================ -string SALOMEDSImpl_ScalarVariable::SaveToScript() const +std::string SALOMEDSImpl_ScalarVariable::SaveToScript() const { + Kernel_Utils::Localizer loc; + char buffer[255]; switch(Type()) { @@ -116,15 +154,17 @@ string SALOMEDSImpl_ScalarVariable::SaveToScript() const } case SALOMEDSImpl_GenericVariable::BOOLEAN_VAR: { - if((bool)myValue) - sprintf(buffer, "%s", "True"); - else - sprintf(buffer, "%s", "False"); + sprintf(buffer, "%s", ((bool)myValue) ? "True" : "False"); + break; + } + case SALOMEDSImpl_GenericVariable::STRING_VAR: + { + sprintf(buffer, "\"%s\"", myStrValue.c_str()); break; } default:break; } - return string(buffer); + return std::string(buffer); } //============================================================================ @@ -132,10 +172,10 @@ string SALOMEDSImpl_ScalarVariable::SaveToScript() const * Purpose : */ //============================================================================ -string SALOMEDSImpl_ScalarVariable::SaveType() const{ +std::string SALOMEDSImpl_ScalarVariable::SaveType() const{ char buffer[255]; sprintf(buffer, "%d", (int)Type()); - return string(buffer); + return std::string(buffer); } //============================================================================ @@ -143,8 +183,25 @@ string SALOMEDSImpl_ScalarVariable::SaveType() const{ * Purpose : */ //============================================================================ -void SALOMEDSImpl_ScalarVariable::Load(const string& theStrValue) +void SALOMEDSImpl_ScalarVariable::Load(const std::string& theStrValue) { - double aValue = atof(theStrValue.c_str()); - setValue(aValue); + Kernel_Utils::Localizer loc; + + std::string strCopy = theStrValue; + if ( Type() == SALOMEDSImpl_GenericVariable::STRING_VAR ) { +#ifdef OLDSTUDY_COMPATIBILITY + if (strCopy.size() > 1 && strCopy[0] == '\"' && strCopy[strCopy.size()-1] == '\"') + strCopy = strCopy.substr(1, strCopy.size()-2); +#endif // OLDSTUDY_COMPATIBILITY + setStringValue( strCopy ); + } + else { +#ifdef OLDSTUDY_COMPATIBILITY + int dotpos = strCopy.find(','); + if (dotpos != std::string::npos) + strCopy.replace(dotpos, 1, "."); +#endif // OLDSTUDY_COMPATIBILITY + double aValue = atof(strCopy.c_str()); + setValue(aValue); + } } diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_ScalarVariable.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_ScalarVariable.hxx index 9684f6e06..242be4822 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_ScalarVariable.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_ScalarVariable.hxx @@ -1,26 +1,26 @@ -// Copyright (C) 2008 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// // 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 +// 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 +// +// 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 +// 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 // + // File : SALOMEDSImpl_ScalarVariable.hxx // Author : Roman NIKOLAEV, Open CASCADE S.A.S. // Module : SALOME - +// #ifndef _SALOMEDSImpl_ScalarVariable_HeaderFile #define _SALOMEDSImpl_ScalarVariable_HeaderFile @@ -38,6 +38,9 @@ public: bool setValue(const double theValue); double getValue() const; + bool setStringValue(const std::string& theValue); + std::string getStringValue() const; + virtual std::string Save() const; virtual std::string SaveToScript() const; virtual std::string SaveType() const; @@ -46,6 +49,7 @@ public: private: double myValue; + std::string myStrValue; }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx index 2b88c9b89..f98ca5e05 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_Study.cxx // Author : Sergey RUIN // Module : SALOME @@ -26,7 +27,8 @@ #include "SALOMEDSImpl_Study.hxx" #include -using namespace std; +#include +#include #include "DF_Application.hxx" #include "DF_ChildIterator.hxx" @@ -41,6 +43,10 @@ using namespace std; #include "SALOMEDSImpl_ScalarVariable.hxx" #include +#include + +// comment out the following define to enable \t symbols in in the python dump files +#define WITHOUT_TABS #define DIRECTORYID 16661 #define FILELOCALID 26662 @@ -48,14 +54,13 @@ using namespace std; #define VARIABLE_SEPARATOR ':' #define OPERATION_SEPARATOR '|' - //============================================================================ /*! Function : SALOMEDSImpl_Study * Purpose : SALOMEDSImpl_Study constructor */ //============================================================================ SALOMEDSImpl_Study::SALOMEDSImpl_Study(const DF_Document* doc, - const string& study_name) + const std::string& study_name) { _name = study_name; _doc = (DF_Document*)doc; @@ -67,6 +72,7 @@ SALOMEDSImpl_Study::SALOMEDSImpl_Study(const DF_Document* doc, _useCaseBuilder = new SALOMEDSImpl_UseCaseBuilder(_doc); _builder = new SALOMEDSImpl_StudyBuilder(this); _cb = new SALOMEDSImpl_Callback(_useCaseBuilder); + _notifier=0; //Put on the root label a StudyHandle attribute to store the address of this object //It will be used to retrieve the study object by DF_Label that belongs to the study SALOMEDSImpl_StudyHandle::Set(_doc->Main().Root(), this); @@ -79,14 +85,18 @@ SALOMEDSImpl_Study::SALOMEDSImpl_Study(const DF_Document* doc, */ //============================================================================ SALOMEDSImpl_Study::~SALOMEDSImpl_Study() -{} +{ + delete _builder; + delete _cb; + delete _useCaseBuilder; +} //============================================================================ /*! Function : GetPersistentReference * Purpose : Get persistent reference of study (idem URL()) */ //============================================================================ -string SALOMEDSImpl_Study::GetPersistentReference() +std::string SALOMEDSImpl_Study::GetPersistentReference() { _errorCode = ""; return URL(); @@ -96,10 +106,10 @@ string SALOMEDSImpl_Study::GetPersistentReference() * Purpose : Get IOR of the Study (registred in Document in doc->Root) */ //============================================================================ -string SALOMEDSImpl_Study::GetTransientReference() +std::string SALOMEDSImpl_Study::GetTransientReference() { _errorCode = ""; - string IOR = ""; + std::string IOR = ""; SALOMEDSImpl_AttributeIOR* Att; DF_Label _lab = _doc->Root(); @@ -113,7 +123,7 @@ string SALOMEDSImpl_Study::GetTransientReference() return IOR; } -void SALOMEDSImpl_Study::SetTransientReference(const string& theIOR) +void SALOMEDSImpl_Study::SetTransientReference(const std::string& theIOR) { _errorCode = ""; @@ -144,11 +154,11 @@ bool SALOMEDSImpl_Study::IsEmpty() * Purpose : Find a Component with ComponentDataType = aComponentName */ //============================================================================ -SALOMEDSImpl_SComponent SALOMEDSImpl_Study::FindComponent (const string& aComponentName) +SALOMEDSImpl_SComponent SALOMEDSImpl_Study::FindComponent (const std::string& aComponentName) { _errorCode = ""; bool _find = false; - string name; + std::string name; SALOMEDSImpl_SComponentIterator itcomp = NewComponentIterator(); SALOMEDSImpl_SComponent compo; @@ -174,14 +184,14 @@ SALOMEDSImpl_SComponent SALOMEDSImpl_Study::FindComponent (const string& aCompon * Purpose : Find a Component from it's ID */ //============================================================================ -SALOMEDSImpl_SComponent SALOMEDSImpl_Study::FindComponentID(const string& aComponentID) +SALOMEDSImpl_SComponent SALOMEDSImpl_Study::FindComponentID(const std::string& aComponentID) { _errorCode = ""; // Iterate on each components defined in the study // Get the component ID and compare with aComponentID bool _find = false; - string ID; + std::string ID; SALOMEDSImpl_SComponent compo; SALOMEDSImpl_SComponentIterator itcomp = NewComponentIterator(); @@ -190,8 +200,8 @@ SALOMEDSImpl_SComponent SALOMEDSImpl_Study::FindComponentID(const string& aCompo ID = SC.GetID(); if(aComponentID == ID) { - // ComponentID found - _find = true; + // ComponentID found + _find = true; compo = SC; } } @@ -209,7 +219,7 @@ SALOMEDSImpl_SComponent SALOMEDSImpl_Study::FindComponentID(const string& aCompo * Purpose : Find an Object with SALOMEDSImpl_Name = anObjectName */ //============================================================================ -SALOMEDSImpl_SObject SALOMEDSImpl_Study::FindObject(const string& anObjectName) +SALOMEDSImpl_SObject SALOMEDSImpl_Study::FindObject(const std::string& anObjectName) { _errorCode = ""; @@ -223,14 +233,14 @@ SALOMEDSImpl_SObject SALOMEDSImpl_Study::FindObject(const string& anObjectName) for (; it.More();it.Next()){ if(!_find) { - SALOMEDSImpl_SComponent SC = it.Value(); - if (SC.GetName() == anObjectName) - { - _find = true; - RefSO = SC; - - } - if (!_find) RefSO = _FindObject(SC, anObjectName, _find); + SALOMEDSImpl_SComponent SC = it.Value(); + if (SC.GetName() == anObjectName) + { + _find = true; + RefSO = SC; + + } + if (!_find) RefSO = _FindObject(SC, anObjectName, _find); } } if(!RefSO) _errorCode = "No object was found"; @@ -242,11 +252,11 @@ SALOMEDSImpl_SObject SALOMEDSImpl_Study::FindObject(const string& anObjectName) * Purpose : Find an Object with ID = anObjectID */ //============================================================================ -SALOMEDSImpl_SObject SALOMEDSImpl_Study::FindObjectID(const string& anObjectID) +SALOMEDSImpl_SObject SALOMEDSImpl_Study::FindObjectID(const std::string& anObjectID) { _errorCode = ""; SALOMEDSImpl_SObject so; - + // Convert aSO->GetID in DF_Label. DF_Label Lab = DF_Label::Label(_doc->Main(), anObjectID, false); @@ -263,7 +273,7 @@ SALOMEDSImpl_SObject SALOMEDSImpl_Study::FindObjectID(const string& anObjectID) * Purpose : Creates an Object with ID = anObjectID */ //============================================================================ -SALOMEDSImpl_SObject SALOMEDSImpl_Study::CreateObjectID(const string& anObjectID) +SALOMEDSImpl_SObject SALOMEDSImpl_Study::CreateObjectID(const std::string& anObjectID) { _errorCode = ""; SALOMEDSImpl_SObject so; @@ -285,12 +295,12 @@ SALOMEDSImpl_SObject SALOMEDSImpl_Study::CreateObjectID(const string& anObjectID * : with ComponentDataType = aComponentName */ //============================================================================ -vector SALOMEDSImpl_Study::FindObjectByName(const string& anObjectName, - const string& aComponentName) +std::vector SALOMEDSImpl_Study::FindObjectByName(const std::string& anObjectName, + const std::string& aComponentName) { _errorCode = ""; - vector listSO; + std::vector listSO; SALOMEDSImpl_SComponent compo = FindComponent(aComponentName) ; if ( !compo ) { @@ -300,16 +310,16 @@ vector SALOMEDSImpl_Study::FindObjectByName(const string& // Iterate on each object and subobject of the component // If objectName is found add it to the list of SObjects - string childName ; + std::string childName ; - string compoId = compo.GetID(); + std::string compoId = compo.GetID(); SALOMEDSImpl_ChildIterator it = NewChildIterator(compo); for ( ; it.More(); it.Next() ) { SALOMEDSImpl_SObject CSO = it.Value(); if ( CSO.GetName() == anObjectName ) { - /* add to list */ - listSO.push_back(CSO) ; + /* add to list */ + listSO.push_back(CSO) ; } /* looks also for eventual children */ @@ -330,22 +340,23 @@ vector SALOMEDSImpl_Study::FindObjectByName(const string& * Purpose : Find an Object with IOR = anObjectIOR */ //============================================================================ -SALOMEDSImpl_SObject SALOMEDSImpl_Study::FindObjectIOR(const string& anObjectIOR) +SALOMEDSImpl_SObject SALOMEDSImpl_Study::FindObjectIOR(const std::string& anObjectIOR) { _errorCode = ""; - + SALOMEDSImpl_SObject aResult ; - + // searching in the datamap for optimization - if (myIORLabels.find(anObjectIOR) != myIORLabels.end()) { - aResult = GetSObject(myIORLabels[anObjectIOR]); + std::map::iterator it=myIORLabels.find(anObjectIOR); + if (it != myIORLabels.end()) { + aResult = GetSObject(it->second); // 11 oct 2002: forbidden attributes must be checked here if (!aResult.GetLabel().IsAttribute(SALOMEDSImpl_AttributeIOR::GetID())) { myIORLabels.erase(anObjectIOR); - aResult = SALOMEDSImpl_SObject(); - } + aResult = SALOMEDSImpl_SObject(); + } } - + if(!aResult) _errorCode = "No object was found"; return aResult; } @@ -355,11 +366,11 @@ SALOMEDSImpl_SObject SALOMEDSImpl_Study::FindObjectIOR(const string& anObjectIOR * Purpose : Find an Object by its path = thePath */ //============================================================================ -SALOMEDSImpl_SObject SALOMEDSImpl_Study::FindObjectByPath(const string& thePath) +SALOMEDSImpl_SObject SALOMEDSImpl_Study::FindObjectByPath(const std::string& thePath) { _errorCode = ""; - string aPath(thePath), aToken; + std::string aPath(thePath), aToken; SALOMEDSImpl_SObject aSO; int aLength = aPath.size(); bool isRelative = false; @@ -386,7 +397,7 @@ SALOMEDSImpl_SObject SALOMEDSImpl_Study::FindObjectByPath(const string& thePath) anIterator.Init(_doc->Main(), false); } - vector vs = SALOMEDSImpl_Tool::splitString(aPath, '/'); + std::vector vs = SALOMEDSImpl_Tool::splitString(aPath, '/'); for(int i = 0, len = vs.size(); iValue() == aToken) { - if(i == (len-1)) { //The searched label is found (no part of the path is left) - return GetSObject(aLabel); - } - - anIterator.Init(aLabel, false); - break; - } + if(anAttr->Value() == aToken) { + if(i == (len-1)) { //The searched label is found (no part of the path is left) + return GetSObject(aLabel); + } + + anIterator.Init(aLabel, false); + break; + } } } @@ -417,19 +428,19 @@ SALOMEDSImpl_SObject SALOMEDSImpl_Study::FindObjectByPath(const string& thePath) * Purpose : */ //============================================================================ -string SALOMEDSImpl_Study::GetObjectPath(const SALOMEDSImpl_SObject& theObject) +std::string SALOMEDSImpl_Study::GetObjectPath(const SALOMEDSImpl_SObject& theObject) { _errorCode = ""; - string aPath(""); + std::string aPath(""); if(!theObject) { _errorCode = "Null object"; return aPath; } - string aName = theObject.GetName(); + std::string aName = theObject.GetName(); if(!aName.empty() && aName != "" ) { - string aValue("/"); + std::string aValue("/"); aValue+=aName; aValue += aPath; aPath = aValue; @@ -437,8 +448,8 @@ string SALOMEDSImpl_Study::GetObjectPath(const SALOMEDSImpl_SObject& theObject) if(aFather) { aName = aFather.GetName(); if(!aName.empty() && aName != "") { - aValue = GetObjectPath(aFather); - aPath = aValue + aPath; + aValue = GetObjectPath(aFather); + aPath = aValue + aPath; } } } @@ -452,11 +463,11 @@ string SALOMEDSImpl_Study::GetObjectPath(const SALOMEDSImpl_SObject& theObject) * Purpose : */ //============================================================================ -string SALOMEDSImpl_Study::GetObjectPathByIOR(const string& theIOR) +std::string SALOMEDSImpl_Study::GetObjectPathByIOR(const std::string& theIOR) { _errorCode = ""; - string aPath; + std::string aPath; SALOMEDSImpl_SObject so = FindObjectIOR(theIOR); if(!so) { _errorCode = "No SObject was found by IOR"; @@ -472,7 +483,7 @@ string SALOMEDSImpl_Study::GetObjectPathByIOR(const string& theIOR) * Purpose : Sets the current context */ //============================================================================ -bool SALOMEDSImpl_Study::SetContext(const string& thePath) +bool SALOMEDSImpl_Study::SetContext(const std::string& thePath) { _errorCode = ""; if(thePath.empty()) { @@ -480,7 +491,7 @@ bool SALOMEDSImpl_Study::SetContext(const string& thePath) return false; } - string aPath(thePath), aContext(""); + std::string aPath(thePath), aContext(""); bool isInvalid = false; SALOMEDSImpl_SObject aSO; @@ -520,7 +531,7 @@ bool SALOMEDSImpl_Study::SetContext(const string& thePath) * Purpose : Gets the current context */ //============================================================================ -string SALOMEDSImpl_Study::GetContext() +std::string SALOMEDSImpl_Study::GetContext() { _errorCode = ""; @@ -537,11 +548,11 @@ string SALOMEDSImpl_Study::GetContext() * Purpose : method to get all object names in the given context (or in the current context, if 'theContext' is empty) */ //============================================================================ -vector SALOMEDSImpl_Study::GetObjectNames(const string& theContext) +std::vector SALOMEDSImpl_Study::GetObjectNames(const std::string& theContext) { _errorCode = ""; - vector aResultSeq; + std::vector aResultSeq; DF_Label aLabel; if (theContext.empty()) { aLabel = _current; @@ -560,7 +571,7 @@ vector SALOMEDSImpl_Study::GetObjectNames(const string& theContext) for (; anIter.More(); anIter.Next()) { DF_Label aLabel = anIter.Value(); SALOMEDSImpl_AttributeName* aName; - if ((aName=(SALOMEDSImpl_AttributeName*)aLabel.FindAttribute(SALOMEDSImpl_AttributeName::GetID()))) + if ((aName=(SALOMEDSImpl_AttributeName*)aLabel.FindAttribute(SALOMEDSImpl_AttributeName::GetID()))) aResultSeq.push_back(aName->Value()); } @@ -572,11 +583,11 @@ vector SALOMEDSImpl_Study::GetObjectNames(const string& theContext) * Purpose : method to get all directory names in the given context (or in the current context, if 'theContext' is empty) */ //============================================================================ -vector SALOMEDSImpl_Study::GetDirectoryNames(const string& theContext) +std::vector SALOMEDSImpl_Study::GetDirectoryNames(const std::string& theContext) { _errorCode = ""; - vector aResultSeq; + std::vector aResultSeq; DF_Label aLabel; if (theContext.empty()) { aLabel = _current; @@ -597,10 +608,10 @@ vector SALOMEDSImpl_Study::GetDirectoryNames(const string& theContext) SALOMEDSImpl_AttributeLocalID* anID; if ((anID=(SALOMEDSImpl_AttributeLocalID*)aLabel.FindAttribute(SALOMEDSImpl_AttributeLocalID::GetID()))) { if (anID->Value() == DIRECTORYID) { - SALOMEDSImpl_AttributeName* aName; - if ((aName=(SALOMEDSImpl_AttributeName*)aLabel.FindAttribute(SALOMEDSImpl_AttributeName::GetID()))) { - aResultSeq.push_back(aName->Value()); - } + SALOMEDSImpl_AttributeName* aName; + if ((aName=(SALOMEDSImpl_AttributeName*)aLabel.FindAttribute(SALOMEDSImpl_AttributeName::GetID()))) { + aResultSeq.push_back(aName->Value()); + } } } } @@ -613,11 +624,11 @@ vector SALOMEDSImpl_Study::GetDirectoryNames(const string& theContext) * Purpose : method to get all file names in the given context (or in the current context, if 'theContext' is empty) */ //============================================================================ -vector SALOMEDSImpl_Study::GetFileNames(const string& theContext) +std::vector SALOMEDSImpl_Study::GetFileNames(const std::string& theContext) { _errorCode = ""; - vector aResultSeq; + std::vector aResultSeq; DF_Label aLabel; if (theContext.empty()) { aLabel = _current; @@ -638,12 +649,12 @@ vector SALOMEDSImpl_Study::GetFileNames(const string& theContext) SALOMEDSImpl_AttributeLocalID* anID; if ((anID=(SALOMEDSImpl_AttributeLocalID*)aLabel.FindAttribute(SALOMEDSImpl_AttributeLocalID::GetID()))) { if (anID->Value() == FILELOCALID) { - SALOMEDSImpl_AttributePersistentRef* aName; - if ((aName=(SALOMEDSImpl_AttributePersistentRef*)aLabel.FindAttribute(SALOMEDSImpl_AttributePersistentRef::GetID()))) { - std::string aFileName = aName->Value(); - if (aFileName.size() > 0) - aResultSeq.push_back(aFileName.substr(strlen(FILEID), aFileName.size())); - } + SALOMEDSImpl_AttributePersistentRef* aName; + if ((aName=(SALOMEDSImpl_AttributePersistentRef*)aLabel.FindAttribute(SALOMEDSImpl_AttributePersistentRef::GetID()))) { + std::string aFileName = aName->Value(); + if (aFileName.size() > 0) + aResultSeq.push_back(aFileName.substr(strlen(FILEID), aFileName.size())); + } } } } @@ -656,16 +667,16 @@ vector SALOMEDSImpl_Study::GetFileNames(const string& theContext) * Purpose : method to get all components names */ //============================================================================ -vector SALOMEDSImpl_Study::GetComponentNames(const string& theContext) +std::vector SALOMEDSImpl_Study::GetComponentNames(const std::string& theContext) { _errorCode = ""; - vector aResultSeq; + std::vector aResultSeq; DF_ChildIterator anIter(_doc->Main(), false); // iterate all subchildren at first level for(; anIter.More(); anIter.Next()) { DF_Label aLabel = anIter.Value(); SALOMEDSImpl_AttributeName* aName; - if ((aName=(SALOMEDSImpl_AttributeName*)aLabel.FindAttribute(SALOMEDSImpl_AttributeName::GetID()))) + if ((aName=(SALOMEDSImpl_AttributeName*)aLabel.FindAttribute(SALOMEDSImpl_AttributeName::GetID()))) aResultSeq.push_back(aName->Value()); } @@ -717,7 +728,7 @@ SALOMEDSImpl_StudyBuilder* SALOMEDSImpl_Study::NewBuilder() * Purpose : get study name */ //============================================================================ -string SALOMEDSImpl_Study::Name() +std::string SALOMEDSImpl_Study::Name() { _errorCode = ""; return _name; @@ -728,7 +739,7 @@ string SALOMEDSImpl_Study::Name() * Purpose : set study name */ //============================================================================ -void SALOMEDSImpl_Study::Name(const string& name) +void SALOMEDSImpl_Study::Name(const std::string& name) { _errorCode = ""; _name = name; @@ -767,7 +778,7 @@ bool SALOMEDSImpl_Study::IsModified() _errorCode = ""; // True if is modified - if (_doc->IsModified()) return true; + if (_doc && _doc->IsModified()) return true; return false; } @@ -777,7 +788,7 @@ bool SALOMEDSImpl_Study::IsModified() * Purpose : get URL of the study (persistent reference of the study) */ //============================================================================ -string SALOMEDSImpl_Study::URL() +std::string SALOMEDSImpl_Study::URL() { _errorCode = ""; return _URL; @@ -788,13 +799,13 @@ string SALOMEDSImpl_Study::URL() * Purpose : set URL of the study (persistent reference of the study) */ //============================================================================ -void SALOMEDSImpl_Study::URL(const string& url) +void SALOMEDSImpl_Study::URL(const std::string& url) { _errorCode = ""; _URL = url; /*jfa: Now name of SALOMEDS study will correspond to name of SalomeApp study - string tmp(_URL); + std::string tmp(_URL); char *aName = (char*)tmp.ToCString(); char *adr = strtok(aName, "/"); @@ -814,8 +825,8 @@ void SALOMEDSImpl_Study::URL(const string& url) */ //============================================================================ SALOMEDSImpl_SObject SALOMEDSImpl_Study::_FindObject(const SALOMEDSImpl_SObject& SO, - const string& theObjectName, - bool& _find) + const std::string& theObjectName, + bool& _find) { SALOMEDSImpl_SObject RefSO; if(!SO) return RefSO; @@ -824,21 +835,21 @@ SALOMEDSImpl_SObject SALOMEDSImpl_Study::_FindObject(const SALOMEDSImpl_SObject& // If objectName find, stop the loop and get the object reference SALOMEDSImpl_AttributeName* anAttr; - string soid = SO.GetID(); + std::string soid = SO.GetID(); DF_ChildIterator it(SO.GetLabel()); for (; it.More(); it.Next()){ if(!_find) { - if ((anAttr=(SALOMEDSImpl_AttributeName*)it.Value().FindAttribute(SALOMEDSImpl_AttributeName::GetID()))) - { - string Val(anAttr->Value()); - if (Val == theObjectName) - { - RefSO = GetSObject(it.Value()); - _find = true; - } - } - if (!_find) RefSO = _FindObject(GetSObject(it.Value()), theObjectName, _find); + if ((anAttr=(SALOMEDSImpl_AttributeName*)it.Value().FindAttribute(SALOMEDSImpl_AttributeName::GetID()))) + { + std::string Val(anAttr->Value()); + if (Val == theObjectName) + { + RefSO = GetSObject(it.Value()); + _find = true; + } + } + if (!_find) RefSO = _FindObject(GetSObject(it.Value()), theObjectName, _find); } } return RefSO; @@ -851,8 +862,8 @@ SALOMEDSImpl_SObject SALOMEDSImpl_Study::_FindObject(const SALOMEDSImpl_SObject& //============================================================================ SALOMEDSImpl_SObject SALOMEDSImpl_Study::_FindObjectIOR(const SALOMEDSImpl_SObject& SO, - const string& theObjectIOR, - bool& _find) + const std::string& theObjectIOR, + bool& _find) { SALOMEDSImpl_SObject RefSO, aSO; if(!SO) return RefSO; @@ -865,17 +876,17 @@ SALOMEDSImpl_Study::_FindObjectIOR(const SALOMEDSImpl_SObject& SO, for (; it.More();it.Next()){ if(!_find) { - if ((anAttr=(SALOMEDSImpl_AttributeIOR*)it.Value().FindAttribute(SALOMEDSImpl_AttributeIOR::GetID()))) - { - string Val(anAttr->Value()); - if (Val == theObjectIOR) - { - RefSO = GetSObject(it.Value()); - _find = true; - } - } - aSO = GetSObject(it.Value()); - if (!_find) RefSO = _FindObjectIOR(aSO, theObjectIOR, _find); + if ((anAttr=(SALOMEDSImpl_AttributeIOR*)it.Value().FindAttribute(SALOMEDSImpl_AttributeIOR::GetID()))) + { + std::string Val(anAttr->Value()); + if (Val == theObjectIOR) + { + RefSO = GetSObject(it.Value()); + _find = true; + } + } + aSO = GetSObject(it.Value()); + if (!_find) RefSO = _FindObjectIOR(aSO, theObjectIOR, _find); } } return RefSO; @@ -886,35 +897,37 @@ SALOMEDSImpl_Study::_FindObjectIOR(const SALOMEDSImpl_SObject& SO, * Purpose : Find an Object with SALOMEDSImpl_IOR = anObjectIOR */ //============================================================================ -string SALOMEDSImpl_Study::_GetNoteBookAccessor(){ - return string("notebook"); +std::string SALOMEDSImpl_Study::_GetNoteBookAccessor(){ + return std::string("notebook"); } //============================================================================ /*! Function : _GetStudyVariablesScript - * Purpose : + * Purpose : */ //============================================================================ -string SALOMEDSImpl_Study::_GetStudyVariablesScript() +std::string SALOMEDSImpl_Study::_GetStudyVariablesScript() { - string dump(""); - + std::string dump(""); + if(myNoteBookVars.empty()) return dump; - + + Kernel_Utils::Localizer loc; + dump += "####################################################\n"; dump += "## Begin of NoteBook variables section ##\n"; dump += "####################################################\n"; - string set_method = _GetNoteBookAccessor()+".set("; - string varName; - string varValue; + std::string set_method = _GetNoteBookAccessor()+".set("; + std::string varName; + std::string varValue; for(int i = 0 ; i < myNoteBookVars.size();i++ ) { varName = myNoteBookVars[i]->Name(); varValue = myNoteBookVars[i]->SaveToScript(); dump+=set_method+"\""+varName+"\", "+varValue+")\n"; } - + dump += "####################################################\n"; dump += "## End of NoteBook variables section ##\n"; dump += "####################################################\n"; @@ -927,12 +940,12 @@ string SALOMEDSImpl_Study::_GetStudyVariablesScript() * Purpose : */ //============================================================================ -string SALOMEDSImpl_Study::_GetNoteBookAccess() +std::string SALOMEDSImpl_Study::_GetNoteBookAccess() { - string accessor = _GetNoteBookAccessor(); - string notebook = "import salome_notebook\n"; - notebook += accessor+" = salome_notebook."+accessor + "\n"; - return notebook; + std::string accessor = _GetNoteBookAccessor(); + std::string notebook = "import salome_notebook\n"; + notebook += accessor+" = salome_notebook."+accessor + "\n"; + return notebook; } bool SALOMEDSImpl_Study::IsLocked() @@ -953,14 +966,25 @@ void SALOMEDSImpl_Study::StudyId(int id) _StudyId = id; } -void SALOMEDSImpl_Study::UpdateIORLabelMap(const string& anIOR,const string& anEntry) +void SALOMEDSImpl_Study::UpdateIORLabelMap(const std::string& anIOR,const std::string& anEntry) { _errorCode = ""; DF_Label aLabel = DF_Label::Label(_doc->Main(), anEntry, true); - if (myIORLabels.find(anIOR) != myIORLabels.end()) myIORLabels.erase(anIOR); + std::map::iterator it=myIORLabels.find(anIOR); + if (it != myIORLabels.end()) myIORLabels.erase(it); myIORLabels[anIOR] = aLabel; } +void SALOMEDSImpl_Study::DeleteIORLabelMapItem(const std::string& anIOR) +{ + std::map::iterator it=myIORLabels.find(anIOR); + if (it != myIORLabels.end()) + { + //remove the ior entry and decref the genericobj (if it's one) + myIORLabels.erase(it); + } +} + SALOMEDSImpl_Study* SALOMEDSImpl_Study::GetStudy(const DF_Label& theLabel) { SALOMEDSImpl_StudyHandle* Att; @@ -983,14 +1007,14 @@ SALOMEDSImpl_SComponent SALOMEDSImpl_Study::SComponent(const DF_Label& theLabel) void SALOMEDSImpl_Study::IORUpdated(const SALOMEDSImpl_AttributeIOR* theAttribute) { - string aString = theAttribute->Label().Entry(); + std::string aString = theAttribute->Label().Entry(); GetStudy(theAttribute->Label())->UpdateIORLabelMap(theAttribute->Value(), aString); } -vector SALOMEDSImpl_Study::FindDependances(const SALOMEDSImpl_SObject& anObject) +std::vector SALOMEDSImpl_Study::FindDependances(const SALOMEDSImpl_SObject& anObject) { _errorCode = ""; - vector aSeq; + std::vector aSeq; SALOMEDSImpl_AttributeTarget* aTarget; if ((aTarget=(SALOMEDSImpl_AttributeTarget*)anObject.GetLabel().FindAttribute(SALOMEDSImpl_AttributeTarget::GetID()))) { @@ -1007,13 +1031,13 @@ SALOMEDSImpl_AttributeStudyProperties* SALOMEDSImpl_Study::GetProperties() return SALOMEDSImpl_AttributeStudyProperties::Set(_doc->Main()); } -string SALOMEDSImpl_Study::GetLastModificationDate() +std::string SALOMEDSImpl_Study::GetLastModificationDate() { _errorCode = ""; SALOMEDSImpl_AttributeStudyProperties* aProp = GetProperties(); - vector aNames; - vector aMinutes, aHours, aDays, aMonths, aYears; + std::vector aNames; + std::vector aMinutes, aHours, aDays, aMonths, aYears; aProp->GetModifications(aNames, aMinutes, aHours, aDays, aMonths, aYears); int aLastIndex = aNames.size()-1; @@ -1021,27 +1045,27 @@ string SALOMEDSImpl_Study::GetLastModificationDate() sprintf(aResult, "%2.2d/%2.2d/%4.4d %2.2d:%2.2d", (int)(aDays[aLastIndex]),(int)(aMonths[aLastIndex]), (int)(aYears[aLastIndex]), (int)(aHours[aLastIndex]), (int)(aMinutes[aLastIndex])); - string aResStr (aResult); + std::string aResStr (aResult); return aResStr; } -vector SALOMEDSImpl_Study::GetModificationsDate() +std::vector SALOMEDSImpl_Study::GetModificationsDate() { _errorCode = ""; SALOMEDSImpl_AttributeStudyProperties* aProp = GetProperties(); - vector aNames; - vector aMinutes, aHours, aDays, aMonths, aYears; + std::vector aNames; + std::vector aMinutes, aHours, aDays, aMonths, aYears; aProp->GetModifications(aNames, aMinutes, aHours, aDays, aMonths, aYears); int anIndex, aLength = aNames.size(); - vector aDates; + std::vector aDates; for (anIndex = 1; anIndex < aLength; anIndex++) { char aDate[20]; sprintf(aDate, "%2.2d/%2.2d/%4.4d %2.2d:%2.2d", (int)(aDays[anIndex]), (int)(aMonths[anIndex]), (int)(aYears[anIndex]), - (int)(aHours[anIndex]), (int)(aMinutes[anIndex])); + (int)(aHours[anIndex]), (int)(aMinutes[anIndex])); aDates.push_back(aDate); } return aDates; @@ -1081,7 +1105,7 @@ void SALOMEDSImpl_Study::Close() * Purpose : */ //============================================================================ -SALOMEDSImpl_SComponent SALOMEDSImpl_Study::GetSComponent(const string& theEntry) +SALOMEDSImpl_SComponent SALOMEDSImpl_Study::GetSComponent(const std::string& theEntry) { SALOMEDSImpl_SComponent aSCO; if(_mapOfSCO.find(theEntry) != _mapOfSCO.end()) @@ -1110,11 +1134,12 @@ SALOMEDSImpl_SComponent SALOMEDSImpl_Study::GetSComponent(const DF_Label& theLab * Purpose : */ //============================================================================ -SALOMEDSImpl_SObject SALOMEDSImpl_Study::GetSObject(const string& theEntry) +SALOMEDSImpl_SObject SALOMEDSImpl_Study::GetSObject(const std::string& theEntry) { SALOMEDSImpl_SObject aSO; - if(_mapOfSO.find(theEntry) != _mapOfSO.end()) - aSO = _mapOfSO[theEntry]; + std::map::iterator it=_mapOfSO.find(theEntry); + if(it != _mapOfSO.end()) + aSO = it->second; else { DF_Label aLabel = DF_Label::Label(_doc->Main(), theEntry); aSO = SALOMEDSImpl_SObject(aLabel); @@ -1139,8 +1164,8 @@ SALOMEDSImpl_SObject SALOMEDSImpl_Study::GetSObject(const DF_Label& theLabel) * Purpose : */ //============================================================================ -DF_Attribute* SALOMEDSImpl_Study::GetAttribute(const string& theEntry, - const string& theType) +DF_Attribute* SALOMEDSImpl_Study::GetAttribute(const std::string& theEntry, + const std::string& theType) { SALOMEDSImpl_SObject aSO = GetSObject(theEntry); DF_Attribute* anAttr; @@ -1148,15 +1173,41 @@ DF_Attribute* SALOMEDSImpl_Study::GetAttribute(const string& theEntry, return anAttr; } +//! number of spaces for indentation in Python dump files (to replace \t symbols) +static const int indent_size = 2; + +static std::string replace_tabs( const std::string& in ) +{ + std::string out = in; +#ifdef WITHOUT_TABS + size_t pos = out.find( '\t' ); + while ( pos != std::string::npos ) { + out.replace( pos, 1, indent_size, ' ' ); + pos = out.find( '\t' ); + } +#endif + return out; +} + +static std::string GetComponentHeader(const char* theComponentName) +{ + std::stringstream txt; + txt << "###" << std::endl; + txt << "### " << theComponentName << " component" << std::endl; + txt << "###" << std::endl; + return txt.str(); +} + //============================================================================ /*! Function : DumpStudy * Purpose : */ //============================================================================ -bool SALOMEDSImpl_Study::DumpStudy(const string& thePath, - const string& theBaseName, - bool isPublished, - SALOMEDSImpl_DriverFactory* theFactory) +bool SALOMEDSImpl_Study::DumpStudy(const std::string& thePath, + const std::string& theBaseName, + bool isPublished, + bool isMultiFile, + SALOMEDSImpl_DriverFactory* theFactory) { _errorCode = ""; @@ -1165,8 +1216,8 @@ bool SALOMEDSImpl_Study::DumpStudy(const string& thePath, return false; } - vector aSeq; - string aCompType, aFactoryType; + std::vector aSeq; + std::string aCompType, aFactoryType; //Build a list of all components in the Study SALOMEDSImpl_SComponentIterator itcomponent = NewComponentIterator(); @@ -1182,16 +1233,16 @@ bool SALOMEDSImpl_Study::DumpStudy(const string& thePath, } #ifdef WIN32 - string aFileName = - thePath + string("\\") + theBaseName + string(".py"); + std::string aFileName = + thePath + std::string("\\") + theBaseName + std::string(".py"); #else - string aFileName = - thePath + string("/") + theBaseName + string(".py"); + std::string aFileName = + thePath + std::string("/") + theBaseName + std::string(".py"); #endif //Create a file that will contain a main Study script - fstream fp; - fp.open(aFileName.c_str(), ios::out); + std::fstream fp; + fp.open(aFileName.c_str(), std::ios::out); #ifdef WIN32 bool isOpened = fp.is_open(); @@ -1200,41 +1251,51 @@ bool SALOMEDSImpl_Study::DumpStudy(const string& thePath, #endif if(!isOpened) { - _errorCode = string("Can't create a file ")+aFileName; + _errorCode = std::string("Can't create a file ")+aFileName; return false; } - string aBatchModeScript = "salome"; + std::stringstream sfp; + + std::string aBatchModeScript = "salome"; //Output to the main Study script required Python modules import, //set sys.path and add a creation of the study. - fp << GetDumpStudyComment() << endl << endl; - fp << "import sys" << endl; - fp << "import " << aBatchModeScript << endl << endl; - fp << aBatchModeScript << ".salome_init()" << endl << endl; + // dump header + sfp << GetDumpStudyComment() << std::endl; - fp << _GetNoteBookAccess(); + // global imports + sfp << "import sys" << std::endl; + sfp << "import " << aBatchModeScript << std::endl << std::endl; - fp << "sys.path.insert( 0, \'" << thePath << "\')" << endl << endl; + // initialization function + sfp << aBatchModeScript << ".salome_init()" << std::endl; + if ( !isMultiFile ) + sfp << "theStudy = salome.myStudy" < 0) { - fp << SALOMEDSImpl_IParameters::getStudyScript(this, lastSavePoint) << endl << endl; + sfp << SALOMEDSImpl_IParameters::getStudyScript(this, lastSavePoint) << std::endl << std::endl; } } - - vector aSeqOfFileNames; + std::vector aSeqOfFileNames; - //Iterate all components and create the componponents specific scripts. + // dump all components and create the components specific scripts bool isOk = true; int aLength = aSeq.size(); for(int i = 1; i <= aLength; i++) { @@ -1243,25 +1304,25 @@ bool SALOMEDSImpl_Study::DumpStudy(const string& thePath, SALOMEDSImpl_SComponent sco = FindComponent(aCompType); SALOMEDSImpl_Driver* aDriver = NULL; // if there is an associated Engine call its method for saving - string IOREngine; + std::string IOREngine; try { if (!sco.ComponentIOR(IOREngine)) { - if (!aCompType.empty()) { - - aDriver = theFactory->GetDriverByType(aCompType); - - if (aDriver != NULL) { - SALOMEDSImpl_StudyBuilder* SB = NewBuilder(); - if(!SB->LoadWith(sco, aDriver)) { - _errorCode = SB->GetErrorCode(); - return false; - } - } - else continue; - } + if (!aCompType.empty()) { + + aDriver = theFactory->GetDriverByType(aCompType); + + if (aDriver != NULL) { + SALOMEDSImpl_StudyBuilder* SB = NewBuilder(); + if(!SB->LoadWith(sco, aDriver)) { + _errorCode = SB->GetErrorCode(); + return false; + } + } + else continue; + } } else { - aDriver = theFactory->GetDriverByIOR(IOREngine); + aDriver = theFactory->GetDriverByIOR(IOREngine); } } catch(...) { _errorCode = "Can not restore information to dump it"; @@ -1272,60 +1333,77 @@ bool SALOMEDSImpl_Study::DumpStudy(const string& thePath, bool isValidScript; long aStreamLength = 0; - SALOMEDSImpl_TMPFile* aStream = aDriver->DumpPython(this, isPublished, isValidScript, aStreamLength); + SALOMEDSImpl_TMPFile* aStream = aDriver->DumpPython(this, isPublished, isMultiFile, isValidScript, aStreamLength); if ( !isValidScript ) isOk = false; - //Create a file that will contain the component specific script - fstream fp2; + std::stringstream sfp2; + + //Output the Python script generated by the component in the newly created file. + if ( isMultiFile ) + sfp2 << GetDumpStudyComment( aCompType.c_str() ) << std::endl; + else + sfp2 << GetComponentHeader( aCompType.c_str() ) << std::endl; + sfp2 << aStream->Data(); + + if ( isMultiFile ) { + //Create a file that will contain the component specific script + std::fstream fp2; #ifdef WIN32 - aFileName=thePath+string("\\"); + aFileName=thePath+std::string("\\"); #else - aFileName=thePath+string("/"); + aFileName=thePath+std::string("/"); #endif - string aScriptName; - aScriptName += theBaseName; - aScriptName += "_"; - aScriptName += aCompType; - - aFileName += aScriptName+ string(".py"); - aSeqOfFileNames.push_back(aFileName); - - fp2.open(aFileName.c_str(), ios::out); - + std::string aScriptName; + aScriptName += theBaseName; + aScriptName += "_"; + aScriptName += aCompType; + + aFileName += aScriptName+ std::string(".py"); + aSeqOfFileNames.push_back(aFileName); + + fp2.open(aFileName.c_str(), std::ios::out); + #ifdef WIN32 - isOpened = fp2.is_open(); + isOpened = fp2.is_open(); #else - isOpened = fp2.rdbuf()->is_open(); + isOpened = fp2.rdbuf()->is_open(); #endif + + if(!isOpened) { + _errorCode = std::string("Can't create a file ")+aFileName; + SALOMEDSImpl_Tool::RemoveTemporaryFiles(thePath, aSeqOfFileNames, false); + return false; + } + + // replace '\t' symbols + fp2 << replace_tabs( sfp2.str() ); - if(!isOpened) { - _errorCode = string("Can't create a file ")+aFileName; - SALOMEDSImpl_Tool::RemoveTemporaryFiles(thePath, aSeqOfFileNames, false); - return false; - } + fp2.close(); - //Output the Python script generated by the component in the newly created file. - fp2 << aStream->Data(); - fp2.close(); + //Add to the main script a call to RebuildData of the generated by the component the Python script + sfp << "import " << aScriptName << std::endl; + sfp << aScriptName << ".RebuildData(" << aBatchModeScript << ".myStudy)" << std::endl; + } + else + sfp << sfp2.str(); if(aStream) delete aStream; - - //Add to the main script a call to RebuildData of the generated by the component the Python script - fp << "import " << aScriptName << endl; - fp << aScriptName << ".RebuildData(" << aBatchModeScript << ".myStudy)" << endl; } - fp << endl; - fp << "if salome.sg.hasDesktop():" << endl; - fp << "\tsalome.sg.updateObjBrowser(1)" << endl; + sfp << std::endl; + sfp << "if salome.sg.hasDesktop():" << std::endl; + sfp << "\tsalome.sg.updateObjBrowser(1)" << std::endl; if(isDumpVisuals) { //Output the call to Session's method restoreVisualState - fp << "\tiparameters.getSession().restoreVisualState(1)" << endl; + sfp << "\tiparameters.getSession().restoreVisualState(1)" << std::endl; } - + // replace '\t' symbols + fp << replace_tabs( sfp.str() ); + fp.close(); + return isOk; } @@ -1334,30 +1412,36 @@ bool SALOMEDSImpl_Study::DumpStudy(const string& thePath, //purpose : return a header comment for a DumpStudy script //======================================================================= -string SALOMEDSImpl_Study::GetDumpStudyComment(const char* theComponentName) +std::string SALOMEDSImpl_Study::GetDumpStudyComment(const char* theComponentName) { - string txt - ("### This file is generated by SALOME automatically by dump python functionality"); + std::stringstream txt; + txt << "# -*- coding: iso-8859-1 -*-" << std::endl << std::endl; + txt << "###" << std::endl; + txt << "### This file is generated automatically by SALOME v" + << KERNEL_VERSION_STR + << " with dump python functionality"; if ( theComponentName ) - txt += string(" of ") + (char*) theComponentName + " component"; - return txt; + txt << " (" << theComponentName << " component)"; + txt << std::endl; + txt << "###" << std::endl; + return txt.str(); } void dumpSO(const SALOMEDSImpl_SObject& theSO, - fstream& fp, - const string& Tab, - SALOMEDSImpl_Study* theStudy); + std::fstream& fp, + const std::string& Tab, + SALOMEDSImpl_Study* theStudy); //============================================================================ /*! Function : dump * Purpose : */ //============================================================================ -void SALOMEDSImpl_Study::dump(const string& theFileName) +void SALOMEDSImpl_Study::dump(const std::string& theFileName) { //Create a file that will contain a main Study script - fstream fp; - fp.open(theFileName.c_str(), ios::out); + std::fstream fp; + fp.open(theFileName.c_str(), std::ios::out); #ifdef WIN32 bool isOpened = fp.is_open(); @@ -1366,15 +1450,15 @@ void SALOMEDSImpl_Study::dump(const string& theFileName) #endif if(!isOpened) { - _errorCode = string("Can't create a file ")+theFileName; - cout << "### SALOMEDSImpl_Study::dump Error: " << _errorCode << endl; + _errorCode = std::string("Can't create a file ")+theFileName; + std::cout << "### SALOMEDSImpl_Study::dump Error: " << _errorCode << std::endl; return; } SALOMEDSImpl_SObject aSO = FindObjectID("0:1"); - fp << "0:1" << endl; + fp << "0:1" << std::endl; SALOMEDSImpl_ChildIterator Itr = NewChildIterator(aSO); - string aTab(" "); + std::string aTab(" "); for(; Itr.More(); Itr.Next()) { dumpSO(Itr.Value(), fp, aTab, this); } @@ -1384,13 +1468,13 @@ void SALOMEDSImpl_Study::dump(const string& theFileName) void dumpSO(const SALOMEDSImpl_SObject& theSO, - fstream& fp, - const string& Tab, - SALOMEDSImpl_Study* theStudy) + std::fstream& fp, + const std::string& Tab, + SALOMEDSImpl_Study* theStudy) { - string aTab(Tab), anID(theSO.GetID()); - fp << aTab << anID << endl; - vector attribs = theSO.GetLabel().GetAttributes(); + std::string aTab(Tab), anID(theSO.GetID()); + fp << aTab << anID << std::endl; + std::vector attribs = theSO.GetLabel().GetAttributes(); for(int i = 0; i(attribs[i]); @@ -1398,29 +1482,29 @@ void dumpSO(const SALOMEDSImpl_SObject& theSO, continue; } - string aType = anAttr->GetClassType(); + std::string aType = anAttr->GetClassType(); fp << Tab << " -- " << aType; - if(aType == string("AttributeReal")) { + if(aType == std::string("AttributeReal")) { fp << " : " << dynamic_cast(anAttr)->Value(); } - else if(aType == string("AttributeInteger")) { + else if(aType == std::string("AttributeInteger")) { fp << " : " << dynamic_cast(anAttr)->Value(); } - else if(aType == string("AttributeName")) { + else if(aType == std::string("AttributeName")) { fp << " : " << dynamic_cast(anAttr)->Value(); } - else if(aType == string("AttributeComment")) { + else if(aType == std::string("AttributeComment")) { fp << " : " << dynamic_cast(anAttr)->Value(); } - else if(aType == string("AttributeReference")) { + else if(aType == std::string("AttributeReference")) { fp << " : " << dynamic_cast(anAttr)->Save(); } - fp << endl; + fp << std::endl; } SALOMEDSImpl_ChildIterator Itr = theStudy->NewChildIterator(theSO); - string aNewTab(" "); + std::string aNewTab(" "); aNewTab+=aTab; for(; Itr.More(); Itr.Next()) { dumpSO(Itr.Value(), fp, aNewTab, theStudy); @@ -1436,18 +1520,30 @@ void SALOMEDSImpl_Study::Modify() } //============================================================================ -/*! Function : +/*! Function : * Purpose : */ //============================================================================ SALOMEDSImpl_AttributeParameter* SALOMEDSImpl_Study::GetCommonParameters(const char* theID, int theSavePoint) { - if (theSavePoint < 0) return NULL; + if (theSavePoint < -1) return NULL; SALOMEDSImpl_StudyBuilder* builder = NewBuilder(); SALOMEDSImpl_SObject so = FindComponent((char*)theID); if (!so) so = builder->NewComponent((char*)theID); SALOMEDSImpl_AttributeParameter* attParam = NULL; + if (theSavePoint == -1) { + int ctag = 1; + DF_Label savePointLabel = so.GetLabel().FindChild( ctag, /*create=*/0 ); + DF_Label prevPointLabel; + while ( !savePointLabel.IsNull() ) { + ctag++; + prevPointLabel = savePointLabel; + savePointLabel = so.GetLabel().FindChild( ctag, /*create=*/0 ); + } + if ( !prevPointLabel.IsNull() ) + so = GetSObject( prevPointLabel ); + } if (theSavePoint > 0) { // Try to find SObject that contains attribute parameter ... DF_Label savePointLabel = so.GetLabel().FindChild( theSavePoint, /*create=*/0 ); if ( !savePointLabel.IsNull() ) @@ -1460,7 +1556,7 @@ SALOMEDSImpl_AttributeParameter* SALOMEDSImpl_Study::GetCommonParameters(const c if (so) { builder->FindAttribute(so, A, "AttributeParameter"); if ( !A ) { // first call of GetCommonParameters on "Interface Applicative" component - A = builder->FindOrCreateAttribute(so, "AttributeParameter"); + A = builder->FindOrCreateAttribute(so, "AttributeParameter"); } attParam = dynamic_cast( A ); } @@ -1468,21 +1564,21 @@ SALOMEDSImpl_AttributeParameter* SALOMEDSImpl_Study::GetCommonParameters(const c } //============================================================================ -/*! Function : +/*! Function : * Purpose : */ //============================================================================ -SALOMEDSImpl_AttributeParameter* SALOMEDSImpl_Study::GetModuleParameters(const char* theID, - const char* theModuleName, - int theSavePoint) +SALOMEDSImpl_AttributeParameter* SALOMEDSImpl_Study::GetModuleParameters(const char* theID, + const char* theModuleName, + int theSavePoint) { - if(theSavePoint <= 0) return NULL; + if(theSavePoint < -1) return NULL; SALOMEDSImpl_AttributeParameter* main_ap = GetCommonParameters(theID, theSavePoint); SALOMEDSImpl_SObject main_so = main_ap->GetSObject(); SALOMEDSImpl_AttributeParameter* par = NULL; SALOMEDSImpl_ChildIterator it = NewChildIterator(main_so); - string moduleName(theModuleName); + std::string moduleName(theModuleName); for(; it.More(); it.Next()) { SALOMEDSImpl_SObject so(it.Value()); if((par=(SALOMEDSImpl_AttributeParameter*)so.GetLabel().FindAttribute(SALOMEDSImpl_AttributeParameter::GetID()))) { @@ -1525,10 +1621,10 @@ bool SALOMEDSImpl_Study::IsStudyLocked() //============================================================================ void SALOMEDSImpl_Study::UnLockStudy(const char* theLockerID) { - vector::iterator vsI = _lockers.begin(); + std::vector::iterator vsI = _lockers.begin(); int length = _lockers.size(); bool isFound = false; - string id(theLockerID); + std::string id(theLockerID); for(int i = 0; i SALOMEDSImpl_Study::GetLockerID() +std::vector SALOMEDSImpl_Study::GetLockerID() { return _lockers; } @@ -1553,13 +1649,13 @@ vector SALOMEDSImpl_Study::GetLockerID() * Purpose : */ //============================================================================ -void SALOMEDSImpl_Study::SetVariable(const string& theVarName, +void SALOMEDSImpl_Study::SetVariable(const std::string& theVarName, const double theValue, const SALOMEDSImpl_GenericVariable::VariableTypes theType) { bool modified = false; SALOMEDSImpl_GenericVariable* aGVar = GetVariable(theVarName); - + if( aGVar == NULL ) { SALOMEDSImpl_ScalarVariable* aSVar = new SALOMEDSImpl_ScalarVariable(theType, theVarName); @@ -1578,15 +1674,59 @@ void SALOMEDSImpl_Study::SetVariable(const string& theVarName, Modify(); } +//============================================================================ +/*! Function : SetStringVariable + * Purpose : + */ +//============================================================================ +void SALOMEDSImpl_Study::SetStringVariable(const std::string& theVarName, + const std::string& theValue, + const SALOMEDSImpl_GenericVariable::VariableTypes theType) +{ + bool modified = false; + SALOMEDSImpl_GenericVariable* aGVar = GetVariable(theVarName); + + if( aGVar == NULL ) { + + SALOMEDSImpl_ScalarVariable* aSVar = new SALOMEDSImpl_ScalarVariable(theType, theVarName); + + aSVar->setStringValue(theValue); + myNoteBookVars.push_back(aSVar); + modified = true; + } + else { + if(SALOMEDSImpl_ScalarVariable* aSVar = dynamic_cast(aGVar)) { + modified = aSVar->setStringValue(theValue) || modified; + modified = aSVar->setType(theType) || modified; + } + } + if(modified) + Modify(); +} + +//============================================================================ +/*! Function : SetStringVariableAsDouble + * Purpose : + */ +//============================================================================ +void SALOMEDSImpl_Study::SetStringVariableAsDouble(const std::string& theVarName, + const double theValue, + const SALOMEDSImpl_GenericVariable::VariableTypes theType) +{ + SALOMEDSImpl_GenericVariable* aGVar = GetVariable(theVarName); + if(SALOMEDSImpl_ScalarVariable* aSVar = dynamic_cast(aGVar)) + aSVar->setValue(theValue); +} + //============================================================================ /*! Function : GetReal * Purpose : */ //============================================================================ -double SALOMEDSImpl_Study::GetVariableValue(const string& theVarName) +double SALOMEDSImpl_Study::GetVariableValue(const std::string& theVarName) { SALOMEDSImpl_GenericVariable* aGVar = GetVariable(theVarName); - + if(aGVar != NULL ) if(SALOMEDSImpl_ScalarVariable* aSVar = dynamic_cast(aGVar)) return aSVar->getValue(); @@ -1594,20 +1734,36 @@ double SALOMEDSImpl_Study::GetVariableValue(const string& theVarName) return 0; } +//============================================================================ +/*! Function : GetString + * Purpose : + */ +//============================================================================ +std::string SALOMEDSImpl_Study::GetStringVariableValue(const std::string& theVarName) +{ + SALOMEDSImpl_GenericVariable* aGVar = GetVariable(theVarName); + + if(aGVar != NULL ) + if(SALOMEDSImpl_ScalarVariable* aSVar = dynamic_cast(aGVar)) + return aSVar->getStringValue(); + + return 0; +} + //============================================================================ /*! Function : IsTypeOf * Purpose : */ //============================================================================ -bool SALOMEDSImpl_Study::IsTypeOf(const string& theVarName, +bool SALOMEDSImpl_Study::IsTypeOf(const std::string& theVarName, SALOMEDSImpl_GenericVariable:: VariableTypes theType) const { SALOMEDSImpl_GenericVariable* aGVar = GetVariable(theVarName); - + if(aGVar != NULL ) return aGVar->Type() == theType; - + return false; } @@ -1616,7 +1772,7 @@ bool SALOMEDSImpl_Study::IsTypeOf(const string& theVarName, * Purpose : */ //============================================================================ -bool SALOMEDSImpl_Study::IsVariable(const string& theVarName) const +bool SALOMEDSImpl_Study::IsVariable(const std::string& theVarName) const { SALOMEDSImpl_GenericVariable* aGVar = GetVariable(theVarName); return (aGVar != NULL); @@ -1627,13 +1783,13 @@ bool SALOMEDSImpl_Study::IsVariable(const string& theVarName) const * Purpose : */ //============================================================================ -vector SALOMEDSImpl_Study::GetVariableNames() const +std::vector SALOMEDSImpl_Study::GetVariableNames() const { - vector aResult; + std::vector aResult; for(int i = 0; i < myNoteBookVars.size(); i++) aResult.push_back(myNoteBookVars[i]->Name()); - + return aResult; } @@ -1659,7 +1815,7 @@ SALOMEDSImpl_GenericVariable* SALOMEDSImpl_Study::GetVariable(const std::string& if(theName.compare(myNoteBookVars[i]->Name()) == 0) { aResult = myNoteBookVars[i]; break; - } + } } return aResult; } @@ -1669,13 +1825,13 @@ SALOMEDSImpl_GenericVariable* SALOMEDSImpl_Study::GetVariable(const std::string& * Purpose : */ //============================================================================ -bool SALOMEDSImpl_Study::RemoveVariable(const string& theVarName) +bool SALOMEDSImpl_Study::RemoveVariable(const std::string& theVarName) { SALOMEDSImpl_GenericVariable* aVariable = GetVariable( theVarName ); if( !aVariable ) return false; - string aValue = aVariable->SaveToScript(); + std::string aValue = aVariable->SaveToScript(); ReplaceVariableAttribute( theVarName, aValue ); std::vector::iterator it = myNoteBookVars.begin(), itEnd = myNoteBookVars.end(); @@ -1698,7 +1854,7 @@ bool SALOMEDSImpl_Study::RemoveVariable(const string& theVarName) * Purpose : */ //============================================================================ -bool SALOMEDSImpl_Study::RenameVariable(const string& theVarName, const string& theNewVarName) +bool SALOMEDSImpl_Study::RenameVariable(const std::string& theVarName, const std::string& theNewVarName) { SALOMEDSImpl_GenericVariable* aVariable = GetVariable( theVarName ); if( !aVariable ) @@ -1726,7 +1882,7 @@ bool SALOMEDSImpl_Study::RenameVariable(const string& theVarName, const string& * Purpose : */ //============================================================================ -bool SALOMEDSImpl_Study::IsVariableUsed(const string& theVarName) +bool SALOMEDSImpl_Study::IsVariableUsed(const std::string& theVarName) { return FindVariableAttribute( theVarName ); } @@ -1737,8 +1893,8 @@ bool SALOMEDSImpl_Study::IsVariableUsed(const string& theVarName) */ //============================================================================ bool SALOMEDSImpl_Study::FindVariableAttribute(SALOMEDSImpl_StudyBuilder* theStudyBuilder, - SALOMEDSImpl_SObject theSObject, - const std::string& theName) + SALOMEDSImpl_SObject theSObject, + const std::string& theName) { SALOMEDSImpl_ChildIterator anIter = NewChildIterator( theSObject ); for( ; anIter.More(); anIter.Next() ) @@ -1750,18 +1906,18 @@ bool SALOMEDSImpl_Study::FindVariableAttribute(SALOMEDSImpl_StudyBuilder* theStu { if( SALOMEDSImpl_AttributeString* aStringAttr = ( SALOMEDSImpl_AttributeString* )anAttr ) { - string aString = aStringAttr->Value(); + std::string aString = aStringAttr->Value(); - vector< vector > aSections = ParseVariables( aString ); + std::vector< std::vector > aSections = ParseVariables( aString ); for( int i = 0, n = aSections.size(); i < n; i++ ) { - vector aVector = aSections[i]; - for( int j = 0, m = aVector.size(); j < m; j++ ) - { - string aStr = aVector[j]; - if( aStr.compare( theName ) == 0 ) - return true; - } + std::vector aVector = aSections[i]; + for( int j = 0, m = aVector.size(); j < m; j++ ) + { + std::string aStr = aVector[j]; + if( aStr.compare( theName ) == 0 ) + return true; + } } } } @@ -1792,9 +1948,9 @@ bool SALOMEDSImpl_Study::FindVariableAttribute(const std::string& theName) */ //============================================================================ void SALOMEDSImpl_Study::ReplaceVariableAttribute(SALOMEDSImpl_StudyBuilder* theStudyBuilder, - SALOMEDSImpl_SObject theSObject, - const std::string& theSource, - const std::string& theDest) + SALOMEDSImpl_SObject theSObject, + const std::string& theSource, + const std::string& theDest) { SALOMEDSImpl_ChildIterator anIter = NewChildIterator( theSObject ); for( ; anIter.More(); anIter.Next() ) @@ -1806,31 +1962,31 @@ void SALOMEDSImpl_Study::ReplaceVariableAttribute(SALOMEDSImpl_StudyBuilder* the if( SALOMEDSImpl_AttributeString* aStringAttr = ( SALOMEDSImpl_AttributeString* )anAttr ) { bool isChanged = false; - string aNewString, aCurrentString = aStringAttr->Value(); + std::string aNewString, aCurrentString = aStringAttr->Value(); - vector< vector > aSections = ParseVariables( aCurrentString ); + std::vector< std::vector > aSections = ParseVariables( aCurrentString ); for( int i = 0, n = aSections.size(); i < n; i++ ) { - vector aVector = aSections[i]; - for( int j = 0, m = aVector.size(); j < m; j++ ) - { - string aStr = aVector[j]; - if( aStr.compare( theSource ) == 0 ) - { - isChanged = true; - aStr = theDest; - } - - aNewString.append( aStr ); - if( j != m - 1 ) - aNewString.append( ":" ); - } - if( i != n - 1 ) - aNewString.append( "|" ); + std::vector aVector = aSections[i]; + for( int j = 0, m = aVector.size(); j < m; j++ ) + { + std::string aStr = aVector[j]; + if( aStr.compare( theSource ) == 0 ) + { + isChanged = true; + aStr = theDest; + } + + aNewString.append( aStr ); + if( j != m - 1 ) + aNewString.append( ":" ); + } + if( i != n - 1 ) + aNewString.append( "|" ); } if( isChanged ) - aStringAttr->SetValue( aNewString ); + aStringAttr->SetValue( aNewString ); } } } @@ -1856,7 +2012,7 @@ void SALOMEDSImpl_Study::ReplaceVariableAttribute(const std::string& theSource, * Purpose : */ //============================================================================ -vector< vector< string > > SALOMEDSImpl_Study::ParseVariables(const string& theVariables) const +std::vector< std::vector< std::string > > SALOMEDSImpl_Study::ParseVariables(const std::string& theVariables) const { return SALOMEDSImpl_Tool::splitStringWithEmpty( theVariables, OPERATION_SEPARATOR, VARIABLE_SEPARATOR ); } @@ -1867,8 +2023,8 @@ vector< vector< string > > SALOMEDSImpl_Study::ParseVariables(const string& theV */ //============================================================================ void SALOMEDSImpl_Study::EnableUseCaseAutoFilling(bool isEnabled) -{ - _errorCode = ""; _autoFill = isEnabled; +{ + _errorCode = ""; _autoFill = isEnabled; if(isEnabled) { _builder->SetOnAddSObject(_cb); _builder->SetOnRemoveSObject(_cb); @@ -1884,12 +2040,62 @@ void SALOMEDSImpl_Study::EnableUseCaseAutoFilling(bool isEnabled) * Purpose : */ //============================================================================ -vector SALOMEDSImpl_Study::GetIORs() +std::vector SALOMEDSImpl_Study::GetIORs() { - vector anIORs; - map::const_iterator MI; + std::vector anIORs; + std::map::const_iterator MI; for(MI = myIORLabels.begin(); MI!=myIORLabels.end(); MI++) anIORs.push_back(MI->first); return anIORs; } + +//============================================================================ +/*! Function : addSO_Notification + * Purpose : This function tells all the observers that a SO has been added + */ +//============================================================================ +bool SALOMEDSImpl_Study::addSO_Notification (const SALOMEDSImpl_SObject& theSObject) +{ + if(_notifier) + return _notifier->addSO_Notification(theSObject); + else + return false; +} + +//============================================================================ +/*! Function : removeSO_Notification + * Purpose : This function tells all the observers that a SO has been removed + */ +//============================================================================ +bool SALOMEDSImpl_Study::removeSO_Notification (const SALOMEDSImpl_SObject& theSObject) +{ + if(_notifier) + return _notifier->removeSO_Notification(theSObject); + else + return false; +} + +//============================================================================ +/*! Function : modifySO_Notification + * Purpose : This function tells all the observers that a SO has been modified and + pass the mofification reason + */ +//============================================================================ +bool SALOMEDSImpl_Study::modifySO_Notification (const SALOMEDSImpl_SObject& theSObject, int reason) +{ + if(_notifier) + return _notifier->modifySO_Notification(theSObject, reason); + else + return false; +} + +//============================================================================ +/*! Function : setNotifier + * Purpose : register a notifier + */ +//============================================================================ +void SALOMEDSImpl_Study::setNotifier(SALOMEDSImpl_AbstractCallback* notifier) +{ + _notifier=notifier; +} diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Study.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_Study.hxx index 8e29584c3..c53db253e 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Study.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Study.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_Study.hxx // Author : Sergey RUIN // Module : SALOME @@ -69,6 +70,7 @@ private: SALOMEDSImpl_Callback* _cb; SALOMEDSImpl_StudyBuilder* _builder; SALOMEDSImpl_UseCaseBuilder* _useCaseBuilder; + SALOMEDSImpl_AbstractCallback* _notifier; std::map _mapOfSO; std::map _mapOfSCO; @@ -196,6 +198,7 @@ public: virtual void StudyId(int id); + virtual void DeleteIORLabelMapItem(const std::string& anIOR); virtual void UpdateIORLabelMap(const std::string& anIOR, const std::string& aLabel); virtual std::vector FindDependances(const SALOMEDSImpl_SObject& anObject); @@ -220,14 +223,15 @@ public: virtual SALOMEDSImpl_SObject GetSObject(const std::string& theEntry); virtual SALOMEDSImpl_SObject GetSObject(const DF_Label& theEntryLabel); virtual DF_Attribute* GetAttribute(const std::string& theEntry, - const std::string& theType); + const std::string& theType); virtual bool HasCurrentContext() { return !_current.IsNull(); } virtual bool DumpStudy(const std::string& thePath, - const std::string& theBaseName, - bool isPublished, - SALOMEDSImpl_DriverFactory* theFactory); + const std::string& theBaseName, + bool isPublished, + bool isMultiFile, + SALOMEDSImpl_DriverFactory* theFactory); static std::string GetDumpStudyComment(const char* theComponentName = 0); @@ -242,8 +246,8 @@ public: SALOMEDSImpl_AttributeParameter* GetCommonParameters(const char* theID, int theSavePoint); SALOMEDSImpl_AttributeParameter* GetModuleParameters(const char* theID, - const char* theModuleName, - int theSavePoint); + const char* theModuleName, + int theSavePoint); //Locks the study, theLockerID is identificator of the of the one who locked the study for ex. IOR void SetStudyLock(const char* theLockerID); @@ -262,8 +266,18 @@ public: const double theValue, const SALOMEDSImpl_GenericVariable::VariableTypes); + void SetStringVariable(const std::string& theVarName, + const std::string& theValue, + const SALOMEDSImpl_GenericVariable::VariableTypes); + + void SetStringVariableAsDouble(const std::string& theVarName, + const double theValue, + const SALOMEDSImpl_GenericVariable::VariableTypes); + double GetVariableValue(const std::string& theVarName); + std::string GetStringVariableValue(const std::string& theVarName); + bool IsTypeOf(const std::string& theVarName, SALOMEDSImpl_GenericVariable::VariableTypes theType) const; @@ -283,14 +297,14 @@ public: bool IsVariableUsed(const std::string& theVarName); bool FindVariableAttribute(SALOMEDSImpl_StudyBuilder* theStudyBuilder, - SALOMEDSImpl_SObject theSObject, - const std::string& theName); + SALOMEDSImpl_SObject theSObject, + const std::string& theName); bool FindVariableAttribute(const std::string& theName); void ReplaceVariableAttribute(SALOMEDSImpl_StudyBuilder* theStudyBuilder, - SALOMEDSImpl_SObject theSObject, - const std::string& theSource, - const std::string& theDest); + SALOMEDSImpl_SObject theSObject, + const std::string& theSource, + const std::string& theDest); void ReplaceVariableAttribute(const std::string& theSource, const std::string& theDest); std::vector< std::vector > ParseVariables(const std::string& theVariables) const; @@ -301,6 +315,13 @@ public: //Returns a list of IOR's stored in the study std::vector GetIORs(); + // Notification mechanism + virtual bool addSO_Notification(const SALOMEDSImpl_SObject& theSObject); + virtual bool removeSO_Notification(const SALOMEDSImpl_SObject& theSObject); + virtual bool modifySO_Notification(const SALOMEDSImpl_SObject& theSObject, int reason); + virtual void setNotifier(SALOMEDSImpl_AbstractCallback* notifier); + + friend class SALOMEDSImpl_StudyManager; friend class SALOMEDSImpl_GenericAttribute; friend class SALOMEDSImpl_GenericVariable; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_StudyBuilder.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_StudyBuilder.cxx index 801307cec..32ac92b58 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_StudyBuilder.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_StudyBuilder.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_StudyBuilder.cxx // Author : Sergey RUIN // Module : SALOME @@ -36,8 +37,7 @@ #include #include - -using namespace std; +#include #define USE_CASE_LABEL_TAG 2 #define DIRECTORYID 16661 @@ -72,7 +72,7 @@ SALOMEDSImpl_StudyBuilder::~SALOMEDSImpl_StudyBuilder() * Purpose : Create a new component (Scomponent) */ //============================================================================ -SALOMEDSImpl_SComponent SALOMEDSImpl_StudyBuilder::NewComponent(const string& DataType) +SALOMEDSImpl_SComponent SALOMEDSImpl_StudyBuilder::NewComponent(const std::string& DataType) { _errorCode = ""; CheckLocked(); @@ -91,6 +91,7 @@ SALOMEDSImpl_SComponent SALOMEDSImpl_StudyBuilder::NewComponent(const string& Da SALOMEDSImpl_SComponent so = _study->GetSComponent (NL); if(_callbackOnAdd) _callbackOnAdd->OnAddSObject(so); + _study->addSO_Notification(so); _doc->SetModified(true); @@ -103,7 +104,7 @@ SALOMEDSImpl_SComponent SALOMEDSImpl_StudyBuilder::NewComponent(const string& Da */ //============================================================================ bool SALOMEDSImpl_StudyBuilder::DefineComponentInstance(const SALOMEDSImpl_SComponent& aComponent, - const string& IOR) + const std::string& IOR) { _errorCode = ""; @@ -148,6 +149,7 @@ SALOMEDSImpl_SObject SALOMEDSImpl_StudyBuilder::NewObject(const SALOMEDSImpl_SOb SALOMEDSImpl_SObject so = _study->GetSObject(NewLab); if(_callbackOnAdd) _callbackOnAdd->OnAddSObject(so); + _study->addSO_Notification(so); _doc->SetModified(true); return so; @@ -159,7 +161,7 @@ SALOMEDSImpl_SObject SALOMEDSImpl_StudyBuilder::NewObject(const SALOMEDSImpl_SOb */ //============================================================================ SALOMEDSImpl_SObject SALOMEDSImpl_StudyBuilder::NewObjectToTag(const SALOMEDSImpl_SObject& theFatherObject, - const int theTag) + const int theTag) { _errorCode = ""; CheckLocked(); @@ -172,6 +174,7 @@ SALOMEDSImpl_SObject SALOMEDSImpl_StudyBuilder::NewObjectToTag(const SALOMEDSImp SALOMEDSImpl_SObject so = _study->GetSObject(NewLab); if(_callbackOnAdd) _callbackOnAdd->OnAddSObject(so); + _study->addSO_Notification(so); _doc->SetModified(true); return so; @@ -204,11 +207,13 @@ bool SALOMEDSImpl_StudyBuilder::RemoveObject(const SALOMEDSImpl_SObject& anObjec SALOMEDSImpl_AttributeIOR* anAttr = NULL; //Remove from IORLabel map if ((anAttr=(SALOMEDSImpl_AttributeIOR*)Lab.FindAttribute(SALOMEDSImpl_AttributeIOR::GetID()))) { + _study->DeleteIORLabelMapItem(anAttr->Value()); } Lab.ForgetAllAttributes(); _doc->SetModified(true); + _study->removeSO_Notification(anObject); return true; } @@ -239,6 +244,7 @@ bool SALOMEDSImpl_StudyBuilder::RemoveObjectWithChildren(const SALOMEDSImpl_SObj } SALOMEDSImpl_AttributeIOR* anAttr = NULL; //Remove from IORLabel map if ((anAttr=(SALOMEDSImpl_AttributeIOR*)Lab.FindAttribute(SALOMEDSImpl_AttributeIOR::GetID()))) { + _study->DeleteIORLabelMapItem(anAttr->Value()); } DF_ChildIterator it(Lab, true); @@ -247,16 +253,18 @@ bool SALOMEDSImpl_StudyBuilder::RemoveObjectWithChildren(const SALOMEDSImpl_SObj if ((aReference=(SALOMEDSImpl_AttributeReference*)aLabel.FindAttribute(SALOMEDSImpl_AttributeReference::GetID()))) { SALOMEDSImpl_AttributeTarget* aTarget = NULL; if ((aTarget=(SALOMEDSImpl_AttributeTarget*)aReference->Get().FindAttribute(SALOMEDSImpl_AttributeTarget::GetID()))) - aTarget->Remove(SALOMEDSImpl_Study::SObject(aLabel)); + aTarget->Remove(SALOMEDSImpl_Study::SObject(aLabel)); } SALOMEDSImpl_AttributeIOR* anAttr = NULL; //Remove from IORLabel map if ((anAttr=(SALOMEDSImpl_AttributeIOR*)aLabel.FindAttribute(SALOMEDSImpl_AttributeIOR::GetID()))) { + _study->DeleteIORLabelMapItem(anAttr->Value()); } } Lab.ForgetAllAttributes(true); _doc->SetModified(true); + _study->removeSO_Notification(anObject); return true; } @@ -280,7 +288,7 @@ bool SALOMEDSImpl_StudyBuilder::LoadWith(const SALOMEDSImpl_SComponent& anSCO, if (aLocked) _study->GetProperties()->SetLocked(false); std::string Res(Att->Value()); - string aHDFPath(Res); + std::string aHDFPath(Res); SALOMEDSImpl_AttributeComment* type = NULL; std::string DataType; @@ -302,7 +310,7 @@ bool SALOMEDSImpl_StudyBuilder::LoadWith(const SALOMEDSImpl_SComponent& anSCO, DefineComponentInstance (anSCO, aDriver->GetIOR()); - string aHDFUrl; + std::string aHDFUrl; bool isASCII = false; if (HDFascii::isASCII(aHDFPath.c_str())) { isASCII = true; @@ -317,26 +325,28 @@ bool SALOMEDSImpl_StudyBuilder::LoadWith(const SALOMEDSImpl_SComponent& anSCO, char aMultifileState[2]; char ASCIIfileState[2]; + bool hasModuleData = false; try { - string scoid = anSCO.GetID(); + std::string scoid = anSCO.GetID(); hdf_file->OpenOnDisk(HDF_RDONLY); HDFgroup *hdf_group = new HDFgroup("DATACOMPONENT",hdf_file); hdf_group->OpenOnDisk(); HDFgroup *hdf_sco_group = new HDFgroup((char*)scoid.c_str(), hdf_group); hdf_sco_group->OpenOnDisk(); + hasModuleData = true; unsigned char* aStreamFile = NULL; int aStreamSize = 0; if (hdf_sco_group->ExistInternalObject("FILE_STREAM")) { - HDFdataset *hdf_dataset = new HDFdataset("FILE_STREAM", hdf_sco_group); - hdf_dataset->OpenOnDisk(); - aStreamSize = hdf_dataset->GetSize(); - aStreamFile = new unsigned char[aStreamSize]; - if(aStreamFile == NULL) throw HDFexception("Unable to open dataset FILE_STREAM"); - hdf_dataset->ReadFromDisk(aStreamFile); - hdf_dataset->CloseOnDisk(); - hdf_dataset = 0; + HDFdataset *hdf_dataset = new HDFdataset("FILE_STREAM", hdf_sco_group); + hdf_dataset->OpenOnDisk(); + aStreamSize = hdf_dataset->GetSize(); + aStreamFile = new unsigned char[aStreamSize]; + if(aStreamFile == NULL) throw HDFexception("Unable to open dataset FILE_STREAM"); + hdf_dataset->ReadFromDisk(aStreamFile); + hdf_dataset->CloseOnDisk(); + hdf_dataset = 0; } else aStreamFile = NULL; @@ -348,19 +358,22 @@ bool SALOMEDSImpl_StudyBuilder::LoadWith(const SALOMEDSImpl_SComponent& anSCO, ascii_hdf_dataset->OpenOnDisk(); ascii_hdf_dataset->ReadFromDisk(ASCIIfileState); - string aDir = SALOMEDSImpl_Tool::GetDirFromPath(Res); + std::string aDir = SALOMEDSImpl_Tool::GetDirFromPath(Res); - bool aResult = (ASCIIfileState[0]=='A')? - aDriver->LoadASCII(anSCO, aStreamFile, aStreamSize, aDir.c_str(), aMultifileState[0]=='M'): - aDriver->Load(anSCO, aStreamFile, aStreamSize, aDir.c_str(), aMultifileState[0]=='M'); + bool aResult = true; + if(aStreamFile && aStreamSize > 0 ) { + aResult = (ASCIIfileState[0]=='A')? + aDriver->LoadASCII(anSCO, aStreamFile, aStreamSize, aDir.c_str(), aMultifileState[0]=='M'): + aDriver->Load(anSCO, aStreamFile, aStreamSize, aDir.c_str(), aMultifileState[0]=='M'); + } if(aStreamFile != NULL) delete []aStreamFile; if(!aResult) { - RemoveAttribute( anSCO, "AttributeIOR" ); + RemoveAttribute( anSCO, "AttributeIOR" ); - _errorCode = "Can't load component"; - throw HDFexception("Unable to load component"); + _errorCode = "Can't load component"; + throw HDFexception("Unable to load component"); } //if(aDir != NULL) delete []aDir; @@ -378,9 +391,9 @@ bool SALOMEDSImpl_StudyBuilder::LoadWith(const SALOMEDSImpl_SComponent& anSCO, delete hdf_file; if (isASCII) { - vector aFilesToRemove; - aFilesToRemove.push_back("hdf_from_ascii.hdf"); - SALOMEDSImpl_Tool::RemoveTemporaryFiles(SALOMEDSImpl_Tool::GetDirFromPath(aHDFUrl), + std::vector aFilesToRemove; + aFilesToRemove.push_back("hdf_from_ascii.hdf"); + SALOMEDSImpl_Tool::RemoveTemporaryFiles(SALOMEDSImpl_Tool::GetDirFromPath(aHDFUrl), aFilesToRemove, true); } } @@ -388,12 +401,16 @@ bool SALOMEDSImpl_StudyBuilder::LoadWith(const SALOMEDSImpl_SComponent& anSCO, delete hdf_file; if (isASCII) { - vector aFilesToRemove; - aFilesToRemove.push_back(aHDFUrl); - SALOMEDSImpl_Tool::RemoveTemporaryFiles(SALOMEDSImpl_Tool::GetDirFromPath(aHDFUrl), aFilesToRemove, true); + std::vector aFilesToRemove; + aFilesToRemove.push_back(aHDFUrl); + SALOMEDSImpl_Tool::RemoveTemporaryFiles(SALOMEDSImpl_Tool::GetDirFromPath(aHDFUrl), aFilesToRemove, true); } if (aLocked) _study->GetProperties()->SetLocked(true); + + if (!hasModuleData) + return true; + _errorCode = "No persistent file"; return false; } @@ -432,7 +449,7 @@ bool SALOMEDSImpl_StudyBuilder::Load(const SALOMEDSImpl_SObject& sco) */ //============================================================================ DF_Attribute* SALOMEDSImpl_StudyBuilder::FindOrCreateAttribute(const SALOMEDSImpl_SObject& anObject, - const string& aTypeOfAttribute) + const std::string& aTypeOfAttribute) { _errorCode = ""; if(!anObject) { @@ -455,7 +472,7 @@ DF_Attribute* SALOMEDSImpl_StudyBuilder::FindOrCreateAttribute(const SALOMEDSImp //Add checks for TreeNode and UserID attributes if (strncmp(aTypeOfAttribute.c_str(), "AttributeTreeNode",17) == 0 ) { - string aTreeNodeGUID; + std::string aTreeNodeGUID; if (strcmp(aTypeOfAttribute.c_str(), "AttributeTreeNode") == 0) { aTreeNodeGUID = SALOMEDSImpl_AttributeTreeNode::GetDefaultTreeID(); } else { @@ -495,8 +512,8 @@ DF_Attribute* SALOMEDSImpl_StudyBuilder::FindOrCreateAttribute(const SALOMEDSImp //============================================================================ bool SALOMEDSImpl_StudyBuilder::FindAttribute(const SALOMEDSImpl_SObject& anObject, - DF_Attribute*& anAttribute, - const string& aTypeOfAttribute) + DF_Attribute*& anAttribute, + const std::string& aTypeOfAttribute) { _errorCode = ""; if(!anObject) { @@ -519,7 +536,7 @@ bool SALOMEDSImpl_StudyBuilder::FindAttribute(const SALOMEDSImpl_SObject& anObje //============================================================================ bool SALOMEDSImpl_StudyBuilder::RemoveAttribute(const SALOMEDSImpl_SObject& anObject, - const string& aTypeOfAttribute) + const std::string& aTypeOfAttribute) { _errorCode = ""; CheckLocked(); @@ -529,15 +546,17 @@ bool SALOMEDSImpl_StudyBuilder::RemoveAttribute(const SALOMEDSImpl_SObject& anOb } DF_Label Lab = anObject.GetLabel(); - if (aTypeOfAttribute == string("AttributeIOR")) { // Remove from IORLabel map + if (aTypeOfAttribute == std::string("AttributeIOR")) { // Remove from IORLabel map SALOMEDSImpl_AttributeIOR* anAttr = NULL; if ((anAttr=(SALOMEDSImpl_AttributeIOR*)Lab.FindAttribute(SALOMEDSImpl_AttributeIOR::GetID()))) { + _study->DeleteIORLabelMapItem(anAttr->Value()); } } Lab.ForgetAttribute (SALOMEDSImpl_SObject::GetGUID(aTypeOfAttribute)); _doc->SetModified(true); + _study->modifySO_Notification(anObject,0); return true; } @@ -548,7 +567,7 @@ bool SALOMEDSImpl_StudyBuilder::RemoveAttribute(const SALOMEDSImpl_SObject& anOb */ //============================================================================ bool SALOMEDSImpl_StudyBuilder::Addreference(const SALOMEDSImpl_SObject& me, - const SALOMEDSImpl_SObject& theReferencedObject) + const SALOMEDSImpl_SObject& theReferencedObject) { _errorCode = ""; if(!me || !theReferencedObject) { @@ -605,7 +624,7 @@ bool SALOMEDSImpl_StudyBuilder::RemoveReference(const SALOMEDSImpl_SObject& me) * Purpose : adds a new directory with a path = thePath */ //============================================================================ -bool SALOMEDSImpl_StudyBuilder::AddDirectory(const string& thePath) +bool SALOMEDSImpl_StudyBuilder::AddDirectory(const std::string& thePath) { _errorCode = ""; CheckLocked(); @@ -614,7 +633,7 @@ bool SALOMEDSImpl_StudyBuilder::AddDirectory(const string& thePath) return false; } - string aPath(thePath), aContext(""), aFatherPath; + std::string aPath(thePath), aContext(""), aFatherPath; DF_Label aLabel; SALOMEDSImpl_SObject anObject; @@ -633,7 +652,7 @@ bool SALOMEDSImpl_StudyBuilder::AddDirectory(const string& thePath) aPath = _study->GetContext() + aPath; } - vector vs = SALOMEDSImpl_Tool::splitString(aPath, '/'); + std::vector vs = SALOMEDSImpl_Tool::splitString(aPath, '/'); if(vs.size() == 1) aFatherPath = "/"; else { @@ -676,7 +695,7 @@ bool SALOMEDSImpl_StudyBuilder::AddDirectory(const string& thePath) */ //============================================================================ bool SALOMEDSImpl_StudyBuilder::SetGUID(const SALOMEDSImpl_SObject& anObject, - const string& theGUID) + const std::string& theGUID) { _errorCode = ""; CheckLocked(); @@ -699,7 +718,7 @@ bool SALOMEDSImpl_StudyBuilder::SetGUID(const SALOMEDSImpl_SObject& anObject, */ //============================================================================ bool SALOMEDSImpl_StudyBuilder::IsGUID(const SALOMEDSImpl_SObject& anObject, - const string& theGUID) + const std::string& theGUID) { _errorCode = ""; if(!anObject) { @@ -909,7 +928,7 @@ void SALOMEDSImpl_StudyBuilder::CheckLocked() */ //============================================================================ bool SALOMEDSImpl_StudyBuilder::SetName(const SALOMEDSImpl_SObject& theSO, - const string& theValue) + const std::string& theValue) { _errorCode = ""; CheckLocked(); @@ -930,7 +949,7 @@ bool SALOMEDSImpl_StudyBuilder::SetName(const SALOMEDSImpl_SObject& theSO, */ //============================================================================ bool SALOMEDSImpl_StudyBuilder::SetComment(const SALOMEDSImpl_SObject& theSO, - const string& theValue) + const std::string& theValue) { _errorCode = ""; CheckLocked(); @@ -951,7 +970,7 @@ bool SALOMEDSImpl_StudyBuilder::SetComment(const SALOMEDSImpl_SObject& theSO, */ //============================================================================ bool SALOMEDSImpl_StudyBuilder::SetIOR(const SALOMEDSImpl_SObject& theSO, - const string& theValue) + const std::string& theValue) { _errorCode = ""; CheckLocked(); @@ -984,14 +1003,14 @@ static void Translate_persistentID_to_IOR(DF_Label& Lab, SALOMEDSImpl_Driver* dr SALOMEDSImpl_AttributeLocalID* anID = NULL; if ((anID=(SALOMEDSImpl_AttributeLocalID*)current.FindAttribute(SALOMEDSImpl_AttributeLocalID::GetID()))) - if (anID->Value() == FILELOCALID) continue; //SRN: This attribute store a file name, skip it + if (anID->Value() == FILELOCALID) continue; //SRN: This attribute store a file name, skip it - string persist_ref = Att->Value(); + std::string persist_ref = Att->Value(); SALOMEDSImpl_SObject so = SALOMEDSImpl_Study::SObject(current); - string ior_string = driver->LocalPersistentIDToIOR(so, - persist_ref, - isMultiFile, - isASCII); + std::string ior_string = driver->LocalPersistentIDToIOR(so, + persist_ref, + isMultiFile, + isASCII); SALOMEDSImpl_AttributeIOR::Set (current, ior_string); } diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_StudyBuilder.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_StudyBuilder.hxx index 29d17383a..7a8ab0fd9 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_StudyBuilder.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_StudyBuilder.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_StudyBuilder.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_StudyHandle.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_StudyHandle.cxx index a3d37afc6..d7fd229d1 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_StudyHandle.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_StudyHandle.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_StudyHandle.cxx // Author : Sergey LITONIN // Module : SALOME @@ -56,7 +57,7 @@ SALOMEDSImpl_StudyHandle::SALOMEDSImpl_StudyHandle() //purpose : //======================================================================= SALOMEDSImpl_StudyHandle* SALOMEDSImpl_StudyHandle::Set(const DF_Label& theLabel, - SALOMEDSImpl_Study* theStudy) + SALOMEDSImpl_Study* theStudy) { SALOMEDSImpl_StudyHandle* A = NULL; if (!(A=(SALOMEDSImpl_StudyHandle*)theLabel.FindAttribute(GetID()))) { diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_StudyHandle.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_StudyHandle.hxx index a53de283b..84c6ec86c 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_StudyHandle.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_StudyHandle.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_StudyHandle.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx index 823cde555..d52b629eb 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_StudyManager.cxx // Author : Sergey RUIN // Module : SALOME @@ -27,6 +28,12 @@ #include "DF_ChildIterator.hxx" #include "HDFexplorer.hxx" +#include "Basics_Utils.hxx" + +//Warning undef of Ascii Winwows define +#ifdef WIN32 +# undef GetUserName +#endif #include "SALOMEDSImpl_Attributes.hxx" #include "SALOMEDSImpl_Tool.hxx" @@ -38,8 +45,7 @@ #include "HDFOI.hxx" #include #include - -using namespace std; +#include #define USE_CASE_LABEL_ID "0:2" @@ -47,7 +53,7 @@ static void SaveAttributes(const SALOMEDSImpl_SObject& SO, HDFgroup *hdf_group_s static void ReadAttributes(SALOMEDSImpl_Study*, const SALOMEDSImpl_SObject&, HDFdataset* ); static void BuildTree (SALOMEDSImpl_Study*, HDFgroup*); static void Translate_IOR_to_persistentID (const SALOMEDSImpl_SObject&, - SALOMEDSImpl_Driver*, bool isMultiFile, bool isASCII); + SALOMEDSImpl_Driver*, bool isMultiFile, bool isASCII); static void ReadNoteBookVariables(SALOMEDSImpl_Study* theStudy, HDFgroup* theGroup); //============================================================================ @@ -70,6 +76,7 @@ SALOMEDSImpl_StudyManager::SALOMEDSImpl_StudyManager() //============================================================================ SALOMEDSImpl_StudyManager::~SALOMEDSImpl_StudyManager() { + _appli->Close(_clipboard); // Destroy application delete _appli; } @@ -80,7 +87,7 @@ SALOMEDSImpl_StudyManager::~SALOMEDSImpl_StudyManager() * Purpose : Create a New Study of name study_name */ //==================================================T========================== -SALOMEDSImpl_Study* SALOMEDSImpl_StudyManager::NewStudy(const string& study_name) +SALOMEDSImpl_Study* SALOMEDSImpl_StudyManager::NewStudy(const std::string& study_name) { _errorCode = ""; @@ -108,8 +115,11 @@ SALOMEDSImpl_Study* SALOMEDSImpl_StudyManager::NewStudy(const string& study_name * Purpose : Open a Study from it's persistent reference */ //============================================================================ -SALOMEDSImpl_Study* SALOMEDSImpl_StudyManager::Open(const string& aUrl) +SALOMEDSImpl_Study* SALOMEDSImpl_StudyManager::Open(const std::string& aUrl) { + // Set "C" locale temporarily to avoid possible localization problems + Kernel_Utils::Localizer loc; + _errorCode = ""; // open the HDFFile @@ -118,16 +128,18 @@ SALOMEDSImpl_Study* SALOMEDSImpl_StudyManager::Open(const string& aUrl) HDFgroup *hdf_notebook_vars = 0; char* aC_HDFUrl; - string aHDFUrl; + std::string aHDFUrl; bool isASCII = false; if (HDFascii::isASCII(aUrl.c_str())) { isASCII = true; char* aResultPath = HDFascii::ConvertFromASCIIToHDF(aUrl.c_str()); + if ( !aResultPath ) + return NULL; aC_HDFUrl = new char[strlen(aResultPath) + 19]; sprintf(aC_HDFUrl, "%shdf_from_ascii.hdf", aResultPath); - delete(aResultPath); + delete [] (aResultPath); aHDFUrl = aC_HDFUrl; - delete aC_HDFUrl; + delete [] aC_HDFUrl; } else { aHDFUrl = aUrl; } @@ -138,15 +150,15 @@ SALOMEDSImpl_Study* SALOMEDSImpl_StudyManager::Open(const string& aUrl) hdf_file->OpenOnDisk(HDF_RDONLY);// mpv: was RDWR, but opened file can be write-protected too } catch (HDFexception) - { - char *eStr; - eStr = new char[strlen(aUrl.c_str())+17]; - sprintf(eStr,"Can't open file %s",aUrl.c_str()); - delete [] eStr; - _errorCode = string(eStr); - return NULL; - } - + { + char *eStr; + eStr = new char[strlen(aUrl.c_str())+17]; + sprintf(eStr,"Can't open file %s",aUrl.c_str()); + delete [] eStr; + _errorCode = std::string(eStr); + return NULL; + } + // Temporary aStudyUrl in place of study name DF_Document* Doc = _appli->NewDocument("SALOME_STUDY"); @@ -172,13 +184,13 @@ SALOMEDSImpl_Study* SALOMEDSImpl_StudyManager::Open(const string& aUrl) BuildTree (Study, hdf_group_study_structure); } catch (HDFexception) - { - char *eStr = new char [strlen(aUrl.c_str())+17]; - sprintf(eStr,"Can't open file %s", aUrl.c_str()); - _errorCode = string(eStr); - return NULL; - } - + { + char *eStr = new char [strlen(aUrl.c_str())+17]; + sprintf(eStr,"Can't open file %s", aUrl.c_str()); + _errorCode = std::string(eStr); + return NULL; + } + //Read and create notebook variables if(hdf_file->ExistInternalObject("NOTEBOOK_VARIABLES")) { hdf_notebook_vars = new HDFgroup("NOTEBOOK_VARIABLES",hdf_file); @@ -190,7 +202,7 @@ SALOMEDSImpl_Study* SALOMEDSImpl_StudyManager::Open(const string& aUrl) hdf_group_study_structure = new HDFgroup("STUDY_STRUCTURE",hdf_file); if (isASCII) { - vector aFilesToRemove; + std::vector aFilesToRemove; aFilesToRemove.push_back("hdf_from_ascii.hdf"); SALOMEDSImpl_Tool::RemoveTemporaryFiles(SALOMEDSImpl_Tool::GetDirFromPath(aHDFUrl), aFilesToRemove, true); } @@ -220,6 +232,8 @@ void SALOMEDSImpl_StudyManager::Close(SALOMEDSImpl_Study* aStudy) } aStudy->Close(); + DF_Document* doc=aStudy->GetDocument(); + _appli->Close(doc); } //============================================================================ @@ -228,12 +242,12 @@ void SALOMEDSImpl_StudyManager::Close(SALOMEDSImpl_Study* aStudy) */ //============================================================================ bool SALOMEDSImpl_StudyManager::Save(SALOMEDSImpl_Study* aStudy, - SALOMEDSImpl_DriverFactory* aFactory, - bool theMultiFile) + SALOMEDSImpl_DriverFactory* aFactory, + bool theMultiFile) { _errorCode = ""; - string url = aStudy->URL(); + std::string url = aStudy->URL(); if (url.empty()) { _errorCode = "No path specified to save the study. Nothing done"; return false; @@ -246,12 +260,12 @@ bool SALOMEDSImpl_StudyManager::Save(SALOMEDSImpl_Study* aStudy, } bool SALOMEDSImpl_StudyManager::SaveASCII(SALOMEDSImpl_Study* aStudy, - SALOMEDSImpl_DriverFactory* aFactory, - bool theMultiFile) + SALOMEDSImpl_DriverFactory* aFactory, + bool theMultiFile) { _errorCode = ""; - string url = aStudy->URL(); + std::string url = aStudy->URL(); if (url.empty()) { _errorCode = "No path specified to save the study. Nothing done"; return false; @@ -268,19 +282,19 @@ bool SALOMEDSImpl_StudyManager::SaveASCII(SALOMEDSImpl_Study* aStudy, * Purpose : Save a study to the persistent reference aUrl */ //============================================================================ -bool SALOMEDSImpl_StudyManager::SaveAs(const string& aUrl, - SALOMEDSImpl_Study* aStudy, - SALOMEDSImpl_DriverFactory* aFactory, - bool theMultiFile) +bool SALOMEDSImpl_StudyManager::SaveAs(const std::string& aUrl, + SALOMEDSImpl_Study* aStudy, + SALOMEDSImpl_DriverFactory* aFactory, + bool theMultiFile) { _errorCode = ""; return Impl_SaveAs(aUrl,aStudy, aFactory, theMultiFile, false); } -bool SALOMEDSImpl_StudyManager::SaveAsASCII(const string& aUrl, - SALOMEDSImpl_Study* aStudy, - SALOMEDSImpl_DriverFactory* aFactory, - bool theMultiFile) +bool SALOMEDSImpl_StudyManager::SaveAsASCII(const std::string& aUrl, + SALOMEDSImpl_Study* aStudy, + SALOMEDSImpl_DriverFactory* aFactory, + bool theMultiFile) { _errorCode = ""; return Impl_SaveAs(aUrl,aStudy, aFactory, theMultiFile, true); @@ -291,10 +305,10 @@ bool SALOMEDSImpl_StudyManager::SaveAsASCII(const string& aUrl, * Purpose : Get name list of open studies in the session */ //============================================================================ -vector SALOMEDSImpl_StudyManager::GetOpenStudies() +std::vector SALOMEDSImpl_StudyManager::GetOpenStudies() { _errorCode = ""; - vector aList; + std::vector aList; int nbDocs = _appli->NbDocuments(); @@ -304,7 +318,7 @@ vector SALOMEDSImpl_StudyManager::GetOpenStudies() } else { SALOMEDSImpl_Study* aStudy; - vector ids = _appli->GetDocumentIDs(); + std::vector ids = _appli->GetDocumentIDs(); for (int i = 0, len = ids.size(); iGetDocument(ids[i]); if(D == _clipboard) continue; @@ -323,7 +337,7 @@ vector SALOMEDSImpl_StudyManager::GetOpenStudies() */ //============================================================================ SALOMEDSImpl_Study* SALOMEDSImpl_StudyManager::GetStudyByName - (const string& aStudyName) + (const std::string& aStudyName) { _errorCode = ""; int nbDocs = _appli->NbDocuments(); @@ -333,13 +347,13 @@ SALOMEDSImpl_Study* SALOMEDSImpl_StudyManager::GetStudyByName return NULL; } else { - vector studies = GetOpenStudies(); + std::vector studies = GetOpenStudies(); for (int i = 0, len = studies.size(); iName() == aStudyName) return studies[i]; } } - _errorCode = string("Found no study with the name ") + aStudyName; + _errorCode = std::string("Found no study with the name ") + aStudyName; return NULL; } @@ -358,7 +372,7 @@ SALOMEDSImpl_Study* SALOMEDSImpl_StudyManager::GetStudyByID(int aStudyID) return NULL; } else { - vector studies = GetOpenStudies(); + std::vector studies = GetOpenStudies(); for (int i = 0, len = studies.size(); iStudyId() == aStudyID) return studies[i]; } @@ -394,17 +408,35 @@ bool SALOMEDSImpl_StudyManager::Impl_SaveProperties(SALOMEDSImpl_Study* aStudy, if (aLocked) aProp->SetLocked(true); - vector aNames; - vector aMinutes, aHours, aDays, aMonths, aYears; + std::vector aNames; + std::vector aMinutes, aHours, aDays, aMonths, aYears; aProp->GetModifications(aNames, aMinutes, aHours, aDays, aMonths, aYears); - int aLength = 0, anIndex, i; + std::string units = aProp->GetUnits(); + std::string comment = aProp->GetComment(); + + int aLength = 0, anIndex, i, unitsSize = 0, commentSize = 0; for(i=1; i<=aNames.size(); i++) aLength += aNames[i-1].size() + 1; - - //string length: 1 byte = locked flag, 1 byte = modified flag, (12 + name length + 1) for each name and date, "zero" byte - char* aProperty = new char[3 + aLength + 12 * aNames.size()]; + + unitsSize = units.size(); + commentSize = comment.size(); + + //string format: + //locked flag, modified flag, + //minutes, hours, day, months, year, user name, char(1), + //minutes, hours, day, months, year, user name, char(1), + //....................................................., + //....................................................., + //....................................................., + //minutes, hours, day, months, year, user name, char(1), char(30) <- !!!! used to define end of section with modifications !!!! + //units, char(1), comment, char(0) + + //string length: 1 byte = locked flag, 1 byte = modified flag, (12 + name length + 1) for each name and date, 1 byte (char(30) section delimeter) + // unit length + 1, comment length, "zero" byte + + char* aProperty = new char[3 + aLength + 12 * aNames.size() + 1 + unitsSize + 1 + commentSize ]; sprintf(aProperty,"%c%c", (char)aProp->GetCreationMode(), (aProp->IsLocked())?'l':'u'); @@ -413,17 +445,36 @@ bool SALOMEDSImpl_StudyManager::Impl_SaveProperties(SALOMEDSImpl_Study* aStudy, int a = 2; for(anIndex = 0; anIndex 0) { + sprintf(&(aProperty[a]),"%s",units.c_str()); + a = strlen(aProperty); + } + + aProperty[a++] = 1; + + //Write comments if need + if(comment.size() > 0) { + sprintf(&(aProperty[a]),"%s",comment.c_str()); + a = strlen(aProperty); + a++; + } + + aProperty[a] = 0; + name_len = (hdf_int32) a; size[0] = name_len + 1 ; hdf_dataset = new HDFdataset("AttributeStudyProperties",hdf_group,HDF_STRING,size,1); @@ -432,7 +483,7 @@ bool SALOMEDSImpl_StudyManager::Impl_SaveProperties(SALOMEDSImpl_Study* aStudy, hdf_dataset->CloseOnDisk(); hdf_dataset=0; //will be deleted by hdf_sco_group destructor delete [] aProperty; - + aProp->SetModified(0); return true; } @@ -442,12 +493,15 @@ bool SALOMEDSImpl_StudyManager::Impl_SaveProperties(SALOMEDSImpl_Study* aStudy, * Purpose : save the study in HDF file */ //============================================================================ -bool SALOMEDSImpl_StudyManager::Impl_SaveAs(const string& aUrl, - SALOMEDSImpl_Study* aStudy, - SALOMEDSImpl_DriverFactory* aFactory, - bool theMultiFile, - bool theASCII) +bool SALOMEDSImpl_StudyManager::Impl_SaveAs(const std::string& aStudyUrl, + SALOMEDSImpl_Study* aStudy, + SALOMEDSImpl_DriverFactory* aFactory, + bool theMultiFile, + bool theASCII) { + // Set "C" locale temporarily to avoid possible localization problems + Kernel_Utils::Localizer loc; + // HDF File will be composed of differents part : // * For each ComponentDataType, all data created by the component // Informations in data group hdf_group_datacomponent @@ -467,52 +521,59 @@ bool SALOMEDSImpl_StudyManager::Impl_SaveAs(const string& aUrl, HDFdataset *hdf_dataset =0; hdf_size size[1]; hdf_int32 name_len = 0; - string component_name; + std::string component_name; if(!aStudy) { _errorCode = "Study is null"; return false; } + // Store previous URL + std::string anOldName = aStudy->Name(); + + //Create a temporary url to which the study is saved + std::string aUrl = SALOMEDSImpl_Tool::GetTmpDir() + SALOMEDSImpl_Tool::GetNameFromPath(aStudyUrl); + int aLocked = aStudy->GetProperties()->IsLocked(); if (aLocked) aStudy->GetProperties()->SetLocked(false); SALOMEDSImpl_StudyBuilder* SB= aStudy->NewBuilder(); - map aMapTypeDriver; + std::map aMapTypeDriver; try { // mpv 15.12.2003: for saving components we have to load all data from all modules SALOMEDSImpl_SComponentIterator itcomponent1 = aStudy->NewComponentIterator(); for (; itcomponent1.More(); itcomponent1.Next()) - { - SALOMEDSImpl_SComponent sco = itcomponent1.Value(); - // if there is an associated Engine call its method for saving - string IOREngine; - try { - if (!sco.ComponentIOR(IOREngine)) { - string aCompType = sco.GetComment(); - if (!aCompType.empty()) { - - SALOMEDSImpl_Driver* aDriver = aFactory->GetDriverByType(aCompType); - aMapTypeDriver[aCompType] = aDriver; - - if (aDriver != NULL) { - if(!SB->LoadWith(sco, aDriver)) { - _errorCode = SB->GetErrorCode(); - return false; - } - } - } - } - } catch(...) { - _errorCode = "Can not restore information to resave it"; - return false; - } - } - - string anOldName = aStudy->Name(); - aStudy->URL(aUrl); + { + SALOMEDSImpl_SComponent sco = itcomponent1.Value(); + // if there is an associated Engine call its method for saving + std::string IOREngine; + try { + if (!sco.ComponentIOR(IOREngine)) { + std::string aCompType = sco.GetComment(); + if (!aCompType.empty()) { + + SALOMEDSImpl_Driver* aDriver = aFactory->GetDriverByType(aCompType); + aMapTypeDriver[aCompType] = aDriver; + + if (aDriver != NULL) { + if(!SB->LoadWith(sco, aDriver)) { + _errorCode = SB->GetErrorCode(); + return false; + } + } + } + } + } catch(...) { + _errorCode = "Can not restore information to resave it"; + return false; + } + } + + // VSR: set URL to new file name + // VSR: remember to set previous name if save operation fails + aStudy->URL(aStudyUrl); // To change for Save // Do not have to do a new file but just a Open??? Rewrite all informations after erasing evrything?? @@ -528,74 +589,74 @@ bool SALOMEDSImpl_StudyManager::Impl_SaveAs(const string& aUrl, SALOMEDSImpl_SComponentIterator itcomponent = aStudy->NewComponentIterator(); for (; itcomponent.More(); itcomponent.Next()) - { - SALOMEDSImpl_SComponent sco = itcomponent.Value(); - - string scoid = sco.GetID(); - hdf_sco_group = new HDFgroup((char*)scoid.c_str(), hdf_group_datacomponent); - hdf_sco_group->CreateOnDisk(); - - string componentDataType = sco.ComponentDataType(); - string IOREngine; - if (sco.ComponentIOR(IOREngine)) - { - SALOMEDSImpl_Driver* Engine = NULL; - if(aMapTypeDriver.find(componentDataType) != aMapTypeDriver.end()) { - // we have found the associated engine to write the data - Engine = aMapTypeDriver[componentDataType]; - } - else { - Engine = aFactory->GetDriverByIOR(IOREngine); - } - - if (Engine != NULL) - { - SALOMEDSImpl_TMPFile* aStream = NULL; - long length = 0; + { + SALOMEDSImpl_SComponent sco = itcomponent.Value(); + + std::string scoid = sco.GetID(); + hdf_sco_group = new HDFgroup((char*)scoid.c_str(), hdf_group_datacomponent); + hdf_sco_group->CreateOnDisk(); + + std::string componentDataType = sco.ComponentDataType(); + std::string IOREngine; + if (sco.ComponentIOR(IOREngine)) + { + SALOMEDSImpl_Driver* Engine = NULL; + if(aMapTypeDriver.find(componentDataType) != aMapTypeDriver.end()) { + // we have found the associated engine to write the data + Engine = aMapTypeDriver[componentDataType]; + } + else { + Engine = aFactory->GetDriverByIOR(IOREngine); + } + + if (Engine != NULL) + { + SALOMEDSImpl_TMPFile* aStream = NULL; + long length = 0; if (theASCII) aStream = Engine->SaveASCII(sco, - SALOMEDSImpl_Tool::GetDirFromPath(aUrl), - length, - theMultiFile); - else aStream = Engine->Save(sco, - SALOMEDSImpl_Tool::GetDirFromPath(aUrl), - length, - theMultiFile); - HDFdataset *hdf_dataset; - hdf_size aHDFSize[1]; - if(length > 0) { //The component saved some auxiliary files, then put them into HDF file - - aHDFSize[0] = length; - - HDFdataset *hdf_dataset = new HDFdataset("FILE_STREAM", hdf_sco_group, HDF_STRING, aHDFSize, 1); - hdf_dataset->CreateOnDisk(); - hdf_dataset->WriteOnDisk(aStream->Data()); //Save the stream in the HDF file - hdf_dataset->CloseOnDisk(); - } - - if(aStream) delete aStream; - - // store multifile state - aHDFSize[0] = 2; - hdf_dataset = new HDFdataset("MULTIFILE_STATE", hdf_sco_group, HDF_STRING, aHDFSize, 1); - hdf_dataset->CreateOnDisk(); - hdf_dataset->WriteOnDisk((void*)(theMultiFile?"M":"S")); // save: multi or single - hdf_dataset->CloseOnDisk(); - hdf_dataset=0; //will be deleted by hdf_sco_AuxFiles destructor - // store ASCII state - aHDFSize[0] = 2; - hdf_dataset = new HDFdataset("ASCII_STATE", hdf_sco_group, HDF_STRING, aHDFSize, 1); - hdf_dataset->CreateOnDisk(); - hdf_dataset->WriteOnDisk((void*)(theASCII?"A":"B")); // save: ASCII or BINARY - hdf_dataset->CloseOnDisk(); - hdf_dataset=0; //will be deleted by hdf_sco_AuxFiles destructor - // Creation of the persistance reference attribute - Translate_IOR_to_persistentID (sco, Engine, theMultiFile, theASCII); - } - } - hdf_sco_group->CloseOnDisk(); - hdf_sco_group=0; // will be deleted by hdf_group_datacomponent destructor - } + SALOMEDSImpl_Tool::GetDirFromPath(aUrl), + length, + theMultiFile); + else aStream = Engine->Save(sco, + SALOMEDSImpl_Tool::GetDirFromPath(aUrl), + length, + theMultiFile); + HDFdataset *hdf_dataset; + hdf_size aHDFSize[1]; + if(length > 0) { //The component saved some auxiliary files, then put them into HDF file + + aHDFSize[0] = length; + + HDFdataset *hdf_dataset = new HDFdataset("FILE_STREAM", hdf_sco_group, HDF_STRING, aHDFSize, 1); + hdf_dataset->CreateOnDisk(); + hdf_dataset->WriteOnDisk(aStream->Data()); //Save the stream in the HDF file + hdf_dataset->CloseOnDisk(); + } + + if(aStream) delete aStream; + + // store multifile state + aHDFSize[0] = 2; + hdf_dataset = new HDFdataset("MULTIFILE_STATE", hdf_sco_group, HDF_STRING, aHDFSize, 1); + hdf_dataset->CreateOnDisk(); + hdf_dataset->WriteOnDisk((void*)(theMultiFile?"M":"S")); // save: multi or single + hdf_dataset->CloseOnDisk(); + hdf_dataset=0; //will be deleted by hdf_sco_AuxFiles destructor + // store ASCII state + aHDFSize[0] = 2; + hdf_dataset = new HDFdataset("ASCII_STATE", hdf_sco_group, HDF_STRING, aHDFSize, 1); + hdf_dataset->CreateOnDisk(); + hdf_dataset->WriteOnDisk((void*)(theASCII?"A":"B")); // save: ASCII or BINARY + hdf_dataset->CloseOnDisk(); + hdf_dataset=0; //will be deleted by hdf_sco_AuxFiles destructor + // Creation of the persistance reference attribute + Translate_IOR_to_persistentID (sco, Engine, theMultiFile, theASCII); + } + } + hdf_sco_group->CloseOnDisk(); + hdf_sco_group=0; // will be deleted by hdf_group_datacomponent destructor + } hdf_group_datacomponent->CloseOnDisk(); hdf_group_datacomponent =0; // will be deleted by hdf_file destructor @@ -607,36 +668,36 @@ bool SALOMEDSImpl_StudyManager::Impl_SaveAs(const string& aUrl, // save component attributes SALOMEDSImpl_SComponentIterator itcomp = aStudy->NewComponentIterator(); for (; itcomp.More(); itcomp.Next()) - { - SALOMEDSImpl_SComponent SC = itcomp.Value(); - string scid = SC.GetID(); - hdf_sco_group2 = new HDFgroup((char*)scid.c_str(), hdf_group_study_structure); - hdf_sco_group2->CreateOnDisk(); + { + SALOMEDSImpl_SComponent SC = itcomp.Value(); + std::string scid = SC.GetID(); + hdf_sco_group2 = new HDFgroup((char*)scid.c_str(), hdf_group_study_structure); + hdf_sco_group2->CreateOnDisk(); SaveAttributes(SC, hdf_sco_group2); - // ComponentDataType treatment - component_name = SC.ComponentDataType(); - name_len = (hdf_int32)component_name.length(); - size[0] = name_len +1 ; - hdf_dataset = new HDFdataset("COMPONENTDATATYPE",hdf_sco_group2,HDF_STRING,size,1); - hdf_dataset->CreateOnDisk(); - hdf_dataset->WriteOnDisk((char*)component_name.c_str()); - hdf_dataset->CloseOnDisk(); - hdf_dataset=0; //will be deleted by hdf_sco_group destructor - Impl_SaveObject(SC, hdf_sco_group2); - hdf_sco_group2->CloseOnDisk(); - hdf_sco_group2=0; // will be deleted by hdf_group_study_structure destructor - } + // ComponentDataType treatment + component_name = SC.ComponentDataType(); + name_len = (hdf_int32)component_name.length(); + size[0] = name_len +1 ; + hdf_dataset = new HDFdataset("COMPONENTDATATYPE",hdf_sco_group2,HDF_STRING,size,1); + hdf_dataset->CreateOnDisk(); + hdf_dataset->WriteOnDisk((char*)component_name.c_str()); + hdf_dataset->CloseOnDisk(); + hdf_dataset=0; //will be deleted by hdf_sco_group destructor + Impl_SaveObject(SC, hdf_sco_group2); + hdf_sco_group2->CloseOnDisk(); + hdf_sco_group2=0; // will be deleted by hdf_group_study_structure destructor + } //----------------------------------------------------------------------- //4 - Write the Study UseCases Structure //----------------------------------------------------------------------- SALOMEDSImpl_SObject aSO = aStudy->FindObjectID(USE_CASE_LABEL_ID); if (aSO) { - HDFgroup *hdf_soo_group = new HDFgroup(USE_CASE_LABEL_ID,hdf_group_study_structure); - hdf_soo_group->CreateOnDisk(); - SaveAttributes(aSO, hdf_soo_group); - Impl_SaveObject(aSO, hdf_soo_group); - hdf_soo_group->CloseOnDisk(); - hdf_soo_group=0; // will be deleted by hdf_group_study_structure destructor + HDFgroup *hdf_soo_group = new HDFgroup(USE_CASE_LABEL_ID,hdf_group_study_structure); + hdf_soo_group->CreateOnDisk(); + SaveAttributes(aSO, hdf_soo_group); + Impl_SaveObject(aSO, hdf_soo_group); + hdf_soo_group->CloseOnDisk(); + hdf_soo_group=0; // will be deleted by hdf_group_study_structure destructor } //----------------------------------------------------------------------- //5 - Write the NoteBook Variables @@ -646,9 +707,9 @@ bool SALOMEDSImpl_StudyManager::Impl_SaveAs(const string& aUrl, hdf_notebook_vars = new HDFgroup("NOTEBOOK_VARIABLES",hdf_file); hdf_notebook_vars->CreateOnDisk(); - string varValue; - string varType; - string varIndex; + std::string varValue; + std::string varType; + std::string varIndex; for(int i=0 ;i < aStudy->myNoteBookVars.size(); i++ ){ // For each variable create HDF group @@ -667,7 +728,7 @@ bool SALOMEDSImpl_StudyManager::Impl_SaveAs(const string& aUrl, char buffer[256]; sprintf(buffer,"%d",i); - varIndex= string(buffer); + varIndex= std::string(buffer); name_len = (hdf_int32) varIndex.length(); size[0] = name_len +1 ; hdf_dataset = new HDFdataset("VARIABLE_INDEX",hdf_notebook_var,HDF_STRING,size,1); @@ -696,7 +757,7 @@ bool SALOMEDSImpl_StudyManager::Impl_SaveAs(const string& aUrl, //----------------------------------------------------------------------- //6 - Write the Study Properties //----------------------------------------------------------------------- - string study_name = aStudy->Name(); + std::string study_name = aStudy->Name(); name_len = (hdf_int32) study_name.size(); size[0] = name_len +1 ; hdf_dataset = new HDFdataset("STUDY_NAME",hdf_group_study_structure,HDF_STRING,size,1); @@ -709,30 +770,90 @@ bool SALOMEDSImpl_StudyManager::Impl_SaveAs(const string& aUrl, hdf_group_study_structure->CloseOnDisk(); hdf_file->CloseOnDisk(); - aStudy->IsSaved(true); hdf_group_study_structure =0; // will be deleted by hdf_file destructor delete hdf_file; // recursively deletes all hdf objects... } catch (HDFexception) { _errorCode = "HDFexception ! "; + aStudy->URL( anOldName ); // VSR: restore previous url if operation is failed return false; } catch(std::exception& exc) { _errorCode = const_cast(exc.what()); + aStudy->URL( anOldName ); // VSR: restore previous url if operation is failed return false; } catch(...) { _errorCode = "Unknown exception ! "; + aStudy->URL( anOldName ); // VSR: restore previous url if operation is failed return false; } if (theASCII) { // save file in ASCII format HDFascii::ConvertFromHDFToASCII(aUrl.c_str(), true); } + + //Now it's necessary to copy files from the temporary directory to the user defined directory. - return true; + // The easiest way to get a list of file in the temporary directory + + std::string aCmd, aTmpFileDir = SALOMEDSImpl_Tool::GetTmpDir(); + std::string aTmpFile = aTmpFileDir +"files"; + std::string aStudyTmpDir = SALOMEDSImpl_Tool::GetDirFromPath(aUrl); + +#ifdef WIN32 + aCmd = "dir /B \"" + aStudyTmpDir +"\" > " + aTmpFile; +#else + aCmd ="ls -1 \"" + aStudyTmpDir +"\" > " + aTmpFile; +#endif + system(aCmd.c_str()); + + // Iterate and move files in the temporary directory + FILE* fp = fopen(aTmpFile.c_str(), "rb"); + if(!fp) { + aStudy->URL( anOldName ); // VSR: restore previous url if operation is failed + return false; + } + char* buffer = new char[2047]; + int errors = 0; + while(!feof(fp) && !errors) { + if((fgets(buffer, 2046, fp)) == NULL) break; + size_t aLen = strlen(buffer); + if(buffer[aLen-1] == '\n') buffer[aLen-1] = char(0); +#ifdef WIN32 + aCmd = "move /Y \"" + aStudyTmpDir + std::string(buffer) + "\" \"" + SALOMEDSImpl_Tool::GetDirFromPath(aStudyUrl) +"\""; +#else + aCmd = "mv -f \"" + aStudyTmpDir + std::string(buffer) + "\" \"" + SALOMEDSImpl_Tool::GetDirFromPath(aStudyUrl)+"\""; +#endif + errors = system(aCmd.c_str()); + } + + delete []buffer; + fclose(fp); + + // Perform cleanup +#ifdef WIN32 + DeleteFileA(aTmpFile.c_str()); +#else + unlink(aTmpFile.c_str()); +#endif + +#ifdef WIN32 + RemoveDirectoryA(aTmpFileDir.c_str()); + RemoveDirectoryA(aStudyTmpDir.c_str()); +#else + rmdir(aTmpFileDir.c_str()); + rmdir(aStudyTmpDir.c_str()); +#endif + + if ( !errors ) { + // VSR: finally, if all is done without errors, mark study as Saved + aStudy->IsSaved(true); + } + + return !errors; } //============================================================================ @@ -741,7 +862,7 @@ bool SALOMEDSImpl_StudyManager::Impl_SaveAs(const string& aUrl, */ //============================================================================ bool SALOMEDSImpl_StudyManager::Impl_SaveObject(const SALOMEDSImpl_SObject& SC, - HDFgroup *hdf_group_datatype) + HDFgroup *hdf_group_datatype) { _errorCode = ""; @@ -755,27 +876,27 @@ bool SALOMEDSImpl_StudyManager::Impl_SaveObject(const SALOMEDSImpl_SObject& SC, { // mpv: don't save empty labels - vector attr = itchild.Value().GetAttributes(); + std::vector attr = itchild.Value().GetAttributes(); if (attr.size() == 0) { //No attributes on the label - DF_ChildIterator subchild(itchild.Value()); - if (!subchild.More()) { - continue; - } - subchild.Init(itchild.Value(), true); - bool anEmpty = true; - for (; subchild.More() && anEmpty; subchild.Next()) { - vector attr2 = subchild.Value().GetAttributes(); - if (attr2.size()) { - anEmpty = false; //There are attributes on the child label - break; - } - } - if (anEmpty) continue; + DF_ChildIterator subchild(itchild.Value()); + if (!subchild.More()) { + continue; + } + subchild.Init(itchild.Value(), true); + bool anEmpty = true; + for (; subchild.More() && anEmpty; subchild.Next()) { + std::vector attr2 = subchild.Value().GetAttributes(); + if (attr2.size()) { + anEmpty = false; //There are attributes on the child label + break; + } + } + if (anEmpty) continue; } SALOMEDSImpl_SObject SO = SALOMEDSImpl_Study::SObject(itchild.Value()); - string scoid = SO.GetID(); + std::string scoid = SO.GetID(); hdf_group_sobject = new HDFgroup(scoid.c_str(), hdf_group_datatype); hdf_group_sobject->CreateOnDisk(); SaveAttributes(SO, hdf_group_sobject); @@ -792,7 +913,7 @@ bool SALOMEDSImpl_StudyManager::Impl_SaveObject(const SALOMEDSImpl_SObject& SC, * Purpose : */ //============================================================================ -string SALOMEDSImpl_StudyManager::Impl_SubstituteSlash(const string& aUrl) +std::string SALOMEDSImpl_StudyManager::Impl_SubstituteSlash(const std::string& aUrl) { _errorCode = ""; @@ -819,13 +940,13 @@ DF_Document* SALOMEDSImpl_StudyManager::GetDocumentOfStudy(SALOMEDSImpl_Study* t */ //============================================================================ bool SALOMEDSImpl_StudyManager::CanCopy(const SALOMEDSImpl_SObject& theObject, - SALOMEDSImpl_Driver* theEngine) + SALOMEDSImpl_Driver* theEngine) { _errorCode = ""; SALOMEDSImpl_SComponent aComponent = theObject.GetFatherComponent(); if (!aComponent) return false; if (aComponent.GetLabel() == theObject.GetLabel()) return false; - string IOREngine; + std::string IOREngine; if (!aComponent.ComponentIOR(IOREngine)) return false; if (theEngine == NULL) return false; return theEngine->CanCopy(theObject); @@ -837,10 +958,10 @@ bool SALOMEDSImpl_StudyManager::CanCopy(const SALOMEDSImpl_SObject& theObject, */ //============================================================================ bool SALOMEDSImpl_StudyManager::CopyLabel(SALOMEDSImpl_Study* theSourceStudy, - SALOMEDSImpl_Driver* theEngine, - const int theSourceStartDepth, - const DF_Label& theSource, - const DF_Label& theDestinationMain) + SALOMEDSImpl_Driver* theEngine, + const int theSourceStartDepth, + const DF_Label& theSource, + const DF_Label& theDestinationMain) { _errorCode = ""; @@ -854,35 +975,35 @@ bool SALOMEDSImpl_StudyManager::CopyLabel(SALOMEDSImpl_Study* theSourceStudy, aAuxTargetLabel = aAuxTargetLabel.FindChild(aSourceLabel.Tag()); } // iterate attributes - vector attrList = theSource.GetAttributes(); + std::vector attrList = theSource.GetAttributes(); for(int i = 0, len = attrList.size(); i(anAttr)->Get(); - string anEntry = aReferenced.Entry(); + std::string anEntry = aReferenced.Entry(); // store the value of name attribute of referenced label SALOMEDSImpl_AttributeName* aNameAttribute; if ((aNameAttribute=(SALOMEDSImpl_AttributeName*)aReferenced.FindAttribute(SALOMEDSImpl_AttributeName::GetID()))) { - anEntry += " "; - anEntry += aNameAttribute->Value(); + anEntry += " "; + anEntry += aNameAttribute->Value(); } SALOMEDSImpl_AttributeComment::Set(aAuxTargetLabel, anEntry); continue; } - if (type == string("AttributeIOR")) { // IOR => ID and TMPFile of Engine - string anEntry = theSource.Entry(); + if (type == std::string("AttributeIOR")) { // IOR => ID and TMPFile of Engine + std::string anEntry = theSource.Entry(); SALOMEDSImpl_SObject aSO = theSourceStudy->FindObjectID(anEntry); int anObjID; long aLen; SALOMEDSImpl_TMPFile* aStream = theEngine->CopyFrom(aSO, anObjID, aLen); - string aResStr(""); + std::string aResStr(""); for(a = 0; a < aLen; a++) { - aResStr += (char)(aStream->Get(a)); + aResStr += (char)(aStream->Get(a)); } if(aStream) delete aStream; @@ -905,7 +1026,7 @@ bool SALOMEDSImpl_StudyManager::CopyLabel(SALOMEDSImpl_Study* theSourceStudy, */ //============================================================================ bool SALOMEDSImpl_StudyManager::Copy(const SALOMEDSImpl_SObject& theObject, - SALOMEDSImpl_Driver* theEngine) + SALOMEDSImpl_Driver* theEngine) { _errorCode = ""; @@ -931,7 +1052,7 @@ bool SALOMEDSImpl_StudyManager::Copy(const SALOMEDSImpl_SObject& theObject, // set component data type to the name attribute of root label if (!aStructureOnly) { SALOMEDSImpl_AttributeComment::Set(_clipboard->Main().Root(), - theEngine->ComponentDataType()); + theEngine->ComponentDataType()); } // set to the Root label integer attribute: study id SALOMEDSImpl_AttributeInteger::Set(_clipboard->Main().Root(), aStudy->StudyId()); @@ -956,7 +1077,7 @@ bool SALOMEDSImpl_StudyManager::Copy(const SALOMEDSImpl_SObject& theObject, */ //============================================================================ bool SALOMEDSImpl_StudyManager::CanPaste(const SALOMEDSImpl_SObject& theObject, - SALOMEDSImpl_Driver* theEngine) + SALOMEDSImpl_Driver* theEngine) { _errorCode = ""; @@ -981,7 +1102,7 @@ bool SALOMEDSImpl_StudyManager::CanPaste(const SALOMEDSImpl_SObject& theObject, return false; } - string IOREngine; + std::string IOREngine; if (!aComponent.ComponentIOR(IOREngine)) { _errorCode = "component has no IOR"; return false; @@ -995,11 +1116,11 @@ bool SALOMEDSImpl_StudyManager::CanPaste(const SALOMEDSImpl_SObject& theObject, */ //============================================================================ DF_Label SALOMEDSImpl_StudyManager::PasteLabel(SALOMEDSImpl_Study* theDestinationStudy, - SALOMEDSImpl_Driver* theEngine, - const DF_Label& theSource, - const DF_Label& theDestinationStart, - const int theCopiedStudyID, - const bool isFirstElement) + SALOMEDSImpl_Driver* theEngine, + const DF_Label& theSource, + const DF_Label& theDestinationStart, + const int theCopiedStudyID, + const bool isFirstElement) { _errorCode = ""; @@ -1015,6 +1136,8 @@ DF_Label SALOMEDSImpl_StudyManager::PasteLabel(SALOMEDSImpl_Study* theDestinatio aTargetLabel = aTargetLabel.FindChild(aSourceLabel.Tag()); aAuxSourceLabel = aAuxSourceLabel.FindChild(aSourceLabel.Tag()); } + SALOMEDSImpl_SObject so = theDestinationStudy->GetSObject(aTargetLabel); + theDestinationStudy->addSO_Notification(so); } // check auxiliary label for TMPFile => IOR @@ -1022,37 +1145,37 @@ DF_Label SALOMEDSImpl_StudyManager::PasteLabel(SALOMEDSImpl_Study* theDestinatio if ((aNameAttribute=(SALOMEDSImpl_AttributeName*)aAuxSourceLabel.FindAttribute(SALOMEDSImpl_AttributeName::GetID()))) { SALOMEDSImpl_AttributeInteger* anObjID = (SALOMEDSImpl_AttributeInteger*)aAuxSourceLabel.FindAttribute(SALOMEDSImpl_AttributeInteger::GetID()); SALOMEDSImpl_AttributeComment* aComponentName = (SALOMEDSImpl_AttributeComment*)theSource.Root().FindAttribute(SALOMEDSImpl_AttributeComment::GetID()); - string aCompName = aComponentName->Value(); + std::string aCompName = aComponentName->Value(); if (theEngine->CanPaste(aCompName, anObjID->Value())) { std::string aTMPStr = aNameAttribute->Value(); int aLen = aTMPStr.size(); unsigned char* aStream = NULL; if(aLen > 0) { - aStream = new unsigned char[aLen+10]; - for(a = 0; a < aLen; a++) { - aStream[a] = aTMPStr[a]; - } + aStream = new unsigned char[aLen+10]; + for(a = 0; a < aLen; a++) { + aStream[a] = aTMPStr[a]; + } } - string anEntry = aTargetLabel.Entry(); + std::string anEntry = aTargetLabel.Entry(); SALOMEDSImpl_SObject aPastedSO = theDestinationStudy->FindObjectID(anEntry); if (isFirstElement) { - string aDestEntry = theEngine->PasteInto(aStream, - aLen, - anObjID->Value(), - aPastedSO.GetFatherComponent()); - aTargetLabel = DF_Label::Label(theDestinationStart, aDestEntry); + std::string aDestEntry = theEngine->PasteInto(aStream, + aLen, + anObjID->Value(), + aPastedSO.GetFatherComponent()); + aTargetLabel = DF_Label::Label(theDestinationStart, aDestEntry); } else - theEngine->PasteInto(aStream, aLen, anObjID->Value(), aPastedSO); + theEngine->PasteInto(aStream, aLen, anObjID->Value(), aPastedSO); if(aStream != NULL) delete []aStream; } } // iterate attributes - vector attrList = theSource.GetAttributes(); + std::vector attrList = theSource.GetAttributes(); for(int i = 0, len = attrList.size(); iID())) { @@ -1067,7 +1190,7 @@ DF_Label SALOMEDSImpl_StudyManager::PasteLabel(SALOMEDSImpl_Study* theDestinatio SALOMEDSImpl_AttributeComment* aCommentAttribute = NULL; if ((aCommentAttribute=(SALOMEDSImpl_AttributeComment*)aAuxSourceLabel.FindAttribute(SALOMEDSImpl_AttributeComment::GetID()))) { char * anEntry = new char[aCommentAttribute->Value().size() + 1]; - strcpy(anEntry, string(aCommentAttribute->Value()).c_str()); + strcpy(anEntry, std::string(aCommentAttribute->Value()).c_str()); char* aNameStart = strchr(anEntry, ' '); if (aNameStart) { *aNameStart = '\0'; @@ -1094,7 +1217,7 @@ DF_Label SALOMEDSImpl_StudyManager::PasteLabel(SALOMEDSImpl_Study* theDestinatio */ //============================================================================ SALOMEDSImpl_SObject SALOMEDSImpl_StudyManager::Paste(const SALOMEDSImpl_SObject& theObject, - SALOMEDSImpl_Driver* theEngine) + SALOMEDSImpl_Driver* theEngine) { _errorCode = ""; @@ -1159,14 +1282,14 @@ SALOMEDSImpl_SObject SALOMEDSImpl_StudyManager::Paste(const SALOMEDSImpl_SObject static void SaveAttributes(const SALOMEDSImpl_SObject& aSO, HDFgroup *hdf_group_sobject) { hdf_size size[1]; - vector attrList = aSO.GetLabel().GetAttributes(); + std::vector attrList = aSO.GetLabel().GetAttributes(); DF_Attribute* anAttr = NULL; for(int i = 0, len = attrList.size(); iSave(); + std::string type = SALOMEDSImpl_GenericAttribute::Impl_GetType(anAttr); + if(type == std::string("AttributeIOR")) continue; //IOR attribute is not saved + std::string aSaveStr =anAttr->Save(); //cout << "Saving: " << aSO.GetID() << " type: "<< type<<"|" << endl; size[0] = (hdf_int32) strlen(aSaveStr.c_str()) + 1; HDFdataset *hdf_dataset = new HDFdataset((char*)type.c_str(), hdf_group_sobject, HDF_STRING,size, 1); @@ -1181,8 +1304,8 @@ static void SaveAttributes(const SALOMEDSImpl_SObject& aSO, HDFgroup *hdf_group_ //Function : ReadAttributes //=========================================================================== static void ReadAttributes(SALOMEDSImpl_Study* theStudy, - const SALOMEDSImpl_SObject& aSO, - HDFdataset* hdf_dataset) + const SALOMEDSImpl_SObject& aSO, + HDFdataset* hdf_dataset) { hdf_dataset->OpenOnDisk(); @@ -1195,7 +1318,7 @@ static void ReadAttributes(SALOMEDSImpl_Study* theStudy, } else if (!strcmp(hdf_dataset->GetName(),"AttributeReference") || !strcmp(hdf_dataset->GetName(),"Reference")) { // Old format maintainance theStudy->NewBuilder()->Addreference(aSO, theStudy->CreateObjectID(current_string)); - delete(current_string); + delete [] (current_string); hdf_dataset->CloseOnDisk(); return; } else { @@ -1206,7 +1329,7 @@ static void ReadAttributes(SALOMEDSImpl_Study* theStudy, anAttr->Load(current_string); } - delete(current_string); + delete [] (current_string); hdf_dataset->CloseOnDisk(); } @@ -1252,12 +1375,12 @@ static void BuildTree (SALOMEDSImpl_Study* theStudy, HDFgroup* hdf_current_group //Function : Translate_IOR_to_persistentID //============================================================================ static void Translate_IOR_to_persistentID (const SALOMEDSImpl_SObject& so, - SALOMEDSImpl_Driver* engine, - bool isMultiFile, - bool isASCII) + SALOMEDSImpl_Driver* engine, + bool isMultiFile, + bool isASCII) { DF_ChildIterator itchild(so.GetLabel()); - string ior_string, persistent_string, curid; + std::string ior_string, persistent_string, curid; for (; itchild.More(); itchild.Next()) { SALOMEDSImpl_SObject current = SALOMEDSImpl_Study::SObject(itchild.Value()); @@ -1291,7 +1414,7 @@ void ReadNoteBookVariables(SALOMEDSImpl_Study* theStudy, HDFgroup* theGroup) //Get Nb of variables int aNbVars = theGroup->nInternalObjects(); - map aVarsMap; + std::map aVarsMap; for( int iVar=0;iVar < aNbVars;iVar++ ) { theGroup->InternalObjectIndentify(iVar,aVarName); @@ -1319,7 +1442,7 @@ void ReadNoteBookVariables(SALOMEDSImpl_Study* theStudy, HDFgroup* theGroup) new_dataset->CloseOnDisk(); new_dataset = 0; //will be deleted by hdf_sco_group destructor order = atoi(currentVarIndex); - delete currentVarIndex; + delete [] currentVarIndex; } else order = iVar; @@ -1336,19 +1459,19 @@ void ReadNoteBookVariables(SALOMEDSImpl_Study* theStudy, HDFgroup* theGroup) new_group = 0; //will be deleted by hdf_sco_group destructor SALOMEDSImpl_GenericVariable::VariableTypes aVarType = - SALOMEDSImpl_GenericVariable::String2VariableType(string(currentVarType)); - delete currentVarType; + SALOMEDSImpl_GenericVariable::String2VariableType(std::string(currentVarType)); + delete [] currentVarType; //Create variable and add it in the study SALOMEDSImpl_GenericVariable* aVariable = - new SALOMEDSImpl_ScalarVariable(aVarType,string(aVarName)); - aVariable->Load(string(currentVarValue)); - aVarsMap.insert(make_pair(order,aVariable)); - delete currentVarValue; - } + new SALOMEDSImpl_ScalarVariable(aVarType,std::string(aVarName)); + aVariable->Load(std::string(currentVarValue)); + aVarsMap.insert(std::make_pair(order,aVariable)); + delete [] currentVarValue; + } } - map::const_iterator it= aVarsMap.begin(); + std::map::const_iterator it= aVarsMap.begin(); for(;it!=aVarsMap.end();it++) theStudy->AddVariable((*it).second); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.hxx index 4a0b2ef77..f65863d88 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_StudyManager.hxx // Author : Sergey RUIN // Module : SALOME @@ -29,7 +30,7 @@ #include "SALOMEDSImpl_Defines.hxx" // std C++ headers -#include +#include #include #include diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.cxx index fd5187122..657d3fdba 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME SALOMEDS : data structure of SALOME and sources of Salome data server // File : SALOMEDSImpl_SObject.cxx // Author : Sergey RUIN diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.hxx index afad98feb..00018b1f1 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef __SALOMEDSIMPL_TMPFILE_H__ #define __SALOMEDSIMPL_TMPFILE_H__ diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Tool.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_Tool.cxx index e19d888f6..cb9d3e8a8 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Tool.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Tool.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_Tool.cxx // Created : Mon Oct 21 16:24:34 2002 // Author : Sergey RUIN @@ -30,6 +31,8 @@ #include #include #include +#include +#include #include "SALOMEDSImpl_Tool.hxx" @@ -46,15 +49,12 @@ #include #endif -using namespace std; - - -bool Exists(const string thePath) +bool Exists(const std::string thePath) { #ifdef WIN32 if ( GetFileAttributes ( thePath.c_str() ) == 0xFFFFFFFF ) { - if ( GetLastError () != ERROR_FILE_NOT_FOUND ) { + if ( GetLastError () == ERROR_FILE_NOT_FOUND ) { return false; } } @@ -72,15 +72,15 @@ bool Exists(const string thePath) // function : GetTempDir // purpose : Return a temp directory to store created files like "/tmp/sub_dir/" //============================================================================ -string SALOMEDSImpl_Tool::GetTmpDir() +std::string SALOMEDSImpl_Tool::GetTmpDir() { //Find a temporary directory to store a file - string aTmpDir; + std::string aTmpDir; char *Tmp_dir = getenv("SALOME_TMP_DIR"); if(Tmp_dir != NULL) { - aTmpDir = string(Tmp_dir); + aTmpDir = std::string(Tmp_dir); #ifdef WIN32 if(aTmpDir[aTmpDir.size()-1] != '\\') aTmpDir+='\\'; #else @@ -89,9 +89,9 @@ string SALOMEDSImpl_Tool::GetTmpDir() } else { #ifdef WIN32 - aTmpDir = string("C:\\"); + aTmpDir = std::string("C:\\"); #else - aTmpDir = string("/tmp/"); + aTmpDir = std::string("/tmp/"); #endif } @@ -99,12 +99,12 @@ string SALOMEDSImpl_Tool::GetTmpDir() int aRND = 999 + (int)(100000.0*rand()/(RAND_MAX+1.0)); //Get a random number to present a name of a sub directory char buffer[127]; sprintf(buffer, "%d", aRND); - string aSubDir(buffer); - if(aSubDir.size() <= 1) aSubDir = string("123409876"); + std::string aSubDir(buffer); + if(aSubDir.size() <= 1) aSubDir = std::string("123409876"); aTmpDir += aSubDir; //Get RND sub directory - string aDir = aTmpDir; + std::string aDir = aTmpDir; if(Exists(aDir)) { for(aRND = 0; Exists(aDir); aRND++) { @@ -133,15 +133,15 @@ string SALOMEDSImpl_Tool::GetTmpDir() // function : RemoveTemporaryFiles // purpose : Removes files listed in theFileList //============================================================================ -void SALOMEDSImpl_Tool::RemoveTemporaryFiles(const string& theDirectory, - const vector& theFiles, - const bool IsDirDeleted) +void SALOMEDSImpl_Tool::RemoveTemporaryFiles(const std::string& theDirectory, + const std::vector& theFiles, + const bool IsDirDeleted) { - string aDirName = theDirectory; + std::string aDirName = theDirectory; int i, aLength = theFiles.size(); for(i=1; i<=aLength; i++) { - string aFile(aDirName); + std::string aFile(aDirName); aFile += theFiles[i-1]; if(!Exists(aFile)) continue; @@ -168,14 +168,14 @@ void SALOMEDSImpl_Tool::RemoveTemporaryFiles(const string& theDirectory, // function : GetNameFromPath // purpose : Returns the name by the path //============================================================================ -string SALOMEDSImpl_Tool::GetNameFromPath(const string& thePath) { +std::string SALOMEDSImpl_Tool::GetNameFromPath(const std::string& thePath) { if (thePath.empty()) return ""; int pos = thePath.rfind('/'); - if(pos > 0) return thePath.substr(pos+1, thePath.size()); + if(pos >= 0) return thePath.substr(pos+1, thePath.size()); pos = thePath.rfind('\\'); - if(pos > 0) return thePath.substr(pos+1, thePath.size()); + if(pos >= 0) return thePath.substr(pos+1, thePath.size()); pos = thePath.rfind('|'); - if(pos > 0) return thePath.substr(pos+1, thePath.size()); + if(pos >= 0) return thePath.substr(pos+1, thePath.size()); return thePath; } @@ -183,32 +183,32 @@ string SALOMEDSImpl_Tool::GetNameFromPath(const string& thePath) { // function : GetDirFromPath // purpose : Returns the dir by the path //============================================================================ -string SALOMEDSImpl_Tool::GetDirFromPath(const string& thePath) { - if (thePath.empty()) return ""; +std::string SALOMEDSImpl_Tool::GetDirFromPath(const std::string& thePath) { +#ifdef WIN32 + std::string separator = "\\"; +#else + std::string separator = "/"; +#endif + + std::string path; + if (!thePath.empty()) { + int pos = thePath.rfind('/'); + if (pos < 0) pos = thePath.rfind('\\'); + if (pos < 0) pos = thePath.rfind('|'); + + if (pos >= 0) + path = thePath.substr(0, pos+1); + else + path = std::string(".") + separator; - int pos = thePath.rfind('/'); - string path; - if(pos > 0) { - path = thePath.substr(0, pos+1); - } - if(path.empty()) { - pos = thePath.rfind('\\'); - if(pos > 0) path = thePath.substr(0, pos+1); - } - if(path.empty()) { - pos = thePath.rfind('|'); - if(pos > 0) path = thePath.substr(0, pos+1); - } - if(path.empty()) { - path = thePath+"/"; - } - #ifdef WIN32 //Check if the only disk letter is given as path - if(path.size() == 2 && path[1] == ':') path +='\\'; + if (path.size() == 2 && path[1] == ':') path += separator; #endif - - for(int i = 0, len = path.size(); i= 0 ) + path.replace(pos, 1, separator); + } + return path; } @@ -217,9 +217,9 @@ string SALOMEDSImpl_Tool::GetDirFromPath(const string& thePath) { // purpose : The functions returns a list of substring of initial string // divided by given separator //============================================================================ -vector SALOMEDSImpl_Tool::splitString(const string& theValue, char separator) +std::vector SALOMEDSImpl_Tool::splitString(const std::string& theValue, char separator) { - vector vs; + std::vector vs; if(theValue[0] == separator && theValue.size() == 1) return vs; int pos = theValue.find(separator); if(pos < 0) { @@ -227,13 +227,13 @@ vector SALOMEDSImpl_Tool::splitString(const string& theValue, char separ return vs; } - string s = theValue; + std::string s = theValue; if(s[0] == separator) s = s.substr(1, s.size()); while((pos = s.find(separator)) >= 0) { vs.push_back(s.substr(0, pos)); s = s.substr(pos+1, s.size()); } - + if(!s.empty() && s[0] != separator) vs.push_back(s); return vs; } @@ -243,25 +243,67 @@ vector SALOMEDSImpl_Tool::splitString(const string& theValue, char separ // purpose : The functions returns a list of substring of initial string // divided by given separator include empty strings //============================================================================ -vector SALOMEDSImpl_Tool::splitStringWithEmpty(const string& theValue, char sep) + +std::vector treatRepetation(const std::string& theValue); + +std::vector treatRepetation(const std::string& theValue) { - vector aResult; - if(theValue[0] == sep ) aResult.push_back(string()); + std::vector aResult; + int pos = theValue.find(";*="); + if(pos < 0 ) + { + aResult.push_back(theValue); + return aResult; + } + std::string val(theValue.substr(0, pos)); + std::string suffix(theValue.substr(pos+3)); + int nb; + std::istringstream tmp(suffix); + tmp >> nb; + for(int i=0; i SALOMEDSImpl_Tool::splitStringWithEmpty(const std::string& theValue, char sep) +{ + std::vector aResult; + if(theValue[0] == sep ) aResult.push_back(std::string()); int pos = theValue.find(sep); if(pos < 0 ) { - aResult.push_back(theValue); + if(sep == '|') + { + std::vector tmp = treatRepetation(theValue); + std::copy(tmp.begin(), tmp.end(), std::back_insert_iterator< std::vector >(aResult)); + } + else + aResult.push_back(theValue); return aResult; } - string s = theValue; + std::string s = theValue; if(s[0] == sep) s = s.substr(1, s.size()); while((pos = s.find(sep)) >= 0) { - aResult.push_back(s.substr(0, pos)); + if(sep == '|') + { + std::vector tmp = treatRepetation(s.substr(0, pos)); + std::copy(tmp.begin(), tmp.end(), std::back_insert_iterator< std::vector >(aResult)); + } + else + aResult.push_back(s.substr(0, pos)); s = s.substr(pos+1, s.size()); } - if(!s.empty() && s[0] != sep) aResult.push_back(s); - if(theValue[theValue.size()-1] == sep) aResult.push_back(string()); + if(!s.empty() && s[0] != sep) { + if(sep == '|') + { + std::vector tmp = treatRepetation(s); + std::copy(tmp.begin(), tmp.end(), std::back_insert_iterator< std::vector >(aResult)); + } + else + aResult.push_back(s); + } + if(theValue[theValue.size()-1] == sep) aResult.push_back(std::string()); return aResult; } @@ -271,11 +313,11 @@ vector SALOMEDSImpl_Tool::splitStringWithEmpty(const string& theValue, c // purpose : The functions returns a list of lists of substrings of initial string // divided by two given separators include empty strings //============================================================================ -vector< vector > SALOMEDSImpl_Tool::splitStringWithEmpty(const string& theValue, char sep1, char sep2) +std::vector< std::vector > SALOMEDSImpl_Tool::splitStringWithEmpty(const std::string& theValue, char sep1, char sep2) { - vector< vector > aResult; + std::vector< std::vector > aResult; if(theValue.size() > 0) { - vector aSections = splitStringWithEmpty( theValue, sep1 ); + std::vector aSections = splitStringWithEmpty( theValue, sep1 ); for( int i = 0, n = aSections.size(); i < n; i++ ) aResult.push_back( splitStringWithEmpty( aSections[i], sep2 ) ); } @@ -318,21 +360,21 @@ void SALOMEDSImpl_Tool::GetSystemDate(int& year, int& month, int& day, int& hour #ifdef WIN32 # undef GetUserName #endif -string SALOMEDSImpl_Tool::GetUserName() +std::string SALOMEDSImpl_Tool::GetUserName() { #ifdef WIN32 char* pBuff = new char[UNLEN + 1]; DWORD dwSize = UNLEN + 1; - string retVal; + std::string retVal; ::GetUserNameA( pBuff, &dwSize ); - string theTmpUserName(pBuff,(int)dwSize -1 ); + std::string theTmpUserName(pBuff,(int)dwSize -1 ); retVal = theTmpUserName; delete [] pBuff; return retVal; #else struct passwd *infos; infos = getpwuid(getuid()); - return string(infos->pw_name); + return std::string(infos->pw_name); #endif } diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Tool.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_Tool.hxx index cf43ddff3..1d6e7adab 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Tool.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Tool.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_Tool.hxx // Created : Mon Oct 21 16:24:50 2002 // Author : Sergey RUIN @@ -47,8 +48,8 @@ public: // Removes files which are in , the files for deletion are listed in // if is true is also deleted if it is empty static void RemoveTemporaryFiles(const std::string& theDirectory, - const std::vector& theFiles, - const bool IsDirDeleted); + const std::vector& theFiles, + const bool IsDirDeleted); // Returns the name by the path // for an example: if thePath = "/tmp/aaa/doc1.hdf" the function returns "doc1" @@ -68,8 +69,8 @@ public: //The functions returns a list of substring of initial string divided by given separator, //include empty strings static std::vector< std::vector > splitStringWithEmpty(const std::string& theValue, - char separator1, - char separator2); + char separator1, + char separator2); //Returns a system date diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.cxx index 3ac8bb728..1d86d349a 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.cxx @@ -1,28 +1,29 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_UseCaseBuilder.cxx // Author : Sergey RUIN // Module : SALOME -// + #include "SALOMEDSImpl_UseCaseBuilder.hxx" #include "SALOMEDSImpl_SObject.hxx" #include "SALOMEDSImpl_SComponent.hxx" @@ -31,8 +32,6 @@ #include "DF_ChildIterator.hxx" -using namespace std; - #define USE_CASE_LABEL_TAG 2 #define USE_CASE_GUID "AA43BB12-D9CD-11d6-945D-0050DA506788" @@ -100,6 +99,9 @@ bool SALOMEDSImpl_UseCaseBuilder::Append(const SALOMEDSImpl_SObject& theObject) aCurrentNode->Append(aNode); + // Mantis issue 0020136: Drag&Drop in OB + theObject.GetStudy()->addSO_Notification(theObject); + return true; } @@ -120,7 +122,7 @@ bool SALOMEDSImpl_UseCaseBuilder::Remove(const SALOMEDSImpl_SObject& theObject) aNode->Remove(); - vector aList; + std::vector aList; aList.push_back(aNode); SALOMEDSImpl_AttributeReference* aRef = NULL; @@ -151,7 +153,7 @@ bool SALOMEDSImpl_UseCaseBuilder::Remove(const SALOMEDSImpl_SObject& theObject) */ //============================================================================ bool SALOMEDSImpl_UseCaseBuilder::AppendTo(const SALOMEDSImpl_SObject& theFather, - const SALOMEDSImpl_SObject& theObject) + const SALOMEDSImpl_SObject& theObject) { if(!_root || !theFather || !theObject) return false; @@ -170,7 +172,12 @@ bool SALOMEDSImpl_UseCaseBuilder::AppendTo(const SALOMEDSImpl_SObject& theFather aNode->Remove(); - return aFather->Append(aNode); + bool ret = aFather->Append(aNode); + + // Mantis issue 0020136: Drag&Drop in OB + theObject.GetStudy()->addSO_Notification(theObject); + + return ret; } //============================================================================ @@ -179,7 +186,7 @@ bool SALOMEDSImpl_UseCaseBuilder::AppendTo(const SALOMEDSImpl_SObject& theFather */ //============================================================================ bool SALOMEDSImpl_UseCaseBuilder::InsertBefore(const SALOMEDSImpl_SObject& theFirst, - const SALOMEDSImpl_SObject& theNext) + const SALOMEDSImpl_SObject& theNext) { if(!_root || !theFirst || !theNext) return false; @@ -201,7 +208,12 @@ bool SALOMEDSImpl_UseCaseBuilder::InsertBefore(const SALOMEDSImpl_SObject& theFi aFirstNode->Remove(); - return aNode->InsertBefore(aFirstNode); + bool ret = aNode->InsertBefore(aFirstNode); + + // Mantis issue 0020136: Drag&Drop in OB + theFirst.GetStudy()->addSO_Notification(theFirst); + + return ret; } @@ -267,12 +279,34 @@ bool SALOMEDSImpl_UseCaseBuilder::HasChildren(const SALOMEDSImpl_SObject& theObj return (aNode->GetFirst()); } +//============================================================================ +/*! Function : GetFather + * Purpose : + */ +//============================================================================ +SALOMEDSImpl_SObject SALOMEDSImpl_UseCaseBuilder::GetFather(const SALOMEDSImpl_SObject& theObject) +{ + SALOMEDSImpl_SObject so; + if (!_root || !theObject) return so; + + DF_Label aLabel = theObject.GetLabel(); + if (aLabel.IsNull()) return so; + + SALOMEDSImpl_AttributeTreeNode* aNode = NULL; + if (!(aNode=(SALOMEDSImpl_AttributeTreeNode*)aLabel.FindAttribute(_root->ID()))) return so; + + SALOMEDSImpl_AttributeTreeNode* aFatherNode = aNode->GetFather(); + if (!aFatherNode) return so; + + return aFatherNode->GetSObject(); +} + //============================================================================ /*! Function : SetName * Purpose : */ //============================================================================ -bool SALOMEDSImpl_UseCaseBuilder::SetName(const string& theName) { +bool SALOMEDSImpl_UseCaseBuilder::SetName(const std::string& theName) { if(!_root) return false; SALOMEDSImpl_AttributeName* aNameAttrib = NULL; @@ -312,9 +346,9 @@ SALOMEDSImpl_SObject SALOMEDSImpl_UseCaseBuilder::GetCurrentObject() * Purpose : */ //============================================================================ -string SALOMEDSImpl_UseCaseBuilder::GetName() +std::string SALOMEDSImpl_UseCaseBuilder::GetName() { - string aString; + std::string aString; if(!_root) return aString; SALOMEDSImpl_AttributeName* aName = NULL; @@ -336,14 +370,35 @@ bool SALOMEDSImpl_UseCaseBuilder::IsUseCase(const SALOMEDSImpl_SObject& theObjec return false; } +//============================================================================ +/*! Function : IsUseCaseNode + * Purpose : + */ +//============================================================================ +bool SALOMEDSImpl_UseCaseBuilder::IsUseCaseNode(const SALOMEDSImpl_SObject& theObject) +{ + if(!_root) return false; + + DF_Label aLabel; + if (!theObject) aLabel = _root->Label(); + else + aLabel = theObject.GetLabel(); + if(aLabel.IsNull()) return false; + + SALOMEDSImpl_AttributeTreeNode* aNode = NULL; + if(!(aNode=(SALOMEDSImpl_AttributeTreeNode*)aLabel.FindAttribute(_root->ID()))) return false; + + return true; +} + //============================================================================ /*! Function : NewUseCase * Purpose : */ //============================================================================ -SALOMEDSImpl_SObject SALOMEDSImpl_UseCaseBuilder::AddUseCase(const string& theName) +SALOMEDSImpl_SObject SALOMEDSImpl_UseCaseBuilder::AddUseCase(const std::string& theName) { - string aBasicGUID(USE_CASE_GUID); + std::string aBasicGUID(USE_CASE_GUID); //Create a use cases structure if it not exists @@ -397,7 +452,7 @@ SALOMEDSImpl_UseCaseBuilder::GetUseCaseIterator(const SALOMEDSImpl_SObject& theO } -SALOMEDSImpl_SObject SALOMEDSImpl_UseCaseBuilder::GetSObject(const string& theEntry) +SALOMEDSImpl_SObject SALOMEDSImpl_UseCaseBuilder::GetSObject(const std::string& theEntry) { DF_Label L = DF_Label::Label(_root->Label(), theEntry); return SALOMEDSImpl_Study::SObject(L); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.hxx index 0c57e3356..19d1df0bb 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_UseCaseBuilder.hxx // Author : Sergey RUIN // Module : SALOME @@ -64,8 +65,12 @@ public: virtual bool HasChildren(const SALOMEDSImpl_SObject& theObject); + virtual SALOMEDSImpl_SObject GetFather(const SALOMEDSImpl_SObject& theObject); + virtual bool IsUseCase(const SALOMEDSImpl_SObject& theObject); + virtual bool IsUseCaseNode(const SALOMEDSImpl_SObject& theObject); + virtual bool SetName(const std::string& theName); virtual SALOMEDSImpl_SObject GetCurrentObject(); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseIterator.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseIterator.cxx index 804797821..ba8b9c5bc 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseIterator.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseIterator.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_UseCaseIterator.cxx // Author : Serge RUIN // Module : SALOME @@ -27,8 +28,6 @@ #include "SALOMEDSImpl_SObject.hxx" #include "SALOMEDSImpl_Study.hxx" -using namespace std; - //============================================================================ /*! Function : empty constructor * Purpose : @@ -46,8 +45,8 @@ SALOMEDSImpl_UseCaseIterator::SALOMEDSImpl_UseCaseIterator() */ //============================================================================ SALOMEDSImpl_UseCaseIterator::SALOMEDSImpl_UseCaseIterator(const DF_Label& theLabel, - const string& theGUID, - const bool allLevels) + const std::string& theGUID, + const bool allLevels) :_guid(theGUID), _levels(allLevels) { if((_node = (SALOMEDSImpl_AttributeTreeNode*)theLabel.FindAttribute(_guid))) { diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseIterator.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseIterator.hxx index 561bf0dea..42f8d2bbb 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseIterator.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseIterator.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSImpl_UseCaseIterator.hxx // Author : Sergey RUIN // Module : SALOME diff --git a/src/SALOMEDSImpl/Test/Makefile.am b/src/SALOMEDSImpl/Test/Makefile.am index 3b02fb3c4..4865ba3fe 100644 --- a/src/SALOMEDSImpl/Test/Makefile.am +++ b/src/SALOMEDSImpl/Test/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : Makefile.am # Author : Paul RASCLE # Module : KERNEL @@ -35,7 +36,7 @@ include $(top_srcdir)/salome_adm/unix/make_common_starter.am salomeinclude_HEADERS= SALOMEDSImplTest.hxx # Scripts to be installed -dist_salomescript_SCRIPTS = TestSALOMEDSImpl.py +dist_salomescript_PYTHON = TestSALOMEDSImpl.py # # =============================================================== @@ -58,7 +59,6 @@ COMMON_CPPFLAGS=\ -I$(srcdir)/$(RPATH)/LifeCycleCORBA \ -I$(srcdir)/$(RPATH)/DF \ -I$(srcdir)/$(RPATH)/SALOMEDSImpl \ - -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ @BOOST_CPPFLAGS@ diff --git a/src/SALOMEDSImpl/Test/SALOMEDSImplTest.cxx b/src/SALOMEDSImpl/Test/SALOMEDSImplTest.cxx index 4092158dd..e801afc58 100644 --- a/src/SALOMEDSImpl/Test/SALOMEDSImplTest.cxx +++ b/src/SALOMEDSImpl/Test/SALOMEDSImplTest.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "SALOMEDSImplTest.hxx" #include @@ -34,7 +35,6 @@ #include "SALOMEDSImpl_StudyBuilder.hxx" #include "SALOMEDSImpl_GenericAttribute.hxx" -using namespace std; // ============================================================================ /*! @@ -90,7 +90,7 @@ void SALOMEDSImplTest::testAttributeParameter() CPPUNIT_ASSERT(_ap->IsSet("BoolValue", PT_BOOLEAN)); CPPUNIT_ASSERT(!_ap->GetBool("BoolValue")); - vector intArray; + std::vector intArray; intArray.push_back(0); intArray.push_back(1); @@ -99,7 +99,7 @@ void SALOMEDSImplTest::testAttributeParameter() CPPUNIT_ASSERT(_ap->GetIntArray("IntArray")[0] == 0); CPPUNIT_ASSERT(_ap->GetIntArray("IntArray")[1] == 1); - vector realArray; + std::vector realArray; realArray.push_back(0.0); realArray.push_back(1.1); @@ -108,7 +108,7 @@ void SALOMEDSImplTest::testAttributeParameter() CPPUNIT_ASSERT(_ap->GetRealArray("RealArray")[0] == 0.0); CPPUNIT_ASSERT(_ap->GetRealArray("RealArray")[1] == 1.1); - vector strArray; + std::vector strArray; strArray.push_back("hello"); strArray.push_back("world"); diff --git a/src/SALOMEDSImpl/Test/SALOMEDSImplTest.hxx b/src/SALOMEDSImpl/Test/SALOMEDSImplTest.hxx index 635c76394..07944d285 100644 --- a/src/SALOMEDSImpl/Test/SALOMEDSImplTest.hxx +++ b/src/SALOMEDSImpl/Test/SALOMEDSImplTest.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef _SALOMEDSImplTEST_HXX_ #define _SALOMEDSImplTEST_HXX_ diff --git a/src/SALOMEDSImpl/Test/TestSALOMEDSImpl.cxx b/src/SALOMEDSImpl/Test/TestSALOMEDSImpl.cxx index d68aee80e..ec95811f7 100644 --- a/src/SALOMEDSImpl/Test/TestSALOMEDSImpl.cxx +++ b/src/SALOMEDSImpl/Test/TestSALOMEDSImpl.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // --- include all SALOMEDSImpl Test from basics until the present directory // #include "SALOMEDSImplTest.hxx" diff --git a/src/SALOMEDSImpl/Test/TestSALOMEDSImpl.py b/src/SALOMEDSImpl/Test/TestSALOMEDSImpl.py index 97abd2542..9e4cab96e 100644 --- a/src/SALOMEDSImpl/Test/TestSALOMEDSImpl.py +++ b/src/SALOMEDSImpl/Test/TestSALOMEDSImpl.py @@ -1,24 +1,26 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + import sys, os,signal,string,commands import runSalome import orbmodule diff --git a/src/SALOMEDSImpl/testDS.cxx b/src/SALOMEDSImpl/testDS.cxx index 1328442a6..c8517ce3e 100644 --- a/src/SALOMEDSImpl/testDS.cxx +++ b/src/SALOMEDSImpl/testDS.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + //File: testDS.cxx //Author: Sergey RUIN // @@ -44,44 +45,42 @@ //#include "SALOMEDSImpl_.hxx" -using namespace std; - int main (int argc, char * argv[]) { - cout << "Test started " << endl; + std::cout << "Test started " << std::endl; SALOMEDSImpl_StudyManager* aSM = new SALOMEDSImpl_StudyManager(); - cout << "Manager is created " << endl; + std::cout << "Manager is created " << std::endl; SALOMEDSImpl_Study* aStudy = aSM->NewStudy("SRN"); - cout << "Study with id = " << aStudy->StudyId() << " is created " << endl; + std::cout << "Study with id = " << aStudy->StudyId() << " is created " << std::endl; - cout << "Check the study lock, locking" << endl; + std::cout << "Check the study lock, locking" << std::endl; aStudy->SetStudyLock("SRN"); - cout << "Is study locked = " << aStudy->IsStudyLocked() << endl; - vector ids = aStudy->GetLockerID(); + std::cout << "Is study locked = " << aStudy->IsStudyLocked() << std::endl; + std::vector ids = aStudy->GetLockerID(); for(int i = 0; iUnLockStudy("SRN"); - cout << "Is study locked = " << aStudy->IsStudyLocked() << endl; + std::cout << "Is study locked = " << aStudy->IsStudyLocked() << std::endl; SALOMEDSImpl_StudyBuilder* aBuilder = aStudy->NewBuilder(); - cout << "StudyBuilder is created " << endl; + std::cout << "StudyBuilder is created " << std::endl; SALOMEDSImpl_SComponent aSC = aBuilder->NewComponent("TEST"); - cout << "New component with type " << aSC.ComponentDataType() << " is created " << endl; + std::cout << "New component with type " << aSC.ComponentDataType() << " is created " << std::endl; SALOMEDSImpl_SObject aSO = aBuilder->NewObject(aSC); - cout << "New SObject with ID = " << aSO.GetID() << " is created" << endl; - cout << "An entry of newly created SO is " << aSO.GetLabel().Entry() << endl; + std::cout << "New SObject with ID = " << aSO.GetID() << " is created" << std::endl; + std::cout << "An entry of newly created SO is " << aSO.GetLabel().Entry() << std::endl; SALOMEDSImpl_AttributeIOR* aIORA = SALOMEDSImpl_AttributeIOR::Set(aSO.GetLabel(), "ior1234"); - cout << "New AttributeIOR is created, it contains " << dynamic_cast(aIORA)->Value() << endl; - cout << "Attribute has type: " << aIORA->Type() << " and value: " << aIORA->Save() << endl; - cout << "Just another way to create an attribute: official one :) " << endl; - cout << "Is SO null : " << aSO.IsNull()<< endl; + std::cout << "New AttributeIOR is created, it contains " << dynamic_cast(aIORA)->Value() << std::endl; + std::cout << "Attribute has type: " << aIORA->Type() << " and value: " << aIORA->Save() << std::endl; + std::cout << "Just another way to create an attribute: official one :) " << std::endl; + std::cout << "Is SO null : " << aSO.IsNull()<< std::endl; DF_Attribute* aTDFAttr = aBuilder->FindOrCreateAttribute(aSO, "AttributeName"); SALOMEDSImpl_AttributeName* aRN = dynamic_cast(aTDFAttr); aRN->SetValue("name_attribute"); - cout << " The type = " << aRN->Type() << endl; - cout << "Attribute has type: " << aRN->Type() << " and value: " << aRN->Save() << endl; - cout << "Check GetObjectPath: " << aStudy->GetObjectPath(aSO) << endl; + std::cout << " The type = " << aRN->Type() << std::endl; + std::cout << "Attribute has type: " << aRN->Type() << " and value: " << aRN->Save() << std::endl; + std::cout << "Check GetObjectPath: " << aStudy->GetObjectPath(aSO) << std::endl; SALOMEDSImpl_SObject aSubSO = aBuilder->NewObject(aSO); aTDFAttr = aBuilder->FindOrCreateAttribute(aSubSO, "AttributeIOR"); @@ -90,141 +89,141 @@ int main (int argc, char * argv[]) aBuilder->Addreference(aSubSO, aSO); SALOMEDSImpl_SObject aRefObject; aSubSO.ReferencedObject(aRefObject); - cout << "Check reference : ReferencedObject is " << aRefObject.GetID() << endl; - cout << "Check : Remove object: " << endl; + std::cout << "Check reference : ReferencedObject is " << aRefObject.GetID() << std::endl; + std::cout << "Check : Remove object: " << std::endl; aBuilder->RemoveObject(aSubSO); - cout << "Remove: done" << endl; + std::cout << "Remove: done" << std::endl; - cout << "Try invalid attribute creation" << endl; + std::cout << "Try invalid attribute creation" << std::endl; aTDFAttr = aBuilder->FindOrCreateAttribute(aSubSO, "invalid type"); - cout << "Address of created attribute : " << aTDFAttr << endl; + std::cout << "Address of created attribute : " << aTDFAttr << std::endl; - cout << "Check AttributeUserID" << endl; + std::cout << "Check AttributeUserID" << std::endl; aTDFAttr = aBuilder->FindOrCreateAttribute(aSubSO, "AttributeUserID"); if(aTDFAttr) { - cout << "Attribute UserID was created succesfully : id = " << dynamic_cast(aTDFAttr)->Value() << endl; + std::cout << "Attribute UserID was created succesfully : id = " << dynamic_cast(aTDFAttr)->Value() << std::endl; } - else cout << "Can't create AttributeUserID" << endl; + else std::cout << "Can't create AttributeUserID" << std::endl; - string id = "0e1c36e6-379b-4d90-ab3b-17a14310e648"; + std::string id = "0e1c36e6-379b-4d90-ab3b-17a14310e648"; dynamic_cast(aTDFAttr)->SetValue(id); - cout << "SetValue id = " << dynamic_cast(aTDFAttr)->Value() << endl; + std::cout << "SetValue id = " << dynamic_cast(aTDFAttr)->Value() << std::endl; - string id2 = "0e1c36e6-379b-4d90-ab3b-18a14310e648"; + std::string id2 = "0e1c36e6-379b-4d90-ab3b-18a14310e648"; aTDFAttr = aBuilder->FindOrCreateAttribute(aSubSO, "AttributeUserID"+id2); if(aTDFAttr) { - cout << "Attribute UserID was created succesfully : id = " << dynamic_cast(aTDFAttr)->Value() << endl; + std::cout << "Attribute UserID was created succesfully : id = " << dynamic_cast(aTDFAttr)->Value() << std::endl; } - else cout << "Can't create AttributeUserID" << endl; + else std::cout << "Can't create AttributeUserID" << std::endl; - cout << "Check AttributeTreeNode " << endl; + std::cout << "Check AttributeTreeNode " << std::endl; aTDFAttr = aBuilder->FindOrCreateAttribute(aSO, "AttributeTreeNode"); - cout << dynamic_cast(aTDFAttr)->Type() << endl; - cout << "Check AttributeTreeNode : done " << endl; + std::cout << dynamic_cast(aTDFAttr)->Type() << std::endl; + std::cout << "Check AttributeTreeNode : done " << std::endl; aTDFAttr = aBuilder->FindOrCreateAttribute(aSO, "AttributeParameter"); - cout << dynamic_cast(aTDFAttr)->Type() << endl; + std::cout << dynamic_cast(aTDFAttr)->Type() << std::endl; - cout << "Check the attributes on SObject" << endl; - vector aSeq = aSO.GetAllAttributes(); + std::cout << "Check the attributes on SObject" << std::endl; + std::vector aSeq = aSO.GetAllAttributes(); for(int i = 0; i < aSeq.size(); i++) - cout << "Found: " << dynamic_cast(aSeq[i])->Type() << endl; + std::cout << "Found: " << dynamic_cast(aSeq[i])->Type() << std::endl; - cout << "Check UseCase" << endl; + std::cout << "Check UseCase" << std::endl; SALOMEDSImpl_UseCaseBuilder* ucb = aStudy->GetUseCaseBuilder(); ucb->AddUseCase("use_case1"); ucb->AddUseCase("use_case2"); SALOMEDSImpl_UseCaseIterator ucitr = ucb->GetUseCaseIterator(SALOMEDSImpl_SObject()); ucitr.Init(false); - cout << "More? : " << ucitr.More() << endl; + std::cout << "More? : " << ucitr.More() << std::endl; - cout << "Check AttributeParameter " << endl; + std::cout << "Check AttributeParameter " << std::endl; SALOMEDSImpl_AttributeParameter* AP = dynamic_cast(aTDFAttr); - cout << "AttributeParameter with type : " << AP->Type() << endl; + std::cout << "AttributeParameter with type : " << AP->Type() << std::endl; AP->SetInt("1", 123); - cout << "IsSet for int: " << AP->IsSet("1", PT_INTEGER) << " value : " << AP->GetInt("1") << endl; + std::cout << "IsSet for int: " << AP->IsSet("1", PT_INTEGER) << " value : " << AP->GetInt("1") << std::endl; //for(int i = 2; i < 5; i++) AP->SetInt(i, i*i); AP->SetReal("1", 123.123); - cout << "IsSet for real: " << AP->IsSet("1", PT_REAL) << " value : " << AP->GetReal("1") << endl; + std::cout << "IsSet for real: " << AP->IsSet("1", PT_REAL) << " value : " << AP->GetReal("1") << std::endl; //for(int i = 2; i < 5; i++) AP->SetReal(i, 0.1); AP->SetString("1", "value is 123.123!"); - cout << "IsSet for string: " << AP->IsSet("1", PT_STRING) << " value : " << AP->GetString("1") << endl; + std::cout << "IsSet for string: " << AP->IsSet("1", PT_STRING) << " value : " << AP->GetString("1") << std::endl; /* for(int i = 2; i < 5; i++) { - string s((double)(1.0/i)); - cout << "Setting for " << i << " value : " << s << endl; + std::string s((double)(1.0/i)); + std::cout << "Setting for " << i << " value : " << s << std::endl; AP->SetString(i, s); } */ AP->SetBool("1", true); - cout << "IsSet for bool: " << AP->IsSet("1", PT_BOOLEAN) << " value : " << AP->GetBool("1") << endl; + std::cout << "IsSet for bool: " << AP->IsSet("1", PT_BOOLEAN) << " value : " << AP->GetBool("1") << std::endl; //for(int i = 2; i < 5; i++) AP->SetBool(i, 0); - vector v; + std::vector v; v.push_back(111.111); v.push_back(222.22222); v.push_back(333.3333333); AP->SetRealArray("1", v); - cout << "IsSet for array: " << AP->IsSet("1", PT_REALARRAY); - vector v2 = AP->GetRealArray("1"); - cout.precision(10); - cout << " values : "; - for(int i = 0; iIsSet("1", PT_REALARRAY); + std::vector v2 = AP->GetRealArray("1"); + std::cout.precision(10); + std::cout << " values : "; + for(int i = 0; iSetRealArray("2", v); - vector vi; + std::vector vi; vi.push_back(1); vi.push_back(2); AP->SetIntArray("2", vi); - vector vs; + std::vector vs; vs.push_back("hello, "); vs.push_back("world!"); AP->SetStrArray("3", vs); - string as = AP->Save(); - cout << "AS = " << as << endl; + std::string as = AP->Save(); + std::cout << "AS = " << as << std::endl; AP->Load(as); - cout << "Restored string with id = 1 is: " << AP->GetString("1") << endl; - cout << "Restored int with id = 2 is: " << AP->GetInt("1") << endl; - cout << "Restored real with id = 3 is: " << AP->GetReal("1") << endl; - cout << "Restored bool with id = 1 is: " << AP->GetBool("1") << endl; + std::cout << "Restored string with id = 1 is: " << AP->GetString("1") << std::endl; + std::cout << "Restored int with id = 2 is: " << AP->GetInt("1") << std::endl; + std::cout << "Restored real with id = 3 is: " << AP->GetReal("1") << std::endl; + std::cout << "Restored bool with id = 1 is: " << AP->GetBool("1") << std::endl; v2 = AP->GetRealArray("2"); - cout << "Restored real array with id = 2 is: "; - for(int i = 0; iGetIntArray("2"); - cout << "Restored int array with id = 2 is: "; - for(int i = 0; iGetStrArray("3"); - cout << "Restored string array with id = 2 is: "; - for(int i = 0; iRemoveID("1", PT_INTEGER); - cout << "IsSet with id = 1, type = PT_INTEGER : " << AP->IsSet("1", PT_INTEGER) << endl; - cout << "Check RemoveID is done" << endl; + std::cout << "IsSet with id = 1, type = PT_INTEGER : " << AP->IsSet("1", PT_INTEGER) << std::endl; + std::cout << "Check RemoveID is done" << std::endl; - cout << "Check AttributeParameter : done" << endl; + std::cout << "Check AttributeParameter : done" << std::endl; SALOMEDSImpl_SComponent tst = aBuilder->NewComponent("TEST2"); @@ -237,13 +236,13 @@ int main (int argc, char * argv[]) SALOMEDSImpl_ChildIterator ci=aStudy->NewChildIterator(tst); for(ci.InitEx(true); ci.More(); ci.Next()) - cout << "######## " << ci.Value().GetID() << endl; + std::cout << "######## " << ci.Value().GetID() << std::endl; DF_ChildIterator dci(tst.GetLabel(), true); for(; dci.More(); dci.Next()) - cout << "###### DF: " << dci.Value().Entry() << endl; + std::cout << "###### DF: " << dci.Value().Entry() << std::endl; - cout << "Test finished " << endl; + std::cout << "Test finished " << std::endl; return 0; } diff --git a/src/SALOMELocalTrace/BaseTraceCollector.cxx b/src/SALOMELocalTrace/BaseTraceCollector.cxx index ec44a684c..d3090fc12 100644 --- a/src/SALOMELocalTrace/BaseTraceCollector.cxx +++ b/src/SALOMELocalTrace/BaseTraceCollector.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : BaseTraceCollector.cxx // Author : Paul RASCLE (EDF) // Module : KERNEL @@ -32,8 +33,6 @@ #include "BaseTraceCollector.hxx" #include "LocalTraceBufferPool.hxx" -using namespace std; - // Class attributes initialisation, for class method BaseTraceCollector::run BaseTraceCollector* BaseTraceCollector::_singleton = 0; diff --git a/src/SALOMELocalTrace/BaseTraceCollector.hxx b/src/SALOMELocalTrace/BaseTraceCollector.hxx index fbe879ef1..30fcdbd2e 100644 --- a/src/SALOMELocalTrace/BaseTraceCollector.hxx +++ b/src/SALOMELocalTrace/BaseTraceCollector.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : BaseTraceCollector.hxx // Author : Paul RASCLE (EDF) // Module : KERNEL diff --git a/src/SALOMELocalTrace/FileTraceCollector.cxx b/src/SALOMELocalTrace/FileTraceCollector.cxx index 4bf7c3356..bca665bc1 100644 --- a/src/SALOMELocalTrace/FileTraceCollector.cxx +++ b/src/SALOMELocalTrace/FileTraceCollector.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : FileTraceCollector.cxx // Author : Paul RASCLE (EDF) // Module : KERNEL @@ -29,8 +30,6 @@ #include #include -using namespace std; - //#define _DEVDEBUG_ #include "FileTraceCollector.hxx" @@ -56,21 +55,21 @@ BaseTraceCollector* FileTraceCollector::instance(const char *fileName) int ret; ret = pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone if (_singleton == 0) // another thread may have got - { // the lock after the first test - DEVTRACE("FileTraceCollector:: instance()"); - BaseTraceCollector* myInstance = new FileTraceCollector(); - _fileName = fileName; - DEVTRACE(" _fileName: " << _fileName); - - sem_init(&_sem,0,0); // to wait until run thread is initialized - pthread_t traceThread; - int bid = 0; - pthread_create(&traceThread, NULL, - FileTraceCollector::run, (void *)bid); - sem_wait(&_sem); - _singleton = myInstance; // _singleton known only when init done - DEVTRACE("FileTraceCollector:: instance()-end"); - } + { // the lock after the first test + DEVTRACE("FileTraceCollector:: instance()"); + BaseTraceCollector* myInstance = new FileTraceCollector(); + _fileName = fileName; + DEVTRACE(" _fileName: " << _fileName); + + sem_init(&_sem,0,0); // to wait until run thread is initialized + pthread_t traceThread; + int bid = 0; + pthread_create(&traceThread, NULL, + FileTraceCollector::run, &bid); + sem_wait(&_sem); + _singleton = myInstance; // _singleton known only when init done + DEVTRACE("FileTraceCollector:: instance()-end"); + } ret = pthread_mutex_unlock(&_singletonMutex); // release lock } return _singleton; @@ -100,13 +99,13 @@ void* FileTraceCollector::run(void *bid) // --- opens a file with append mode // so, several processes can share the same file - ofstream traceFile; + std::ofstream traceFile; const char *theFileName = _fileName.c_str(); DEVTRACE("try to open trace file "<< theFileName); - traceFile.open(theFileName, ios::out | ios::app); + traceFile.open(theFileName, std::ios::out | std::ios::app); if (!traceFile) { - cerr << "impossible to open trace file "<< theFileName << endl; + std::cerr << "impossible to open trace file "<< theFileName << std::endl; exit (1); } @@ -116,44 +115,44 @@ void* FileTraceCollector::run(void *bid) while ((!_threadToClose) || myTraceBuffer->toCollect() ) { if (_threadToClose) - { - DEVTRACE("FileTraceCollector _threadToClose"); - //break; - } + { + DEVTRACE("FileTraceCollector _threadToClose"); + //break; + } myTraceBuffer->retrieve(myTrace); if (myTrace.traceType == ABORT_MESS) - { + { #ifndef WIN32 - traceFile << "INTERRUPTION from thread " << myTrace.threadId - << " : " << myTrace.trace; + traceFile << "INTERRUPTION from thread " << myTrace.threadId + << " : " << myTrace.trace; #else - traceFile << "INTERRUPTION from thread " - << (void*)(&myTrace.threadId) - << " : " << myTrace.trace; + traceFile << "INTERRUPTION from thread " + << (void*)(&myTrace.threadId) + << " : " << myTrace.trace; #endif - traceFile.close(); - cout << flush ; + traceFile.close(); + std::cout << std::flush ; #ifndef WIN32 - cerr << "INTERRUPTION from thread " << myTrace.threadId - << " : " << myTrace.trace; + std::cerr << "INTERRUPTION from thread " << myTrace.threadId + << " : " << myTrace.trace; #else - cerr << "INTERRUPTION from thread " << (void*)(&myTrace.threadId) - << " : " << myTrace.trace; + std::cerr << "INTERRUPTION from thread " << (void*)(&myTrace.threadId) + << " : " << myTrace.trace; #endif - cerr << flush ; - exit(1); - } + std::cerr << std::flush ; + exit(1); + } else - { + { #ifndef WIN32 - traceFile << "th. " << myTrace.threadId - << " " << myTrace.trace; + traceFile << "th. " << myTrace.threadId + << " " << myTrace.trace; #else - traceFile << "th. " << (void*)(&myTrace.threadId) - << " " << myTrace.trace; + traceFile << "th. " << (void*)(&myTrace.threadId) + << " " << myTrace.trace; #endif - } + } } DEVTRACE("traceFile.close()"); traceFile.close(); @@ -178,14 +177,14 @@ FileTraceCollector:: ~FileTraceCollector() _threadToClose = 1; myTraceBuffer->insert(NORMAL_MESS,"end of trace\n"); // to wake up thread if (_threadId) - { - int ret = pthread_join(*_threadId, NULL); - if (ret) cerr << "error close FileTraceCollector : "<< ret << endl; - else DEVTRACE("FileTraceCollector destruction OK"); + { + int ret = pthread_join(*_threadId, NULL); + if (ret) std::cerr << "error close FileTraceCollector : "<< ret << std::endl; + else DEVTRACE("FileTraceCollector destruction OK"); delete _threadId; - _threadId = 0; - _threadToClose = 0; - } + _threadId = 0; + _threadToClose = 0; + } _singleton = 0; } ret = pthread_mutex_unlock(&_singletonMutex); // release lock diff --git a/src/SALOMELocalTrace/FileTraceCollector.hxx b/src/SALOMELocalTrace/FileTraceCollector.hxx index 2389a8dba..8697ec144 100644 --- a/src/SALOMELocalTrace/FileTraceCollector.hxx +++ b/src/SALOMELocalTrace/FileTraceCollector.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : FileTraceCollector.hxx // Author : Paul RASCLE (EDF) // Module : KERNEL diff --git a/src/SALOMELocalTrace/LocalTraceBufferPool.cxx b/src/SALOMELocalTrace/LocalTraceBufferPool.cxx index 1b384dc37..484d9391c 100644 --- a/src/SALOMELocalTrace/LocalTraceBufferPool.cxx +++ b/src/SALOMELocalTrace/LocalTraceBufferPool.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // Author : Paul RASCLE (EDF) // Module : KERNEL // $Header$ @@ -28,6 +29,7 @@ #include #include #include +#include #ifndef WIN32 #include @@ -42,8 +44,6 @@ #include "FileTraceCollector.hxx" #include "utilities.h" -using namespace std; - // In case of truncated message, end of trace contains "...\n\0" #define TRUNCATED_MESSAGE "...\n" @@ -83,72 +83,72 @@ LocalTraceBufferPool* LocalTraceBufferPool::instance() int ret; ret = pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone if (_singleton == 0) // another thread may have got - { // the lock after the first test - DEVTRACE("New buffer pool"); - LocalTraceBufferPool* myInstance = new LocalTraceBufferPool(); - - new DESTRUCTOR_OF (*myInstance); - _singleton = myInstance; - - // --- start a trace Collector - - char* traceKind = getenv("SALOME_trace"); - - if ( !traceKind || strcmp(traceKind,"local")==0 ) // mkr : 27.11.2006 : PAL13967 - Distributed supervision graphs - Problem with "SALOME_trace" - { - _myThreadTrace = LocalTraceCollector::instance(); - } - else if (strncmp(traceKind,"file",strlen("file"))==0) - { - const char *fileName; - if (strlen(traceKind) > strlen("file")) - fileName = &traceKind[strlen("file")+1]; - else - fileName = "/tmp/tracetest.log"; - - _myThreadTrace = FileTraceCollector::instance(fileName); - } - else // --- try a dynamic library - { + { // the lock after the first test + DEVTRACE("New buffer pool"); + LocalTraceBufferPool* myInstance = new LocalTraceBufferPool(); + + new DESTRUCTOR_OF (*myInstance); + _singleton = myInstance; + + // --- start a trace Collector + + char* traceKind = getenv("SALOME_trace"); + + if ( !traceKind || strcmp(traceKind,"local")==0 ) // mkr : 27.11.2006 : PAL13967 - Distributed supervision graphs - Problem with "SALOME_trace" + { + _myThreadTrace = LocalTraceCollector::instance(); + } + else if (strncmp(traceKind,"file",strlen("file"))==0) + { + const char *fileName; + if (strlen(traceKind) > strlen("file")) + fileName = &traceKind[strlen("file")+1]; + else + fileName = "/tmp/tracetest.log"; + + _myThreadTrace = FileTraceCollector::instance(fileName); + } + else // --- try a dynamic library + { #ifndef WIN32 - void* handle; - string impl_name = string ("lib") + traceKind - + string("TraceCollector.so"); - handle = dlopen( impl_name.c_str() , RTLD_LAZY ) ; + void* handle; + std::string impl_name = std::string ("lib") + traceKind + + std::string("TraceCollector.so"); + handle = dlopen( impl_name.c_str() , RTLD_LAZY ) ; #else - HINSTANCE handle; - string impl_name = string ("lib") + traceKind + string(".dll"); - handle = LoadLibrary( impl_name.c_str() ); + HINSTANCE handle; + std::string impl_name = std::string ("lib") + traceKind + std::string(".dll"); + handle = LoadLibrary( impl_name.c_str() ); #endif - if ( handle ) - { - typedef BaseTraceCollector * (*FACTORY_FUNCTION) (void); + if ( handle ) + { + typedef BaseTraceCollector * (*FACTORY_FUNCTION) (void); #ifndef WIN32 - FACTORY_FUNCTION TraceCollectorFactory = - (FACTORY_FUNCTION) dlsym(handle, "SingletonInstance"); + FACTORY_FUNCTION TraceCollectorFactory = + (FACTORY_FUNCTION) dlsym(handle, "SingletonInstance"); #else - FACTORY_FUNCTION TraceCollectorFactory = - (FACTORY_FUNCTION)GetProcAddress(handle, "SingletonInstance"); + FACTORY_FUNCTION TraceCollectorFactory = + (FACTORY_FUNCTION)GetProcAddress(handle, "SingletonInstance"); #endif - if ( !TraceCollectorFactory ) - { - cerr << "Can't resolve symbol: SingletonInstance" < #include -using namespace std; - #include "LocalTraceCollector.hxx" // ============================================================================ @@ -51,16 +50,16 @@ BaseTraceCollector* LocalTraceCollector::instance() int ret; ret = pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone if (_singleton == 0) // another thread may have got - { // the lock after the first test - BaseTraceCollector* myInstance = new LocalTraceCollector(); - - sem_init(&_sem,0,0); // to wait until run thread is initialized - pthread_t traceThread; - pthread_create(&traceThread, NULL, - LocalTraceCollector::run, NULL); - sem_wait(&_sem); - _singleton = myInstance; // _singleton known only when init done - } + { // the lock after the first test + BaseTraceCollector* myInstance = new LocalTraceCollector(); + + sem_init(&_sem,0,0); // to wait until run thread is initialized + pthread_t traceThread; + pthread_create(&traceThread, NULL, + LocalTraceCollector::run, NULL); + sem_wait(&_sem); + _singleton = myInstance; // _singleton known only when init done + } ret = pthread_mutex_unlock(&_singletonMutex); // release lock } return _singleton; @@ -92,36 +91,36 @@ void* LocalTraceCollector::run(void *bid) while ((!_threadToClose) || myTraceBuffer->toCollect() ) { if (_threadToClose) - { - DEVTRACE("FileTraceCollector _threadToClose"); - //break; - } + { + DEVTRACE("FileTraceCollector _threadToClose"); + //break; + } myTraceBuffer->retrieve(myTrace); if (myTrace.traceType == ABORT_MESS) - { - cout << flush ; + { + std::cout << std::flush ; #ifndef WIN32 - cerr << "INTERRUPTION from thread " << myTrace.threadId - << " : " << myTrace.trace; + std::cerr << "INTERRUPTION from thread " << myTrace.threadId + << " : " << myTrace.trace; #else - cerr << "INTERRUPTION from thread " << (void*)(&myTrace.threadId) - << " : " << myTrace.trace; + std::cerr << "INTERRUPTION from thread " << (void*)(&myTrace.threadId) + << " : " << myTrace.trace; #endif - cerr << flush ; - exit(1); - } + std::cerr << std::flush ; + exit(1); + } else - { - cout << flush ; + { + std::cout << std::flush ; #ifndef WIN32 - cerr << "th. " << myTrace.threadId << " " << myTrace.trace; + std::cerr << "th. " << myTrace.threadId << " " << myTrace.trace; #else - cerr << "th. " << (void*)(&myTrace.threadId) - << " " << myTrace.trace; + std::cerr << "th. " << (void*)(&myTrace.threadId) + << " " << myTrace.trace; #endif - cerr << flush ; - } + std::cerr << std::flush ; + } } pthread_exit(NULL); return NULL; @@ -144,14 +143,14 @@ LocalTraceCollector:: ~LocalTraceCollector() _threadToClose = 1; myTraceBuffer->insert(NORMAL_MESS,"end of trace\n"); // to wake up thread if (_threadId) - { - int ret = pthread_join(*_threadId, NULL); - if (ret) cerr << "error close LocalTraceCollector : "<< ret << endl; - else DEVTRACE("LocalTraceCollector destruction OK"); + { + int ret = pthread_join(*_threadId, NULL); + if (ret) std::cerr << "error close LocalTraceCollector : "<< ret << std::endl; + else DEVTRACE("LocalTraceCollector destruction OK"); delete _threadId; - _threadId = 0; - _threadToClose = 0; - } + _threadId = 0; + _threadToClose = 0; + } _singleton = 0; } ret = pthread_mutex_unlock(&_singletonMutex); // release lock diff --git a/src/SALOMELocalTrace/LocalTraceCollector.hxx b/src/SALOMELocalTrace/LocalTraceCollector.hxx index 4cfd00b2c..e15f51912 100644 --- a/src/SALOMELocalTrace/LocalTraceCollector.hxx +++ b/src/SALOMELocalTrace/LocalTraceCollector.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : LocalTraceCollector.hxx // Author : Paul RASCLE (EDF) // Module : KERNEL diff --git a/src/SALOMELocalTrace/Makefile.am b/src/SALOMELocalTrace/Makefile.am index 1b3ddc505..a33ebbc6d 100644 --- a/src/SALOMELocalTrace/Makefile.am +++ b/src/SALOMELocalTrace/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # SALOMELocalTrace : log on local machine # File : Makefile.am # Author : Guillaume BOULANT (CSSI) diff --git a/src/SALOMELocalTrace/SALOME_LocalTrace.hxx b/src/SALOMELocalTrace/SALOME_LocalTrace.hxx index 663bdb57f..53dedc942 100755 --- a/src/SALOMELocalTrace/SALOME_LocalTrace.hxx +++ b/src/SALOMELocalTrace/SALOME_LocalTrace.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOME_LocalTrace.hxx // Author : Alexander A. BORODIN // Module : SALOME @@ -27,7 +28,7 @@ #define _SALOME_LOCALTRACE_HXX_ #ifdef WIN32 -# ifdef SALOMELOCALTRACE_EXPORTS +# if defined SALOMELOCALTRACE_EXPORTS || defined SALOMELocalTrace_EXPORTS # define SALOMELOCALTRACE_EXPORT __declspec( dllexport ) # else # define SALOMELOCALTRACE_EXPORT __declspec( dllimport ) diff --git a/src/SALOMELocalTrace/Test/Makefile.am b/src/SALOMELocalTrace/Test/Makefile.am index e97bbb260..1528a755e 100644 --- a/src/SALOMELocalTrace/Test/Makefile.am +++ b/src/SALOMELocalTrace/Test/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # SALOMELocalTrace : log on local machine # File : Makefile.am # Author : Guillaume Boulant (CSSI) @@ -39,7 +40,7 @@ SRCROOT=$(srcdir)/../.. salomeinclude_HEADERS = SALOMELocalTraceTest.hxx # Executable scripts to be installed -dist_salomescript_SCRIPTS = TestSALOMELocalTrace.py +dist_salomescript_PYTHON = TestSALOMELocalTrace.py # # =============================================================== diff --git a/src/SALOMELocalTrace/Test/SALOMELocalTraceTest.cxx b/src/SALOMELocalTrace/Test/SALOMELocalTraceTest.cxx index 73db24652..0e685195c 100644 --- a/src/SALOMELocalTrace/Test/SALOMELocalTraceTest.cxx +++ b/src/SALOMELocalTrace/Test/SALOMELocalTraceTest.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "SALOMELocalTraceTest.hxx" #include @@ -28,8 +29,6 @@ #include "LocalTraceBufferPool.hxx" #include "utilities.h" -using namespace std; - // ============================================================================ /*! @@ -67,12 +66,12 @@ SALOMELocalTraceTest::testSingletonBufferPool() // --- trace on file const char *theFileName = TRACEFILE; - string s = "file:"; + std::string s = "file:"; s += theFileName; CPPUNIT_ASSERT(! setenv("SALOME_trace",s.c_str(),1)); // 1: overwrite - ofstream traceFile; - traceFile.open(theFileName, ios::out | ios::app); + std::ofstream traceFile; + traceFile.open(theFileName, std::ios::out | std::ios::app); CPPUNIT_ASSERT(traceFile); // file created empty, then closed traceFile.close(); @@ -98,7 +97,7 @@ void *PrintHello(void *threadid); void SALOMELocalTraceTest::testLoadBufferPoolLocal() { - string s = "local"; + std::string s = "local"; CPPUNIT_ASSERT(! setenv("SALOME_trace",s.c_str(),1)); // 1: overwrite // --- numThread thread creation for trace generation. @@ -108,7 +107,7 @@ SALOMELocalTraceTest::testLoadBufferPoolLocal() for(t=0;t @@ -60,21 +59,21 @@ BaseTraceCollector* SALOMETraceCollector::instance() int ret; ret = pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone if (_singleton == 0) // another thread may have got - { // the lock after the first test - BaseTraceCollector* myInstance = new SALOMETraceCollector(); - int argc=0; - char *_argv=0; - char ** argv = &_argv; - _orb = CORBA::ORB_init (argc, argv); - - sem_init(&_sem,0,0); // to wait until run thread is initialized - pthread_t traceThread; - int bid = 0; - pthread_create(&traceThread, NULL, - SALOMETraceCollector::run, (void *)bid); - sem_wait(&_sem); - _singleton = myInstance; // _singleton known only when init done - } + { // the lock after the first test + BaseTraceCollector* myInstance = new SALOMETraceCollector(); + int argc=0; + char *_argv=0; + char ** argv = &_argv; + _orb = CORBA::ORB_init (argc, argv); + + sem_init(&_sem,0,0); // to wait until run thread is initialized + pthread_t traceThread; + int bid = 0; + pthread_create(&traceThread, NULL, + SALOMETraceCollector::run, &bid); + sem_wait(&_sem); + _singleton = myInstance; // _singleton known only when init done + } ret = pthread_mutex_unlock(&_singletonMutex); // release lock } return _singleton; @@ -108,14 +107,14 @@ void* SALOMETraceCollector::run(void *bid) m_pInterfaceLogger = SALOME_Logger::Logger::_narrow(obj); if (CORBA::is_nil(m_pInterfaceLogger)) { - cerr << "Logger server not found ! Abort" << endl; - cerr << flush ; + std::cerr << "Logger server not found ! Abort" << std::endl; + std::cerr << std::flush ; exit(1); } else { CORBA::String_var LogMsg = - CORBA::string_dup("\n---Init logger trace---\n"); + CORBA::string_dup("\n---Init logger trace---\n"); m_pInterfaceLogger->putMessage(LogMsg); DEVTRACE("Logger server found"); } @@ -126,44 +125,44 @@ void* SALOMETraceCollector::run(void *bid) while ((!_threadToClose) || myTraceBuffer->toCollect() ) { if (_threadToClose) - { - DEVTRACE("SALOMETraceCollector _threadToClose"); - //break; - } + { + DEVTRACE("SALOMETraceCollector _threadToClose"); + //break; + } myTraceBuffer->retrieve(myTrace); if (!CORBA::is_nil(_orb)) - { - if (myTrace.traceType == ABORT_MESS) - { - stringstream abortMessage(""); + { + if (myTrace.traceType == ABORT_MESS) + { + std::stringstream abortMessage(""); #ifndef WIN32 - abortMessage << "INTERRUPTION from thread " - << myTrace.threadId << " : " << myTrace.trace; + abortMessage << "INTERRUPTION from thread " + << myTrace.threadId << " : " << myTrace.trace; #else - abortMessage << "INTERRUPTION from thread " - << (void*)&myTrace.threadId - << " : " << myTrace.trace; + abortMessage << "INTERRUPTION from thread " + << (void*)&myTrace.threadId + << " : " << myTrace.trace; #endif - CORBA::String_var LogMsg = - CORBA::string_dup(abortMessage.str().c_str()); - m_pInterfaceLogger->putMessage(LogMsg); - exit(1); - } - else - { - stringstream aMessage(""); + CORBA::String_var LogMsg = + CORBA::string_dup(abortMessage.str().c_str()); + m_pInterfaceLogger->putMessage(LogMsg); + exit(1); + } + else + { + std::stringstream aMessage(""); #ifndef WIN32 - aMessage << "th. " << myTrace.threadId + aMessage << "th. " << myTrace.threadId #else - aMessage << "th. " << (void*)&myTrace.threadId + aMessage << "th. " << (void*)&myTrace.threadId #endif - << " " << myTrace.trace; - CORBA::String_var LogMsg = - CORBA::string_dup(aMessage.str().c_str()); - m_pInterfaceLogger->putMessage(LogMsg); - } - } + << " " << myTrace.trace; + CORBA::String_var LogMsg = + CORBA::string_dup(aMessage.str().c_str()); + m_pInterfaceLogger->putMessage(LogMsg); + } + } } pthread_exit(NULL); return NULL; @@ -186,14 +185,14 @@ SALOMETraceCollector:: ~SALOMETraceCollector() _threadToClose = 1; myTraceBuffer->insert(NORMAL_MESS,"end of trace\n"); // to wake up thread if (_threadId) - { - int ret = pthread_join(*_threadId, NULL); - if (ret) cerr << "error close SALOMETraceCollector : "<< ret << endl; - else DEVTRACE("SALOMETraceCollector destruction OK"); + { + int ret = pthread_join(*_threadId, NULL); + if (ret) std::cerr << "error close SALOMETraceCollector : "<< ret << std::endl; + else DEVTRACE("SALOMETraceCollector destruction OK"); delete _threadId; - _threadId = 0; - _threadToClose = 0; - } + _threadId = 0; + _threadToClose = 0; + } _singleton = 0; } ret = pthread_mutex_unlock(&_singletonMutex); // release lock diff --git a/src/SALOMETraceCollector/SALOMETraceCollector.hxx b/src/SALOMETraceCollector/SALOMETraceCollector.hxx index 5b32f4480..645b8954b 100644 --- a/src/SALOMETraceCollector/SALOMETraceCollector.hxx +++ b/src/SALOMETraceCollector/SALOMETraceCollector.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMETraceCollector.hxx // Author : Paul RASCLE (EDF) // Module : KERNEL @@ -36,7 +37,7 @@ //! for usage without CORBA #ifdef WIN32 -# ifdef SALOMETRACECOLLECTOR_EXPORTS +# if defined SALOMETRACECOLLECTOR_EXPORTS || defined with_loggerTraceCollector_EXPORTS # define SALOMETRACECOLLECTOR_EXPORT __declspec( dllexport ) # else # define SALOMETRACECOLLECTOR_EXPORT diff --git a/src/SALOMETraceCollector/Test/Makefile.am b/src/SALOMETraceCollector/Test/Makefile.am index 9ef92294d..ac0980541 100644 --- a/src/SALOMETraceCollector/Test/Makefile.am +++ b/src/SALOMETraceCollector/Test/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + ####################################### library # SALOMELocalTrace : log on local machine # File : Makefile.am @@ -38,7 +39,7 @@ include $(top_srcdir)/salome_adm/unix/make_common_starter.am salomeinclude_HEADERS= SALOMETraceCollectorTest.hxx # Scripts to be installed -dist_salomescript_SCRIPTS = TestSALOMETraceCollector.py +dist_salomescript_PYTHON = TestSALOMETraceCollector.py # @@ -56,8 +57,7 @@ COMMON_CPPFLAGS=\ @CPPUNIT_INCLUDES@ \ -I$(srcdir)/$(RPATH)/Basics -I$(srcdir)/$(RPATH)/Basics/Test \ -I$(srcdir)/$(RPATH)/SALOMELocalTrace -I$(srcdir)/$(RPATH)/SALOMELocalTrace/Test\ - -I$(srcdir)/$(RPATH)/SALOMETraceCollector \ - -I$(top_builddir)/salome_adm/unix + -I$(srcdir)/$(RPATH)/SALOMETraceCollector # This local variable defines the list of dependant libraries common to all target in this package. COMMON_LIBS =\ diff --git a/src/SALOMETraceCollector/Test/SALOMETraceCollectorTest.cxx b/src/SALOMETraceCollector/Test/SALOMETraceCollectorTest.cxx index 5b202ee2c..61c0ee91b 100644 --- a/src/SALOMETraceCollector/Test/SALOMETraceCollectorTest.cxx +++ b/src/SALOMETraceCollector/Test/SALOMETraceCollectorTest.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "SALOMETraceCollectorTest.hxx" #include @@ -28,7 +29,6 @@ #include "LocalTraceBufferPool.hxx" #include "utilities.h" -using namespace std; // ============================================================================ /*! @@ -65,7 +65,7 @@ void *PrintHello(void *threadid); void SALOMETraceCollectorTest::testLoadBufferPoolCORBA() { - string s = "with_logger"; + std::string s = "with_logger"; CPPUNIT_ASSERT(! setenv("SALOME_trace",s.c_str(),1)); // 1: overwrite // --- NUM_THREADS thread creation for trace generation. @@ -75,7 +75,7 @@ SALOMETraceCollectorTest::testLoadBufferPoolCORBA() for(t=0;t #endif -using namespace std; - // ============================================================================ /*! * Wait until a server is registered in naming service. @@ -48,7 +47,7 @@ using namespace std; // ============================================================================ CORBA::Object_ptr TraceCollector_WaitForServerReadiness(CORBA::ORB_ptr orb, - string serverName) + std::string serverName) { long TIMESleep = 500000000; int NumberOfTries = 40; @@ -75,72 +74,72 @@ CORBA::Object_ptr TraceCollector_WaitForServerReadiness(CORBA::ORB_ptr orb, CORBA::Object_var theObj=CORBA::Object::_nil(); for (int itry=0; itry < NumberOfTries; itry++) - { - try - { - if(!CORBA::is_nil(orb)) - theObj = orb->resolve_initial_references("NameService"); - if (!CORBA::is_nil(theObj)) - inc = CosNaming::NamingContext::_narrow(theObj); - } - catch( CORBA::SystemException& ) - { - cout << "TraceCollector_WaitForServerReadiness: " - << "CORBA::SystemException: " - << "Unable to contact the Naming Service" << endl; - } + { + try + { + if(!CORBA::is_nil(orb)) + theObj = orb->resolve_initial_references("NameService"); + if (!CORBA::is_nil(theObj)) + inc = CosNaming::NamingContext::_narrow(theObj); + } + catch( CORBA::SystemException& ) + { + std::cout << "TraceCollector_WaitForServerReadiness: " + << "CORBA::SystemException: " + << "Unable to contact the Naming Service" << std::endl; + } catch(...) - { - cout << "TraceCollector_WaitForServerReadiness: " - << "Unknown exception dealing with Naming Service" << endl; - } - - obj=CORBA::Object::_nil(); - if(!CORBA::is_nil(inc)) - { - try - { - obj = inc->resolve(name); - if (!CORBA::is_nil(obj)) - { - //cout << "TraceCollector_WaitForServerReadiness: " - // << serverName << " found in CORBA Name Service" << endl; - break; - } - } - catch (const CosNaming::NamingContext::NotFound&) - { - cout << "Caught exception: Naming Service can't found Logger"; - } - } + { + std::cout << "TraceCollector_WaitForServerReadiness: " + << "Unknown exception dealing with Naming Service" << std::endl; + } + + obj=CORBA::Object::_nil(); + if(!CORBA::is_nil(inc)) + { + try + { + obj = inc->resolve(name); + if (!CORBA::is_nil(obj)) + { + //cout << "TraceCollector_WaitForServerReadiness: " + // << serverName << " found in CORBA Name Service" << endl; + break; + } + } + catch (const CosNaming::NamingContext::NotFound&) + { + std::cout << "Caught exception: Naming Service can't found Logger"; + } + } #ifndef WIN32 - nanosleep(&ts_req,&ts_rem); + nanosleep(&ts_req,&ts_rem); #else - Sleep(TIMESleep / 1000000); + Sleep(TIMESleep / 1000000); #endif - cout << "TraceCollector_WaitForServerReadiness: retry look for" - << serverName << endl; - } + std::cout << "TraceCollector_WaitForServerReadiness: retry look for" + << serverName << std::endl; + } } catch (const CosNaming::NamingContext::NotFound&) { - cout << "Caught exception: Naming Service can't found Logger"; + std::cout << "Caught exception: Naming Service can't found Logger"; } catch (CORBA::COMM_FAILURE&) { - cout << "Caught CORBA::SystemException CommFailure."; + std::cout << "Caught CORBA::SystemException CommFailure."; } catch (CORBA::SystemException&) { - cout << "Caught CORBA::SystemException."; + std::cout << "Caught CORBA::SystemException."; } catch (CORBA::Exception&) { - cout << "Caught CORBA::Exception."; + std::cout << "Caught CORBA::Exception."; } catch (...) { - cout << "Caught unknown exception."; + std::cout << "Caught unknown exception."; } return obj._retn(); } diff --git a/src/SALOMETraceCollector/TraceCollector_WaitForServerReadiness.hxx b/src/SALOMETraceCollector/TraceCollector_WaitForServerReadiness.hxx index 2c4741001..0a66922c7 100644 --- a/src/SALOMETraceCollector/TraceCollector_WaitForServerReadiness.hxx +++ b/src/SALOMETraceCollector/TraceCollector_WaitForServerReadiness.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : LocalTrace_WaitForServerReadiness.hxx // Author : Paul RASCLE (EDF) // Module : KERNEL @@ -32,6 +33,6 @@ #include CORBA::Object_ptr TraceCollector_WaitForServerReadiness(CORBA::ORB_ptr theOrb, - std::string serverName); + std::string serverName); #endif diff --git a/src/TOOLSDS/Makefile.am b/src/TOOLSDS/Makefile.am index 8ec3e98d2..7b0b3d9d1 100644 --- a/src/TOOLSDS/Makefile.am +++ b/src/TOOLSDS/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + include $(top_srcdir)/salome_adm/unix/make_common_starter.am # @@ -40,7 +41,6 @@ COMMON_CPPFLAGS=\ -I$(srcdir)/../Basics \ -I$(srcdir)/../Utils \ -I$(srcdir)/../SALOMELocalTrace \ - -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ \ @HDF5_INCLUDES@ \ diff --git a/src/TOOLSDS/SALOMEDS_Tool.cxx b/src/TOOLSDS/SALOMEDS_Tool.cxx index 6cbb46ca9..895195b64 100644 --- a/src/TOOLSDS/SALOMEDS_Tool.cxx +++ b/src/TOOLSDS/SALOMEDS_Tool.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_Tool.cxx // Created : Mon Oct 21 16:24:34 2002 // Author : Sergey RUIN @@ -48,9 +49,7 @@ #include #include CORBA_SERVER_HEADER(SALOMEDS_Attributes) -using namespace std; - -bool Exists(const string thePath) +bool Exists(const std::string thePath) { #ifdef WIN32 if ( GetFileAttributes ( thePath.c_str() ) == 0xFFFFFFFF ) { @@ -133,14 +132,14 @@ std::string SALOMEDS_Tool::GetTmpDir() // purpose : Removes files listed in theFileList //============================================================================ void SALOMEDS_Tool::RemoveTemporaryFiles(const std::string& theDirectory, - const SALOMEDS::ListOfFileNames& theFiles, - const bool IsDirDeleted) + const SALOMEDS::ListOfFileNames& theFiles, + const bool IsDirDeleted) { - string aDirName = theDirectory; + std::string aDirName = theDirectory; int i, aLength = theFiles.length(); for(i=1; i<=aLength; i++) { - string aFile(aDirName); + std::string aFile(aDirName); aFile += theFiles[i-1]; if(!Exists(aFile)) continue; @@ -171,16 +170,16 @@ namespace { SALOMEDS::TMPFile* PutFilesToStream(const std::string& theFromDirectory, - const SALOMEDS::ListOfFileNames& theFiles, - const SALOMEDS::ListOfFileNames& theFileNames, - const int theNamesOnly) + const SALOMEDS::ListOfFileNames& theFiles, + const SALOMEDS::ListOfFileNames& theFileNames, + const int theNamesOnly) { int i, aLength = theFiles.length(); if(aLength == 0) return (new SALOMEDS::TMPFile); //Get a temporary directory for saved a file - string aTmpDir = theFromDirectory; + std::string aTmpDir = theFromDirectory; long aBufferSize = 0; long aCurrentPos; @@ -196,16 +195,16 @@ namespace //Check if the file exists if (!theNamesOnly) { // mpv 15.01.2003: if only file names must be stroed, then size of files is zero - string aFullPath = aTmpDir + const_cast(theFiles[i].in()); - if(!Exists(aFullPath)) continue; + std::string aFullPath = aTmpDir + const_cast(theFiles[i].in()); + if(!Exists(aFullPath)) continue; #ifdef WIN32 - ifstream aFile(aFullPath.c_str(), ios::binary); + std::ifstream aFile(aFullPath.c_str(), std::ios::binary); #else - ifstream aFile(aFullPath.c_str()); + std::ifstream aFile(aFullPath.c_str()); #endif - aFile.seekg(0, ios::end); - aFileSize[i] = aFile.tellg(); - aBufferSize += aFileSize[i]; //Add a space to store the file + aFile.seekg(0, std::ios::end); + aFileSize[i] = aFile.tellg(); + aBufferSize += aFileSize[i]; //Add a space to store the file } aFileNameSize[i] = strlen(theFileNames[i])+1; aBufferSize += aFileNameSize[i]; //Add a space to store the file name @@ -214,6 +213,7 @@ namespace aNbFiles++; } + if ( aNbFiles == 0 ) return (new SALOMEDS::TMPFile); aBufferSize += 4; //4 bytes for a number of the files that will be written to the stream; unsigned char* aBuffer = new unsigned char[aBufferSize]; if(aBuffer == NULL) @@ -228,14 +228,14 @@ namespace aCurrentPos = 4; for(i=0; i(theFiles[i].in()); - if(!Exists(aFullPath)) continue; + std::string aFullPath = aTmpDir + const_cast(theFiles[i].in()); + if(!Exists(aFullPath)) continue; #ifdef WIN32 - aFile = new ifstream(aFullPath.c_str(), ios::binary); + aFile = new std::ifstream(aFullPath.c_str(), std::ios::binary); #else - aFile = new ifstream(aFullPath.c_str()); + aFile = new std::ifstream(aFullPath.c_str()); #endif } //Initialize 4 bytes of the buffer by 0 @@ -249,17 +249,17 @@ namespace aCurrentPos += aFileNameSize[i]; if (!theNamesOnly) { // mpv 15.01.2003: we don't copy file content to the buffer if !theNamesOnly - //Initialize 8 bytes of the buffer by 0 - memset((aBuffer + aCurrentPos), 0, 8); - //Copy the length of the file to the buffer - memcpy((aBuffer + aCurrentPos), (aFileSize + i), ((sizeof(long) > 8) ? 8 : sizeof(long))); - aCurrentPos += 8; - - aFile->seekg(0, ios::beg); - aFile->read((char *)(aBuffer + aCurrentPos), aFileSize[i]); - aFile->close(); - delete(aFile); - aCurrentPos += aFileSize[i]; + //Initialize 8 bytes of the buffer by 0 + memset((aBuffer + aCurrentPos), 0, 8); + //Copy the length of the file to the buffer + memcpy((aBuffer + aCurrentPos), (aFileSize + i), ((sizeof(long) > 8) ? 8 : sizeof(long))); + aCurrentPos += 8; + + aFile->seekg(0, std::ios::beg); + aFile->read((char *)(aBuffer + aCurrentPos), aFileSize[i]); + aFile->close(); + delete(aFile); + aCurrentPos += aFileSize[i]; } } @@ -277,8 +277,8 @@ namespace SALOMEDS::TMPFile* SALOMEDS_Tool::PutFilesToStream(const std::string& theFromDirectory, - const SALOMEDS::ListOfFileNames& theFiles, - const int theNamesOnly) + const SALOMEDS::ListOfFileNames& theFiles, + const int theNamesOnly) { SALOMEDS::ListOfFileNames aFileNames(theFiles); return ::PutFilesToStream(theFromDirectory,theFiles,aFileNames,theNamesOnly); @@ -287,7 +287,7 @@ SALOMEDS_Tool::PutFilesToStream(const std::string& theFromDirectory, SALOMEDS::TMPFile* SALOMEDS_Tool::PutFilesToStream(const SALOMEDS::ListOfFileNames& theFiles, - const SALOMEDS::ListOfFileNames& theFileNames) + const SALOMEDS::ListOfFileNames& theFileNames) { return ::PutFilesToStream("",theFiles,theFileNames,0); } @@ -298,8 +298,8 @@ SALOMEDS_Tool::PutFilesToStream(const SALOMEDS::ListOfFileNames& theFiles, //============================================================================ SALOMEDS::ListOfFileNames_var SALOMEDS_Tool::PutStreamToFiles(const SALOMEDS::TMPFile& theStream, - const std::string& theToDirectory, - const int theNamesOnly) + const std::string& theToDirectory, + const int theNamesOnly) { SALOMEDS::ListOfFileNames_var aFiles = new SALOMEDS::ListOfFileNames; @@ -307,7 +307,7 @@ SALOMEDS_Tool::PutStreamToFiles(const SALOMEDS::TMPFile& theStream, return aFiles; //Get a temporary directory for saving a file - string aTmpDir = theToDirectory; + std::string aTmpDir = theToDirectory; unsigned char *aBuffer = (unsigned char*)theStream.NP_data(); @@ -331,6 +331,13 @@ SALOMEDS_Tool::PutStreamToFiles(const SALOMEDS::TMPFile& theStream, char *aFileName = new char[aFileNameSize]; //Put a file name to aFileName memcpy(aFileName, (aBuffer + aCurrentPos), aFileNameSize); +#ifdef WIN32 + for (int i = 0; i < strlen(aFileName); i++) + { + if (aFileName[i] == ':') + aFileName[i] = '_'; + } +#endif aCurrentPos += aFileNameSize; //Put a length of the file to aFileSize @@ -338,11 +345,11 @@ SALOMEDS_Tool::PutStreamToFiles(const SALOMEDS::TMPFile& theStream, memcpy(&aFileSize, (aBuffer + aCurrentPos), ((sizeof(long) > 8) ? 8 : sizeof(long))); aCurrentPos += 8; - string aFullPath = aTmpDir + aFileName; + std::string aFullPath = aTmpDir + aFileName; #ifdef WIN32 - ofstream aFile(aFullPath.c_str(), ios::binary); + std::ofstream aFile(aFullPath.c_str(), std::ios::binary); #else - ofstream aFile(aFullPath.c_str()); + std::ofstream aFile(aFullPath.c_str()); #endif aFile.write((char *)(aBuffer+aCurrentPos), aFileSize); aFile.close(); @@ -361,7 +368,7 @@ SALOMEDS_Tool::PutStreamToFiles(const SALOMEDS::TMPFile& theStream, //============================================================================ std::string SALOMEDS_Tool::GetNameFromPath(const std::string& thePath) { if (thePath.empty()) return ""; - string aPath = thePath; + std::string aPath = thePath; bool isFound = false; int pos = aPath.rfind('/'); if(pos > 0) { @@ -394,7 +401,7 @@ std::string SALOMEDS_Tool::GetDirFromPath(const std::string& thePath) { if (thePath.empty()) return ""; int pos = thePath.rfind('/'); - string path; + std::string path; if(pos > 0) { path = thePath.substr(0, pos+1); } diff --git a/src/TOOLSDS/SALOMEDS_Tool.hxx b/src/TOOLSDS/SALOMEDS_Tool.hxx index 2184143e9..0850fcd2a 100644 --- a/src/TOOLSDS/SALOMEDS_Tool.hxx +++ b/src/TOOLSDS/SALOMEDS_Tool.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_Tool.hxx // Created : Mon Oct 21 16:24:50 2002 // Author : Sergey RUIN @@ -37,7 +38,7 @@ #include CORBA_SERVER_HEADER(SALOMEDS) #ifdef WIN32 -# ifdef TOOLSDS_EXPORTS +# if defined TOOLSDS_EXPORTS # define TOOLSDS_EXPORT __declspec( dllexport ) # else # define TOOLSDS_EXPORT __declspec( dllimport ) @@ -58,22 +59,22 @@ public: // Removes files which are in , the files for deletion are listed in // if is true is also deleted if it is empty static void RemoveTemporaryFiles(const std::string& theDirectory, - const SALOMEDS::ListOfFileNames& theFiles, - const bool IsDirDeleted); + const SALOMEDS::ListOfFileNames& theFiles, + const bool IsDirDeleted); // Converts files listed in which are in into a byte sequence TMPFile static SALOMEDS::TMPFile* PutFilesToStream(const std::string& theFromDirectory, - const SALOMEDS::ListOfFileNames& theFiles, - const int theNamesOnly = 0); + const SALOMEDS::ListOfFileNames& theFiles, + const int theNamesOnly = 0); // Converts files listed in which will be named as pointed in the into a byte sequence TMPFile static SALOMEDS::TMPFile* PutFilesToStream(const SALOMEDS::ListOfFileNames& theFiles, - const SALOMEDS::ListOfFileNames& theFileNames); + const SALOMEDS::ListOfFileNames& theFileNames); // Converts a byte sequence to files and places them in static SALOMEDS::ListOfFileNames_var PutStreamToFiles(const SALOMEDS::TMPFile& theStream, - const std::string& theToDirectory, - const int theNamesOnly = 0); + const std::string& theToDirectory, + const int theNamesOnly = 0); // Returns the name by the path // for an example: if thePath = "/tmp/aaa/doc1.hdf" the function returns "doc1" diff --git a/src/TestContainer/Makefile.am b/src/TestContainer/Makefile.am index 144cbe389..e78d59328 100644 --- a/src/TestContainer/Makefile.am +++ b/src/TestContainer/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # SALOME TestContainer : test of container creation and its life cycle # File : Makefile.in # Author : Paul RASCLE, EDF - MARC TAJCHMAN, CEA @@ -34,7 +35,7 @@ include $(top_srcdir)/salome_adm/unix/make_common_starter.am # # header files # Scripts to be installed -dist_salomescript_DATA = \ +dist_salomescript_PYTHON = \ SALOME_TestComponentPy.py \ TestComponentPy.py \ TestLogger.py @@ -54,8 +55,8 @@ COMMON_CPPFLAGS=\ -I$(srcdir)/../Registry \ -I$(srcdir)/../Notification \ -I$(srcdir)/../ResourcesManager \ + -I$(srcdir)/../GenericObj \ -I$(srcdir)/../Container \ - -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ @@ -70,6 +71,7 @@ COMMON_LIBS =\ ../Utils/libOpUtil.la \ ../SALOMELocalTrace/libSALOMELocalTrace.la \ ../Basics/libSALOMEBasics.la \ + ../GenericObj/libSalomeGenericObj.la \ $(top_builddir)/idl/libSalomeIDLKernel.la # @@ -97,11 +99,13 @@ bin_PROGRAMS = TestContainer TestLogger TestContainer_SOURCES = TestContainer.cxx TestContainer_CPPFLAGS = $(COMMON_CPPFLAGS) TestContainer_LDADD = libSalomeTestComponentEngine.la \ + $(COMMON_LIBS) \ ../Basics/libSALOMEBasics.la \ $(CORBA_LIBS) TestLogger_SOURCES = TestLogger.cxx TestLogger_CPPFLAGS = $(COMMON_CPPFLAGS) TestLogger_LDADD = libSalomeTestComponentEngine.la \ + $(COMMON_LIBS) \ ../Basics/libSALOMEBasics.la \ $(CORBA_LIBS) diff --git a/src/TestContainer/SALOME_TestComponent.hxx b/src/TestContainer/SALOME_TestComponent.hxx index fc0f0bb29..24b48fea1 100644 --- a/src/TestContainer/SALOME_TestComponent.hxx +++ b/src/TestContainer/SALOME_TestComponent.hxx @@ -1,24 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME TestContainer : test of container creation and its life cycle // File : SALOME_TestComponent.hxx // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) @@ -27,7 +25,7 @@ #define SALOME_TESTCOMPONENT_HXX #ifdef WIN32 -# if defined TESTCONTAINER_EXPORTS +# if defined TESTCONTAINER_EXPORTS || defined SalomeTestComponentEngine_EXPORTS # define TESTCONTAINER_EXPORT __declspec( dllexport ) # else # define TESTCONTAINER_EXPORT __declspec( dllimport ) diff --git a/src/TestContainer/SALOME_TestComponentPy.py b/src/TestContainer/SALOME_TestComponentPy.py index 249ad3c50..9ea7905bd 100755 --- a/src/TestContainer/SALOME_TestComponentPy.py +++ b/src/TestContainer/SALOME_TestComponentPy.py @@ -1,25 +1,27 @@ #! /usr/bin/env python -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # SALOME TestContainer : test of container creation and its life cycle # File : SALOME_TestComponentPy.py # Author : Paul RASCLE, EDF diff --git a/src/TestContainer/SALOME_TestComponent_i.cxx b/src/TestContainer/SALOME_TestComponent_i.cxx index 2fab66235..29d7776d8 100644 --- a/src/TestContainer/SALOME_TestComponent_i.cxx +++ b/src/TestContainer/SALOME_TestComponent_i.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME TestContainer : test of container creation and its life cycle // File : SALOME_TestComponent_i.cxx // Author : Paul RASCLE, EDF - MARC TAJCHMAN, CEA @@ -33,13 +34,12 @@ #include #include #include -using namespace std; Engines_TestComponent_i::Engines_TestComponent_i(CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName) : + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName) : Engines_Component_i(orb, poa, contId, instanceName, interfaceName) { MESSAGE("activate object"); @@ -73,25 +73,25 @@ char* Engines_TestComponent_i::Coucou(CORBA::Long L) void Engines_TestComponent_i::Setenv() { // bool overwrite = true; - map::iterator it; + std::map::iterator it; MESSAGE("set environment associated with keys in map _fieldsDict"); for (it = _fieldsDict.begin(); it != _fieldsDict.end(); it++) { std::string cle((*it).first); if ((*it).second.type()->kind() == CORBA::tk_string) - { - const char* value; - (*it).second >>= value; - //CCRT porting : setenv not defined in stdlib.h - std::string s(cle); - s+='='; - s+=value; - //char* cast because 1st arg of linux putenv function is not a const char* !!! - putenv((char *)s.c_str()); - //End of CCRT porting - //int ret = setenv(cle.c_str(), value, overwrite); - MESSAGE("--- setenv: "<>= value; + //CCRT porting : setenv not defined in stdlib.h + std::string s(cle); + s+='='; + s+=value; + //char* cast because 1st arg of linux putenv function is not a const char* !!! + putenv((char *)s.c_str()); + //End of CCRT porting + //int ret = setenv(cle.c_str(), value, overwrite); + MESSAGE("--- setenv: "<load_component_Library(componenttName.c_str()); - // iGenFact->load_component_Library("SalomeTestComponent"); + iGenFact->load_component_Library(componenttName.c_str(),reason); ASSERT(isLib); #else - iGenFact->load_component_Library(componenttName.c_str()); + iGenFact->load_component_Library(componenttName.c_str(),reason); #endif - CORBA::Object_var obj = - // iGenFact->create_component_instance("SalomeTestComponent", - iGenFact->create_component_instance(componenttName.c_str(), - 0); + CORBA::string_free(reason); + CORBA::Object_var obj = iGenFact->create_component_instance(componenttName.c_str(), 0); Engines::TestComponent_var anInstance = Engines::TestComponent::_narrow(obj); MESSAGE("create anInstance"); SCRUTE(anInstance->instanceName()); @@ -105,80 +104,80 @@ int main (int argc, char * argv[]) MESSAGE("------------------------------- create instances "); for (int iter = 0; iter < nbInstances ; iter++) - { - instances[iter] = create_instance(iGenFact,"SalomeTestComponent"); - } + { + instances[iter] = create_instance(iGenFact,"SalomeTestComponent"); + } MESSAGE("------------------------------ set env instances "); for (int iter = 0; iter < nbInstances ; iter++) - { - Engines::TestComponent_var anInstance = instances[iter]; - SCRUTE(anInstance->instanceName()); - Engines::FieldsDict_var dico = new Engines::FieldsDict; - dico->length(3); - dico[0].key=CORBA::string_dup("key_0"); - dico[0].value <<="value_0"; - dico[1].key=CORBA::string_dup("key_1"); - dico[1].value <<=(CORBA::UShort)72; - dico[2].key=CORBA::string_dup("key_2"); - dico[2].value <<=(CORBA::ULong)iter; - anInstance->setProperties(dico); - MESSAGE("Coucou " << anInstance->Coucou(iter)); - anInstance->Setenv(); - } + { + Engines::TestComponent_var anInstance = instances[iter]; + SCRUTE(anInstance->instanceName()); + Engines::FieldsDict_var dico = new Engines::FieldsDict; + dico->length(3); + dico[0].key=CORBA::string_dup("key_0"); + dico[0].value <<="value_0"; + dico[1].key=CORBA::string_dup("key_1"); + dico[1].value <<=(CORBA::UShort)72; + dico[2].key=CORBA::string_dup("key_2"); + dico[2].value <<=(CORBA::ULong)iter; + anInstance->setProperties(dico); + MESSAGE("Coucou " << anInstance->Coucou(iter)); + anInstance->Setenv(); + } MESSAGE("---------------------------------- get instances "); for (int iter = 0; iter < nbInstances ; iter++) - { - Engines::TestComponent_var anInstance = instances[iter]; - SCRUTE(anInstance->instanceName()); - Engines::FieldsDict_var dico2 = anInstance->getProperties(); - for (CORBA::ULong i=0; ilength(); i++) - { - MESSAGE("dico2["<instanceName()); - iGenFact->remove_impl(anInstance) ; - //iGenFact->finalize_removal() ; // unpredictable results ... - } + { + Engines::TestComponent_var anInstance = instances[iter]; + SCRUTE(anInstance->instanceName()); + iGenFact->remove_impl(anInstance) ; + //iGenFact->finalize_removal() ; // unpredictable results ... + } MESSAGE("------------------------------- PYTHON "); { -// bool isLib = -// iGenFact->load_component_Library("SALOME_TestComponentPy"); -// ASSERT(isLib); -// CORBA::Object_var obj = -// iGenFact->create_component_instance("SALOME_TestComponentPy", -// 0); -// Engines::TestComponent_var anInstance = -// Engines::TestComponent::_narrow(obj); -// MESSAGE("create anInstance"); -// SCRUTE(anInstance->instanceName()); +// bool isLib = +// iGenFact->load_component_Library("SALOME_TestComponentPy"); +// ASSERT(isLib); +// CORBA::Object_var obj = +// iGenFact->create_component_instance("SALOME_TestComponentPy", +// 0); +// Engines::TestComponent_var anInstance = +// Engines::TestComponent::_narrow(obj); +// MESSAGE("create anInstance"); +// SCRUTE(anInstance->instanceName()); MESSAGE("------------------------------- create instances "); for (int iter = 0; iter < nbInstances ; iter++) - { - instances[iter] = create_instance(iGenFact,"SALOME_TestComponentPy"); - } + { + instances[iter] = create_instance(iGenFact,"SALOME_TestComponentPy"); + } MESSAGE("---------------------------------- get instances "); for (int iter = 0; iter < nbInstances ; iter++) - { - Engines::TestComponent_var anInstance = instances[iter]; - SCRUTE(anInstance->instanceName()); - MESSAGE("Coucou " << anInstance->Coucou(iter)); - } + { + Engines::TestComponent_var anInstance = instances[iter]; + SCRUTE(anInstance->instanceName()); + MESSAGE("Coucou " << anInstance->Coucou(iter)); + } } // Clean-up. diff --git a/src/TestContainer/TestLogger.cxx b/src/TestContainer/TestLogger.cxx index 15914bc62..b87e662f4 100644 --- a/src/TestContainer/TestLogger.cxx +++ b/src/TestContainer/TestLogger.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME TestContainer : test of container creation and its life cycle // File : TestContainer.cxx // Author : Paul RASCLE, EDF - MARC TAJCHMAN, CEA diff --git a/src/TestContainer/TestLogger.py b/src/TestContainer/TestLogger.py index ab1a33fb1..62da4121f 100644 --- a/src/TestContainer/TestLogger.py +++ b/src/TestContainer/TestLogger.py @@ -1,24 +1,26 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + from SALOME_utilities import * MESSAGE("TestLogger.py : It's OK") diff --git a/src/TestMPIContainer/Makefile.am b/src/TestMPIContainer/Makefile.am index e1aeb27d9..f2f87d725 100644 --- a/src/TestMPIContainer/Makefile.am +++ b/src/TestMPIContainer/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # SALOME MPIContainer : implemenation of container based on MPI libraries # File : Makefile.am # Author : Guillaume Boulant (CSSI) @@ -58,7 +59,7 @@ COMMON_CPPFLAGS=\ -I$(srcdir)/../ResourcesManager \ -I$(srcdir)/../Container \ -I$(srcdir)/../MPIContainer \ - -I$(top_builddir)/salome_adm/unix \ + -I$(srcdir)/../GenericObj \ -I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ @@ -73,6 +74,7 @@ COMMON_LIBS =\ ../Basics/libSALOMEBasics.la \ ../Container/libSalomeContainer.la \ ../MPIContainer/libSalomeMPIContainer.la \ + ../GenericObj/libSalomeGenericObj.la \ $(top_builddir)/idl/libSalomeIDLKernel.la\ @CORBA_LIBS@ diff --git a/src/TestMPIContainer/TestMPIComponentEngine.cxx b/src/TestMPIContainer/TestMPIComponentEngine.cxx index fab2366ff..c868e6e0b 100644 --- a/src/TestMPIContainer/TestMPIComponentEngine.cxx +++ b/src/TestMPIContainer/TestMPIComponentEngine.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + //============================================================================= // File : TestMPIComponentEngine.cxx // Created : mer jui 4 12:28:26 CEST 2003 @@ -30,23 +31,21 @@ #include #include "utilities.h" #include "TestMPIComponentEngine.hxx" -using namespace std; -TestMPIComponentEngine::TestMPIComponentEngine(int nbproc, int numproc, - CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName, - bool regist) : - Engines_Component_i(orb, poa, contId, instanceName, interfaceName,true,regist), MPIObject_i(nbproc,numproc) +TestMPIComponentEngine::TestMPIComponentEngine(CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName, + bool regist) : + Engines_Component_i(orb, poa, contId, instanceName, interfaceName,true,regist) { MESSAGE("activate object") _thisObj = this ; _id = _poa->reference_to_id(_thisObj->_this()); } -TestMPIComponentEngine::TestMPIComponentEngine(): Engines_Component_i(), MPIObject_i() +TestMPIComponentEngine::TestMPIComponentEngine() { } @@ -73,24 +72,26 @@ void TestMPIComponentEngine::SPCoucou(CORBA::Long L) extern "C" { PortableServer::ObjectId * TestMPIComponentEngine_factory( - int nbproc, int numproc, - CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName) + CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName) { + int numproc; bool regist; TestMPIComponentEngine * myTestMPIComponent; + MESSAGE("[" << numproc << "] PortableServer::ObjectId * TestMPIComponentEngine_factory()"); SCRUTE(interfaceName); + MPI_Comm_rank( MPI_COMM_WORLD, &numproc ); if(numproc==0) regist = true; else regist = false; myTestMPIComponent - = new TestMPIComponentEngine(nbproc,numproc,orb, poa, contId, instanceName, interfaceName,regist); + = new TestMPIComponentEngine(orb, poa, contId, instanceName, interfaceName,regist); return myTestMPIComponent->getId() ; } } diff --git a/src/TestMPIContainer/TestMPIComponentEngine.hxx b/src/TestMPIContainer/TestMPIComponentEngine.hxx index 4a027f02e..ad7a4d490 100644 --- a/src/TestMPIContainer/TestMPIComponentEngine.hxx +++ b/src/TestMPIContainer/TestMPIComponentEngine.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + //============================================================================= // File : TestMPIComponentEngine.hxx // Created : mer jui 4 12:28:30 CEST 2003 @@ -30,7 +31,7 @@ #ifndef _SALOME_TESTCOMPONENT_I_HXX_ #define _SALOME_TESTCOMPONENT_I_HXX_ -#include +#include #include #include CORBA_SERVER_HEADER(SALOME_TestMPIComponent) #include "SALOME_Component_i.hxx" @@ -42,13 +43,12 @@ class TestMPIComponentEngine: { public: TestMPIComponentEngine(); - TestMPIComponentEngine(int nbproc, int numproc, - CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName, - bool regist); + TestMPIComponentEngine(CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName, + bool regist); virtual ~TestMPIComponentEngine(); diff --git a/src/TestMPIContainer/TestMPIContainer.cxx b/src/TestMPIContainer/TestMPIContainer.cxx index e3e8c27e4..75dd9ddc8 100644 --- a/src/TestMPIContainer/TestMPIContainer.cxx +++ b/src/TestMPIContainer/TestMPIContainer.cxx @@ -1,25 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// using namespace std; + //============================================================================= // File : TestMPIContainer.cxx // Created : mer jui 4 13:11:27 CEST 2003 @@ -41,7 +41,6 @@ # include "Utils_SINGLETON.hxx" #include "SALOME_NamingService.hxx" #include "OpUtil.hxx" -using namespace std; int main (int argc, char * argv[]) { @@ -57,7 +56,7 @@ int main (int argc, char * argv[]) int status; if( argc != 3 || strcmp(argv[1],"-np") ){ - cout << "Usage: TestMPIContainer -np nbproc" << endl; + std::cout << "Usage: TestMPIContainer -np nbproc" << std::endl; exit(0); } @@ -67,11 +66,11 @@ int main (int argc, char * argv[]) // Use Name Service to find container SALOME_NamingService NS(orb) ; - string containerName = "/Containers/" ; - string hostName = Kernel_Utils::GetHostname(); + std::string containerName = "/Containers/" ; + std::string hostName = Kernel_Utils::GetHostname(); containerName += hostName + "/MPIFactoryServer_" + argv[2]; - string dirn(getenv("KERNEL_ROOT_DIR")); + std::string dirn(getenv("KERNEL_ROOT_DIR")); dirn += "/lib/salome/libSalomeTestMPIComponentEngine.so"; // Try to resolve MPI Container @@ -81,7 +80,7 @@ int main (int argc, char * argv[]) if(CORBA::is_nil(iGenFact)){ // Launch MPI Container - string cmd("mpirun -np "); + std::string cmd("mpirun -np "); cmd += argv[2]; cmd += " "; cmd += getenv("KERNEL_ROOT_DIR"); @@ -91,19 +90,19 @@ int main (int argc, char * argv[]) MESSAGE(cmd); status = system(cmd.c_str()); if (status == -1) { - INFOS("TestMPIContainer launch MPI Container failed (system command status -1)") ; + INFOS("TestMPIContainer launch MPI Container failed (system command status -1)") ; } else if (status == 217) { - INFOS("TestMPIContainer launch MPI Container failed (system command status 217)") ; + INFOS("TestMPIContainer launch MPI Container failed (system command status 217)") ; } // Try to resolve MPI Container int it = 0; do{ - sleep(1); - obj = NS.Resolve(containerName.c_str()) ; - iGenFact = Engines::MPIContainer::_narrow(obj); - MESSAGE("Waiting for MPI Container " << containerName << " : it = " << it ); + sleep(1); + obj = NS.Resolve(containerName.c_str()) ; + iGenFact = Engines::MPIContainer::_narrow(obj); + MESSAGE("Waiting for MPI Container " << containerName << " : it = " << it ); }while( CORBA::is_nil(iGenFact) && (it++<15) ); } @@ -127,7 +126,7 @@ int main (int argc, char * argv[]) } else{ m1->Coucou(1L); -// // sleep(5); +// // sleep(5); INFOS("Unload MPI Component"); iGenFact->remove_impl(m1) ; } diff --git a/src/UnitTests/Makefile.am b/src/UnitTests/Makefile.am index 3e64bf565..e52f2fd7a 100644 --- a/src/UnitTests/Makefile.am +++ b/src/UnitTests/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : Makefile.am # Author : Guillaume Boulant (CSSI) # Module : KERNEL @@ -33,7 +34,7 @@ include $(top_srcdir)/salome_adm/unix/make_common_starter.am # # Executable scripts to be installed -dist_salomescript_SCRIPTS = UnitTests.py +dist_salomescript_PYTHON = UnitTests.py # # =============================================================== @@ -46,8 +47,7 @@ UnitTests_SOURCES = UnitTests.cxx UnitTests_CPPFLAGS =\ @CPPUNIT_INCLUDES@ \ -I$(srcdir)/../Basics -I$(srcdir)/../Basics/Test \ - -I$(srcdir)/../SALOMELocalTrace -I$(srcdir)/../SALOMELocalTrace/Test \ - -I$(top_builddir)/salome_adm/unix + -I$(srcdir)/../SALOMELocalTrace -I$(srcdir)/../SALOMELocalTrace/Test if CORBA_GEN UnitTests_CPPFLAGS +=\ diff --git a/src/UnitTests/UnitTests.cxx b/src/UnitTests/UnitTests.cxx index d37cd89a0..353c10f3f 100644 --- a/src/UnitTests/UnitTests.cxx +++ b/src/UnitTests/UnitTests.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // --- include all Unit Test from basics until the present directory // #include "SALOMELocalTraceTest.hxx" diff --git a/src/UnitTests/UnitTests.py b/src/UnitTests/UnitTests.py index 19e947c60..b31557cd4 100644 --- a/src/UnitTests/UnitTests.py +++ b/src/UnitTests/UnitTests.py @@ -1,24 +1,26 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + import sys, os,signal,string,commands import runSalome import setenv diff --git a/src/Utils/Makefile.am b/src/Utils/Makefile.am index 7ef2a59e2..e23fab2c6 100644 --- a/src/Utils/Makefile.am +++ b/src/Utils/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # SALOME Utils : general SALOME's definitions and tools # File : Makefile.am # Author : Guillaume Boulant (CSSI) @@ -43,7 +44,7 @@ salomeinclude_HEADERS =\ SALOME_Utils.hxx # Scripts to be exported -dist_salomescript_DATA =\ +dist_salomescript_PYTHON =\ Utils_Identity.py \ SALOME_utilities.py @@ -64,7 +65,6 @@ libOpUtil_la_LDFLAGS = -no-undefined -version-info=0:0:0 libOpUtil_la_CPPFLAGS = \ -I$(srcdir)/../Basics \ -I$(srcdir)/../SALOMELocalTrace \ - -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ diff --git a/src/Utils/OpUtil.cxx b/src/Utils/OpUtil.cxx index 3d50327ab..e8b73df00 100644 --- a/src/Utils/OpUtil.cxx +++ b/src/Utils/OpUtil.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Utils : general SALOME's definitions and tools // File : OpUtil.cxx // Module : SALOME @@ -33,7 +34,7 @@ #else #include #endif -using namespace std; + //int gethostname(char *name, size_t len); std::string GetHostname() @@ -48,7 +49,7 @@ std::string GetHostname() switch (r) { case 0: - break; + break; default: #ifdef EINVAL case EINVAL: @@ -57,7 +58,7 @@ std::string GetHostname() case ENAMETOOLONG: #endif delete [] s; - continue; + continue; } } @@ -70,7 +71,7 @@ std::string GetHostname() char *aDot = (strchr(s,'.')); if (aDot) aDot[0] = '\0'; - string p = s; + std::string p = s; delete [] s; return p; } diff --git a/src/Utils/OpUtil.hxx b/src/Utils/OpUtil.hxx index 7e920b287..2dd5b8ae2 100644 --- a/src/Utils/OpUtil.hxx +++ b/src/Utils/OpUtil.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Utils : general SALOME's definitions and tools // File : OpUtil.hxx // Module : SALOME diff --git a/src/Utils/SALOME_Utils.hxx b/src/Utils/SALOME_Utils.hxx index d3d3184b7..58ce0a04a 100755 --- a/src/Utils/SALOME_Utils.hxx +++ b/src/Utils/SALOME_Utils.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOME_Utils.hxx // Author : Alexander A. BORODIN // Module : SALOME @@ -27,7 +28,7 @@ #define _SALOME_UTILS_HXX_ #ifdef WIN32 -# if defined UTILS_EXPORTS +# if defined UTILS_EXPORTS || defined OpUtil_EXPORTS # define UTILS_EXPORT __declspec( dllexport ) # else # define UTILS_EXPORT __declspec( dllimport ) diff --git a/src/Utils/SALOME_utilities.py b/src/Utils/SALOME_utilities.py index 961fa3177..158178ec5 100644 --- a/src/Utils/SALOME_utilities.py +++ b/src/Utils/SALOME_utilities.py @@ -1,24 +1,26 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # SALOME Utils : general SALOME's definitions and tools # File : SALOME_utilities.py # Module : SALOME diff --git a/src/Utils/Test/Makefile.am b/src/Utils/Test/Makefile.am index befa572ae..88d1214a5 100644 --- a/src/Utils/Test/Makefile.am +++ b/src/Utils/Test/Makefile.am @@ -1,24 +1,25 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + ####################################### library # SALOMELocalTrace : log on local machine # File : Makefile.am @@ -37,7 +38,7 @@ include $(top_srcdir)/salome_adm/unix/make_common_starter.am salomeinclude_HEADERS= UtilsTest.hxx # Scripts to be installed -dist_salomescript_SCRIPTS = TestUtils.py +dist_salomescript_PYTHON = TestUtils.py # @@ -54,8 +55,7 @@ COMMON_CPPFLAGS=\ -I$(srcdir)/$(RPATH)/Basics -I$(srcdir)/$(RPATH)/Basics/Test \ -I$(srcdir)/$(RPATH)/SALOMELocalTrace -I$(srcdir)/$(RPATH)/SALOMELocalTrace/Test \ -I$(srcdir)/$(RPATH)/SALOMETraceCollector -I$(srcdir)/$(RPATH)/SALOMETraceCollector/Test \ - -I$(srcdir)/$(RPATH)/Utils -I$(srcdir)/$(RPATH)/Utils/Test \ - -I$(top_builddir)/salome_adm/unix + -I$(srcdir)/$(RPATH)/Utils -I$(srcdir)/$(RPATH)/Utils/Test # This local variable defines the list of dependant libraries common to all target in this package. COMMON_LIBS =\ @@ -83,5 +83,4 @@ libUtilsTest_la_LIBADD = $(COMMON_LIBS) bin_PROGRAMS = TestUtils TestUtils_SOURCES = TestUtils.cxx TestUtils_CPPFLAGS = $(COMMON_CPPFLAGS) -TestUtils_LDADD = libUtilsTest.la $(CORBA_LIBS) - +TestUtils_LDADD = libUtilsTest.la $(COMMON_LIBS) $(CORBA_LIBS) diff --git a/src/Utils/Test/TestUtils.cxx b/src/Utils/Test/TestUtils.cxx index 29936ce9b..abdbff904 100644 --- a/src/Utils/Test/TestUtils.cxx +++ b/src/Utils/Test/TestUtils.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // --- include all Unit Test from basics until the present directory // #include "SALOMELocalTraceTest.hxx" diff --git a/src/Utils/Test/TestUtils.py b/src/Utils/Test/TestUtils.py index a5c33986e..cc6c1a1d4 100644 --- a/src/Utils/Test/TestUtils.py +++ b/src/Utils/Test/TestUtils.py @@ -1,24 +1,26 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + import sys, os,signal,string,commands import runSalome import orbmodule diff --git a/src/Utils/Test/UtilsTest.cxx b/src/Utils/Test/UtilsTest.cxx index 0ee9fb081..b5d8fb506 100644 --- a/src/Utils/Test/UtilsTest.cxx +++ b/src/Utils/Test/UtilsTest.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "UtilsTest.hxx" #include @@ -28,7 +29,6 @@ #include "Utils_SALOME_Exception.hxx" #include "utilities.h" -using namespace std; #define TRACEFILE "/tmp/traceUnitTest.log" @@ -50,12 +50,12 @@ UtilsTest::setUp() // --- trace on file const char *theFileName = TRACEFILE; - string s = "file:"; + std::string s = "file:"; s += theFileName; CPPUNIT_ASSERT(! setenv("SALOME_trace",s.c_str(),1)); // 1: overwrite - ofstream traceFile; - traceFile.open(theFileName, ios::out | ios::app); + std::ofstream traceFile; + traceFile.open(theFileName, std::ios::out | std::ios::app); CPPUNIT_ASSERT(traceFile); // file created empty, then closed traceFile.close(); @@ -110,8 +110,8 @@ UtilsTest::testSALOME_ExceptionMessage() } catch (const SALOME_Exception &ex) { - string expectedMessage = EXAMPLE_EXCEPTION_MESSAGE; - string actualMessage = ex.what(); - CPPUNIT_ASSERT(actualMessage.find(expectedMessage) != string::npos); + std::string expectedMessage = EXAMPLE_EXCEPTION_MESSAGE; + std::string actualMessage = ex.what(); + CPPUNIT_ASSERT(actualMessage.find(expectedMessage) != std::string::npos); } } diff --git a/src/Utils/Test/UtilsTest.hxx b/src/Utils/Test/UtilsTest.hxx index 20c25474e..9724e2609 100644 --- a/src/Utils/Test/UtilsTest.hxx +++ b/src/Utils/Test/UtilsTest.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef _UTILSTEST_HXX_ #define _UTILSTEST_HXX_ diff --git a/src/Utils/Utils_CommException.cxx b/src/Utils/Utils_CommException.cxx index 0b1cb28f8..9592c06fe 100644 --- a/src/Utils/Utils_CommException.cxx +++ b/src/Utils/Utils_CommException.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Utils : general SALOME's definitions and tools // File : Utils_CommException.cxx // Author : Antoine YESSAYAN, EDF @@ -26,7 +27,6 @@ // $Header$ // # include "Utils_CommException.hxx" -using namespace std; CommException::CommException( void ): SALOME_Exception( "CommException" ) { diff --git a/src/Utils/Utils_CommException.hxx b/src/Utils/Utils_CommException.hxx index 34ea011aa..7bccd38c8 100644 --- a/src/Utils/Utils_CommException.hxx +++ b/src/Utils/Utils_CommException.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Utils : general SALOME's definitions and tools // File : Utils_CommException.hxx // Author : Antoine YESSAYAN, EDF @@ -35,10 +36,10 @@ class UTILS_EXPORT CommException : public SALOME_Exception { public : - CommException( void ); - CommException( const char *texte ); - CommException( const CommException &ex ); - ~CommException() throw (); + CommException( void ); + CommException( const char *texte ); + CommException( const CommException &ex ); + ~CommException() throw (); } ; -# endif /* # if ( !defined __Utils_CommException_H__ ) */ +# endif /* # if ( !defined __Utils_CommException_H__ ) */ diff --git a/src/Utils/Utils_CorbaException.hxx b/src/Utils/Utils_CorbaException.hxx index 10d92590b..aad2bb573 100644 --- a/src/Utils/Utils_CorbaException.hxx +++ b/src/Utils/Utils_CorbaException.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Utils : general SALOME's definitions and tools // File : Utils_CorbaException.hxx // Author : Paul RASCLE, EDF diff --git a/src/Utils/Utils_DESTRUCTEUR_GENERIQUE.cxx b/src/Utils/Utils_DESTRUCTEUR_GENERIQUE.cxx index 18db18974..a90652a80 100644 --- a/src/Utils/Utils_DESTRUCTEUR_GENERIQUE.cxx +++ b/src/Utils/Utils_DESTRUCTEUR_GENERIQUE.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Utils : general SALOME's definitions and tools // File : Utils_DESTRUCTEUR_GENERIQUE.cxx // Author : Antoine YESSAYAN, EDF @@ -43,8 +44,6 @@ void Nettoyage(); // static int MYDEBUG = 0; #endif -using namespace std; - std::list *DESTRUCTEUR_GENERIQUE_::Destructeurs=0 ; /*! \class ATEXIT_ @@ -65,41 +64,45 @@ static bool ATEXIT_Done = false ; class ATEXIT_ { public : - /*! - * Allocation dynamique de Destructeurs, une liste chainee de DESTRUCTEUR_GENERIQUE_* et enregistrement - * de la fonction Nettoyage() par atexit(). - * - * La liste chainee Destructeurs est detruite dans la fonction Nettoyage. - */ + /*! + * Allocation dynamique de Destructeurs, une liste chainee de DESTRUCTEUR_GENERIQUE_* et enregistrement + * de la fonction Nettoyage() par atexit(). + * + * La liste chainee Destructeurs est detruite dans la fonction Nettoyage. + */ //CCRT ATEXIT_( void ) ATEXIT_( bool Make_ATEXIT ) - { - //CCRT - if ( Make_ATEXIT && !ATEXIT_Done ) { - //CCRT - assert (DESTRUCTEUR_GENERIQUE_::Destructeurs==0); - //cerr << "ATEXIT_::ATEXIT_ Construction ATEXIT" << endl;// message necessaire pour utiliser logger dans Nettoyage (cf.BUG KERNEL4561) - DESTRUCTEUR_GENERIQUE_::Destructeurs = + { + //CCRT + if ( Make_ATEXIT && !ATEXIT_Done ) { + //CCRT + assert (DESTRUCTEUR_GENERIQUE_::Destructeurs==0); + //cerr << "ATEXIT_::ATEXIT_ Construction ATEXIT" << endl;// message necessaire pour utiliser logger dans Nettoyage (cf.BUG KERNEL4561) + DESTRUCTEUR_GENERIQUE_::Destructeurs = new std::list ; // Destructeur alloue dynamiquement (cf. ci-dessous) , - // il est utilise puis detruit par la fonction Nettoyage + // il est utilise puis detruit par la fonction Nettoyage //To be sure the trace singleton will be the last one to be destroyed initialize it here before calling atexit LocalTraceBufferPool::instance(); - int cr = atexit( Nettoyage ); // execute Nettoyage lors de exit, aprs la destruction des donnees statiques ! - assert(cr==0) ; - ATEXIT_Done = true ; - } - } - - ~ATEXIT_( ) - { - //cerr << "ATEXIT_::~ATEXIT_ Destruction ATEXIT" << endl; - } +#ifndef _DEBUG_ + atexit( Nettoyage ); // execute Nettoyage lors de exit, aprs la destruction des donnees statiques ! +#else + int cr = atexit( Nettoyage ); // execute Nettoyage lors de exit, aprs la destruction des donnees statiques ! + assert(cr==0) ; +#endif + ATEXIT_Done = true ; + } + } + + ~ATEXIT_( ) + { + //cerr << "ATEXIT_::~ATEXIT_ Destruction ATEXIT" << endl; + } }; -static ATEXIT_ nettoyage = ATEXIT_( false ); /* singleton statique */ +static ATEXIT_ nettoyage = ATEXIT_( false ); /* singleton statique */ /*! @@ -114,32 +117,32 @@ void Nettoyage( void ) { //cerr << "Nettoyage()" << endl; //if(MYDEBUG) BEGIN_OF("Nettoyage( void )") ; - assert(DESTRUCTEUR_GENERIQUE_::Destructeurs) ; - //if(MYDEBUG) SCRUTE( DESTRUCTEUR_GENERIQUE_::Destructeurs->size() ) ; - if( DESTRUCTEUR_GENERIQUE_::Destructeurs->size() ) - { - std::list::iterator it = DESTRUCTEUR_GENERIQUE_::Destructeurs->end() ; - - do - { - //if(MYDEBUG) MESSAGE( "DESTRUCTION d'un SINGLETON"); - it-- ; - DESTRUCTEUR_GENERIQUE_* ptr = *it ; - //DESTRUCTEUR_GENERIQUE_::Destructeurs->remove( *it ) ; - (*ptr)() ; - delete ptr ; - }while( it!= DESTRUCTEUR_GENERIQUE_::Destructeurs->begin() ) ; - - DESTRUCTEUR_GENERIQUE_::Destructeurs->clear() ; - //if(MYDEBUG) SCRUTE( DESTRUCTEUR_GENERIQUE_::Destructeurs->size() ) ; - assert( DESTRUCTEUR_GENERIQUE_::Destructeurs->size()==0 ) ; - assert( DESTRUCTEUR_GENERIQUE_::Destructeurs->empty() ) ; - } - - delete DESTRUCTEUR_GENERIQUE_::Destructeurs; - DESTRUCTEUR_GENERIQUE_::Destructeurs=0; - //if(MYDEBUG) END_OF("Nettoyage( void )") ; - return ; + assert(DESTRUCTEUR_GENERIQUE_::Destructeurs) ; + //if(MYDEBUG) SCRUTE( DESTRUCTEUR_GENERIQUE_::Destructeurs->size() ) ; + if( DESTRUCTEUR_GENERIQUE_::Destructeurs->size() ) + { + std::list::iterator it = DESTRUCTEUR_GENERIQUE_::Destructeurs->end() ; + + do + { + //if(MYDEBUG) MESSAGE( "DESTRUCTION d'un SINGLETON"); + it-- ; + DESTRUCTEUR_GENERIQUE_* ptr = *it ; + //DESTRUCTEUR_GENERIQUE_::Destructeurs->remove( *it ) ; + (*ptr)() ; + delete ptr ; + }while( it!= DESTRUCTEUR_GENERIQUE_::Destructeurs->begin() ) ; + + DESTRUCTEUR_GENERIQUE_::Destructeurs->clear() ; + //if(MYDEBUG) SCRUTE( DESTRUCTEUR_GENERIQUE_::Destructeurs->size() ) ; + assert( DESTRUCTEUR_GENERIQUE_::Destructeurs->size()==0 ) ; + assert( DESTRUCTEUR_GENERIQUE_::Destructeurs->empty() ) ; + } + + delete DESTRUCTEUR_GENERIQUE_::Destructeurs; + DESTRUCTEUR_GENERIQUE_::Destructeurs=0; + //if(MYDEBUG) END_OF("Nettoyage( void )") ; + return ; } @@ -149,16 +152,16 @@ void Nettoyage( void ) */ const int DESTRUCTEUR_GENERIQUE_::Ajout( DESTRUCTEUR_GENERIQUE_ &objet ) { - // N.B. : l'ordre de creation des SINGLETON etant important - // on n'utilise pas deux fois la meme position pour - // les stocker dans la pile des objets. + // N.B. : l'ordre de creation des SINGLETON etant important + // on n'utilise pas deux fois la meme position pour + // les stocker dans la pile des objets. //CCRT if ( !ATEXIT_Done ) { nettoyage = ATEXIT_( true ) ; - } - //CCRT - assert(Destructeurs) ; - Destructeurs->push_back( &objet ) ; - return Destructeurs->size() ; + } + //CCRT + assert(Destructeurs) ; + Destructeurs->push_back( &objet ) ; + return Destructeurs->size() ; } diff --git a/src/Utils/Utils_DESTRUCTEUR_GENERIQUE.hxx b/src/Utils/Utils_DESTRUCTEUR_GENERIQUE.hxx index 6e71ad7b9..7308ff2b2 100644 --- a/src/Utils/Utils_DESTRUCTEUR_GENERIQUE.hxx +++ b/src/Utils/Utils_DESTRUCTEUR_GENERIQUE.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Utils : general SALOME's definitions and tools // File : Utils_DESTRUCTEUR_GENERIQUE.hxx // Author : Antoine YESSAYAN, EDF @@ -48,15 +49,15 @@ * Usage * * The only way to use the DESTRUCTEUR_GENERIQUE_ class is inheritance : - * class DESTRUCTEUR_SPECIFIQUE_ : public DESTRUCTEUR_GENERIQUE_ + * class DESTRUCTEUR_SPECIFIQUE_ : public DESTRUCTEUR_GENERIQUE_ * * Design description * - * A generic destructor supply two functionalities : - * -# a static method to add a destruction (objetct) to be performed DESTRUCTEUR_GENERIQUE_::Ajout( - * DESTRUCTEUR_GENERIQUE_ &objet) ; - * The Destruction object is stored in a list of pointer to DESTRUCTEUR_GENERIQUE_ objects. - * -# an object method to execute the destruction : operator()(). + * A generic destructor supply two functionalities : + * -# a static method to add a destruction (objetct) to be performed DESTRUCTEUR_GENERIQUE_::Ajout( + * DESTRUCTEUR_GENERIQUE_ &objet) ; + * The Destruction object is stored in a list of pointer to DESTRUCTEUR_GENERIQUE_ objects. + * -# an object method to execute the destruction : operator()(). */ class UTILS_EXPORT DESTRUCTEUR_GENERIQUE_ @@ -79,17 +80,17 @@ public : * * Usage * - * In this example the POINT_ ptrPoint will be destroyed at the end of the process (atexit). + * In this example the POINT_ ptrPoint will be destroyed at the end of the process (atexit). * * POINT_ *ptrPoint = new POINT_ ;
        - * DESTRUCTEUR_DE_ *ptrDestruction = new DESTRUCTEUR_DE_( *ptrPoint ) ; + * DESTRUCTEUR_DE_ *ptrDestruction = new DESTRUCTEUR_DE_( *ptrPoint ) ; * - * Note that neither ptrPoint, nor ptrDestruction should be destroyed by the user. + * Note that neither ptrPoint, nor ptrDestruction should be destroyed by the user. * * Design description * - * The destruction object must be created dynamicaly because it suscribes himself in the list of - * destruction to be performed at the end of the process. + * The destruction object must be created dynamicaly because it suscribes himself in the list of + * destruction to be performed at the end of the process. * */ template class DESTRUCTEUR_DE_ : public DESTRUCTEUR_GENERIQUE_ @@ -116,15 +117,15 @@ public : // std::cerr << "WARNING: automatic destruction for servant is no more used. It's too late in exit. Use explicit call" << std::endl; /* if(TServant* aServant = dynamic_cast(_PtrObjet)){ - PortableServer::POA_var aPOA = aServant->_default_POA(); - PortableServer::ObjectId_var anObjectId = aPOA->servant_to_id(aServant); - aPOA->deactivate_object(anObjectId.in()); - aServant->_remove_ref(); + PortableServer::POA_var aPOA = aServant->_default_POA(); + PortableServer::ObjectId_var anObjectId = aPOA->servant_to_id(aServant); + aPOA->deactivate_object(anObjectId.in()); + aServant->_remove_ref(); */ }else{ - //cerr << "DESTRUCTEUR_GENERIQUE_::operator() deleting _PtrObjet" << endl; - TYPE* aPtr = static_cast(_PtrObjet); - delete aPtr; + //cerr << "DESTRUCTEUR_GENERIQUE_::operator() deleting _PtrObjet" << endl; + TYPE* aPtr = static_cast(_PtrObjet); + delete aPtr; } _PtrObjet = NULL ; } @@ -139,4 +140,4 @@ private : }; -# endif /* # if !defined( __DESTRUCTEUR_GENERIQUE__H__ ) */ +# endif /* # if !defined( __DESTRUCTEUR_GENERIQUE__H__ ) */ diff --git a/src/Utils/Utils_ExceptHandlers.cxx b/src/Utils/Utils_ExceptHandlers.cxx index 7f70311e9..55952d827 100644 --- a/src/Utils/Utils_ExceptHandlers.cxx +++ b/src/Utils/Utils_ExceptHandlers.cxx @@ -1,28 +1,29 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: Utils_ExceptHandler.cxx -// Created: Mon Mar 15 10:23:41 2004 -// Author: Oksana TCHEBANOVA -// + +// File: Utils_ExceptHandler.cxx +// Created: Mon Mar 15 10:23:41 2004 +// Author: Oksana TCHEBANOVA +// // #include "Utils_ExceptHandlers.hxx" #include "Utils_CorbaException.hxx" @@ -31,8 +32,6 @@ #include #include CORBA_SERVER_HEADER(SALOME_Exception) -using namespace std; - void SalomeException () { throw SALOME_Exception("Salome Exception"); diff --git a/src/Utils/Utils_ExceptHandlers.hxx b/src/Utils/Utils_ExceptHandlers.hxx index f4abb27a3..8d906a727 100644 --- a/src/Utils/Utils_ExceptHandlers.hxx +++ b/src/Utils/Utils_ExceptHandlers.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // KERNEL Utils : common utils for KERNEL // File : Utils_ExceptHandlers.hxx // Author : Oksana Tchebanova diff --git a/src/Utils/Utils_Identity.cxx b/src/Utils/Utils_Identity.cxx index bf5b44fc8..cd5c9c0d5 100644 --- a/src/Utils/Utils_Identity.cxx +++ b/src/Utils/Utils_Identity.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Utils : general SALOME's definitions and tools // File : Utils_Identity.cxx // Author : Pascale NOYRET, EDF @@ -49,35 +50,35 @@ const char* duplicate( const char *const str ) ; const struct utsname get_uname( void ) { - struct utsname hostid; + struct utsname hostid; #if defined(_DEBUG_) || defined(_DEBUG) - const int retour=uname(&hostid); - ASSERT(retour>=0); + const int retour=uname(&hostid); + ASSERT(retour>=0); #else - uname(&hostid); + uname(&hostid); #endif - return hostid ; + return hostid ; } const char* get_adip( void ) { - struct utsname hostid; + struct utsname hostid; #if defined(_DEBUG_) || defined(_DEBUG) - const int retour=uname(&hostid); - ASSERT(retour>=0); + const int retour=uname(&hostid); + ASSERT(retour>=0); #else - uname(&hostid); + uname(&hostid); #endif - const hostent* pour_adip=gethostbyname(hostid.nodename); - ASSERT(pour_adip!=NULL); - const in_addr ip_addr=*(struct in_addr*)(pour_adip->h_addr) ; - return duplicate(inet_ntoa(ip_addr)); + const hostent* pour_adip=gethostbyname(hostid.nodename); + ASSERT(pour_adip!=NULL); + const in_addr ip_addr=*(struct in_addr*)(pour_adip->h_addr) ; + return duplicate(inet_ntoa(ip_addr)); } const char* const get_pwname( void ) { - struct passwd *papa = getpwuid( getuid() ) ; - return papa->pw_name ; + struct passwd *papa = getpwuid(getuid()); + return papa->pw_name ; } #else /* Windows functionality */ @@ -90,36 +91,36 @@ const char* duplicate( const char *const str ) ; const char* get_uname( void ) { - static std::string hostName(256, 0); - static DWORD nSize = hostName.length(); - static int res = ::GetComputerNameEx(ComputerNameDnsFullyQualified, &hostName[0], &nSize); - ASSERT( res ); - return hostName.c_str(); + static std::string hostName(256, 0); + static DWORD nSize = hostName.length(); + static int res = ::GetComputerNameEx(ComputerNameDnsFullyQualified, &hostName[0], &nSize); + ASSERT( res ); + return hostName.c_str(); } const char* get_adip( void ) { - //#include - //#include - //static GUID sType = SVCID_HOSTNAME; - //static CSADDR_INFO* ips = new CSADDR_INFO[8]; // in case multiple IP addresses are returned - //static DWORD nSize = 1024; - //static std::string uname = get_uname(); - //static int res = ::GetAddressByName( NS_DEFAULT, &sType, &uname[0], 0, 0, 0, ips, &nSize, 0, 0 ); - //if ( res ) - // return ips[0].LocalAddr.lpSockaddr->sa_data; - - static hostent* he = ::gethostbyname( get_uname() ); - if ( he && he->h_addr_list && he->h_length >0 ) { - static char str[16]; + //#include + //#include + //static GUID sType = SVCID_HOSTNAME; + //static CSADDR_INFO* ips = new CSADDR_INFO[8]; // in case multiple IP addresses are returned + //static DWORD nSize = 1024; + //static std::string uname = get_uname(); + //static int res = ::GetAddressByName( NS_DEFAULT, &sType, &uname[0], 0, 0, 0, ips, &nSize, 0, 0 ); + //if ( res ) + // return ips[0].LocalAddr.lpSockaddr->sa_data; + + static hostent* he = ::gethostbyname( get_uname() ); + if ( he && he->h_addr_list && he->h_length >0 ) { + static char str[16]; unsigned i1 = (unsigned char)he->h_addr_list[0][0]; unsigned i2 = (unsigned char)he->h_addr_list[0][1]; unsigned i3 = (unsigned char)he->h_addr_list[0][2]; unsigned i4 = (unsigned char)he->h_addr_list[0][3]; sprintf ( str, "%03u.%03u.%03u.%03u", i1, i2, i3, i4 ); - return str; - } - return ""; + return str; + } + return ""; } const char* const get_pwname( void ) @@ -132,21 +133,21 @@ const char* const get_pwname( void ) } PSID getuid() { - PSID retVal = NULL; - HANDLE hProcessToken = INVALID_HANDLE_VALUE; - PTOKEN_OWNER pTKowner = NULL; - LPVOID buffer = NULL; - DWORD dwsize = 0; - - if ( !OpenProcessToken ( GetCurrentProcess (), TOKEN_QUERY, &hProcessToken )) return 0; - if (!GetTokenInformation(hProcessToken, TokenOwner, buffer, dwsize, &dwsize)) return 0; - pTKowner = (PTOKEN_OWNER)buffer; - if ( pTKowner != NULL ) { - retVal = pTKowner->Owner; - } - if ( hProcessToken != INVALID_HANDLE_VALUE ) CloseHandle ( hProcessToken ); - - return retVal; + PSID retVal = NULL; + HANDLE hProcessToken = INVALID_HANDLE_VALUE; + PTOKEN_OWNER pTKowner = NULL; + LPVOID buffer = NULL; + DWORD dwsize = 0; + + if ( !OpenProcessToken ( GetCurrentProcess (), TOKEN_QUERY, &hProcessToken )) return 0; + if (!GetTokenInformation(hProcessToken, TokenOwner, buffer, dwsize, &dwsize)) return 0; + pTKowner = (PTOKEN_OWNER)buffer; + if ( pTKowner != NULL ) { + retVal = pTKowner->Owner; + } + if ( hProcessToken != INVALID_HANDLE_VALUE ) CloseHandle ( hProcessToken ); + + return retVal; } #define getcwd _getcwd @@ -155,36 +156,36 @@ PSID getuid() { #endif /* WIN32 */ -Identity::Identity( const char *name ): _name(duplicate(name)),\ - _hostid(get_uname()),\ - _adip(get_adip()),\ - _uid(getuid()) ,\ - _pwname(get_pwname()) ,\ - _dir(getcwd(NULL,256)),\ - _pid(getpid()) ,\ - _start(time(NULL)),\ - _cstart(ctime(&_start)) +Identity::Identity( const char *name ): _name(duplicate(name)),\ + _hostid(get_uname()),\ + _adip(get_adip()),\ + _uid(getuid()) ,\ + _pwname(get_pwname()) ,\ + _dir(getcwd(NULL,256)),\ + _pid(getpid()) ,\ + _start(time(NULL)),\ + _cstart(ctime(&_start)) //CCRT { - ASSERT(strlen(_dir)<256); + ASSERT(strlen(_dir)<256); } Identity::~Identity(void) { - delete [] (char*)_name ; - (char*&)_name = NULL ; + delete [] (char*)_name ; + (char*&)_name = NULL ; - //delete [] (char*)_dir ; - //(char*&)_dir = NULL ; - free((char*)_dir); -#ifndef WIN32 + //delete [] (char*)_dir ; + //(char*&)_dir = NULL ; + free((char*)_dir); +#ifndef WIN32 // free the memory only on Unix // becasue at Windows it is the same static variable // (function get_adip() returns the same char* as get_uname() ) - delete [] (char*)_adip ; + delete [] (char*)_adip ; #endif - (char*&)_adip = NULL ; + (char*&)_adip = NULL ; } @@ -194,15 +195,15 @@ Identity::~Identity(void) const char* const Identity::name (void) const { - return _name ; + return _name ; } #ifndef WIN32 - const pid_t& Identity::pid(void) const + const pid_t& Identity::pid(void) const #else - const DWORD& Identity::pid(void) const + const DWORD& Identity::pid(void) const #endif { - return _pid ; + return _pid ; } #ifndef WIN32 @@ -215,28 +216,28 @@ const char* const Identity::name (void) const } #ifndef WIN32 - const uid_t& Identity::uid(void) const + const uid_t& Identity::uid(void) const #else - const PSID& Identity::uid(void) const + const PSID& Identity::uid(void) const #endif { - return _uid ; + return _uid ; } const time_t &Identity::start(void) const { - return _start ; + return _start ; } const char* const Identity::rep (void) const { - return _dir ; + return _dir ; } const char* const Identity::pwname (void) const { - return _pwname ; + return _pwname ; } const char* const Identity::adip (void) const { - return _adip ; + return _adip ; } /*------------------*/ @@ -248,31 +249,31 @@ const char* Identity::host_char( void ) const #ifndef WIN32 return _hostid.nodename; #else - return _hostid; + return _hostid; #endif } const char* Identity::start_char(void) const { - return ctime(&_start) ; + return ctime(&_start) ; } std::ostream & operator<< ( std::ostream& os , const Identity& monid ) { - ASSERT(monid._name!=NULL) ; + ASSERT(monid._name!=NULL) ; os << "Identity :" << std::endl ; - os << '\t' << "Component name : " << monid._name << std::endl ; - os << '\t' << "Numero de PID : " << monid._pid << std::endl; - os << '\t' << "Uid utilisateur : " << monid._uid << std::endl; - os << '\t' << "nom utilisateur : " << monid._pwname << std::endl; + os << '\t' << "Component name : " << monid._name << std::endl ; + os << '\t' << "Numero de PID : " << monid._pid << std::endl; + os << '\t' << "Uid utilisateur : " << monid._uid << std::endl; + os << '\t' << "nom utilisateur : " << monid._pwname << std::endl; #ifndef WIN32 - os << '\t' << "Nom de machine : " << monid._hostid.nodename << std::endl; + os << '\t' << "Nom de machine : " << monid._hostid.nodename << std::endl; #else - os << '\t' << "Nom de machine : " << monid._hostid << std::endl; + os << '\t' << "Nom de machine : " << monid._hostid << std::endl; #endif - os << '\t' << "Adresse IP : " << monid._adip << std::endl; - os << '\t' << "Heure de lancement : " << monid._cstart ; //ctime(&monid._start) ; - os << '\t' << "Dans le repertoire : " << monid._dir << std::endl; + os << '\t' << "Adresse IP : " << monid._adip << std::endl; + os << '\t' << "Heure de lancement : " << monid._cstart ; //ctime(&monid._start) ; + os << '\t' << "Dans le repertoire : " << monid._dir << std::endl; - return os ; + return os ; } diff --git a/src/Utils/Utils_Identity.hxx b/src/Utils/Utils_Identity.hxx index c3385762c..2da472e24 100644 --- a/src/Utils/Utils_Identity.hxx +++ b/src/Utils/Utils_Identity.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Utils : general SALOME's definitions and tools // File : Utils_Identity.hxx // Author : Pascale NOYRET, EDF @@ -46,50 +47,50 @@ class UTILS_EXPORT Identity { protected : - const char* const _name ; - const char* const _adip; // Internet address + const char* const _name ; + const char* const _adip; // Internet address #ifndef WIN32 const struct utsname _hostid; - const pid_t _pid ; - const uid_t _uid ; + const pid_t _pid ; + const uid_t _uid ; #else - const char* const _hostid; - const DWORD _pid ; - const PSID _uid ; -#endif - const char* const _pwname ; - const char* const _dir ; - const time_t _start; - const char* const _cstart ; + const char* const _hostid; + const DWORD _pid ; + const PSID _uid ; +#endif + const char* const _pwname ; + const char* const _dir ; + const time_t _start; + const char* const _cstart ; private : - Identity( void ); - Identity( const Identity &monid ); + Identity( void ); + Identity( const Identity &monid ); public : - Identity(const char *name); - ~Identity(); - friend std::ostream & operator<< ( std::ostream& os , const Identity& monid ); + Identity(const char *name); + ~Identity(); + friend std::ostream & operator<< ( std::ostream& os , const Identity& monid ); #ifndef WIN32 - const pid_t& pid(void) const; - const struct utsname& hostid(void) const; - const uid_t& uid(void) const; + const pid_t& pid(void) const; + const struct utsname& hostid(void) const; + const uid_t& uid(void) const; #else - const DWORD& pid(void) const; + const DWORD& pid(void) const; const char* const hostid(void) const; - const PSID& uid(void) const; + const PSID& uid(void) const; #endif - const char* const name( void ) const; - const char* const adip(void) const; - const char* const pwname(void) const; - const time_t& start(void) const; - const char* const rep (void) const; + const char* const name( void ) const; + const char* const adip(void) const; + const char* const pwname(void) const; + const time_t& start(void) const; + const char* const rep (void) const; - const char* host_char(void ) const; - const char* start_char(void) const; + const char* host_char(void ) const; + const char* start_char(void) const; } ; -# endif /* # if !defined( __IDENTITE_H__ ) */ +# endif /* # if !defined( __IDENTITE_H__ ) */ diff --git a/src/Utils/Utils_Identity.py b/src/Utils/Utils_Identity.py index 489060f8c..ee9af7508 100644 --- a/src/Utils/Utils_Identity.py +++ b/src/Utils/Utils_Identity.py @@ -1,30 +1,34 @@ #! /usr/bin/env python -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# 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 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. +# 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 +# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # SALOME Utils : general SALOME's definitions and tools # File : Utils_Identity.py # Author : Estelle Deville, CEA # Module : SALOME # $Header$ +## @package Utils_Identity +# \brief Module to get information about user and version # import sys import os @@ -32,13 +36,14 @@ import socket if not sys.platform == "win32": import pwd - + import time import string def getShortHostName(): """ gives Hostname without domain extension. + SALOME naming service needs short Hostnames (without domain extension). HOSTNAME is not allways defined in environment, socket.gethostname() gives short or complete Hostname, depending on @@ -51,18 +56,18 @@ class Identity: self._name = name self._pid = os.getpid() self._machine = socket.gethostname() - self._adip = socket.gethostbyname(self._machine) # IP adress + self._adip = socket.gethostbyname(self._machine) # IP adress if sys.platform == "win32": - self._uid = os.getpid() - self._pwname = os.environ["USER"] - else: - self._uid = os.getuid() - list = pwd.getpwuid(self._uid) - self._pwname = list[0] # user name + self._uid = os.getpid() + self._pwname = os.environ["USERNAME"] + else: + self._uid = os.getuid() + list = pwd.getpwuid(self._uid) + self._pwname = list[0] # user name - self._tc_start = time.time() + self._tc_start = time.time() self._cstart = time.ctime(self._tc_start) - self._cdir = os.getcwd() + self._cdir = os.getcwd() def getapplipath(): """ diff --git a/src/Utils/Utils_Mutex.cxx b/src/Utils/Utils_Mutex.cxx index 31bf4edea..16f25dab6 100644 --- a/src/Utils/Utils_Mutex.cxx +++ b/src/Utils/Utils_Mutex.cxx @@ -1,27 +1,28 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Utils : general SALOME's definitions and tools -// File: Utils_Mutex.cxx -// Author: Sergey ANIKIN +// File: Utils_Mutex.cxx +// Author: Sergey ANIKIN // Module : SALOME // $Header$ // @@ -73,7 +74,7 @@ void Utils_Mutex::unlock() #endif if ( myCount && (--myCount) < 1 ) { myCount = 0; - pthread_mutex_unlock( &myMutex ); + pthread_mutex_unlock( &myMutex ); } } diff --git a/src/Utils/Utils_Mutex.hxx b/src/Utils/Utils_Mutex.hxx index 0f19758c9..ef951ed28 100644 --- a/src/Utils/Utils_Mutex.hxx +++ b/src/Utils/Utils_Mutex.hxx @@ -1,27 +1,28 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Utils : general SALOME's definitions and tools -// File: Utils_Mutex.hxx -// Author: Sergey ANIKIN +// File: Utils_Mutex.hxx +// Author: Sergey ANIKIN // Module : SALOME // $Header$ // diff --git a/src/Utils/Utils_ORB_INIT.cxx b/src/Utils/Utils_ORB_INIT.cxx index bbb1c7490..23a9175ae 100644 --- a/src/Utils/Utils_ORB_INIT.cxx +++ b/src/Utils/Utils_ORB_INIT.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Utils : general SALOME's definitions and tools // File : Utils_ORB_INIT.cxx // Author : Antoine YESSAYAN, EDF @@ -59,18 +60,18 @@ CORBA::ORB_var &ORB_INIT::operator() ( int argc , char **argv ) throw( CommExcep try { if ( CORBA::is_nil( _orb ) ) { - try - { + try + { #if OMNIORB_VERSION >= 4 - _orb = CORBA::ORB_init( argc, argv, "omniORB4" ) ; + _orb = CORBA::ORB_init( argc, argv, "omniORB4" ) ; #else - _orb = CORBA::ORB_init( argc, argv, "omniORB3" ) ; + _orb = CORBA::ORB_init( argc, argv, "omniORB3" ) ; #endif - } - catch( const CORBA::Exception &ex ) - { - throw CommException( "Unable to create an ORB connexion" ) ; - } + } + catch( const CORBA::Exception & ) + { + throw CommException( "Unable to create an ORB connexion" ) ; + } } return _orb ; } catch ( CommException& e) {throw e;} diff --git a/src/Utils/Utils_ORB_INIT.hxx b/src/Utils/Utils_ORB_INIT.hxx index b4a867e1a..69aed10fd 100644 --- a/src/Utils/Utils_ORB_INIT.hxx +++ b/src/Utils/Utils_ORB_INIT.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Utils : general SALOME's definitions and tools // File : Utils_ORB_INIT.hxx // Author : Antoine YESSAYAN, EDF @@ -36,6 +37,11 @@ #include "Utils_CommException.hxx" +#ifdef WNT +#pragma warning(disable:4251) // Warning DLL Interface ... +#pragma warning(disable:4290) // Warning Exception ... +#endif + /*! * Ce composant prend en charge la connexion et la deconnexion a l'orb * Il est souhaitable de l'utiliser dans un SINGLETON. @@ -45,19 +51,19 @@ class UTILS_EXPORT ORB_INIT { private : - CORBA::ORB_var _orb ; + CORBA::ORB_var _orb ; public : - ORB_INIT( void ); - virtual ~ORB_INIT(); - CORBA::ORB_var & operator() ( int argc , char **argv ) throw( CommException ) ; + ORB_INIT( void ); + virtual ~ORB_INIT(); + CORBA::ORB_var & operator() ( int argc , char **argv ) throw( CommException ) ; - inline CORBA::ORB_var &orb( void ); + inline CORBA::ORB_var &orb( void ); } ; inline CORBA::ORB_var &ORB_INIT::orb( void ) { - return _orb ; + return _orb ; } # endif diff --git a/src/Utils/Utils_SALOME_Exception.cxx b/src/Utils/Utils_SALOME_Exception.cxx index 6039476de..07adc759f 100644 --- a/src/Utils/Utils_SALOME_Exception.cxx +++ b/src/Utils/Utils_SALOME_Exception.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Utils : general SALOME's definitions and tools // File : Utils_SALOME_Exception.cxx // Author : Antoine YESSAYAN, EDF @@ -45,41 +46,41 @@ const char* duplicate( const char *const str ) ; SALOME_Exception::SALOME_Exception( void ): exception() , _text(0) { - MESSAGE( "You must use the standard builder: SALOME_Exception::SALOME_Exception( const char *text )" ) ; - INTERRUPTION(1) ; + MESSAGE( "You must use the standard builder: SALOME_Exception::SALOME_Exception( const char *text )" ) ; + INTERRUPTION(1) ; } const char *makeText( const char *text, const char *fileName, const unsigned int lineNumber ) { - char *newText = 0 ; - - ASSERT(text) ; - const size_t l1 = 1+strlen(text) ; - ASSERT(l1>1) ; - - const char* prefix = "Salome Exception" ; - const size_t l0 = 2+strlen(prefix) ; - - if ( fileName ) - { - const size_t l2 = 4+strlen(fileName) ; - ASSERT(l2>4) ; - - ASSERT(lineNumber>=1) ; - const size_t l3 = 4+int(log10(float(lineNumber))) ; - - newText = new char [ 1+l0+l1+l2+l3 ] ; - sprintf( newText , "%s in %s [%u] : %s" , prefix, fileName, lineNumber, text ) ; - } - else - { - newText = new char [ 1+l0+l1 ] ; - sprintf( newText , "%s : %s" , prefix, text ) ; - } - ASSERT(newText) ; - return newText ; + char *newText = 0 ; + + ASSERT(text) ; + const size_t l1 = 1+strlen(text) ; + ASSERT(l1>1) ; + + const char* prefix = "Salome Exception" ; + const size_t l0 = 2+strlen(prefix) ; + + if ( fileName ) + { + const size_t l2 = 4+strlen(fileName) ; + ASSERT(l2>4) ; + + ASSERT(lineNumber>=1) ; + const size_t l3 = 4+int(log10(float(lineNumber))) ; + + newText = new char [ 1+l0+l1+l2+l3 ] ; + sprintf( newText , "%s in %s [%u] : %s" , prefix, fileName, lineNumber, text ) ; + } + else + { + newText = new char [ 1+l0+l1 ] ; + sprintf( newText , "%s : %s" , prefix, text ) ; + } + ASSERT(newText) ; + return newText ; } @@ -90,32 +91,32 @@ SALOME_Exception::SALOME_Exception( const char *text, const char *fileName, cons SALOME_Exception::~SALOME_Exception() throw () { - if ( _text ) - { - delete [] ((char*)_text); - char** pRef = (char**)&_text; - *pRef = 0; - } - ASSERT(_text==NULL) ; + if ( _text ) + { + delete [] ((char*)_text); + char** pRef = (char**)&_text; + *pRef = 0; + } + ASSERT(_text==NULL) ; } SALOME_Exception::SALOME_Exception( const SALOME_Exception &ex ): _text(duplicate(ex._text)) { - ; + ; } std::ostream & operator<<( std::ostream &os , const SALOME_Exception &ex ) { - os << ex._text ; - return os ; + os << ex._text ; + return os ; } const char* SALOME_Exception::what( void ) const throw () { - return _text ; + return _text ; } diff --git a/src/Utils/Utils_SALOME_Exception.hxx b/src/Utils/Utils_SALOME_Exception.hxx index c093e05c5..b10bf43e1 100644 --- a/src/Utils/Utils_SALOME_Exception.hxx +++ b/src/Utils/Utils_SALOME_Exception.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Utils : general SALOME's definitions and tools // File : Utils_SALOME_Exception.hxx // Author : Antoine YESSAYAN, EDF @@ -46,10 +47,11 @@ //therefore (temporary solution) defines are placed below #ifdef WIN32 -# ifdef UTILS_EXPORTS +# if defined UTILS_EXPORTS || defined OpUtil_EXPORTS # define UTILS_EXPORT __declspec( dllexport ) # else # define UTILS_EXPORT __declspec( dllimport ) +# undef LOCALIZED # define LOCALIZED(message) #message # endif #else @@ -60,22 +62,24 @@ class SALOME_Exception; UTILS_EXPORT std::ostream& operator<<( std::ostream&, const SALOME_Exception& ); +UTILS_EXPORT const char *makeText( const char *text, const char *fileName, const unsigned int lineNumber ); + class UTILS_EXPORT SALOME_Exception : public std::exception { private : - SALOME_Exception( void ); + SALOME_Exception( void ); protected : - const char* _text ; // non constant pointer but read only char variable + const char* _text ; // non constant pointer but read only char variable public : - SALOME_Exception( const char *text, const char *fileName=0, const unsigned int lineNumber=0 ); - SALOME_Exception( const SALOME_Exception &ex ); - ~SALOME_Exception() throw (); - friend std::ostream & operator<<( std::ostream &os , const SALOME_Exception &ex ); - virtual const char *what( void ) const throw () ; + SALOME_Exception( const char *text, const char *fileName=0, const unsigned int lineNumber=0 ); + SALOME_Exception( const SALOME_Exception &ex ); + virtual ~SALOME_Exception() throw (); + UTILS_EXPORT friend std::ostream & operator<<( std::ostream &os , const SALOME_Exception &ex ); + virtual const char *what( void ) const throw () ; } ; -#endif /* #if !defined( __Utils_SALOME_Exception_hxx__ ) */ +#endif /* #if !defined( __Utils_SALOME_Exception_hxx__ ) */ diff --git a/src/Utils/Utils_SINGLETON.hxx b/src/Utils/Utils_SINGLETON.hxx index 3f9fa7f4e..22124335d 100644 --- a/src/Utils/Utils_SINGLETON.hxx +++ b/src/Utils/Utils_SINGLETON.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Utils : general SALOME's definitions and tools // File : Utils_SINGLETON.hxx // Author : Antoine YESSAYAN, EDF @@ -51,21 +52,21 @@ * To create a single instance a POINT_ object : * * # include "Utils_SINGLETON.hxx" - * ... - * ptrPoint = SINGLETON_::Instance() ; + * ... + * ptrPoint = SINGLETON_::Instance() ; * * * Design description * - * -# the user creates an object of class TYPE By using a class method : SINGLETON_::Instance() which - * returns a pointer to the single object ; - * -# this class method uses the default constructor to create an object ; - * -# at the same time, this class method reate a destructor object which is added to the generic list - * of destructors objects to be executed at the end of the application (atexit) ; - * -# at the end of the application process all the deletions are performed by the Nettoyage() C function - * which execute the destructions objects then deletes the destructions objects themselves ; - * -# the Nettoyage() C function is recorded using atexit() C function through the creation of a static - * single object ATEXIT_(). + * -# the user creates an object of class TYPE By using a class method : SINGLETON_::Instance() which + * returns a pointer to the single object ; + * -# this class method uses the default constructor to create an object ; + * -# at the same time, this class method reate a destructor object which is added to the generic list + * of destructors objects to be executed at the end of the application (atexit) ; + * -# at the end of the application process all the deletions are performed by the Nettoyage() C function + * which execute the destructions objects then deletes the destructions objects themselves ; + * -# the Nettoyage() C function is recorded using atexit() C function through the creation of a static + * single object ATEXIT_(). */ @@ -74,19 +75,19 @@ template class SINGLETON_ public : - static TYPE *Instance( void ); //!< Singleton dynamic creation using the default builder - static bool IsAlreadyExisting( void ); //!< returns True if the singleton is already existing - static int Destruction( void ); //!< destroys the Singleton before the end of the application process + static TYPE *Instance( void ); //!< Singleton dynamic creation using the default builder + static bool IsAlreadyExisting( void ); //!< returns True if the singleton is already existing + static int Destruction( void ); //!< destroys the Singleton before the end of the application process private : - TYPE _Instance ; - static SINGLETON_ *PtrSingleton ; + TYPE _Instance ; + static SINGLETON_ *PtrSingleton ; - SINGLETON_( void ); - ~SINGLETON_(); + SINGLETON_( void ); + ~SINGLETON_(); -} ; /* class SINGLETON_ */ +} ; /* class SINGLETON_ */ @@ -106,19 +107,19 @@ template SINGLETON_ *SINGLETON_::PtrSingleton=NULL ; */ template TYPE *SINGLETON_::Instance( void ) { - if ( ! PtrSingleton ) - { - //MESSAGE("SINGLETON_::Instance( void )") ; - PtrSingleton = new SINGLETON_ ; - new DESTRUCTEUR_DE_( PtrSingleton->_Instance ) ; - } - return &PtrSingleton->_Instance ; + if ( ! PtrSingleton ) + { + //MESSAGE("SINGLETON_::Instance( void )") ; + PtrSingleton = new SINGLETON_ ; + new DESTRUCTEUR_DE_( PtrSingleton->_Instance ) ; + } + return &PtrSingleton->_Instance ; } template bool SINGLETON_::IsAlreadyExisting( void ) { - return PtrSingleton ? true : false ; + return PtrSingleton ? true : false ; } @@ -126,41 +127,41 @@ template bool SINGLETON_::IsAlreadyExisting( void ) template SINGLETON_::SINGLETON_( void ) { - //MESSAGE("CREATION d'un SINGLETON_") ; + //MESSAGE("CREATION d'un SINGLETON_") ; } /*! - The method SINGLETON_::Destruction can be called by the user. If it is not - the function nettoyage() calls it atexit. + The method SINGLETON_::Destruction can be called by the user. If it is not + the function nettoyage() calls it atexit. - N.B. : the singleton objects are destroyed in the reverse order of there creation. + N.B. : the singleton objects are destroyed in the reverse order of there creation. */ template int SINGLETON_::Destruction( void ) { - int k = - 1 ; - //BEGIN_OF("SINGLETON_::Destruction( void )") ; - if ( PtrSingleton ) - { - //MESSAGE("Destruction du SINGLETON_") ; - - - std::list::iterator k ; - for( k=DESTRUCTEUR_GENERIQUE_::Destructeurs->begin() ; k!=DESTRUCTEUR_GENERIQUE_::Destructeurs->end();k++) - { - if ( *k == PtrSingleton->_Instance ) - { - DESTRUCTEUR_GENERIQUE_::Destructeurs->erase( k ) ; - break ; - } - } - delete PtrSingleton ; - PtrSingleton = NULL ; - } - //END_OF("SINGLETON_::Destruction( void )") ; - return k ; + int k = - 1 ; + //BEGIN_OF("SINGLETON_::Destruction( void )") ; + if ( PtrSingleton ) + { + //MESSAGE("Destruction du SINGLETON_") ; + + + std::list::iterator k ; + for( k=DESTRUCTEUR_GENERIQUE_::Destructeurs->begin() ; k!=DESTRUCTEUR_GENERIQUE_::Destructeurs->end();k++) + { + if ( *k == PtrSingleton->_Instance ) + { + DESTRUCTEUR_GENERIQUE_::Destructeurs->erase( k ) ; + break ; + } + } + delete PtrSingleton ; + PtrSingleton = NULL ; + } + //END_OF("SINGLETON_::Destruction( void )") ; + return k ; } @@ -169,4 +170,4 @@ template SINGLETON_::~SINGLETON_() //MESSAGE("passage dans SINGLETON_::~SINGLETON_( void )") ; } -# endif /* # if !defined( __SINGLETON__H__ ) */ +# endif /* # if !defined( __SINGLETON__H__ ) */ diff --git a/src/Utils/Utils_Timer.cxx b/src/Utils/Utils_Timer.cxx index 8c68f0600..b90cf2941 100644 --- a/src/Utils/Utils_Timer.cxx +++ b/src/Utils/Utils_Timer.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Utils : general SALOME's definitions and tools // File : Utils_Timer.cxx // Module : SALOME @@ -76,7 +77,7 @@ void Utils_Timer::Start() { SYSTEMTIME st; GetSystemTime(&st); SystemTimeToFileTime(&st, RefToInitialTMS); - time(RefToCurrentTimeB); + time(RefToCurrentTimeB); #endif } } @@ -96,8 +97,8 @@ void Utils_Timer::Stop() { GetSystemTime(&st); SystemTimeToFileTime(&st, RefToCurrentTMS); Cumul_user += (int)(((ULARGE_INTEGER*)(RefToCurrentTMS))->QuadPart - ((ULARGE_INTEGER*)(RefToInitialTMS))->QuadPart) / 10000000; - Cumul_sys = Cumul_user; - time(RefToCurrentTimeB); + Cumul_sys = Cumul_user; + time(RefToCurrentTimeB); #endif Stopped = 1; } @@ -121,7 +122,7 @@ void Utils_Timer::ShowAbsolute(){ #ifndef WIN32 unsigned long Absolute_user = (unsigned long) ((timeval*)RefToCurrentTimeB)->tv_sec ; #else - unsigned long Absolute_user = *RefToCurrentTimeB; + unsigned long Absolute_user = (unsigned long) *RefToCurrentTimeB; #endif MESSAGE("Absolute time: " << Absolute_user << " seconds "); #endif diff --git a/src/Utils/Utils_Timer.hxx b/src/Utils/Utils_Timer.hxx index 96f33205e..2a9dd77fb 100644 --- a/src/Utils/Utils_Timer.hxx +++ b/src/Utils/Utils_Timer.hxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Utils : general SALOME's definitions and tools // File : Utils_Timer.hxx // Module : SALOME diff --git a/src/Utils/duplicate.cxx b/src/Utils/duplicate.cxx index 3f8aedc1a..0276b65b7 100644 --- a/src/Utils/duplicate.cxx +++ b/src/Utils/duplicate.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SALOME Utils : general SALOME's definitions and tools // File : duplicate.cxx // Author : Antoine YESSAYAN, EDF @@ -26,9 +27,9 @@ // $Header$ // /*! - * This function can be changed by strdup() if strdup() is ANSI. - * It is strongly (and only) used in the Registry environment - * (RegistryService, RegistryConnexion, Identity, ...) + * This function can be changed by strdup() if strdup() is ANSI. + * It is strongly (and only) used in the Registry environment + * (RegistryService, RegistryConnexion, Identity, ...) */ extern "C" { @@ -38,15 +39,13 @@ extern "C" #include "utilities.h" #include "OpUtil.hxx" -using namespace std; - const char* duplicate( const char *const str ) { - ASSERT(str!=NULL) ; - const size_t length = strlen( str ) ; - ASSERT(length>0) ; - char *new_str = new char[ 1+length ] ; - ASSERT(new_str) ; - strcpy( new_str , str ) ; - return new_str ; + ASSERT(str!=NULL) ; + const size_t length = strlen( str ) ; + ASSERT(length>0) ; + char *new_str = new char[ 1+length ] ; + ASSERT(new_str) ; + strcpy( new_str , str ) ; + return new_str ; } diff --git a/src/win32pm/setup.py b/src/win32pm/setup.py index 017e19704..022df1d2d 100755 --- a/src/win32pm/setup.py +++ b/src/win32pm/setup.py @@ -1,24 +1,23 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# 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 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. # -# 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 # -# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + from distutils.core import setup, Extension module1 = Extension('win32pm', diff --git a/src/win32pm/win32pm.c b/src/win32pm/win32pm.c index 1522221e9..1866e0fc9 100755 --- a/src/win32pm/win32pm.c +++ b/src/win32pm/win32pm.c @@ -1,24 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// 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 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. // -// 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 // -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include #include -- 2.39.2